Busybox in initrd.img

78 views
Skip to first unread message

Jacob Jacobson

unread,
Oct 13, 2017, 12:40:59 PM10/13/17
to Android-x86
Android-x86 uses the busybox binary in bootable/newinstaller/initrd/bin.

[bin$:560] file busybox 
busybox: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, 
for GNU/Linux 2.6.32, BuildID[sha1]=e55294e6b6d3803785074e58bd39965d3fddf3b8, stripped

Could someone tell me how this was created? From which sources? Which toolchain?

The "busybox" created by the sources in external is completely different.

Chih-Wei Huang

unread,
Oct 14, 2017, 11:40:41 PM10/14/17
to Android-x86
2017-10-14 0:40 GMT+08:00 Jacob Jacobson <akbi...@gmail.com>:
> Android-x86 uses the busybox binary in bootable/newinstaller/initrd/bin.
>
> [bin$:560] file busybox
> busybox: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
> dynamically linked, interpreter /lib/ld-linux.so.2,
> for GNU/Linux 2.6.32,
> BuildID[sha1]=e55294e6b6d3803785074e58bd39965d3fddf3b8, stripped
>
> Could someone tell me how this was created? From which sources? Which
> toolchain?

It's probably from an old Fedora or Ubuntu package.
But I don't remember exactly.

> The "busybox" created by the sources in external is completely different.

The busybox built from source is used after
switch_root to android.
The prebuilt busybox is only used in initrd.img.
There is a plan to replace it by the busybox built
from source. But it's a low priority task.


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Jacob Jacobson

unread,
Oct 16, 2017, 7:39:27 AM10/16/17
to Android-x86
Thanks. I've tried recreating the busybox in the initrd.img but have not been successful. I don't know which
toolchain might have been used. Tried a few but kept running into compiler/linker errors. After I got past all
those and created a binary that matched the specs displayed by file below, the resulting busybox just fails
to load. Even the required libs are whats in the initrd image. Still.

I would certainly like to pursue this if you have any ideas where to start.

Jacob Jacobson

unread,
Oct 16, 2017, 7:48:39 AM10/16/17
to Android-x86
This is the busybox I could create which fails to load.

[busybox-1.25.0$:566] file busybox
busybox: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=d82266627e54c532273a1977ce9b5dd0a31829d4, stripped
[busybox-1.25.0$:567] objdump -p busybox | grep NEED
  NEEDED               libm.so.6
  NEEDED               libc.so.6
  VERNEED              0x0804a318
  VERNEEDNUM           0x00000002
[busybox-1.25.0$:568] 


On Friday, October 13, 2017 at 12:40:59 PM UTC-4, Jacob Jacobson wrote:
Reply all
Reply to author
Forward
0 new messages