Skip to contentSkip to conversation

Refactor BRXRE1 board

PATCH New Hannes Schmelzer 3 participants 18 messages Jun 13, 2017 – Jun 16, 2017

lore
Share & tools
lore
#0 lore raw

cover Refactor BRXRE1 board

Since ee had to do some bugfix introduced by another commit/architecture changes, by the way we bring several other things on this board up-to-date:

- default environment
- cosmetic cleanup
- drop obsolete defines
- drop obsolete features (bootlogo display)

Hannes Schmelzer (5):
board/BuR/brxre1: fix MMC boot
board/BuR/brxre1: drop bootlogo feature
board/BuR/brxre1: drop obsolete CONFIG_LCD_NOSTDOUT from config-header board/BuR/brxre1: cosmetic cleanup of config-header board/BuR/brxre1: refactor default environment

 board/BuR/common/common.c    |  7 ++++-
 include/configs/brxre1.h     | 65 ++++++++++++++------------------------------
 scripts/config_whitelist.txt |  1 -
 3 files changed, 27 insertions(+), 46 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/5 board/BuR/brxre1: fix MMC boot

since commit

'd5abcf94c7123167725fc22ace342f0d455093c1' -
ti: boot: Register the MMC controllers in SPL in the same way as in u-boot

MMC boot on brxre1 board is broken, with this commit we make our board working again.

---

 board/BuR/common/common.c |  7 ++++++-
 include/configs/brxre1.h  | 12 ++++++------
 2 files changed, 12 insertions(+), 7 deletions(-)
board/BuR/common/common.c +6 -1
index b1ae079..e8c6401 100644
@@ -687,7 +687,12 @@ int board_eth_init(bd_t *bis)
 #if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
-	return omap_mmc_init(1, 0, 0, -1, -1);
+	int rc = 0;
+
+	rc |= omap_mmc_init(0, 0, 0, -1, -1);
+	rc |= omap_mmc_init(1, 0, 0, -1, -1);
+
+	return rc;
 }
 #endif
 int overwrite_console(void)
include/configs/brxre1.h +6 -6
index 5814d74..a96232d 100644
@@ -53,21 +53,21 @@ BUR_COMMON_ENV \
 "vx_romfsbase=0x800E0000\0" \
 "vx_romfssize=0x20000\0" \
 "vx_memtop=0x8FBEF000\0" \
-"loadromfs=mmc read ${vx_romfsbase} 700 100\0" \
+"loadromfs=mmc dev 1; mmc read ${vx_romfsbase} 700 100\0" \
 "autoload=0\0" \
 "loadaddr=0x80100000\0" \
 "logoaddr=0x82000000\0" \
 "defaultARlen=0x8000\0" \
-"loaddefaultAR=mmc read ${loadaddr} 800 ${defaultARlen}\0" \
+"loaddefaultAR=mmc dev 1; mmc read ${loadaddr} 800 ${defaultARlen}\0" \
 "defaultAR=run loadromfs; run loaddefaultAR; bootvx ${loadaddr}\0" \
-"logo0=fatload mmc 0:1 ${logoaddr} SYSTEM/ADDON/Bootlogo/Bootlogo.bmp.gz && " \
+"logo0=fatload mmc 1:1 ${logoaddr} SYSTEM/ADDON/Bootlogo/Bootlogo.bmp.gz && " \
 	"bmp display ${logoaddr} 0 0\0" \
-"logo1=fatload mmc 0:1 ${logoaddr} SYSTEM/BASE/Bootlogo/Bootlogo.bmp.gz && " \
+"logo1=fatload mmc 1:1 ${logoaddr} SYSTEM/BASE/Bootlogo/Bootlogo.bmp.gz && " \
 	"bmp display ${logoaddr} 0 0\0" \
 "mmcboot=echo booting AR from eMMC-flash ...; "\
 	"run logo0 || run logo1; " \
 	"run loadromfs; " \
-	"fatload mmc 0:1 ${loadaddr} arimg && bootvx ${loadaddr}; " \
+	"fatload mmc 1:1 ${loadaddr} arimg && bootvx ${loadaddr}; " \
 	"run defaultAR;\0" \
 "netboot=echo booting AR from network ...; " \
 	"run loadromfs; " \
