On Fri, 2015-03-20 at 18:32 +0100, Paul Kocialkowski wrote:
> Le vendredi 20 mars 2015 à 19:21 +0200, Siarhei Siamashka a écrit :
> > On Fri, 20 Mar 2015 17:51:03 +0100
> > Paul Kocialkowski <[email protected]> wrote:
> > 
> > > After investigating a bit, I found out that I was unable to boot
> > > sunxi-3.4 on A20 devices because I wasn't setting
> > > CONFIG_OLD_SUNXI_KERNEL_COMPAT the right way.
> > > 
> > > What I did initially was to add it to sunxi-common.h (before any other
> > > define), but it apparently didn't get taken in account in the SPL
> > > context. Setting it in the device defconfig works for both the main
> > > U-Boot binary and SPL. This seems like a very strange behaviour to me.
> > > Would someone care to weigh-in and provide an explanation for this? I
> > > thought that sunxi-common.h was supposed to be used in both contexts.
> > > 
> > > I am now looking for a way to enable it at build time, that is, through
> > > some equivalent of menuconfig, that wouldn't require any interaction (so
> > > that I can have it all scriptable).
> > 
> > U-Boot uses to have separate menuconfig invocations for the SPL and the
> > main binary for a while. This turned out to be very user unfriendly and
> > confusing, but now this mishap should be already resolved:
> > 
> >     http://lists.denx.de/pipermail/u-boot/2015-February/205512.html
> > 
> > Try to upgrade to the latest U-Boot git master branch and check if it
> > works better.
> 
> I'm working off v2015.04-rc4, which is recent enough.
> 
> Having this diff:
> diff --git a/include/configs/sunxi-common.h
> b/include/configs/sunxi-common.h
> index 61a45e1..14ac9db 100644
> --- a/include/configs/sunxi-common.h
> +++ b/include/configs/sunxi-common.h
> @@ -13,6 +13,8 @@
>  #ifndef _SUNXI_COMMON_CONFIG_H
>  #define _SUNXI_COMMON_CONFIG_H
>  
> +#define CONFIG_OLD_SUNXI_KERNEL_COMPAT 1
> +
>  #ifdef CONFIG_OLD_SUNXI_KERNEL_COMPAT
>  /*
>   * The U-Boot workarounds bugs in the outdated buggy sunxi-3.4 kernels
> at the
> 
> Results in this .config:
> 
> grep CONFIG_OLD_SUNXI_KERNEL_COMPAT u-boot-out/.config
> # CONFIG_OLD_SUNXI_KERNEL_COMPAT is not set
> 
> So this is not, in fact, specific to the SPL. Still, why does it happen?

A #define in sunxi-common.h has no impact on the Kconfig .config file,
it works the other way around, the .config is an input to the cpp and is
included before sunxi-common.h.

> Perhaps the fact that OLD_SUNXI_KERNEL_COMPAT is defined as a Kconfig
> option, defaulted to n, implies that a define in the config header is
> not sufficient to enable it in Kconfig?

No #define in any header is ever sufficient to affect anything in
Kconfig.

Ian.

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to