All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Built a file system, have a working kernel - how to login ?
@ 2012-11-17  8:22 Juha Lumme
  2012-11-17 10:11 ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Juha Lumme @ 2012-11-17  8:22 UTC (permalink / raw)
  To: buildroot

Hi,

I'm new to buildroot, and actually also to creating linux systems. I really
need help understanding some basics of how a system bring up should happen..
I have been working on a custom system of mine, running currently on a
reference HW from Olimex.

I have built a working kernel, and now I created a file system with
buildroot with all the settings default. Well, I did change the default
console to ttyAMA0, as that is passed to the kernel by the loader.

Now, the system boots up to the mounting filesystem, and then just hangs
there:
.....
[    3.130000] VFS: Mounted root (ext3 filesystem) on device 179:2.
[    3.140000] Freeing init memory: 144K
Starting logging: OK
Starting network...
ip: RTNETLINK answers: Operation not permitted
ip: SIOCSIFFLAGS: Permission denied

(The whole boot log is here: http://paste.ubuntu.com/1364407/ )

Can someone please educate me a bit what are the steps needed to get a
login prompt, and to be able to access the system ? I don't really
understand how the TTY links in /dev/ work, and how I need to tie them to
the kernel configuration..

My understanding is that inittab is the file I should modify.. Contents of
that is:
# Startup the system
null::sysinit:/bin/mount -t proc proc /proc
null::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW
null::sysinit:/bin/mkdir -p /dev/pts
null::sysinit:/bin/mkdir -p /dev/shm
null::sysinit:/bin/mount -a
null::sysinit:/bin/hostname -F /etc/hostname
# now run any rc scripts
::sysinit:/etc/init.d/rcS

# Put a getty on the sttyAMA0::respawn:/sbin/getty -L ttyAMA0 115200 vt100
# GENERIC_SERIAL

# Stuff to do for the 3-finger salute
::ctrlaltdel:/sbin/reboot

# Stuff to do before rebooting
null::shutdown:/etc/init.d/rcK
null::shutdown:/bin/umount -a -r
null::shutdown:/sbin/swapoff -a

Thank you for any advice or tips in advance!
Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20121117/3187a9ec/attachment.html>

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

* [Buildroot] Built a file system, have a working kernel - how to login ?
  2012-11-17  8:22 [Buildroot] Built a file system, have a working kernel - how to login ? Juha Lumme
@ 2012-11-17 10:11 ` Thomas Petazzoni
  2012-11-17 11:07   ` Juha Lumme
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2012-11-17 10:11 UTC (permalink / raw)
  To: buildroot

Dear Juha Lumme,

On Sat, 17 Nov 2012 17:22:27 +0900, Juha Lumme wrote:

> I'm new to buildroot, and actually also to creating linux systems. I really
> need help understanding some basics of how a system bring up should happen..
> I have been working on a custom system of mine, running currently on a
> reference HW from Olimex.
> 
> I have built a working kernel, and now I created a file system with
> buildroot with all the settings default. Well, I did change the default
> console to ttyAMA0, as that is passed to the kernel by the loader.

Which /dev management method did you choose in the Buildroot
configuration?

> Now, the system boots up to the mounting filesystem, and then just hangs
> there:
> .....
> [    3.130000] VFS: Mounted root (ext3 filesystem) on device 179:2.
> [    3.140000] Freeing init memory: 144K
> Starting logging: OK
> Starting network...
> ip: RTNETLINK answers: Operation not permitted
> ip: SIOCSIFFLAGS: Permission denied
> 
> (The whole boot log is here: http://paste.ubuntu.com/1364407/ )
> 
> Can someone please educate me a bit what are the steps needed to get a
> login prompt, and to be able to access the system ? I don't really
> understand how the TTY links in /dev/ work, and how I need to tie them to
> the kernel configuration..
> 
> My understanding is that inittab is the file I should modify.. Contents of
> that is:

No, you shouldn't have to modify the inittab file.

> # Startup the system
> null::sysinit:/bin/mount -t proc proc /proc
> null::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW
> null::sysinit:/bin/mkdir -p /dev/pts
> null::sysinit:/bin/mkdir -p /dev/shm
> null::sysinit:/bin/mount -a
> null::sysinit:/bin/hostname -F /etc/hostname
> # now run any rc scripts
> ::sysinit:/etc/init.d/rcS
> 
> # Put a getty on the sttyAMA0::respawn:/sbin/getty -L ttyAMA0 115200 vt100
> # GENERIC_SERIAL

If your inittab really looks like this, then there is no way it can
work: the line starting getty is commented out.

So:

 *) Do not modify the inittab

 *) Tell us what hardware you're using exactly, becausing depending on
    the hardware, the ttyXYZn to use is different.

 *) Tell us which /dev management style you've chosen. If you chose
    devtmpfs or mdev or udev, then make sure your kernel has
    CONFIG_DEVTMPFS + CONFIG_DEVTMPFS_MOUNT (Buildroot ensures that your
    kernel is built with those options if Buildroot is responsible for
    building your kernel, but if you build your kernel outside of
    Buildroot, it's your job).

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] Built a file system, have a working kernel - how to login ?
  2012-11-17 10:11 ` Thomas Petazzoni
@ 2012-11-17 11:07   ` Juha Lumme
  2012-11-17 11:35     ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Juha Lumme @ 2012-11-17 11:07 UTC (permalink / raw)
  To: buildroot