@@ -113,7 +113,7 @@ BUR_COMMON_ENV \
 
 #undef CONFIG_ENV_IS_NOWHERE
 #define CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SYS_MMC_ENV_DEV		0
+#define CONFIG_SYS_MMC_ENV_DEV		1
 #define CONFIG_SYS_MMC_ENV_PART		2
 #define CONFIG_ENV_OFFSET		0x40000	/* TODO: Adresse definieren */
 #define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/5 board/BuR/brxre1: fix MMC boot

Quoted 10 lines · Hannes Schmelzer

since commit

'd5abcf94c7123167725fc22ace342f0d455093c1' -
ti: boot: Register the MMC controllers in SPL in the same way as in u-boot

MMC boot on brxre1 board is broken, with this commit we make our board working again.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170613/199c8a1c/attachment.sig>
#3 lore raw

PATCH 1/5 board/BuR/brxre1: fix MMC boot

In reply to Hannes Schmelzer
Quoted 9 lines · Hannes Schmelzer

since commit

'd5abcf94c7123167725fc22ace342f0d455093c1' -
ti: boot: Register the MMC controllers in SPL in the same way as in u-boot

MMC boot on brxre1 board is broken, with this commit we make our board working again.

Quoted 65 lines

---

  board/BuR/common/common.c |  7 ++++++-
  include/configs/brxre1.h  | 12 ++++++------
  2 files changed, 12 insertions(+), 7 deletions(-)
board/BuR/common/common.c +6 -1
index b1ae079..e8c6401 100644
@@ -687,7 +687,12 @@ int board_eth_init(bd_t *bis)
  #if defined(CONFIG_MMC)
  int board_mmc_init(bd_t *bis)
  {
-	return omap_mmc_init(1, 0, 0, -1, -1);
+	int rc = 0;
+
+	rc |= omap_mmc_init(0, 0, 0, -1, -1);
+	rc |= omap_mmc_init(1, 0, 0, -1, -1);
+
+	return rc;
  }
  #endif
  int overwrite_console(void)
include/configs/brxre1.h +6 -6
index 5814d74..a96232d 100644
@@ -53,21 +53,21 @@ BUR_COMMON_ENV \
  "vx_romfsbase=0x800E0000\0" \
  "vx_romfssize=0x20000\0" \
  "vx_memtop=0x8FBEF000\0" \
-"loadromfs=mmc read ${vx_romfsbase} 700 100\0" \
+"loadromfs=mmc dev 1; mmc read ${vx_romfsbase} 700 100\0" \
  "autoload=0\0" \
  "loadaddr=0x80100000\0" \
  "logoaddr=0x82000000\0" \
  "defaultARlen=0x8000\0" \
-"loaddefaultAR=mmc read ${loadaddr} 800 ${defaultARlen}\0" \
+"loaddefaultAR=mmc dev 1; mmc read ${loadaddr} 800 ${defaultARlen}\0" \
  "defaultAR=run loadromfs; run loaddefaultAR; bootvx ${loadaddr}\0" \
-"logo0=fatload mmc 0:1 ${logoaddr} SYSTEM/ADDON/Bootlogo/Bootlogo.bmp.gz && " \
+"logo0=fatload mmc 1:1 ${logoaddr} SYSTEM/ADDON/Bootlogo/Bootlogo.bmp.gz && " \
  	"bmp display ${logoaddr} 0 0\0" \
-"logo1=fatload mmc 0:1 ${logoaddr} SYSTEM/BASE/Bootlogo/Bootlogo.bmp.gz && " \
+"logo1=fatload mmc 1:1 ${logoaddr} SYSTEM/BASE/Bootlogo/Bootlogo.bmp.gz && " \
  	"bmp display ${logoaddr} 0 0\0" \
  "mmcboot=echo booting AR from eMMC-flash ...; "\
  	"run logo0 || run logo1; " \
  	"run loadromfs; " \
-	"fatload mmc 0:1 ${loadaddr} arimg && bootvx ${loadaddr}; " \
+	"fatload mmc 1:1 ${loadaddr} arimg && bootvx ${loadaddr}; " \
  	"run defaultAR;\0" \
  "netboot=echo booting AR from network ...; " \
  	"run loadromfs; " \
@@ -113,7 +113,7 @@ BUR_COMMON_ENV \
 
  #undef CONFIG_ENV_IS_NOWHERE
  #define CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SYS_MMC_ENV_DEV		0
