[PATCH] board: tbs2910: Add support for generic distro configuration

Tom Rini trini at konsulko.com
Sat Jan 25 21:33:39 CET 2020


On Sat, Jan 25, 2020 at 08:56:12PM +0100, Soeren Moch wrote:
> On 25.01.20 17:24, Tom Rini wrote:
> > On Sat, Jan 25, 2020 at 02:42:40AM +0100, Denis 'GNUtoo' Carikli wrote:
> >
> >> This keeps the compatibility with the old bootcmd.
> >>
> >> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
> > First, I have concerns about this increasing the size of the board.
> >
> >> ---
> >>  include/configs/tbs2910.h | 39 ++++++++++++++++++++++++++++++---------
> >>  1 file changed, 30 insertions(+), 9 deletions(-)
> >>
> >> diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h
> >> index b598fca1ec..8867918f37 100644
> >> --- a/include/configs/tbs2910.h
> >> +++ b/include/configs/tbs2910.h
> >> @@ -8,6 +8,26 @@
> >>  #ifndef __TBS2910_CONFIG_H
> >>  #define __TBS2910_CONFIG_H
> >>
> >> +#define CONFIG_BOOTCOMMAND \
> >> +	"mmc rescan; " \
> >> +	"if run bootcmd_up1; then " \
> >> +		"run bootcmd_up2; " \
> >> +	"else " \
> >> +		"run bootcmd_mmc || run distro_bootcmd; " \
> >> +	"fi"
> >> +
> >> +#ifndef CONFIG_SPL_BUILD
> >> +#define BOOT_TARGET_DEVICES(func) \
> >> +	func(MMC, mmc, 0) \
> >> +	func(MMC, mmc, 1) \
> >> +	func(MMC, mmc, 2) \
> >> +	func(SATA, sata, 0) \
> >> +	func(USB, usb, 0) \
> >> +	func(PXE, pxe, na) \
> >> +	func(DHCP, dhcp, na)
> >> +#include <config_distro_bootcmd.h>
> >> +#endif
> >> +
> >>  #include "mx6_common.h"
> >>
> >>  /* General configuration */
> >> @@ -80,6 +100,13 @@
> >>  #define CONFIG_BOARD_SIZE_LIMIT		392192 /* (CONFIG_ENV_OFFSET - 1024) */
> >>
> >>  #define CONFIG_EXTRA_ENV_SETTINGS \
> >> +	"fdt_addr=0x13000000\0" \
> >> +	"fdt_addr_r=0x13000000\0" \
> >> +	"initrd_high=0xffffffff\0" \
> >> +	"kernel_addr_r=0x10008000\0" \
> >> +	"pxefile_addr_r=0x10008000\0" \
> >> +	"ramdisk_addr_r=0x18000000\0" \
> >> +	"scriptaddr=0x14000000\0" \
> > Second, why are you disabling initrd relocation?  And we should set
> > bootm_size so that all relocations are done within the appropriate
> > memory window.
>
> We use CONFIG_SYS_BOOTMAPSZ so far to define the available save low
> memory. Is bootm_size required for distroboot, or is this a better
> alternative?

We have many ways of achieving the same ends.  Per the README (I had to
double check), if SYS_BOOTMAPSZ is not set then if bootm_size is set in
the environment we use that.  So in the end, same thing.  And we just
drop initrd_high here.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200125/200e5418/attachment.sig>


More information about the U-Boot mailing list