Hi Tomas,

First, thanks for your reply, I really appreciate it!

My reference is Olinuxino maxi, made by Olimex. It's running Freescales
i.mx233.

Regarding the inittab and getty configuuration; Actually, that is a copy
paste error for some reason there is a hash in there. In the inittab, that
line is not commented out.

I didn't compile kernel with buildroot, since kernel requires couple
patches, and also the sources are downloaded from freescale, not kernel.org(
https://github.com/koliqi/imx23-olinuxino/blob/master/Building%20a%20kernel%20%20for%20the%20OLinuXino.md
 ).
I'm not that proficient with buildroot (or building kernels) that I know
how to enable buildroot to compile this "custom kernel".. Do you see this
making my life much more difficult if I compile kernel separately ?

I checked my kernel config, and it seems it has this flag enabled:
CONFIG_DEVTMPFS=y
However: # CONFIG_DEVTMPFS_MOUNT is not set

In buildroot, I didn't change the /dev management, so it's currently set as
"static using device table". I guess there is a mismatch now..


Thank you,
Juha


On Sat, Nov 17, 2012 at 7:11 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Dear Juha Lumme,
>
> On Sat, 17 Nov 2012 17:22:27 +0900, Juha Lumme wrote:
>
> > I'm new to buildroot, and actually also to creating linux systems. I
> really
> > need help understanding some basics of how a system bring up should
> happen..
> > I have been working on a custom system of mine, running currently on a
> > reference HW from Olimex.
> >
> > I have built a working kernel, and now I created a file system with
> > buildroot with all the settings default. Well, I did change the default
> > console to ttyAMA0, as that is passed to the kernel by the loader.
>
> Which /dev management method did you choose in the Buildroot
> configuration?
>
> > Now, the system boots up to the mounting filesystem, and then just hangs
> > there:
> > .....
> > [    3.130000] VFS: Mounted root (ext3 filesystem) on device 179:2.
> > [    3.140000] Freeing init memory: 144K
> > Starting logging: OK
> > Starting network...
> > ip: RTNETLINK answers: Operation not permitted
> > ip: SIOCSIFFLAGS: Permission denied
> >
> > (The whole boot log is here: http://paste.ubuntu.com/1364407/ )
> >
> > Can someone please educate me a bit what are the steps needed to get a
> > login prompt, and to be able to access the system ? I don't really
> > understand how the TTY links in /dev/ work, and how I need to tie them to
> > the kernel configuration..
> >
> > My understanding is that inittab is the file I should modify.. Contents
> of
> > that is:
>
> No, you shouldn't have to modify the inittab file.
>
> > # Startup the system
> > null::sysinit:/bin/mount -t proc proc /proc
> > null::sysinit:/bin/mount -o remount,rw / # REMOUNT_ROOTFS_RW
> > null::sysinit:/bin/mkdir -p /dev/pts
> > null::sysinit:/bin/mkdir -p /dev/shm
> > null::sysinit:/bin/mount -a
> > null::sysinit:/bin/hostname -F /etc/hostname
> > # now run any rc scripts
> > ::sysinit:/etc/init.d/rcS
> >
> > # Put a getty on the sttyAMA0::respawn:/sbin/getty -L ttyAMA0 115200
> vt100
> > # GENERIC_SERIAL
>
> If your inittab really looks like this, then there is no way it can
> work: the line starting getty is commented out.
>
> So:
>
>  *) Do not modify the inittab
>
>  *) Tell us what hardware you're using exactly, becausing depending on
>     the hardware, the ttyXYZn to use is different.
>
>  *) Tell us which /dev management style you've chosen. If you chose
>     devtmpfs or mdev or udev, then make sure your kernel has
>     CONFIG_DEVTMPFS + CONFIG_DEVTMPFS_MOUNT (Buildroot ensures that your
>     kernel is built with those options if Buildroot is responsible for
>     building your kernel, but if you build your kernel outside of
>     Buildroot, it's your job).
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20121117/f434fdd0/attachment.html>

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

* [Buildroot] Built a file system, have a working kernel - how to login ?
  2012-11-17 11:07   ` Juha Lumme
@ 2012-11-17 11:35     ` Thomas Petazzoni
  2012-11-17 11:45       ` Juha Lumme
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2012-11-17 11:35 UTC (permalink / raw)
  To: buildroot

Dear Juha Lumme,

On Sat, 17 Nov 2012 20:07:28 +0900, Juha Lumme wrote:

> My reference is Olinuxino maxi, made by Olimex. It's running Freescales
> i.mx233.

Ok.

> Regarding the inittab and getty configuuration; Actually, that is a copy
> paste error for some reason there is a hash in there. In the inittab, that
> line is not commented out.

Ok.

> I didn't compile kernel with buildroot, since kernel requires couple
> patches, and also the sources are downloaded from freescale, not kernel.org(
> https://github.com/koliqi/imx23-olinuxino/blob/master/Building%20a%20kernel%20%20for%20the%20OLinuXino.md
>  ).

Ok. It is most likely possible to get this kernel built with Buildroot,
but let's compile it separately first and get it working this way.

> I'm not that proficient with buildroot (or building kernels) that I know
> how to enable buildroot to compile this "custom kernel".. Do you see this
> making my life much more difficult if I compile kernel separately ?

No.

> I checked my kernel config, and it seems it has this flag enabled:
> CONFIG_DEVTMPFS=y
> However: # CONFIG_DEVTMPFS_MOUNT is not set
> 
> In buildroot, I didn't change the /dev management, so it's currently set as
> "static using device table". I guess there is a mismatch now..

If you're using "static using device table", then CONFIG_DEVTMPFS=y is
not needed, but it's harmless to have it.

How do you install your root filesystem on the target?

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] Built a file system, have a working kernel - how to login ?
  2012-11-17 11:35     ` Thomas Petazzoni
@ 2012-11-17 11:45       ` Juha Lumme
  2012-11-17 12:07         ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Juha Lumme @ 2012-11-17 11:45 UTC (permalink / raw)
  To: buildroot

Hi Tomas,

The board boots from memory card currently, and I tarball the output/target
directory and then decompress to the second partition on the memory card.
This worked for a full 250MB debian file system, so I'm assuming it should
work here as well..?

Thanks,
Juha
On Nov 17, 2012 8:35 PM, "Thomas Petazzoni" <
thomas.petazzoni@free-electrons.com> wrote:

> Dear Juha Lumme,
>
> On Sat, 17 Nov 2012 20:07:28 +0900, Juha Lumme wrote:
>
> > My reference is Olinuxino maxi, made by Olimex. It's running Freescales
> > i.mx233.
>
> Ok.
>
> > Regarding the inittab and getty configuuration; Actually, that is a copy
> > paste error for some reason there is a hash in there. In the inittab,
> that
> > line is not commented out.
>
> Ok.
>
> > I didn't compile kernel with buildroot, since kernel requires couple
> > patches, and also the sources are downloaded from freescale, not
> kernel.org(
> >
> https://github.com/koliqi/imx23-olinuxino/blob/master/Building%20a%20kernel%20%20for%20the%20OLinuXino.md
> >  ).
>
> Ok. It is most likely possible to get this kernel built with Buildroot,
> but let's compile it separately first and get it working this way.
>
> > I'm not that proficient with buildroot (or building kernels) that I know
> > how to enable buildroot to compile this "custom kernel".. Do you see this
> > making my life much more difficult if I compile kernel separately ?
>
> No.
>
> > I checked my kernel config, and it seems it has this flag enabled:
> > CONFIG_DEVTMPFS=y
> > However: # CONFIG_DEVTMPFS_MOUNT is not set
> >
> > In buildroot, I didn't change the /dev management, so it's currently set
> as
> > "static using device table". I guess there is a mismatch now..
>
> If you're using "static using device table", then CONFIG_DEVTMPFS=y is
> not needed, but it's harmless to have it.
>
> How do you install your root filesystem on the target?
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20121117/d6144afc/attachment.html>

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

* [Buildroot] Built a file system, have a working kernel - how to login ?
  2012-11-17 11:45       ` Juha Lumme
@ 2012-11-17 12:07         ` Thomas Petazzoni
  2012-11-17 13:17           ` Shawn Goff
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2012-11-17 12:07 UTC (permalink / raw)
  To: buildroot

Dear Juha Lumme,

On Sat, 17 Nov 2012 20:45:09 +0900, Juha Lumme wrote:

> The board boots from memory card currently, and I tarball the output/target
> directory and then decompress to the second partition on the memory card.
> This worked for a full 250MB debian file system, so I'm assuming it should
> work here as well..?

Aaargggh, no!

From the Buildroot manual:

   target/ which contains almost the complete root filesystem for the
   target: everything needed is present except the device files
   in /dev/ (Buildroot can?t create them because Buildroot doesn?t run
   as root and doesn?t want to run as root). Therefore, this directory
   should not be used on your target.

Please enable a tarball root filesystem image, and then extract is as
root on the partition of your memory card.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] Built a file system, have a working kernel - how to login ?
  2012-11-17 12:07         ` Thomas Petazzoni
@ 2012-11-17 13:17           ` Shawn Goff
  2012-11-17 13:34             ` Juha Lumme
  0 siblings, 1 reply; 9+ messages in thread
From: Shawn Goff @ 2012-11-17 13:17 UTC (permalink / raw)
  To: buildroot

> Please enable a tarball root filesystem image, and then extract is as
> root on the partition of your memory card.
>

Since you said you're not yet familiar with Buildroot, I'll clarify
that. Thomas is refering to the Buildroot option
BR2_TARGET_ROOTFS_TAR. The resulting file is in output/images.

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

* [Buildroot] Built a file system, have a working kernel - how to login ?
  2012-11-17 13:17           ` Shawn Goff
