[LEDE-DEV] early printk breaks kernel on the clearfog board

Josua Mayer josua.mayer97 at gmail.com
Tue Apr 25 10:04:05 PDT 2017


Am Dienstag, 25. April 2017, 02:08:48 CEST schrieb Syrone Wong:
> try `make kernel_menuconfig` and select the corresponding one.
Thats how it has to be done now. However I claim that the new one should be 
the default, and teh right way is to have people using old bootloaders do the 
hard way.
However it is really not that simple:
switching between CONFIG_DEBUG_MVEBU_UART0 and 
CONFIG_DEBUG_MVEBU_UART0_ALTERNATE does *not* switch 
CONFIG_DEBUG_UART_PHYS!!!!!!!
If course nothing can be done to fix this kernel-side.

Thats why I am asking what would be the proper way to deal with this from a 
higher level (Lede menuconfig).
Quoting kernel menuconfig:
DEBUG_MVEBU_UART0_ALTERNATE:
"This option should be used with the new bootloaders that remap the internal 
registers at 0xf1000000.
If the wrong DEBUG_MVEBU_UART* option is selected, when u-boot hands over to 
the kernel, the system silently crashes, with no serial output at all."

DEBUG_MVEBU_UART0:
"This option should be used with the old bootloaders ... "
"This option will not work on older Marvell platforms (Kirkwood, Dove, 
MV78xx0, Orion5x), which should pick the "new bootloader" variant."

It seems to be that "new"should be the default, and applicable to most, and 
all new platforms. Better not put bricks into peoples paths when they are 
starting out on new stuff.

Of course one way would be to make a Lede menuconfig for this.

br
Josua Mayer
> 
> 
> Best Regards,
> Syrone Wong
> 
> On Mon, Apr 24, 2017 at 11:18 PM, Josua Mayer <josua.mayer at jm0.eu> wrote:
> > Am Montag, 24. April 2017, 02:37:48 CEST schrieb Syrone Wong:
> >> You may want to enable CONFIG_DEBUG_MVEBU_UART0_ALTERNATE
> > 
> > Yes, this is the one. But it is not visible from the Lede menuconfig. The
> > problem I was trying to point out is that in the kernel-config this is
> > what
> > should be selected when selecting early-printk in the Lede menuconfig.
> > 
> >> or CONFIG_DEBUG_MVEBU_UART1_ALTERNATE if early printk is being enabled.
> >> 
> >> 
> >> Best Regards,
> >> Syrone Wong
> >> 
> >> On Mon, Apr 24, 2017 at 3:39 AM, Josua Mayer <josua.mayer97 at gmail.com>
> > 
> > wrote:
> >> > Hi everybody,
> >> > 
> >> > I noticed a serious problem with a Clearfog build that enables
> >> > CONFIG_KERNEL_EARLY_PRINTK=y.
> >> > In short: after Loading Kernel, the serial console stays completely
> >> > silent, and apparently the board does *not* boot.
> >> > 
> >> > This came as a serious surprise to me.
> >> > Turns out the reason for this is the usage of the old uart physical
> >> > address: CONFIG_DEBUG_UART_PHYS=0xd0012000
> >> > This is the default for if DEBUG_MVEBU_UART0
> >> > However the Clearfog Pro uses mainline u-boot, and requires:
> >> > CONFIG_DEBUG_UART_PHYS=0xf1012000
> >> > 
> >> > Any opinions what should be done about this?
> >> > I personally suggest to switch to what the kernel config calls "new
> >> > bootloaders".
> >> > After all this is quite the trap when somebody is so thoughtful to
> >> > start
> >> > with a debug build, only to find out that is the reason his builds
> >> > don't
> >> > boot.
> >> > 
> >> > Imre Kaloz: you are the one who committed this setting with config-4.4,
> >> > so I figured you may have some valuable insight here.
> >> > 
> >> > br
> >> > Josua Mayer
> >> > 
> >> > 
> >> > _______________________________________________
> >> > Lede-dev mailing list
> >> > Lede-dev at lists.infradead.org
> >> > http://lists.infradead.org/mailman/listinfo/lede-dev
> > 
> > _______________________________________________
> > Lede-dev mailing list
> > Lede-dev at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/lede-dev
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev





More information about the Lede-dev mailing list