r4834 - developers/werner/myroot2

werner at docs.openmoko.org werner at docs.openmoko.org
Thu Nov 27 23:11:54 CET 2008


Author: werner
Date: 2008-11-27 23:11:53 +0100 (Thu, 27 Nov 2008)
New Revision: 4834

Modified:
   developers/werner/myroot2/myroot
   developers/werner/myroot2/werner.myroot
Log:
- myroot2/myroot: retrieve rootfs-builder from gta03-test-suite.git 
- myroot2/myroot: replace "opkg" with "rbld"
- myroot2/myroot: instead of populating /dev, use rbld --device-minimal
  (still need to get rid of udev start or this doesn't really help)
- myroot2/myroot: rbld creates /dev/, /etc/ and /usr/lib/opkg for us
- myroot2/myroot: do we need opkg.conf ? Consider not installing it.
- myroot2/myroot: use rlbd --init for opkg setup 
- myroot2/myroot: rbld runs postinstall scripts for us
- myroot2/werner.myroot: things start falling apart after "ntpdate". Stop there
  for now.



Modified: developers/werner/myroot2/myroot
===================================================================
--- developers/werner/myroot2/myroot	2008-11-27 22:04:42 UTC (rev 4833)
+++ developers/werner/myroot2/myroot	2008-11-27 22:11:53 UTC (rev 4834)
@@ -21,6 +21,17 @@
 interactive=false
 
 
+# ----- Look for gta03-test-suite.git -----------------------------------------
+
+
+if [ ! -d gta03-test-suite ]; then
+    git clone git://git.openmoko.org/git/gta03-test-suite.git
+fi
+
+RBLD=$PWD/gta03-test-suite/rootfs-builder/rootfs-builder.sh
+RPATH=$PWD/gta03-test-suite/rootfs-builder/restricted:/bin:/usr/bin
+
+
 # ----- Find the Openmoko SVN repository --------------------------------------
 
 
@@ -69,15 +80,15 @@
 # ----- Special commands in the build script ----------------------------------
 
 
-opkg()
+rbld()
 {
-    LD_LIBRARY_PATH=$LIB $OPKG_CL $cache -f $CONF -o "$root" "$@"
+    $RBLD --rootfs=$root --path=$RPATH $cache "$@"
 }
 
 
 pkg()
 {
-    LD_LIBRARY_PATH=$LIB $OPKG_CL $cache -f $CONF -o "$root" -V 0 install "$@"
+    rbld --install "$@"
 }
 
 
@@ -137,21 +148,18 @@
 # ----- set up the bare essentials --------------------------------------------
 
 
-mkdir -p "$root/dev"
+rbld --init
+rbld --device-minimal
+
 mkdir -p "$root/proc"
 mkdir -p "$root/sys"
 
-mknod "$root/dev/null" c 1 3
-mknod "$root/dev/tty" c 5 0
-mknod "$root/dev/console" c 5 1
 mknod "$root/dev/ttySAC2" c 204 66
 
 mkdir -p "$root/sbin"
 mkdir -p "$root/bin"
-mkdir -p "$root/etc"
 mkdir -p "$root/tmp"
 mkdir -p "$root/usr/local/bin"
-mkdir -p "$root/usr/lib/opkg"
 
 mkdir -p "$root/home/root"
 chmod 755 "$root/home" "$root/home/root"
@@ -159,36 +167,10 @@
 echo ROOT / auto defaults 0 0 >"$root/etc/fstab"
 echo "root::0:0:root:/home/root:/bin/sh" >"$root/etc/passwd"
 
-cp $CONF "$root/etc"
+#cp $CONF "$root/etc"
 
 
-# ----- opkg environment ------------------------------------------------------
 
-
-PKG_CONFIG_SYSROOT_DIR="$root"
-PKG_CONFIG_PATH="/usr/lib/pkgconfig"
-CONFIG_SITE=/usr/local/openmoko/arm/site-config
-
-export PKG_CONFIG_SYSROOT_DIR PKG_CONFIG_PATH CONFIG_SITE
-
-
-# ----- opkg package database -------------------------------------------------
-
-# @@@ cache lists and packages
-
-update_cache()
-{
-    mkdir -p $PWD/cache
-    root=$PWD/cache opkg update
-}
-
-
-
-# -----
-
-
-
-opkg update
 custom=$1
 if [ ! -z "$custom" ]; then
     if [ "${custom#/}" = "$custom" ]; then
@@ -205,27 +187,4 @@
 fi
 
 
-# ----- run postinstall scripts -----------------------------------------------
-
-
-#
-# The only thing we really need our post-install scripts to do is to rename the
-# alternatives. We accomplish this by executing them on the host, but giving
-# them a very limited PATH, containing only update-alternatives.
-#
-
-restricted_bin=$SVN/developers/werner/myroot/restricted_bin
-
-cd "$root/usr/lib/opkg/info"
-MYROOT_ROOT="$root"
-export MYROOT_ROOT
-for n in *.postinst; do
-    PATH=$restricted_bin ./$n
-done
-rm *.postinst
-
-
-# ----- Done ------------------------------------------------------------------
-
-
-exit
+rbld --tar=root.tar.bz2

Modified: developers/werner/myroot2/werner.myroot
===================================================================
--- developers/werner/myroot2/werner.myroot	2008-11-27 22:04:42 UTC (rev 4833)
+++ developers/werner/myroot2/werner.myroot	2008-11-27 22:11:53 UTC (rev 4834)
@@ -27,7 +27,9 @@
 
 pkg grep bash debianutils
 pkg mtd-utils sysfsutils apm
-pkg openssh ntpdate netkit-telnet
+pkg ntpdate
+# pkg openssh ntpdate netkit-telnet
+exit
 pkg dhcp-client wireless-tools wpa-supplicant
 pkg portmap ppp rsync
 pkg alsa-state alsa-utils-alsamixer alsa-utils-alsactl alsa-utils-aplay




More information about the commitlog mailing list