@ 2012-11-17 13:34             ` Juha Lumme
  2012-11-18 20:11               ` Zoltan Gyarmati
  0 siblings, 1 reply; 9+ messages in thread
From: Juha Lumme @ 2012-11-17 13:34 UTC (permalink / raw)
  To: buildroot

Hi Tomas, Shawn,

That was the problem! Now I get properly to the login prompt up! Thank you
guys so much! :)
Sigh, as always, I should have read the manual more carefully..

By the way, I also opened a question about this at Stack Overflow earlier,
so if you want earn some reputation in that forum, I'll pick your answer.
I'll answer it myself tomorrow, if you guys don't want/care about that
stuff.
http://stackoverflow.com/questions/13429068/buildroot-built-a-file-system-how-to-login-boot-hangs

Once again, thank you for your time!
Juha


On Sat, Nov 17, 2012 at 10:17 PM, Shawn Goff <shawnjgoff@gmail.com> wrote:

> > Please enable a tarball root filesystem image, and then extract is as
> > root on the partition of your memory card.
> >
>
> Since you said you're not yet familiar with Buildroot, I'll clarify
> that. Thomas is refering to the Buildroot option
> BR2_TARGET_ROOTFS_TAR. The resulting file is in output/images.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20121117/1c748946/attachment.html>

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

