arm: novena: Switch novena to config_distro_bootcmd
PATCH v2 1/1 arm: novena: Switch novena to config_distro_bootcmd
From: Vagrant Cascadian <[email protected]>
Switch Novena to distro bootcmd, so it can be used with debian easily.
--- include/configs/novena.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
V2: Drop the duplicate kernel_addr_r setting
include/configs/novena.h +21 -1
@@ -16,6 +16,7 @@#define CONFIG_FIT #define CONFIG_KEYBOARD +#include <config_distro_defaults.h> #include "mx6_common.h" /* U-Boot Commands */
@@ -58,7 +59,7 @@/* Booting Linux */ #define CONFIG_BOOTFILE "fitImage"#define CONFIG_BOOTARGS "console=ttymxc1,115200 " -#define CONFIG_BOOTCOMMAND "run net_nfs" +#define CONFIG_BOOTCOMMAND "run distro_bootcmd ; run net_nfs"#define CONFIG_HOSTNAME novena/* Physical Memory Map */
@@ -190,6 +191,7 @@#endif /* Extra U-Boot environment. */ +#ifndef CONFIG_SPL_BUILD #define CONFIG_EXTRA_ENV_SETTINGS \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \
@@ -199,6 +201,10 @@"rootdev=/dev/mmcblk0p2\0" \"netdev=eth0\0" \ "kernel_addr_r="__stringify(CONFIG_LOADADDR)"\0" \ + "pxefile_addr_r="__stringify(CONFIG_LOADADDR)"\0" \ + "scriptaddr="__stringify(CONFIG_LOADADDR)"\0" \ +"ramdisk_addr_r=0x28000000\0" \ +"fdt_addr_r=0x10000000\0" \"addcons=" \"setenv bootargs ${bootargs} " \"console=${consdev},${baudrate}\0" \
@@ -242,5 +248,19 @@"fatwrite mmc 0:1 ${loadaddr} u-boot.img ${filesize} ; " \"fi ; " \"fi\0" \ + BOOTENV + +#define BOOT_TARGET_DEVICES (func) \ + func(MMC, mmc, 0) \ + func(USB, usb, 0) \ + func(SATA, sata, 0) \ + func(PXE, pxe, na) \ + func(DHCP, dhcp, na) + +#include <config_distro_bootcmd.h> + +#else +#define CONFIG_EXTRA_ENV_SETTINGS +#endif /* CONFIG_SPL_BUILD */ #endif /* __CONFIG_H */
Signature · 1 line
2.1.4
PATCH v2 1/1 arm: novena: Switch novena to config_distro_bootcmd
Quoted 15 lines · Marek Vasut
Switch Novena to distro bootcmd, so it can be used with debian easily.
include/configs/novena.h +1
-1@@ -58,7 +59,7 @@/* Booting Linux */ #define CONFIG_BOOTFILE "fitImage"#define CONFIG_BOOTARGS "console=ttymxc1,115200 " -#define CONFIG_BOOTCOMMAND "run net_nfs" +#define CONFIG_BOOTCOMMAND "run distro_bootcmd ; run net_nfs"#define CONFIG_HOSTNAME novena/* Physical Memory Map */
...
include/configs/novena.h line 210
Quoted 11 lines
include/configs/novena.h +4
-0@@ -199,6 +201,10 @@"rootdev=/dev/mmcblk0p2\0" \"netdev=eth0\0" \ "kernel_addr_r="__stringify(CONFIG_LOADADDR)"\0" \ + "pxefile_addr_r="__stringify(CONFIG_LOADADDR)"\0" \ + "scriptaddr="__stringify(CONFIG_LOADADDR)"\0" \ +"ramdisk_addr_r=0x28000000\0" \ +"fdt_addr_r=0x10000000\0" \"addcons=" \"setenv bootargs ${bootargs} " \"console=${consdev},${baudrate}\0" \
"fdtfile=imx6q-novena.dtb" should be added above, maybe after fdt_addr_r.
The use of CONFIG_BOOTARGS and "run addcons" appear to be redundant, or at least overlapping. Other boards simply set "console=ttymxc0,115200" or appropriate, which would be a bit simpler.
live well,
vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151123/009fc300/attachment.sig>
PATCH v2 1/1 arm: novena: Switch novena to config_distro_bootcmd
Quoted 9 lines · Vagrant Cascadian
Quoted 8 lines · Marek Vasut
Switch Novena to distro bootcmd, so it can be used with debian easily.
include/configs/novena.h +0
-0@@ -58,7 +59,7 @@
Quoted 6 lines
include/configs/novena.h
Quoted 6 lines
include/configs/novena.h +1
-1/* Booting Linux */ #define CONFIG_BOOTFILE "fitImage"#define CONFIG_BOOTARGS "console=ttymxc1,115200 " -#define CONFIG_BOOTCOMMAND "run net_nfs" +#define CONFIG_BOOTCOMMAND "run distro_bootcmd ; run
net_nfs"
Quoted 18 lines
Quoted 4 lines
include/configs/novena.h +0
-0#define CONFIG_HOSTNAME novena/* Physical Memory Map */
...
Quoted 11 lines
include/configs/novena.h +4
-0@@ -199,6 +201,10 @@"rootdev=/dev/mmcblk0p2\0" \"netdev=eth0\0" \ "kernel_addr_r="__stringify(CONFIG_LOADADDR)"\0" \ + "pxefile_addr_r="__stringify(CONFIG_LOADADDR)"\0" \ + "scriptaddr="__stringify(CONFIG_LOADADDR)"\0" \ +"ramdisk_addr_r=0x28000000\0" \ +"fdt_addr_r=0x10000000\0" \
Quoted 6 lines
include/configs/novena.h line 210
Quoted 4 lines
include/configs/novena.h +0
-0"addcons=" \"setenv bootargs ${bootargs} " \"console=${consdev},${baudrate}\0" \"fdtfile=imx6q-novena.dtb" should be added above, maybe after
fdt_addr_r.
Added, thanks.
Quoted 3 lines
The use of
CONFIG_BOOTARGSand "run addcons" appear to be redundant, or at least overlapping. Other boards simply set "console=ttymxc0,115200" or appropriate, which would be a bit simpler.
Should be ttymxc1. The idea is that addcons let's you configure console using the consdev and baudrate (which specifies the UART baudrate in u-boot too), so if you change the baudrate in U-Boot, it is automatically updated in Linux too.
Best regards,
Marek Vasut
PATCH v2 1/1 arm: novena: Switch novena to config_distro_bootcmd
In reply to Marek VasutQuoted 1 line · Marek Vasut
Switch Novena to distro bootcmd, so it can be used with debian easily.
...
Quoted 5 lines
include/configs/novena.h +0
-0
include/configs/novena.h line 210
Quoted 10 lines
include/configs/novena.h +4
-0@@ -199,6 +201,10 @@"rootdev=/dev/mmcblk0p2\0" \"netdev=eth0\0" \ "kernel_addr_r="__stringify(CONFIG_LOADADDR)"\0" \ + "pxefile_addr_r="__stringify(CONFIG_LOADADDR)"\0" \ + "scriptaddr="__stringify(CONFIG_LOADADDR)"\0" \ +"ramdisk_addr_r=0x28000000\0" \ +"fdt_addr_r=0x10000000\0" \"addcons=" \"setenv bootargs ${bootargs} " \"console=${consdev},${baudrate}\0" \
Apparently, 0x10000000 doesn't work for fdt_addr_r, changing it to:
"fdt_addr_r=0x11200000"
Worked for me.
live well,
vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151123/44c9aeb4/attachment.sig>
PATCH v2 1/1 arm: novena: Switch novena to config_distro_bootcmd
Quoted 22 lines · Vagrant Cascadian
Quoted 1 line · Marek Vasut
Switch Novena to distro bootcmd, so it can be used with debian easily.
...
Quoted 17 lines
include/configs/novena.h +4
-0@@ -199,6 +201,10 @@"rootdev=/dev/mmcblk0p2\0" \"netdev=eth0\0" \ "kernel_addr_r="__stringify(CONFIG_LOADADDR)"\0" \ + "pxefile_addr_r="__stringify(CONFIG_LOADADDR)"\0" \ + "scriptaddr="__stringify(CONFIG_LOADADDR)"\0" \ +"ramdisk_addr_r=0x28000000\0" \ +"fdt_addr_r=0x10000000\0" \"addcons=" \
Quoted 8 lines
include/configs/novena.h line 210
Quoted 2 lines
include/configs/novena.h +0
-0"setenv bootargs ${bootargs} " \"console=${consdev},${baudrate}\0" \Apparently,
0x10000000doesn't work forfdt_addr_r, changing it to:"fdt_addr_r=0x11200000"Worked for me.
Makes sense, thanks :)
Best regards,
Marek Vasut