kernel commandline in 3.6

488 views
Skip to first unread message

Grant

unread,
Oct 7, 2012, 2:31:11 PM10/7/12
to beagl...@googlegroups.com
I've been using 3.1 on Gentoo and I'm trying to move to 3.6 but the
Beaglebone hangs at "Starting kernel" and won't return a ping. I've
been trying to solve this for days. I noticed CONFIG_CMDLINE isn't
specified in configs/beaglebone (3.6) like it is with
am335x_evm_defconfig (3.1). I tried filling it out and I tried
changing uEnv.txt like this but it still hangs:

bootargs=console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext3
rootwait ip=none
boot

Where is the kernel commandline supposed to come from in 3.6?

The following is from README.md and I didn't use the third command for 3.1:

cd kernel
make uImage
make uImage-dtb.am335x-bone

Do I need to do anything afterward other than copying
arch/arm/boot/uImage to /boot?

I'll try anything at this point. Can anyone offer any advice?

- Grant

Grant

unread,
Oct 7, 2012, 2:41:21 PM10/7/12
to beagl...@googlegroups.com
I forgot to mention that the following says:

"Use the ramdisk image to boot kernel, since we do not have support
for any storage devices in the mainline."

http://www.mail-archive.com/linux...@vger.kernel.org/msg71439.html

That was in June. Is it currently not possible to boot 3.6 from an SD card?

- Grant

Michael J. Hammel

unread,
Oct 7, 2012, 4:46:33 PM10/7/12
to beagl...@googlegroups.com
On Sun, 2012-10-07 at 11:31 -0700, Grant wrote:
> I've been using 3.1 on Gentoo and I'm trying to move to 3.6 but the
> Beaglebone hangs at "Starting kernel" and won't return a ping. I've
> been trying to solve this for days. I noticed CONFIG_CMDLINE isn't
> specified in configs/beaglebone (3.6) like it is with
> am335x_evm_defconfig (3.1). I tried filling it out and I tried
> changing uEnv.txt like this but it still hangs:
>
> bootargs=console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext3
> rootwait ip=none
> boot
>
> Where is the kernel commandline supposed to come from in 3.6?

The kernel command line comes from the same place in both kernels, more
than likely (I haven't used 3.6 yet but I haven't heard of any changes
coming in the area).

If the output on the serial console says "Starting kernel" but you do
not see the next line:

Uncompressing Linux... done, booting the kernel.

then either the bootloader couldn't find the kernel or it couldn't be
uncompressed and/or copied into memory to run. None of the arguments
you specified in the bootargs should affect this. You're problem is
more likely the setup on your SD card.

> The following is from README.md and I didn't use the third command for 3.1:
>
> cd kernel
> make uImage
> make uImage-dtb.am335x-bone

Not sure if a dtb is needed for ARM devices. The BeagleBoard doesn't
use one. But I don't have a BeagleBone. I've only used DTB's on
PowerPC's.

> Do I need to do anything afterward other than copying
> arch/arm/boot/uImage to /boot?

The bootloader probably can't find /boot. For BeagleBoard's the first
partition on the SD card is a FAT partition and is where you store the
kernel image. I haven't used the BeagleBone yet so maybe this changed
with that board. You should probably check the BeagleBone pages on
elinux.org for clarification.

Hope this helps a little.

--
Michael J. Hammel <mjha...@graphics-muse.org>

Robert Nelson

unread,
Oct 7, 2012, 5:17:24 PM10/7/12
to beagl...@googlegroups.com
For the Bone, DTB's are the only option for mainline.. Board file
based arm devices are not allowed by the arm maintainers going
forward..

>
>> Do I need to do anything afterward other than copying
>> arch/arm/boot/uImage to /boot?
>
> The bootloader probably can't find /boot. For BeagleBoard's the first
> partition on the SD card is a FAT partition and is where you store the
> kernel image. I haven't used the BeagleBone yet so maybe this changed
> with that board. You should probably check the BeagleBone pages on
> elinux.org for clarification.
>
> Hope this helps a little.
>
> --
> Michael J. Hammel <mjha...@graphics-muse.org>
>
> --
>
>



--
Robert Nelson
http://www.rcn-ee.com/

Grant

unread,
Oct 8, 2012, 3:48:05 AM10/8/12
to beagl...@googlegroups.com
>> Where is the kernel commandline supposed to come from in 3.6?
>
> The kernel command line comes from the same place in both kernels, more
> than likely (I haven't used 3.6 yet but I haven't heard of any changes
> coming in the area).

I've successfully booted 3.6 (more info below) and I have:

# cat /proc/cmdline
console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait ip=none
#

But that commandline is not specified in my kernel .config or
uEnv.txt. How does it know?

>> The following is from README.md and I didn't use the third command for 3.1:
>>
>> cd kernel
>> make uImage
>> make uImage-dtb.am335x-bone
>
> Not sure if a dtb is needed for ARM devices. The BeagleBoard doesn't
> use one. But I don't have a BeagleBone. I've only used DTB's on
> PowerPC's.

It was the DTB. I didn't realize I needed to copy it to /boot/uImage.
The following sequence of commands works great and 3.6 boots:

cd kernel
make uImage
make uImage-dtb.am335x-bone
cp arch/arm/boot/uImage-dtb.am335x-bone /boot/uImage

Thank you,
Grant

Koen Kooi

unread,
Oct 8, 2012, 9:22:57 AM10/8/12
to beagl...@googlegroups.com
What does the README in the kernel.git repo say?

Andrew Bradford

unread,
Oct 8, 2012, 12:25:41 PM10/8/12
to beagl...@googlegroups.com, email...@gmail.com
On Mon, 8 Oct 2012 00:48:05 -0700
Grant <email...@gmail.com> wrote:

