linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Kernel 3.4 on Dreamplug: no serial console
@ 2012-06-02 12:20 Hans Kröner
  2012-06-02 15:18 ` Adam Baker
  2012-06-03 15:26 ` Hans Kröner
  0 siblings, 2 replies; 10+ messages in thread
From: Hans Kröner @ 2012-06-02 12:20 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

I built a 3.4 kernel by grabbing the sources off kernel.org at
/pub/linux/kernel/v3.0/linux-3.4.tar.bz2

I built both the uImage with FDT support for the Dreamplug and it's respective
dtb, and placed them on the Dreamplug's internal SD. I made minor tweaks
to my U-boot env to handle FDT and proceeded to boot.

At first I thought the Dreamplug was hanging while booting the kernel, since
the console hangs at "Uncompressing Linux... done, booting the kernel."
However, doing the "post mortem" analysis and using U-boot to look at
__log_buf, I could see the kernel actually booting fine. I let it boot and
then SSHd into the box, everything seems fine.

I couldn't figure out why the serial console wasn't working, so I tried using
a newer kernel build. I cloned the 3.4 mainline git tree and built a new
kernel and dtb. This time, the kernel does hang! All I get as output
when doing the "post mortem" analysis is: "Booting Linux on physical
CPU 0."

Did I miss something while configuring the kernel? Am I not
understanding FDT and my U-boot env is messed? I'm attaching both
my U-boot env and .config in hopes that someone can help me figure
this out.

Thanks in advance!!!

Hans

----------
U-boot env
----------
baudrate=115200
bootargs=console=ttyS0,115200
bootcmd=${x_bootcmd_usb}; ${x_bootcmd_kernel};
${x_bootcmd_fdt}; setenv bootargs ${x_bootargs} 
${x_bootargs_root}; bootm 0x6400000 - 0xd000000;
bootdelay=3
eth1addr=F0:AD:4E:00:E0:55
ethact=egiga0
ethaddr=F0:AD:4E:00:E0:56
serial_num=DS2-1148-000242
stderr=serial
stdin=serial
stdout=serial
x_bootargs=console=ttyS0,115200n8 earlyprintk
x_bootargs_root=root=/dev/sda2 rootdelay=10 rootfstype=ext4
x_bootcmd_ethernet=ping 192.168.0.110
x_bootcmd_fdt=ext2load usb 0 0xd000000 kirkwood-dreamplug.dtb
x_bootcmd_kernel=ext2load usb 0 0x6400000 uImage
x_bootcmd_usb=usb start

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Kernel 3.4 on Dreamplug: no serial console
  2012-06-02 12:20 Kernel 3.4 on Dreamplug: no serial console Hans Kröner
@ 2012-06-02 15:18 ` Adam Baker
  2012-06-03 15:26 ` Hans Kröner
  1 sibling, 0 replies; 10+ messages in thread
From: Adam Baker @ 2012-06-02 15:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Saturday 02 Jun 2012 12:20:59 Hans Kr?ner wrote:
> Hello,
> 
> I built a 3.4 kernel by grabbing the sources off kernel.org at
> /pub/linux/kernel/v3.0/linux-3.4.tar.bz2
> 
> I built both the uImage with FDT support for the Dreamplug and it's
> respective dtb, and placed them on the Dreamplug's internal SD. I made
> minor tweaks to my U-boot env to handle FDT and proceeded to boot.
> 
> At first I thought the Dreamplug was hanging while booting the kernel, since
> the console hangs at "Uncompressing Linux... done, booting the kernel."
> However, doing the "post mortem" analysis and using U-boot to look at
> __log_buf, I could see the kernel actually booting fine. I let it boot and
> then SSHd into the box, everything seems fine.

your .config doesn't seem to be attached but this sounds similiar to the 
problem I had when converting a kernel config to FDT because I didn't have

CONFIG_SERIAL_OF_PLATFORM=y

which is needed to support configuring serial ports with FDT

Hope that Helps

Adam

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Kernel 3.4 on Dreamplug: no serial console
@ 2012-06-02 18:57 Andrew Lunn
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Lunn @ 2012-06-02 18:57 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Hans

