From: bifferos <bifferos@yahoo.co.uk>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] bifferboard: new board
Date: Mon, 19 Mar 2012 12:36:39 +0000 [thread overview]
Message-ID: <4F672857.4050609@yahoo.co.uk> (raw)
In-Reply-To: <201203182240.17492.arnout@mind.be>
On 03/18/2012 09:40 PM, Arnout Vandecappelle wrote:
> On Sunday 18 March 2012 21:54:54 bifferos wrote:
>> What kernel command-line should this system be using?
> I would expect it should work with an empty command line.
That's what I thought. I was hoping there was some init= or initrd=
option that I might have got wrong.
It seems the file /init always gets executed from initramfs, and this is
not configured in the kernel command-line, so I presume it must be
hard-coded somewhere in the kernel. I tried removing this file and
re-making the cpio, but that didn't help.
When I add the 'misc' exe format to the kernel I simply get a boot log
ending with this:
TCP cubic registered
Warning: unable to open an initial console.
Freeing unused kernel memory: 520k freed
Write protecting the kernel text: 1052k
Write protecting the kernel read-only data: 160k
And stopping there. So no segfault, but it doesn't seem to be doing
anything.
So the next thing I tried was hard-coding /bin/sh as the program to
execute in main/init.c, passed into run_init_process(), and eventually
ending in fs/exec.c:
http://lxr.linux.no/#linux+v3.3/fs/exec.c#L1453
This function executes OK (retval ==0) according to the printk's I
scattered through it so now I'm really stuck.
So back to what actually does work.
The following fs layout *does* work:
drwxr-xr-x root/root 0 2012-03-19 12:24 ./
drwxr-xr-x root/root 0 2012-03-19 12:20 ./home/
drwxr-xr-x root/root 0 2012-03-19 12:20 ./config/
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./bin -> sbin
drwxr-xr-x root/root 0 2012-03-19 12:20 ./usr/
drwxr-xr-x root/root 0 2012-03-19 12:20 ./usr/bin/
drwxr-xr-x root/root 0 2012-03-19 12:20 ./usr/share/
drwxr-xr-x root/root 0 2012-03-19 12:20 ./usr/share/udhcpc/
drwxr-xr-x root/root 0 2012-03-19 12:20 ./usr/sbin/
drwxr-xr-x root/root 0 2012-03-19 12:20 ./var/
drwxr-xr-x root/root 0 2012-03-19 12:20 ./var/log/
drwxr-xr-x root/root 0 2012-03-19 12:20 ./var/run/
drwxr-xr-x root/root 0 2012-03-19 12:20 ./sys/
drwxr-xr-x root/root 0 2012-03-19 12:20 ./sbin/
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/ls -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/chgrp -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/killall -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/chown -> ./busybox
-rwxr-xr-x root/root 296664 2012-03-19 12:20 ./sbin/busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/arp -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/cttyhack -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/reboot -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/syslogd -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/halt -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/cp -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/lsmod -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/ifconfig -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/hostname -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/df -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/dmesg -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/login -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/umount -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/shutdown -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/mkdir -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/insmod -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/poweroff -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/ps -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/inetd -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/ping -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/hush -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/kill -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/telnetd -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/logger -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/logread -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/ln -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/init -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/chmod -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/wget -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/httpd -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/rm -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/mknod -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/mount -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/getty -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/stty -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/mdev -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/ftpd -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/sh -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/cat -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/rmdir -> ./busybox
lrwxrwxrwx root/root 0 2012-03-19 12:20 ./sbin/klogd -> ./busybox
drwxr-xr-x root/root 0 2012-03-19 12:20 ./proc/
drwxr-xr-x root/root 0 2012-03-19 12:20 ./etc/
-rw-r--r-- root/root 95 2012-03-19 12:20 ./etc/inittab
-rwxr-xr-x root/root 285 2012-03-19 12:20 ./etc/rc-kexec
-rw-r--r-- root/root 463 2012-03-19 12:20 ./etc/passwd
drwxr-xr-x root/root 0 2012-03-19 12:20 ./etc/init.d/
-rwxr-xr-x root/root 584 2012-03-19 12:20 ./etc/init.d/rcS
-rw-r--r-- root/root 218 2012-03-19 12:20 ./etc/group
-rw-r--r-- root/root 20 2012-03-19 12:20 ./etc/hosts
-rwxr-xr-x root/root 559 2012-03-19 12:20 ./etc/rc
-rw-r--r-- root/root 185 2012-03-19 12:20 ./etc/mdev.conf
drwxr-xr-x root/root 0 2012-03-19 12:20 ./tmp/
drwxr-xr-x root/root 0 2012-03-19 12:20 ./dev/
-rw-r--r-- root/root 0 2012-03-19 12:20 ./dev/ttyS0
-rw-r--r-- root/root 0 2012-03-19 12:20 ./dev/console
-rw-r--r-- root/root 0 2012-03-19 12:20 ./dev/tty5
-rw-r--r-- root/root 0 2012-03-19 12:20 ./dev/tty0
-rw-r--r-- root/root 0 2012-03-19 12:20 ./dev/tty3
-rw-r--r-- root/root 0 2012-03-19 12:20 ./dev/ptmx
-rw-r--r-- root/root 0 2012-03-19 12:20 ./dev/sda1
-rw-r--r-- root/root 0 2012-03-19 12:20 ./dev/tty4
-rw-r--r-- root/root 0 2012-03-19 12:20 ./dev/tty1
-rw-r--r-- root/root 0 2012-03-19 12:20 ./dev/tty2
-rw-r--r-- root/root 0 2012-03-19 12:20 ./dev/null
Note: That's the same busybox binary copied from
buildroot/output/target/bin/busybox.
my inittab is:
::sysinit:/etc/init.d/rcS
::respawn:/bin/sh
::restart:/sbin/init
::shutdown:/bin/umount -a -r
my rcS is:
#!/bin/sh
echo "* Mounting /proc..."
mount -t proc /proc /proc
echo "* Mounting /sys..."
mount -t sysfs none /sys
echo "* Mounting /dev/pts..."
mkdir /dev/pts
mount -t devpts devpts /dev/pts
echo "* Mounting /dev/shm..."
mkdir /dev/shm
mount -t tmpfs none /dev/shm
echo "* Starting system loggers..."
syslogd
echo "* Creating devices..."
/sbin/mdev -s
echo "* Configuring loopback interface..."
ifconfig lo 127.0.0.1
echo "* Configuring networ..."
ifconfig eth0 192.168.1.12
echo "* Setting hostname..."
hostname bifferboard
echo "* Starting telnetd..."
telnetd -l /bin/sh
So when I have a solution that works, I'm a bit of an idiot to be
slogging away for days to get a solution the 'neat' way with buildroot.
I can still use buildroot to build busybox, just not the whole rootfs,
and I think I'll leave it at that unless you've anything else I can try.
cheers,
Biff.
next prev parent reply other threads:[~2012-03-19 12:36 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-01 0:52 [Buildroot] Kernel and buildroot in 1MB bifferos
2012-03-01 7:50 ` Thomas Petazzoni
2012-03-01 11:13 ` bifferos
2012-03-03 15:29 ` Arnout Vandecappelle
2012-03-03 15:35 ` [Buildroot] [PATCH] bifferboard: new board Arnout Vandecappelle
2012-03-05 9:49 ` Thomas Petazzoni
2012-03-06 7:00 ` Arnout Vandecappelle
2012-03-11 10:58 ` [Buildroot] [PATCH v2] " Arnout Vandecappelle
2012-03-12 14:46 ` bifferos
2012-03-12 1:23 ` [Buildroot] [PATCH] " bifferos
2012-03-16 1:58 ` [Buildroot] Debugging /sbin/init startup issues bifferos
2012-03-17 4:03 ` Charles Krinke
2012-03-17 14:10 ` bifferos
2012-03-18 13:50 ` [Buildroot] [PATCH] bifferboard: new board Arnout Vandecappelle
2012-03-18 16:12 ` bifferos
2012-03-18 17:13 ` Arnout Vandecappelle
2012-03-18 19:51 ` Alexandre Pereira da Silva
2012-03-18 20:54 ` bifferos
2012-03-18 21:40 ` Arnout Vandecappelle
2012-03-19 12:36 ` bifferos [this message]
[not found] ` <4F525794.5010406@yahoo.co.uk>
2012-03-03 17:00 ` [Buildroot] Kernel and buildroot in 1MB Arnout Vandecappelle
2012-03-01 12:18 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F672857.4050609@yahoo.co.uk \
--to=bifferos@yahoo.co.uk \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.