Re: [U-Boot] [PATCH 0/1] Distroboot support for DE0-nano-SoC board

On 01/20/2017 05:45 PM, Frank Kunz wrote:
Hi,
This patch adds common distribution boot environment variables for DE0-nanos-SoC board. It disables the watchdog enalbe in uboot since this is done by the OS.
So if the board hangs in U-Boot, with this patch you're doomed.
The MMC boot mode is switched to raw mode, which gets rid of the 0xa2 special partition. The SOC ROM loader scans for the SPL in the special partition (partition mode) and from MMC card sector 0 (raw mode), each for four valid SPLs.
So all existing systems will be rendered unbootable if I apply this patch?
When a partition table is used with raw mode the first SPL must not be written to the MMC and the ROM loader uses the second SPL.
btw if this patch does multiple things, it should be multiple patches, but I'm not too keen on taking it unless the above stuff is sorted out. btw please CC Dinh on Altera patches.
Frank Kunz (1): socfpga: Distroboot support for DE0-nano-SoC
configs/socfpga_de0_nano_soc_defconfig | 1 + include/configs/socfpga_common.h | 2 +- include/configs/socfpga_de0_nano_soc.h | 47 ++++++++++++++++++++-------------- 3 files changed, 30 insertions(+), 20 deletions(-)
-- 2.11.0

Am 20.01.2017 um 18:18 schrieb Marek Vasut:
On 01/20/2017 05:45 PM, Frank Kunz wrote:
Hi,
This patch adds common distribution boot environment variables for DE0-nanos-SoC board. It disables the watchdog enalbe in uboot since this is done by the OS.
So if the board hangs in U-Boot, with this patch you're doomed.
Yes, this is a risk. An option could be to extend the watchdog timeout. I had the problem that the watchdog triggered during initrd rewrite on first boot of openSUSE. That remains the system in an un-bootable state. Currently the timeout is 30 seconds and I think it needs to be extended to minutes.
The MMC boot mode is switched to raw mode, which gets rid of the 0xa2 special partition. The SOC ROM loader scans for the SPL in the special partition (partition mode) and from MMC card sector 0 (raw mode), each for four valid SPLs.
So all existing systems will be rendered unbootable if I apply this patch?
In principle yes. The problem is the bootcmd variable, which is defined by the current code in a way that will not allow to boot a script. So far I had no better idea as change it. If you have an example or proposal how to handle that I will add this.
When a partition table is used with raw mode the first SPL must not be written to the MMC and the ROM loader uses the second SPL.
btw if this patch does multiple things, it should be multiple patches, but I'm not too keen on taking it unless the above stuff is sorted out. btw please CC Dinh on Altera patches.
Ok, I will split to separate patches and re-send to the list.
Thanks for your feedback.
Br, Frank

On 01/20/2017 07:11 PM, Frank Kunz wrote:
Am 20.01.2017 um 18:18 schrieb Marek Vasut:
On 01/20/2017 05:45 PM, Frank Kunz wrote:
Hi,
This patch adds common distribution boot environment variables for DE0-nanos-SoC board. It disables the watchdog enalbe in uboot since this is done by the OS.
So if the board hangs in U-Boot, with this patch you're doomed.
Yes, this is a risk. An option could be to extend the watchdog timeout. I had the problem that the watchdog triggered during initrd rewrite on first boot of openSUSE. That remains the system in an un-bootable state. Currently the timeout is 30 seconds and I think it needs to be extended to minutes.
Can you describe the problem and how to trigger it ? No, 30 seconds is definitely long enough already. If U-Boot triggers WDT during some operation, it means it got stuck or there's a bug, nothing else.
The MMC boot mode is switched to raw mode, which gets rid of the 0xa2 special partition. The SOC ROM loader scans for the SPL in the special partition (partition mode) and from MMC card sector 0 (raw mode), each for four valid SPLs.
So all existing systems will be rendered unbootable if I apply this patch?
In principle yes. The problem is the bootcmd variable, which is defined by the current code in a way that will not allow to boot a script. So far I had no better idea as change it. If you have an example or proposal how to handle that I will add this.
How is bootcmd related to changing partition layout ?
When a partition table is used with raw mode the first SPL must not be written to the MMC and the ROM loader uses the second SPL.
btw if this patch does multiple things, it should be multiple patches, but I'm not too keen on taking it unless the above stuff is sorted out. btw please CC Dinh on Altera patches.
Ok, I will split to separate patches and re-send to the list.
Thanks
Thanks for your feedback.
Br, Frank
participants (2)
-
Frank Kunz
-
Marek Vasut