Skip to contentSkip to conversation

New: Busybox flqsh commands conflict with those from mtd-utils

Buildroot bugzilla at busybox.net 1 participant 5 messages Feb 2, 2010 – Feb 3, 2010

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=1027

Summary: Busybox flqsh commands conflict with those from mtd-
utils
Product: buildroot
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
AssignedTo: unassigned at buildroot.uclibc.org
ReportedBy: buildroot at istwok.net
CC: buildroot at uclibc.org
Estimated Hours: 0.0

The new busybox-1.16.x.config enables some flash related commands that can conflict with the same commands in the mtd-utils package. If both are enabled, the busybox binary gets overwritten by the mtd-utils binary during the build.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#1 lore raw

[Buildroot] [Bug 1027] Busybox flqsh commands conflict with those from mtd-utils

https://bugs.busybox.net/show_bug.cgi?id=1027

Peter Korsgaard <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED

--- Comment #1 from Peter Korsgaard <[email protected]> 2010-02-02 20:06:18 UTC --- That is how we normally do it (E.G. let the big versions "win" if both are enabled). What would you suggest we do instead?

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#2 lore raw

[Buildroot] [Bug 1027] Busybox flqsh commands conflict with those from mtd-utils

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=1027

--- Comment #2 from David Engel <[email protected]> 2010-02-02 21:45:12 UTC --- (In reply to comment #1)

Quoted 2 lines

That is how we normally do it (E.G. let the big versions "win" if both are enabled). What would you suggest we do instead?

The bigger version winning is fine and to be expected. What surprised me and took me a couple of hours to figure out was that busybox itself and not just one of its symlinks was overwritten. More specifically, here is what I think happened in my case:

When busybox was built and installed, it was installed as /bin/busybox and many symlinks including /sbin/init and /usr/sbin/flashcp were installed pointing to /bin/busybox.

When mtd-utils was built and installed, flashcp was installed as /usr/sbin/flashcp, but because a symlink already existed for busybox, the symlink was followed and flashcp was actually installed as /bin/busybox overwriting the real busybox in the process

When I booted the resulting rootfs, the kernel executed /sbin/init which should have been busybox but was flashcp instead. flashcp then complained about bad command line arguments and exited cusing the kernel to panic because init exited.

I'm new to buildroot, so if this is how things are supposed to work, I'll learn to live with it. In an ideal world, the config system would prevent such overlaps in functionality. I realize the large number of busybox options makes that too tedious to be practical.

Perhaps a reasonable middle solution is to make sure the installation of other packages don't follow symlinks and clobber busybox. Alternately, perhaps the busybox installation can be deferred until after the other packages and its symlink creation changed to not clobber existing files.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#3 lore raw

[Buildroot] [Bug 1027] Busybox flqsh commands conflict with those from mtd-utils

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=1027

Peter Korsgaard <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Peter Korsgaard <[email protected]> 2010-02-03 16:25:53 UTC --- Ahh, ok - That's something completely else. I have updated the mtd-utils package in git to 1.3.1, and fixed the target install to use 'install', which doesn't follow symlinks.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#4 lore raw

[Buildroot] [Bug 1027] Busybox flqsh commands conflict with those from mtd-utils

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=1027

--- Comment #4 from David Engel <[email protected]> 2010-02-03 17:04:51 UTC --- Thanks. I should have been clearer about the seriousness of clobbering busybox the way it did.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.