vf610twr: Add default environment in line with other Freescale boards
PATCH v4 1/2 vf610twr: Add default environment in line with other Freescale boards
This adds a default environment which should be able to support both 3.0.15 from Timesys and upcoming 3.11.
---
Changes in v4:
- revert sys text address change (Alison)
- add mem=128M to bootargs/netargs (Andy)
Changes in v3:
- add dt boot support
- use ttyLP1 as console
- change loadaddr and sys text as iMX6SL
- NOTE: It needs to be boot tested as I don't have the board
Changes in v2:
- fix console for ttymxc1 (Fabio)
include/configs/vf610twr.h | 91 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 89 insertions(+), 2 deletions(-)
include/configs/vf610twr.h +89 -2
@@ -83,8 +83,96 @@#define CONFIG_BOOTDELAY 3 +#define CONFIG_LOADADDR 0x82000000#define CONFIG_SYS_TEXT_BASE 0x3f008000 +#define CONFIG_EXTRA_ENV_SETTINGS \ + "script=boot.scr\0" \ + "uimage=uImage\0" \ + "console=ttyLP1\0" \ + "fdt_high=0xffffffff\0" \ + "initrd_high=0xffffffff\0" \ + "fdt_file=vf610-twr.dtb\0" \ + "fdt_addr=0x81000000\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} mem=128M\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; " \ + "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=${console},${baudrate} " \ + "root=/dev/nfs mem=128M " \ + "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ + "netboot=echo Booting from net ...; " \ + "run netargs; " \ + "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 WARN: Cannot load the DT; " \ + "fi; " \ + "fi; " \ + "else " \ + "bootm; " \ + "fi;\0" + +#define CONFIG_BOOTCOMMAND \ + "mmc dev ${mmcdev}; if mmc rescan; then " \ + "if run loadbootscript; then " \ + "run bootscript; " \ + "else " \ + "if run loaduimage; then " \ + "run mmcboot; " \ + "else run netboot; " \ + "fi; " \ + "fi; " \ + "else run netboot; fi" +/* Miscellaneous configurable options */ #define CONFIG_SYS_LONGHELP /* undef to save memory */ #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
@@ -101,8 +189,7 @@#define CONFIG_SYS_MEMTEST_START 0x80010000#define CONFIG_SYS_MEMTEST_END 0x87C00000 -#define CONFIG_SYS_LOAD_ADDR 0x80010000 - +#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR#define CONFIG_SYS_HZ 1000/*
Signature · 1 line
1.8.3.1
PATCH v4 2/2 vf610twr: Remove SoC name from U-Boot prompt
We've been dropping SoC name from U-Boot prompt as it increase complexity for automatic testing and makes line longer for no good reason.
---
Changes in v4: None
Changes in v3: None
Changes in v2: None
include/configs/vf610twr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/vf610twr.h +1 -1
@@ -177,7 +177,7 @@#define CONFIG_SYS_LONGHELP /* undef to save memory */ #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " -#define CONFIG_SYS_PROMPT "Vybrid U-Boot > " +#define CONFIG_SYS_PROMPT "=> "#undef CONFIG_AUTO_COMPLETE#define CONFIG_SYS_CBSIZE 256/* Console I/O Buffer Size */ #define CONFIG_SYS_PBSIZE \
Signature · 1 line
1.8.3.1
PATCH v4 1/2 vf610twr: Add default environment in line with other Freescale boards
In reply to Otavio SalvadorQuoted 8 lines · Otavio Salvador
This adds a default environment which should be able to support both 3.0.15 from Timesys and upcoming 3.11.
Signed-off-by Otavio Salvador <[email protected]>---
Changes in v4:
- revert sys text address change (Alison)
- add mem=128M to bootargs/netargs (Andy)
Just curious: why do we need to pass mem=128M?
Quoted 131 lines
Changes in v3:
- add dt boot support
- use ttyLP1 as console
- change loadaddr and sys text as iMX6SL
- NOTE: It needs to be boot tested as I don't have the boardChanges in v2:
- fix console for ttymxc1 (Fabio)include/configs/vf610twr.h | 91 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 89 insertions(+), 2 deletions(-)include/configs/vf610twr.h +89
-3@@ -83,8 +83,96 @@#define CONFIG_BOOTDELAY 3 +#define CONFIG_LOADADDR 0x82000000#define CONFIG_SYS_TEXT_BASE 0x3f008000 +#define CONFIG_EXTRA_ENV_SETTINGS \ + "script=boot.scr\0" \ + "uimage=uImage\0" \ + "console=ttyLP1\0" \ + "fdt_high=0xffffffff\0" \ + "initrd_high=0xffffffff\0" \ + "fdt_file=vf610-twr.dtb\0" \ + "fdt_addr=0x81000000\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} mem=128M\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; " \ + "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=${console},${baudrate} " \ + "root=/dev/nfs mem=128M " \ + "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ + "netboot=echo Booting from net ...; " \ + "run netargs; " \ + "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 WARN: Cannot load the DT; " \ + "fi; " \ + "fi; " \ + "else " \ + "bootm; " \ + "fi;\0" + +#define CONFIG_BOOTCOMMAND \ + "mmc dev ${mmcdev}; if mmc rescan; then " \ + "if run loadbootscript; then " \ + "run bootscript; " \ + "else " \ + "if run loaduimage; then " \ + "run mmcboot; " \ + "else run netboot; " \ + "fi; " \ + "fi; " \ + "else run netboot; fi" +/* Miscellaneous configurable options */ #define CONFIG_SYS_LONGHELP /* undef to save memory */ #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ @@ -101,8 +189,7 @@#define CONFIG_SYS_MEMTEST_START 0x80010000#define CONFIG_SYS_MEMTEST_END 0x87C00000 -#define CONFIG_SYS_LOAD_ADDR 0x80010000 - +#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR#define CONFIG_SYS_HZ 1000/* -- 1.8.3.1
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH v4 1/2 vf610twr: Add default environment in line with other Freescale boards
Quoted 5 lines · Fabio Estevam
Quoted 3 lines · Otavio Salvador
This adds a default environment which should be able to support both 3.0.15 from Timesys and upcoming 3.11.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Otavio Salvador <[email protected]>---
Changes in v4:
- revert sys text address change (Alison)
- add mem=128M to bootargs/netargs (Andy)Just curious: why do we need to pass mem=128M?
Board fails to boot otherwise ... Andy did try it so he can explain it with more detail.
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
PATCH v4 1/2 vf610twr: Add default environment in line with other Freescale boards
Quoted 4 lines · Otavio Salvador
Quoted 1 line
Just curious: why do we need to pass mem=128M?
Board fails to boot otherwise ... Andy did try it so he can explain it with more detail.
Hmm...Is DDR being incorrectly configured then? We need to understand why this happens.
Andy, can you comment on this, please?
PATCH v4 1/2 vf610twr: Add default environment in line with other Freescale boards
Quoted 16 lines
-----Original Message-----
From: Fabio Estevam [mailto:festevam at gmail.com]
Sent: Friday, June 28, 2013 10:15 AM
To: Otavio Salvador
Cc: Andy Voltz; U-Boot Mailing List; Estevam Fabio-R49496; Stefano Babic; Wang Huan-B18965
Subject: Re: [U-Boot] [PATCH v4 1/2] vf610twr: Add default environment in line with other Freescale boardsQuoted 2 lines · Otavio Salvador
Quoted 1 line
Just curious: why do we need to pass mem=128M?
Quoted 8 lines
Quoted 1 line
Board fails to boot otherwise ... Andy did try it so he can explain
it
Quoted 1 line
with more detail.
Hmm...Is DDR being incorrectly configured then? We need to understand why this happens.
Andy, can you comment on this, please?
[Alison Wang] mem=128M is not needed with the latest kernel.
PATCH v4 1/2 vf610twr: Add default environment in line with other Freescale boards
Quoted 18 lines · On Fri, Jun 28, 2013 at 5:59 AM, Wang Huan-B18965 <[email protected]> wrote:
Quoted 18 lines
-----Original Message-----
From: Fabio Estevam [mailto:festevam at gmail.com]
Sent: Friday, June 28, 2013 10:15 AM
To: Otavio Salvador
Cc: Andy Voltz; U-Boot Mailing List; Estevam Fabio-R49496; Stefano Babic; Wang Huan-B18965
Subject: Re: [U-Boot] [PATCH v4 1/2] vf610twr: Add default environment in line with other Freescale boardsQuoted 3 lines · Otavio Salvador
Quoted 1 line
Just curious: why do we need to pass mem=128M?
Board fails to boot otherwise ... Andy did try it so he can explain
it
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
with more detail.
Hmm...Is DDR being incorrectly configured then? We need to understand why this happens.
Andy, can you comment on this, please?
[Alison Wang] mem=128M is not needed with the latest kernel.
Latest? Freescale one or mainline?
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
PATCH v4 1/2 vf610twr: Add default environment in line with other Freescale boards
In reply to Wang Huan-B18965Quoted 1 line · On Fri, Jun 28, 2013 at 5:59 AM, Wang Huan-B18965 <[email protected]> wrote:
[Alison Wang] mem=128M is not needed with the latest kernel.
Thanks for confirming, Alison.
Could you please test Otavio's patch?
PATCH v4 1/2 vf610twr: Add default environment in line with other Freescale boards
In reply to Fabio EstevamHi Fabio,
Quoted 5 lines · Fabio Estevam
Quoted 2 lines · Otavio Salvador
Quoted 1 line
Just curious: why do we need to pass mem=128M?
Quoted 7 lines
Quoted 2 lines
Board fails to boot otherwise ... Andy did try it so he can explain it with more detail.
Hmm...Is DDR being incorrectly configured then? We need to understand why this happens.
Andy, can you comment on this, please?
I haven't looked closely at the memory setup, but you are likely correct.
When I boot our kernel on twr-vf610 without mem, nothing is seen after 'Starting kernel...'
For comparison I booted linux-next on the twr-vf610 without the mem argument, and it works. I haven't gotten the board to mount an RFS over net or mmc, but I suspect that is a kernel configuration problem.
It probably makes the most sense to just drop mem arg from the environment, and then we can patch our kernel to fix the memory setup issue.
Regards
Signature · 2 lines
Andy Voltz Timesys Corporation
PATCH v4 1/2 vf610twr: Add default environment in line with other Freescale boards
Quoted 21 lines · Andy Voltz
Hi Fabio,
Quoted 5 lines · Fabio Estevam
Quoted 2 lines · Otavio Salvador
Quoted 1 line
Just curious: why do we need to pass mem=128M?
Quoted 7 lines
Quoted 2 lines
Board fails to boot otherwise ... Andy did try it so he can explain it with more detail.
Hmm...Is DDR being incorrectly configured then? We need to understand why this happens.
Andy, can you comment on this, please?
I haven't looked closely at the memory setup, but you are likely correct.
When I boot our kernel on twr-vf610 without mem, nothing is seen after 'Starting kernel...'
Quoted 6 lines
For comparison I booted linux-next on the twr-vf610 without the mem argument, and it works. I haven't gotten the board to mount an RFS over net or mmc, but I suspect that is a kernel configuration problem.
It probably makes the most sense to just drop mem arg from the environment, and then we can patch our kernel to fix the memory setup issue.
Ok; I can cook a v5 without mem param and send.
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
PATCH v4 1/2 vf610twr: Add default environment in line with other Freescale boards
In reply to Andy VoltzQuoted 27 lines · Andy Voltz
Hi Fabio,
Quoted 5 lines · Fabio Estevam
Quoted 2 lines · Otavio Salvador
Quoted 1 line
Just curious: why do we need to pass mem=128M?
Quoted 7 lines
Quoted 2 lines
Board fails to boot otherwise ... Andy did try it so he can explain it with more detail.
Hmm...Is DDR being incorrectly configured then? We need to understand why this happens.
Andy, can you comment on this, please?
I haven't looked closely at the memory setup, but you are likely correct.
When I boot our kernel on twr-vf610 without mem, nothing is seen after 'Starting kernel...'
For comparison I booted linux-next on the twr-vf610 without the mem argument, and it works. I haven't gotten the board to mount an RFS over net or mmc, but I suspect that is a kernel configuration problem.
It probably makes the most sense to just drop mem arg from the environment, and then we can patch our kernel to fix the memory setup issue.
PATCH v4 1/2 vf610twr: Add default environment in line with other Freescale boards
In reply to Andy VoltzQuoted 2 lines · Andy Voltz
It probably makes the most sense to just drop mem arg from the environment, and then we can patch our kernel to fix the memory setup issue.
Agreed, Andy.
Thanks,
Fabio Estevam