diff --git a/mk_mmc.sh b/mk_mmc.sh index 773c539..838f801 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -43,6 +43,7 @@ function dl_xload_uboot { fi wget -c --directory-prefix=${DIR}/dl/ ${MIRROR}kernel/beagle/${DIST}/v${KERNEL}/linux-image-${KERNEL}_1.0${DIST}_armel.deb + wget -c --directory-prefix=${DIR}/dl/ ${MIRROR}${DIST}/v${KERNEL}/initrd.img-${KERNEL} if [ "${FIRMWARE}" ] ; then @@ -116,9 +117,13 @@ fi sudo cp -v ${DIR}/scripts/flash-kernel.conf ${DIR}/initrd-tree/etc/flash-kernel.conf sudo patch -p1 -s < ${DIR}/scripts/beagle-copy-flash-kernel-override.diff sudo patch -p1 -s < ${DIR}/scripts/beagle-erase-nand-and-copy-new-scr.diff + sudo patch -p1 -s < ${DIR}/scripts/lucid-copy-etc-e2fsck.conf.diff sudo dpkg -x ${DIR}/dl/mtd-utils_20090606-1_armel.deb ${DIR}/initrd-tree fi + sudo touch ${DIR}/initrd-tree/etc/rcn.conf + sudo cp -v ${DIR}/scripts/e2fsck.conf ${DIR}/initrd-tree/etc/e2fsck.conf + find . | cpio -o -H newc | gzip -9 > ${DIR}/initrd.mod.gz cd ${DIR}/ sudo rm -f ${DIR}/initrd.mod || true @@ -168,19 +173,18 @@ sudo cp -v ${DIR}/dl/${MLO} ${DIR}/disk/MLO sudo cp -v ${DIR}/dl/${XLOAD} ${DIR}/disk/x-load.bin.ift sudo cp -v ${DIR}/dl/${UBOOT} ${DIR}/disk/u-boot.bin -sudo touch ${DIR}/disk/limit.one - sudo mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d ${DIR}/initrd.mod ${DIR}/disk/uInitrd +sudo mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d ${DIR}/dl/initrd.img-${KERNEL} ${DIR}/disk/uInitrd.final sudo mkimage -A arm -O linux -T kernel -C none -a 0x80008000 -e 0x80008000 -n ${KERNEL} -d ${DIR}/kernel/boot/vmlinuz-* ${DIR}/disk/uImage if [ "${SERIAL_MODE}" ] ; then sudo mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Debian Installer" -d ${DIR}/scripts/serial.cmd ${DIR}/disk/boot.scr sudo mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Boot" -d ${DIR}/scripts/serial-normal.cmd ${DIR}/disk/normal.scr - sudo cp -v ${DIR}/scripts/serial-normal.cmd ${DIR}/disk/normal.cmd + sudo cp -v ${DIR}/scripts/serial-normal.cmd ${DIR}/disk/boot.cmd else sudo mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Debian Installer" -d ${DIR}/scripts/dvi.cmd ${DIR}/disk/boot.scr sudo mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "Boot" -d ${DIR}/scripts/dvi-normal.cmd ${DIR}/disk/normal.scr - sudo cp -v ${DIR}/scripts/dvi-normal.cmd ${DIR}/disk/normal.cmd + sudo cp -v ${DIR}/scripts/dvi-normal.cmd ${DIR}/disk/boot.cmd fi echo "#!/bin/sh" > /tmp/rebuild_uinitrd.sh diff --git a/scripts/beagle-erase-nand-and-copy-new-scr.diff b/scripts/beagle-erase-nand-and-copy-new-scr.diff index 1d4d729..2b3b8f6 100644 --- a/scripts/beagle-erase-nand-and-copy-new-scr.diff +++ b/scripts/beagle-erase-nand-and-copy-new-scr.diff @@ -1,23 +1,27 @@ diff --git a/lib/chroot-setup.sh b/lib/chroot-setup.sh -index 629f541..783818a 100644 +index 629f541..c5fbc37 100644 --- a/lib/chroot-setup.sh +++ b/lib/chroot-setup.sh -@@ -122,6 +122,19 @@ chroot_cleanup () { +@@ -122,6 +122,23 @@ chroot_cleanup () { mv /target/sbin/initctl.REAL /target/sbin/initctl fi -+ /usr/sbin/flash_eraseall /dev/mtd2 -+ -+ mkdir -p /tmp/mmc -+ mount /dev/mmcblk0p1 /tmp/mmc ++ if [ -e /target/boot/initrd.img ]; then ++ /usr/sbin/flash_eraseall /dev/mtd2 ++ fi + -+ if [ -e /tmp/mmc/limit.one ]; then ++ ++ if [ -e /etc/rcn.conf ]; then ++ mkdir -p /tmp/mmc ++ mount /dev/mmcblk0p1 /tmp/mmc + cp /tmp/mmc/boot.scr /tmp/mmc/netinstall.scr + cp /tmp/mmc/normal.scr /tmp/mmc/boot.scr -+ rm -f /tmp/mmc/limit.one ++ cp /tmp/mmc/uInitrd /tmp/mmc/uInitrd.net ++ cp /tmp/mmc/uInitrd.final /tmp/mmc/uInitrd ++ rm -f /etc/rcn.conf ++ umount /tmp/mmc + fi -+ -+ umount /tmp/mmc ++ + # Undo the mounts done by the packages during installation. # Reverse sorting to umount the deepest mount points first. diff --git a/scripts/e2fsck.conf b/scripts/e2fsck.conf new file mode 100644 index 0000000..82ef314 --- /dev/null +++ b/scripts/e2fsck.conf @@ -0,0 +1,4 @@ +[options] + +broken_system_clock = true + diff --git a/scripts/lucid-copy-etc-e2fsck.conf.diff b/scripts/lucid-copy-etc-e2fsck.conf.diff new file mode 100644 index 0000000..e409a34 --- /dev/null +++ b/scripts/lucid-copy-etc-e2fsck.conf.diff @@ -0,0 +1,12 @@ +diff --git a/lib/chroot-setup.sh b/lib/chroot-setup.sh +index c5fbc37..8cc0ea4 100644 +--- a/lib/chroot-setup.sh ++++ b/lib/chroot-setup.sh +@@ -111,6 +111,7 @@ EOF + export APT_LISTCHANGES_FRONTEND + + cp /etc/flash-kernel.conf /target/etc/flash-kernel.conf ++ cp /etc/e2fsck.conf /target/etc/e2fsck.conf + + return 0 + }