From 5a2dd71263295fa9c0a3f53e74848795fc3b158b Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Sat, 20 Apr 2013 13:51:19 -0500 Subject: [PATCH] flash-kernel: bring this script out Signed-off-by: Robert Nelson --- lib/flash_kernel/flash-kernel.conf | 15 +++++++++++++++ mk_mmc.sh | 25 ++----------------------- 2 files changed, 17 insertions(+), 23 deletions(-) create mode 100644 lib/flash_kernel/flash-kernel.conf diff --git a/lib/flash_kernel/flash-kernel.conf b/lib/flash_kernel/flash-kernel.conf new file mode 100644 index 0000000..f7a3691 --- /dev/null +++ b/lib/flash_kernel/flash-kernel.conf @@ -0,0 +1,15 @@ +#!/bin/sh -e +UBOOT_PART=/dev/mmcblk0p1 + +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) + FLASH_KERNEL_SKIP=yes + ;; + esac +fi diff --git a/mk_mmc.sh b/mk_mmc.sh index bdead9e..bdd8e1a 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -862,27 +862,6 @@ function initrd_cleanup { rm -rf ${TEMPDIR}/initrd-tree/lib/firmware/*-versatile/ || true } -function flash_kernel { - cat > ${TEMPDIR}/initrd-tree/etc/flash-kernel.conf <<-__EOF__ - #!/bin/sh -e - UBOOT_PART=/dev/mmcblk0p1 - - echo "flash-kernel stopped by: /etc/flash-kernel.conf" - USE_CUSTOM_KERNEL=1 - - if [ "\${USE_CUSTOM_KERNEL}" ] ; then - DIST=\$(lsb_release -cs) - - case "\${DIST}" in - oneiric|precise|quantal|raring) - FLASH_KERNEL_SKIP=yes - ;; - esac - fi - - __EOF__ -} - function flash_kernel_base_installer { #All this crap, is just to make "flash-kernel-installer" happy... cat > ${TEMPDIR}/initrd-tree/usr/lib/post-base-installer.d/00flash-kernel <<-__EOF__ @@ -1000,12 +979,12 @@ function initrd_preseed_settings { case "${DIST}" in oneiric|precise|quantal) cp -v "${DIR}/lib/ubuntu-finish.sh" ${TEMPDIR}/initrd-tree/usr/bin/finish-install.sh - flash_kernel + cp -v "${DIR}/lib/flash_kernel/flash-kernel.conf" ${TEMPDIR}/initrd-tree/etc/flash-kernel.conf flash_kernel_base_installer ;; raring) cp -v "${DIR}/lib/ubuntu-finish.sh" ${TEMPDIR}/initrd-tree/usr/bin/finish-install.sh - flash_kernel + cp -v "${DIR}/lib/flash_kernel/flash-kernel.conf" ${TEMPDIR}/initrd-tree/etc/flash-kernel.conf flash_kernel_base_installer flash_kernel_broken ;;