diff --git a/lib/flash_kernel/all.db b/lib/flash_kernel/all.db new file mode 100644 index 0000000..de6b9b3 --- /dev/null +++ b/lib/flash_kernel/all.db @@ -0,0 +1,5 @@ +# somewhat RFC2822 based, but case sensitive, not tolerant to spaces etc. + +Machine: Wandboard i.MX6 Quad Board +Method: generic +Bootloader-sets-root: yes diff --git a/lib/flash_kernel/flash-kernel.conf b/lib/flash_kernel/flash-kernel.conf index 63bbb9b..ed60cef 100644 --- a/lib/flash_kernel/flash-kernel.conf +++ b/lib/flash_kernel/flash-kernel.conf @@ -5,11 +5,5 @@ echo "flash-kernel stopped by: /etc/flash-kernel.conf" USE_CUSTOM_KERNEL=1 if [ "${USE_CUSTOM_KERNEL}" ] ; then - distro=$(lsb_release -cs) - - case "${distro}" in - oneiric|precise|quantal|raring|saucy) - FLASH_KERNEL_SKIP=yes - ;; - esac + FLASH_KERNEL_SKIP=yes fi diff --git a/lib/ubuntu-finish.sh b/lib/ubuntu-finish.sh index 7fa08de..d85a218 100644 --- a/lib/ubuntu-finish.sh +++ b/lib/ubuntu-finish.sh @@ -118,7 +118,9 @@ apt-get remove -y linux-image-omap* || true apt-get remove -y linux-headers-omap* || true apt-get remove -y u-boot-linaro* || true apt-get remove -y x-loader-omap* || true -apt-get remove -y flash-kernel || true +if [ ! -f /usr/share/flash-kernel/rcn-ee.conf ] ; then + apt-get remove -y flash-kernel || true +fi apt-get -y autoremove || true diff --git a/mk_mmc.sh b/mk_mmc.sh index e7daf29..85c6c7f 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -799,6 +799,23 @@ patch_linux_version () { chmod a+x ${TEMPDIR}/initrd-tree/fixes/linux-version } +patch_flash_kernel_db () { + #https://bugs.launchpad.net/ubuntu/+source/flash-kernel/+bug/1304022 + cat > ${TEMPDIR}/initrd-tree/usr/lib/post-base-installer.d/00patch-flash-kernel-db <<-__EOF__ + #!/bin/sh -e + #BusyBox: http://linux.die.net/man/1/busybox + + chroot /target apt-get -y --force-yes install flash-kernel + + rm /target/usr/share/flash-kernel/db/all.db + cp /etc/all.db /target/usr/share/flash-kernel/db/all.db + touch /target/usr/share/flash-kernel/rcn-ee.conf + + __EOF__ + + chmod a+x ${TEMPDIR}/initrd-tree/usr/lib/post-base-installer.d/00patch-flash-kernel-db +} + finish_installing_device () { cat > ${TEMPDIR}/initrd-tree/usr/lib/finish-install.d/08rcn-ee-finish-installing-device <<-__EOF__ #!/bin/sh -e @@ -908,12 +925,21 @@ initrd_preseed_settings () { cp -v "${DIR}/lib/flash_kernel/flash-kernel.conf" ${TEMPDIR}/initrd-tree/etc/flash-kernel.conf flash_kernel_base_installer ;; - raring|saucy|trusty) + raring|saucy) + cp -v "${DIR}/lib/ubuntu-finish.sh" ${TEMPDIR}/initrd-tree/usr/bin/finish-install.sh + cp -v "${DIR}/lib/flash_kernel/flash-kernel.conf" ${TEMPDIR}/initrd-tree/etc/flash-kernel.conf + flash_kernel_base_installer + flash_kernel_broken + patch_linux_version + ;; + trusty) cp -v "${DIR}/lib/ubuntu-finish.sh" ${TEMPDIR}/initrd-tree/usr/bin/finish-install.sh cp -v "${DIR}/lib/flash_kernel/flash-kernel.conf" ${TEMPDIR}/initrd-tree/etc/flash-kernel.conf + cp -v "${DIR}/lib/flash_kernel/all.db" ${TEMPDIR}/initrd-tree/etc/all.db flash_kernel_base_installer flash_kernel_broken patch_linux_version + patch_flash_kernel_db ;; wheezy|jessie) cp -v "${DIR}/lib/debian-finish.sh" ${TEMPDIR}/initrd-tree/usr/bin/finish-install.sh