Skip to contentSkip to conversation

udoo: Adjust default boot envirnment

PATCH New Giuseppe Pagano 2 participants 3 messages Nov 6, 2013 – Nov 7, 2013

lore
Share & tools
lore
#0 lore raw

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)

Cc sbabic at denx.de

---

include/configs/udoo.h +8 -7
diff -uNr a/include/configs/udoo.h b/include/configs/udoo.h
@@ -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 at 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
 
#1 lore raw

PATCH 3/4 udoo: Adjust default boot envirnment

Hi Giuseppe,

Quoted 31 lines · Giuseppe Pagano

Change u-boot default environment for uDoo board to:
- mount /dev/mmcblk0p1 partition
- activate hdmi monitor by default (instead of nothing)

Cc sbabic at denx.de

---

diff -uNr a/include/configs/udoo.h b/include/configs/udoo.h

include/configs/udoo.h +2 -2
@@ -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 " \

include/configs/udoo.h line 133

Quoted 9 lines
include/configs/udoo.h +3 -2
@@ -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 at 60,if=RGB24\0" \
 	"loadbootscript=" \
-		"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.

Quoted 13 lines
include/configs/udoo.h +2 -2
 	"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"
 \
include/configs/udoo.h +0 -0
 	"mmcboot=echo Booting from mmc ...; " \
 		"run mmcargs; " \
 		"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \

include/configs/udoo.h line 195

Quoted 7 lines
include/configs/udoo.h +1 -1
@@ -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-td166105.html

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

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-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#2 lore raw

PATCH 3/4 udoo: Adjust default boot envirnment

Hi Stefano,

Quoted 9 lines · Stefano Babic

Hi Giuseppe,

Quoted 6 lines · Giuseppe Pagano

Change u-boot default environment for uDoo board to:
- mount /dev/mmcblk0p1 partition
- activate hdmi monitor by default (instead of nothing)

Cc sbabic at denx.de

....

Quoted 5 lines

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.

Quoted 5 lines
Quoted 5 lines
include/configs/udoo.h +0 -1
@@ -189,7 +190,7 @@
 /* Miscellaneous configurable options */
 #define CONFIG_SYS_LONGHELP
 #define CONFIG_SYS_HUSH_PARSER
-#define CONFIG_SYS_PROMPT             "=> "
Quoted 8 lines

include/configs/udoo.h line 195

Quoted 3 lines
include/configs/udoo.h +1 -0
+#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.

Quoted 12 lines

Maybe you are the second one asking for the feature:

http://u-boot.10912.n7.nabble.com/Changing-CONFIG-SYS-PROMPT-on-the-fly-td166105.html

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