+#define CONFIG_SYS_MMC_ENV_DEV		1
  #define CONFIG_SYS_MMC_ENV_PART		2
  #define CONFIG_ENV_OFFSET		0x40000	/* TODO: Adresse definieren */
  #define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
#4 lore raw

PATCH 1/5 board/BuR/brxre1: fix MMC boot

In reply to Hannes Schmelzer
Quoted 11 lines · Hannes Schmelzer

since commit

'd5abcf94c7123167725fc22ace342f0d455093c1' -
ti: boot: Register the MMC controllers in SPL in the same way as in u-boot

MMC boot on brxre1 board is broken, with this commit we make our board working again.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170616/6497904f/attachment.sig>
#5 lore raw

PATCH 2/5 board/BuR/brxre1: drop bootlogo feature

In reply to Hannes Schmelzer

the BMP logo loading has become obsolete and is not used any more. So we drop the support for it.

---

 include/configs/brxre1.h | 11 -----------
 1 file changed, 11 deletions(-)
include/configs/brxre1.h +0 -11
index a96232d..eac77fc 100644
@@ -19,11 +19,6 @@
 #define CONFIG_LCD_NOSTDOUT
 #define LCD_BPP				LCD_COLOR32
 
-#define CONFIG_VIDEO_BMP_GZIP
-#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE	(1366*767*4)
-#define CONFIG_BMP_24BPP
-#define CONFIG_BMP_32BPP
-
 /* memory */
 #define CONFIG_SYS_MALLOC_LEN		(5 * 1024 * 1024)
 
@@ -56,16 +51,10 @@ BUR_COMMON_ENV \
 "loadromfs=mmc dev 1; mmc read ${vx_romfsbase} 700 100\0" \
 "autoload=0\0" \
 "loadaddr=0x80100000\0" \
-"logoaddr=0x82000000\0" \
 "defaultARlen=0x8000\0" \
 "loaddefaultAR=mmc dev 1; mmc read ${loadaddr} 800 ${defaultARlen}\0" \
 "defaultAR=run loadromfs; run loaddefaultAR; bootvx ${loadaddr}\0" \
-"logo0=fatload mmc 1:1 ${logoaddr} SYSTEM/ADDON/Bootlogo/Bootlogo.bmp.gz && " \
-	"bmp display ${logoaddr} 0 0\0" \
-"logo1=fatload mmc 1:1 ${logoaddr} SYSTEM/BASE/Bootlogo/Bootlogo.bmp.gz && " \
-	"bmp display ${logoaddr} 0 0\0" \
 "mmcboot=echo booting AR from eMMC-flash ...; "\
-	"run logo0 || run logo1; " \
 	"run loadromfs; " \
 	"fatload mmc 1:1 ${loadaddr} arimg && bootvx ${loadaddr}; " \
 	"run defaultAR;\0" \
Signature · 1 line
1.9.1
#6 lore raw

PATCH 2/5 board/BuR/brxre1: drop bootlogo feature

Quoted 4 lines · Hannes Schmelzer

the BMP logo loading has become obsolete and is not used any more. So we drop the support for it.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170613/c3197559/attachment.sig>
#7 lore raw

PATCH 2/5 board/BuR/brxre1: drop bootlogo feature

In reply to Hannes Schmelzer
Quoted 5 lines · Hannes Schmelzer

the BMP logo loading has become obsolete and is not used any more. So we drop the support for it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170616/f9350c1c/attachment.sig>
#8 lore raw

PATCH 3/5 board/BuR/brxre1: drop obsolete CONFIG_LCD_NOSTDOUT from config-header

In reply to Hannes Schmelzer

This define isn't used anymore in the u-boot source tree, so we drop it from the config header.

We drop it also from the 'config_whitelist.txt'

---

 include/configs/brxre1.h     | 1 -
 scripts/config_whitelist.txt | 1 -
 2 files changed, 2 deletions(-)
include/configs/brxre1.h +0 -1
index eac77fc..640f3db 100644
@@ -16,7 +16,6 @@
 #include <configs/bur_am335x_common.h>
 /* ------------------------------------------------------------------------- */
 #define CONFIG_AM335X_LCD
