Hi Tom,

On 2024/1/24 09:34, Tom Rini wrote:
On Wed, Jan 24, 2024 at 09:15:07AM +0800, Kever Yang wrote:
Hi Tom,

On 2024/1/24 01:58, Tom Rini wrote:
On Tue, Jan 23, 2024 at 11:53:18AM +0800, Kever Yang wrote:

Hi Tom,

rk3036 only has small size internal sram, so it can only use very
simple SPL which only including dram init, and no SPL_FRAMEWORK
support.
In this convert, the CONFIG_SPL_STACK is lost for this SoC, any
suggestions on this kind of issue?
Does this work?

diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index e7b84fc1fa68..9deee0fdbea8 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -372,7 +372,8 @@ config SPL_SHARES_INIT_SP_ADDR
   config SPL_STACK
        hex "Initial stack pointer location"
-       depends on (ARM || ARCH_JZ47XX || MICROBLAZE || RISCV) && SPL_FRAMEWORK
+       depends on (ARM || ARCH_JZ47XX || MICROBLAZE || RISCV) && \
+               SPL_FRAMEWORK || ROCKCHIP_RK3036
This works with adding CONFIG_SPL_STACK in rk3036 board defconfig.
        depends on !SPL_SHARES_INIT_SP_ADDR
        default 0x946bb8 if ARCH_MX7
        default 0x93ffb8 if ARCH_MX6 && MX6_OCRAM_256KB

You will have to update the ROCKCHIP_RK3036 platforms otherwise the
build will hang now.
What do you mean to update the platform?

The rk3036 case should be one of the available option for those "small"/low
end SoCs has very limit

size of internal dram, only need minimal SPL+ U-Boot,  and no requirement
for ATF/OPTEEwhich will have to use TPL+SPL+U-Boot.


The CONFIG_SPL_STACK is used in assemble init code, it doesn't need to
depends on SPL_FRAMEWORK, isn't it?
I just mean that with the above Kconfig change, all RK3036 platforms
must set a value for CONFIG_SPL_STACK at the same time, or they will
fail to build (and CI will get hung).

It doesn't hang because the build goes to another branch which not defined CONFIG_SPL_STACK,

the board get panic when it run the firmware.

It sounds like all RK3036
platforms need to set the value in order to work,

Yes, this is correct.

The init code doesn't define a correct SP, that should be a bug.


Thanks,
- Kever
so this isn't a bug,
just a feature. Is that clearer?

Reply via email to