Do you have SERIAL_OF_PLATFORM enabled. Without that, the serial ports
won't work.

   Andrew

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Kernel 3.4 on Dreamplug: no serial console
  2012-06-02 12:20 Kernel 3.4 on Dreamplug: no serial console Hans Kröner
  2012-06-02 15:18 ` Adam Baker
@ 2012-06-03 15:26 ` Hans Kröner
  2012-06-03 16:59   ` Adam Baker
  1 sibling, 1 reply; 10+ messages in thread
From: Hans Kröner @ 2012-06-03 15:26 UTC (permalink / raw)
  To: linux-arm-kernel

Hi again,

Many thanks to the both of you. CONFIG_SERIAL_OF_PLATFORM was exactly what
I was missing in my .config

Thanks a bunch!

Hans

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Kernel 3.4 on Dreamplug: no serial console
  2012-06-03 15:26 ` Hans Kröner
@ 2012-06-03 16:59   ` Adam Baker
  2012-06-03 17:12     ` Arnd Bergmann
  0 siblings, 1 reply; 10+ messages in thread
From: Adam Baker @ 2012-06-03 16:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Sunday 03 Jun 2012 15:26:14 Hans Kr?ner wrote:
> Hi again,
> 
> Many thanks to the both of you. CONFIG_SERIAL_OF_PLATFORM was exactly what
> I was missing in my .config
> 

As there are now two of us who have been tripped up by this does anyone think 
the untested patch below is

a) worthwhile
b) likely to be acceptable
c) likely to work

It feels wrong to be putting something arch specific in such general code but 
setting it as a default is cleaner than trying to select it from 
ARCH_KIRKWOOD_DT because default respects depends lines.

--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -1021,6 +1021,7 @@ config SERIAL_OF_PLATFORM
        tristate "Serial port on Open Firmware platform bus"
        depends on OF
        depends on SERIAL_8250 || SERIAL_OF_PLATFORM_NWPSERIAL
+        default y if ARCH_KIRKWOOD_DT
        help
          If you have a PowerPC based system that has serial ports
          on a platform specific bus, you should enable this option.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Kernel 3.4 on Dreamplug: no serial console
  2012-06-03 16:59   ` Adam Baker
@ 2012-06-03 17:12     ` Arnd Bergmann
  2012-06-03 18:40       ` Jason Cooper
  0 siblings, 1 reply; 10+ messages in thread
From: Arnd Bergmann @ 2012-06-03 17:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Sunday 03 June 2012, Adam Baker wrote:
> As there are now two of us who have been tripped up by this does anyone think 
> the untested patch below is
> 
> a) worthwhile

yes

> b) likely to be acceptable

no

> c) likely to work

yes

> It feels wrong to be putting something arch specific in such general code but 
> setting it as a default is cleaner than trying to select it from 
> ARCH_KIRKWOOD_DT because default respects depends lines.

Just put it into the kirkwood_defconfig file, that is the cleanest approach by
far. We might still get a few people who run into this problem when updating,
but in the long run it will be ok.

I'd also accept a patch to make ARCH_KIRKWOOD_DT select OF_SERIAL if people
prefer that, but I think just changing the defconfig is better.

	Arnd

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Kernel 3.4 on Dreamplug: no serial console
  2012-06-03 17:12     ` Arnd Bergmann
@ 2012-06-03 18:40       ` Jason Cooper
  2012-06-03 19:09         ` Andrew Lunn
  2012-06-04  8:29         ` Florian Fainelli
  0 siblings, 2 replies; 10+ messages in thread
From: Jason Cooper @ 2012-06-03 18:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Jun 03, 2012 at 05:12:18PM +0000, Arnd Bergmann wrote:
> I'd also accept a patch to make ARCH_KIRKWOOD_DT select OF_SERIAL if people
> prefer that, but I think just changing the defconfig is better.

I'd prefer the defconfig as there are situations where users/oems deploy
a kernel without support for serial console.  In order to do that with
your patch, or similar approaches, they would have to change the code.
With defconfig, they don't.

FYI: there is a running problem with kirkwood_defconfig that I haven't
had time to look into.  I've been doing 'make oldconfig' and thus never
encountered the problem.

The problem involves CONFIG_ARM_PATCH_PHYS_VIRT and causes the system
not to boot.  I'm not sure if this is dreamplug specific, kirkwood, or
all orion.  I've only heard reports regarding dreamplug, but that
doesn't mean it's limited to that board.

I'd like to have the defconfig working by the time the DT conversion is
complete, but I'm currently giving DT conversion higher priority.  So,
if anyone wants to take a crack at solving it, please do.  Otherwise, I
plan on taking a look at it after the driver bindings are done.

thx,

Jason.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Kernel 3.4 on Dreamplug: no serial console
  2012-06-03 18:40       ` Jason Cooper
