Message ID | 20200227003702.13936-5-GNUtoo@cyberdimension.org |
---|---|
State | New |
Headers | show |
Series | [v4,1/6] board: tbs2910: disable loadb and loads commands | expand |
On 27.02.20 01:37, Denis 'GNUtoo' Carikli wrote: > This keeps the compatibility with the old bootcmd. > > The fdtfile environment variable also needed to be set to > imx6q-tbs2910.dtb to enable booting mainline kernels > otherwise with extlinux.conf it tries to load > mx6-tbs2910.dtb instead. > > With arm-linux-gnueabi-gcc 9.2.0-1 from the Parabola > GNU/Linux distribution, we have the following size > differences: > - text: +2041 bytes > - data: 0 bytes > - bss: 0 bytes > - total: +2041 bytes > > Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org> > --- > Changelog: > In addition to the changes requested I also did the > following changes: > - I removed func(PXE, pxe, na) from the BOOT_TARGET_DEVICES > - I removed func(DHCP, dhcp, na) from the BOOT_TARGET_DEVICES > --- > configs/tbs2910_defconfig | 3 ++- > include/configs/tbs2910.h | 19 ++++++++++++++++++- > 2 files changed, 20 insertions(+), 2 deletions(-) > > diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig > index 1cf09bb741..b3a8e11a57 100644 > --- a/configs/tbs2910_defconfig > +++ b/configs/tbs2910_defconfig > @@ -11,10 +11,11 @@ CONFIG_CMD_HDMIDETECT=y > CONFIG_AHCI=y > CONFIG_DISTRO_DEFAULTS=y > CONFIG_BOOTDELAY=3 > -CONFIG_BOOTCOMMAND="mmc rescan; if run bootcmd_up1; then run bootcmd_up2; else run bootcmd_mmc; fi" > +CONFIG_BOOTCOMMAND="mmc rescan; if run bootcmd_up1; then run bootcmd_up2; else run bootcmd_mmc || run distro_bootcmd; fi" > CONFIG_USE_PREBOOT=y > CONFIG_PREBOOT="echo PCI:; pci enum; pci 1; usb start; if hdmidet; then run set_con_hdmi; else run set_con_serial; fi" > CONFIG_PRE_CONSOLE_BUFFER=y > +CONFIG_DEFAULT_FDT_FILE="imx6q-tbs2910.dtb" > CONFIG_BOUNCE_BUFFER=y > CONFIG_BOARD_EARLY_INIT_F=y > CONFIG_SYS_PROMPT="Matrix U-Boot> " > diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h > index 3975f4cc8b..9380406529 100644 > --- a/include/configs/tbs2910.h > +++ b/include/configs/tbs2910.h > @@ -8,6 +8,15 @@ > #ifndef __TBS2910_CONFIG_H > #define __TBS2910_CONFIG_H > > +#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) > + > +#include <config_distro_bootcmd.h> > + > #include "mx6_common.h" I prefer to include the new section below the existing #include "mx6_common.h". This way we keep that include at the usual place in the beginning, while marking the config_distro_bootcmd.h as special case. > > /* General configuration */ > @@ -80,6 +89,12 @@ > #define CONFIG_BOARD_SIZE_LIMIT 392192 /* (CONFIG_ENV_OFFSET - 1024) */ > > #define CONFIG_EXTRA_ENV_SETTINGS \ > + "fdt_addr=0x13000000\0" \ > + "fdt_addr_r=0x13000000\0" \ > + "kernel_addr_r=0x10008000\0" \ > + "pxefile_addr_r=0x10008000\0" \ > + "ramdisk_addr_r=0x18000000\0" \ > + "scriptaddr=0x14000000\0" \ > "bootargs_mmc1=console=ttymxc0,115200 di0_primary console=tty1\0" \ > "bootargs_mmc2=video=mxcfb0:dev=hdmi,1920x1080M at 60 " \ > "video=mxcfb1:off video=mxcfb2:off fbmem=28M\0" \ > @@ -102,6 +117,8 @@ > "setenv stderr serial,vga\0" \ > "stderr=serial,vga\0" \ > "stdin=serial,usbkbd\0" \ > - "stdout=serial,vga\0" > + "stdout=serial,vga\0" \ > + "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ > + BOOTENV > > #endif /* __TBS2910_CONFIG_H * */ Can you please keep the EXTRA_ENV_SETTINGS sorted alphabetically? Thanks, Soeren
On Sun, 1 Mar 2020 14:59:04 +0100 Soeren Moch <smoch at web.de> wrote: > On 27.02.20 01:37, Denis 'GNUtoo' Carikli wrote: > > This keeps the compatibility with the old bootcmd. [...] > > --- a/include/configs/tbs2910.h > > +++ b/include/configs/tbs2910.h > > @@ -8,6 +8,15 @@ > > #ifndef __TBS2910_CONFIG_H > > #define __TBS2910_CONFIG_H > > > > +#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) > > + > > +#include <config_distro_bootcmd.h> > > + > > #include "mx6_common.h" > I prefer to include the new section below the existing #include > "mx6_common.h". This way we keep that include at the usual place in > the beginning, while marking the config_distro_bootcmd.h as special > case. Is right under the "General configuration" comment a good place for that? Denis. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200527/5717146a/attachment.sig>
On 27.05.20 02:39, Denis 'GNUtoo' Carikli wrote: > On Sun, 1 Mar 2020 14:59:04 +0100 > Soeren Moch <smoch at web.de> wrote: > >> On 27.02.20 01:37, Denis 'GNUtoo' Carikli wrote: >>> This keeps the compatibility with the old bootcmd. > [...] >>> --- a/include/configs/tbs2910.h >>> +++ b/include/configs/tbs2910.h >>> @@ -8,6 +8,15 @@ >>> #ifndef __TBS2910_CONFIG_H >>> #define __TBS2910_CONFIG_H >>> >>> +#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) >>> + >>> +#include <config_distro_bootcmd.h> >>> + >>> #include "mx6_common.h" >> I prefer to include the new section below the existing #include >> "mx6_common.h". This way we keep that include at the usual place in >> the beginning, while marking the config_distro_bootcmd.h as special >> case. > Is right under the "General configuration" comment a good place for > that? > If you ask, maybe a new section /* Distroboot */ before " Environment organization" would look nicer. Or can this even go below BOOTENV in your new CONFIG_EXTRA_ENV_SETTINGS? Soeren
diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig index 1cf09bb741..b3a8e11a57 100644 --- a/configs/tbs2910_defconfig +++ b/configs/tbs2910_defconfig @@ -11,10 +11,11 @@ CONFIG_CMD_HDMIDETECT=y CONFIG_AHCI=y CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTDELAY=3 -CONFIG_BOOTCOMMAND="mmc rescan; if run bootcmd_up1; then run bootcmd_up2; else run bootcmd_mmc; fi" +CONFIG_BOOTCOMMAND="mmc rescan; if run bootcmd_up1; then run bootcmd_up2; else run bootcmd_mmc || run distro_bootcmd; fi" CONFIG_USE_PREBOOT=y CONFIG_PREBOOT="echo PCI:; pci enum; pci 1; usb start; if hdmidet; then run set_con_hdmi; else run set_con_serial; fi" CONFIG_PRE_CONSOLE_BUFFER=y +CONFIG_DEFAULT_FDT_FILE="imx6q-tbs2910.dtb" CONFIG_BOUNCE_BUFFER=y CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SYS_PROMPT="Matrix U-Boot> " diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h index 3975f4cc8b..9380406529 100644 --- a/include/configs/tbs2910.h +++ b/include/configs/tbs2910.h @@ -8,6 +8,15 @@ #ifndef __TBS2910_CONFIG_H #define __TBS2910_CONFIG_H +#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) + +#include <config_distro_bootcmd.h> + #include "mx6_common.h" /* General configuration */ @@ -80,6 +89,12 @@ #define CONFIG_BOARD_SIZE_LIMIT 392192 /* (CONFIG_ENV_OFFSET - 1024) */ #define CONFIG_EXTRA_ENV_SETTINGS \ + "fdt_addr=0x13000000\0" \ + "fdt_addr_r=0x13000000\0" \ + "kernel_addr_r=0x10008000\0" \ + "pxefile_addr_r=0x10008000\0" \ + "ramdisk_addr_r=0x18000000\0" \ + "scriptaddr=0x14000000\0" \ "bootargs_mmc1=console=ttymxc0,115200 di0_primary console=tty1\0" \ "bootargs_mmc2=video=mxcfb0:dev=hdmi,1920x1080M at 60 " \ "video=mxcfb1:off video=mxcfb2:off fbmem=28M\0" \ @@ -102,6 +117,8 @@ "setenv stderr serial,vga\0" \ "stderr=serial,vga\0" \ "stdin=serial,usbkbd\0" \ - "stdout=serial,vga\0" + "stdout=serial,vga\0" \ + "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ + BOOTENV #endif /* __TBS2910_CONFIG_H * */
This keeps the compatibility with the old bootcmd. The fdtfile environment variable also needed to be set to imx6q-tbs2910.dtb to enable booting mainline kernels otherwise with extlinux.conf it tries to load mx6-tbs2910.dtb instead. With arm-linux-gnueabi-gcc 9.2.0-1 from the Parabola GNU/Linux distribution, we have the following size differences: - text: +2041 bytes - data: 0 bytes - bss: 0 bytes - total: +2041 bytes Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org> --- Changelog: In addition to the changes requested I also did the following changes: - I removed func(PXE, pxe, na) from the BOOT_TARGET_DEVICES - I removed func(DHCP, dhcp, na) from the BOOT_TARGET_DEVICES --- configs/tbs2910_defconfig | 3 ++- include/configs/tbs2910.h | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-)