-#define CONFIG_LCD_NOSTDOUT
 #define LCD_BPP				LCD_COLOR32
 
 /* memory */
scripts/config_whitelist.txt +0 -1
index 2d9a9fe..f729e2b 100644
@@ -1480,7 +1480,6 @@ CONFIG_LCD_IN_PSRAM
 CONFIG_LCD_LOGO
 CONFIG_LCD_MENU
 CONFIG_LCD_MENU_BOARD
-CONFIG_LCD_NOSTDOUT
 CONFIG_LCD_ROTATION
 CONFIG_LD9040
 CONFIG_LEGACY
Signature · 1 line
1.9.1
#9 lore raw

PATCH 3/5 board/BuR/brxre1: drop obsolete CONFIG_LCD_NOSTDOUT from config-header

Quoted 6 lines · Hannes Schmelzer

This define isn't used anymore in the u-boot source tree, so we drop it from the config header.

We drop it also from the 'config_whitelist.txt'

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170613/020a07a9/attachment.sig>
#10 lore raw

PATCH 3/5 board/BuR/brxre1: drop obsolete CONFIG_LCD_NOSTDOUT from config-header

In reply to Hannes Schmelzer
Quoted 7 lines · Hannes Schmelzer

This define isn't used anymore in the u-boot source tree, so we drop it from the config header.

We drop it also from the 'config_whitelist.txt'

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170616/05e3723c/attachment.sig>
#11 lore raw

PATCH 4/5 board/BuR/brxre1: cosmetic cleanup of config-header

In reply to Hannes Schmelzer

---

 include/configs/brxre1.h | 2 --
 1 file changed, 2 deletions(-)
include/configs/brxre1.h +0 -2
index 640f3db..63f6ebc 100644
@@ -31,8 +31,6 @@
 /* I2C IP block */
 #define CONFIG_SYS_OMAP24_I2C_SPEED_PSOC	20000
 
-/* GPIO */
-
 /* MMC/SD IP block */
 #define CONFIG_SUPPORT_EMMC_BOOT
 
Signature · 1 line
1.9.1
#12 lore raw

PATCH 4/5 board/BuR/brxre1: cosmetic cleanup of config-header

Quoted 1 line · Hannes Schmelzer
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170613/bb0a0cf3/attachment.sig>
#13 lore raw

PATCH 4/5 board/BuR/brxre1: cosmetic cleanup of config-header

In reply to Hannes Schmelzer
Quoted 2 lines · Hannes Schmelzer

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170616/d8bc6f44/attachment.sig>
#14 lore raw

PATCH 5/5 board/BuR/brxre1: refactor default environment

In reply to Hannes Schmelzer

For better readability and setup-handling we refactor the default environment.

---

 include/configs/brxre1.h | 51 ++++++++++++++++++++----------------------------
 1 file changed, 21 insertions(+), 30 deletions(-)
include/configs/brxre1.h +21 -30
index 63f6ebc..f7d7369 100644
@@ -38,45 +38,36 @@
 #define CONFIG_ENV_SIZE			(64 << 10)
 
 #ifndef CONFIG_SPL_BUILD
-#define CONFIG_EXTRA_ENV_SETTINGS \
+
+/* Default environment */
+#define CONFIG_EXTRA_ENV_SETTINGS	\
 BUR_COMMON_ENV \
+"autoload=0\0" \
+"scradr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
 "bootaddr=0x80001100\0" \
 "bootdev=cpsw(0,0)\0" \
 "vx_romfsbase=0x800E0000\0" \
 "vx_romfssize=0x20000\0" \
 "vx_memtop=0x8FBEF000\0" \
-"loadromfs=mmc dev 1; mmc read ${vx_romfsbase} 700 100\0" \
-"autoload=0\0" \
+"loadromfs=mmc read ${vx_romfsbase} 700 100\0" \
 "loadaddr=0x80100000\0" \
