diffstat of debian/ for flash-kernel_2.28 flash-kernel_2.28ubuntu42 changelog | 467 ++++++++++++++++++++++++++++++++ control | 19 - flash-kernel-installer.isinstallable | 15 + flash-kernel-installer.postinst | 179 +++++++++++- flash-kernel.install | 2 initramfs/post-update.d/zz-flash-kernel | 10 kernel/postinst.d/zz-flash-kernel | 73 +++++ 7 files changed, 742 insertions(+), 23 deletions(-) diff -Nru flash-kernel-2.28/debian/changelog flash-kernel-2.28ubuntu42/debian/changelog --- flash-kernel-2.28/debian/changelog 2010-03-16 16:16:26.000000000 +0000 +++ flash-kernel-2.28ubuntu42/debian/changelog 2012-03-22 19:21:29.000000000 +0000 @@ -1,3 +1,308 @@ +flash-kernel (2.28ubuntu42) precise; urgency=low + + * Add Calxeda highbank support to flash-kernel and flash-kernel-installer. + + -- dann frazier Mon, 12 Mar 2012 22:18:47 -0600 + +flash-kernel (2.28ubuntu41) precise; urgency=low + + * Fix for a potential no-mtd and no /etc/flash-kernel.conf issue on mx5. + Thanks to Tobin Davis for that fix. + + -- Oliver Grawert Mon, 05 Mar 2012 17:41:22 +0100 + +flash-kernel (2.28ubuntu40) precise; urgency=low + + * set defaults for UBOOT_PART on various OMAP4 platforms if it is not set, + thanks to Tobin Davis for that fix (LP: 626749) + + -- Oliver Grawert Mon, 05 Mar 2012 14:41:03 +0100 + +flash-kernel (2.28ubuntu39) precise; urgency=low + + * Change from Tobin Davis to define ArmadaXP as a non-flash device. + + -- Adam Conrad Tue, 31 Jan 2012 16:28:26 -0700 + +flash-kernel (2.28ubuntu38) precise; urgency=low + + * Incorporate changes from Tobin Davis to enable support for the + armadaxp subarch used by the Marvell Armada XP Development Board + + -- Adam Conrad Mon, 30 Jan 2012 11:56:25 -0700 + +flash-kernel (2.28ubuntu37) precise; urgency=low + + * Add Freescale i.MX6 support. + * Add update dtb file (DeviceTree support) for i.MX*. + + -- Ying-Chun Liu Fri, 27 Jan 2012 13:17:13 +0000 + +flash-kernel (2.28ubuntu36) precise; urgency=low + + * Transition OMAP3 to using the MLO provided from the u-boot package. + + -- Adam Conrad Wed, 25 Jan 2012 22:22:38 -0700 + +flash-kernel (2.28ubuntu35) precise; urgency=low + + * Build for armhf. + + -- Matthias Klose Mon, 05 Dec 2011 15:33:56 +0100 + +flash-kernel (2.28ubuntu34) oneiric; urgency=low + + * Avoid races between umount and rm of the mountpoint with umount -l + + -- Adam Conrad Wed, 28 Sep 2011 15:32:57 -0600 + +flash-kernel (2.28ubuntu33) oneiric; urgency=low + + * Fix syntax error. + + -- Evan Dandrea Mon, 19 Sep 2011 19:29:19 +0100 + +flash-kernel (2.28ubuntu32) oneiric; urgency=low + + * Install the actual OMAP3 x-loader package + + -- Michael Casadevall Thu, 15 Sep 2011 23:19:04 -0700 + +flash-kernel (2.28ubuntu31) oneiric; urgency=low + + * Make flash-kernel-installer properly install uboot on OMAP3 (LP: #820621) + + -- Michael Casadevall Mon, 12 Sep 2011 14:59:31 -0700 + +flash-kernel (2.28ubuntu30) oneiric; urgency=low + + * remove spurious development shellscript + * add /etc/initramfs/post-update.d/ script to move the flash-kernel call + out of update-initramfs + + -- Oliver Grawert Fri, 09 Sep 2011 12:07:06 +0200 + +flash-kernel (2.28ubuntu29) oneiric; urgency=low + + * make sure flash-kernel-installer uses the right MLO when installing + + -- Oliver Grawert Tue, 30 Aug 2011 18:59:48 +0200 + +flash-kernel (2.28ubuntu28) oneiric; urgency=low + + * add an /etc/kernel/postinst.d script to work around (LP: #701698) + and finally make upgrades to newer kernel versions work. + + -- Oliver Grawert Fri, 15 Jul 2011 18:59:09 +0200 + +flash-kernel (2.28ubuntu27) oneiric; urgency=low + + * add Toshiba AC100 / Dynabook AZ support (requires abootimg) + + -- Oliver Grawert Thu, 14 Jul 2011 14:14:13 +0200 + +flash-kernel (2.28ubuntu26) oneiric; urgency=low + + * Dropping appending the root to /etc/flash-kernel.conf as its not needed + + -- Michael Casadevall Thu, 30 Jun 2011 08:27:19 -0700 + +flash-kernel (2.28ubuntu25) oneiric; urgency=low + + * Set the root partition for Panda + + -- Michael Casadevall Thu, 30 Jun 2011 06:15:22 -0700 + +flash-kernel (2.28ubuntu24) oneiric; urgency=low + + * Build a *working* boot.scr for Panda + + -- Michael Casadevall Thu, 30 Jun 2011 06:08:39 -0700 + +flash-kernel (2.28ubuntu23) oneiric; urgency=low + + * Extend f-k-i to properly write out the create the boot script + * Make flash-kernel --update-bootloader on OMAP also install a kernel+ramdisk + * Correctly handle a lack of boot.scr on the boot partition + * Properly unmount the FAT partition after bootloader update + + -- Michael Casadevall Wed, 29 Jun 2011 04:31:41 -0700 + +flash-kernel (2.28ubuntu22) oneiric; urgency=low + + * Add omap4 to the subarchitecture list for the udeb + + -- Michael Casadevall Mon, 27 Jun 2011 08:28:58 -0700 + +flash-kernel (2.28ubuntu21) oneiric; urgency=low + + * Add flash-kernel-installer support for OMAP4 + * Revert last upload due to brokeness + + -- Michael Casadevall Mon, 27 Jun 2011 10:39:24 +0000 + +flash-kernel (2.28ubuntu20) natty-proposed; urgency=low + + * Omit the check_subarch check for OMAP boards if linaro kernels are in use + (LP: #721147) + + -- Oliver Grawert Fri, 20 May 2011 15:53:30 +0200 + +flash-kernel (2.28ubuntu19) natty; urgency=low + + * IMX: Replace imx5 subarch with mx5; matches upstream kernel more closely + and seems to be what Debian will be using. It's easier to do the change + now, before there is any in archive kernel with the "imx5" subarch name. + * IMX: Use proper location for boot.script ($TMPMOUNT rather than /boot); + it wasn't possible to use this functionality with the incorrect directory. + + -- Ying-Chun Liu (PaulLiu) Fri, 15 Apr 2011 15:11:40 +0800 + +flash-kernel (2.28ubuntu18) natty; urgency=low + + * match omap4 hardware on "OMAP4 Panda board" as well (LP: #744862) + + -- Oliver Grawert Wed, 30 Mar 2011 11:55:56 +0200 + +flash-kernel (2.28ubuntu17) natty; urgency=low + + * IMX51: transition from redboot -> uboot + * IMX53: Add imx53 loco board support + + -- Ying-Chun Liu (PaulLiu) Tue, 08 Mar 2011 02:53:43 +0800 + +flash-kernel (2.28ubuntu16) natty; urgency=low + + * Don't check any subarch for the EfikaMX case, install whatever kernel is + apt-get install-ed; we can't get to a consensus on how to solve this + cleanly, so at least this will allow installation for people who know what + they are doing; LP: #671027. + + -- Loïc Minier Mon, 07 Mar 2011 12:15:26 +0100 + +flash-kernel (2.28ubuntu15) natty; urgency=low + + * Fix tabs vs. spaces. + * Uncomment check_subarch call for EfikaMX and replace "$running_subarch" + with "mx51" which seems more consistent and is similar to other boards; + see LP #671027. + * efikamx_flash_kernel(): remove $tmp. + + -- Loïc Minier Mon, 28 Feb 2011 16:10:02 +0100 + +flash-kernel (2.28ubuntu14) natty; urgency=low + + [ Marcin Juszkiewicz ] + * Add Efika MX Smartbook/Smarttop support based on work done by Genesi. + (LP: #671027) + + -- Oliver Grawert Thu, 17 Feb 2011 16:01:42 +0100 + +flash-kernel (2.28ubuntu13) natty; urgency=low + + * Add --update-bootloader argument which triggers updating x-loader + and u-boot files. The only supported boards for now are IGEPv2, + Beagle and Panda. + + -- Jani Monoses Wed, 26 Jan 2011 14:10:17 +0200 + +flash-kernel (2.28ubuntu12) natty; urgency=low + + * Update to final package name for mkimage: u-boot-tools. + + -- Loïc Minier Sat, 08 Jan 2011 12:33:59 +0100 + +flash-kernel (2.28ubuntu11) natty; urgency=low + + * mkimage moved from the uboot-mkimage to the u-boot package: + - update control to suggest u-boot | uboot-mkimage. + - update flash-kernel-installer.postinst to use a common function to + install mkimage and try installing u-boot in-target first. + + -- Loïc Minier Mon, 20 Dec 2010 10:47:49 +0100 + +flash-kernel (2.28ubuntu10) maverick; urgency=low + + * merge versatile espress support from Matt Waddel + to close (LP: #646141) + + -- Oliver Grawert Fri, 24 Sep 2010 13:44:19 +0200 + +flash-kernel (2.28ubuntu9) maverick; urgency=low + + * merge Loïcs patch from bug 645659 to add IGEP2 support (not autoclosing + that yet since jasper-initramfs fix is also pending) + + -- Oliver Grawert Thu, 23 Sep 2010 10:49:08 +0200 + +flash-kernel (2.28ubuntu8) maverick; urgency=low + + * Drop Vcs-Bzr; I've moved this to the package-import branch. + + -- Loïc Minier Thu, 26 Aug 2010 16:43:26 +0200 + +flash-kernel (2.28ubuntu7) maverick; urgency=low + + * chmod +x flash-kernel in the source package, as in Debian. + * Don't try to make backup of uImage or uInitrd if they don't exist (i.e. + flash-kernel gets installed into the chroot, but the udeb logic never + ran). + + -- Loïc Minier Thu, 26 Aug 2010 16:02:44 +0200 + +flash-kernel (2.28ubuntu6) maverick; urgency=low + + * skip flash-kernel with exit 0 if FLASH_KERNEL_SKIP env is set; in turn + make --supported fail with exit 1 if FLASH_KERNEL_SKIP is set (LP: #623276) + + -- Alexander Sack Tue, 24 Aug 2010 12:58:10 +0200 + +flash-kernel (2.28ubuntu5) maverick; urgency=low + + * changes to omap_flash_kernel() + - add quotes around ${UBOOT_PART} -n test + - use $kfile and $ifile instead of hardcoded /boot/vmlinuz and /boot/initrd.img + + -- John Rigby Wed, 04 Aug 2010 19:58:39 -0600 + +flash-kernel (2.28ubuntu4) maverick; urgency=medium + + * Implement generic subarchitecture support (LP: #607723) + * Implement initial OMAP4 installation support + * Add OMAP4 Blaze Board to whitelists + + -- Michael Casadevall Tue, 20 Jul 2010 09:48:01 +0000 + +flash-kernel (2.28ubuntu3) maverick; urgency=low + + * use /boot/boot.script if it exists as input for boot.scr on OMAP + + -- Oliver Grawert Fri, 09 Jul 2010 14:08:17 +0200 + +flash-kernel (2.28ubuntu2) maverick; urgency=low + + * add support for OMAP4 pandaboard + + -- Oliver Grawert Thu, 08 Jul 2010 18:33:06 +0200 + +flash-kernel (2.28ubuntu1) maverick; urgency=low + + * Merge from debian unstable. Remaining changes: + - Use XS-Debian-Vcs-Svn instead of commenting Vcs-Svn out + - Add Suggests: on redboot-tools for the fis command. + - Add Suggests: on uboot-envtools for fw_setenv command + - Implement support for OMAP3 Beagle Board + - Implement support for Marvell dove board + - Implement support for Freescale MX51 Babbage Board + - Add above architectures to README file + - Change descriptions from Debian kernel/initramfs to Ubuntu kernel/initramfs + - Create /target/etc/flash-kernel.conf from flash-kernel-installer.postinst + - Source /etc/flash-kernel.conf if present. + - Detect UUID of /target and set proper cmdline upon install + - Adjust versioned initramfs-tools dependency to ubuntu version + + -- Oliver Grawert Wed, 06 May 2010 14:34:14 +0200 + flash-kernel (2.28) unstable; urgency=low [ John Holland ] @@ -143,6 +448,168 @@ -- Martin Michlmayr Sun, 08 Mar 2009 22:03:02 +0100 +flash-kernel (2.13ubuntu17) lucid; urgency=low + + * add "fixrtc" option to default cmdline for OMAP3 Beagle, this fixes the + fsck issues on this board which has no rtc battery by setting the clock to + the last mount time of the disk during boot. + + -- Oliver Grawert Sat, 24 Apr 2010 09:46:10 +0200 + +flash-kernel (2.13ubuntu16) lucid; urgency=low + + * move uboot-envtools to a suggests, having it on the images will be handled + via seeding + + -- Oliver Grawert Fri, 16 Apr 2010 11:37:35 +0200 + +flash-kernel (2.13ubuntu15) lucid; urgency=low + + * add support for OMAP3 Beagle Board NAND flashing to flash-kernel + * add default setup for beagle uboot NAND booting to flash-kernel-installer + * add dependency on uboot-envtools for fw_setenv command + * add omap to supported subarch in flash-kernel-installer.isinstallable and + debian/control + + -- Oliver Grawert Thu, 15 Apr 2010 14:03:27 +0200 + +flash-kernel (2.13ubuntu14) lucid; urgency=low + + * rebuild rest of main for armel armv7/thumb2 optimization; + UbuntuSpec:mobile-lucid-arm-gcc-v7-thumb2 + + -- Alexander Sack Fri, 05 Mar 2010 04:15:09 +0100 + +flash-kernel (2.13ubuntu13) karmic; urgency=low + + * Drop hardcoded mem= arg on Dove; LP: #435151. + + -- Loïc Minier Mon, 19 Oct 2009 14:42:52 +0200 + +flash-kernel (2.13ubuntu12) karmic; urgency=low + + [ Michael Casadevall ] + * Misc updates and bug fixes to Dove implementation (LP: #430344) + - Update kernel cmdline to include splash, quiet, and ro, and to drop + console=tty0 since it is the default. + - Update boot script to remove partition scanning in boot script in order + to increase boot speed; try to obtain fs/interface/deveice/prefix from + caller and limit scan to the first two usb and ide partitions. + - Add a test to prevent booting of old images in memory. + + -- Loïc Minier Tue, 06 Oct 2009 00:16:15 +0200 + +flash-kernel (2.13ubuntu11) karmic; urgency=low + + [ Loïc Minier ] + * Use XS-Debian-Vcs-Svn instead of commenting Vcs-Svn out; thanks + Colin Watson. + + [ Oliver Grawert ] + * drop video= option from cmdline in flash-kernel-installer.postinst, + we should not need it anymore + + -- Oliver Grawert Wed, 21 Sep 2009 08:48:26 +0200 + +flash-kernel (2.13ubuntu10) karmic; urgency=low + + [ Loïc Minier ] + * Replace Vcs-Svn with Vcs-Bzr in control. + + [ Michael Casadevall ] + * Change descriptions from Debian kernel/initramfs to Ubuntu kernel/initramfs + * Added support for dove (LP: #409238) + * Added imx51 to subarchitecture line in control file + + [ Loïc Minier ] + * Misc fixes to dove support. + + -- Loïc Minier Wed, 16 Sep 2009 00:14:54 +0200 + +flash-kernel (2.13ubuntu9) karmic; urgency=low + + * add video=mxcfb:1024x768@60 to default cmdline options for babbage boards + in flash-kernel-installer.postinst else the mxcfb driver will not display + anything. + * default to use splash on imx51 babbage systems + + -- Oliver Grawert Sat, 29 Aug 2009 11:42:10 +0200 + +flash-kernel (2.13ubuntu8) karmic; urgency=low + + * Use block-attr from di-utils 1.68. + + -- Colin Watson Tue, 12 May 2009 17:33:02 +0100 + +flash-kernel (2.13ubuntu7) jaunty; urgency=low + + * anna-install redboot-tools-udeb in flash-kernel-installer.postinst to + ensure the udeb is installed. + * flash-kernel-installer.postinst: for MX51 Babbage call update-initramfs at + the end of the install. + + -- Loic Minier Tue, 14 Apr 2009 11:24:22 +0200 + +flash-kernel (2.13ubuntu6) jaunty; urgency=low + + * add checks for kernel and initramfs fis partitions + * allow more flexibility in naming kernel and initramfs fis partitions + * add final newline to exec redboot command, so we dont produce garbage in + serial terminal output + * quieten down teh fconfig write of the script + + -- Oliver Grawert Wed, 08 Apr 2009 14:40:28 +0200 + +flash-kernel (2.13ubuntu5) jaunty; urgency=low + + * add support for Freescale MX51 Babbage Board to + flash-kernel-installer.postinst (LP: #345534) + * create /target/etc/flash-kernel.conf from flash-kernel-installer.postinst + (LP: #352260) + * detect UUID of /target and set proper cmdline upon install with + flash-kernel-installer.postinst + + -- Oliver Grawert Tue, 31 Mar 2009 20:47:01 +0200 + +flash-kernel (2.13ubuntu4) jaunty; urgency=low + + * Used named signals for "trap". + * Source /etc/flash-kernel.conf if present. + * Babbage: rename $dev to $fis_dev. + * Babbage: don't hardcode $fis_dev, $fis_offset_hex, and $fis_size_hex but + read them from /etc/flash-kernel.conf instead. + + -- Loic Minier Tue, 31 Mar 2009 17:45:02 +0200 + +flash-kernel (2.13ubuntu3) jaunty; urgency=low + + * flash-kernel: fix generation of padded initramfs for imx51. + - Generate a padded initramfs file; this is needed as just doing the + padding on the initrd data will let the "fis" command write a datalength + equal to the real initramfs length instead of using the length of the + initramfs partition (which is the length we want to pass to RedBoot in + exec -s). + - Add a cleanup mechanism via "trap"; cleanup the padded initramfs file. + - Remove previous hacks. + + -- Loic Minier Tue, 31 Mar 2009 17:07:07 +0200 + +flash-kernel (2.13ubuntu2) jaunty; urgency=low + + * flash-kernel: Move Freescale MX51 Babbage Board around to be in its + alphabetical place. + * flash-kernel-installer.isinstallable, .postinst: mark imx51 as installable + and just run "update-initramfs -u" to install for now. + + -- Loic Minier Tue, 31 Mar 2009 11:19:22 +0200 + +flash-kernel (2.13ubuntu1) jaunty; urgency=low + + * flash-kernel: add support for Freescale MX51 Babbage Board; depend on + redboot-tools for the fis command. + + -- Loic Minier Tue, 31 Mar 2009 11:09:10 +0200 + flash-kernel (2.13) unstable; urgency=high * Map LVM devices in the form of /dev/vg/lv to /dev/mapper/..., diff -Nru flash-kernel-2.28/debian/control flash-kernel-2.28ubuntu42/debian/control --- flash-kernel-2.28/debian/control 2010-03-16 16:16:26.000000000 +0000 +++ flash-kernel-2.28ubuntu42/debian/control 2012-01-30 18:54:18.000000000 +0000 @@ -1,16 +1,17 @@ Source: flash-kernel Section: utils Priority: optional -Maintainer: Debian Install System Team -Uploaders: Martin Michlmayr , Joey Hess , Wouter Verhelst +Maintainer: Ubuntu Installer Team +XSBC-Original-Maintainer: Debian Install System Team +Uploaders: Martin Michlmayr , Joey Hess Build-Depends: debhelper (>= 7.3.10) Standards-Version: 3.7.2 -Vcs-Svn: svn://svn.debian.org/d-i/trunk/packages/flash-kernel +XS-Debian-Vcs-Svn: svn://svn.debian.org/d-i/trunk/packages/flash-kernel Package: flash-kernel -Architecture: arm armel armeb -Depends: devio, initramfs-tools (>= 0.92f) -Suggests: uboot-mkimage +Architecture: arm armel armeb armhf +Depends: devio, initramfs-tools (>= 0.92bubuntu28) +Suggests: u-boot-tools | uboot-mkimage, uboot-envtools, redboot-tools, abootimg Description: utility to make certain embedded devices bootable flash-kernel is a script which will put the kernel and initramfs in the boot location of embedded devices that don't load the kernel and @@ -22,9 +23,9 @@ Section: debian-installer Priority: standard XC-Package-Type: udeb -Architecture: arm armel armeb -XB-Subarchitecture: iop32x ixp4xx kirkwood orion5x +Architecture: arm armel armeb armhf +XB-Subarchitecture: armadaxp dove imx51 iop32x ixp4xx kirkwood orion5x omap omap4 Provides: bootable-system -Depends: cdebconf-udeb, installed-base +Depends: cdebconf-udeb, installed-base, di-utils (>= 1.68) XB-Installer-Menu-Item: 7300 Description: Make the system bootable diff -Nru flash-kernel-2.28/debian/flash-kernel-installer.isinstallable flash-kernel-2.28ubuntu42/debian/flash-kernel-installer.isinstallable --- flash-kernel-2.28/debian/flash-kernel-installer.isinstallable 2010-03-16 16:16:26.000000000 +0000 +++ flash-kernel-2.28ubuntu42/debian/flash-kernel-installer.isinstallable 2012-01-30 18:54:18.000000000 +0000 @@ -2,6 +2,15 @@ set -e case "`archdetect`" in + arm*/dove) + exit 0 + ;; + arm*/armadaxp) + exit 0 + ;; + arm*/imx51) + exit 0 + ;; arm*/iop32x) exit 0 ;; @@ -14,6 +23,12 @@ arm*/orion5x) exit 0 ;; + arm*/omap) + exit 0 + ;; + arm*/omap4) + exit 0 + ;; # Don't activate it by default *) exit 1 diff -Nru flash-kernel-2.28/debian/flash-kernel-installer.postinst flash-kernel-2.28ubuntu42/debian/flash-kernel-installer.postinst --- flash-kernel-2.28/debian/flash-kernel-installer.postinst 2010-03-16 16:16:26.000000000 +0000 +++ flash-kernel-2.28ubuntu42/debian/flash-kernel-installer.postinst 2012-03-22 19:20:11.000000000 +0000 @@ -20,6 +20,12 @@ mount | grep "on /target${1%/} " | tail -n1 | cut -d' ' -f1 } +install_mkimage() { + if ! apt-install u-boot-tools && ! apt-install uboot-mkimage; then + error "apt-install uboot-mkimage failed" + fi +} + # Are we writing to flash or constructing an image on disk? write_to_flash() { case "$machine" in @@ -32,6 +38,9 @@ "GLAN Tank") return 1 ;; + "Highbank") + return 1 + ;; "HP Media Vault mv2120") return 1 ;; @@ -47,6 +56,12 @@ "Marvell eSATA SheevaPlug Reference Board") return 1 ;; + "Marvell DB-MV88F6781-BP Development Board") + return 1 + ;; + "Marvell Armada XP Development Board") + return 1 + ;; # Assume that we write to flash for all other devices *) return 0 @@ -56,6 +71,78 @@ machine=$(grep "^Hardware" /proc/cpuinfo | sed 's/Hardware\s*:\s*//') +dove_flash_kernel_installer() { + in-target update-initramfs -u || true + install_mkimage + + # Add the rootfs to the flash-kernel.conf file + rootfs=$(findfs /) + uuid="$(block-attr --uuid "$rootfs")" + echo "rootfs='root=UUID=$uuid'" > /target/etc/flash-kernel.conf +} + +highbank_flash_kernel_installer() { + in-target update-initramfs -u || true + install_mkimage + + # Add the rootfs to the flash-kernel.conf file + rootfs=$(findfs /) + uuid="$(block-attr --uuid "$rootfs")" + echo "rootfs='root=UUID=$uuid'" > /target/etc/flash-kernel.conf +} + +omap_install_uboot() { + # Find the rootfs + rootfs=$(findfs /) + + if ! apt-install $uboot_pkg; then + error "apt-install u-boot failed" + fi + + # Add the u-boot partition to the flash-kernl.conf file + # FIXME: figure out how to properly autodetect this + echo "UBOOT_PART=/dev/mmcblk0p1" > /target/etc/flash-kernel.conf + + # Add the root + uuid="$(block-attr --uuid "$rootfs")" + rootfs="root=UUID=$uuid" + + # Write out the boot script + cat >"/target/boot/boot.script" < /target/etc/flash-kernel.conf + echo "fis_offset_hex=${fis_offset_hex}" >> /target/etc/flash-kernel.conf + echo "fis_size_hex=${fis_size_hex}" >> /target/etc/flash-kernel.conf + # find fis configuration + ofst=$(LC_ALL=C fis -d "$fis_dev" -o $fis_offset_hex list | sed -rn "s/^[[:space:]]*RedBoot config: addr = (0x[0-9a-f]{8}), size = 0x[0-9a-f]{8}, entry = 0x[0-9a-f]{8}, length = 0x[0-9a-f]{8}, cksum = 0x[0-9a-f]{8}\$/\1/p") + if [ -z "$ofst" ]; then + error "could not find fis configuration on $fis_dev" + fi + # required to assemble redboot script + initrd_names="initrd initramfs" + for name in $initrd_names; do + if fis -d "$fis_dev" -o $fis_offset_hex list | grep -q "^[[:space:]]*$name:"; then + initrd_name=$name + fi + done + if [ -z "$initrd_name" ];then + error "no fis partition with valid name for initramfs found" fi + kernel_names="vmlinuz kernel" + for name in $kernel_names; do + if fis -d "$fis_dev" -o $fis_offset_hex list | grep -q "^[[:space:]]*$name:"; then + kernel_name=$name + fi + done + if [ -z "$kernel_name" ];then + error "no fis partition with valid name for kernel found" + fi + load_initrd="fis load $initrd_name" + load_kernel="fis load $kernel_name" + # find target UUID + rootfs="$(findfs /)" + uuid="$(block-attr --uuid "$rootfs")" + # assemble cmdline + cmdline="\"root=UUID=$uuid ro quiet splash\"" + script="$load_initrd\\$load_kernel\\exec -r 0x1000000 -s 0x00940000 -c $cmdline\\" + fconfig -w -s -d "$fis_dev" -o $ofst -n boot_script_data -x "$script" + in-target update-initramfs -u || true ;; "GLAN Tank") in-target update-initramfs -u || true ;; + "Highbank") + highbank_flash_kernel_installer + ;; "HP Media Vault mv2120") if ! apt-install mv2120-utils; then # mv2120-utils includes some initramfs-tools scripts @@ -102,9 +238,7 @@ log "apt-install mv2120-utils failed" fi in-target update-initramfs -u || true - if ! apt-install uboot-mkimage; then - error "apt-install uboot-mkimage failed" - fi + install_mkimage # The firmware loads /boot/uImage from the first partition # but uImage will be in / if a separate boot partition is # used. In this case, create a /boot/boot -> /boot symlink. @@ -134,24 +268,41 @@ error "apt-install apex-nslu2 failed" fi ;; + "OMAP3 Beagle Board") + omap_flash_kernel_installer + ;; + "OMAP4 Panda board") + omap4_flash_kernel_installer + ;; "Marvell OpenRD Base Board" | "Marvell OpenRD Client Board" | "Marvell SheevaPlug Reference Board" | "Marvell eSATA SheevaPlug Reference Board") in-target update-initramfs -u || true - if ! apt-install uboot-mkimage; then - error "apt-install uboot-mkimage failed" - fi + install_mkimage + ;; + "Marvell DB-MV88F6781-BP Development Board") + dove_flash_kernel_installer + ;; + "Marvell Armada XP Development Board") + dove_flash_kernel_installer ;; "Thecus N2100" | "Thecus N4100") in-target update-initramfs -u || true ;; "QNAP TS-109/TS-209" | "QNAP TS-119/TS-219" | "QNAP TS-409" | "QNAP TS-41x") in-target update-initramfs -u || true - if ! apt-install uboot-mkimage; then - error "apt-install uboot-mkimage failed" - fi + install_mkimage ;; "Lanner EM7210") in-target update-initramfs -u || true ;; + *) + case "`archdetect`" in + "arm*/dove" | "arm*/armadaxp") + dove_flash_kernel_installer + ;; + "arm*/omap" | "arm*/omap4") + omap_flash_kernel_installer + esac + ;; esac db_progress STEP 1 diff -Nru flash-kernel-2.28/debian/flash-kernel.install flash-kernel-2.28ubuntu42/debian/flash-kernel.install --- flash-kernel-2.28/debian/flash-kernel.install 2010-03-16 16:16:26.000000000 +0000 +++ flash-kernel-2.28ubuntu42/debian/flash-kernel.install 2011-12-06 19:44:42.000000000 +0000 @@ -1,2 +1,4 @@ flash-kernel usr/sbin initramfs-tools usr/share +debian/kernel/postinst.d/zz-flash-kernel etc/kernel/postinst.d/ +debian/initramfs/post-update.d/zz-flash-kernel etc/initramfs/post-update.d/ diff -Nru flash-kernel-2.28/debian/initramfs/post-update.d/zz-flash-kernel flash-kernel-2.28ubuntu42/debian/initramfs/post-update.d/zz-flash-kernel --- flash-kernel-2.28/debian/initramfs/post-update.d/zz-flash-kernel 1970-01-01 00:00:00.000000000 +0000 +++ flash-kernel-2.28ubuntu42/debian/initramfs/post-update.d/zz-flash-kernel 2011-12-06 19:44:42.000000000 +0000 @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +version="$1" + +if flash-kernel --supported >/dev/null 2>&1; then + flash-kernel ${version} + return 0 +fi diff -Nru flash-kernel-2.28/debian/kernel/postinst.d/zz-flash-kernel flash-kernel-2.28ubuntu42/debian/kernel/postinst.d/zz-flash-kernel --- flash-kernel-2.28/debian/kernel/postinst.d/zz-flash-kernel 1970-01-01 00:00:00.000000000 +0000 +++ flash-kernel-2.28ubuntu42/debian/kernel/postinst.d/zz-flash-kernel 2011-12-06 19:44:42.000000000 +0000 @@ -0,0 +1,73 @@ +#!/bin/sh + +set -e + +version="$1" +STATEDIR=/var/lib/initramfs-tools + +error() +{ + echo "E: ${1}" > /dev/stderr; exit 1 +} + +warning() +{ + echo "W: ${1}" > /dev/stderr +} + +[ -z "${version}" ] && error "flash-kernel: kernel version is required" + +# avoid running multiple times +if [ -n "$DEB_MAINT_PARAMS" ]; then + eval set -- "$DEB_MAINT_PARAMS" + if [ -z "$1" ] || [ "$1" != "configure" ]; then + exit 0 + fi +fi + +get_sorted_versions() +{ + version_list="" + + for gsv_x in "${STATEDIR}"/*; do + gsv_x="$(basename "${gsv_x}")" + if [ "${gsv_x}" = '*' ]; then + return 0 + fi + worklist="" + for gsv_i in $version_list; do + if dpkg --compare-versions "${gsv_x}" '>' "${gsv_i}"; then + worklist="${worklist} ${gsv_x} ${gsv_i}" + gsv_x="" + else + worklist="${worklist} ${gsv_i}" + fi + done + if [ "${gsv_x}" != "" ]; then + worklist="${worklist} ${gsv_x}" + fi + version_list="${worklist}" + done +} + +highest_installed_version() +{ + get_sorted_versions + if [ -z "${version_list}" ]; then + return + fi + set -- ${version_list} + echo ${1} +} + +installed="$(highest_installed_version)" + +if dpkg --compare-versions "${installed}" gt "${version}"; then + warning "There is already a newer kernel installed, the default is now ${version}" + warning "If you instead want to use the latest installed kernel on your system, run" + warning "sudo flash-kernel ${installed}" +fi + +if flash-kernel --supported >/dev/null 2>&1; then + flash-kernel ${version} +fi