From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans de Goede Date: Mon, 18 Apr 2016 10:54:27 +0200 Subject: [U-Boot] SYS_MALLOC_SIMPLE versus SPL_SYS_MALLOC_SIMPLE? In-Reply-To: References: Message-ID: <5714A0C3.60608@redhat.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 16-04-16 10:58, Robert P. J. Day wrote: > > (WARNING: many potentially dumb questions coming this weekend as i > try to put together a u-boot tutorial for some upcoming presentations. > please be patient ... ) > > i had a much longer question about the config option > SYS_MALLOC_SIMPLE until i noticed that it doesn't seem to be defined > in a Kconfig file: > > $ grep -rw SYS_MALLOC_SIMPLE * > common/malloc_simple.c:#if CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE) > include/exports.h:#if !CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE) > include/_exports.h:#if !CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE) > include/malloc.h:#if CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE) > $ > > that appears to be the extent of that symbol in the entire u-boot > source tree, which is obviously different from: > > $ grep -rw SPL_SYS_MALLOC_SIMPLE * > arch/arm/Kconfig: select SPL_SYS_MALLOC_SIMPLE if SUPPORT_SPL > arch/arm/mach-rockchip/Kconfig:config SPL_SYS_MALLOC_SIMPLE > Kconfig:config SPL_SYS_MALLOC_SIMPLE > Kconfig: depends on SPL_STACK_R && SPL_SYS_MALLOC_SIMPLE > $ There is some magic happening somewhere whereby SPL_FOO_BAR Kconfig settings only get set when builind the SPL and they actually get set as FOO_BAR, so the SPL_ prefix is special and tells the u-boot build scripts to only define FOO_BAR when building the SPL, this goes for all SPL_ prefixed Kconfig settings. This all is IIRC. Regards, Hans