Kirjoittaja Aihe: Minimal Linux busybox ei käänny  (Luettu 2157 kertaa)

welmar

  • Käyttäjä
  • Viestejä: 1582
    • Profiili
Minimal Linux busybox ei käänny
« : 06.04.16 - klo:22.03 »
Minimal Linux jää 7:n skriptiin eli busyboxin kääntämiseen. skripti 07;n sisältö on tälläinen
Koodia: [Valitse]
cd work/busybox

# Change to the first directory ls finds, e.g. 'busybox-1.24.2'.
cd $(ls -d *)

# Remove previously generated artifacts.
make distclean

# Create default configuration file.
make defconfig

# This variable holds the full path to the glibc installation area as quoted string.
# All back slashes are escaped (/ => \/) in order to keep the 'sed' command stable.
GLIBC_INSTALLED_ESCAPED=$(echo \"$GLIBC_INSTALLED\" | sed 's/\//\\\//g')

# Now we tell BusyBox to use the glibc installation area.
sed -i "s/.*CONFIG_SYSROOT.*/CONFIG_SYSROOT=$GLIBC_INSTALLED_ESCAPED/" .config

# The 'inetd' applet fails to compile because we use the glibc installation area as
# main pointer to the kernel headers (see 05_prepare_glibc.sh) and some headers are
# not resolved. The easiest solution is to ignore this particular applet.
sed -i "s/.*CONFIG_INETD.*/CONFIG_INETD=n/" .config

# Compile busybox with optimization for "parallel jobs" = "number of processors".
make busybox -j $(grep ^processor /proc/cpuinfo | wc -l)

# Create the symlinks for busybox. The file 'busybox.links' is used for this.
make install

cd ../../..
ja tälläistä virhettä tulee
Koodia: [Valitse]
==========
/usr/bin/ld: this linker was not configured to use sysroots
collect2: virhe: ld:n paluuarvo oli 1
Makefile:716: recipe for target 'busybox_unstripped' failed
make: *** [busybox_unstripped] Error 1
eli jotain linkittäjästä ja sysrootista mutta minä en ymmärrä enempää.