This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libraries needed for the minimum linux system


I took a look at crosstool-0.38/ptx.sh, and tried to figure out how to
build my own rootfs that only contained the absolute minumum needed to
boot up to a bash shell on an i686 system.  I think this covers it:

  # Build i686 toolchain using crosstool
  TARBALLS_DIR=$HOME/downloads
  RESULT_TOP=/tmp/crosstool
  export TARBALLS_DIR RESULT_TOP
  export GCC_LANGUAGES="c,c++"
  mkdir -p $RESULT_TOP
  eval `cat i686.dat gcc-4.1-20050716-glibc-2.3.2-hdrs-2.6.11.2.dat` sh all.sh --notest --testlinux

  # Create a rootfs directory and install crosstool's libraries into it
  export PREFIX=$RESULT_TOP/$GCC_DIR-$GLIBC_DIR/$TARGET
  export ROOTFS=$PREFIX/rootfs
  mkdir -p $ROOTFS
  cd $PREFIX/$TARGET
  for lib in \
   ld libBrokenLocale libSegFault libanl libc libcrypt libdl libgcc_s libgcc_s_nof libm \
   libmemusage libnsl libnss_compat libnss_dns libnss_files libnss_hesiod libnss_nis \
   libnss_nisplus libpcprofile libpthread libresolv librt libstdc++ libthread_db libutil; do
          ls     lib/$lib[-.]*so* || true
          ls usr/lib/$lib[-.]*so* || true
  done 2> /dev/null | cpio -pvm $ROOTFS

  # Install bash into the rootfs and link it to /linuxrc
  cd /tmp
  tar xvjf bash-3.0.tar.bz2
  cd bash-3.0
  export CC=$PREFIX/bin/$TARGET-gcc
  export CXX=$PREFIX/bin/$TARGET-g++
  export LD=$PREFIX/bin/$TARGET-ld
  ./configure --prefix=$ROOTFS
  make
  make install
  ln -s bin/bash $ROOTFS/linuxrc

Is this really all I need to run cramfs on to generate a rootfs image
that I can burn on the target?  Will the libraries generated by
crosstool suffice as runtime libraries for the target?  Will setting
CC, CXX, and LD to my cross compiler be sufficient for building a bash
that will run on the target?

Thanks,
Mike


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]