[U-Boot] [PATCH v2 0/2] 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(-)

Default SPL_MMC_SUPPORT to false when ROCKCHIP_SPL_BACK_TO_BROM is enabled.
Signed-off-by: Sandy Patterson apatterson@sightlogix.com ---
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(-)
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index 1aac3c8..8a5d62a 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -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" diff --git a/configs/rock2_defconfig b/configs/rock2_defconfig index b1294f0..e34d8b3 100644 --- a/configs/rock2_defconfig +++ b/configs/rock2_defconfig @@ -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

On 2016年08月28日 03:39, Sandy Patterson wrote:
Default SPL_MMC_SUPPORT to false when ROCKCHIP_SPL_BACK_TO_BROM is enabled.
Signed-off-by: Sandy Patterson apatterson@sightlogix.com
Acked-by: Ziyuan Xu xzy.xu@rock-chips.com
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.

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 apatterson@sightlogix.com ---
Changes in v2: None
include/configs/rock2.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/configs/rock2.h b/include/configs/rock2.h index ee924c3..946367f 100644 --- a/include/configs/rock2.h +++ b/include/configs/rock2.h @@ -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

Hi,
On 2016年08月28日 03:39, Sandy Patterson wrote:
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 apatterson@sightlogix.com
According to your change, I think your commit message is not match. Enable ROCKCHIP_SPL_BACK_TO_BROM for rock2 board???
Changes in v2: None
include/configs/rock2.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/configs/rock2.h b/include/configs/rock2.h index ee924c3..946367f 100644 --- a/include/configs/rock2.h +++ b/include/configs/rock2.h @@ -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

On Sun, Aug 28, 2016 at 10:01 PM, Ziyuan Xu xzy.xu@rock-chips.com wrote:
Hi,
On 2016年08月28日 03:39, Sandy Patterson wrote:
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 apatterson@sightlogix.com
According to your change, I think your commit message is not match. Enable ROCKCHIP_SPL_BACK_TO_BROM for 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.
Changes in v2: None
include/configs/rock2.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/configs/rock2.h b/include/configs/rock2.h index ee924c3..946367f 100644 --- a/include/configs/rock2.h +++ b/include/configs/rock2.h @@ -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
participants (2)
-
Sandy Patterson
-
Ziyuan Xu