0

I am trying to build my root file system by referring to

http://emreboy.wordpress.com/2012/12/20/building-a-root-file-system-using-busybox/comment-page-1/

The change I did was (arm-linux-gnueabi- in place of arm-linux-)

$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-  defconfig

$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- menuconfig

$ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- install

It fails on this step(partial error log). Please advise

  CC      util-linux/volume_id/volume_id.o
  CC      util-linux/volume_id/xfs.o
  AR      util-linux/volume_id/lib.a
  LINK    busybox_unstripped
Trying libraries: crypt m
Failed: -Wl,--start-group -lcrypt -lm -Wl,--end-group
Output of:
arm-linux-gnueabi-gcc -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -Os -static -o busybox_unstripped -Wl,--sort-common -Wl,--sort-section,alignment -Wl,--start-group applets/built-in.o archival/lib.a archival/libarchive/lib.a console-tools/lib.a coreutils/lib.a coreutils/libcoreutils/lib.a debianutils/lib.a e2fsprogs/lib.a editors/lib.a findutils/lib.a init/lib.a libbb/lib.a libpwdgrp/lib.a loginutils/lib.a mailutils/lib.a miscutils/lib.a modutils/lib.a networking/lib.a networking/libiproute/lib.a networking/udhcp/lib.a printutils/lib.a procps/lib.a runit/lib.a selinux/lib.a shell/lib.a sysklogd/lib.a util-linux/lib.a util-linux/volume_id/lib.a archival/built-in.o archival/libarchive/built-in.o console-tools/built-in.o coreutils/built-in.o coreutils/libcoreutils/built-in.o debianutils/built-in.o e2fsprogs/built-in.o editors/built-in.o findutils/built-in.o init/built-in.o libbb/built-in.o libpwdgrp/built-in.o loginutils/built-in.o mailutils/built-in.o miscutils/built-in.o modutils/built-in.o networking/built-in.o networking/libiproute/built-in.o networking/udhcp/built-in.o printutils/built-in.o procps/built-in.o runit/built-in.o selinux/built-in.o shell/built-in.o sysklogd/built-in.o util-linux/built-in.o util-linux/volume_id/built-in.o -Wl,--end-group -Wl,--start-group -lcrypt -lm -Wl,--end-group
==========
debianutils/lib.a(mktemp.o): In function `mktemp_main':
mktemp.c:(.text.mktemp_main+0x70): warning: the use of `tempnam' is dangerous, better use `mkstemp'
networking/lib.a(nslookup.o): In function `print_host':
nslookup.c:(.text.print_host+0x24): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
networking/lib.a(ipcalc.o): In function `ipcalc_main':
ipcalc.c:(.text.ipcalc_main+0x15c): warning: Using 'gethostbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
libbb/lib.a(inet_common.o): In function `INET_resolve':
inet_common.c:(.text.INET_resolve+0x32): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
networking/lib.a(inetd.o): In function `reread_config_file':
inetd.c:(.text.reread_config_file+0x546): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
networking/lib.a(netstat.o): In function `ip_port_str':
netstat.c:(.text.ip_port_str+0x28): warning: Using 'getservbyport' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
networking/lib.a(inetd.o): In function `reread_config_file':
inetd.c:(.text.reread_config_file+0x4e4): warning: Using 'getrpcbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
networking/lib.a(inetd.o): In function `unregister_rpc':
inetd.c:(.text.unregister_rpc+0xc): undefined reference to `pmap_unset'
networking/lib.a(inetd.o): In function `register_rpc':
inetd.c:(.text.register_rpc+0x30): undefined reference to `pmap_unset'
inetd.c:(.text.register_rpc+0x46): undefined reference to `pmap_set'
networking/lib.a(inetd.o): In function `prepare_socket_fd':
inetd.c:(.text.prepare_socket_fd+0x52): undefined reference to `bindresvport'
collect2: ld returned 1 exit status
make: *** [busybox_unstripped] Error 1
codey modey
  • 983
  • 2
  • 10
  • 23
  • Have you already tried [Buildroot](http://buildroot.uclibc.org/)? It will care about your toolchain and rootfs. In addition you can choose between lots of packages. – yegorich Mar 09 '14 at 21:11
  • No, I haven't. Is it used to build root file systems? – codey modey Mar 09 '14 at 21:26
  • Yes. You can even choose between file system type, compression etc. Just download it, execute make menuconfig and look at the menu options. – yegorich Mar 09 '14 at 23:37
  • which toolchain are you using arm-none-linux-gnueabi-gcc or arm-linux-gnueabi- ? – vinay hunachyal Mar 10 '14 at 04:05
  • @vinayhunachyal for menuconfig and defconfig step I used arm-linux-gnueabi- but while installing it I changed it to arm-none-linux-gnueabi-gcc (It looks odd now). But the blog also uses different toolchains for both steps. – codey modey Mar 10 '14 at 04:09
  • 1
    please use same toolchain i.e arm-none-linux-gnueabi-gcc for all steps if works fine if not let me know. I guess due to change of toolchain u getting error – vinay hunachyal Mar 10 '14 at 04:39

1 Answers1

1

With the help from vinay hunachyal the answer is as follows

  • use latest stable busybox code
  • use the same tool chain (arm-none-linux-gnueabi-gcc) for all the steps (not as the one actually given on the blog)
codey modey
  • 983
  • 2
  • 10
  • 23