* [Buildroot] Built a file system, have a working kernel - how to login ?
  2012-11-17 13:34             ` Juha Lumme
@ 2012-11-18 20:11               ` Zoltan Gyarmati
  0 siblings, 0 replies; 9+ messages in thread
From: Zoltan Gyarmati @ 2012-11-18 20:11 UTC (permalink / raw)
  To: buildroot

Hi Juha,

ironically i just started to add board support to Buildroot for this 
board, it's not totally ready yet, it still needs some cleanup, and i 
also had to add config option to the mxs-bootlets package to enable 
custom patches, so i can't really send a patchset yet to the mainstream, 
but i uploaded it to gitorious, if you still want to play around with it 
then you can get it here:

https://gitorious.org/buildroot-olinuxino/buildroot-olinuxino

to build a kernel and a base root filesystem, clone the repository, and 
just follow the readme.txt:

https://gitorious.org/buildroot-olinuxino/buildroot-olinuxino/blobs/master/board/olinuxino/olinuxino-maxi/readme.txt

Any feedback is welcome, as i still need to test this before i make a 
patchset :)
Otherwise it seems everything is working well with the built image, but 
i cannot test the composite video output as i don't have
any TV kind of stuff here...


-- 
br,
Zoltan Gyarmati
mail: mr.zoltan.gyarmati at gmail.com
freenode nick: zgyarmati

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

end of thread, other threads:[~2012-11-18 20:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-17  8:22 [Buildroot] Built a file system, have a working kernel - how to login ? Juha Lumme
2012-11-17 10:11 ` Thomas Petazzoni
2012-11-17 11:07   ` Juha Lumme
2012-11-17 11:35     ` Thomas Petazzoni
2012-11-17 11:45       ` Juha Lumme
2012-11-17 12:07         ` Thomas Petazzoni
2012-11-17 13:17           ` Shawn Goff
2012-11-17 13:34             ` Juha Lumme
2012-11-18 20:11               ` Zoltan Gyarmati

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.