changeset 838:3cd64af0d1b6

Merging the branch between landley and mirell
author Mark Miller <mark@mirell.org>
date Tue, 06 Oct 2009 17:57:23 -0500
parents f80c47e8991d (current diff) f448815e20b0 (diff)
children 1067e99efbdc
files root-filesystem.sh
diffstat 9 files changed, 47 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/root-filesystem.sh	Tue Oct 06 17:56:39 2009 -0500
+++ b/root-filesystem.sh	Tue Oct 06 17:57:23 2009 -0500
@@ -36,7 +36,7 @@
 if [ -z "$ROOT_NODIRS" ]
 then
   ROOT_TOPDIR="$STAGE_DIR/usr"
-  mkdir -p "$STAGE_DIR"/{tmp,proc,sys,dev,home} || dienow
+  mkdir -p "$STAGE_DIR"/{tmp,proc,sys,dev,home,mnt} || dienow
   for i in bin sbin lib etc
   do
     mkdir -p "$ROOT_TOPDIR/$i" || dienow
--- a/sources/functions.sh	Tue Oct 06 17:56:39 2009 -0500
+++ b/sources/functions.sh	Tue Oct 06 17:57:23 2009 -0500
@@ -406,6 +406,12 @@
   echo
 }
 
+function set_titlebar()
+{
+  [ -z "$NO_TITLE_BAR" ] &&
+    echo -en "\033]2;$1\007"
+}
+
 # Extract package $1, use out-of-tree build directory $2 (or $1 if no $2)
 # Use link directory $3 (or $1 if no $3)
 
@@ -461,8 +467,7 @@
   export WRAPPY_LOGPATH="$WRAPPY_LOGDIR/cmdlines.${STAGE_NAME}.$1"
 
   # Change window title bar to package now
-  [ -z "$NO_TITLE_BAR" ] &&
-    echo -en "\033]2;$ARCH_NAME $STAGE_NAME $PACKAGE\007"
+  set_titlebar "$ARCH_NAME $STAGE_NAME $PACKAGE"
 
   # Ugly bug workaround: timestamp granularity in a lot of filesystems is only
   # 1 second, so find -newer misses things installed in the same second, so we
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/native/etc/group	Tue Oct 06 17:57:23 2009 -0500
@@ -0,0 +1,1 @@
+root:x:0:
--- a/sources/native/etc/passwd	Tue Oct 06 17:56:39 2009 -0500
+++ b/sources/native/etc/passwd	Tue Oct 06 17:57:23 2009 -0500
@@ -1,1 +1,1 @@
-root:x:0:0:root:/root:/bin/bash
+root:x:0:0:root:/root:/bin/sh
--- a/sources/native/sbin/init.sh	Tue Oct 06 17:56:39 2009 -0500
+++ b/sources/native/sbin/init.sh	Tue Oct 06 17:57:23 2009 -0500
@@ -36,14 +36,28 @@
     mount -o noatime $HOMEDEV /home
   fi
 
+  [ -b /dev/hdc ] && MNTDEV=/dev/hdc
+  [ -b /dev/sdc ] && MNTDEV=/dev/sdc
+  if [ ! -z "$MNTDEV" ]
+  then
+    mount -o ro $MNTDEV /mnt
+  fi
+
   mount -t tmpfs /tmp /tmp
 
+  CONSOLE="$(dmesg |
+    sed -n '/^Kernel command line:/s@.* console=\(/dev/\)*\([^ ]*\).*@\2@p')"
+
   echo Type exit when done.
-  exec /bin/oneit -c /dev/"$(dmesg | sed -n '/^Kernel command line:/s@.* console=\(/dev/\)*\([^ ]*\).*@\2@p')" /bin/ash
+
+  HANDOFF=/bin/ash
+  [ -e /mnt/init ] && HANDOFF=/mnt/init
+  exec /bin/oneit -c /dev/"$CONSOLE" "$HANDOFF"
 
 # If we're not PID 1, it's probably a chroot.
 else
-  echo "nameserver 4.2.2.1" > /etc/resolv.conf
+  [ ! -z $(grep "default for QEMU" /etc/resolv.conf) ] &&
+    echo "nameserver 4.2.2.1" > /etc/resolv.conf
 
   # Switch to a shell with command history.
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/patches/gcc-core-unbreak-armv4t.patch	Tue Oct 06 17:57:23 2009 -0500
@@ -0,0 +1,11 @@
+--- gcc-4.2.1/gcc/config/arm/linux-eabi.h	2006-02-17 00:29:10.000000000 +0100
++++ gcc-4.2.1-patched/gcc/config/arm/linux-eabi.h	2009-09-16 13:34:25.000000000 +0200
+@@ -45,8 +45,6 @@
+ /* Default to armv5t so that thumb shared libraries work.
+    The ARM10TDMI core is the default for armv5t, so set
+    SUBTARGET_CPU_DEFAULT to achieve this.  */
+-#undef SUBTARGET_CPU_DEFAULT
+-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
+ 
+ #undef SUBTARGET_EXTRA_LINK_SPEC
+ #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
--- a/sources/sections/binutils-gcc.sh	Tue Oct 06 17:56:39 2009 -0500
+++ b/sources/sections/binutils-gcc.sh	Tue Oct 06 17:57:23 2009 -0500
@@ -1,4 +1,4 @@
-Build binutils, c wrapper, and uClibc++
+# Build binutils, c wrapper, and uClibc++
 
 # Build binutils, which provides the linker and assembler and such.
 
@@ -161,6 +161,9 @@
   cd "$STAGE_DIR"/libexec/gcc/*/*/ &&
   cp -s "../../../../$CROSS_TARGET/bin/"* . &&
 
+  ln -s ${CROSS_TARGET} ${STAGE_DIR}/tools &&
+  ln -sf ../../../../tools/bin/ld  ${STAGE_DIR}/libexec/gcc/*/*/collect2 &&
+
   # Wrap C++ too.
 
   mv "$STAGE_DIR/bin/${PROGRAM_PREFIX}"{g++,rawg++} &&
--- a/sources/targets/armv4tl/settings	Tue Oct 06 17:56:39 2009 -0500
+++ b/sources/targets/armv4tl/settings	Tue Oct 06 17:57:23 2009 -0500
@@ -4,7 +4,7 @@
 BINUTILS_FLAGS=
 QEMU_TEST=$KARCH
 
-CROSS_TARGET=armv4lt-unknown-linux-gnueabi
+CROSS_TARGET=armv4tl-unknown-linux-gnueabi
 
 ROOT=sda
 CONSOLE=ttyAMA0
@@ -13,8 +13,8 @@
 export target_cpu_cname=arm9tdmi
 
 # Gentoo from Scratch
-GFS_CHOST="armv4lt-unknown-linux-gnueabi"
-GFS_ARCH="arm"
+GFS_CHOST="$CROSS_TARGET"
+GFS_ARCH="$KARCH"
 
 emulator_command()
 {
--- a/sources/toys/run-emulator.sh	Tue Oct 06 17:56:39 2009 -0500
+++ b/sources/toys/run-emulator.sh	Tue Oct 06 17:57:23 2009 -0500
@@ -78,6 +78,9 @@
   # Cleanup afterwards: Kill child processes we started (I.E. distccd).
   trap "kill $(jobs -p)" EXIT
 
+  # When background processes die, they should do so silently.
+  disown $(jobs -p)
+
   # Prepare some environment variables for run-qemu.sh
 
   DISTCC_PATH_PREFIX=/usr/distcc: