Notes |
(0000239)
andersen
06-09-05 03:08
|
I note that udev.mk is trying to run mkdev. This is bad, because
mkdev requires root, and buildroot should never be run as root,
lest a typo might result in nuking something in your build system.
It would be far better to fix the buildroot tar target to use fakeroot
rather than kluding in calls to mkdev and running as root. A version
of busybox mkdevs that uses the device tables used for cramfs, jffs2,
and ext2 targets could make generating needed device nodes with fakeroot
a pretty simple task. The busybox makedevs + busybox/patches/makdevs_table.diff
would do the trick...
Anyway, for now I've nuked the mkdev calls. |
| |
(0000241)
db
06-09-05 13:03
|
Hmm, I see this patch has been partially integrated; thanks. The
result is still an un-bootable system however:
- The resulting root fs images -- the raw build_*/root image as
well as the root_fs_*.tar image -- aren't bootable because of
the missing device nodes. OK, you've explained why you don't
like that, but the result is still an un-bootable image.
- You changed when the UDEV init script is run, so that it's too
late. It's got to run _before_ the "mount -a", since it's
providing a whole new /dev/ file system. This matters for
things like accessing the /dev/pts files so "ssh" works, as
well as (on systems that care) /dev/shm.
I've got a patch fixing these two, which I'll add here after I've
had time to test this with the other stuff I've got in the works.
(No, I can't use jffs2 or cramfs images. The development cycle
starts with NFS root, and jffs2 comes later. Also, that busybox
makdevs_table.diff won't solve the problem, since the resulting
filesystem doesn't boot far enough to run busybox ... it's missing
the console, so Linux chokes, as well as two files needed by the
C runtime.) |
| |
(0000243)
db
06-14-05 22:38
|
Here's the patch I'm using on top of current SVN. |
| |
(0000255)
andersen
06-24-05 00:39
|
The result is still an un-bootable system however since you did not read my suggestion about using fakeroot and possibly makedevs. :-)
Your br2-udev-v2.patch is not acceptible since it relies on using 'mknod', which requires that buildroot be run as root. If you run buildroot as root then the next time someone (me, you, anyone) makes a small typo, your entire build system could be completely destroyed. I don't want that on my conscience, and you certainly don't want that to happen the night before you have to ship a product or are about to demo your last 6 months of work to a client.....
Please come up with a different solution. I recommend taking a look at
target/tar/tarroot.mk and/or target/squashfs/squashfsroot.mk for acceptible methods of creating device nodes for the target. |
| |
(0000391)
pnoffke
08-07-05 22:00
edited on: 08-08-05 02:18
|
I think a way to fix this is as follows:
If udev is selected for the target, use a different device table.
I've modified target/generic/Makefile.in, and created a udev device table in target/generic/udev_table.txt. I also modified my inittab, init.d/rcS, and package/udev/init-udev (i.e. S10udev). Now, rcS is the first thing run, which mounts /proc and /sys without updating mtab, followed by remounting the root filesystem in read-write mode and updating the mtab. Finally, the init scripts are run, with udev being the first (assuming there's no script less than S10) if it's used. Also, the S10udev script was changed to correctly parse the output of /proc/mounts when looking for /sys.
I'm not sure if I'm doing things in the correct order, so please have a quick read of the inittab and scripts and let me know if there's anything horribly wrong.
I am not yet able to use svn (for doing a diff and producing patches) from behind my company's firewall, so I will just upload the modified/new files.
For naming clarity, it might be better to rename the device_table.txt file to devfs_table.txt, and update Makefile.in accordingly.
|
| |
(0000406)
pnoffke
08-11-05 16:42
|
I should have mentioned that the devices are created only when building a tar/ext2/jffs2/... image of your root filesystem. It relies on fakeroot/makedevs to create the devices. It's also in keeping with allowing buildroot to be run as a non-root user. |
| |
(0001847)
bernhardf
12-01-06 09:57
|
hmz. Thanks for the patches, but udev was added a long time ago.
It was updated to udev-100 in r16746.
Thanks alot for the patches and the report anyway. Cheers, |
| |