TPL/SPL: add separate CONFIG_TPL_FRAMEWORK for TPL
Subsystems (2)
PATCH 1/1 TPL/SPL: add separate CONFIG_TPL_FRAMEWORK for TPL
SPL_FRAMEWORK is a set of framework feature, we may not need the fromework for both TPL and SPL at the same time, so add a separate one for TPL.
---
Makefile | 2 +- arch/arm/lib/Makefile | 4 ++-- arch/arm/lib/crt0.S | 6 +++++- common/spl/Kconfig | 9 +++++++++ common/spl/Makefile | 2 +- scripts/Makefile.spl | 4 ++++ 6 files changed, 22 insertions(+), 5 deletions(-)
Makefile +1 -1
@@ -822,7 +822,7 @@ endif endif ALL-$(CONFIG_TPL) += tpl/u-boot-tpl.bin ALL-$(CONFIG_OF_SEPARATE) += u-boot.dtb -ifeq ($(CONFIG_SPL_FRAMEWORK),y) +ifeq ($(CONFIG_TPL_FRAMEWORK),y) ALL-$(CONFIG_OF_SEPARATE) += u-boot-dtb.img endif ALL-$(CONFIG_OF_HOSTFILE) += u-boot.dtb
arch/arm/lib/Makefile +2 -2
@@ -35,8 +35,8 @@ obj-$(CONFIG_CMD_BOOTM) += bootm.o obj-$(CONFIG_CMD_BOOTZ) += bootm.o zimage.o obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o else -obj-$(CONFIG_SPL_FRAMEWORK) += spl.o -obj-$(CONFIG_SPL_FRAMEWORK) += zimage.o +obj-$(CONFIG_$(SPL_TPL_)FRAMEWORK) += spl.o +obj-$(CONFIG_$(SPL_TPL_)FRAMEWORK) += zimage.o obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o endif obj-$(CONFIG_$(SPL_TPL_)USE_ARCH_MEMSET) += memset.o
arch/arm/lib/crt0.S +5 -1
@@ -120,7 +120,11 @@ here: bl c_runtime_cpu_setup /* we still call old routine here */ #endif -#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_FRAMEWORK) +#if !defined(CONFIG_SPL_BUILD) || \ + (defined(CONFIG_TPL_BUILD) && defined(CONFIG_TPL_FRAMEWORK)) || \ + (defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD) && \ + defined(CONFIG_SPL_FRAMEWORK)) \ + # ifdef CONFIG_SPL_BUILD /* Use a DRAM stack for the rest of SPL, if requested */ bl spl_relocate_stack_gd
common/spl/Kconfig +9 -0
@@ -813,6 +813,15 @@ config TPL help If you want to build TPL as well as the normal image and SPL, say Y. +config TPL_FRAMEWORK + bool "Support TPL based upon the common TPL framework" + depends on TPL + default y + help + Enable the TPL framework under common/spl/. This framework + re-use the all the framework feature from SPL but enable separetely. + If unsure, say Y. + if TPL config TPL_BOARD_INIT
common/spl/Makefile +1 -1
@@ -7,7 +7,7 @@ # ifdef CONFIG_SPL_BUILD -obj-$(CONFIG_SPL_FRAMEWORK) += spl.o +obj-$(CONFIG_$(SPL_TPL_)FRAMEWORK) += spl.o obj-$(CONFIG_$(SPL_TPL_)BOOTROM_SUPPORT) += spl_bootrom.o obj-$(CONFIG_$(SPL_TPL_)LOAD_FIT) += spl_fit.o obj-$(CONFIG_$(SPL_TPL_)NOR_SUPPORT) += spl_nor.o
scripts/Makefile.spl +4 -0
@@ -64,7 +64,11 @@ HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makef libs-y += $(if $(BOARDDIR),board/$(BOARDDIR)/) libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/ +ifeq ($(CONFIG_TPL_BUILD),y) +libs-$(CONFIG_TPL_FRAMEWORK) += common/spl/ +else libs-$(CONFIG_SPL_FRAMEWORK) += common/spl/ +endif libs-y += common/init/ # Special handling for a few options which support SPL/TPL
Signature · 1 line
2.18.0
PATCH 1/1 TPL/SPL: add separate CONFIG_TPL_FRAMEWORK for TPL
Quoted 20 lines · Kever Yang
SPL_FRAMEWORKis a set of framework feature, we may not need the fromework for both TPL and SPL at the same time, so add a separate one for TPL.Signed-off-by Kever Yang <[email protected]>---
Makefile | 2 +- arch/arm/lib/Makefile | 4 ++-- arch/arm/lib/crt0.S | 6 +++++- common/spl/Kconfig | 9 +++++++++ common/spl/Makefile | 2 +- scripts/Makefile.spl | 4 ++++ 6 files changed, 22 insertions(+), 5 deletions(-)Makefile +0
-0
Makefile endif · line 828
Quoted 8 lines
Makefile +1
-1@@ -822,7 +822,7 @@ endif endif ALL-$(CONFIG_TPL) += tpl/u-boot-tpl.bin ALL-$(CONFIG_OF_SEPARATE) += u-boot.dtb -ifeq ($(CONFIG_SPL_FRAMEWORK),y) +ifeq ($(CONFIG_TPL_FRAMEWORK),y) ALL-$(CONFIG_OF_SEPARATE) += u-boot-dtb.img endif ALL-$(CONFIG_OF_HOSTFILE) += u-boot.dtb
We should be adding a new stanza here and not replacing the SPL one I would think.
[snip]
Quoted 6 lines
common/spl/Kconfig +0
-0@@ -813,6 +813,15 @@ config TPL help
common/spl/Kconfig config TPL · line 823
Quoted 10 lines
common/spl/Kconfig +8
-0If you want to build TPL as well as the normal image and SPL, say Y. +config TPL_FRAMEWORK + bool "Support TPL based upon the common TPL framework" + depends on TPL + default y + help + Enable the TPL framework under common/spl/. This framework + re-use the all the framework feature from SPL but enable separetely. + If unsure, say Y.
This shouldn't be default y, and the help shouldn't suggest that either I think. My concern with this series is TPL wasn't intended to get too featureful. Our initial constraints are enough that we need something to init DDR and load SPL into that as we can't do enough with our limited resources to load full U-Boot. In fact, looking at the follow up rockchip specific patch that's more in line what my expectations. So I think you should be able to get TPL to do what you want without introducing TPL_FRAMEWORK. Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180828/a466498d/attachment.sig>
PATCH 1/1 TPL/SPL: add separate CONFIG_TPL_FRAMEWORK for TPL
Hi Tom,
Quoted 17 lines · Tom Rini
Quoted 15 lines · Kever Yang
SPL_FRAMEWORKis a set of framework feature, we may not need the fromework for both TPL and SPL at the same time, so add a separate one for TPL.Signed-off-by Kever Yang <[email protected]>---
Makefile | 2 +- arch/arm/lib/Makefile | 4 ++-- arch/arm/lib/crt0.S | 6 +++++- common/spl/Kconfig | 9 +++++++++ common/spl/Makefile | 2 +- scripts/Makefile.spl | 4 ++++ 6 files changed, 22 insertions(+), 5 deletions(-)
Quoted 15 lines
Makefile endif · line 828
Quoted 13 lines
Makefile +1
-1@@ -822,7 +822,7 @@ endif endif ALL-$(CONFIG_TPL) += tpl/u-boot-tpl.bin ALL-$(CONFIG_OF_SEPARATE) += u-boot.dtb -ifeq ($(CONFIG_SPL_FRAMEWORK),y) +ifeq ($(CONFIG_TPL_FRAMEWORK),y) ALL-$(CONFIG_OF_SEPARATE) += u-boot-dtb.img endif ALL-$(CONFIG_OF_HOSTFILE) += u-boot.dtbWe should be adding a new stanza here and not replacing the SPL one I would think.
This may not need, I though this is for TPL because it's just after target for CONFIG_TPL.
Will drop this part next version.
Quoted 10 lines
[snip]
Quoted 8 lines
common/spl/Kconfig +0
-0@@ -813,6 +813,15 @@ config TPL help If you want to build TPL as well as the normal image and SPL, say Y.
Quoted 16 lines
common/spl/Kconfig config TPL · line 823
Quoted 8 lines
common/spl/Kconfig +8
-0+config TPL_FRAMEWORK + bool "Support TPL based upon the common TPL framework" + depends on TPL + default y + help + Enable the TPL framework under common/spl/. This framework + re-use the all the framework feature from SPL but enable separetely. + If unsure, say Y.This shouldn't be default y, and the help shouldn't suggest that either I think. My concern with this series is TPL wasn't intended to get too featureful. Our initial constraints are enough that we need something to init DDR and load SPL into that as we can't do enough with our limited resources to load full U-Boot. In fact, looking at the follow up rockchip specific patch that's more in line what my expectations. So I think you should be able to get TPL to do what you want without introducing
TPL_FRAMEWORK. Thanks!
I have to introducing TPL_FRAMEWORK because the SPL_FRAMEWORK is shared by TPL and SPL, if I have enable TPL and SPL, then:
- I would like to use TPL without framework(which refers to DM, common lib and FDT);
- I would like to use SPL with SPL_FRAMEWORK
If there is no TPL_FRAMEWORK, then I'm not sure if I can use the TINY_FRAMEWORK
to overwrite everything.
I introduce TINY_FRAMEWORK is to remove other program like vector table, runtime C init, which is not include in SPL_FRAMEWORK now.
Thanks,
- Kever
PATCH 1/1 TPL/SPL: add separate CONFIG_TPL_FRAMEWORK for TPL
Quoted 75 lines · Kever Yang
Hi Tom,
Quoted 17 lines · Tom Rini
Quoted 15 lines · Kever Yang
SPL_FRAMEWORKis a set of framework feature, we may not need the fromework for both TPL and SPL at the same time, so add a separate one for TPL.Signed-off-by Kever Yang <[email protected]>---
Makefile | 2 +- arch/arm/lib/Makefile | 4 ++-- arch/arm/lib/crt0.S | 6 +++++- common/spl/Kconfig | 9 +++++++++ common/spl/Makefile | 2 +- scripts/Makefile.spl | 4 ++++ 6 files changed, 22 insertions(+), 5 deletions(-)Quoted 15 lines
Makefile endif · line 828
Quoted 13 lines
Makefile +1
-1@@ -822,7 +822,7 @@ endif endif ALL-$(CONFIG_TPL) += tpl/u-boot-tpl.bin ALL-$(CONFIG_OF_SEPARATE) += u-boot.dtb -ifeq ($(CONFIG_SPL_FRAMEWORK),y) +ifeq ($(CONFIG_TPL_FRAMEWORK),y) ALL-$(CONFIG_OF_SEPARATE) += u-boot-dtb.img endif ALL-$(CONFIG_OF_HOSTFILE) += u-boot.dtbWe should be adding a new stanza here and not replacing the SPL one I would think.
This may not need, I though this is for TPL because it's just after target for
CONFIG_TPL.
Will drop this part next version.Quoted 10 lines
[snip]
Quoted 8 lines
common/spl/Kconfig +0
-0@@ -813,6 +813,15 @@ config TPL help If you want to build TPL as well as the normal image and SPL, say Y.Quoted 16 lines
common/spl/Kconfig config TPL · line 823
Quoted 8 lines
common/spl/Kconfig +8
-0+config TPL_FRAMEWORK + bool "Support TPL based upon the common TPL framework" + depends on TPL + default y + help + Enable the TPL framework under common/spl/. This framework + re-use the all the framework feature from SPL but enable separetely. + If unsure, say Y.This shouldn't be default y, and the help shouldn't suggest that either I think. My concern with this series is TPL wasn't intended to get too featureful. Our initial constraints are enough that we need something to init DDR and load SPL into that as we can't do enough with our limited resources to load full U-Boot. In fact, looking at the follow up rockchip specific patch that's more in line what my expectations. So I think you should be able to get TPL to do what you want without introducing
TPL_FRAMEWORK. Thanks!I have to introducing
TPL_FRAMEWORKbecause theSPL_FRAMEWORKis shared by TPL and SPL, if I have enable TPL and SPL, then:
- I would like to use TPL withoutframework(which refers to DM, common lib and FDT);
- I would like to use SPL withSPL_FRAMEWORK
If there is noTPL_FRAMEWORK, then I'm not sure if I can use theTINY_FRAMEWORK
to overwrite everything.
Quoted 2 lines
I introduce
TINY_FRAMEWORKis to remove other program like vector table, runtime C init, which is not include inSPL_FRAMEWORKnow.
First, please make sure that your next series here has been through travis-ci or you've built some of the PowerPC targets (say ./tools/buildman/buildman.py p1_p2) as I'm pretty sure TPL_FRAMEWORK being on by default breaks them.
Next, I'm still not quite following, sorry. The way TPL is used normally today (again, see PowerPC for the non-rockchip examples) does not rely on the spl framework, and that's intentional as they have extremely limited resources. I still think you should be able to rework things such that you don't need TPL_FRAMEWORK being set to them overwrite most of it. Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180828/43664362/attachment.sig>