With this change the SPL binary shrinks from 32k to 23k when
Subsystems (3)
v2 cover With this change the SPL binary shrinks from 32k to 23k when
ROCKCHIP_SPL_BACK_TO_BROM is enabled. This has been tested on the rock2 board. It should work with any rk3288 though since the bootrom is loading the SPL already it should load the main U-Boot as well.
Rock2 has been tested with ROCKCHIP_SPL_BACK_TO_BROM.
Also, this moves around the images on the disk, so I had to move the environment so it doesn't overwrite u-boot. The new env location works with both boot methods.
Changes in v2:
- Rebase after "Kconfig: Move CONFIG_SPL_..._SUPPORT to Kconfig."
- Remove all the refactoring in the configs.
- Split enabling featuring in rock2 into separate commit.
Sandy Patterson (2):
Disable SPL_MMC_SUPPORT if ROCKCHIP_SPL_BACK_TO_BROM is enabled. Enable ROCKCHIP_SPL_BACK_TO_BROM for rock2 board
arch/arm/mach-rockchip/Kconfig | 3 +++ configs/rock2_defconfig | 2 +- include/configs/rock2.h | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-)
Signature · 1 line
1.9.1
PATCH v2 1/2 Disable SPL_MMC_SUPPORT if ROCKCHIP_SPL_BACK_TO_BROM is enabled.
Default SPL_MMC_SUPPORT to false when ROCKCHIP_SPL_BACK_TO_BROM is enabled.
---
Changes in v2:
- Rebase after "Kconfig: Move CONFIG_SPL_..._SUPPORT to Kconfig."
- Remove all the refactoring in the configs.
- Split enabling featuring in rock2 into separate commit.
arch/arm/mach-rockchip/Kconfig | 3 +++ configs/rock2_defconfig | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
arch/arm/mach-rockchip/Kconfig +3 -0
@@ -42,6 +42,9 @@ config ROCKCHIP_SPL_BACK_TO_BROM SPL will return to the boot rom, which will then load the U-Boot binary to keep going on. +config SPL_MMC_SUPPORT + default y if !ROCKCHIP_SPL_BACK_TO_BROM + source "arch/arm/mach-rockchip/rk3036/Kconfig" source "arch/arm/mach-rockchip/rk3288/Kconfig" source "arch/arm/mach-rockchip/rk3399/Kconfig"
configs/rock2_defconfig +1 -1
@@ -10,7 +10,7 @@ CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000 CONFIG_SPL_DRIVERS_MISC_SUPPORT=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y -CONFIG_SPL_MMC_SUPPORT=y +CONFIG_ROCKCHIP_SPL_BACK_TO_BROM=y CONFIG_SPL_PINCTRL_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_HUSH_PARSER=y
Signature · 1 line
1.9.1
PATCH v2 2/2 Enable ROCKCHIP_SPL_BACK_TO_BROM for rock2 board
In reply to Sandy PattersonRock2 has been tested with back to brom feature. The tricky part is that with this feature the default environment is inside u-boot, and it's defined for every rk3288 board independetly. So I just changed it for rock2 here.
Solve by moving environment after u-boot before 1M boundary
---
Changes in v2: None
include/configs/rock2.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
include/configs/rock2.h +4 -4
@@ -16,11 +16,11 @@#define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 0 -/* SPL @ 32k for ~36k -* ENV @ 96k -* u-boot @ 128K +/* SPL @ 32k for 34k +* u-boot directly after @ 68k for 400k or so +* ENV @ 992k */ -#define CONFIG_ENV_OFFSET (96 * 1024) +#define CONFIG_ENV_OFFSET ((1024-32) * 1024)#define CONFIG_SYS_WHITE_ON_BLACK #define CONFIG_CONSOLE_SCROLL_LINES 10
Signature · 1 line
1.9.1
PATCH v2 1/2 Disable SPL_MMC_SUPPORT if ROCKCHIP_SPL_BACK_TO_BROM is enabled.
In reply to Sandy PattersonQuoted 3 lines · Sandy Patterson
Default
SPL_MMC_SUPPORTto false whenROCKCHIP_SPL_BACK_TO_BROMis enabled.Signed-off-by Sandy Patterson <[email protected]>
Quoted 7 lines
---
Changes in v2:
- Rebase after "Kconfig: Move CONFIG_SPL_..._SUPPORT toKconfig."
- Remove all the refactoring in the configs.
- Split enabling featuring in rock2 into separate commit.
PATCH v2 2/2 Enable ROCKCHIP_SPL_BACK_TO_BROM for rock2 board
In reply to Sandy PattersonHi,
Quoted 9 lines · Sandy Patterson
Rock2 has been tested with back to brom feature. The tricky part is that with this feature the default environment is inside u-boot, and it's defined for every rk3288 board independetly. So I just changed it for rock2 here.
Solve by moving environment after u-boot before 1M boundary
Signed-off-by Sandy Patterson <[email protected]>---
According to your change, I think your commit message is not match. Enable ROCKCHIP_SPL_BACK_TO_BROM for rock2 board???
Quoted 26 lines
Changes in v2: None
include/configs/rock2.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)include/configs/rock2.h +4
-4@@ -16,11 +16,11 @@#define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 0 -/* SPL @ 32k for ~36k -* ENV @ 96k -* u-boot @ 128K +/* SPL @ 32k for 34k +* u-boot directly after @ 68k for 400k or so +* ENV @ 992k */ -#define CONFIG_ENV_OFFSET (96 * 1024) +#define CONFIG_ENV_OFFSET ((1024-32) * 1024)#define CONFIG_SYS_WHITE_ON_BLACK #define CONFIG_CONSOLE_SCROLL_LINES 10
PATCH v2 2/2 Enable ROCKCHIP_SPL_BACK_TO_BROM for rock2 board
Quoted 10 lines · Ziyuan Xu
Hi,
Quoted 5 lines · Sandy Patterson
Rock2 has been tested with back to brom feature. The tricky part is that with this feature the default environment is inside u-boot, and it's defined for every rk3288 board independetly. So I just changed it for rock2 here.
Quoted 8 lines
Quoted 5 lines
Solve by moving environment after u-boot before 1M boundary
Signed-off-by Sandy Patterson <[email protected]>---
According to your change, I think your commit message is not match. Enable
ROCKCHIP_SPL_BACK_TO_BROMfor rock2 board???
Oops. It looks like my change to the rock2_defconfig ended up in the other patch. I'll resubmit with the defconfig in this patch.
Quoted 30 lines
Quoted 27 lines
Changes in v2: None
include/configs/rock2.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)include/configs/rock2.h +4
-4@@ -16,11 +16,11 @@#define CONFIG_ENV_IS_IN_MMC #define CONFIG_SYS_MMC_ENV_DEV 0 -/* SPL @ 32k for ~36k -* ENV @ 96k -* u-boot @ 128K +/* SPL @ 32k for 34k +* u-boot directly after @ 68k for 400k or so +* ENV @ 992k */ -#define CONFIG_ENV_OFFSET (96 * 1024) +#define CONFIG_ENV_OFFSET ((1024-32) * 1024)#define CONFIG_SYS_WHITE_ON_BLACK #define CONFIG_CONSOLE_SCROLL_LINES 10