diff -Nru flash-kernel-3.103/bootscript/all/bootscr.exynos5 flash-kernel-3.103ubuntu1/bootscript/all/bootscr.exynos5 --- flash-kernel-3.103/bootscript/all/bootscr.exynos5 1970-01-01 01:00:00.000000000 +0100 +++ flash-kernel-3.103ubuntu1/bootscript/all/bootscr.exynos5 2020-11-22 15:32:05.000000000 +0000 @@ -0,0 +1,10 @@ +echo Starting Ubuntu... +setenv bootargs console=ttySAC0,115200 nosplash mem=2048M@0x80000000 mem=6144M@0x100000000 +sata init +test -n "$kernel_addr_r" || setenv kernel_addr_r 0x80007000 +test -n "$ramdisk_addr_r" || setenv ramdisk_addr_r 0x81000000 +test -n "$fdt_addr_r" || setenv fdt_addr_r 0x82000000 +ext2load sata 0 $kernel_addr_r uImage +ext2load sata 0 $ramdisk_addr_r uInitrd +imi $ramdisk_addr_r || setenv ramdisk_addr_r - +bootm $kernel_addr_r $ramdisk_addr_r diff -Nru flash-kernel-3.103/bootscript/all/bootscr.rpi flash-kernel-3.103ubuntu1/bootscript/all/bootscr.rpi --- flash-kernel-3.103/bootscript/all/bootscr.rpi 1970-01-01 01:00:00.000000000 +0100 +++ flash-kernel-3.103ubuntu1/bootscript/all/bootscr.rpi 2020-11-22 15:32:05.000000000 +0000 @@ -0,0 +1,109 @@ +# Ubuntu Classic RPi U-Boot script (for armhf and arm64) + +# Expects to be called with the following environment variables set: +# +# devtype e.g. mmc/scsi etc +# devnum The device number of the given type +# distro_bootpart The partition containing the boot files +# (introduced in u-boot mainline 2016.01) +# prefix Prefix within the boot partiion to the boot files +# kernel_addr_r Address to load the kernel to +# fdt_addr_r Address to load the FDT to +# ramdisk_addr_r Address to load the initrd to. + +# Take fdt addr from the prior stage boot loader, if available +if test -n "$fdt_addr"; then + fdt addr ${fdt_addr} + fdt move ${fdt_addr} ${fdt_addr_r} # implicitly sets fdt active +else + fdt addr ${fdt_addr_r} +fi +fdt get value bootargs /chosen bootargs + +setenv bootargs "@@LINUX_KERNEL_CMDLINE_DEFAULTS@@ ${bootargs} @@LINUX_KERNEL_CMDLINE@@" +@@UBOOT_ENV_EXTRA@@ + +@@UBOOT_PREBOOT_EXTRA@@ + +setenv kernel_filename vmlinuz +setenv core_state "/uboot/ubuntu/boot.sel" +setenv kernel_bootpart ${distro_bootpart} + +if test -z "${fk_image_locations}"; then + setenv fk_image_locations ${prefix} +fi + +for pathprefix in ${fk_image_locations}; do + if load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${pathprefix}${core_state}; then + # Core image; set defaults for core's state then import from the first + # boot.sel file. Then load the mutable boot.sel file from the next + # partition + setenv kernel_filename kernel.img + setenv kernel_vars "snap_kernel snap_try_kernel kernel_status" + setenv recovery_vars "snapd_recovery_mode snapd_recovery_system snapd_recovery_kernel" + setenv snapd_recovery_mode "install" + setenv snapd_standard_params "panic=-1 systemd.gpt_auto=0 rd.systemd.unit=basic.target" + + env import -c ${kernel_addr_r} ${filesize} ${recovery_vars} + setenv bootargs "${bootargs} snapd_recovery_mode=${snapd_recovery_mode} snapd_recovery_system=${snapd_recovery_system} ${snapd_standard_params}" + + if test "${snapd_recovery_mode}" = "run"; then + setexpr kernel_bootpart ${distro_bootpart} + 1 + load ${devtype} ${devnum}:${kernel_bootpart} ${kernel_addr_r} ${pathprefix}${core_state} + env import -c ${kernel_addr_r} ${filesize} ${kernel_vars} + setenv kernel_name "${snap_kernel}" + + if test -n "${kernel_status}"; then + if test "${kernel_status}" = "try"; then + if test -n "${snap_try_kernel}"; then + setenv kernel_status trying + setenv kernel_name "${snap_try_kernel}" + fi + elif test "${kernel_status}" = "trying"; then + setenv kernel_status "" + fi + env export -c ${kernel_addr_r} ${kernel_vars} + save ${devtype} ${devnum}:${kernel_bootpart} ${kernel_addr_r} ${pathprefix}${core_state} ${filesize} + fi + setenv kernel_prefix "${pathprefix}uboot/ubuntu/${kernel_name}/" + else + setenv kernel_prefix "${pathprefix}systems/${snapd_recovery_system}/kernel/" + fi + else + # Classic image; the kernel prefix is unchanged, nothing special to do + setenv kernel_prefix "${pathprefix}" + fi + + # Store the gzip header (1f 8b) in the kernel area for comparison to the + # header of the image we load. Load "$kernel_filename" into the portion of + # memory for the RAM disk (because we want to uncompress to the kernel area + # if it's compressed) and compare the word at the start + mw.w ${kernel_addr_r} 0x8b1f # little endian + if load ${devtype} ${devnum}:${kernel_bootpart} ${ramdisk_addr_r} ${kernel_prefix}${kernel_filename}; then + kernel_size=${filesize} + if cmp.w ${kernel_addr_r} ${ramdisk_addr_r} 1; then + # gzip compressed image (NOTE: *not* a self-extracting gzip compressed + # kernel, just a kernel image that has been gzip'd) + echo "Decompressing kernel..." + unzip ${ramdisk_addr_r} ${kernel_addr_r} + setenv kernel_size ${filesize} + setenv try_boot "booti" + else + # Possibly self-extracting or uncompressed; copy data into the kernel area + # and attempt launch with bootz then booti + echo "Copying kernel..." + cp.b ${ramdisk_addr_r} ${kernel_addr_r} ${kernel_size} + setenv try_boot "bootz booti" + fi + + if load ${devtype} ${devnum}:${kernel_bootpart} ${ramdisk_addr_r} ${kernel_prefix}initrd.img; then + setenv ramdisk_param "${ramdisk_addr_r}:${filesize}" + else + setenv ramdisk_param "-" + fi + for cmd in ${try_boot}; do + echo "Booting Ubuntu (with ${cmd}) from ${devtype} ${devnum}:${partition}..." + ${cmd} ${kernel_addr_r} ${ramdisk_param} ${fdt_addr_r} + done + fi +done diff -Nru flash-kernel-3.103/bootscript/all/bootscr.xgene flash-kernel-3.103ubuntu1/bootscript/all/bootscr.xgene --- flash-kernel-3.103/bootscript/all/bootscr.xgene 1970-01-01 01:00:00.000000000 +0100 +++ flash-kernel-3.103ubuntu1/bootscript/all/bootscr.xgene 2020-11-22 15:32:05.000000000 +0000 @@ -0,0 +1,5 @@ +setenv bootargs "console=ttyS0,${baudrate}n8r ro" +@@UBOOT_ENV_EXTRA@@ +load scsi 0 ${kernel_addr_r} uImage +load scsi 0 ${ramdisk_addr_r} uInitrd +bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} diff -Nru flash-kernel-3.103/bootscript/all/bootscr.xgene-mustang flash-kernel-3.103ubuntu1/bootscript/all/bootscr.xgene-mustang --- flash-kernel-3.103/bootscript/all/bootscr.xgene-mustang 1970-01-01 01:00:00.000000000 +0100 +++ flash-kernel-3.103ubuntu1/bootscript/all/bootscr.xgene-mustang 2020-11-22 15:32:05.000000000 +0000 @@ -0,0 +1,6 @@ +setenv bootargs 'console=ttyS0,115200n8 ro' +@@UBOOT_ENV_EXTRA@@ +ext4load scsi 0 ${kernel_addr_r} uImage +ext4load scsi 0 ${ramdisk_addr_r} uInitrd +ext4load scsi 0 ${fdt_addr_r} apm-mustang.dtb +bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r} diff -Nru flash-kernel-3.103/bootscript/armhf/bootscr.armadaxp flash-kernel-3.103ubuntu1/bootscript/armhf/bootscr.armadaxp --- flash-kernel-3.103/bootscript/armhf/bootscr.armadaxp 1970-01-01 01:00:00.000000000 +0100 +++ flash-kernel-3.103ubuntu1/bootscript/armhf/bootscr.armadaxp 2020-11-22 15:32:05.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.103/bootscript/armhf/bootscr.highbank flash-kernel-3.103ubuntu1/bootscript/armhf/bootscr.highbank --- flash-kernel-3.103/bootscript/armhf/bootscr.highbank 2018-08-10 20:22:02.000000000 +0100 +++ flash-kernel-3.103ubuntu1/bootscript/armhf/bootscr.highbank 2020-11-22 15:32:05.000000000 +0000 @@ -1,5 +1,7 @@ -setenv bootargs @@LINUX_KERNEL_CMDLINE_DEFAULTS@@ ${bootargs} @@LINUX_KERNEL_CMDLINE@@ -@@UBOOT_ENV_EXTRA@@ -ext2load scsi 0 ${kernel_addr_r} vmlinuz -ext2load scsi 0 ${ramdisk_addr_r} initrd.img -bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr} +echo Starting Ubuntu... +setenv bootargs console=ttyAMA0 nosplash +mw.l 800000 0 10000 +scsi scan +ext2load scsi 0 0x800000 vmlinuz +ext2load scsi 0 0x2000000 initrd.img +bootz 0x800000 0x2000000:${filesize} 0x1000 diff -Nru flash-kernel-3.103/bootscript/armhf/bootscr.keystone2 flash-kernel-3.103ubuntu1/bootscript/armhf/bootscr.keystone2 --- flash-kernel-3.103/bootscript/armhf/bootscr.keystone2 1970-01-01 01:00:00.000000000 +0100 +++ flash-kernel-3.103ubuntu1/bootscript/armhf/bootscr.keystone2 2020-11-22 15:32:05.000000000 +0000 @@ -0,0 +1,5 @@ +setenv bootargs "console=ttyS0,${baudrate}n8r ro pci=firmware rio-scan.static_enum=1 rio-scan.scan=0" +@@UBOOT_ENV_EXTRA@@ +load scsi 0 ${kernel_addr_r} vmlinuz +load scsi 0 ${ramdisk_addr_r} initrd.img +bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r} diff -Nru flash-kernel-3.103/bootscript/armhf/bootscr.omap flash-kernel-3.103ubuntu1/bootscript/armhf/bootscr.omap --- flash-kernel-3.103/bootscript/armhf/bootscr.omap 2018-08-10 20:22:02.000000000 +0100 +++ flash-kernel-3.103ubuntu1/bootscript/armhf/bootscr.omap 2020-11-22 15:32:05.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.103/bootscript/armhf/uEnvtxt.omap flash-kernel-3.103ubuntu1/bootscript/armhf/uEnvtxt.omap --- flash-kernel-3.103/bootscript/armhf/uEnvtxt.omap 1970-01-01 01:00:00.000000000 +0100 +++ flash-kernel-3.103ubuntu1/bootscript/armhf/uEnvtxt.omap 2020-11-22 15:32:05.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.103/bootscript/armhf/uEnvtxt.wandboard flash-kernel-3.103ubuntu1/bootscript/armhf/uEnvtxt.wandboard --- flash-kernel-3.103/bootscript/armhf/uEnvtxt.wandboard 1970-01-01 01:00:00.000000000 +0100 +++ flash-kernel-3.103ubuntu1/bootscript/armhf/uEnvtxt.wandboard 2020-11-22 15:32:05.000000000 +0000 @@ -0,0 +1,6 @@ +loadpreenv=load mmc ${mmcdev}:${mmcpart} 0x12000000 preenv.txt; env import -t 0x12000000 ${filesize} +loadkernel=load mmc ${mmcdev}:${mmcpart} 0x12000000 uImage +loadinitrd=load mmc ${mmcdev}:${mmcpart} 0x12A00000 uInitrd + +bootcmd=run loadpreenv; run loadkernel; run loadinitrd; bootm 0x12000000 0x12A00000 +uenvcmd=boot diff -Nru flash-kernel-3.103/db/all.db flash-kernel-3.103ubuntu1/db/all.db --- flash-kernel-3.103/db/all.db 2020-11-06 18:28:09.000000000 +0000 +++ flash-kernel-3.103ubuntu1/db/all.db 2020-11-22 15:32:05.000000000 +0000 @@ -57,10 +57,15 @@ U-Boot-Script-Name: bootscr.xgene-mustang Boot-Kernel-Path: /boot/uImage Boot-Initrd-Path: /boot/uInitrd +Boot-DTB-Path: /boot/apm-mustang.dtb Boot-Script-Path: /boot/boot.scr Required-Packages: u-boot-tools DTB-Id: apm-mustang.dtb +Machine: Asus NovaGo TP370QL +Kernel-Flavors: arm64 +DTB-Id: qcom/msm8998-asus-novago-tp370ql.dtb + Machine: Auxtek t003 A10s hdmi tv-stick Kernel-Flavors: armmp Boot-Script-Path: /boot/boot.scr @@ -257,11 +262,17 @@ Required-Packages: u-boot-tools Bootloader-Sets-Incorrect-Root: yes -Machine: Calxeda Highbank -Kernel-Flavors: armmp +Machine: Calxeda ECX-2000 +Kernel-Flavors: generic-lpae generic highbank +Required-Packages: u-boot-tools Boot-Script-Path: /boot/boot.scr U-Boot-Script-Name: bootscr.highbank + +Machine: Calxeda Highbank +Kernel-Flavors: generic highbank Required-Packages: u-boot-tools +Boot-Script-Path: /boot/boot.scr +U-Boot-Script-Name: bootscr.highbank Machine: Chuwi V7 CW0825 Kernel-Flavors: armmp @@ -365,6 +376,9 @@ U-Boot-Script-Name: bootscr.sunxi Required-Packages: u-boot-tools +## qemu instance on armhf +Machine: Dummy Virtual Machine + Machine: Empire Electronix D709 tablet Kernel-Flavors: armmp Boot-Script-Path: /boot/boot.scr @@ -400,6 +414,9 @@ U-Boot-Script-Name: bootscr.uboot-generic Required-Packages: u-boot-tools +## ARMv8 Foundation Model +Machine: Foundation-v8A + Machine: Freescale i.MX53 Quick Start Board Machine: Freescale MX53 LOCO Board Kernel-Flavors: armmp mx5 @@ -516,6 +533,12 @@ Boot-DTB-Path: dtb Required-Packages: u-boot-tools +Machine: grouper +Method: android +Android-Boot-Device: /dev/mmcblk0 +Required-Packages: abootimg +Bootloader-sets-root: yes + Machine: GTA02 Method: multi Kernel-Flavors: s3c24xx @@ -566,6 +589,10 @@ U-Boot-Script-Name: bootscr.uboot-generic Required-Packages: u-boot-tools +Machine: HP Envy x2 +Kernel-Flavors: arm64 +DTB-Id: qcom/msm8998-hp-envy-x2.dtb + Machine: HP Media Vault mv2120 Kernel-Flavors: orion5x marvell Machine-Id: 1693 @@ -577,6 +604,24 @@ Required-Packages: u-boot-tools Bootloader-Sets-Incorrect-Root: yes +Machine: HP ProLiant m400 Server Cartridge +U-Boot-Kernel-Address: 0x80000 +U-Boot-Initrd-Address: 0x0 +U-Boot-Script-Address: 0x4004000000 +U-Boot-Script-Name: bootscr.xgene +Required-Packages: u-boot-tools +Boot-Kernel-Path: /boot/uImage +Boot-Initrd-Path: /boot/uInitrd +Boot-Script-Path: /boot/boot.scr +Bootloader-Has-Broken-Ext4-Extent-Support: yes + +Machine: HP ProLiant m800 Server Cartridge +Kernel-Flavors: keystone +U-Boot-Script-Address: 0x0 +U-Boot-Script-Name: bootscr.keystone2 +Required-Packages: u-boot-tools +Boot-Script-Path: /boot/boot.scr + Machine: HP t5325 Thin Client Kernel-Flavors: kirkwood marvell DTB-Id: kirkwood-t5325.dtb @@ -828,6 +873,14 @@ U-Boot-Script-Name: bootscr.sunxi Required-Packages: u-boot-tools +Machine: Lenovo Miix 630 +Kernel-Flavors: arm64 +DTB-Id: qcom/msm8998-lenovo-miix-630.dtb + +Machine: Lenovo Yoga C630 +Kernel-Flavors: arm64 +DTB-Id: qcom/sdm850-lenovo-yoga-c630.dtb + Machine: Lichee Pi Zero Kernel-Flavors: armmp armmp-lpae Boot-Script-Path: /boot/boot.scr @@ -856,6 +909,9 @@ U-Boot-Script-Name: bootscr.sunxi Required-Packages: u-boot-tools +## qemu instance on arm64 +Machine: linux,dummy-virt + Machine: Marvell 8040 MACCHIATOBin Machine: Marvell 8040 MACCHIATOBin Double-shot Machine: Marvell 8040 MACHIATOBin @@ -864,6 +920,7 @@ Boot-Script-Path: /boot/boot.scr U-Boot-Script-Name: bootscr.uboot-generic Required-Packages: u-boot-tools +Bootloader-sets-root: no Machine: Marvell 8040 MACCHIATOBin Single-shot Kernel-Flavors: arm64 @@ -879,6 +936,16 @@ U-Boot-Script-Name: bootscr.uboot-generic Required-Packages: u-boot-tools +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 + # Marvell dev board has different names depending on how it's booted, # via DTB or older ATAGS Machine: Marvell Armada XP GP Board @@ -1209,17 +1276,34 @@ Kernel-Flavors: armmp Method: olpc +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 +Machine: TI OMAP4 PandaBoard 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: yes +DTB-Append-From: 3.11 +DTB-Id: omap4-panda-es.dtb Machine: Orange Pi Kernel-Flavors: armmp armmp-lpae @@ -1396,6 +1480,20 @@ U-Boot-Script-Name: bootscr.sunxi Required-Packages: u-boot-tools +Machine: QCT APQ8064 CDP +Kernel-Flavors: link-sbc-apq8064 +Method: android +Android-Boot-Device: /dev/disk/by-partlabel/boot +Required-Packages: abootimg +Bootloader-sets-root: yes + +Machine: QCT APQ8064 MAKO +Method: android +Android-Boot-Device: /dev/block/platform/msm_sdcc.1/by-name/boot +Android-Skip-Initrd: yes +Required-Packages: abootimg +Bootloader-sets-root: yes + Machine: QNAP TS-109/TS-209 Kernel-Flavors: orion5x marvell Machine-Id: 1565 @@ -1501,32 +1599,62 @@ Boot-Script-Path: /boot/boot.scr Machine: Raspberry Pi 2 Model B -Kernel-Flavors: armmp armmp-lpae -DTB-Id: bcm2836-rpi-2-b.dtb -U-Boot-Script-Name: bootscr.uboot-generic -Required-Packages: u-boot-tools -Boot-Script-Path: /boot/boot.scr - -Machine: Raspberry Pi 3 Compute Module -Kernel-Flavors: arm64 armmp armmp-lpae -DTB-Id: broadcom/bcm2837-rpi-cm3-io3.dtb -U-Boot-Script-Name: bootscr.uboot-generic +Machine: Raspberry Pi 2 Model B Rev 1.1 +Machine: Raspberry Pi 2 Model B Rev 1.2 +Kernel-Flavors: raspi +Method: pi +DTB-Id: bcm2709-rpi-2-b.dtb +U-Boot-Script-Name: bootscr.rpi +Required-Packages: u-boot-tools + +Machine: Raspberry Pi 3 Model A+ +Machine: Raspberry Pi 3 Model A Plus +Machine: Raspberry Pi 3 Model A Plus Rev 1.0 +Kernel-Flavors: raspi +Method: pi +DTB-Id: bcm2710-rpi-3-b-plus.dtb +U-Boot-Script-Name: bootscr.rpi Required-Packages: u-boot-tools -Boot-Script-Path: /boot/boot.scr +# XXX when a 3A+ specific dtb is added to linux-raspi, use it here +# Raspberry Pi 3 (BCM2710) Machine: Raspberry Pi 3 Model B -Kernel-Flavors: arm64 armmp armmp-lpae -DTB-Id: broadcom/bcm2837-rpi-3-b.dtb -U-Boot-Script-Name: bootscr.uboot-generic +Machine: Raspberry Pi 3 Model B Rev 1.2 +Kernel-Flavors: raspi +Method: pi +DTB-Id: bcm2710-rpi-3-b.dtb +U-Boot-Script-Name: bootscr.rpi Required-Packages: u-boot-tools -Boot-Script-Path: /boot/boot.scr Machine: Raspberry Pi 3 Model B+ -Kernel-Flavors: arm64 armmp armmp-lpae -DTB-Id: broadcom/bcm2837-rpi-3-b-plus.dtb -U-Boot-Script-Name: bootscr.uboot-generic +Machine: Raspberry Pi 3 Model B Plus +Machine: Raspberry Pi 3 Model B Plus Rev 1.3 +Kernel-Flavors: raspi +Method: pi +DTB-Id: bcm2710-rpi-3-b-plus.dtb +U-Boot-Script-Name: bootscr.rpi +Required-Packages: u-boot-tools + +Machine: Raspberry Pi 4 Model B +Machine: Raspberry Pi 4 Model B Rev 1.1 +Machine: Raspberry Pi 4 Model B Rev 1.2 +Machine: Raspberry Pi 4 Model B Rev 1.4 +Machine: Raspberry Pi Compute Module 4 Rev 1.0 +Machine: Raspberry Pi 400 Rev 1.0 +Machine: Raspberry Pi * +Kernel-Flavors: raspi +Method: pi +DTB-Id: bcm2711-rpi-4-b.dtb +U-Boot-Script-Name: bootscr.rpi +Required-Packages: u-boot-tools + +Machine: Raspberry Pi Compute Module 3 Rev 1.0 +Machine: Raspberry Pi Compute Module 3 Plus Rev 1.0 +Kernel-Flavors: raspi +Method: pi +DTB-Id: bcm2710-rpi-cm3.dtb +U-Boot-Script-Name: bootscr.rpi Required-Packages: u-boot-tools -Boot-Script-Path: /boot/boot.scr Machine: Raspberry Pi Zero Kernel-Flavors: rpi @@ -1556,6 +1684,34 @@ U-Boot-Script-Name: bootscr.uboot-generic Required-Packages: u-boot-tools +Machine: SAMSUNG SD5v1 board based on EXYNOS5440 +Kernel-Flavors: exynos5 generic +U-Boot-Kernel-Address: 0x80008000 +U-Boot-Initrd-Address: 0x80000000 +U-Boot-Script-Address: 0x80001000 +U-Boot-Script-Name: bootscr.exynos5 +DTB-Id: exynos5440-sd5v1.dtb +DTB-Append-From: 3.11 +Boot-Kernel-Path: /boot/uImage +Boot-Initrd-Path: /boot/uInitrd +Boot-Script-Path: /boot/boot.scr +Required-Packages: u-boot-tools +Bootloader-sets-root: no + +Machine: SAMSUNG SSDK5440 board based on EXYNOS5440 +Kernel-Flavors: exynos5 exynos generic +U-Boot-Kernel-Address: 0x80008000 +U-Boot-Initrd-Address: 0x80000000 +U-Boot-Script-Address: 0x80001000 +U-Boot-Script-Name: bootscr.exynos5 +DTB-Id: exynos5440-ssdk5440.dtb +DTB-Append-From: 3.11 +Boot-Kernel-Path: /boot/uImage +Boot-Initrd-Path: /boot/uInitrd +Boot-Script-Path: /boot/boot.scr +Required-Packages: u-boot-tools +Bootloader-sets-root: no + Machine: Seagate Blackarmor NAS220 Kernel-Flavors: kirkwood marvell DTB-Id: kirkwood-blackarmor-nas220.dtb @@ -1865,6 +2021,7 @@ Method: android Android-Boot-Device: /dev/mmcblk0 Required-Packages: abootimg +Bootloader-sets-root: no Machine: Udoo i.MX6 Dual-lite Board Kernel-Flavors: armmp @@ -1902,11 +2059,19 @@ Required-Packages: u-boot-tools Machine: Wandboard i.MX6 Quad Board -Kernel-Flavors: armmp -DTB-Id: imx6q-wandboard.dtb -Boot-Script-Path: /boot/boot.scr -U-Boot-Script-Name: bootscr.imx-base bootscr.uboot-generic +Method: generic +U-Boot-Kernel-Address: 0x10008000 +U-Boot-Initrd-Address: 0x0 +U-Boot-Script-Address: 0x0 +U-Boot-Script-Name: uEnvtxt.wandboard +Boot-Device: /dev/disk/by-path/platform-2198000.usdhc-part1 +Boot-Kernel-Path: uImage +Boot-Initrd-Path: uInitrd +Boot-Script-Path: preEnv.txt Required-Packages: u-boot-tools +Bootloader-sets-root: yes +DTB-Append-From: 3.12 +DTB-Id: imx6q-wandboard.dtb Machine: Wandboard i.MX6 Quad Board rev B1 Kernel-Flavors: armmp diff -Nru flash-kernel-3.103/debian/changelog flash-kernel-3.103ubuntu1/debian/changelog --- flash-kernel-3.103/debian/changelog 2020-11-06 18:28:09.000000000 +0000 +++ flash-kernel-3.103ubuntu1/debian/changelog 2020-11-22 15:32:05.000000000 +0000 @@ -1,3 +1,150 @@ +flash-kernel (3.103ubuntu1) hirsute; urgency=medium + + * Merge with Debian unstable. Remaining changes: + - Add support for QCT APQ8064 CDP + - Add support for QCT APQ8064 CDP; thanks Alfonso Sanchez-Beato. + - Add support for Calxeda Highbank + - Add support for Calxeda Highbank (with bootscr.highbank different + from Debian's version) + - bootscr.highbank: allow more space to load larger kernels + - Add support for Nexus 4 (Mako) + - Enabling support for mako (Nexus 4) + - Add support for Marvell ArmadaXP + - Re-add support for Marvell ArmadaXP + - Fix armadaxp kernel load address + - Add support for Samsung Exynos 5440 platforms + - Add support for EXYNOS5440-based platforms + - Add generic-lpae to the XB-Subarchitecture list in debian/control + - debian/flash-kernel-installer.isinstallable: add arm*/generic-lpae + - Add support for HP ProLiant m400 and m800 cartridges + - Added support for HP ProLiant m800 Server Cartridge + - Add support for HP ProLiant m800 cartridges + - Set required boot arguments for HP ProLiant m800 cartridges + - Add support for HP ProLiant m400 Server Cartridges + - HP Moonshot Cartridges: Use $baudrate from u-boot environment as + serial console speed + - HP Moonshot Cartridges: Enable hardware flow control as required by + the HP moonshot chassis + - Enable U-Boot environment support for X-Gene platforms + - Use filesystem agnostic "load" command instead of assuming ext4 + - Add a bootscript specific to X-Gene Mustang boards since they need to + pull their dtb from the OS. + - Add support for OMAP3 and OMAP4 boards + - add DB entry for "OMAP3 Beagle Board" (funnily thats missing) + - add Panda to the list of supported board in the README file + - 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. + - Also add omap and omap4 to flash-kernel-installer.isinstallable. + - switch omap3 and omap4 to uEnv.txt/preEnv.txt (the former holds all + active boot commands, the latter holds the kernel commandline only) + - 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 + - do not move the original uEnvtxt.omap to the target, use a copy + instead + - add "quiet splash" as default options to omap bootscr + - 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 + - make sure blkid only gives us the UUID and not any other metadata + like labels or filesystem + - hide the boot device from udisk's automounting after installation + on all systems using uEnv.txt to configure u-boot + - 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 + - Add support for grouper boards + - add support for the grouper architecture + - db/all.db: add dummy entries as noops when running on VMs + - Add support for Wandboard Quad + - Wandboard: Use /dev/disk/by-path/platform-2198000.usdhc-part1 instead + of the hardcoded mmcblk1p1, this should make things work on boards + with just a single microSD card in. + - Add basic support for WandBoard Quad. + - Add support for AAarch64 Qualcomm laptops. + - Fix AARCH64 qcom laptop names, to those accepted upstream and in the + Ubuntu kernel. LP: #1847594 + - Add support for Raspberry Pi 2, 3, 3+, CM3, CM3+, and 4 using a + unified bootscript (replaces upstream's entries) + - Update pi bootscript to support all flash-kernel vars, including + calculated devtype and partition for future USB boot support + - Install all potential uboot scripts [previously undocumented] + - Add entry for Raspberry Pi 3A+ (LP: #1841955) + - Add entry for Raspberry Pi CM4 + - Add entry for Raspberry Pi 400 + - Import UC20 updates to the rpi bootscript from the snappy-dev/image + PPA (LP: #1871831) + - Add Kernel-Flavors check to Raspberry Pi entries + - Support "raspi" kernel flavor in addition to "raspi2" (LP: #1868071) + - Remove raspi2 flavour + - The raspi2 flavour does not exist in Groovy onwards + - make sure that if we dont want to override the bootloader root= + option by setting "Bootloader-sets-root: yes", we actually dont do it + - Update tests with new fields: Bootloader-sets-root + - use umount -l in the cleanup function, else we fail while finishing + up with the script + - 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 + - make post-base-installer.d/01flash-kernel-diversion actually an + executable shell script + - 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, actual fixing of the netinst + environment is needed to fix this properly) + - drop the "|| true" from the initramfs building code, if we fail here + we actually dont want to attempt to flash that + - Do not run flash-kernel inside an LXC container + - Migrate default /etc/default/flash-kernel content to new default + without asking via debconf + - Filter the selection of 'latest' usable kernel through the whitelist. + - Do not fail if there are no specified Kernel-Flavors for this + machine. + - flash-kernel/functions: Stop attempting to install the latest kernel + if we request an older version, just refuse to act without --force. + - Look for dtbs in /lib/firmware/$kvers/device-tree/ in find_dtb_file() + - Allow us to find DTBs in both the old flat layout and the new vendor + subdirectory layout, so we keep backward compatibility + - Add support for gzip-compressed kernel images + - Fix mkimage_kernel tests + - Add tests for android-related functions + - Add "pi" value for the "Method" field which copies all dtbs and + overlays to the boot partition and provides defaults for the boot + paths of the kernel, initrd, and u-boot script. + - This fixes upgrades to support the Pi 4 on Bionic (LP: #1850678) + - Permit initrd to be missing in flash-kernel (LP: #1867791) + - Make U-boot optional in the "pi" method. From Groovy onwards, U-Boot + will be an option in the boot chain but not activated by default. For + the time being, the U-Boot-Script-Name will remain in the Pi entries, + but this commit permits it to be blank in future. + - Copy the Pi's bootloader firmware. At present, the Pi's bootloader + firmware is being copied to the boot partition by the postinst of the + linux-firmware-raspi2 package. However, flash-kernel should be + responsible for copying *everything* necessary to boot the Linux + kernel, hence this responsibility should be transferred to + flash-kernel. + - Always run flash-kernel on install/upgrade + - Add pattern matching for machines + - A requirement has come up to permit a simple form of pattern matching + (specifically shell-style globbing) in the Machine field of the + database. This commit implements this via a "case" match. + - Ensure tests work independently of sort implementation + - Add workaround for older u-boot versions that can fail to read files + using ext4 extents, and enable it for HP ProLiant m400 Moonshot Server + Cartridges. LP: #1900796 + + * Added entry for RPi 400 to db/all.db (previously implied by the Raspberry + Pi wildcard entry) + * Ensured tests run successfully regardless of the "sort" implementation + + -- Dave Jones Sun, 22 Nov 2020 15:32:05 +0000 + flash-kernel (3.103) unstable; urgency=medium * Team upload @@ -48,6 +195,177 @@ -- Holger Wansing Sun, 12 Jul 2020 12:42:27 +0200 +flash-kernel (3.100ubuntu5) hirsute; urgency=medium + + * Add workaround for older u-boot versions that can fail to read files + using ext4 extents, and enable it for HP ProLiant m400 Moonshot Server + Cartridges. LP: #1900796 + + -- dann frazier Mon, 14 Dec 2020 16:48:14 -0700 + +flash-kernel (3.100ubuntu4) groovy; urgency=medium + + * Use wild-card matching in check_supported as well as get_machine_field + (LP: #1899493) + + -- Dave Jones Mon, 12 Oct 2020 15:21:57 +0100 + +flash-kernel (3.100ubuntu3) groovy; urgency=medium + + * Add new Pi models to the database + * Remove the -raspi2 kernel flavor from the database + * Add support for pattern matching in the Machine: field of the database + * For the "pi" method, copy the boot firmware too (relates to LP: #1895137) + + -- Dave Jones Wed, 23 Sep 2020 13:14:09 +0100 + +flash-kernel (3.100ubuntu2) groovy; urgency=medium + + * Import UC20 updates to the rpi bootscript from the snappy-dev/image + PPA. LP: #1871831 + + -- Dimitri John Ledkov Mon, 15 Jun 2020 14:29:41 +0100 + +flash-kernel (3.100ubuntu1) groovy; urgency=medium + + * Merge with Debian unstable. Remaining changes: + - Add support for QCT APQ8064 CDP + - Add support for QCT APQ8064 CDP; thanks Alfonso Sanchez-Beato. + - Add support for Calxeda Highbank + - Add support for Calxeda Highbank (with bootscr.highbank different from + Debian's version) + - bootscr.highbank: allow more space to load larger kernels + - Add support for Nexus 4 (Mako) + - Enabling support for mako (Nexus 4) + - Add support for Marvell ArmadaXP + - Re-add support for Marvell ArmadaXP + - Fix armadaxp kernel load address + - Add support for Samsung Exynos 5440 platforms + - Add support for EXYNOS5440-based platforms + - Add generic-lpae to the XB-Subarchitecture list in debian/control + - debian/flash-kernel-installer.isinstallable: add arm*/generic-lpae + - Add support for HP ProLiant m400 and m800 cartridges + - Added support for HP ProLiant m800 Server Cartridge + - Add support for HP ProLiant m800 cartridges + - Set required boot arguments for HP ProLiant m800 cartridges + - Add support for HP ProLiant m400 Server Cartridges + - HP Moonshot Cartridges: Use $baudrate from u-boot environment as + serial console speed + - HP Moonshot Cartridges: Enable hardware flow control as required by + the HP moonshot chassis + - Enable U-Boot environment support for X-Gene platforms + - Use filesystem agnostic "load" command instead of assuming ext4 + - Add a bootscript specific to X-Gene Mustang boards since they need to + pull their dtb from the OS. + - Add support for OMAP3 and OMAP4 boards + - add DB entry for "OMAP3 Beagle Board" (funnily thats missing) + - add Panda to the list of supported board in the README file + - 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. + - Also add omap and omap4 to flash-kernel-installer.isinstallable. + - switch omap3 and omap4 to uEnv.txt/preEnv.txt (the former holds all + active boot commands, the latter holds the kernel commandline only) + - 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 + - do not move the original uEnvtxt.omap to the target, use a copy + instead + - add "quiet splash" as default options to omap bootscr + - 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 + - make sure blkid only gives us the UUID and not any other metadata like + labels or filesystem + - hide the boot device from udisk's automounting after installation on + all systems using uEnv.txt to configure u-boot + - 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 + - Add support for grouper boards + - add support for the grouper architecture + - Add support for Wandboard Quad + - Wandboard: Use /dev/disk/by-path/platform-2198000.usdhc-part1 + instead of the hardcoded mmcblk1p1, this should make things work on + boards with just a single microSD card in. + - Add basic support for WandBoard Quad. + - Add support for Raspberry Pi 2, 3, 3+, CM3, CM3+, and 4 using a unified + bootscript (replaces upstream's entries) + - Update pi bootscript to support all flash-kernel vars, including + calculated devtype and partition for future USB boot support + - Install all potential uboot scripts [previously undocumented] + - db/all.db: Add dummy entries as noops when running on VMs + - make sure that if we dont want to override the bootloader root= + option by setting "Bootloader-sets-root: yes", we actually dont do it + - Update tests with new fields: Bootloader-sets-root + - use umount -l in the cleanup function, else we fail while finishing up + with the script + - 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 + - make post-base-installer.d/01flash-kernel-diversion actually an + executable shell script + - 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, actual fixing of the netinst + environment is needed to fix this properly) + - drop the "|| true" from the initramfs building code, if we fail here we + actually dont want to attempt to flash that + - Do not run flash-kernel inside an LXC container + - Migrate default /etc/default/flash-kernel content to new default without + asking via debconf + - Filter the selection of 'latest' usable kernel through the whitelist. + - Do not fail if there are no specified Kernel-Flavors for this machine. + - flash-kernel/functions: Stop attempting to install the latest kernel + if we request an older version, just refuse to act without --force. + - Look for dtbs in /lib/firmware/$kvers/device-tree/ in find_dtb_file() + - Allow us to find DTBs in both the old flat layout and the new vendor + subdirectory layout, so we keep backward compatibility + - Add support for gzip-compressed kernel images + - Add support for AAarch64 Qualcomm laptops. + - Fix AARCH64 qcom laptop names, to those accepted upstream and in the + Ubuntu kernel. LP: #1847594 + - Fix mkimage_kernel tests + - Add "pi" value for the "Method" field which copies all dtbs and overlays + to the boot partition and provides defaults for the boot paths of the + kernel, initrd, and u-boot script. This fixes upgrades to support the Pi + 4 on Bionic (LP: #1850678) + - Add tests for android-related functions [previously undocumented] + - Add Kernel-Flavors check to Raspberry Pi entries [previously + undocumented] + - Support "raspi" kernel flavor in addition to "raspi2" (LP: #1868071) + - Add entry for Raspberry Pi 3A+ (LP: #1841955) + - Always run flash-kernel on install/upgrade + - Permit initrd to be missing in flash-kernel and the pi u-boot script + (LP: #1867791) + + * Dropped obsolete changes: + - Include support for arm*/ixp4xx and arm*/iop32x (was dropped upstream + but erroneously re-included in prior merge) + - 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. + - Also check for FLASH_KERNEL_SKIP to avoid setting up the root parameter + in case flash-kernel will not be used + - make the package postinst respect FLASH_KERNEL_SKIP + - Remove FLASH_KERNEL_SKIP; it's no longer used in livecd-rootfs + - Add support for installing dtb files in boot partition + - Remove redundant copying of boot dtb + - Apply patch from Paolo Pisati for appended DTB support + - Update tests with new fields: DTB-Kernel-Version + - Fix typo in dtb_kver test that made it break all non-dtb platforms. + - Remove redundant DTB-Kernel-Version field (in favour of upstream + DTB-Append-From field) + - Merge all RPi bootscripts into one unified bootscript which handles all + Pi architectures + - Remove uboot.env case which was only used for RPi2 (now supported by the + unified RPi bootscript) + + -- Dave Jones Mon, 04 May 2020 20:14:16 +0000 + flash-kernel (3.100) unstable; urgency=medium * Team upload @@ -89,6 +407,227 @@ -- Vagrant Cascadian Fri, 24 May 2019 18:36:25 -0700 +flash-kernel (3.98ubuntu12) focal; urgency=medium + + * Support "raspi" kernel flavor in addition to "raspi2" (LP: #1868071) + * Permit initrd to be missing in flash-kernel and the pi u-boot script + (LP: #1867791) + * Backport optional initrd changes from upstream to reduce our delta + * Move the container test from initramfs and kernel hooks to main to prevent + flash-kernel ever running in a container (LP: #1863145) + * Remove FLASH_KERNEL_SKIP; it's no longer used in livecd-rootfs + + -- Dave Jones Mon, 23 Mar 2020 14:10:03 +0000 + +flash-kernel (3.98ubuntu11) focal; urgency=medium + + * Permit flash-kernel to workaround an inconsistent /boot directory when + triggered prior to the kernel finishing its triggers (LP: #1861292) + + -- Dave Jones Wed, 29 Jan 2020 16:15:05 +0000 + +flash-kernel (3.98ubuntu10) focal; urgency=medium + + * Always run flash-kernel on install/upgrade + + -- Dave Jones Wed, 22 Jan 2020 19:53:20 +0000 + +flash-kernel (3.98ubuntu9) focal; urgency=medium + + * Ensure overlays dir always exists + + -- Dave Jones Fri, 17 Jan 2020 13:40:28 +0000 + +flash-kernel (3.98ubuntu8) focal; urgency=medium + + * Add support for the Raspberry Pi 4 rev 1.2 board (LP: #1854487) + + -- Dave Jones Fri, 29 Nov 2019 11:35:00 +0000 + +flash-kernel (3.98ubuntu7) focal; urgency=medium + + * Add systemd depends, as systemd-detect-virt is called in the scripts. + + -- Dimitri John Ledkov Tue, 26 Nov 2019 14:18:02 +0000 + +flash-kernel (3.98ubuntu6) focal; urgency=medium + + * Remove redundant DTB-Kernel-Version field + * Remove redundant copying of boot dtb + * Fix mkimage_kernel tests + * Add "pi" value for the "Method" field which copies all dtbs and overlays + to the boot partition and provides defaults for the boot paths of the + kernel, initrd, and u-boot script. This fixes upgrades to support the Pi 4 + on Bionic (LP: #1850678) + * Update pi bootscript to support all flash-kernel vars, including + calculated devtype and partition for future USB boot support + * Add entry for Raspberry Pi 3A+ (LP: #1841955) + + -- Dave Jones Thu, 07 Nov 2019 14:02:26 +0000 + +flash-kernel (3.98ubuntu5) eoan; urgency=medium + + * Fix AARCH64 qcom laptop names, to those accepted upstream and in the + Ubuntu kernel. LP: #1847594 + + -- Dimitri John Ledkov Thu, 10 Oct 2019 13:04:59 +0100 + +flash-kernel (3.98ubuntu4) eoan; urgency=medium + + * Add support for Raspberry Pi 4 (LP: #1847587) + + -- Dave Jones Thu, 10 Oct 2019 10:41:43 +0100 + +flash-kernel (3.98ubuntu3) eoan; urgency=medium + + * Add support for AAarch64 Qualcomm laptops. + + -- Dimitri John Ledkov Sun, 21 Jul 2019 11:17:17 -0300 + +flash-kernel (3.98ubuntu2) eoan; urgency=medium + + * Merge all RPi bootscripts into one unified bootscript which handles all Pi + architectures + * Remove uboot.env case which was only used for RPi2 (now supported by the + unified RPi bootscript) + + -- Dave Jones Tue, 11 Jun 2019 13:43:21 +0000 + +flash-kernel (3.98ubuntu1) eoan; urgency=medium + + * Merge with Debian unstable. Remaining changes: + - add "quiet splash" as default options to omap bootscr + - 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. + - Also check for FLASH_KERNEL_SKIP to avoid setting up the root parameter + in case flash-kernel will not be used + - make the package postinst respect FLASH_KERNEL_SKIP + - make sure that if we dont want to override the bootloader root= + option by setting "Bootloader-sets-root: yes", we actually dont do it + - use umount -l in the cleanup function, else we fail while finishing up + with the script + - 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 + - make post-base-installer.d/01flash-kernel-diversion actually an + executable shell script + - 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 + - make sure blkid only gives us the UUID and not any other metadata like + labels or filesystem + - hide the boot device from udisk's automounting after installation on all + systems using uEnv.txt to configure u-boot + - 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 + - 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, actual fixing of the netinst + environment is needed to fix this properly) + - drop the "|| true" from the initramfs building code, if we fail here we + actually dont want to attempt to flash that + - Do not run flash-kernel inside an LXC container + - Call systemd-detect-virt instead of the Ubuntu specific + running-in-container wrapper. + - Add generic-lpae to the XB-Subarchitecture list in debian/control + - debian/flash-kernel-installer.isinstallable: add arm*/generic-lpae + - Fix typo in dtb_kver test that made it break all non-dtb platforms. + - Apply patch from Paolo Pisati for appended DTB support + - Filter the selection of 'latest' usable kernel through the whitelist. + - Do not fail if there are no specified Kernel-Flavors for this machine. + - Allow us to find DTBs in both the old flat layout and the new vendor + subdirectory layout, so we keep backward compatibility + - Add support for installing dtb files in boot partition + - Add support for gzip-compressed kernel images + - db/all.db: add dummy entries as noops when running on VMs + - Add support for Calxeda Highbank + - Add support for Calxeda Highbank (with bootscr.highbank different from + Debian's version) + - bootscr.highbank: allow more space to load larger kernels + - Add support for Marvell ArmadaXP + - Re-add support for Marvell ArmadaXP + - Fix armadaxp kernel load address + - Add support for OMAP3 and OMAP4 boards + - add DB entry for "OMAP3 Beagle Board" (funnily thats missing) + - add Panda to the list of supported board in the README file + - 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. + - Also add omap and omap4 to flash-kernel-installer.isinstallable. + - switch omap3 and omap4 to uEnv.txt/preEnv.txt (the former holds all + active boot commands, the latter holds the kernel commandline only) + - 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 + - do not move the original uEnvtxt.omap to the target, use a copy + instead + - Add support for grouper boards + - add support for the grouper architecture + - Add support for Samsung Exynos 5440 platforms + - Add support for EXYNOS5440-based platforms + - Add support for HP ProLiant m400 and m800 cartridges + - Added support for HP ProLiant m800 Server Cartridge + - Add support for HP ProLiant m800 cartridges + - Set required boot arguments for HP ProLiant m800 cartridges + - Add support for HP ProLiant m400 Server Cartridges + - HP Moonshot Cartridges: Use $baudrate from u-boot environment as + serial console speed + - HP Moonshot Cartridges: Enable hardware flow control as required by + the HP moonshot chassis + - Enable U-Boot environment support for X-Gene platforms + - Use filesystem agnostic "load" command instead of assuming ext4 + - Add a bootscript specific to X-Gene Mustang boards since they need to + pull their dtb from the OS. + - Add support for Wandboard Quad + - Wandboard: Use /dev/disk/by-path/platform-2198000.usdhc-part1 + instead of the hardcoded mmcblk1p1, this should make things work on + boards with just a single microSD card in. + - Add basic support for WandBoard Quad. + - Add support for Raspberry Pi 2, 3, 3+, CM3, and CM3+ + - Extend support for the RPi2 to actually install the kernel/initramfs + on the fat partition, and provide a uboot boot script based on the one + used for Snappy images. + - Extend functions to support generating uboot.env images, as an + alternative to boot.scr and uEnv.txt, and use this for RPi2 as well. + - Adjust the uboot.env.rpi2 to use the one Paolo Pisati has tested, + instead of trying to base on the Snappy one, which is failing to boot. + - Adjust the size of uboot.env based on empirical results on the rpi2. + - Adjust rpi2/3 dtb address from 0x100 to 0x02000000 + - Support Raspberry Pi 2 Model B Rev 1.2 + - Add Raspberry Pi 3 Model B+ to the db. + - Modify the Pi 3 boot.scr addresses to fit a bigger kernel, prepare + separate versions for armhf and arm64. + - Add Raspberry Pi Compute Module 3 and 3+ to the db. + - Add support for Nexus 4 (Mako) + - Enabling support for mako (Nexus 4) + - Add support for QCT APQ8064 CDP + - Add support for QCT APQ8064 CDP; thanks Alfonso Sanchez-Beato. + - Migrate default /etc/default/flash-kernel content to new default without + asking via debconf + - Update tests with new fields: Android-Skip-Initrd, Bootloader-sets-root, + DTB-Kernel-Version + - Look for dtbs in /lib/firmware/$kvers/device-tree/ in find_dtb_file() + - Add Bootloader-sets-root to Toshiba AC100 [previously undocumented] + - Install all potential uboot scripts [previously undocumented] + - initramfs-hook/flash-kernel: Pretend we're running from the kernel's + postinst to activate the same guard against mismatched kernel versions. + - flash-kernel/functions: Stop attempting to install the latest kernel + if we request an older version, just refuse to act without --force. + + * Dropped changes merged in Debian: + - Remove commit-tmp cruft [previously undocumented] + + * Dropped obsolete changes: + - Add archs (why?) and duplicate generic (why?!) in d/control [previously + undocumented] + + -- Dave Jones Thu, 16 May 2019 12:08:32 +0000 + flash-kernel (3.98) unstable; urgency=medium [ Vagrant Cascadian ] @@ -235,6 +774,206 @@ -- Christian Perrier Thu, 01 Feb 2018 06:32:56 +0100 +flash-kernel (3.90ubuntu5) disco; urgency=medium + + * Add Raspberry Pi Compute Module 3 and 3+ to the db. + + -- Dave Jones Thu, 14 Feb 2019 11:12:13 +0000 + +flash-kernel (3.90ubuntu4) disco; urgency=medium + + * Add Raspberry Pi 3 Model B+ to the db. + * Modify the Pi 3 boot.scr addresses to fit a bigger kernel, prepare + separate versions for armhf and arm64. + + -- Łukasz 'sil2100' Zemczak Wed, 05 Dec 2018 00:18:12 +0200 + +flash-kernel (3.90ubuntu3) bionic; urgency=medium + + * flash-kernel/functions: Stop attempting to install the latest kernel + if we request an older version, just refuse to act without --force. + + -- Adam Conrad Wed, 25 Apr 2018 05:11:44 -0600 + +flash-kernel (3.90ubuntu2) bionic; urgency=medium + + * initramfs-hook/flash-kernel: Pretend we're running from the kernel's + postinst to activate the same guard against mismatched kernel versions. + + -- Adam Conrad Tue, 24 Apr 2018 08:17:06 -0600 + +flash-kernel (3.90ubuntu1) bionic; urgency=medium + + [ Balint Reczey ] + * Merge with Debian (LP: #1743771) + - remaining changes: + - add "quiet splash" as default options to omap bootscr + - 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. + - bootscr.highbank: allow more space to load larger kernels + - Add support for Calxeda Highbank (with bootscr.highbank different from + Debian's version) + - Re-add support for Marvell ArmadaXP + - Fix armadaxp kernel load address + - use umount -l in the cleanup function, else we fail while finishing up + with the script + - add DB entry for "OMAP3 Beagle Board" (funnily thats missing) + - add Panda to the list of supported board in the README file + - 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. + - Also add omap and omap4 to flash-kernel-installer.isinstallable. + - 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 + - make post-base-installer.d/01flash-kernel-diversion actually an + executable shell script + - switch omap3 and omap4 to uEnv.txt/preEnv.txt (the former holds all + active boot commands, the latter holds the kernel commandline only) + - 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 + - do not move the original uEnvtxt.omap to the target, use a copy instead + - 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 the bug than + the patch attached to the bug. + - hide the boot device from udisk's automounting after installation + on all systems using uEnv.txt to configure u-boot + - 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 + - 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, actual fixing of + the netinst environment is needed to fix this properly) + - add support for the grouper architecture + - make sure blkid only gives us the UUID and not any other metadata like + labels or filesystem + - drop the "|| true" from the initramfs building code, if we fail here we + actually dont want to attempt to flash that + - Do not run flash-kernel inside an LXC container + - Accept "generic" as a valid kernel flavor on highbank + - Add support for Calxeda ECX-2000 to the machine DB + - Add generic-lpae to the XB-Subarchitecture list in debian/control + - Update the Highbank entry in DB to use its device-tree model name + - Fix the testsuite to work with the new DT model support and add + a new test to specifically try to use a DT instead of cpuinfo. + - And now fix the quoting error exposed by the fixed testsuite. + - debian/flash-kernel-installer.isinstallable: add arm*/generic-lpae + - Fix typo in dtb_kver test that made it break all non-dtb platforms. + - Add support for EXYNOS5440-based platforms + - Added support for HP ProLiant m800 Server Cartridge + - Filter the selection of 'latest' usable kernel through the + whitelist. + - Do not fail if there are no specified Kernel-Flavors for this machine. + - HP Moonshot Cartridges: Use $baudrate from u-boot environment as + serial console speed + - HP Moonshot Cartridges: Enable hardware flow control as required by + the HP moonshot chassis + - Enable U-Boot environment support for X-Gene platforms + - Use filesystem agnostic "load" command instead of assuming ext4 + - Add support for HP ProLiant m800 cartridges + - Set required boot arguments for HP ProLiant m800 cartridges + - Allow us to find DTBs in both the old flat layout and the new vendor + subdirectory layout, so we keep backward compatibility + - Wandboard: Use /dev/disk/by-path/platform-2198000.usdhc-part1 + instead of the hardcoded mmcblk1p1, this should make things work on + boards with just a single microSD card in. + - make the package postinst respect FLASH_KERNEL_SKIP + - Call systemd-detect-virt instead of the Ubuntu specific + running-in-container wrapper. + - Extend support for the RPi2 to actually install the kernel/initramfs + on the fat partition, and provide a uboot boot script based on the one + used for Snappy images. + - Extend functions to support generating uboot.env images, as an + alternative to boot.scr and uEnv.txt, and use this for RPi2 as well. + - Adjust the uboot.env.rpi2 to use the one Paolo Pisati has tested, + instead of trying to base on the Snappy one, which is failing to boot. + - Adjust the size of uboot.env based on empirical results on the rpi2. + + - dropped changes, merged in Debian: + - 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") + - determine the latest installer kernel version in the target rootfs + instead of assuming the version is the same as the running kernel + - flash-plugin-installer: make installable on armhf/generic for highbank + - Also update XB-Subarchitecture to use "generic" instead of 'highbank" + - Extending Android specific options to cover the Ubuntu Touch use cases + (flashing to a specific device and support skipping initrd) + - Enabling support for mako (Nexus 4) + - Fix get_kfile_suffix() function to deal with flavours with dashes. + - Apply patch from Paolo Pisati for appended DTB support + - Add basic support for WandBoard Quad. + - flash-kernel-installer: make installable on armhf/exynos5 + - Add support for APM X-Gene + - Add support for installing dtb files in boot partition; activate this + for APM X-Gene boards + - Add support for HP ProLiant m400 Server Cartridges + - Update APM X-Gene config to match upstream device tree filename/model + - Add a bootscript specific to X-Gene Mustang boards since they need to + pull their dtb from the OS. + - db/all.db: add dummy entries as noops when running on VMs + - Add U-Boot environment configuration support + - Cherry pick from Debian: Succeed but do nothing when run on an + unknown machine which was booted via EFI. + - Add support for the Raspberry Pi2; thanks to Paolo Pisati + - Cherry-pick fixes from Debian to support copying kernel/initrd to + destination. + - Add Raspberry Pi 3 support + - Add support for gzip-compressed kernel images + - Adjust rpi2/3 dtb address from 0x100 to 0x02000000 + - Add support for QCT APQ8064 CDP; thanks Alfonso Sanchez-Beato. + - Check /proc/device-tree/model before /proc/cpuinfo + + - dropped obsoleted changes: + - add very very ugly temporary workaround to make quantal A3 arm server + installs possible (yes, i suck) + - 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 + - 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 + - make post-base-installer.d/01flash-kernel-diversion executable + - 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 + - seemingly -k all doesnt want to work with -c, use -k $(uname -r) for + now + - 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) + - make /etc/default/flash-kernel a proper conffile + - Added support for user defined uboot environment variables + * Update tests with new fields: Android-Skip-Initrd, Bootloader-sets-root, + DTB-Kernel-Version + * Migrate default /etc/default/flash-kernel content to new default without asking via debconf + * Look for dtbs in /lib/firmware/$kvers/device-tree/ in find_dtb_file() + + [ Alex McWhirter ] + * Support Raspberry Pi 2 Model B Rev 1.2 + + -- Balint Reczey Fri, 26 Jan 2018 22:05:44 +0100 + flash-kernel (3.90) unstable; urgency=medium [ Andreas Henriksson ] @@ -1399,6 +2138,498 @@ -- Hector Oron Sun, 11 Mar 2012 16:02:39 +0100 +flash-kernel (3.0~rc.4ubuntu66) artful; urgency=medium + + * Add support for QCT APQ8064 CDP; thanks Alfonso Sanchez-Beato. + + -- Loïc Minier Fri, 01 Sep 2017 14:46:52 +0200 + +flash-kernel (3.0~rc.4ubuntu65) zesty; urgency=medium + + * Adjust rpi2/3 dtb address from 0x100 to 0x02000000 (LP: #1636838) + + -- Paolo Pisati Wed, 09 Nov 2016 15:41:50 +0200 + +flash-kernel (3.0~rc.4ubuntu64) yakkety; urgency=medium + + * Add support for gzip-compressed kernel images (LP: #1384955) + + -- dann frazier Thu, 25 Aug 2016 12:39:19 -0600 + +flash-kernel (3.0~rc.4ubuntu63) yakkety; urgency=medium + + * Add Raspberry Pi 3 support (LP: #1578505) + + -- Ryan Finnie Thu, 05 May 2016 06:04:00 +0000 + +flash-kernel (3.0~rc.4ubuntu62) xenial; urgency=medium + + * Adjust the size of uboot.env based on empirical results on the rpi2. + + -- Steve Langasek Sat, 13 Feb 2016 23:25:39 -0800 + +flash-kernel (3.0~rc.4ubuntu61) xenial; urgency=medium + + * Adjust the uboot.env.rpi2 to use the one Paolo Pisati has tested, + instead of trying to base on the Snappy one, which is failing to boot. + + -- Steve Langasek Fri, 12 Feb 2016 11:44:45 -0800 + +flash-kernel (3.0~rc.4ubuntu60) xenial; urgency=medium + + * Extend support for the RPi2 to actually install the kernel/initramfs + on the fat partition, and provide a uboot boot script based on the one + used for Snappy images. + * Extend functions to support generating uboot.env images, as an + alternative to boot.scr and uEnv.txt, and use this for RPi2 as well. + * Cherry-pick fixes from Debian to support copying kernel/initrd to + destination. + + -- Steve Langasek Thu, 11 Feb 2016 17:09:53 -0800 + +flash-kernel (3.0~rc.4ubuntu59) xenial; urgency=medium + + * Add support for the Raspberry Pi2; thanks to Paolo Pisati + * . + + -- Steve Langasek Tue, 09 Feb 2016 22:35:28 -0800 + +flash-kernel (3.0~rc.4ubuntu58) xenial; urgency=medium + + * Call systemd-detect-virt instead of the Ubuntu specific + running-in-container wrapper. (LP: #1539016) + + -- Martin Pitt Thu, 28 Jan 2016 14:22:57 +0100 + +flash-kernel (3.0~rc.4ubuntu57) xenial; urgency=medium + + * Cherry pick from Debian: Succeed but do nothing when run on an + unknown machine which was booted via EFI. (LP: #1517582) + + -- dann frazier Tue, 01 Dec 2015 13:51:27 -0700 + +flash-kernel (3.0~rc.4ubuntu56) xenial; urgency=medium + + * make the package postinst respect FLASH_KERNEL_SKIP (LP: #1517582) + + -- Oliver Grawert Wed, 25 Nov 2015 21:12:16 +0100 + +flash-kernel (3.0~rc.4ubuntu55) wily; urgency=medium + + * Wandboard: Use /dev/disk/by-path/platform-2198000.usdhc-part1 + instead of the hardcoded mmcblk1p1, this should make things work on + boards with just a single microSD card in. + + -- Stéphane Graber Thu, 27 Aug 2015 11:55:41 -0400 + +flash-kernel (3.0~rc.4ubuntu54) vivid; urgency=medium + + * Allow us to find DTBs in both the old flat layout and the new vendor + subdirectory layout, so we keep backward compatibility (LP: #1408004) + + -- Adam Conrad Fri, 27 Feb 2015 03:46:28 -0700 + +flash-kernel (3.0~rc.4ubuntu53) utopic; urgency=medium + + * Merge in remaining trusty SRU changes: + * Add U-Boot environment configuration support (LP: #1328597) + * HP Moonshot Cartridges: Use $baudrate from u-boot environment as + serial console speed (LP: #1373628) + * HP Moonshot Cartridges: Enable hardware flow control as required by + the HP moonshot chassis (LP: #1328280) + * Enable U-Boot environment support for X-Gene platforms + * Use filesystem agnostic "load" command instead of assuming ext4 + * Add support for HP ProLiant m800 cartridges (LP: #1326437) + * Set required boot arguments for HP ProLiant m800 cartridges + (LP: #1373659) + + -- dann frazier Mon, 29 Sep 2014 16:20:15 -0600 + +flash-kernel (3.0~rc.4ubuntu52) utopic; urgency=medium + + * Do not fail if there are no specified Kernel-Flavors for this machine. + + -- Scott Moser Wed, 27 Aug 2014 15:59:26 -0400 + +flash-kernel (3.0~rc.4ubuntu51) utopic; urgency=medium + + * Filter the selection of 'latest' usable kernel through the + whitelist. (LP: #1356569) + + -- Manoj Iyer Tue, 19 Aug 2014 14:27:33 -0500 + +flash-kernel (3.0~rc.4ubuntu50) utopic; urgency=medium + + * Added support for user defined uboot environment variables + * Added support for HP ProLiant m800 Server Cartridge + + -- Manoj Iyer Thu, 24 Apr 2014 17:34:28 -0500 + +flash-kernel (3.0~rc.4ubuntu49) trusty; urgency=medium + + * db/all.db: add dummy entries as noops when running on VMs (LP: #1298070) + + -- Adam Conrad Thu, 10 Apr 2014 04:15:37 -0600 + +flash-kernel (3.0~rc.4ubuntu48) trusty; urgency=medium + + * Update APM X-Gene config to match upstream device tree filename/model + * Add a bootscript specific to X-Gene Mustang boards since they need to + pull their dtb from the OS. + + -- dann frazier Tue, 18 Mar 2014 16:31:38 -0600 + +flash-kernel (3.0~rc.4ubuntu47) trusty; urgency=medium + + * Add support for HP ProLiant m400 Server Cartridges (LP: #1287910) + + -- dann frazier Wed, 12 Mar 2014 15:10:43 +0100 + +flash-kernel (3.0~rc.4ubuntu46) trusty; urgency=low + + * Add support for APM X-Gene + * Add support for installing dtb files in boot partition; activate this for + APM X-Gene boards + + -- dann frazier Mon, 23 Dec 2013 14:51:32 -0700 + +flash-kernel (3.0~rc.4ubuntu45) trusty; urgency=low + + * bootscr.highbank: allow more space to load larger kernels (LP: #1250495) + + -- Adam Conrad Wed, 11 Dec 2013 03:48:23 -0700 + +flash-kernel (3.0~rc.4ubuntu44) trusty; urgency=low + + * flash-kernel-installer: make installable on armhf/exynos5 (LP: #1247601) + + -- dann frazier Wed, 13 Nov 2013 08:08:08 +0100 + +flash-kernel (3.0~rc.4ubuntu43) trusty; urgency=low + + * Add basic support for WandBoard Quad. + + -- Stéphane Graber Thu, 07 Nov 2013 23:57:58 -0500 + +flash-kernel (3.0~rc.4ubuntu42) saucy; urgency=low + + * Add support for EXYNOS5440-based platforms (LP: #1231249) + + -- dann frazier Thu, 03 Oct 2013 13:56:55 +0100 + +flash-kernel (3.0~rc.4ubuntu41) saucy; urgency=low + + * Fix typo in dtb_kver test that made it break all non-dtb platforms. + + -- Adam Conrad Sat, 21 Sep 2013 13:07:23 -0600 + +flash-kernel (3.0~rc.4ubuntu40) saucy; urgency=low + + * Apply patch from Paolo Pisati for appended DTB support (LP: #1223261) + + -- Adam Conrad Thu, 19 Sep 2013 10:27:47 -0600 + +flash-kernel (3.0~rc.4ubuntu39) saucy; urgency=low + + * Fix get_kfile_suffix() function to deal with flavours with dashes. + + -- Adam Conrad Tue, 10 Sep 2013 19:30:34 -0400 + +flash-kernel (3.0~rc.4ubuntu38) saucy; urgency=low + + * debian/flash-kernel-installer.isinstallable: add arm*/generic-lpae + + -- Adam Conrad Tue, 10 Sep 2013 17:43:52 -0400 + +flash-kernel (3.0~rc.4ubuntu37) saucy; urgency=low + + * And now fix the quoting error exposed by the fixed testsuite. + + -- Adam Conrad Tue, 10 Sep 2013 15:22:49 -0400 + +flash-kernel (3.0~rc.4ubuntu36) saucy; urgency=low + + * Fix the testsuite to work with the new DT model support and add + a new test to specifically try to use a DT instead of cpuinfo. + + -- Adam Conrad Tue, 10 Sep 2013 14:59:04 -0400 + +flash-kernel (3.0~rc.4ubuntu35) saucy; urgency=low + + * Check /proc/device-tree/model before /proc/cpuinfo (LP: #1164484) + * Add support for Calxeda ECX-2000 to the machine DB (LP: #1223439) + * Add generic-lpae to the XB-Subarchitecture list in debian/control + * Update the Highbank entry in DB to use its device-tree model name + + -- Adam Conrad Tue, 10 Sep 2013 14:36:05 -0400 + +flash-kernel (3.0~rc.4ubuntu34) saucy; urgency=low + + * Extending Android specific options to cover the Ubuntu Touch use cases + (flashing to a specific device and support skipping initrd) + * Enabling support for mako (Nexus 4) + + -- Ricardo Salveti de Araujo Tue, 14 May 2013 04:27:01 -0300 + +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.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.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.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.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) 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.103/debian/control flash-kernel-3.103ubuntu1/debian/control --- flash-kernel-3.103/debian/control 2019-04-22 08:11:45.000000000 +0100 +++ flash-kernel-3.103ubuntu1/debian/control 2020-11-22 15:32:05.000000000 +0000 @@ -15,9 +15,11 @@ Depends: ${misc:Depends}, devio, initramfs-tools (>= 0.92f), + systemd, linux-base (>= 3.2), mtd-utils, - ucf + ucf, + awk Recommends: u-boot-tools Description: utility to make certain embedded devices bootable flash-kernel is a script which will put the kernel and initramfs in @@ -31,7 +33,7 @@ Priority: standard Package-Type: udeb Architecture: arm64 armel armhf -XB-Subarchitecture: kirkwood orion5x s3c24xx mx5 generic +XB-Subarchitecture: armadaxp exynos5 generic-lpae keystone kirkwood orion5x s3c24xx mx5 omap omap4 xgene generic Provides: bootable-system Depends: cdebconf-udeb, installed-base XB-Installer-Menu-Item: 7300 diff -Nru flash-kernel-3.103/debian/flash-kernel-installer.install flash-kernel-3.103ubuntu1/debian/flash-kernel-installer.install --- flash-kernel-3.103/debian/flash-kernel-installer.install 2018-08-10 20:22:02.000000000 +0100 +++ flash-kernel-3.103ubuntu1/debian/flash-kernel-installer.install 2020-11-22 15:32:05.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.103/debian/flash-kernel-installer.isinstallable flash-kernel-3.103ubuntu1/debian/flash-kernel-installer.isinstallable --- flash-kernel-3.103/debian/flash-kernel-installer.isinstallable 2019-02-28 06:52:45.000000000 +0000 +++ flash-kernel-3.103ubuntu1/debian/flash-kernel-installer.isinstallable 2020-11-22 15:32:05.000000000 +0000 @@ -2,6 +2,18 @@ set -e case "`archdetect`" in + arm*/armadaxp) + exit 0 + ;; + arm*/exynos5) + exit 0 + ;; + arm*/generic-lpae) + exit 0 + ;; + arm*/keystone) + exit 0 + ;; arm*/kirkwood) exit 0 ;; @@ -14,6 +26,15 @@ arm*/s3c24xx) exit 0 ;; + arm*/omap) + exit 0 + ;; + arm*/omap4) + exit 0 + ;; + arm64/xgene) + exit 0 + ;; arm*/generic) FK_DIR="/usr/share/flash-kernel" diff -Nru flash-kernel-3.103/debian/flash-kernel-installer.postinst.in flash-kernel-3.103ubuntu1/debian/flash-kernel-installer.postinst.in --- flash-kernel-3.103/debian/flash-kernel-installer.postinst.in 2018-08-10 20:22:02.000000000 +0100 +++ flash-kernel-3.103ubuntu1/debian/flash-kernel-installer.postinst.in 2020-11-22 15:32:05.000000000 +0000 @@ -28,6 +28,12 @@ sed '1!G;h;$!d' } +# 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 + get_machine if machine_uses_flash "$machine"; then @@ -91,7 +97,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 @@ -121,6 +130,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.103/debian/flash-kernel.postinst flash-kernel-3.103ubuntu1/debian/flash-kernel.postinst --- flash-kernel-3.103/debian/flash-kernel.postinst 2018-08-10 20:22:02.000000000 +0100 +++ flash-kernel-3.103ubuntu1/debian/flash-kernel.postinst 2020-11-22 15:32:05.000000000 +0000 @@ -24,20 +24,20 @@ . /usr/share/debconf/confmodule tmp_default_fk="$(mktemp -t flash-kernel.XXXXXXXXXX)" - trap "rm -f ${tmp_default_fk}" EXIT + tmp_default_fk_old_md5s="$(mktemp -t flash-kernel.md5sums.XXXXXXXXXX)" + trap "rm -f ${tmp_default_fk} ${tmp_default_fk_old_md5s}" EXIT cp -p /usr/share/flash-kernel/default/flash-kernel \ ${tmp_default_fk} + echo "6d73d0418e01f86e006d590e4b1ca85e" > ${tmp_default_fk_old_md5s} merge_debconf_into_conf "$tmp_default_fk" \ LINUX_KERNEL_CMDLINE flash-kernel/linux_cmdline - ucf --three-way --debconf-ok ${tmp_default_fk} \ + ucf --three-way --debconf-ok --sum-file ${tmp_default_fk_old_md5s} \ + ${tmp_default_fk} \ /etc/default/flash-kernel ucfr flash-kernel /etc/default/flash-kernel ;; - triggered) - FLASH_KERNEL_NOTRIGGER=y flash-kernel - ;; - abort-upgrade|abort-remove|abort-deconfigure) + triggered|abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 @@ -45,4 +45,12 @@ ;; esac +if [ "x$1" = xtriggered ]; then + # this forces flash-kernel to run rather than setting our trigger to + # cause a later run (as happens without _NOTRIGGER being set) + FLASH_KERNEL_NOTRIGGER=y flash-kernel +else + flash-kernel +fi + #DEBHELPER# diff -Nru flash-kernel-3.103/debian/rules flash-kernel-3.103ubuntu1/debian/rules --- flash-kernel-3.103/debian/rules 2020-02-01 06:40:57.000000000 +0000 +++ flash-kernel-3.103ubuntu1/debian/rules 2020-11-22 15:32:05.000000000 +0000 @@ -19,7 +19,7 @@ install -m0755 -p -d debian/flash-kernel/etc/flash-kernel/bootscript set -ex ; for arch in all $(DEB_HOST_ARCH) ; do \ [ -d bootscript/$${arch} ] || continue ; \ - install -m0644 bootscript/$${arch}/bootscr.* \ + install -m0644 bootscript/$${arch}/* \ debian/flash-kernel/etc/flash-kernel/bootscript/ ; \ done ifeq (armhf,$(DEB_HOST_ARCH)) diff -Nru flash-kernel-3.103/functions flash-kernel-3.103ubuntu1/functions --- flash-kernel-3.103/functions 2020-02-01 06:40:53.000000000 +0000 +++ flash-kernel-3.103ubuntu1/functions 2020-11-22 15:32:05.000000000 +0000 @@ -21,6 +21,7 @@ BOOTSCRIPTS_DIR="${FK_CHECKOUT:-/etc/flash-kernel}/bootscript" FK_ETC_MACHINE="${FK_ETC_MACHINE:-/etc/flash-kernel/machine}" +FK_DEFAULTS="${FK_DEFAULTS:-/etc/default/flash-kernel}" PROC_CPUINFO="${FK_PROC_CPUINFO:-/proc/cpuinfo}" PROC_DTMODEL="${FK_PROC_DTMODEL:-/proc/device-tree/model}" PROC_MTD="/proc/mtd" @@ -131,7 +132,7 @@ echo "$MACHINE_DB" | { while read field value; do if [ "$field" = "Machine:" ] && - [ "$value" = "$machine" ]; then + match_machine "$machine" "$value"; then return 0 fi done @@ -139,6 +140,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*//' } @@ -165,6 +170,23 @@ echo "$kfile" | sed -e "s/.*-\([^-]*$tail\)/\\1/" } +# match a machine name (in $1) to a machine name / pattern ($2) from the +# database; patterns are permitted to contain globbing characters (*, ?, [) +# supported by dash +match_machine() { + local machine="$1" + local pattern="$2" + + case "$machine" in + $pattern) # Must not be quoted to permit globbing + return 0 + ;; + *) + return 1 + ;; + esac +} + # this is case-sensitive and doesn't support fields spanning multiple lines get_machine_field() { local machine="$1" @@ -184,7 +206,7 @@ while read field value; do if [ "$state" = "machine" ] && [ "$field" = "Machine:" ] && - [ "$value" = "$machine" ]; then + match_machine "$machine" "$value"; then state="gotmachine" fi if [ "$state" = "fields" ] || [ "$state" = "gotmachine" ]; then @@ -423,24 +445,65 @@ echo "done." >&2 } +compress_type() { + local file="$1" + magic="$(od -x -N2 $file | head -1 | cut -d' ' -f2)" + case $magic in + 8b1f) + echo "gzip" + ;; + *) + echo "none" + ;; + esac +} + get_kernel_cmdline() { - . /etc/default/flash-kernel + . ${FK_DEFAULTS} echo "$LINUX_KERNEL_CMDLINE" } get_kernel_cmdline_defaults() { - . /etc/default/flash-kernel + . ${FK_DEFAULTS} echo "$LINUX_KERNEL_CMDLINE_DEFAULTS" } +maybe_defrag() { + local file="$1" + local field="Bootloader-Has-Broken-Ext4-Extent-Support" + local broken_fw + + if ! broken_fw=$(get_machine_field "$machine" "$field"); then + return + fi + if [ "$broken_fw" != "yes" ]; then + return + fi + if [ "$(df --output=fstype ${file} | sed -e 1d)" != "ext4" ]; then + return + fi + if ! command -v e4defrag > /dev/null; then + printf "WARNING: e4defrag command not found, unable to defrag %s.\n" "$file" + printf "WARNING: THIS MAY LEAVE YOUR SYSTEM UNBOOTABLE.\n" + return + fi + if ! e4defrag "$file" > /dev/null 2>&1; then + printf "WARNING: e4defrag of file %s failed.\n" "$file" + printf "WARNING: Try freeing up disk space in /boot and retrying flash-kernel.\n" + fi +} + mkimage_kernel() { local kaddr="$1" local epoint="$2" local kdesc="$3" local kdata="$4" local uimage="$5" + local comp + + comp="$(compress_type $kdata)" printf "Generating kernel u-boot image... " >&2 - mkimage -A "$mkarch" -O linux -T kernel -C none -a "$kaddr" -e "$epoint" \ + mkimage -A "$mkarch" -O linux -T kernel -C $comp -a "$kaddr" -e "$epoint" \ -n "$kdesc" -d "$kdata" "$uimage" >&2 1>/dev/null echo "done." >&2 } @@ -482,7 +545,7 @@ -e "/@@UBOOT_ENV_EXTRA@@/{ s/@@UBOOT_ENV_EXTRA@@//g r $ubootenv - }" < $sdata > $tdata \ + }" \ -e "/@@UBOOT_PREBOOT_EXTRA@@/{ s/@@UBOOT_PREBOOT_EXTRA@@//g r $preboot @@ -510,7 +573,7 @@ # Return a nonempty string *unless* NO_CREATE_DOT_BAK_FILES is set. get_dot_bak_preference() { - . /etc/default/flash-kernel + . ${FK_DEFAULTS} case $(echo "$NO_CREATE_DOT_BAK_FILES" | tr '[:upper:]' '[:lower:]') in true|yes|1) ;; *) echo yes ;; @@ -519,7 +582,7 @@ # Return a nonempty string *unless* MTD_BACKUP_DIR is "none". get_mtd_backup_dir() { - . /etc/default/flash-kernel + . ${FK_DEFAULTS} case "${MTD_BACKUP_DIR:=/var/backups/flash-kernel}" in none) echo "";; *) echo "${MTD_BACKUP_DIR}";; @@ -550,6 +613,21 @@ fi echo "Installing new $(basename "$dest")." >&2 mv "$source" "$dest" + maybe_defrag "$dest" +} + +backup_and_remove() { + local dest="$1" + local do_dot_bak=$(get_dot_bak_preference) + if [ -e "$dest" ]; then + if [ -n "$do_dot_bak" ]; then + echo "Taking backup of $(basename "$dest")." >&2 + mv "$dest" "$dest.bak" + else + echo "Skipping backup of $(basename "$dest")." >&2 + rm "$dest" + fi + fi } # See http://www.nslu2-linux.org/wiki/Info/BootFlash -- the NSLU2 uses a @@ -568,7 +646,6 @@ fi } -# XXX needs testsuite coverage abootimg_get_image_size() { local abootimg="$1" @@ -579,18 +656,46 @@ linux-version compare "$kvers" ge "$dtb_append_from" } -# XXX needs testsuite coverage android_flash() { local device="$1" - printf "Flashing kernel and initramfs to $device... " >&2 - abootimg -u "$device" -k "$kfile" -r "$ifile" >/dev/null || - error "failed." - echo "done." >&2 + if [ -z "$android_skip_initrd" ]; then + printf "Flashing kernel and initramfs to $device... " >&2 + abootimg -u "$device" -k "$kfile" -r "$ifile" >/dev/null || + error "failed." + echo "done." >&2 + else + printf "Flashing the kernel (skipping initrd) to $device... " >&2 + abootimg -u "$device" -k "$kfile" >/dev/null || error "failed." + echo "done." >&2 + fi +} + +include_only_flavors() { + # include_only_flavors(flav1, flav2, flav3) + # filter lines of input in uname -r format (X.Y.Z-N-flavor) + # and filter-out anything that is not in the listed input + # if the only flavor given is "any", then assume everything is a match + local cur_uname cur_flav allowed_flav + while read cur_uname; do + if [ "$*" = "any" ]; then + echo "$cur_uname" + else + # could use cur_flav=$(get_kfile_suffix "$cur_uname") + # but this is much faster. + cur_flav=${cur_uname#*-*-} + for allowed_flav in "$@"; do + if [ "${cur_flav}" = "${allowed_flav}" ]; then + echo "$cur_uname" + break + fi + done + fi + done } find_dtb_file() { - local dtb + local dtb path case "$dtb_dir" in /*) dtb="$dtb_dir/$dtb_name" @@ -599,18 +704,49 @@ fi ;; *) - dtb=$(find /etc/flash-kernel/dtbs -name $dtb_name 2>/dev/null | head -n 1) - if [ -z "$dtb" ]; then - dtb=$(find /usr/lib/linux-image-$kvers -name $dtb_name 2>/dev/null | head -n 1) - fi + dtb= + paths="/etc/flash-kernel/dtbs /usr/lib/linux-image-$kvers /lib/firmware/$kvers/device-tree/" + for path in $paths; do + dtb=$(find $path -name $dtb_name 2>/dev/null | head -n 1) + [ -z "$dtb" ] || break + done if [ ! -f "$dtb" ]; then - error "Couldn't find DTB $dtb_name in /usr/lib/linux-image-$kvers or /etc/flash-kernel/dtbs" + error "Couldn't find DTB $dtb_name on the following paths: $paths" fi ;; esac echo $dtb } +unique_filenames() { + awk ' + { + file=$0; + sub("^.*/", "", file); + if (!(file in files)) files[file]=$0; + } + END { + for (file in files) print files[file]; + }' +} + +find_all_dtbs() { + # NOTE: The following assumes that "find" processes and outputs + # filenames in the same order as starting points ($paths) are specified + paths="/etc/flash-kernel/dtbs /usr/lib/linux-image-$kvers /lib/firmware/$kvers/device-tree/" + find $paths -name "*.dtb" 2>/dev/null | unique_filenames +} + +find_all_overlays() { + paths="/etc/flash-kernel/dtbs /usr/lib/linux-image-$kvers /lib/firmware/$kvers/device-tree/" + find $paths -name "*.dtbo" 2>/dev/null | unique_filenames +} + +find_pi_firmware() { + paths="/usr/lib/linux-firmware-raspi /usr/lib/linux-firmware-raspi2" + find $paths -name "*.bin" -o -name "*.elf" -o -name "*.dat" 2>/dev/null | unique_filenames +} + handle_dtb() { if [ "x$dtb_name" = "x" ]; then return @@ -666,6 +802,11 @@ } main() { +# Do not run inside an LXC container +if systemd-detect-virt --quiet --container; then + exit 0 +fi + force="no" if [ "x$1" = "x--force" ]; then force="yes" @@ -700,7 +841,12 @@ handle_dtb fi -latest_version=$(linux-version list | linux-version sort | tail -1) +# if get_machine_field returns non-zero, then all flavors are allowed +if ! kflavors=$(get_machine_field "$machine" "Kernel-Flavors") ; then + # Since no Kernel-Flavors were specified, allow any kernel. + kflavors="any" +fi +latest_version=$(linux-version list | include_only_flavors $kflavors | linux-version sort | tail -1) if [ -n "$kvers" ] && [ "$FK_KERNEL_HOOK_SCRIPT" = "postrm.d" ]; then echo "flash-kernel: Kernel ${kvers} has been removed." >&2 @@ -725,10 +871,7 @@ else if [ -n "$kvers" ] && [ "$kvers" != "$latest_version" ]; then echo "Ignoring old or unknown version $kvers (latest is $latest_version)" >&2 - if [ "$FK_KERNEL_HOOK_SCRIPT" = "postinst.d" ]; then - exit 0 - fi - echo "Use --force if you want version $kvers." >&2 + exit 0 fi kvers="$latest_version" # Make sure we install the DTB for $latest_version @@ -791,10 +934,6 @@ fi kfile_suffix="" -if ! kflavors=$(get_machine_field "$machine" "Kernel-Flavors") ; then - # Since no Kernel-Flavors were specified, allow any kernel. - kflavors="any" -fi for kflavor in $kflavors ; do if check_kflavors "$kvers" "$kflavor" ; then kfile_suffix="$kflavor" @@ -832,6 +971,7 @@ boot_dtb_path_version="$(get_machine_field "$machine" "Boot-DTB-Path-Version")" || : boot_multi_path="$(get_machine_field "$machine" "Boot-Multi-Path")" || : android_boot_device="$(get_machine_field "$machine" "Android-Boot-Device")" || : +android_skip_initrd="$(get_machine_field "$machine" "Android-Skip-Initrd")" || : if [ -n "$dtb_append_from" ]; then if dtb_append_required; then @@ -876,7 +1016,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 } @@ -888,18 +1028,22 @@ case "$method" in "android") [ -n "$ifile" ] || error "Initrd required for android method" - part="" - largest_size="-1" - for p in "$android_boot_device"*[0-9]; do - if ! abootimg="$(LC_ALL=C abootimg -i "$p" 2>/dev/null)"; then - continue - fi - image_size="$(abootimg_get_image_size "$abootimg")" - if [ -n "$image_size" ] && - [ "$image_size" -gt "$largest_size" ]; then - part="$p" - fi - done + if abootimg -i "$android_boot_device" > /dev/null 2>&1; then + part="$android_boot_device" + else + part="" + largest_size="-1" + for p in "$android_boot_device"*[0-9]; do + if ! abootimg="$(LC_ALL=C abootimg -i "$p" 2>/dev/null)"; then + continue + fi + image_size="$(abootimg_get_image_size "$abootimg")" + if [ -n "$image_size" ] && + [ "$image_size" -gt "$largest_size" ]; then + part="$p" + fi + done + fi if [ -z "$part" ]; then error "Couldn't find Android boot partition on $android_boot_device" fi @@ -1002,16 +1146,36 @@ rm -f "$tmpdir/uInitrd" fi if [ -n "$boot_script_path" ]; then - boot_script_path="$boot_mnt_dir/$boot_script_path" - boot_script="$tmpdir/bootscript" - for script in $usname ; do - echo "\n#\n# flash-kernel: $script\n#\n" >> "$boot_script" - cat "$BOOTSCRIPTS_DIR/$script" >> "$boot_script" - done - 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="$tmpdir/bootscript" + for script in $usname ; do + echo "\n#\n# flash-kernel: $script\n#\n" >> "$boot_script" + cat "$BOOTSCRIPTS_DIR/$script" >> "$boot_script" + done + 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=ro $(LINUX_KERNEL_CMDLINE) root=UUID=$VOLID" > $env_script + + backup_and_install "$env_script" "$boot_script_env" + backup_and_install "$boot_script" "$boot_script_path" + ;; + esac fi if [ -n "$boot_dtb_path" ] && [ "$dtb_append" != "no" ]; then boot_dtb_path="$boot_mnt_dir/$boot_dtb_path" @@ -1024,6 +1188,51 @@ backup_and_install "$dtb" "$boot_dtb_path" fi ;; + "pi") + boot_dir="/boot/firmware" + boot_kernel_path=${boot_kernel_path:-$boot_dir/vmlinuz} + boot_initrd_path=${boot_initrd_path:-$boot_dir/initrd.img} + boot_script_path=${boot_script_path:-$boot_dir/boot.scr} + cp "$kfile" "$tmpdir/vmlinuz" + backup_and_install "$tmpdir/vmlinuz" "$boot_kernel_path" + if [ -n "$ifile" ]; then + cp "$ifile" "$tmpdir/initrd.img" + backup_and_install "$tmpdir/initrd.img" "$boot_initrd_path" + else + backup_and_remove "$boot_initrd_path" + fi + if [ -n "$usname" ]; then + boot_script="$tmpdir/boot.scr" + for script in $usname ; do + echo "\n#\n# flash-kernel: $script\n#\n" >> "$boot_script" + cat "$BOOTSCRIPTS_DIR/$script" >> "$boot_script" + done + mkimage_script "$usaddr" "boot script" "$boot_script" "$tmpdir/boot.scr" + backup_and_install "$boot_script" "$boot_dir/boot.scr" + fi + find_pi_firmware | { + while read fw; do + fw_name=$(basename $fw) + cp "$fw" "$tmpdir/$fw_name" + backup_and_install "$tmpdir/$fw_name" "$boot_dir/$fw_name" + done + } + find_all_dtbs | { + while read dtb; do + dtb_name=$(basename $dtb) + cp "$dtb" "$tmpdir/$dtb_name" + backup_and_install "$tmpdir/$dtb_name" "$boot_dir/$dtb_name" + done + } + mkdir -p "$boot_dir/overlays" + find_all_overlays | { + while read overlay; do + overlay_name=$(basename $overlay) + cp "$overlay" "$tmpdir/$overlay_name" + backup_and_install "$tmpdir/$overlay_name" "$boot_dir/overlays/$overlay_name" + done + } + ;; "symlink") [ -n "$ifile" ] || error "Initrd required for symlink method" rm -f /boot/initrd /boot/zImage diff -Nru flash-kernel-3.103/initramfs-tools/hooks/flash_kernel_set_root flash-kernel-3.103ubuntu1/initramfs-tools/hooks/flash_kernel_set_root --- flash-kernel-3.103/initramfs-tools/hooks/flash_kernel_set_root 2018-08-10 20:22:02.000000000 +0100 +++ flash-kernel-3.103ubuntu1/initramfs-tools/hooks/flash_kernel_set_root 2020-11-22 15:32:05.000000000 +0000 @@ -55,6 +55,21 @@ . /usr/share/initramfs-tools/hook-functions +get_machine + +# Should we override the root device or merely provide a default root +# device? +blsr="$(get_machine_field "$machine" "Bootloader-sets-root")" + +if [ "$blsr" = "yes" ]; then + exit 0 +fi + +# Do not run inside an LXC container +if systemd-detect-virt --quiet --container; then + exit 0 +fi + # Record the root filesystem device for use during boot rootdev=$(egrep '^[^# ]+[ ]+/[ ]' /etc/fstab | awk '{print $1}') || true diff -Nru flash-kernel-3.103/post-base-installer.d/01flash-kernel-diversion flash-kernel-3.103ubuntu1/post-base-installer.d/01flash-kernel-diversion --- flash-kernel-3.103/post-base-installer.d/01flash-kernel-diversion 1970-01-01 01:00:00.000000000 +0100 +++ flash-kernel-3.103ubuntu1/post-base-installer.d/01flash-kernel-diversion 2020-11-22 15:32:05.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 diff -Nru flash-kernel-3.103/test_db flash-kernel-3.103ubuntu1/test_db --- flash-kernel-3.103/test_db 2018-08-10 20:22:02.000000000 +0100 +++ flash-kernel-3.103ubuntu1/test_db 2020-11-22 15:32:05.000000000 +0000 @@ -22,7 +22,7 @@ MACHINE_DB="$(cat "${FK_CHECKOUT:-$FK_DIR}/db/"*.db)" test_no_unknown_fields() { - local expected='Android-Boot-Device Boot-Device Boot-DTB-Path Boot-Initrd-Path Boot-Kernel-Path Boot-Multi-Path Boot-Script-Path Bootloader-Sets-Incorrect-Root DTB-Append DTB-Append-From DTB-Id Kernel-Flavors Machine Machine-Id Method Mtd-Initrd Mtd-Kernel Optional-Packages Required-Packages U-Boot-Initrd-Address U-Boot-Kernel-Address U-Boot-Kernel-Entry-Point U-Boot-Multi-Address U-Boot-Script-Address U-Boot-Script-Name' + local expected='Android-Boot-Device Android-Skip-Initrd Boot-Device Boot-DTB-Path Boot-Initrd-Path Boot-Kernel-Path Bootloader-Has-Broken-Ext4-Extent-Support Bootloader-Sets-Incorrect-Root Bootloader-sets-root Boot-Multi-Path Boot-Script-Path DTB-Append DTB-Append-From DTB-Id Kernel-Flavors Machine Machine-Id Method Mtd-Initrd Mtd-Kernel Optional-Packages Required-Packages U-Boot-Initrd-Address U-Boot-Kernel-Address U-Boot-Kernel-Entry-Point U-Boot-Multi-Address U-Boot-Script-Address U-Boot-Script-Name' expected="$(echo "$expected" | sed 's/ /\n/g' | sort -u | xargs)" local fields="$(echo "$MACHINE_DB" | sed -n '/^[^#]*:/s/:.*//p' | sort -u | xargs)" if [ "$fields" != "$expected" ]; then diff -Nru flash-kernel-3.103/test_functions flash-kernel-3.103ubuntu1/test_functions --- flash-kernel-3.103/test_functions 2018-08-10 20:22:02.000000000 +0100 +++ flash-kernel-3.103ubuntu1/test_functions 2020-11-22 15:32:05.000000000 +0000 @@ -397,6 +397,9 @@ Kernel-Flavors: machinec Machine: Invalid Dummy: Dummy + +Machine: Generic * Machine +Method: pi EOF ( FK_ETC_DB="$mock_etc_db" @@ -490,6 +493,12 @@ exit 1 fi + machine="Generic Foo Machine" + method=$(get_machine_field "$machine" "Method") + if [ "$method" != "pi" ]; then + echo "Expected Method field to be pi but got $method" >&2 + exit 1 + fi ) } add_test test_get_machine_field @@ -561,7 +570,9 @@ } add_test test_set_machine_id -test_mkimage_kernel() { +_test_mkimage_kernel() { + local kdata="$1" + local expected="$2" ( mkimage() { saved_args="$@" @@ -569,16 +580,31 @@ . "$functions" saved_args="" mkarch="arm" - mkimage_kernel "0xdeadbeef" "0xbaddcafe" "desc" "input" "output" 2>/dev/null - expected="-A arm -O linux -T kernel -C none -a 0xdeadbeef -e 0xbaddcafe -n desc -d input output" + mkimage_kernel "0xdeadbeef" "0xbaddcafe" "desc" "$kdata" "output" 2>/dev/null if [ "$expected" != "$saved_args" ]; then echo "Expected mkimage_kernel to be called with \"$expected\" but it was called with \"$saved_args\"" >&2 exit 1 fi ) } + +test_mkimage_kernel() { + local kdata="/dev/zero" + local expected="-A arm -O linux -T kernel -C none -a 0xdeadbeef -e 0xbaddcafe -n desc -d $kdata output" + _test_mkimage_kernel "$kdata" "$expected" +} add_test test_mkimage_kernel +test_mkimage_kernel_gzip() { + get_tempfile + local kdata="$last_tempfile" + gzip < /dev/null > "$kdata" + + local expected="-A arm -O linux -T kernel -C gzip -a 0xdeadbeef -e 0xbaddcafe -n desc -d $kdata output" + _test_mkimage_kernel "$kdata" "$expected" +} +add_test test_mkimage_kernel_gzip + test_mkimage_initrd() { ( mkimage() { @@ -597,6 +623,60 @@ } add_test test_mkimage_initrd +test_mkimage_script() { + get_tempfile + mock_fk_defaults="$last_tempfile" + cat >"$mock_fk_defaults" <"$mock_script" </dev/null + expected="-A arm -O linux -T script -C none -a 0xdeadbeef -e 0xdeadbeef -n desc -d $tmpdir/$(basename $mock_script).out script" + expected_script="$(printf "setenv bootargs foo bar baz quux\n\nfoo\nbar\n\nbaz\nend")" + if [ "$expected" != "$saved_args" ]; then + echo "Expected mkimage_script to be called with \"$expected\" but it was called with \"$saved_args\"" >&2 + exit 1 + fi + if [ "$generated_script" != "$expected_script" ]; then + echo "The script generated by mkimage_script did not match the expected output" >&2 + exit 1 + fi + ) +} +add_test test_mkimage_script + test_mkimage_multi() { ( mkimage() { @@ -689,6 +769,150 @@ } add_test test_dtb_append_from +test_abootimg_get_image_size() { + abootimg_output=" + +Android Boot Image Info: + +* file name = boot.img + +* image size = 8388608 bytes (8.00 MB) + page size = 2048 bytes + +* Boot Name = \"\" + +* kernel size = 3002744 bytes (2.86 MB) + ramdisk size = 1639626 bytes (1.56 MB) + +* load addresses: + kernel: 0x10008000 + ramdisk: 0x11000000 + tags: 0x10000100 + +* cmdline = mem=448M@0M nvmem=64M@448M vmalloc=320M video=tegrafb console=tty0 usbcore.old_scheme_first=1 quiet splash elevator=noop tegraboot=sdmmc cmdpart=1:7168:10240,2:17408:16384,3:35840:614400,4:4004864:27096064 + +* id = 0x07571070 0x13950a6a 0x185c996f 0x9ab7b64d 0xcccd09bd 0x00000000 0x00000000 0x00000000 +" + ( + . "$functions" + size=$(abootimg_get_image_size "$abootimg_output") + if [ "$size" -ne 8388608 ]; then + echo "Expected 8388608 but got $size" >&2 + exit 1 + fi + ) +} +add_test test_abootimg_get_image_size + +test_android_flash() { + ( + abootimg() { + saved_args="$@" + } + . "$functions" + saved_args="" + kfile="vmlinuz" + ifile="initrd.img" + android_flash /dev/some-dev 2>/dev/null + expected="-u /dev/some-dev -k vmlinuz -r initrd.img" + if [ "$expected" != "$saved_args" ]; then + echo "Expected abootimg to be called with \"$expected\" but it was called with \"$saved_args\"" >&2 + exit 1 + fi + saved_args="" + android_skip_initrd=1 android_flash /dev/some-dev 2>/dev/null + expected="-u /dev/some-dev -k vmlinuz" + if [ "$expected" != "$saved_args" ]; then + echo "Expected abootimg to be called with \"$expected\" but it was called with \"$saved_args\"" >&2 + exit 1 + fi + ) +} +add_test test_android_flash + +test_find_pi_firmware() { + get_tempfile + mock_find_output="$last_tempfile" + cat >"$mock_find_output" <&2 + exit 1 + fi + ) +} +add_test test_find_pi_firmware + +test_find_all_dtbs() { + kvers="3.14" + get_tempfile + mock_find_output="$last_tempfile" + cat >"$mock_find_output" <&2 + exit 1 + fi + ) +} +add_test test_find_all_dtbs + +test_find_all_overlays() { + kvers="3.14" + get_tempfile + mock_find_output="$last_tempfile" + cat >"$mock_find_output" <&2 + exit 1 + fi + ) +} +add_test test_find_all_overlays + test_main # vim:syntax=sh