[Debian-eeepc-devel] [SCM] custom debian-installer for EeePC branch, master, updated. 768324ad4c4b88905838530a38f5ce00d1c2150a

Brendan M brendan at bbqsrc.net
Mon Mar 10 08:37:09 UTC 2008


The following commit has been merged in the master branch:
commit 768324ad4c4b88905838530a38f5ce00d1c2150a
Author: Brendan M <brendan at bbqsrc.net>
Date:   Mon Mar 10 19:36:41 2008 +1100

    Version 0.5

diff --git a/build-eeepc.sh b/build-eeepc.sh
index 6d054fe..18cfac6 100755
--- a/build-eeepc.sh
+++ b/build-eeepc.sh
@@ -2,8 +2,9 @@
 #
 #######################################################################
 #
-# build-eeepc 0.4 - Builds an eeepc-specific monolithic debian installer.
+# build-eeepc 0.5 - Builds an eeepc-specific monolithic debian installer.
 # Copyright (C) 2008  Brendan M.
+# Copyright (C) 2008  Debian-EeePC Team
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -28,40 +29,38 @@ IMAGENAME=${IMAGENAME:-debian-eeepc.img}
 
 # Root check
 if [ ! $USER == "root" ]; then
-	if ! which sudo > /dev/null 2>&1; then
-		echo "You need sudo installed to use this script." 
-		exit 1
-	else
-		SUDO="sudo"
-	fi
+        if ! which sudo > /dev/null 2>&1; then
+                echo "You need sudo installed to use this script."
+                exit 1
+        else
+                SUDO="sudo"
+        fi
 fi
 
 # Functions!
 eee_wheel() {
-	case $PART in
-	"")
-		eee_initialisers; PART=1; eee_wheel;;
-	1)
-		eee_download; PART=2; eee_wheel;;
-	2)
-		eee_kernelwedge; PART=3; eee_wheel;;
-	3)
-		eee_di; PART=4; eee_wheel;;
-	4)
-		eee_initrd; PART=5; eee_wheel;;
-	5)
-		eee_iso2img; PART=6; eee_wheel;;
-	6)
-		eee_cleantmp; PART=0; eee_wheel;;
-	*)
-		echo -e "\033[1;32;41m Script complete. Happy days. \033[0m"; exit 0;;
-	esac
+        case $PART in
+        "")
+                eee_initialisers; PART=1; eee_wheel;;
+        1)
+                eee_download; PART=2; eee_wheel;;
+        2)
+                eee_kernelwedge; PART=3; eee_wheel;;
+        3)
+                eee_di; PART=4; eee_wheel;;
+        4)
+                eee_iso2img; PART=5; eee_wheel;;
+        5)
+                eee_cleantmp; PART=0; eee_wheel;;
+        *)
+                echo -e "\033[1;32;41m Script complete. Happy days. \033[0m"; exit 0;;
+        esac
 }
 
 eee_initialisers() {
     echo -e "\033[1;32;41m Initialising directories... \033[0m "
     for dirs in kernel-wedge tmp iso img tmpdebs
-    	do mkdir -p "$BASEDIR"/${dirs}
+        do mkdir -p "$BASEDIR"/${dirs}
     done
     echo -e "\033[1;32;41m Initialised directories. \033[0m "
 }
