Debian

Available patches from Ubuntu

To see Ubuntu differences wrt. to Debian, write down a grep-dctrl query identifying the packages you're interested in:
grep-dctrl -n -sPackage Sources.Debian
(e.g. -FPackage linux-ntfs or linux-ntfs)

Modified packages are listed below:

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: flash-kernel

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 <dave.jones@canonical.com> Sun, 22 Nov 2020 15:32:05 +0000

Modifications :
  1. Download patch debian/flash-kernel.postinst

    --- 3.103/debian/flash-kernel.postinst 2018-08-10 19:22:02.000000000 +0000 +++ 3.103ubuntu1/debian/flash-kernel.postinst 2020-11-22 15:32:05.000000000 +0000 @@ -24,20 +24,20 @@ case "$1" in . /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 @@ case "$1" in ;; 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#
  2. Download patch bootscript/armhf/uEnvtxt.omap

    --- 3.103/bootscript/armhf/uEnvtxt.omap 1970-01-01 00:00:00.000000000 +0000 +++ 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
  3. Download patch debian/flash-kernel-installer.isinstallable

    --- 3.103/debian/flash-kernel-installer.isinstallable 2019-02-28 06:52:45.000000000 +0000 +++ 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 @@ case "`archdetect`" in arm*/s3c24xx) exit 0 ;; + arm*/omap) + exit 0 + ;; + arm*/omap4) + exit 0 + ;; + arm64/xgene) + exit 0 + ;; arm*/generic) FK_DIR="/usr/share/flash-kernel"
  4. Download patch initramfs-tools/hooks/flash_kernel_set_root

    --- 3.103/initramfs-tools/hooks/flash_kernel_set_root 2018-08-10 19:22:02.000000000 +0000 +++ 3.103ubuntu1/initramfs-tools/hooks/flash_kernel_set_root 2020-11-22 15:32:05.000000000 +0000 @@ -55,6 +55,21 @@ FK_DIR="/usr/share/flash-kernel" . /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
  5. Download patch debian/rules

    --- 3.103/debian/rules 2020-02-01 06:40:57.000000000 +0000 +++ 3.103ubuntu1/debian/rules 2020-11-22 15:32:05.000000000 +0000 @@ -19,7 +19,7 @@ override_dh_auto_install: 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))
  6. Download patch post-base-installer.d/01flash-kernel-diversion

    --- 3.103/post-base-installer.d/01flash-kernel-diversion 1970-01-01 00:00:00.000000000 +0000 +++ 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
  7. Download patch test_db

    --- 3.103/test_db 2018-08-10 19:22:02.000000000 +0000 +++ 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
  8. Download patch debian/control

    --- 3.103/debian/control 2019-04-22 07:11:45.000000000 +0000 +++ 3.103ubuntu1/debian/control 2020-11-22 15:32:05.000000000 +0000 @@ -1,7 +1,8 @@ Source: flash-kernel Section: utils Priority: optional -Maintainer: Debian Install System Team <debian-boot@lists.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Install System Team <debian-boot@lists.debian.org> Uploaders: Vagrant Cascadian <vagrant@debian.org>, Karsten Merker <merker@debian.org> Build-Depends: debhelper (>= 9), devio, linux-base (>= 3.2), dash @@ -15,9 +16,11 @@ Architecture: arm64 armel armhf 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 +34,7 @@ Section: debian-installer 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
  9. Download patch bootscript/all/bootscr.rpi

    --- 3.103/bootscript/all/bootscr.rpi 1970-01-01 00:00:00.000000000 +0000 +++ 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
  10. Download patch test_functions
  11. Download patch bootscript/armhf/bootscr.highbank

    --- 3.103/bootscript/armhf/bootscr.highbank 2018-08-10 19:22:02.000000000 +0000 +++ 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
  12. Download patch bootscript/armhf/bootscr.keystone2

    --- 3.103/bootscript/armhf/bootscr.keystone2 1970-01-01 00:00:00.000000000 +0000 +++ 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}
  13. Download patch debian/flash-kernel-installer.postinst.in

    --- 3.103/debian/flash-kernel-installer.postinst.in 2018-08-10 19:22:02.000000000 +0000 +++ 3.103ubuntu1/debian/flash-kernel-installer.postinst.in 2020-11-22 15:32:05.000000000 +0000 @@ -28,6 +28,12 @@ tac () { 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 @@ case "$machine" in : ;; *) - 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 @@ fi 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
  14. Download patch bootscript/all/bootscr.xgene

    --- 3.103/bootscript/all/bootscr.xgene 1970-01-01 00:00:00.000000000 +0000 +++ 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}
  15. Download patch db/all.db
  16. Download patch debian/flash-kernel-installer.install

    --- 3.103/debian/flash-kernel-installer.install 2018-08-10 19:22:02.000000000 +0000 +++ 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/
  17. Download patch bootscript/armhf/bootscr.omap

    --- 3.103/bootscript/armhf/bootscr.omap 2018-08-10 19:22:02.000000000 +0000 +++ 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
  18. Download patch bootscript/armhf/uEnvtxt.wandboard

    --- 3.103/bootscript/armhf/uEnvtxt.wandboard 1970-01-01 00:00:00.000000000 +0000 +++ 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
  19. Download patch bootscript/armhf/bootscr.armadaxp

    --- 3.103/bootscript/armhf/bootscr.armadaxp 1970-01-01 00:00:00.000000000 +0000 +++ 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.;
  20. Download patch bootscript/all/bootscr.exynos5

    --- 3.103/bootscript/all/bootscr.exynos5 1970-01-01 00:00:00.000000000 +0000 +++ 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
  21. Download patch bootscript/all/bootscr.xgene-mustang

    --- 3.103/bootscript/all/bootscr.xgene-mustang 1970-01-01 00:00:00.000000000 +0000 +++ 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}
  22. Download patch functions
  1. flash-kernel