diff --git a/lib/debian-finish.sh b/lib/debian-finish.sh index e76973e..453b999 100644 --- a/lib/debian-finish.sh +++ b/lib/debian-finish.sh @@ -142,9 +142,21 @@ insserv board_tweaks.sh || true if [ -f /boot/uboot/linux-image-*arm*.deb ] ; then dpkg -x /boot/uboot/linux-image-*arm*.deb / update-initramfs -c -k `uname -r` + rm -f /boot/uboot/linux-image-*arm*.deb || true +fi + +if [ -f /boot/vmlinuz-`uname -r` ] ; then cp /boot/vmlinuz-`uname -r` /boot/uboot/zImage +else + echo "ERROR: [/boot/vmlinuz-`uname -r`] missing" >> /var/log/netinstall.log +fi + +if [ -f /boot/initrd.img-`uname -r` ] ; then cp /boot/initrd.img-`uname -r` /boot/uboot/initrd.img - rm -f /boot/uboot/linux-image-*arm*.deb || true +else + echo "ERROR: [/boot/initrd.img-`uname -r`] missing" >> /var/log/netinstall.log +fi + if [ -f /boot/uboot/vmlinuz- ] ; then rm -f /boot/uboot/vmlinuz- || true fi @@ -163,6 +175,17 @@ if [ -f /boot/uboot/linux-image-*arm*.deb ] ; then if [ "${zreladdr}" ] ; then mkimage -A arm -O linux -T kernel -C none -a ${zreladdr} -e ${zreladdr} -n `uname -r` -d /boot/vmlinuz-`uname -r` /boot/uboot/uImage fi -else - echo "ERROR: [/boot/uboot/linux-image-*.deb] missing" >> /var/log/netinstall.log +#else +# echo "ERROR: [/boot/uboot/linux-image-*.deb] missing" >> /var/log/netinstall.log +#fi +# + +echo "uname_r=$(uname -r)" > /boot/uEnv.txt +echo "uuid=$(/sbin/blkid -c /dev/null -s UUID -o value ${FINAL_PART})" >> /boot/uEnv.txt + +rootdrive=$(echo ${FINAL_PART} | awk -F"p" '{print $1}' || true) +if [ "x${bootdrive}" = "x${rootdrive}" ] ; then + mv /boot/uboot/uEnv.txt /boot/uboot/disabled-uEnv.txt fi + +# diff --git a/lib/distro.conf b/lib/distro.conf index 847cfd3..700c9d1 100755 --- a/lib/distro.conf +++ b/lib/distro.conf @@ -1,5 +1,6 @@ #!/bin/bash +unset rcn_ee_repo unset UBOOTWRAPPER case "${DISTARCH}-${debian_boot}" in precise-armhf-netboot) @@ -49,5 +50,6 @@ jessie-armhf-netboot) HTTP_IMAGE="http://ftp.debian.org/debian/dists" BASE_IMAGE="armmp/netboot" NETINSTALL="initrd.gz" + rcn_ee_repo="enable" ;; esac diff --git a/lib/jessie-preseed.cfg b/lib/jessie-preseed.cfg index 2fb54c1..37711cf 100644 --- a/lib/jessie-preseed.cfg +++ b/lib/jessie-preseed.cfg @@ -18,6 +18,22 @@ d-i anna/no_kernel_modules boolean true # Stop Debian from installing random kernel choice d-i base-installer/kernel/image select none +# Additional repositories, local[0-9] available +#d-i apt-setup/local0/repository string \ +# http://local.server/debian stable main +#d-i apt-setup/local0/comment string local server +# Enable deb-src lines +#d-i apt-setup/local0/source boolean true +# URL to the public key of the local repository; you must provide a key or +# apt will complain about the unauthenticated repository and so the +# sources.list line will be left commented out +#d-i apt-setup/local0/key string http://local.server/key + +d-i apt-setup/local0/repository string http://repos.rcn-ee.net/debian/ jessie main + +#apt-cacher-ng allows "custom.gpg" +d-i apt-setup/local0/key string http://repos.rcn-ee.net/debian/conf/custom.gpg + # Controls whether to use NTP to set the clock during the install d-i clock-setup/ntp boolean true # NTP server to use. The default is almost always fine here. diff --git a/mk_mmc.sh b/mk_mmc.sh index 2bf80e2..1e716fd 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -196,6 +196,7 @@ dl_kernel_image () { FTP_DIR=$(echo ${FTP_DIR} | awk -F'/' '{print $6}') KERNEL=$(echo ${FTP_DIR} | sed 's/v//') + uname_r="linux-image-${KERNEL}" wget --no-verbose --directory-prefix=${TEMPDIR}/dl/ ${MIRROR}/${DISTARCH}/${FTP_DIR}/ ACTUAL_DEB_FILE=$(cat ${TEMPDIR}/dl/index.html | grep linux-image) @@ -953,6 +954,10 @@ initrd_preseed_settings () { sed -i -e 's:#d-i console-keymaps-at:d-i console-keymaps-at:g' ${TEMPDIR}/initrd-tree/preseed.cfg fi ;; + jessie) + sed -i -e 's:initramfs-tools:initramfs-tools '$uname_r':g' ${TEMPDIR}/initrd-tree/preseed.cfg + cat ${TEMPDIR}/initrd-tree/preseed.cfg | grep linux-image + ;; esac cd "${DIR}"/ @@ -1273,7 +1278,9 @@ populate_boot () { rm -rf ${TEMPDIR}/bootscripts/normal.cmd || true echo "-----------------------------" - cp -v "${DIR}/dl/${DISTARCH}/${ACTUAL_DEB_FILE}" ${TEMPDIR}/disk/ + if [ ! "x${rcn_ee_repo}" = "xenable" ] ; then + cp -v "${DIR}/dl/${DISTARCH}/${ACTUAL_DEB_FILE}" ${TEMPDIR}/disk/ + fi cp -v ${TEMPDIR}/kernel/${linux_version}-modules.tar.gz ${TEMPDIR}/disk/ #This should be compatible with hwpacks variable names..