From 005fdecc492df909b05badaec908b39375644b63 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Tue, 2 Aug 2011 12:37:22 -0500 Subject: [PATCH] Revert "Revert "distro: add support for oneiric"" This reverts commit 543554e397432c5b949e378ee5924b6e61ce5895. With this serial fix this is good now Signed-off-by: Robert Nelson --- mk_mmc.sh | 55 +++++++++++++++++++++++++++++++++++-- scripts/oneiric-preseed.cfg | 36 ++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 scripts/oneiric-preseed.cfg diff --git a/mk_mmc.sh b/mk_mmc.sh index 56ab36c..5045c98 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -51,6 +51,9 @@ MAVERICK_MD5SUM="12c0f04da6b8fb118939489f237e4c86" NATTY_NETIMAGE="current" NATTY_MD5SUM="a88f348be5c94873be0d67a9ce8e485e" +ONEIRIC_NETIMAGE="current" +ONEIRIC_MD5SUM="aa5ec2219148d16873e400b67ad78713" + #SQUEEZE_NETIMAGE="current" SQUEEZE_NETIMAGE="20110106+squeeze3" SQUEEZE_MD5SUM="b0caf7d86e9dc37e8d5b8c39d47c4884" @@ -256,16 +259,25 @@ case "$DIST" in TEST_MD5SUM=$MAVERICK_MD5SUM NETIMAGE=$MAVERICK_NETIMAGE HTTP_IMAGE="http://ports.ubuntu.com/ubuntu-ports/dists" + BASE_IMAGE="versatile" ;; natty) TEST_MD5SUM=$NATTY_MD5SUM NETIMAGE=$NATTY_NETIMAGE HTTP_IMAGE="http://ports.ubuntu.com/ubuntu-ports/dists" + BASE_IMAGE="versatile" + ;; + oneiric) + TEST_MD5SUM=$ONEIRIC_MD5SUM + NETIMAGE=$ONEIRIC_NETIMAGE + HTTP_IMAGE="http://ports.ubuntu.com/ubuntu-ports/dists" + BASE_IMAGE="linaro-vexpress" ;; squeeze) TEST_MD5SUM=$SQUEEZE_MD5SUM NETIMAGE=$SQUEEZE_NETIMAGE HTTP_IMAGE="http://ftp.debian.org/debian/dists" + BASE_IMAGE="versatile" ;; esac @@ -274,12 +286,12 @@ if ls ${DIR}/dl/${DIST}/initrd.gz >/dev/null 2>&1;then if [ "=$TEST_MD5SUM=" != "=$MD5SUM=" ]; then echo "md5sum changed $MD5SUM" rm -f ${DIR}/dl/${DIST}/initrd.gz || true - wget --directory-prefix=${DIR}/dl/${DIST} ${HTTP_IMAGE}/${DIST}/main/installer-armel/${NETIMAGE}/images/versatile/netboot/initrd.gz + wget --directory-prefix=${DIR}/dl/${DIST} ${HTTP_IMAGE}/${DIST}/main/installer-armel/${NETIMAGE}/images/${BASE_IMAGE}/netboot/initrd.gz NEW_MD5SUM=$(md5sum ${DIR}/dl/${DIST}/initrd.gz | awk '{print $1}') echo "new md5sum $NEW_MD5SUM" fi else - wget --directory-prefix=${DIR}/dl/${DIST} ${HTTP_IMAGE}/${DIST}/main/installer-armel/${NETIMAGE}/images/versatile/netboot/initrd.gz + wget --directory-prefix=${DIR}/dl/${DIST} ${HTTP_IMAGE}/${DIST}/main/installer-armel/${NETIMAGE}/images/${BASE_IMAGE}/netboot/initrd.gz fi if [ ! "${KERNEL_DEB}" ] ; then @@ -335,6 +347,23 @@ case "$DIST" in wget -c --directory-prefix=${DIR}/dl/${DIST} http://ports.ubuntu.com/pool/multiverse/l/linux-firmware-nonfree/${NATTY_NONF_FW} NATTY_NONF_FW=${NATTY_NONF_FW##*/} + #ar9170 + wget -c --directory-prefix=${DIR}/dl/${DIST} http://www.kernel.org/pub/linux/kernel/people/chr/carl9170/fw/1.9.2/carl9170-1.fw + AR9170_FW="carl9170-1.fw" + ;; + oneiric) + rm -f ${TEMPDIR}/dl/index.html || true + wget --directory-prefix=${TEMPDIR}/dl/ http://ports.ubuntu.com/pool/main/l/linux-firmware/ + ONEIRIC_FW=$(cat ${TEMPDIR}/dl/index.html | grep 1.56 | grep linux-firmware | grep _all.deb | head -1 | awk -F"\"" '{print $8}') + wget -c --directory-prefix=${DIR}/dl/${DIST} http://ports.ubuntu.com/pool/main/l/linux-firmware/${ONEIRIC_FW} + ONEIRIC_FW=${ONEIRIC_FW##*/} + + rm -f ${TEMPDIR}/dl/index.html || true + wget --directory-prefix=${TEMPDIR}/dl/ http://ports.ubuntu.com/pool/multiverse/l/linux-firmware-nonfree/ + ONEIRIC_NONF_FW=$(cat ${TEMPDIR}/dl/index.html | grep 1.9 | grep linux-firmware-nonfree | grep _all.deb | head -1 | awk -F"\"" '{print $8}') + wget -c --directory-prefix=${DIR}/dl/${DIST} http://ports.ubuntu.com/pool/multiverse/l/linux-firmware-nonfree/${ONEIRIC_NONF_FW} + ONEIRIC_NONF_FW=${ONEIRIC_NONF_FW##*/} + #ar9170 wget -c --directory-prefix=${DIR}/dl/${DIST} http://www.kernel.org/pub/linux/kernel/people/chr/carl9170/fw/1.9.2/carl9170-1.fw AR9170_FW="carl9170-1.fw" @@ -411,6 +440,12 @@ case "$DIST" in sudo cp -v ${DIR}/dl/${DIST}/${AR9170_FW} ${TEMPDIR}/initrd-tree/lib/firmware/ sudo cp -vr ${DIR}/dl/linux-firmware/ti-connectivity ${TEMPDIR}/initrd-tree/lib/firmware/ ;; + oneiric) + sudo dpkg -x ${DIR}/dl/${DIST}/${ONEIRIC_FW} ${TEMPDIR}/initrd-tree + sudo dpkg -x ${DIR}/dl/${DIST}/${ONEIRIC_NONF_FW} ${TEMPDIR}/initrd-tree + sudo cp -v ${DIR}/dl/${DIST}/${AR9170_FW} ${TEMPDIR}/initrd-tree/lib/firmware/ + sudo cp -vr ${DIR}/dl/linux-firmware/ti-connectivity ${TEMPDIR}/initrd-tree/lib/firmware/ + ;; squeeze) #from: http://packages.debian.org/source/squeeze/firmware-nonfree sudo dpkg -x ${DIR}/dl/${DIST}/${ATMEL_FW} ${TEMPDIR}/initrd-tree @@ -499,6 +534,9 @@ fi natty) sudo patch -p1 < ${DIR}/scripts/ubuntu-tweaks.diff ;; + oneiric) + sudo patch -p1 < ${DIR}/scripts/ubuntu-tweaks.diff + ;; squeeze) sudo patch -p1 < ${DIR}/scripts/debian-tweaks.diff ;; @@ -518,6 +556,12 @@ case "$DIST" in sudo chmod a+x ${TEMPDIR}/initrd-tree/usr/lib/finish-install.d/08rcn-omap sudo cp -v ${DIR}/scripts/${DIST}-preseed.cfg ${TEMPDIR}/initrd-tree/preseed.cfg ;; + oneiric) + sudo cp -v ${DIR}/scripts/flash-kernel.conf ${TEMPDIR}/initrd-tree/etc/flash-kernel.conf + sudo cp -v ${DIR}/scripts/serial.conf ${TEMPDIR}/initrd-tree/etc/${SERIAL}.conf + sudo chmod a+x ${TEMPDIR}/initrd-tree/usr/lib/finish-install.d/08rcn-omap + sudo cp -v ${DIR}/scripts/${DIST}-preseed.cfg ${TEMPDIR}/initrd-tree/preseed.cfg + ;; squeeze) sudo cp -v ${DIR}/scripts/e2fsck.conf ${TEMPDIR}/initrd-tree/etc/e2fsck.conf sudo chmod a+x ${TEMPDIR}/initrd-tree/usr/lib/finish-install.d/08rcn-omap @@ -938,6 +982,12 @@ function check_distro { unset IN_VALID_DISTRO fi + if test "-$DISTRO_TYPE-" = "-oneiric-" + then + DIST=oneiric + unset IN_VALID_DISTRO + fi + if test "-$DISTRO_TYPE-" = "-natty-" then DIST=natty @@ -982,6 +1032,7 @@ Required Options: Ubuntu maverick natty + oneiric Optional: --firmware diff --git a/scripts/oneiric-preseed.cfg b/scripts/oneiric-preseed.cfg new file mode 100644 index 0000000..78e8a45 --- /dev/null +++ b/scripts/oneiric-preseed.cfg @@ -0,0 +1,36 @@ +### Apt setup +# You can choose to install non-free and contrib software. +#d-i apt-setup/non-free boolean true +#d-i apt-setup/contrib boolean true + +# If you select ftp, the mirror/country string does not need to be set. +#d-i mirror/protocol string ftp +d-i mirror/country string manual +d-i mirror/http/hostname string ports.ubuntu.com +d-i mirror/http/directory string /ubuntu-ports + +# Individual additional packages to install +d-i pkgsel/include string u-boot-tools pastebinit initramfs-tools wget linux-firmware linux-firmware-nonfree ntpdate + +# Whether to upgrade packages after debootstrap. +# Allowed values: none, safe-upgrade, full-upgrade +d-i pkgsel/upgrade select safe-upgrade + +# Controls whether to use NTP to set the clock during the install +d-i clock-setup/ntp boolean true + +# During installations from serial console, the regular virtual consoles +# (VT1-VT6) are normally disabled in /etc/inittab. Uncomment the next +# line to prevent this. +d-i finish-install/keep-consoles boolean true + +# Avoid that last message about the install being complete. +d-i finish-install/reboot_in_progress note + +# This command is run just before the install finishes, but when there is +# still a usable /target directory. You can chroot to /target and use it +# directly, or use the apt-install and in-target commands to easily install +# packages and run commands in the target system. +d-i preseed/late_command \ +string apt-install parted; in-target /sbin/parted /dev/mmcblk0 set 1 boot on ; +