| Summary: | Fakeroot and the target/generic/device_table.txt create bad device nodes. | ||
|---|---|---|---|
| Product: | buildroot | Reporter: | Andy Kennedy <andy.kennedy> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | andy.kennedy, buildroot |
| Priority: | P5 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
|
Description
Andy Kennedy
2010-05-13 20:53:15 UTC
I just made a test with the default target/generic/device_table.txt and the result for hd* is good : fs/dev$ ls -l hd* brw-r----- 1 root root 3, 0 2010-05-21 23:31 hda brw-r----- 1 root root 3, 1 2010-05-21 23:31 hda1 brw-r----- 1 root root 3, 10 2010-05-21 23:31 hda10 brw-r----- 1 root root 3, 11 2010-05-21 23:31 hda11 brw-r----- 1 root root 3, 12 2010-05-21 23:31 hda12 brw-r----- 1 root root 3, 13 2010-05-21 23:31 hda13 brw-r----- 1 root root 3, 14 2010-05-21 23:31 hda14 brw-r----- 1 root root 3, 2 2010-05-21 23:31 hda2 brw-r----- 1 root root 3, 3 2010-05-21 23:31 hda3 brw-r----- 1 root root 3, 4 2010-05-21 23:31 hda4 brw-r----- 1 root root 3, 5 2010-05-21 23:31 hda5 brw-r----- 1 root root 3, 6 2010-05-21 23:31 hda6 brw-r----- 1 root root 3, 7 2010-05-21 23:31 hda7 brw-r----- 1 root root 3, 8 2010-05-21 23:31 hda8 brw-r----- 1 root root 3, 9 2010-05-21 23:31 hda9 brw-r----- 1 root root 3, 64 2010-05-21 23:31 hdb brw-r----- 1 root root 3, 65 2010-05-21 23:31 hdb1 brw-r----- 1 root root 3, 74 2010-05-21 23:31 hdb10 brw-r----- 1 root root 3, 75 2010-05-21 23:31 hdb11 brw-r----- 1 root root 3, 76 2010-05-21 23:31 hdb12 brw-r----- 1 root root 3, 77 2010-05-21 23:31 hdb13 brw-r----- 1 root root 3, 78 2010-05-21 23:31 hdb14 brw-r----- 1 root root 3, 66 2010-05-21 23:31 hdb2 brw-r----- 1 root root 3, 67 2010-05-21 23:31 hdb3 brw-r----- 1 root root 3, 68 2010-05-21 23:31 hdb4 brw-r----- 1 root root 3, 69 2010-05-21 23:31 hdb5 brw-r----- 1 root root 3, 70 2010-05-21 23:31 hdb6 brw-r----- 1 root root 3, 71 2010-05-21 23:31 hdb7 brw-r----- 1 root root 3, 72 2010-05-21 23:31 hdb8 brw-r----- 1 root root 3, 73 2010-05-21 23:31 hdb9 In the device list you pasted, the minor numbers are incorrect. hda should be 3:0, hda1 should be 3:1, hda2 3:2, hdb should be 3:64, hdb1 3:65, hdb2 3:66. hdc is 22:0, hdc1 is 22:1, etc. See Documentation/devices.txt in the Linux kernel source tree for the official reference. So I don't see what's wrong in Buildroot. Could explain in more details what is the problem for you ? Thanks! (In reply to comment #1) I attempted to e-mail this, but it looks like it didn't go through. . . so if this is a dup, please forgive. > --- Comment #1 from Thomas Petazzoni > <thomas.petazzoni@free-electrons.com> --- > I just made a test with the default > target/generic/device_table.txt and the > result for hd* is good : Sorry, I thought I had articulated correctly. To restate: this problem ONLY occurs with the building of a jffs2 filesystem. When I 'make tarroot' I get a device tree with correctly populated device nodes. Only when I 'make jffs2root' do I get funky minor numbers. > In the device list you pasted, the minor numbers are > incorrect. hda should be > 3:0, hda1 should be 3:1, hda2 3:2, hdb should be 3:64, hdb1 > 3:65, hdb2 3:66. > hdc is 22:0, hdc1 is 22:1, etc. See Documentation/devices.txt > in the Linux > kernel source tree for the official reference. > Yes, this was the reason for the bug report. These devices are being made incorrectly. More information, however, is that if I make the nodes myself in the <path to target>/dev directory, modify buildroot/target/generic/device_table.txt to EXCLUDE hd{a-c} and sd{a-c} then I get the devices correctly in the filesystem. Which makes me wonder if fakeroot is the red herring and the real culprit is actually makedevs. Hopefully I have cleared something up for you. Andy Ok, bug reproduced and understood. I've just sent a patch to the Buildroot list that fixes it: http://lists.busybox.net/pipermail/buildroot/2010-June/035015.html Thanks for your report! |