mx51evk: Update environmet in order to allow booting a dt kernel
PATCH 1/1 mx51evk: Update environmet in order to allow booting a dt kernel
From: Fabio Estevam <[email protected]>
Update the environment as done in other imx boards to allow easy switching between booting a non-dt kernel and a dt kernel.
--- include/configs/mx51evk.h | 49 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 8 deletions(-)
include/configs/mx51evk.h +41 -8
@@ -149,32 +149,65 @@#define CONFIG_ETHPRIME "FEC0" -#define CONFIG_LOADADDR 0x90800000/* loadaddr env var */ +#define CONFIG_LOADADDR 0x92000000/* loadaddr env var */ #define CONFIG_EXTRA_ENV_SETTINGS \ "script=boot.scr\0" \ "uimage=uImage\0" \ + "fdt_file=imx51-babbage.dtb\0" \ + "fdt_addr=0x91000000\0" \ + "boot_fdt=try\0" \ + "ip_dyn=yes\0" \ "mmcdev=0\0" \ "mmcpart=2\0" \ - "mmcroot=/dev/mmcblk0p3 rw\0" \ - "mmcrootfstype=ext3 rootwait\0" \ - "mmcargs=setenv bootargs console=ttymxc0,${baudrate} " \ - "root=${mmcroot} " \ - "rootfstype=${mmcrootfstype}\0" \ + "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \ + "mmcargs=setenv bootargs console=ttymxc0,${baudrate} root=${mmcroot}\0"\ "loadbootscript=" \ "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ "bootscript=echo Running bootscript from mmc ...; " \ "source\0" \ "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ + "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ - "bootm\0" \ + "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ + "if run loadfdt; then " \ + "bootm ${loadaddr} - ${fdt_addr}; " \ + "else " \ + "if test ${boot_fdt} = try; then " \ + "bootm; " \ + "else " \ + "echo WARN: Cannot load the DT; " \ + "fi; " \ + "fi; " \ + "else " \ + "bootm; " \ + "fi;\0" \ "netargs=setenv bootargs console=ttymxc0,${baudrate} " \ "root=/dev/nfs " \ "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ "netboot=echo Booting from net ...; " \ "run netargs; " \ - "dhcp ${uimage}; bootm\0" \ + "if test ${ip_dyn} = yes; then " \ + "setenv get_cmd dhcp; " \ + "else " \ + "setenv get_cmd tftp; " \ + "fi; " \ + "${get_cmd} ${uimage}; " \ + "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ + "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ + "bootm ${loadaddr} - ${fdt_addr}; " \ + "else " \ + "if test ${boot_fdt} = try; then " \ + "bootm; " \ + "else " \ + "echo ERROR: Cannot load the DT; " \ + "exit; " \ + "fi; " \ + "fi; " \ + "else " \ + "bootm; " \ + "fi;\0"#define CONFIG_BOOTCOMMAND \ "mmc dev ${mmcdev}; if mmc rescan; then " \
Signature · 1 line
1.7.9.5
PATCH 1/1 mx51evk: Update environmet in order to allow booting a dt kernel
Dear Fabio Estevam,
Quoted 1 line · In message <[email protected]> you wrote:
There is a typo in the Subject: s/environmet/environment/
include/configs/mx51evk.h line 164
Quoted 7 lines
include/configs/mx51evk.h +2
-5-"mmcroot=/dev/mmcblk0p3 rw\0" \ -"mmcrootfstype=ext3 rootwait\0" \ -"mmcargs=setenv bootargs console=ttymxc0,${baudrate} " \ -"root=${mmcroot} " \ -"rootfstype=${mmcrootfstype}\0" \ +"mmcroot=/dev/mmcblk0p3 rw rootwait\0" \ +"mmcargs=setenv bootargs console=ttymxc0,${baudrate} root=${mmcroot}\0" \
You are dropping the "mmcrootfstype" part here. Is this intentional? If yes, it appears to be an unrelated change that should be done in a separate commit.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de When the bosses talk about improving productivity, they are never talking about themselves.
PATCH 1/1 mx51evk: Update environmet in order to allow booting a dt kernel
Quoted 15 lines · Wolfgang Denk
Dear Fabio Estevam,
Quoted 1 line · In message <[email protected]> you wrote:
There is a typo in the Subject: s/environmet/environment/
include/configs/mx51evk.h line 164
Quoted 7 lines
include/configs/mx51evk.h +2
-5-"mmcroot=/dev/mmcblk0p3 rw\0" \ -"mmcrootfstype=ext3 rootwait\0" \ -"mmcargs=setenv bootargs console=ttymxc0,${baudrate} " \ -"root=${mmcroot} " \ -"rootfstype=${mmcrootfstype}\0" \ +"mmcroot=/dev/mmcblk0p3 rw rootwait\0" \ +"mmcargs=setenv bootargs console=ttymxc0,${baudrate} root=${mmcroot}\0" \
Quoted 3 lines
You are dropping the "mmcrootfstype" part here. Is this intentional? If yes, it appears to be an unrelated change that should be done in a separate commit.
He is doing the sync of environment being used here with the other boards so I think the commit log could be reworded so it is clear about it.
--
Otavio Salvador O.S. Systems
E-mail: otavio at ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br