> >> Where is the kernel commandline supposed to come from in 3.6?
> >
> > The kernel command line comes from the same place in both kernels,
> > more than likely (I haven't used 3.6 yet but I haven't heard of any
> > changes coming in the area).
>
> I've successfully booted 3.6 (more info below) and I have:
>
> # cat /proc/cmdline
> console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext3
> rootwait ip=none #
>
> But that commandline is not specified in my kernel .config or
> uEnv.txt. How does it know?

What did u-boot hand to the kernel when it started it?

Assuming you're running the evil vendor u-boot (although mainline does
basically the same thing), does this [1] huge swath of ENV settings shed
any light on how you got a 'console=' like that?

[1]:http://arago-project.org/git/projects/?p=u-boot-am33x.git;a=blob;f=include/configs/am335x_evm.h;h=3ae23b2dcc5fbc8f7d99f0a62ab38e868a1da0c6;hb=HEAD

Grant

unread,
Oct 8, 2012, 12:50:35 PM10/8/12
to beagl...@googlegroups.com
>> "Use the ramdisk image to boot kernel, since we do not have support
>> for any storage devices in the mainline."
>>
>> http://www.mail-archive.com/linux...@vger.kernel.org/msg71439.html
>>
>> That was in June. Is it currently not possible to boot 3.6 from an SD card?
>
> What does the README in the kernel.git repo say?

The README does indicate that booting from SD card works in 3.6. I
apologize for appending the above question to my original post. It
was late and I was at the tail end of a 3-day 'Bone battle (which I
won this morning thanks to Michael's and Robert's comments overnight).

- Grant

Grant

unread,
Oct 8, 2012, 1:09:15 PM10/8/12
to beagl...@googlegroups.com
>> >> Where is the kernel commandline supposed to come from in 3.6?
>> >
>> > The kernel command line comes from the same place in both kernels,
>> > more than likely (I haven't used 3.6 yet but I haven't heard of any
>> > changes coming in the area).
>>
>> I've successfully booted 3.6 (more info below) and I have:
>>
>> # cat /proc/cmdline
>> console=ttyO0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext3
>> rootwait ip=none #
>>
>> But that commandline is not specified in my kernel .config or
>> uEnv.txt. How does it know?
>
> What did u-boot hand to the kernel when it started it?
>
> Assuming you're running the evil vendor u-boot (although mainline does
> basically the same thing), does this [1] huge swath of ENV settings shed
> any light on how you got a 'console=' like that?
>
> [1]:http://arago-project.org/git/projects/?p=u-boot-am33x.git;a=blob;f=include/configs/am335x_evm.h;h=3ae23b2dcc5fbc8f7d99f0a62ab38e868a1da0c6;hb=HEAD

OK, so running 'make am335x_evm_config' builds the kernel command line
parameters into u-boot. I have the vendor u-boot working that way,
but I'm trying to switch to mainline and I get the following which I
think indicates the kernel command line parameters are missing even
though I did run 'make am335x_evm_config':

Loaded environment from uEnv.txt
Importing environment from mmc ...
Loading file "/boot/uImage" from mmc device 0:2
** File not found /boot/uImage
ext2load - load binary file from a Ext2 filesystem

Do I need to stick to the vendor u-boot if I want to boot the Beaglebone?

- Grant

Andrew Bradford

unread,
Oct 8, 2012, 1:14:39 PM10/8/12
to beagl...@googlegroups.com, email...@gmail.com
u-boot is trying to load a file called uImage from the /boot directory
on the second partition of mmc device 0 (as u-boot numbers them, not as
Linux does) formatted as ext2/3/4. u-boot isn't finding this file.

Have you tried putting your uImage there?

This may (sorry, I don't remember how evil vendor did it) be different
than the way the evil vendor u-boot wanted to find the uImage. Since
ext4 is now supported in u-boot, it's much much nicer to do it this way
than to have the kernel in the FAT partition.

> Do I need to stick to the vendor u-boot if I want to boot the
> Beaglebone?

No. I boot my bones with mainline. Evil vendors are evil :)

-Andrew

Grant

unread,
Oct 8, 2012, 1:32:41 PM10/8/12
to beagl...@googlegroups.com
>> OK, so running 'make am335x_evm_config' builds the kernel command line
>> parameters into u-boot. I have the vendor u-boot working that way,
>> but I'm trying to switch to mainline and I get the following which I
>> think indicates the kernel command line parameters are missing even
>> though I did run 'make am335x_evm_config':
>>
>> Loaded environment from uEnv.txt
>> Importing environment from mmc ...
>> Loading file "/boot/uImage" from mmc device 0:2
>> ** File not found /boot/uImage
>> ext2load - load binary file from a Ext2 filesystem
>
> u-boot is trying to load a file called uImage from the /boot directory
> on the second partition of mmc device 0 (as u-boot numbers them, not as
> Linux does) formatted as ext2/3/4. u-boot isn't finding this file.
>
> Have you tried putting your uImage there?

The problem with that is the first partition (VFAT) is mounted to
/boot which I like because it's the Gentoo way. Is there a way to
tell u-boot where to find uImage? I tried using bootargs in uEnv.txt
with no luck.

- Grant

Andrew Bradford

unread,
Oct 8, 2012, 1:43:40 PM10/8/12
to beagl...@googlegroups.com, email...@gmail.com
Override the 'bootfile' var in your uEnv.txt (easy way), or change
it in include/configs/am335x_evm.h in u-boot then recompile.

-Andrew

Grant

unread,
Oct 9, 2012, 2:29:32 AM10/9/12
to beagl...@googlegroups.com
That worked perfectly, thank you Andrew. I'm on mainline u-boot and
3.6 and all is well.

- Grant
Reply all
Reply to author
Forward
0 new messages