@ 2012-06-03 19:09         ` Andrew Lunn
  2012-06-04  8:29         ` Florian Fainelli
  1 sibling, 0 replies; 10+ messages in thread
From: Andrew Lunn @ 2012-06-03 19:09 UTC (permalink / raw)
  To: linux-arm-kernel

> The problem involves CONFIG_ARM_PATCH_PHYS_VIRT and causes the system
> not to boot.  I'm not sure if this is dreamplug specific, kirkwood, or
> all orion.  I've only heard reports regarding dreamplug, but that
> doesn't mean it's limited to that board.

It seems to be kirkwood. Orion5x does not have the problem.

   Andrew

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Kernel 3.4 on Dreamplug: no serial console
  2012-06-03 18:40       ` Jason Cooper
  2012-06-03 19:09         ` Andrew Lunn
@ 2012-06-04  8:29         ` Florian Fainelli
  2012-06-04 14:30           ` Arnd Bergmann
  1 sibling, 1 reply; 10+ messages in thread
From: Florian Fainelli @ 2012-06-04  8:29 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Sunday 03 June 2012 14:40:49 Jason Cooper wrote:
> On Sun, Jun 03, 2012 at 05:12:18PM +0000, Arnd Bergmann wrote:
> > I'd also accept a patch to make ARCH_KIRKWOOD_DT select OF_SERIAL if 
people
> > prefer that, but I think just changing the defconfig is better.
> 
> I'd prefer the defconfig as there are situations where users/oems deploy
> a kernel without support for serial console.  In order to do that with
> your patch, or similar approaches, they would have to change the code.
> With defconfig, they don't.

Should not you rather select OF_SERIAL and add a status propery to the uart 
node in device tree, so that it is up to dtb provider to determine whether 
this device node should be enabled or not? You would avoid all kind of 
defconfig issue.

> 
> FYI: there is a running problem with kirkwood_defconfig that I haven't
> had time to look into.  I've been doing 'make oldconfig' and thus never
> encountered the problem.
> 
> The problem involves CONFIG_ARM_PATCH_PHYS_VIRT and causes the system
> not to boot.  I'm not sure if this is dreamplug specific, kirkwood, or
> all orion.  I've only heard reports regarding dreamplug, but that
> doesn't mean it's limited to that board.
> 
> I'd like to have the defconfig working by the time the DT conversion is
> complete, but I'm currently giving DT conversion higher priority.  So,
> if anyone wants to take a crack at solving it, please do.  Otherwise, I
> plan on taking a look at it after the driver bindings are done.
> 
> thx,
> 
> Jason.
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Kernel 3.4 on Dreamplug: no serial console
  2012-06-04  8:29         ` Florian Fainelli
@ 2012-06-04 14:30           ` Arnd Bergmann
  0 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2012-06-04 14:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Monday 04 June 2012, Florian Fainelli wrote:
> On Sunday 03 June 2012 14:40:49 Jason Cooper wrote:
> > On Sun, Jun 03, 2012 at 05:12:18PM +0000, Arnd Bergmann wrote:
> > > I'd also accept a patch to make ARCH_KIRKWOOD_DT select OF_SERIAL if 
> people
> > > prefer that, but I think just changing the defconfig is better.
> > 
> > I'd prefer the defconfig as there are situations where users/oems deploy
> > a kernel without support for serial console.  In order to do that with
> > your patch, or similar approaches, they would have to change the code.
> > With defconfig, they don't.
> 
> Should not you rather select OF_SERIAL and add a status propery to the uart 
> node in device tree, so that it is up to dtb provider to determine whether 
> this device node should be enabled or not? You would avoid all kind of 
> defconfig issue.

Obviously the configuration comes from DT, but there are still reasons to
not select the driver. E.g. you might want to build a kernel that runs on
a wide variety of systems and has all drivers as loadable modules rather than
built-in. There are also some systems that are rather memory constraint and
even disable printk support, so the console becomes useless too.

	Arnd

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-06-04 14:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-02 12:20 Kernel 3.4 on Dreamplug: no serial console Hans Kröner
2012-06-02 15:18 ` Adam Baker
2012-06-03 15:26 ` Hans Kröner
2012-06-03 16:59   ` Adam Baker
2012-06-03 17:12     ` Arnd Bergmann
2012-06-03 18:40       ` Jason Cooper
2012-06-03 19:09         ` Andrew Lunn
2012-06-04  8:29         ` Florian Fainelli
2012-06-04 14:30           ` Arnd Bergmann
  -- strict thread matches above, loose matches on Subject: below --
2012-06-02 18:57 Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).