[U-Boot] [PATCH 3/4] udoo: Adjust default boot envirnment

Change u-boot default environment for uDoo board to: - mount /dev/mmcblk0p1 partition - activate hdmi monitor by default (instead of nothing)
Signed-off-by: Giuseppe Pagano giuseppe.pagano@seco.com Cc: sbabic@denx.de
---
diff -uNr a/include/configs/udoo.h b/include/configs/udoo.h --- a/include/configs/udoo.h 2013-11-06 18:51:57.000000000 +0100 +++ b/include/configs/udoo.h 2013-11-06 18:52:16.000000000 +0100 @@ -100,7 +100,7 @@
#define CONFIG_EXTRA_ENV_SETTINGS \ "script=boot.scr\0" \ - "uimage=uImage\0" \ + "uimage=/boot/uImage\0" \ "console=ttymxc1\0" \ "splashpos=m,m\0" \ "fdt_high=0xffffffff\0" \ @@ -111,7 +111,7 @@ "ip_dyn=yes\0" \ "mmcdev=0\0" \ "mmcpart=1\0" \ - "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ + "mmcroot=/dev/mmcblk0p1 rootwait rw\0" \ "update_sd_firmware_filename=u-boot.imx\0" \ "update_sd_firmware=" \ "if test ${ip_dyn} = yes; then " \ @@ -127,13 +127,14 @@ "fi; " \ "fi\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ - "root=${mmcroot}\0" \ + "root=${mmcroot} rootwait rw " \ + "fbmem=24M video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24\0" \ "loadbootscript=" \ - "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ + "ext2load 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" \ + "loaduimage=ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ + "loadfdt=ext2load 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 " \ @@ -189,7 +190,7 @@ /* Miscellaneous configurable options */ #define CONFIG_SYS_LONGHELP #define CONFIG_SYS_HUSH_PARSER -#define CONFIG_SYS_PROMPT "=> " +#define CONFIG_SYS_PROMPT "uDoo board >" #define CONFIG_AUTO_COMPLETE #define CONFIG_SYS_CBSIZE 256

Hi Giuseppe,
On 06/11/2013 21:44, Giuseppe Pagano wrote:
Change u-boot default environment for uDoo board to:
- mount /dev/mmcblk0p1 partition
- activate hdmi monitor by default (instead of nothing)
Signed-off-by: Giuseppe Pagano giuseppe.pagano@seco.com Cc: sbabic@denx.de
diff -uNr a/include/configs/udoo.h b/include/configs/udoo.h --- a/include/configs/udoo.h 2013-11-06 18:51:57.000000000 +0100 +++ b/include/configs/udoo.h 2013-11-06 18:52:16.000000000 +0100 @@ -100,7 +100,7 @@
#define CONFIG_EXTRA_ENV_SETTINGS \ "script=boot.scr\0" \
- "uimage=uImage\0" \
- "uimage=/boot/uImage\0" \ "console=ttymxc1\0" \ "splashpos=m,m\0" \ "fdt_high=0xffffffff\0" \
@@ -111,7 +111,7 @@ "ip_dyn=yes\0" \ "mmcdev=0\0" \ "mmcpart=1\0" \
- "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
- "mmcroot=/dev/mmcblk0p1 rootwait rw\0" \ "update_sd_firmware_filename=u-boot.imx\0" \ "update_sd_firmware=" \ "if test ${ip_dyn} = yes; then " \
@@ -127,13 +127,14 @@ "fi; " \ "fi\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \
"root=${mmcroot}\0" \
"root=${mmcroot} rootwait rw " \
"loadbootscript=" \"fbmem=24M video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24\0" \
"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
"ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
I have already explained my doubts regarding the abuse of EXTRA_ENV_SETTINGS. The setup that should be minimal and general for most of uses is then customized for a specific scope, that conflict with other goals. You are changing the filesystem on the card: I cannot estimate how this can be useful for everyone (maybe yes, maybe not).
I hope that Simon's patches to split the default environment from the configuration file will find soon a way to mainline. Check in the ML for
"env: Add support for environment files"
Then it will be possible to define an own text file containing the environment outside of the configuration file. And adding a new default environment will mean only to specify the env file in boards.cfg.
"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" \
- "loaduimage=ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0"
\
- "loadfdt=ext2load 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 " \ @@ -189,7 +190,7 @@ /* Miscellaneous configurable options */ #define CONFIG_SYS_LONGHELP #define CONFIG_SYS_HUSH_PARSER -#define CONFIG_SYS_PROMPT "=> " +#define CONFIG_SYS_PROMPT "uDoo board >" #define CONFIG_AUTO_COMPLETE #define CONFIG_SYS_CBSIZE 256
We had already some discussion on the mailing list about the meaning and the usefulness of the U-Boot prompt. I will apply a patch for all Freescale boards that remove a custom prompt, letting the default. Which is the improvement to have a custom prompt ?
Maybe you are the second one asking for the feature:
http://u-boot.10912.n7.nabble.com/Changing-CONFIG-SYS-PROMPT-on-the-fly-td16...
As suggested by Simon (take a look at the whole thread), it is then better to set the prompt from an environment variable. Feel free to submit a patch for it.
Best regards, Stefano Babic

Hi Stefano,
On Thu, 2013-11-07 at 09:33 +0100, Stefano Babic wrote:
Hi Giuseppe,
On 06/11/2013 21:44, Giuseppe Pagano wrote:
Change u-boot default environment for uDoo board to:
- mount /dev/mmcblk0p1 partition
- activate hdmi monitor by default (instead of nothing)
Signed-off-by: Giuseppe Pagano giuseppe.pagano@seco.com Cc: sbabic@denx.de
....
I have already explained my doubts regarding the abuse of EXTRA_ENV_SETTINGS. The setup that should be minimal and general for most of uses is then customized for a specific scope, that conflict with other goals.
Ok I will leave unchanged default environment.
@@ -189,7 +190,7 @@ /* Miscellaneous configurable options */ #define CONFIG_SYS_LONGHELP #define CONFIG_SYS_HUSH_PARSER -#define CONFIG_SYS_PROMPT "=> " +#define CONFIG_SYS_PROMPT "uDoo board >" #define CONFIG_AUTO_COMPLETE #define CONFIG_SYS_CBSIZE 256
We had already some discussion on the mailing list about the meaning and the usefulness of the U-Boot prompt. I will apply a patch for all Freescale boards that remove a custom prompt, letting the default. Which is the improvement to have a custom prompt ?
And also I will leave unchanged u-boot prompt. I think I will support Simon idea, I think it is useful to recognize uboot console prompt if you have more than one serial console connected to your host.
Maybe you are the second one asking for the feature:
http://u-boot.10912.n7.nabble.com/Changing-CONFIG-SYS-PROMPT-on-the-fly-td16...
As suggested by Simon (take a look at the whole thread), it is then better to set the prompt from an environment variable. Feel free to submit a patch for it.
Best regards, Stefano Babic
Best regards, Giuseppe Pagano
participants (2)
-
Giuseppe Pagano
-
Stefano Babic