@@ -71,8 +70,8 @@ eee_download() {
     cd "$BASEDIR"/tmpdebs
     $SUDO apt-get -y update
     wget -c http://security.debian.org/debian-security/pool/updates/main/l/linux-2.6/linux-image-2.6.22-3-486_2.6.22-6.lenny1_i386.deb
-    dpkg -L linux-image-2.6.22-3-486 || $SUDO dpkg -i linux-image-2.6.22-3-486_2.6.22-6.lenny1_i386.deb 
-    wget -c $DEBMIRROR/debian/pool/main/l/linux-modules-extra-2.6/atl2-modules-2.6.22-3-486_2.6.22+1.0.40.4-9_i386.deb 
+    dpkg -L linux-image-2.6.22-3-486 || $SUDO dpkg -i linux-image-2.6.22-3-486_2.6.22-6.lenny1_i386.deb
+    wget -c $DEBMIRROR/debian/pool/main/l/linux-modules-extra-2.6/atl2-modules-2.6.22-3-486_2.6.22+1.0.40.4-9_i386.deb
     dpkg -L atl2-modules-2.6.22-3-486 || $SUDO dpkg -i atl2-modules-2.6.22-3-486_2.6.22+1.0.40.4-9_i386.deb
     $SUDO apt-get -y install kernel-wedge build-essential subversion fakeroot \
     syslinux wget gzip cpio dctrl-tools debiandoc-sgml docbook-xsl bc \
@@ -82,44 +81,31 @@ eee_download() {
     cd "$BASEDIR"/kernel-wedge
     tar xf "$BASEDIR"/tmpdebs/linux-kernel-di-i386-2.6_1.57.tar.gz
     cd "$BASEDIR"
-    svn co svn://svn.debian.org/svn/d-i/trunk debian-installer 
+    svn co svn://svn.debian.org/svn/d-i/trunk debian-installer
     echo -e "\033[1;32;41m Part 1 complete. \033[0m "
-} 
+}
 
 eee_kernelwedge() {
     echo -e "\033[1;32;41m Beginning part 2... (kernel-wedge) \033[0m "
     cd "$BASEDIR"/kernel-wedge/linux-kernel-di-i386-2.6
     echo atl2 >> ./modules/i386/nic-modules
     kernel-wedge build-all
-    cp -r ../*.udeb "$BASEDIR"/debian-installer/installer/build/localudebs/ 
+    cp -r ../*.udeb "$BASEDIR"/debian-installer/installer/build/localudebs/
     echo -e "\033[1;32;41m Part 2 complete. \033[0m "
 }
 
 eee_di() {
     echo -e "\033[1;32;41m Beginning part 3... (debian-installer) \033[0m "
     cd "$BASEDIR"/debian-installer/installer/build
+    echo "d-i pkgsel/include string atl2-modules-2.6.22-3-686" > ../../../tmp/preseed.cfg
+    sed -ie 's/PRESEED = .*/PRESEED = ..\/..\/..\/tmp\/preseed.cfg/g' ./config/common
     sed -ie 's/#monolithic/monolithic/g' ./config/i386.cfg
     sed -ie 's/DEBIAN_RELEASE = .*/DEBIAN_RELEASE = lenny/g' ./config/common
     fakeroot make build_monolithic
+    rm ../../../tmp/preseed.cfg
     echo -e "\033[1;32;41m Part 3 complete. \033[0m "
 }
 
-eee_initrd() {
-    echo -e "\033[1;32;41m Beginning part 4... (initrd atl2 fun) \033[0m"
-    cd "$BASEDIR"/tmp
-    cp "$BASEDIR"/debian-installer/installer/build/dest/monolithic/initrd.gz "$BASEDIR"/tmp/
-    gunzip initrd.gz
-    cpio -i < initrd
-    rm initrd
-    cd "$BASEDIR"/tmp/usr/lib/post-base-installer.d/
-    wget http://bbqsrc.net/eeepc/debian/05atl2-install
-    chmod +rx 05atl2-install
-    cd "$BASEDIR"/tmp
-    find ./ | cpio -H newc -o > ./initrd
-    gzip initrd
-    echo -e "\033[1;32;41m Part 4 complete. \033[0m "
-}
-
 eee_iso2img() {
     echo -e "\033[1;32;41m Beginning part 5... (iso to img) \033[0m "
     dd if=/dev/zero of=./$IMAGENAME bs=1k count=16000
@@ -128,10 +114,9 @@ eee_iso2img() {
     $SUDO mount -o loop "$BASEDIR"/debian-installer/installer/build/dest/monolithic/mini.iso "$BASEDIR"/iso
     $SUDO cp -r "$BASEDIR"/iso/* "$BASEDIR"/img/
     $SUDO umount "$BASEDIR"/iso
-    $SUDO rm "$BASEDIR"/img/initrd.gz "$BASEDIR"/img/isolinux.bin
-    $SUDO mv ./initrd.gz "$BASEDIR"/img/
-    $SUDO mv "$BASEDIR"/img/isolinux.cfg "$BASEDIR"/img/syslinux.cfg 
-    $SUDO umount "$BASEDIR"/img 
+    $SUDO rm "$BASEDIR"/img/isolinux.bin
+    $SUDO mv "$BASEDIR"/img/isolinux.cfg "$BASEDIR"/img/syslinux.cfg
+    $SUDO umount "$BASEDIR"/img
     $SUDO syslinux ./$IMAGENAME
     $SUDO mv ./$IMAGENAME "$BASEDIR"/
     echo -e "\033[1;32;41m Part 5 complete. \033[0m"
@@ -140,6 +125,9 @@ eee_iso2img() {
 eee_cleantmp() {
     echo -e "\033[1;32;41m Cleaning up tmp/... \033[0m "
     rm -rf "$BASEDIR"/tmp/*
+    rm "$BASEDIR"/kernel-wedge/*.udeb
+    rm "$BASEDIR"/debian-installer/installer/build/localudebs/*
+    cd "$BASEDIR"/debian-installer/installer/build && make reallyclean && cd "$BASEDIR"
     echo -e "\033[1;32;41m Cleaned. \033[0m "
 }
 
@@ -169,4 +157,8 @@ exit 1 #Just incase the wheel says no.
 #   - No longer requires bash!
 #   - $BASEDIR can now contain spaces without error
 #
+#   10/03/2008 - 0.5
+#   - Removed initrd function and add preseed file
+#   - add a few cleanups after build
+#
 #######################################################################

-- 
custom debian-installer for EeePC



More information about the Debian-eeepc-devel mailing list