-"defaultARlen=0x8000\0" \
-"loaddefaultAR=mmc dev 1; mmc read ${loadaddr} 800 ${defaultARlen}\0" \
-"defaultAR=run loadromfs; run loaddefaultAR; bootvx ${loadaddr}\0" \
-"mmcboot=echo booting AR from eMMC-flash ...; "\
-	"run loadromfs; " \
-	"fatload mmc 1:1 ${loadaddr} arimg && bootvx ${loadaddr}; " \
-	"run defaultAR;\0" \
-"netboot=echo booting AR from network ...; " \
-	"run loadromfs; " \
-	"tftp ${loadaddr} arimg && bootvx ${loadaddr}; " \
-	"puts 'networkboot failed!';\0" \
-"netscript=echo running script from network (tftp) ...; " \
-	"tftp 0x80000000 netscript.img && source; " \
-	"puts 'netscript load failed!'\0" \
-"netupdate=tftp ${loadddr} MLO && mmc write ${loadaddr} 100 100; " \
-	"tftp ${loadaddr} u-boot.img && mmc write ${loadaddr} 300 300\0" \
-"netupdatedefaultAR=echo updating defaultAR from network (tftp) ...; " \
-	"if tftp 0x80100000 arimg.bin; " \
-	"then mmc write 0x80100000 800 ${defaultARlen}; " \
-	"else setcurs 1 8; puts 'defAR update failed (tftp)!'; fi;\0" \
-"netupdateROMFS=echo updating romfs from network (tftp) ...; " \
-	"if tftp 0x80100000 romfs.bin; " \
-	"then mmc write 0x80100000 700 100; " \
-	"else setcurs 1 8; puts 'romfs update failed (tftp)!'; fi;\0"
-
+"startvx=run loadromfs; bootvx ${loadaddr}\0" \
+"b_break=0\0" \
+"b_tgts_std=mmc def net usb0\0" \
+"b_tgts_rcy=def net usb0\0" \
+"b_tgts_pme=net usb0 mmc\0" \
+"b_deftgts=if test ${b_mode} = 12; then setenv b_tgts ${b_tgts_pme};" \
+" elif test ${b_mode} = 0; then setenv b_tgts ${b_tgts_rcy};" \
+" else setenv b_tgts ${b_tgts_std}; fi\0" \
+"b_mmc=load mmc 1 ${loadaddr} arimg && run startvx\0" \
+"b_def=mmc read ${loadaddr} 800 8000; run startvx\0" \
+"b_net=tftp ${scradr} netscript.img && source ${scradr}\0" \
+"b_usb0=usb start && load usb 0 ${scradr} usbscript.img && source ${scradr}\0" \
+"b_default=run b_deftgts; for target in ${b_tgts};"\
+" do run b_${target}; if test ${b_break} = 1; then; exit; fi; done\0"
 #endif /* !CONFIG_SPL_BUILD*/
 
-#define CONFIG_BOOTCOMMAND \
-	"run usbscript;"
+#define CONFIG_BOOTCOMMAND		"mmc dev 1; run b_default"
 
 /* undefine command which we not need here */
 #undef CONFIG_BOOTM_NETBSD
Signature · 1 line
1.9.1
#15 lore raw

PATCH 5/5 board/BuR/brxre1: refactor default environment

Quoted 4 lines · Hannes Schmelzer

For better readability and setup-handling we refactor the default environment.

That said, in a future patch, can you please move the various environment parts to include/environment/bur/ similar to how we have it for include/environment/ti/ ? Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170613/01708946/attachment.sig>
#16 lore raw

PATCH 5/5 board/BuR/brxre1: refactor default environment

Tom Rini <[email protected]> schrieb am 13.06.2017 15:24:57:

Quoted 11 lines

Von: Tom Rini <[email protected]>
An: Hannes Schmelzer <[email protected]>,
Kopie: U-Boot at lists.denx.de
Datum: 13.06.2017 15:24
Betreff: Re: [PATCH 5/5] board/BuR/brxre1: refactor default environment

Quoted 3 lines · Hannes Schmelzer

For better readability and setup-handling we refactor the default environment.

Quoted 7 lines
Quoted 1 line

That said, in a future patch, can you please move the various environment parts to include/environment/bur/ similar to how we have it for include/environment/ti/ ? Thanks!

Hi Tom,

thanks for this hint.
I will have a look to all my b&r boards how to come on this way. There are several boards in the pipeline which aren't mainlined yet.

cheers,
Hannes

#17 lore raw

PATCH 5/5 board/BuR/brxre1: refactor default environment

In reply to Hannes Schmelzer
Quoted 5 lines · Hannes Schmelzer

For better readability and setup-handling we refactor the default environment.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170616/1144b701/attachment.sig>