Re: [U-Boot] u-boot: OpenRD Ultimate fails to build
On 2015-03-25, drEagle wrote: > Le 21/03/2015 15:53, Vagrant Cascadian a écrit : >> It seems that OpenRD Ultimate with u-boot 2015.04-rc3 and newer no >> longer builds from source, both in Debian and with mainline git. It >> appears to have overgrown the size limits set for it: > > Looks like the NAND partition map had to be changed to give more space for > u-boot. The following patch gets it to build by moving the env addr and offset later. This might cause problems with new or existing u-boot installations on openrd if the environment needs to be at a specific location. I have no hardware to test, so no way of confirming this directly: diff --git a/include/configs/openrd.h b/include/configs/openrd.h index b6f80af..2f1e174 100644 --- a/include/configs/openrd.h +++ b/include/configs/openrd.h @@ -72,12 +72,12 @@ /* * max 4k env size is enough, but in case of nand * it has to be rounded to sector size */ #define CONFIG_ENV_SIZE0x2 /* 128k */ -#define CONFIG_ENV_ADDR0x6 -#define CONFIG_ENV_OFFSET 0x6 /* env starts here */ +#define CONFIG_ENV_ADDR0x8 +#define CONFIG_ENV_OFFSET 0x8 /* env starts here */ /* * Environment is right behind U-Boot in flash. Make sure U-Boot * doesn't grow into the environment area. */ #define CONFIG_BOARD_SIZE_LIMITCONFIG_ENV_OFFSET I'll likely remove openrd_ultimate from future uploads to Debian if I can't get confirmation about how to fix this properly. live well, vagrant signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] arm: imx: Switch Wandboard to use config_distro_bootcmd.h.
This allows for more flexible and standardized boot across multiple platforms. Remove most redundant legacy boot environment. Cc: Otavio Salvador Signed-off-by: Vagrant Cascadian --- include/configs/wandboard.h | 139 ++-- 1 file changed, 17 insertions(+), 122 deletions(-) diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h index b586803..b4cb9db 100644 --- a/include/configs/wandboard.h +++ b/include/configs/wandboard.h @@ -51,8 +51,6 @@ #define CONFIG_CMD_BMODE #define CONFIG_CMD_SETEXPR -#define CONFIG_BOOTDELAY 5 - #define CONFIG_SYS_MEMTEST_START 0x1000 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M) #define CONFIG_LOADADDR0x1200 @@ -74,9 +72,6 @@ #define CONFIG_CMD_MMC #define CONFIG_GENERIC_MMC #define CONFIG_BOUNCE_BUFFER -#define CONFIG_CMD_EXT2 -#define CONFIG_CMD_FAT -#define CONFIG_DOS_PARTITION /* USB Configs */ #define CONFIG_CMD_USB @@ -131,131 +126,34 @@ #endif #define CONFIG_EXTRA_ENV_SETTINGS \ - "script=boot.scr\0" \ - "image=zImage\0" \ "console=ttymxc0\0" \ - "splashpos=m,m\0" \ + "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \ + "fdt_addr_r=0x1800\0" \ "fdt_high=0x\0" \ "initrd_high=0x\0" \ - "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ - "fdt_addr=0x1800\0" \ - "boot_fdt=try\0" \ - "ip_dyn=yes\0" \ - "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ - "mmcpart=1\0" \ - "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ - "update_sd_firmware_filename=u-boot.imx\0" \ - "update_sd_firmware=" \ - "if test ${ip_dyn} = yes; then " \ - "setenv get_cmd dhcp; " \ - "else " \ - "setenv get_cmd tftp; " \ - "fi; " \ - "if mmc dev ${mmcdev}; then " \ - "if ${get_cmd} ${update_sd_firmware_filename}; then " \ - "setexpr fw_sz ${filesize} / 0x200; " \ - "setexpr fw_sz ${fw_sz} + 1; " \ - "mmc write ${loadaddr} 0x2 ${fw_sz}; " \ - "fi; " \ - "fi\0" \ - "mmcargs=setenv bootargs console=${console},${baudrate} " \ - "root=${mmcroot}; run videoargs\0" \ - "videoargs=" \ - "setenv nextcon 0; " \ - "if hdmidet; then " \ - "setenv bootargs ${bootargs} " \ - "video=mxcfb${nextcon}:dev=hdmi,1280x720M@60," \ - "if=RGB24; " \ - "setenv fbmen fbmem=28M; " \ - "setexpr nextcon ${nextcon} + 1; " \ - "else " \ - "echo - no HDMI monitor;" \ - "fi; " \ - "i2c dev 1; " \ - "if i2c probe 0x10; then " \ - "setenv bootargs ${bootargs} " \ - "video=mxcfb${nextcon}:dev=lcd,800x480@60," \ - "if=RGB666,bpp=32; " \ - "if test 0 -eq ${nextcon}; then " \ - "setenv fbmem fbmem=10M; " \ - "else " \ - "setenv fbmem ${fbmem},10M; " \ - "fi; " \ - "setexpr nextcon ${nextcon} + 1; " \ - "else " \ - "echo '- no FWBADAPT-7WVGA-LCD-F07A-0102 display';" \ - "fi; " \ - "setenv bootargs ${bootargs} ${fbmem}\0" \ - "loadbootscript=" \ - "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ - "bootscript=echo Running bootscript from mmc ...; " \ - "source\0" \ - "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ - "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ - "mmcboot=echo Booting from mmc ...; " \ - "run mmcargs; " \ - "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ - "if run loadfdt; t
Re: [U-Boot] [PATCH v4 2/2] ARM: mx5: add support for USB armory board
On 2015-03-26, and...@inversepath.com wrote: > From: Andrej Rosano > > Add support for Inverse Path USB armory board, an open source > flash-drive sized computer based on Freescale i.MX53 SoC. > > http://inversepath.com/usbarmory Tested-By: Vagrant Cascadian live well, vagrant signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] arm: mx5: Add support for USB armory board
On 2015-03-25, Stefano Babic wrote: >> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig >> index b9ebee1..a490084 100644 >> --- a/arch/arm/Kconfig >> +++ b/arch/arm/Kconfig >> @@ -462,6 +462,10 @@ config TARGET_MX53SMD >> bool "Support mx53smd" >> select CPU_V7 >> >> +config TARGET_USBARMORY >> +bool "Support USB armory" >> +select CPU_V7 >> + > > I recently merged Boris Brezillon's patches to move new boards outside > arm/Kconfig. Patches were related to MX6, but the same mechanism can be > reused for MX5/MX53. It should be better to have the same and bew boards > should not change arm/Kconfig. That generates conflicts by merging > different architecture. > > Can you take a look at it and move USB armory to that approach ? I've got an updated patch for this based on u-boot-imx; would you like a separate patch for the mx5 changes, or should it be included as part of the usbarmory series? live well, vagrant signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v3] arm: mx5: Add support for USB armory board
On 2015-03-24, and...@inversepath.com wrote: > Add support for Inverse Path USB armory board, an open source > flash-drive sized computer based on Freescale i.MX53 SoC. Thanks! Unfortunately, this fails to build with numerous errors such as: CC arch/arm/lib/asm-offsets.s In file included from include/config.h:6:0, from /«BUILDDIR»/u-boot-2015.04~rc4+dfsg1/include/common.h:18, from /«BUILDDIR»/u-boot-2015.04~rc4+dfsg1/lib/asm-offsets.c:15: /«BUILDDIR»/u-boot-2015.04~rc4+dfsg1/include/configs/usbarmory.h:86:0: warning: "CONFIG_BOOTCOMMAND" redefined #define CONFIG_BOOTCOMMAND \ ^ In file included from /«BUILDDIR»/u-boot-2015.04~rc4+dfsg1/include/configs/usbarmory.h:27:0, from include/config.h:6, from /«BUILDDIR»/u-boot-2015.04~rc4+dfsg1/include/common.h:18, from /«BUILDDIR»/u-boot-2015.04~rc4+dfsg1/lib/asm-offsets.c:15: /«BUILDDIR»/u-boot-2015.04~rc4+dfsg1/include/config_distro_bootcmd.h:232:0: note: this is the location of the previous definition #define CONFIG_BOOTCOMMAND "run distro_bootcmd" ^ It is caused by including config_distro_bootcmd.h too early, and config_distro_bootcmd.h defines CONFIG_BOOTCOMMAND before it is set in include/configs/usbarmory.h. The include for config_distro_bootcmd.h should be *after* CONFIG_BOOTCOMMAND and BOOT_TARGET_DEVICES are defined, at least. There are also other conditionals that may be impacted but are more subtle. So here's a tested trivial patch to fix that: Index: u-boot/include/configs/usbarmory.h === --- u-boot.orig/include/configs/usbarmory.h +++ u-boot/include/configs/usbarmory.h @@ -24,7 +24,6 @@ #include #include -#include /* U-Boot commands */ #define CONFIG_CMD_MEMTEST @@ -92,6 +91,8 @@ #define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) +#include + #define MEM_LAYOUT_ENV_SETTINGS \ "kernel_addr_r=0x7080\0" \ "fdt_addr_r=0x7100\0" \ I'd like to propose only setting bootargs when the default action is kicking in to allow for a different root device, or root device discovery from an initramfs, or boot scripts, etc... Something along these lines (untested): Index: u-boot/include/configs/usbarmory.h === --- u-boot.orig/include/configs/usbarmory.h +++ u-boot/include/configs/usbarmory.h @@ -80,10 +80,9 @@ #define CONFIG_SYS_TEXT_BASE 0x7780 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR #define CONFIG_HOSTNAMEusbarmory -#define CONFIG_BOOTARGS \ - "console=ttymxc0,115200 root=/dev/mmcblk0p1 rootwait rw" #define CONFIG_BOOTCOMMAND \ "run distro_bootcmd; " \ + "setenv bootargs console=${console} ${bootargs_default}; " \ "ext2load mmc 0:1 ${kernel_addr_r} /boot/uImage; " \ "ext2load mmc 0:1 ${fdt_addr_r} /boot/${fdtfile}; " \ "bootm ${kernel_addr_r} - ${fdt_addr_r}" @@ -102,6 +101,7 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ MEM_LAYOUT_ENV_SETTINGS \ + "bootargs_default=root=/dev/mmcblk0p1 rootwait rw\0" \ "fdtfile=imx53-usbarmory.dtb\0" \ "console=ttymxc0,115200\0" \ BOOTENV live well, vagrant signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] arm: mx5: Add support for USB armory board
On 2015-03-19, Andrej Rosano wrote: > On Thu, Mar 19, 2015 at 09:55:26AM -0700, Vagrant Cascadian wrote: >> On 2015-02-24, and...@inversepath.com wrote: >> > Add support for Inverse Path USB armory board, an open source >> > flash-drive sized computer based on Freescale i.MX53 SoC. ... >> Would you consider patches that include config_distro_defaults.h and >> config_distro_bootcmd.h, documented in doc/README.distro? It may require >> adding several variables such as fdt_addr_r, fdtfile, ramdisk_addr_r, >> ramdiskfile, kernel_addr_r, bootfile, pxe_addr_r and scriptaddr, >> documented in README and doc/README.distro. I'd be happy to work on >> patches. ... > Sure, it would be nice to have this included in the patch. > I didn't know about this, I will take a look as well. Let me know if > you need any help from my side. Ok, here's a quick patch on top of your existing patch. It compiles, but I haven't tested that it boots (waiting on some header pins to hook up the serial console). I tried to preserve default behavior, the only difference is that it will first check for extlinux.conf and boot.scr before running the default boot action, and has a 2 second rather than 1 second bootdelay. Many of the things defined in config_distro_defaults.h were redundant. Not sure if CONFIG_LOADADDR needs to be different from kernel_addr_r/scriptaddr/pxefile_addr_r, if they can all be the same, then they could be defined with CONFIG_LOADADDR. Hopefully ramdisk_addr_r is at a reasonable location so it won't be clobbered by the fdt or kernel being loaded to a lower address. It may require removing the default bootargs to work with boot scripts. diff --git a/include/configs/usbarmory.h b/include/configs/usbarmory.h index e00ec7b..7e4cc68 100644 --- a/include/configs/usbarmory.h +++ b/include/configs/usbarmory.h @@ -22,12 +22,10 @@ #include #include +#include /* U-Boot commands */ -#define CONFIG_CMD_BOOTZ -#define CONFIG_CMD_FAT #define CONFIG_CMD_MEMTEST -#define CONFIG_CMD_EXT2 #undef CONFIG_CMD_IMLS /* U-Boot environment */ @@ -39,14 +37,10 @@ #define CONFIG_SYS_MMC_ENV_DEV 0 /* U-Boot general configurations */ -#define CONFIG_SYS_LONGHELP -#define CONFIG_SYS_HUSH_PARSER -#define CONFIG_AUTO_COMPLETE #define CONFIG_SYS_CBSIZE 512 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) #define CONFIG_SYS_MAXARGS 16 #define CONFIG_SYS_BARGSIZECONFIG_SYS_CBSIZE -#define CONFIG_CMDLINE_EDITING /* UART */ #define CONFIG_MXC_UART @@ -61,7 +55,6 @@ #define CONFIG_SYS_FSL_ESDHC_NUM 2 #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_DOS_PARTITION /* USB */ #define CONFIG_CMD_USB @@ -82,7 +75,6 @@ #define CONFIG_FSL_IIM /* Linux boot */ -#define CONFIG_BOOTDELAY 1 #define CONFIG_LOADADDR0x7200 #define CONFIG_SYS_TEXT_BASE 0x7780 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR @@ -90,8 +82,28 @@ #define CONFIG_BOOTARGS \ "console=ttymxc0,115200 root=/dev/mmcblk0p1 rootwait rw" #define CONFIG_BOOTCOMMAND \ - "ext2load mmc 0:1 0x7080 /boot/uImage; ext2load mmc 0:1" \ - "0x7100 /boot/imx53-usbarmory.dtb; bootm 0x7080 - 0x7100" + "run distro_bootcmd; " \ + "ext2load mmc 0:1 ${kernel_addr_r} /boot/uImage; " \ + "ext2load mmc 0:1 ${fdt_addr_r} /boot/${fdtfile}; " \ + "bootm ${kernel_addr_r} - ${fdt_addr_r}" + +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 0) + +#include + +#define MEM_LAYOUT_ENV_SETTINGS \ + "kernel_addr_r=0x7080\0" \ + "fdt_addr_r=0x7100\0" \ + "scriptaddr=0x7080\0" \ + "pxefile_addr_r=0x7080\0" \ + "ramdisk_addr_r=0x7300\0" + +#define CONFIG_EXTRA_ENV_SETTINGS \ + MEM_LAYOUT_ENV_SETTINGS \ + "fdtfile=imx53-usbarmory.dtb\0" \ + "console=ttymxc0,115200\0" \ + BOOTENV /* Physical Memory Map */ #define CONFIG_NR_DRAM_BANKS 1 live well, vagrant signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] u-boot: OpenRD Ultimate fails to build
It seems that OpenRD Ultimate with u-boot 2015.04-rc3 and newer no longer builds from source, both in Debian and with mainline git. It appears to have overgrown the size limits set for it: OBJCOPY u-boot.srec OBJCOPY u-boot.bin u-boot.bin exceeds file size limit: limit: 393216 bytes actual: 407068 bytes excess: 13852 bytes Makefile:834: recipe for target 'u-boot.bin' failed make: *** [u-boot.bin] Error 1 Full build log: https://buildd.debian.org/status/fetch.php?pkg=u-boot&arch=armel&ver=2015.04~rc3%2Bdfsg1-1&stamp=1425849560 If you've got an openrd_ultimate and want to ensure it keeps working in Debian (and obviously mainline)... please let me know! live well, vagrant signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] arm: mx5: Add support for USB armory board
On 2015-02-24, and...@inversepath.com wrote: > Add support for Inverse Path USB armory board, an open source > flash-drive sized computer based on Freescale i.MX53 SoC. ... > diff --git a/include/configs/usbarmory.h b/include/configs/usbarmory.h > new file mode 100644 > index 000..e00ec7b > --- /dev/null > +++ b/include/configs/usbarmory.h ... > +#include > +#include Would you consider patches that include config_distro_defaults.h and config_distro_bootcmd.h, documented in doc/README.distro? It may require adding several variables such as fdt_addr_r, fdtfile, ramdisk_addr_r, ramdiskfile, kernel_addr_r, bootfile, pxe_addr_r and scriptaddr, documented in README and doc/README.distro. I'd be happy to work on patches. I'd like to enable the usbarmory target in Debian's u-boot packages, and this would make it easier for it to behave more-or-less consistantly with several other platforms, and allow for more flexibility when booting. live well, vagrant signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] Fix cosmetic issues in mkimage manpage
* Escape use of - in description of -F. * Fix line continuations in examples so that the continued lines are also bold. Signed-off-by: Vagrant Cascadian --- doc/mkimage.1 | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/mkimage.1 b/doc/mkimage.1 index 14374da..b48f70b 100644 --- a/doc/mkimage.1 +++ b/doc/mkimage.1 @@ -115,7 +115,7 @@ FIT image. .TP .BI "\-F" Indicates that an existing FIT image should be modified. No dtc -compilation is performed and the -f flag should not be given. +compilation is performed and the \-f flag should not be given. This can be used to sign images with additional keys after initial image creation. @@ -163,7 +163,8 @@ Create FIT image with compressed kernel and sign it with keys in the skipping those for which keys cannot be found. Also add a comment. .nf .B mkimage -f kernel.its -k /public/signing-keys -K u-boot.dtb --c "Kernel 3.8 image for production devices" kernel.itb +.br +.B -c "Kernel 3.8 image for production devices" kernel.itb .fi .P @@ -173,7 +174,8 @@ with keys that are available in the new directory. Images that request signing with unavailable keys are skipped. .nf .B mkimage -F -k /secret/signing-keys -K u-boot.dtb --c "Kernel 3.8 image for production devices" kernel.itb +.br +.B -c "Kernel 3.8 image for production devices" kernel.itb .fi .SH HOMEPAGE -- 2.1.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] generic-board: make compile-time noise for non-generic boards
On 2014-10-19, Masahiro Yamada wrote: > Commit 0f605c1501f6 (Start the deprecation process for generic board) > added a run-time warning message. Let's be noisier for non-generic > boards to inform the dead line of the conversion. ... > diff --git a/Makefile b/Makefile > index 99097e1..f439d82 100644 > --- a/Makefile > +++ b/Makefile > @@ -775,6 +775,12 @@ quiet_cmd_pad_cat = CAT $@ > cmd_pad_cat = $(cmd_objcopy) && $(append) || rm -f $@ > > all: $(ALL-y) > +ifneq ($(CONFIG_SYS_GENERIC_BOARD),y) > + @echo >&2 " WARNING =" > + @echo >&2 "Please convert this board to generic board." > + @echo >&2 "Otherwise it will be removed by the end of 2014." > + @echo >&2 "==" > +endif > > PHONY += dtbs > dtbs dts/dt.dtb: checkdtc u-boot Maybe it should also mention doc/README.generic-board in the warning, or some other indication where to find more information? live well, vagrant pgpCGdxohdeEk.pgp Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH 6/7] Add support for loading environment from uEnv.txt in config_distro_bootcmd.
On 2014-10-06, Stephen Warren wrote: > On 10/03/2014 03:08 PM, Vagrant Cascadian wrote: > >> diff --git a/include/config_distro_bootcmd.h >> b/include/config_distro_bootcmd.h > >> "for prefix in ${boot_prefixes}; do " \ >> "run scan_dev_for_extlinux; " \ >> "run scan_dev_for_scripts; " \ >> +"run scan_dev_for_uenv_files; " \ >> "done;" \ > > I've always thought of uEnv.txt being stored in a single hard-coded > location, and used to set e.g. $boot_targets to influence which > locations get searched for boot files. However, this patch appears to > use it to house actual boot command sequences. I took the behavior of the am335x_evm.h based boards and tryed to generalize it. If that's not desired, then allowing for some hook to maintain backwards compatibility for those boards would be nice to make it feasible for boards to migrate to config_distro_bootcmd without breaking backwards compatibility. > In other words, I intended: > > * (Optionally, and preferably via CONFIG_PREBOOT) load uEnv.txt from a > hard-coded location. > * Search a list of locations for boot files, of type extlinux.conf (or > for legacy reasons, boot .scr) > > However, this patch now allows: > > * Search a list of locations for boot files, of type extlinux.conf, or > for legacy reasons, boot .scr, or uEnv.txt > I don't think that's something we should encourage in > config_distro_bootcmd.h; the entire point of this header file is to > define a single way (extlinux.conf) for distros to define the available > boot options. Yes unfortunately we have boot.scr too as a legacy option, > but perhaps someday we can drop that. If we grow more options (allowing > boot scripts in uEnv.txt) that removes the standardization. Sure. > If we absolutely have to support uEnv.txt for legacy reasons on some > platforms, we should at least make it optional so that we don't add > support for it to all the other platforms that don't want to pick up > legacy stuff. Perhaps we should "run scan_dev_hook" and allow boards to > define arbitrary stuff there, so there's no mention at all of uEnv.txt > in config_distro_bootcmd.h. Sounds reasonable. It might be desireable to have multiple hook locations, to be able to run before or after various points. Some of the other patches in this series implement generic hooks to be run as part of "bootcmd". Obviously, there's a balance to be struck not putting too many hooks in. Thanks for the review and comments! live well, vagrant pgpnyXh0zzvqX.pgp Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC PATCH 1/7] Allow checking in multiple partitions for scan_dev_for_boot.
Thanks for the review! On 2014-10-06, Stephen Warren wrote: > On 10/03/2014 03:08 PM, Vagrant Cascadian wrote: > > Some standalone description of this change, and justification for it, > should really be present in the commit message. Patch 0/7 doesn't get > applied anywhere. Of course; that was a consequence of learning how patman/git-send-email work... trial by fire... I'll use more verbose commit messages in the future. >> diff --git a/include/config_distro_bootcmd.h >> b/include/config_distro_bootcmd.h > >> -"bootpart=1\0" \ >> +"boot_partitions=1\0" \ > > Instead of searching a hard-coded list of partitions, I think it'd be > better to have the script automatically determine which partition to > boot from based on the partition tables' bootable flag or partition > type. I had always intended these scripts to do that, but never got > around to doing it. I think the $dev:$part syntax already chooses the > first partition marked bootable if you don't specify a partition. Would > that work? I suspect that might work. I merely went with the simplest approach to extend what was already there, by supporting an arbitrary number of partitions to search, and leaving the defaults as is. The BeagleBone Black board ships with various boot files on the first FAT partition, but newer images available for it moved boot files (kernel/initrd/dtb/uEnv.txt) onto the second (ext4?) partition, as the FAT partition is exported as a multifunction device over USB... So ideally u-boot could support multiple partitions to search, to support multiple generations of images without having to manually configure u-boot. live well, vagrant pgpYMPgOlw9Yn.pgp Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH 2/7] Allow overriding boot_partitions default value by setting BOOTENV_BOOT_PARTITIONS before including config_distro_bootcmd.
Signed-off-by: Vagrant Cascadian --- include/config_distro_bootcmd.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index 5e5e5e3..a93354a 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -152,6 +152,10 @@ #define BOOTENV_BOOT_TARGETS \ "boot_targets=" BOOT_TARGET_DEVICES(BOOTENV_DEV_NAME) "\0" +#ifndef BOOTENV_BOOT_PARTITIONS +#define BOOTENV_BOOT_PARTITIONS "1" +#endif + #define BOOTENV_DEV(devtypeu, devtypel, instance) \ BOOTENV_DEV_##devtypeu(devtypeu, devtypel, instance) #define BOOTENV \ @@ -163,7 +167,7 @@ "boot_prefixes=/ /boot/\0" \ "boot_scripts=boot.scr.uimg boot.scr\0" \ BOOTENV_BOOT_TARGETS \ - "boot_partitions=1\0" \ + "boot_partitions="BOOTENV_BOOT_PARTITIONS"\0" \ \ "boot_extlinux=" \ "sysboot ${devtype} ${devnum}:${bootpart} any " \ -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH 5/7] Only set CONFIG_BOOTDELAY if not already set.
Signed-off-by: Vagrant Cascadian --- include/config_distro_defaults.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/config_distro_defaults.h b/include/config_distro_defaults.h index 5d18a4b..fc67c42 100644 --- a/include/config_distro_defaults.h +++ b/include/config_distro_defaults.h @@ -45,7 +45,9 @@ #define CONFIG_CMDLINE_EDITING #define CONFIG_AUTO_COMPLETE +#ifndef CONFIG_BOOTDELAY #define CONFIG_BOOTDELAY 2 +#endif #define CONFIG_SYS_LONGHELP #define CONFIG_MENU #define CONFIG_DOS_PARTITION -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH 6/7] Add support for loading environment from uEnv.txt in config_distro_bootcmd.
Signed-off-by: Vagrant Cascadian --- include/config_distro_bootcmd.h | 21 + 1 file changed, 21 insertions(+) diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index 2503431..aaa010e 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -174,6 +174,7 @@ BOOTENV_SHARED_IDE \ "boot_prefixes=/ /boot/\0" \ "boot_scripts=boot.scr.uimg boot.scr\0" \ + "boot_uenv_files=uEnv.txt\0" \ BOOTENV_BOOT_TARGETS \ "boot_partitions="BOOTENV_BOOT_PARTITIONS"\0" \ \ @@ -205,6 +206,25 @@ "fi; "\ "done\0" \ \ + "import_uenv_file=" \ + "load ${devtype} ${devnum}:${bootpart} " \ + "${scriptaddr} ${prefix}${uenv_file}; " \ + "env import -t -r ${scriptaddr} ${filesize}\0; " \ + "if test -n $uenvcmd; then " \ + "echo Running uenvcmd ...;" \ + "run uenvcmd;"\ + "fi;\0" \ + \ + "scan_dev_for_uenv_files="\ + "for uenv_file in ${boot_uenv_files}; do "\ + "if test -e ${devtype} ${devnum}:${bootpart} "\ + "${prefix}${uenv_file}; then "\ + "echo Found U-boot env file" \ + "${prefix}${uenv_file}; " \ + "run import_uenv_file; " \ + "fi; "\ + "done\0" \ + \ "scan_dev_for_boot=" \ "for partition in ${boot_partitions}; do "\ "echo Scanning ${devtype} ${devnum}:${partition}...; " \ @@ -212,6 +232,7 @@ "for prefix in ${boot_prefixes}; do " \ "run scan_dev_for_extlinux; " \ "run scan_dev_for_scripts; " \ + "run scan_dev_for_uenv_files; " \ "done;" \ "done\0" \ \ -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH 3/7] Add BOOTENV_INIT_COMMAND for commands that may be needed to run before bootcmd, such as setting the fdt file variables for platfroms that detect on boot.
Signed-off-by: Vagrant Cascadian --- include/config_distro_bootcmd.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index a93354a..515a2f9 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -156,6 +156,10 @@ #define BOOTENV_BOOT_PARTITIONS "1" #endif +#ifndef BOOTENV_INIT_COMMAND +#define BOOTENV_INIT_COMMAND +#endif + #define BOOTENV_DEV(devtypeu, devtypel, instance) \ BOOTENV_DEV_##devtypeu(devtypeu, devtypel, instance) #define BOOTENV \ @@ -209,7 +213,8 @@ \ BOOT_TARGET_DEVICES(BOOTENV_DEV) \ \ - "bootcmd=" BOOTENV_SET_USB_NEED_INIT BOOTENV_SET_SCSI_NEED_INIT \ + "bootcmd=" BOOTENV_INIT_COMMAND \ + BOOTENV_SET_USB_NEED_INIT BOOTENV_SET_SCSI_NEED_INIT \ "for target in ${boot_targets}; do " \ "run bootcmd_${target}; " \ "done\0" -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH 0/7] Switch am335x_evm.h based boards to use config_distro_bootcmd.
In order to not change behavior significantly, several changes to config_distro_bootcmd were added to make it more flexible, and am335x_evm.h was adapted to make use of them: - Allow multiple partitions per device, rather than only searching on partition 1. Make the number of partitions configurable. - Added BOOTENV_INIT_COMMAND and BOOTENV_POST_COMMAND as definitions for commands that need to be run before or after the standard "bootcmd". - Added support for importing uEnv.txt files to config_distro_bootcmd.h. include/config_distro_bootcmd.h | 53 ++--- include/config_distro_defaults.h | 2 ++ include/configs/am335x_evm.h | 26 +- include/configs/ti_armv7_common.h | 1 + 4 files changed, 66 insertions(+), 16 deletions(-) Vagrant Cascadian (7): Allow checking in multiple partitions for scan_dev_for_boot. Allow overriding boot_partitions default value by setting BOOTENV_BOOT_PARTITIONS before including config_distro_bootcmd. Add BOOTENV_INIT_COMMAND for commands that may be needed to run before bootcmd, such as setting the fdt file variables for platfroms that detect on boot. Add BOOTENV_POST_COMMAND, which is appended to the end of bootcmd. Only set CONFIG_BOOTDELAY if not already set. Add support for loading environment from uEnv.txt in config_distro_bootcmd. Switch am335x_evm.h to use config_distro_defaults and config_distro_bootcmd. Add scriptaddr to DEFAULT_LINUX_BOOT_ENV, as scriptaddr is used for boot scripts in config_distro_bootcmd. include/config_distro_bootcmd.h | 53 +-- include/config_distro_defaults.h | 2 ++ include/configs/am335x_evm.h | 26 --- include/configs/ti_armv7_common.h | 1 + 4 files changed, 66 insertions(+), 16 deletions(-) -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH 7/7] Switch am335x_evm.h to use config_distro_defaults and config_distro_bootcmd. Add scriptaddr to DEFAULT_LINUX_BOOT_ENV, as scriptaddr is used for boot scripts in config_distro_
Signed-off-by: Vagrant Cascadian --- include/configs/am335x_evm.h | 26 +- include/configs/ti_armv7_common.h | 1 + 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index e2f7ead..b25d990 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -18,6 +18,21 @@ #include +#include + +#define BOOTENV_BOOT_PARTITIONS "2" + +#define BOOTENV_INIT_COMMAND "run findfdt ;" +#ifdef CONFIG_NAND +#define BOOTENV_POST_COMMAND "run nandboot ;" +#endif + +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 0) \ + func(MMC, mmc, 1) + +#include + #ifndef CONFIG_SPL_BUILD # define CONFIG_FIT # define CONFIG_TIMESTAMP @@ -185,17 +200,10 @@ "if test $fdtfile = undefined; then " \ "echo WARNING: Could not determine device tree to use; fi; \0" \ NANDARGS \ - DFUARGS + DFUARGS \ + BOOTENV #endif -#define CONFIG_BOOTCOMMAND \ - "run findfdt; " \ - "run mmcboot;" \ - "setenv mmcdev 1; " \ - "setenv bootpart 1:2; " \ - "run mmcboot;" \ - "run nandboot;" - /* NS16550 Configuration */ #define CONFIG_SYS_NS16550_COM10x44e09000 /* Base EVM has UART0 */ #define CONFIG_SYS_NS16550_COM20x48022000 /* UART1 */ diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h index 85171db..f405fea 100644 --- a/include/configs/ti_armv7_common.h +++ b/include/configs/ti_armv7_common.h @@ -54,6 +54,7 @@ #define DEFAULT_LINUX_BOOT_ENV \ "loadaddr=0x8200\0" \ "kernel_addr_r=0x8200\0" \ + "scriptaddr=0x8200\0" \ "fdtaddr=0x8800\0" \ "fdt_addr_r=0x8800\0" \ "rdaddr=0x8808\0" \ -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH 4/7] Add BOOTENV_POST_COMMAND, which is appended to the end of bootcmd.
Signed-off-by: Vagrant Cascadian --- include/config_distro_bootcmd.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index 515a2f9..2503431 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -160,6 +160,10 @@ #define BOOTENV_INIT_COMMAND #endif +#ifndef BOOTENV_POST_COMMAND +#define BOOTENV_POST_COMMAND +#endif + #define BOOTENV_DEV(devtypeu, devtypel, instance) \ BOOTENV_DEV_##devtypeu(devtypeu, devtypel, instance) #define BOOTENV \ @@ -217,6 +221,8 @@ BOOTENV_SET_USB_NEED_INIT BOOTENV_SET_SCSI_NEED_INIT \ "for target in ${boot_targets}; do " \ "run bootcmd_${target}; " \ - "done\0" + "done;" \ + BOOTENV_POST_COMMAND \ + "\0" #endif /* _CONFIG_CMD_DISTRO_BOOTCMD_H */ -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [RFC PATCH 1/7] Allow checking in multiple partitions for scan_dev_for_boot.
Signed-off-by: Vagrant Cascadian --- include/config_distro_bootcmd.h | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index be616e8..5e5e5e3 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -163,7 +163,7 @@ "boot_prefixes=/ /boot/\0" \ "boot_scripts=boot.scr.uimg boot.scr\0" \ BOOTENV_BOOT_TARGETS \ - "bootpart=1\0" \ + "boot_partitions=1\0" \ \ "boot_extlinux=" \ "sysboot ${devtype} ${devnum}:${bootpart} any " \ @@ -194,10 +194,13 @@ "done\0" \ \ "scan_dev_for_boot=" \ - "echo Scanning ${devtype} ${devnum}...; " \ - "for prefix in ${boot_prefixes}; do " \ - "run scan_dev_for_extlinux; " \ - "run scan_dev_for_scripts; " \ + "for partition in ${boot_partitions}; do "\ + "echo Scanning ${devtype} ${devnum}:${partition}...; " \ + "setenv bootpart ${partition};" \ + "for prefix in ${boot_prefixes}; do " \ + "run scan_dev_for_extlinux; " \ + "run scan_dev_for_scripts; " \ + "done;" \ "done\0" \ \ BOOT_TARGET_DEVICES(BOOTENV_DEV) \ -- 2.1.0 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] converting BeagleBone Black to use config_distro_bootcmd
I've been working on standardizing the u-boot builds in Debian, and one platform I've been working on moving over to config_distro_defaults is the BeagleBone Black... In doing so, it took some moderate modification of config_distro_defaults to allow changing some hard-coded values, and implementing support for importing uEnv.txt files, and supporting alternate boot partitions. I've worked on trying to keep the default behavior for the BeagleBone Black and other platforms that use am335x_evm.h relatively unchanged, though I don't really have the other platforms to test. Haven't yet figured out u-boot's patch submission guidelines, and while I tried to maintain the existing coding style, checkpatch.pl produces quite a few errors on the patchset. If someone would be willing to help me get the patchset into shape for proper submission, that would be great. For the moment, the patches are available here: http://cascadia.debian.net/~vagrant/bootcmd-am335x/ Thanks! live well, vagrant pgpjcI5FitXo4.pgp Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot