[U-Boot] [PATCH 3/3] marvell: armada385: Add the Turris Omnia board

Stefan Roese sr at denx.de
Thu May 18 12:12:04 UTC 2017


Hi Marek,

On 13.05.2017 11:54, Andreas Färber wrote:

<big snip>

>> +/* Default boot environment. */
>> +#define CONFIG_BOOTCOMMAND			\
>> +	"i2c dev 1; "				\
>> +	"i2c read 0x2a 0x9 1 0x00FFFFF0; "	\
>> +	"setexpr.b rescue *0x00FFFFF0; "	\
>> +	"if test $rescue -ge 1; then "		\
>> +		"echo BOOT RESCUE; "		\
>> +		"run rescueboot; "		\
>> +	"else "					\
>> +		"echo BOOT eMMC FS; "		\
>> +		"run mmcboot; "			\
>> +	"fi"
>> +
>> +/* Keep device tree and initrd in lower memory so the kernel can access them */
>> +#define CONFIG_EXTRA_ENV_SETTINGS	\
>> +	"fdt_high=0x10000000\0"		\
>> +	"initrd_high=0x10000000\0"	\
>> +	"ethact=neta2\0"		\
>> +	"mmcboot=setenv bootargs \"$bootargs cfg80211.freg=$regdomain\"; " \
>> +		"ext4load mmc 0 0x01000000 boot/zImage; " \
>> +		"ext4load mmc 0 0x02000000 boot/dtb; " \
>> +		"bootz 0x01000000 - 0x02000000\0" \
>> +	"rescueboot=i2c mw 0x2a.1 0x3 0x1c 1; " \
>> +		"i2c mw 0x2a.1 0x4 0x1c 1; " \
>> +		"mw.l 0x01000000 0x00ff000c; " \
>> +		"i2c write 0x01000000 0x2a.1 0x5 4 -s; " \
>> +		"setenv bootargs \"$bootargs omniarescue=$rescue\"; " \
>> +		"sf probe; " \
>> +		"sf read 0x1000000 0x100000 0x700000; " \
>> +		"bootz 0x1000000\0" \
>> +	"bootargs=earlyprintk console=ttyS0,115200 rootfstype=ext4 " \
>> +		"rootdelay=2 root=b301 rootflags=subvol=@,commit=5 rw\0"
>
> These env settings are very old-style. Please use the distro macros.
> That means among others defining kernel_addr_r=0x01000000,
> fdt_addr_r=0x02000000 and ramdisk_addr_r and use the standardized boot
> commands instead of hardcoding mmcboot here. Then also USB, mSATA and
> network boot should be supported, and it abstracts the filesystem, plus
> it adds UEFI support.
>
> Selecting the distro defaults from the defconfig should also obsolete
> requiring ext4 in this config, among others.

Apart from addressing all other comments from Andreas, yes please
switch to using the distro defaults and configurations. Take
a look at this patch from Patrick, this should give you an idea:

https://patchwork.ozlabs.org/patch/760587/

Thanks,
Stefan


More information about the U-Boot mailing list