Re: [U-Boot] arm: mx5: Add support for USB armory board
Hi Vagrant, On Sat, Mar 21, 2015 at 08:12:28AM -0700, Vagrant Cascadian wrote: 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. Tested and it works as expected. I have just submitted an updated patch (v3). Thanks Andrej 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 asm/arch/imx-regs.h #include config_cmd_default.h +#include config_distro_defaults.h /* 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_CBSIZE512 #define CONFIG_SYS_PBSIZE(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) #define CONFIG_SYS_MAXARGS 16 #define CONFIG_SYS_BARGSIZE CONFIG_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_LOADADDR 0x7200 #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 config_distro_bootcmd.h + +#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 -- Andrej Rosano Inverse Path Srl and...@inversepath.com http://www.inversepath.com 0x01939B215BB8 574E 68E8 D841 E18F D5E9 CEAD E0CF 0193 9B21 ___ 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 asm/arch/imx-regs.h #include config_cmd_default.h +#include config_distro_defaults.h /* 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 config_distro_bootcmd.h + +#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
Re: [U-Boot] arm: mx5: Add support for USB armory board
Hello Vagrant, On Thu, Mar 19, 2015 at 1:55 PM, Vagrant Cascadian vagr...@debian.org 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. ... 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 asm/arch/imx-regs.h +#include config_cmd_default.h 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. It'd be nice to do the same for other reference boards. If you want to work on this I can help working on the Yocto Project BSP to support it as well :) -- Otavio Salvador O.S. Systems http://www.ossystems.com.brhttp://code.ossystems.com.br Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750 ___ 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 asm/arch/imx-regs.h +#include config_cmd_default.h 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
Re: [U-Boot] arm: mx5: Add support for USB armory board
Hi Vagrant, 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. ... 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 asm/arch/imx-regs.h +#include config_cmd_default.h 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. 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. Thanks Andrej live well, vagrant -- Andrej Rosano Inverse Path Srl and...@inversepath.com http://www.inversepath.com 0x01939B215BB8 574E 68E8 D841 E18F D5E9 CEAD E0CF 0193 9B21 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot