diffstat for flash-kernel-3.0~rc.4 flash-kernel-3.0~rc.4ubuntu33co2endless1 README | 6 bootscript/bootscr.armadaxp | 42 +++ bootscript/bootscr.highbank | 7 bootscript/bootscr.omap | 2 bootscript/uEnvtxt.omap | 2 db/all.db | 73 +++++ debian/changelog | 331 +++++++++++++++++++++++++ debian/control | 7 debian/flash-kernel-installer.install | 1 debian/flash-kernel-installer.isinstallable | 12 debian/flash-kernel-installer.postinst | 19 + debian/flash-kernel.default | 1 functions | 40 ++- initramfs-hook/flash-kernel | 12 initramfs-tools/hooks/flash_kernel_set_root | 37 +- kernel-hook/zz-flash-kernel | 12 post-base-installer.d/01flash-kernel-diversion | 9 17 files changed, 580 insertions(+), 33 deletions(-) diff -Nru flash-kernel-3.0~rc.4/README flash-kernel-3.0~rc.4ubuntu33co2endless1/README --- flash-kernel-3.0~rc.4/README 2012-03-09 15:11:01.000000000 +0000 +++ flash-kernel-3.0~rc.4ubuntu33co2endless1/README 2013-07-19 16:53:29.000000000 +0000 @@ -22,15 +22,21 @@ - Genesi Efika Smartbook - GLAN Tank - GuruPlug + - Calxeda Highbank Server architecture - HP t5325 Thin Client - HP Media Vault mv2120 - Intel SS4000-E - Linksys NSLU2 + - Marvell Armada XP Development Board (Ubuntu) - Marvell DB-78x00-BP Development Board - Marvell OpenRD-Base - Marvell OpenRD-Client - Marvell OpenRD-Ultimate - Neo FreeRunner (GTA02) + - ODROIDU2 + - ODROIDX2 + - OMAP3 Beagle Board + - OMAP4 Panda board - QNAP TS-109 - QNAP TS-110 Turbo NAS - QNAP TS-119 Turbo NAS diff -Nru flash-kernel-3.0~rc.4/bootscript/bootscr.armadaxp flash-kernel-3.0~rc.4ubuntu33co2endless1/bootscript/bootscr.armadaxp --- flash-kernel-3.0~rc.4/bootscript/bootscr.armadaxp 1970-01-01 00:00:00.000000000 +0000 +++ flash-kernel-3.0~rc.4ubuntu33co2endless1/bootscript/bootscr.armadaxp 2013-04-22 19:51:33.000000000 +0000 @@ -0,0 +1,42 @@ +echo Starting Ubuntu... +if test -n ${fs} && test -n ${interface} && test -n ${device} && test -n ${prefix}; then + ${fs}load ${interface} ${device} 0x02000000 ${prefix}uImage + ${fs}load ${interface} ${device} 0x20000000 ${prefix}uInitrd + setenv bootargs ro quiet splash + bootm 0x02000000 0x20000000 +fi + +echo boot information not recieved from u-boot, scanning for startup device + +if test -e ${reinitalize_devices}; then + usb start; + ide reset; +fi + +for i in usb ide; do + for j in 0 1; do + for l in / /boot/; do + for m in fat ext2; do + setenv interface $i; + setenv device $j; + setenv prefix $l; + setenv fs $m; + + echo Scanning ${fs} ${interface} ${device} on prefix ${prefix} ...; + + # This "if" avoids loading an old image but + # doesn't work in stock u-boot 1.3.4 and is + # only fixed in Canonical u-boot from October + # 1st or later + + if ${fs}load ${interface} ${device} 0x1000 ${prefix}boot.scr; then + if imi 0x1000; then + echo boot.scr found! Executing ...; + autoscr 0x1000; + fi; + fi + done; + done; + done; +done +echo No boot device found.; diff -Nru flash-kernel-3.0~rc.4/bootscript/bootscr.highbank flash-kernel-3.0~rc.4ubuntu33co2endless1/bootscript/bootscr.highbank --- flash-kernel-3.0~rc.4/bootscript/bootscr.highbank 1970-01-01 00:00:00.000000000 +0000 +++ flash-kernel-3.0~rc.4ubuntu33co2endless1/bootscript/bootscr.highbank 2013-04-22 19:51:33.000000000 +0000 @@ -0,0 +1,7 @@ +echo Starting Ubuntu... +setenv bootargs console=ttyAMA0 nosplash +mw.l 800000 0 10000 +scsi scan +ext2load scsi 0 0x800000 vmlinuz +ext2load scsi 0 0x1000000 initrd.img +bootz 0x800000 0x1000000:${filesize} 0x1000 diff -Nru flash-kernel-3.0~rc.4/bootscript/bootscr.omap flash-kernel-3.0~rc.4ubuntu33co2endless1/bootscript/bootscr.omap --- flash-kernel-3.0~rc.4/bootscript/bootscr.omap 2012-03-09 15:11:01.000000000 +0000 +++ flash-kernel-3.0~rc.4ubuntu33co2endless1/bootscript/bootscr.omap 2013-04-22 19:51:33.000000000 +0000 @@ -1,4 +1,4 @@ fatload mmc 0:1 0x82000000 uImage fatload mmc 0:1 0x83000000 uInitrd -setenv bootargs ro +setenv bootargs ro quiet splash bootm 0x82000000 0x83000000 diff -Nru flash-kernel-3.0~rc.4/bootscript/uEnvtxt.omap flash-kernel-3.0~rc.4ubuntu33co2endless1/bootscript/uEnvtxt.omap --- flash-kernel-3.0~rc.4/bootscript/uEnvtxt.omap 1970-01-01 00:00:00.000000000 +0000 +++ flash-kernel-3.0~rc.4ubuntu33co2endless1/bootscript/uEnvtxt.omap 2013-04-22 19:51:33.000000000 +0000 @@ -0,0 +1,2 @@ +bootcmd=fatload mmc 0:1 0x80000000 uImage;fatload mmc 0:1 0x81600000 uInitrd; bootm 0x80000000 0x81600000 +uenvcmd=boot diff -Nru flash-kernel-3.0~rc.4/db/all.db flash-kernel-3.0~rc.4ubuntu33co2endless1/db/all.db --- flash-kernel-3.0~rc.4/db/all.db 2012-03-10 00:14:30.000000000 +0000 +++ flash-kernel-3.0~rc.4ubuntu33co2endless1/db/all.db 2014-02-27 12:49:31.000000000 +0000 @@ -59,6 +59,15 @@ Required-packages: u-boot-tools Bootloader-sets-root: no +Machine: Freescale i.MX6 Quad (Device Tree) +Kernel-Flavors: mx6 +U-Boot-Kernel-Address: 0x10008000 +U-Boot-Initrd-Address: 0x0 +Boot-Kernel-Path: /boot/uImage +Boot-Initrd-Path: /boot/uInitrd +Required-packages: u-boot-tools +Bootloader-sets-root: no + Machine: Genesi Efika Smartbook Kernel-Flavors: mx5 U-Boot-Kernel-Address: 0x90008000 @@ -97,6 +106,12 @@ Required-packages: u-boot-tools Bootloader-sets-root: yes +Machine: Highbank +Kernel-Flavors: generic highbank +Required-Packages: u-boot-tools +Boot-Script-Path: /boot/boot.scr +U-Boot-Script-Name: bootscr.highbank + Machine: HP Media Vault mv2120 Kernel-Flavors: orion5x Machine-Id: 1693 @@ -137,6 +152,17 @@ Required-packages: apex-nslu2 nslu2-utils Bootloader-sets-root: no +Machine: Marvell Armada XP Development Board +Kernel-Flavors: armadaxp +U-Boot-Kernel-Address: 0x8000 +U-Boot-Initrd-Address: 0x0 +U-Boot-Script-Address: 0x1000 +U-Boot-Script-Name: bootscr.armadaxp +Boot-Kernel-Path: /boot/uImage +Boot-Initrd-Path: /boot/uInitrd +Required-Packages: u-boot-tools +Bootloader-sets-root: no + Machine: Marvell DB-78x00-BP Development Board U-Boot-Kernel-Address: 0x8000 U-Boot-Initrd-Address: 0x0 @@ -199,18 +225,53 @@ Required-Packages: u-boot-tools Bootloader-sets-root: no +Machine: ODROID-U2/U3 +Kernel-Flavors: odroidu2 +U-Boot-Kernel-Address: 0x40008000 +U-Boot-Initrd-Address: 0x42000000 +Boot-Device: /dev/mmcblk0p1 +Boot-Kernel-Path: uImage +Boot-Initrd-Path: uInitrd +Boot-Script-Path: boot.scr +Required-packages: u-boot-tools +Bootloader-sets-root: no + +Machine: ODROIDX2 +Kernel-Flavors: odroidx2 +U-Boot-Kernel-Address: 0x40008000 +U-Boot-Initrd-Address: 0x42000000 +Boot-Device: /dev/mmcblk0p1 +Boot-Kernel-Path: uImage +Boot-Initrd-Path: uInitrd +Boot-Script-Path: boot.scr +Required-packages: u-boot-tools +Bootloader-sets-root: no + +Machine: OMAP3 Beagle Board +Method: generic +U-Boot-Kernel-Address: 0x80008000 +U-Boot-Initrd-Address: 0x0 +U-Boot-Script-Address: 0x0 +U-Boot-Script-Name: uEnvtxt.omap +Boot-Device: /dev/mmcblk0p1 +Boot-Kernel-Path: uImage +Boot-Initrd-Path: uInitrd +Boot-Script-Path: preEnv.txt +Required-Packages: u-boot-tools +Bootloader-sets-root: yes + Machine: OMAP4 Panda board Method: generic U-Boot-Kernel-Address: 0x80008000 U-Boot-Initrd-Address: 0x0 U-Boot-Script-Address: 0x0 -U-Boot-Script-Name: bootscr.omap +U-Boot-Script-Name: uEnvtxt.omap Boot-Device: /dev/mmcblk0p1 Boot-Kernel-Path: uImage Boot-Initrd-Path: uInitrd -Boot-Script-Path: boot.scr +Boot-Script-Path: preEnv.txt Required-Packages: u-boot-tools -Bootloader-sets-root: no +Bootloader-sets-root: yes Machine: QNAP TS-109/TS-209 Kernel-Flavors: orion5x @@ -270,3 +331,9 @@ Android-Boot-Device: /dev/mmcblk0 Required-Packages: abootimg Bootloader-sets-root: no + +Machine: grouper +Method: android +Android-Boot-Device: /dev/mmcblk0 +Required-Packages: abootimg +Bootloader-sets-root: yes diff -Nru flash-kernel-3.0~rc.4/debian/changelog flash-kernel-3.0~rc.4ubuntu33co2endless1/debian/changelog --- flash-kernel-3.0~rc.4/debian/changelog 2012-03-11 14:51:49.000000000 +0000 +++ flash-kernel-3.0~rc.4ubuntu33co2endless1/debian/changelog 2014-02-27 12:36:47.000000000 +0000 @@ -1,3 +1,334 @@ +flash-kernel (3.0~rc.4ubuntu33co2endless1) eos; urgency=medium + + * db/all.db: Recognize ODROID-U2/U3 as the machine name for Odroid U2 (and + U3). This got changed by hardkernel in the latest kernels + * debian/control: Alternatively depend on dracut instead of initramfstools + + -- Sjoerd Simons Thu, 27 Feb 2014 13:31:56 +0100 + +flash-kernel (3.0~rc.4ubuntu33co2) alphacentauri; urgency=low + + * Add Odroid U2, X2 support. Thanks Javier Mtnez. Canillas. + + -- Hector Oron Fri, 19 Jul 2013 18:55:50 +0200 + +flash-kernel (3.0~rc.4ubuntu33co1) alphacentauri; urgency=low + + [ Merge-o-Matic for Chaiwala ] + * Merge from Ubuntu raring. Remaining changes: + - SUMMARISE HERE + + -- Merge-o-Matic for Chaiwala Mon, 22 Apr 2013 19:51:35 +0000 + +flash-kernel (3.0~rc.4ubuntu33) raring; urgency=low + + * Also update XB-Subarchitecture to use "generic" instead of 'highbank" + (LP: #1170515) + + -- dann frazier Sun, 21 Apr 2013 09:36:29 -0600 + +flash-kernel (3.0~rc.4ubuntu32co1) UNRELEASED; urgency=low + + * Merge from Ubuntu raring. Remaining changes: + - SUMMARISE HERE + + -- Merge-o-Matic for Chaiwala Fri, 19 Apr 2013 07:43:52 +0000 + +flash-kernel (3.0~rc.4ubuntu32) raring; urgency=low + + * flash-plugin-installer: make installable on armhf/generic for highbank + + -- dann frazier Thu, 18 Apr 2013 16:39:18 -0600 + +flash-kernel (3.0~rc.4ubuntu31co1) UNRELEASED; urgency=low + + * Merge from Ubuntu raring. Remaining changes: + - SUMMARISE HERE + + -- Merge-o-Matic for Chaiwala Thu, 11 Apr 2013 09:25:29 +0000 + +flash-kernel (3.0~rc.4ubuntu31) raring; urgency=low + + * Accept "generic" as a valid kernel flavor on highbank (LP: #1164074) + + -- dann frazier Wed, 03 Apr 2013 12:48:56 -0600 + +flash-kernel (3.0~rc.4ubuntu30co1) UNRELEASED; urgency=low + + * Merge from Ubuntu raring. Remaining changes: + - SUMMARISE HERE + + -- Merge-o-Matic for Chaiwala Fri, 29 Mar 2013 20:04:37 +0000 + +flash-kernel (3.0~rc.4ubuntu30) raring; urgency=low + + * Do not run flash-kernel inside an LXC container (LP: #1160360) + + -- Jean-Baptiste Lallement Wed, 27 Mar 2013 16:29:20 +0100 + +flash-kernel (3.0~rc.4ubuntu29co1) earlgrey; urgency=low + + * Merge from Ubuntu raring. Remaining changes: + - Added support for iMX6 Sabrelite. + + -- Merge-o-Matic for Chaiwala Fri, 15 Feb 2013 17:56:32 +0000 + +flash-kernel (3.0~rc.4ubuntu29) raring; urgency=low + + * determine the latest installer kernel version in the target rootfs instead + of assuming the version is the same as the running kernel (LP: #1084106) + * drop the "|| true" from the initramfs building code, if we fail here we + actually dont want to attempt to flash that + + -- Oliver Grawert Tue, 04 Dec 2012 17:24:49 +0100 + +flash-kernel (3.0~rc.4ubuntu28) raring; urgency=low + + * make sure blkid only gives us the UUID and not any other metadata like + labels or filesystem (LP: #1079185) + + -- Oliver Grawert Fri, 16 Nov 2012 15:40:21 +0100 + +flash-kernel (3.0~rc.4ubuntu27.1co1) darjeeling; urgency=low + + [ Merge-o-Matic for Chaiwala ] + * Merge from Ubuntu quantal-updates. Remaining changes: + - Added support for iMX6 Sabrelite. + + -- Hector Oron Thu, 27 Dec 2012 17:57:12 +0000 + +flash-kernel (3.0~rc.4ubuntu27.1) quantal; urgency=low + + * Ask blkid for UUID, fixes finding filesystems with labels (LP: #1079185) + * Determine the latest installed kernel version from the target instead + of assuming the version is the same as the running kernel (LP: #1084106) + + -- Adam Conrad Mon, 10 Dec 2012 09:31:39 -0700 + +flash-kernel (3.0~rc.4ubuntu27co1) ceylon; urgency=low + + * Added support for iMX6 Sabrelite. (BUG: #1019) + + -- Konstantinos Margaritis Tue, 13 Nov 2012 21:03:07 +0200 + +flash-kernel (3.0~rc.4ubuntu27) quantal; urgency=low + + * add support for the grouper architecture + + -- Oliver Grawert Mon, 08 Oct 2012 14:44:41 +0200 + +flash-kernel (3.0~rc.4ubuntu26) quantal-proposed; urgency=low + + * make sure that /dev is bind mounted in /target when running + update-initramfs from flash-kernel-installer, else we do not find the boot + media (this is only a workaround for LP: #1056482 actual fixing of the + netinst environment is needed to fix this properly) + + -- Oliver Grawert Wed, 26 Sep 2012 15:27:06 +0200 + +flash-kernel (3.0~rc.4ubuntu25) quantal; urgency=low + + * make sure we only rename the bootrom partition so udisks hides it, + when using mkdosfs for setting the label like we did in jasper (where + we cached the contents before doing this) MLO and u-boot.bin are gone + (LP: #1055938). + + -- Oliver Grawert Tue, 25 Sep 2012 10:31:32 +0200 + +flash-kernel (3.0~rc.4ubuntu24) quantal; urgency=low + + * hide the boot device from udisk's automounting after installation + on all systems using uEnv.txt to configure u-boot + + -- Oliver Grawert Mon, 17 Sep 2012 14:25:37 +0200 + +flash-kernel (3.0~rc.4ubuntu23) quantal; urgency=low + + * initramfs-tools/hooks/flash_kernel_set_root: + - make sure that if we dont want to override the bootloader root= option by + setting "Bootloader-sets-root: yes", we actually dont do it + - Also check for FLASH_KERNEL_SKIP to avoid setting up the root parameter + in case flash-kernel will not be used + - this is a slightly different approach to fix bug (LP: #1034734) than the + patch attached to the bug. + + -- Oliver Grawert Thu, 13 Sep 2012 14:02:48 +0200 + +flash-kernel (3.0~rc.4ubuntu22) quantal; urgency=low + + * do not move the original uEnvtxt.omap to the target, use a copy instead + * make /etc/default/flash-kernel a proper conffile + + -- Oliver Grawert Thu, 23 Aug 2012 11:49:01 +0200 + +flash-kernel (3.0~rc.4ubuntu21) quantal; urgency=low + + * switch omap3 and omap4 to uEnv.txt/preEnv.txt (the former holds all active + boot commands, the latter holds the kernel commandline only) + * enable generation of a /etc/default/flash-kernel file from + flash-kernel-installer holding a UBOOT_DEFAULTS variable with distro + default settings (ro quiet splash) + * enable UUID detection of the currently used root device + * if uEnv.txt is defined in the db for an arch, generate preEnv.txt from + UBOOT_DEFAULTS and UUID detection data + * switch omap3 and omap4 from Bootloader-sets-root: no to yes, we now + generate a root=UUID= line on the fly for arches using uEnv.txt/preEnv.txt + * introduce bootscript/uEnvtxt.omap + + -- Oliver Grawert Wed, 22 Aug 2012 21:56:09 +0200 + +flash-kernel (3.0~rc.4ubuntu20) quantal; urgency=low + + * seemingly -k all doesnt want to work with -c, use -k $(uname -r) for now + + -- Oliver Grawert Fri, 10 Aug 2012 18:29:34 +0200 + +flash-kernel (3.0~rc.4ubuntu19) quantal; urgency=low + + * flash-kernel-installer.postinst: now that we have a diversion in place + there isnt a pre-existing initrd, instead of calling update-initramfs -u + we better call update-initramfs -c -k all to create one from scratch, + fixes (LP: #1035269) + + -- Oliver Grawert Fri, 10 Aug 2012 17:49:00 +0200 + +flash-kernel (3.0~rc.4ubuntu18) quantal; urgency=low + + * make post-base-installer.d/01flash-kernel-diversion executable + + -- Oliver Grawert Thu, 09 Aug 2012 13:59:15 +0200 + +flash-kernel (3.0~rc.4ubuntu17) quantal; urgency=low + + * sigh, not only drop the creation of /var/lib/flash-kernel/configured but + also the check for its existance, else we will always exit 0 + + -- Oliver Grawert Tue, 07 Aug 2012 20:03:20 +0200 + +flash-kernel (3.0~rc.4ubuntu16) quantal; urgency=low + + * re-add a diversion for update-initramfs to live-installers + post-base-installer.d to avoid update-initramfs runs before + flash-kernel is configured + * re-add a check for the diverted update-initramfs to + flash-kernel-installer, so it gets reverted before we try to call + update-initramfs + * drop teh super ugly hack that added a /var/lib/flash-kernel/configured + file to actually check if flash-kernel is configured + + -- Oliver Grawert Tue, 07 Aug 2012 19:52:51 +0200 + +flash-kernel (3.0~rc.4ubuntu15) quantal; urgency=low + + * Fix armadaxp kernel load address (LP: #1026835). + + -- Robie Basak Tue, 31 Jul 2012 16:31:30 +0100 + +flash-kernel (3.0~rc.4ubuntu14) quantal-proposed; urgency=low + + * better do the "configured" check in /var/lib + + -- Oliver Grawert Wed, 25 Jul 2012 18:03:18 +0200 + +flash-kernel (3.0~rc.4ubuntu13) quantal-proposed; urgency=low + + * add very very ugly temporary workaround to make quantal A3 arm server + installs possible (yes, i suck) + + -- Oliver Grawert Wed, 25 Jul 2012 17:16:16 +0200 + +flash-kernel (3.0~rc.4ubuntu12) quantal; urgency=low + + * remove the diversion code again, it doesnt help since + flash-kernel-installer.udeb only comes into play to late so the + post-base-installer.d file isnt available at live-installer time + + -- Oliver Grawert Wed, 25 Jul 2012 14:38:24 +0200 + +flash-kernel (3.0~rc.4ubuntu11) quantal; urgency=low + + * make post-base-installer.d/01flash-kernel-diversion actually an executable + shell script + + -- Oliver Grawert Tue, 24 Jul 2012 15:33:46 +0200 + +flash-kernel (3.0~rc.4ubuntu10) quantal; urgency=low + + * add a diversion for update-initramfs to live-installers + post-base-installer.d to avoid update-initramfs runs before + flash-kernel is configured + * add a check for the diverted update-initramfs to flash-kernel-installer, + so it gets reverted before we try to call update-initramfs + + -- Oliver Grawert Tue, 24 Jul 2012 15:28:37 +0200 + +flash-kernel (3.0~rc.4ubuntu9) quantal; urgency=low + + * Also add omap and omap4 to flash-kernel-installer.isinstallable. + + -- Luke Yelavich Fri, 20 Jul 2012 11:42:33 +1000 + +flash-kernel (3.0~rc.4ubuntu8) quantal; urgency=low + + * debian/control: Re-add omap and omap4 to the flash-kernel-installer + XB-Subarchitecture field. These appear to have been lost somewhere along + the way. + + -- Luke Yelavich Fri, 20 Jul 2012 11:39:08 +1000 + +flash-kernel (3.0~rc.4ubuntu7) quantal; urgency=low + + * make sure the call to abootimg -i does not make the script fail (checking + non bootimg devices makes it return 1 even though there is no error, this + in turn makes teh whole script fail since we run with "set -e") + + -- Oliver Grawert Tue, 17 Jul 2012 13:20:43 +0200 + +flash-kernel (3.0~rc.4ubuntu6) quantal; urgency=low + + * add DB entry for "OMAP3 Beagle Board" (funnily thats missing) + * add Panda to the list of supported board in the README file + + -- Oliver Grawert Fri, 06 Jul 2012 15:59:48 +0200 + +flash-kernel (3.0~rc.4ubuntu5) quantal; urgency=low + + * use umount -l in the cleanup function, else we fail while finishing up + with the script (LP: #1014139) + + -- Oliver Grawert Thu, 05 Jul 2012 19:43:02 +0200 + +flash-kernel (3.0~rc.4ubuntu4) quantal; urgency=low + + * also add FLASH_KERNEL_SKIP to the initramfs post update script, this + should finally fix ac100 image building + + -- Oliver Grawert Fri, 22 Jun 2012 11:20:39 +0200 + +flash-kernel (3.0~rc.4ubuntu3) quantal; urgency=low + + * re-add support for the FLASH_KERNEL_SKIP env variable, so the image build + infrastructure has a chance to skip the automated flash-kernel run during + image builds. + + -- Oliver Grawert Wed, 20 Jun 2012 16:41:28 +0200 + +flash-kernel (3.0~rc.4ubuntu2) quantal; urgency=low + + * add "quiet splash" as default options to omap bootscr + + -- Oliver Grawert Wed, 20 Jun 2012 16:25:31 +0200 + +flash-kernel (3.0~rc.4ubuntu1) quantal; urgency=low + + [ dann frazier ] + * Re-add support for Marvell ArmadaXP + + [ Robie Basak ] + * Add support for Calxeda Highbank + + -- Robie Basak Thu, 31 May 2012 10:09:53 +0100 + flash-kernel (3.0~rc.4) unstable; urgency=low * Upload to unstable diff -Nru flash-kernel-3.0~rc.4/debian/control flash-kernel-3.0~rc.4ubuntu33co2endless1/debian/control --- flash-kernel-3.0~rc.4/debian/control 2012-03-10 00:13:25.000000000 +0000 +++ flash-kernel-3.0~rc.4ubuntu33co2endless1/debian/control 2014-02-27 12:31:54.000000000 +0000 @@ -1,7 +1,8 @@ Source: flash-kernel Section: utils Priority: optional -Maintainer: Debian Install System Team +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Install System Team Uploaders: Loïc Minier , Hector Oron , Wouter Verhelst @@ -14,7 +15,7 @@ Architecture: arm armel armeb armhf Depends: ${misc:Depends}, devio, - initramfs-tools (>= 0.92f), + initramfs-tools (>= 0.92f) | dracut, linux-base (>= 3.2) Suggests: u-boot-tools Description: utility to make certain embedded devices bootable @@ -29,7 +30,7 @@ Priority: standard XC-Package-Type: udeb Architecture: arm armel armeb armhf -XB-Subarchitecture: iop32x ixp4xx kirkwood orion5x s3c24xx mx5 +XB-Subarchitecture: armadaxp generic iop32x ixp4xx kirkwood orion5x s3c24xx mx5 omap omap4 Provides: bootable-system Depends: cdebconf-udeb, installed-base XB-Installer-Menu-Item: 7300 diff -Nru flash-kernel-3.0~rc.4/debian/flash-kernel-installer.install flash-kernel-3.0~rc.4ubuntu33co2endless1/debian/flash-kernel-installer.install --- flash-kernel-3.0~rc.4/debian/flash-kernel-installer.install 2012-03-09 15:11:01.000000000 +0000 +++ flash-kernel-3.0~rc.4ubuntu33co2endless1/debian/flash-kernel-installer.install 2013-04-22 19:51:33.000000000 +0000 @@ -1,2 +1,3 @@ db usr/share/flash-kernel functions usr/share/flash-kernel +post-base-installer.d usr/lib/ diff -Nru flash-kernel-3.0~rc.4/debian/flash-kernel-installer.isinstallable flash-kernel-3.0~rc.4ubuntu33co2endless1/debian/flash-kernel-installer.isinstallable --- flash-kernel-3.0~rc.4/debian/flash-kernel-installer.isinstallable 2011-08-24 13:09:41.000000000 +0000 +++ flash-kernel-3.0~rc.4ubuntu33co2endless1/debian/flash-kernel-installer.isinstallable 2013-04-22 19:51:34.000000000 +0000 @@ -2,6 +2,12 @@ set -e case "`archdetect`" in + arm*/armadaxp) + exit 0 + ;; + arm*/generic) + exit 0 + ;; arm*/iop32x) exit 0 ;; @@ -20,6 +26,12 @@ arm*/s3c24xx) exit 0 ;; + arm*/omap) + exit 0 + ;; + arm*/omap4) + exit 0 + ;; # Don't activate it by default *) exit 1 diff -Nru flash-kernel-3.0~rc.4/debian/flash-kernel-installer.postinst flash-kernel-3.0~rc.4ubuntu33co2endless1/debian/flash-kernel-installer.postinst --- flash-kernel-3.0~rc.4/debian/flash-kernel-installer.postinst 2012-03-09 15:11:01.000000000 +0000 +++ flash-kernel-3.0~rc.4ubuntu33co2endless1/debian/flash-kernel-installer.postinst 2013-04-22 19:51:34.000000000 +0000 @@ -24,6 +24,12 @@ mount | grep "on /target${1%/} " | tail -n1 | cut -d' ' -f1 } +# check if live-installer diverted update-initramfs, revert before we move on +if [ -e /target/usr/sbin/update-initramfs.flash-kernel-diverted ];then + rm -f /target/usr/sbin/update-initramfs + in-target dpkg-divert --remove --local --rename /usr/sbin/update-initramfs +fi + machine="$(get_cpuinfo_hardware)" if machine_uses_flash "$machine"; then @@ -65,7 +71,10 @@ : ;; *) - in-target update-initramfs -u || true + latest_version=$(in-target --pass-stdout sh -c 'linux-version list | linux-version sort | tail -n1') + mount -o bind /dev /target/dev + in-target update-initramfs -c -k $latest_version + umount /target/dev || true ;; esac @@ -95,6 +104,14 @@ trap - EXIT HUP INT QUIT TERM mv /target/tmp/flash-kernel.$$ /target/usr/sbin/flash-kernel +# set ubuntu defaults +if echo $(get_machine_field "$machine" "U-Boot-Script-Name") | grep -q "uEnvtxt"; then + export VOLID=$(blkid -o value -s UUID $(findfs /)) + # hide the boot partition from udisks automounting + bootdev=$(get_machine_field "$machine" "Boot-Device") + [ -b $bootdev ] && in-target dosfslabel $bootdev "SERVICEV001" +fi + # We need the udev /dev which has the MTD devices mount -o bind /dev /target/dev if ! in-target flash-kernel; then diff -Nru flash-kernel-3.0~rc.4/debian/flash-kernel.default flash-kernel-3.0~rc.4ubuntu33co2endless1/debian/flash-kernel.default --- flash-kernel-3.0~rc.4/debian/flash-kernel.default 1970-01-01 00:00:00.000000000 +0000 +++ flash-kernel-3.0~rc.4ubuntu33co2endless1/debian/flash-kernel.default 2013-04-22 19:51:34.000000000 +0000 @@ -0,0 +1 @@ +UBOOT_DEFAULTS="ro quiet splash" diff -Nru flash-kernel-3.0~rc.4/functions flash-kernel-3.0~rc.4ubuntu33co2endless1/functions --- flash-kernel-3.0~rc.4/functions 2012-03-09 15:12:03.000000000 +0000 +++ flash-kernel-3.0~rc.4ubuntu33co2endless1/functions 2013-04-22 19:51:33.000000000 +0000 @@ -91,6 +91,10 @@ } } +get_root_uuid() { + echo $(blkid -o value -s UUID $(mount | grep "on /${1%/} " | tail -n1 | cut -d' ' -f1)) +} + get_cpuinfo_hardware() { grep "^Hardware" "$PROC_CPUINFO" | sed 's/Hardware\s*:\s*//' } @@ -423,7 +427,7 @@ cleanups() { rm -rf "$tmpdir" if [ -d "$boot_mnt_dir" ]; then - umount "$boot_mnt_dir" + umount -l "$boot_mnt_dir" rmdir "$boot_mnt_dir" fi } @@ -437,7 +441,7 @@ part="" largest_size="-1" for p in "$android_boot_device"*[0-9]; do - abootimg="$(LC_ALL=C abootimg -i "$p" 2>/dev/null)" + abootimg="$(LC_ALL=C abootimg -i "$p" 2>/dev/null || true)" image_size="$(abootimg_get_image_size "$abootimg")" if [ -n "$image_size" ] && [ "$image_size" -gt "$largest_size" ]; then @@ -516,12 +520,32 @@ rm -f "$tmpdir/uInitrd" fi if [ -n "$boot_script_path" ]; then - boot_script_path="$boot_mnt_dir/$boot_script_path" - boot_script="$BOOTSCRIPTS_DIR/$usname" - mkimage_script "$usaddr" "boot script" "$boot_script" \ - "$tmpdir/boot.scr" - boot_script="$tmpdir/boot.scr" - backup_and_install "$boot_script" "$boot_script_path" + case $usname in + bootscr*) + boot_script_path="$boot_mnt_dir/$boot_script_path" + boot_script="$BOOTSCRIPTS_DIR/$usname" + mkimage_script "$usaddr" "boot script" "$boot_script" \ + "$tmpdir/boot.scr" + boot_script="$tmpdir/boot.scr" + backup_and_install "$boot_script" "$boot_script_path" + ;; + uEnvtxt*) + VOLID=${VOLID:-"$(get_root_uuid)"} + boot_script_in="$BOOTSCRIPTS_DIR/$usname" + boot_script="$boot_mnt_dir/$usname" + cp $boot_script_in $boot_script + + boot_script_path="$boot_mnt_dir/uEnv.txt" + boot_script_env="$boot_mnt_dir/preEnv.txt" + env_script="$tmpdir/preEnv.txt" + + [ -e /etc/default/flash-kernel ] && . /etc/default/flash-kernel + echo "bootargs=$UBOOT_DEFAULTS root=UUID=$VOLID" > $env_script + + backup_and_install "$env_script" "$boot_script_env" + backup_and_install "$boot_script" "$boot_script_path" + ;; + esac fi ;; "symlink") diff -Nru flash-kernel-3.0~rc.4/initramfs-hook/flash-kernel flash-kernel-3.0~rc.4ubuntu33co2endless1/initramfs-hook/flash-kernel --- flash-kernel-3.0~rc.4/initramfs-hook/flash-kernel 2012-03-09 15:11:01.000000000 +0000 +++ flash-kernel-3.0~rc.4ubuntu33co2endless1/initramfs-hook/flash-kernel 2013-04-22 19:51:33.000000000 +0000 @@ -7,6 +7,18 @@ exit 0 fi +# we dont want to run if FLASH_KERNEL_SKIP is set, the ubuntu +# image build system uses this +if [ -n "$FLASH_KERNEL_SKIP" ]; then + exit 0 +fi + +# Do not run inside an LXC container +if type running-in-container >/dev/null 2>&1 && \ + running-in-container >/dev/null; then + exit 0 +fi + abi="$1" # ignored _initrd="$2" diff -Nru flash-kernel-3.0~rc.4/initramfs-tools/hooks/flash_kernel_set_root flash-kernel-3.0~rc.4ubuntu33co2endless1/initramfs-tools/hooks/flash_kernel_set_root --- flash-kernel-3.0~rc.4/initramfs-tools/hooks/flash_kernel_set_root 2012-03-09 15:11:01.000000000 +0000 +++ flash-kernel-3.0~rc.4ubuntu33co2endless1/initramfs-tools/hooks/flash_kernel_set_root 2013-04-22 19:51:33.000000000 +0000 @@ -47,6 +47,22 @@ . /usr/share/initramfs-tools/hook-functions +machine="$(get_cpuinfo_hardware)" + +# Should we override the root device or merely provide a default root +# device? +blsr="$(get_machine_field "$machine" "Bootloader-sets-root")" + +if [ "$blsr" = "yes" ] || [ -n "$FLASH_KERNEL_SKIP" ]; then + exit 0 +fi + +# Do not run inside an LXC container +if type running-in-container >/dev/null 2>&1 && \ + running-in-container >/dev/null; then + exit 0 +fi + # Record the root filesystem device for use during boot rootdev=$(egrep '^[^# ]+[ ]+/[ ]' /etc/fstab | awk '{print $1}') || true @@ -91,22 +107,9 @@ pause_error fi -machine="$(get_cpuinfo_hardware)" - -# Should we override the root device or merely provide a default root -# device? -blsr="$(get_machine_field "$machine" "Bootloader-sets-root")" - -if [ "$blsr" = "no" ]; then - # The boot loader doesn't pass root= on the command line, so - # provide a default. - install -d $DESTDIR/conf/conf.d - echo "ROOT=\"$rootdev\"" > $DESTDIR/conf/conf.d/default_root -else - # The boot loader passes a bogus root= (e.g. root=/dev/ram), so - # override the command line parameter. - install -d $DESTDIR/conf - echo "ROOT=\"$rootdev\"" >> $DESTDIR/conf/param.conf -fi +# The boot loader doesn't pass root= on the command line, so +# provide a default. +install -d $DESTDIR/conf/conf.d +echo "ROOT=\"$rootdev\"" > $DESTDIR/conf/conf.d/default_root # vim:noexpandtab shiftwidth=8 diff -Nru flash-kernel-3.0~rc.4/kernel-hook/zz-flash-kernel flash-kernel-3.0~rc.4ubuntu33co2endless1/kernel-hook/zz-flash-kernel --- flash-kernel-3.0~rc.4/kernel-hook/zz-flash-kernel 2012-03-09 15:11:01.000000000 +0000 +++ flash-kernel-3.0~rc.4ubuntu33co2endless1/kernel-hook/zz-flash-kernel 2013-04-22 19:51:33.000000000 +0000 @@ -9,6 +9,18 @@ exit 0 fi +# we dont want to run if FLASH_KERNEL_SKIP is set, the ubuntu +# image build system uses this +if [ -n "$FLASH_KERNEL_SKIP" ]; then + exit 0 +fi + +# Do not run inside an LXC container +if type running-in-container >/dev/null 2>&1 && \ + running-in-container >/dev/null; then + exit 0 +fi + # this script is used as postinst.d and postrm.d script; this is used to # differentiate between the two self="$0" diff -Nru flash-kernel-3.0~rc.4/post-base-installer.d/01flash-kernel-diversion flash-kernel-3.0~rc.4ubuntu33co2endless1/post-base-installer.d/01flash-kernel-diversion --- flash-kernel-3.0~rc.4/post-base-installer.d/01flash-kernel-diversion 1970-01-01 00:00:00.000000000 +0000 +++ flash-kernel-3.0~rc.4ubuntu33co2endless1/post-base-installer.d/01flash-kernel-diversion 2013-04-22 19:51:33.000000000 +0000 @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +# divert update-initramfs +file=usr/sbin/update-initramfs + +in-target dpkg-divert --add --local --divert /${file}.flash-kernel-diverted --rename /${file} +cp /target/bin/true /target/$file