diff -pruN 2020.10+dfsg-1/debian/bin/update-substvars 2020.10+dfsg-1ubuntu6/debian/bin/update-substvars
--- 2020.10+dfsg-1/debian/bin/update-substvars	2020-09-13 16:59:26.000000000 +0000
+++ 2020.10+dfsg-1ubuntu6/debian/bin/update-substvars	2020-12-10 23:44:09.000000000 +0000
@@ -14,5 +14,9 @@ for file in debian/build/platforms.* ; d
 			printf "uboot:Built-Using=$(dpkg-query -f '${source:Package} (= ${source:Version}) [arm64]' -W arm-trusted-firmware)\n"\
 				   >> debian/${package}.substvars
 			;;
+		sifive)
+			printf "uboot:Built-Using=$(dpkg-query -f '${source:Package} (= ${source:Version}) [riscv64]' -W opensbi)\n"\
+				   >> debian/${package}.substvars
+			;;
 	esac
 done
diff -pruN 2020.10+dfsg-1/debian/changelog 2020.10+dfsg-1ubuntu6/debian/changelog
--- 2020.10+dfsg-1/debian/changelog	2020-10-05 19:13:28.000000000 +0000
+++ 2020.10+dfsg-1ubuntu6/debian/changelog	2020-12-10 23:44:09.000000000 +0000
@@ -1,3 +1,60 @@
+u-boot (2020.10+dfsg-1ubuntu6) hirsute; urgency=medium
+
+  * Add d/p/rpi-8gb-pci.patch for Pi400 and Pi4-8Gb support (LP: #1906552)
+  * Add d/p/rpi-cm4-sdhci.patch for CM4 eMMC support
+  * Add d/p/rpi-maxargs.patch for new Core 18 boot-env (LP: #1910094)
+  * Remove redundant d/targets entries
+
+ -- Dave Jones <dave.jones@canonical.com>  Thu, 10 Dec 2020 23:44:09 +0000
+
+u-boot (2020.10+dfsg-1ubuntu5) hirsute; urgency=medium
+
+  * Use flat binary rather than ELF OpenSBI; U-Boot SPL doesn't support ELF.
+  * Switch back to generic OpenSBI, as modern versions detect the platform.
+
+ -- William Grant <wgrant@ubuntu.com>  Mon, 21 Dec 2020 10:32:59 +1100
+
+u-boot (2020.10+dfsg-1ubuntu4) hirsute; urgency=medium
+
+  * Use the right opensbi fw_dynamic for fu540.
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com>  Tue, 08 Dec 2020 09:04:00 +0000
+
+u-boot (2020.10+dfsg-1ubuntu3) hirsute; urgency=medium
+
+  * Enable u-boot spl for unleashed. LP: #1905274
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com>  Mon, 23 Nov 2020 12:51:03 +0000
+
+u-boot (2020.10+dfsg-1ubuntu2) hirsute; urgency=medium
+
+  * No-change rebuild to build with python3.9 as default.
+
+ -- Matthias Klose <doko@ubuntu.com>  Thu, 19 Nov 2020 18:38:58 +0100
+
+u-boot (2020.10+dfsg-1ubuntu1) hirsute; urgency=low
+
+  * Merge from Debian unstable.  Remaining changes:
+    - Enable Ubuntu support for the Nitrogen6x board (LP: #1838064)
+      - Add d/p/ubuntu-nitrogen6q2g-config-tweaks.patch to tweak the
+        nitrogen6q2g configs to better fit our Ubuntu usage.
+      - Start building the nitrogen6x2g target for u-boot.
+    - Enable FIT signing support (LP: #1831942)
+      - Enable CONFIG_FIT_SIGNATURE so we can sign FIT images.
+      - Add libssl-dev to Build-Depends: to enable crypto functionality.
+      - Limit key names to keys within the keydir.
+    - d/p/rpi-config-tweaks.patch: Configuration adjustments to the RPi
+      configs
+    - d/p/rpi-board-dt.patch: use the board's device-tree instead of an
+      embedded one
+
+  * Removed obsolete patches/changes:
+    - d/p/lzo-to-lzno.patch: use gzip instead of lzo compression for FIT
+      images as lzop in Ubuntu is in universe. This should be temporary and in
+      the next releases ideally we should follow what Debian does.
+
+ -- Dave Jones <dave.jones@canonical.com>  Tue, 06 Oct 2020 03:18:18 +0000
+
 u-boot (2020.10+dfsg-1) unstable; urgency=medium
 
   * New upstream release.
@@ -83,6 +140,53 @@ u-boot (2020.07~rc2+dfsg-1) experimental
 
  -- Vagrant Cascadian <vagrant@debian.org>  Mon, 18 May 2020 17:16:07 -0700
 
+u-boot (2020.04+dfsg-2ubuntu1) groovy; urgency=medium
+
+  * Merge with 2020.04+dfsg-2 from Debian unstable. Remaining changes:
+    - Enable Ubuntu support for the Nitrogen6x board (LP: #1838064)
+      - Add d/p/ubuntu-nitrogen6q2g-config-tweaks.patch to tweak the
+        nitrogen6q2g configs to better fit our Ubuntu usage.
+      - Start building the nitrogen6x2g target for u-boot.
+    - Enable FIT signing support (LP: #1831942)
+      - Enable CONFIG_FIT_SIGNATURE so we can sign FIT images.
+      - Add libssl-dev to Build-Depends: to enable crypto functionality.
+      - Limit key names to keys within the keydir.
+    - d/p/rpi-config-tweaks.patch: Configuration adjustments to the RPi
+      configs
+    - d/p/lzo-to-lzno.patch: use gzip instead of lzo compression for FIT
+      images as lzop in Ubuntu is in universe. This should be temporary and in
+      the next releases ideally we should follow what Debian does.
+    - d/p/rpi-board-dt.patch: use the board's device-tree instead of an
+      embedded one
+
+  * Removed obsolete patches/changes:
+    - Handle differing root partition labels during migration
+    - Add script to migrate old boot configurations to split, selective style
+    - Don't attempt config migration when /boot/firmware is a chroot
+    - Use vc4-fkms-v3d overlay on all models of Raspberry Pi
+    - Do not include the vc4-fkms-v3d overlay; this breaks book on the 3A+
+    - Ensure boot.scr is from recent flash-kernel
+    - d/p/rpi-import-mkknlimg.patch import tools/mkknlimg from Xenial/raspi2 -
+      scripts/mkknlimg @ 83a3ebb
+    - Remove redundant d/p/rpi-import-mkknlimg.patch
+    - d/p/ubuntu-nitrogen6q2g-temporary-config-fixup.patch:
+      Fix bad CRC issue. The env size and redundant environment config
+      variables have not yet been migrated to Kconfig, so setting them in
+      _defconfig has no effect. Set those manually.
+
+  * Removed patches obsoleted/merged by upstream:
+    - Use python2 for the build.
+    - Added d/p/python2.patch to fix-up remaining scripts still using bare
+      "python"
+    - d/p/am57xx/omap5_distro_bootcmd
+    - Correct odroid README paths
+    - Add d/p/rpi4.patch to support Raspberry Pi 4 boot
+    - Avoid device-tree memory fixup on Raspberry Pi 4; this allows access to
+      the all the RAM on models with more than 1Gb
+    - Add missing build dependency on arm/arm64
+
+ -- Dave Jones <dave.jones@canonical.com>  Sat, 16 May 2020 01:02:53 +0000
+
 u-boot (2020.04+dfsg-2) unstable; urgency=medium
 
   * debian/patches:
@@ -228,6 +332,68 @@ u-boot (2019.10~rc4+dfsg-1) experimental
 
  -- Vagrant Cascadian <vagrant@debian.org>  Tue, 24 Sep 2019 01:03:23 -0700
 
+u-boot (2019.07+dfsg-1ubuntu6) focal; urgency=medium
+
+  [ Ethan Hsieh ]
+  * d/p/ubuntu-nitrogen6q2g-temporary-config-fixup.patch:
+    Fix bad CRC issue. The env size and redundant environment config variables
+    have not yet been migrated to Kconfig, so setting them in _defconfig has
+    no effect. Set those manually.
+
+ -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com>  Tue, 11 Feb 2020 11:43:57 +0100
+
+u-boot (2019.07+dfsg-1ubuntu5) focal; urgency=medium
+
+  [ Matthias Klose ]
+  * Use python2 for the build.
+
+  [ Dave Jones ]
+  * Added d/p/python2.patch to fix-up remaining scripts still using bare
+    "python"
+
+ -- Dave Jones <dave.jones@canonical.com>  Fri, 24 Jan 2020 11:29:15 +0000
+
+u-boot (2019.07+dfsg-1ubuntu4) focal; urgency=medium
+
+  * Do not include the vc4-fkms-v3d overlay; this breaks book on the 3A+
+    (LP: #1848247)
+  * Handle differing root partition labels during migration
+  * Ensure boot.scr is from recent flash-kernel
+
+ -- Dave Jones <dave.jones@canonical.com>  Fri, 17 Jan 2020 13:31:35 +0000
+
+u-boot (2019.07+dfsg-1ubuntu3) eoan; urgency=medium
+
+  * Avoid device-tree memory fixup on Raspberry Pi 4; this allows access to
+    the all the RAM on models with more than 1Gb (LP: #1847500)
+
+ -- Dave Jones <dave.jones@canonical.com>  Sat, 12 Oct 2019 01:02:29 +0100
+
+u-boot (2019.07+dfsg-1ubuntu2) eoan; urgency=medium
+
+  * Don't attempt config migration when /boot/firmware is a chroot
+  * Use vc4-fkms-v3d overlay on all models of Raspberry Pi
+
+ -- Dave Jones <dave.jones@canonical.com>  Wed, 09 Oct 2019 12:35:06 +0100
+
+u-boot (2019.07+dfsg-1ubuntu1) eoan; urgency=medium
+
+  * New upstream release to support Pi 4 boot (LP: #1846329)
+  * Removed patches applied upstream:
+    - d/p/dreamplug/Commit-ARM-CPU-arm926ejs-Consolidate-cache-routines-.patch
+    - d/p/mkimage/0001-fdt-Fix-mkimage-list-to-try-every-header-type.patch
+    - d/p/sunxi/teres-i.patch
+  * Updated patch:
+    - d/p/am57xx/omap5_distro_bootcmd
+  * Add missing build dependency on arm/arm64
+  * Correct odroid README paths
+  * Add d/p/rpi4.patch to support Raspberry Pi 4 boot
+  * Remove redundant d/p/rpi-import-mkknlimg.patch
+  * Add script to migrate old boot configurations to split, selective style
+  * Use the board's device-tree instead of an embedded one
+
+ -- Dave Jones <dave.jones@canonical.com>  Tue, 23 Jul 2019 10:02:04 +0000
+
 u-boot (2019.07+dfsg-1) experimental; urgency=medium
 
   * New upstream release.
@@ -334,6 +500,48 @@ u-boot (2019.07~rc1+dfsg-1) experimental
 
  -- Vagrant Cascadian <vagrant@debian.org>  Fri, 03 May 2019 16:58:13 -0700
 
+u-boot (2019.04+dfsg-2ubuntu3) eoan; urgency=medium
+
+  [ Shrirang Bagul ]
+  * Enable Ubuntu support for the Nitrogen6x board (LP: #1838064)
+    - Add d/p/ubuntu-nitrogen6q2g-config-tweaks.patch to tweak the
+      nitrogen6q2g configs to better fit our Ubuntu usage.
+    - Start building the nitrogen6x2g target for u-boot.
+
+ -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com>  Tue, 03 Sep 2019 11:39:53 +0200
+
+u-boot (2019.04+dfsg-2ubuntu2) eoan; urgency=low
+
+  * Enable FIT signing support (LP: #1831942)
+    - Enable CONFIG_FIT_SIGNATURE so we can sign FIT images.
+    - Add libssl-dev to Build-Depends: to enable crypto functionality.
+    - Limit key names to keys within the keydir.
+
+ -- Andy Whitcroft <apw@ubuntu.com>  Mon, 10 Jun 2019 15:44:35 +0100
+
+u-boot (2019.04+dfsg-2ubuntu1) eoan; urgency=medium
+
+  * Merge with 2019.04+dfsg-2 from Debian experimental. Remaining changes:
+    - d/p/rpi-import-mkknlimg.patch import tools/mkknlimg from Xenial/raspi2 -
+      scripts/mkknlimg @ 83a3ebb
+    - d/p/rpi2-rpi3-config-tweaks.patch: basing on the earlier
+      rpi2-config-tweaks.patch, make configuration adjustments to the rpi2 and
+      rpi3 configs.
+    - d/u-boot-rpi.postinst: support the fact that we now ship multiple uboot
+      binaries for multiple Pi platforms in one package. Try to determine
+      which device we're running on and use the right binary during
+      upgrade/installation. * debian/patches:
+    - d/p/lzo-to-lzno.patch: use gzip instead of lzo compression for FIT
+      images as lzop in Ubuntu is in universe. This should be temporary and in
+      the next releases ideally we should follow what Debian does.
+    - debian/control: Add missing dependency on binutils (for strings)
+      (LP: #1814930)
+    - debian/patches: Refreshed patches.
+  * Obsoleted; applied upstream:
+    - Removed d/p/odroid-xu3/bootdelay
+
+ -- Dave Jones <dave.jones@canonical.com>  Mon, 03 Jun 2019 14:41:23 +0000
+
 u-boot (2019.04+dfsg-2) experimental; urgency=medium
 
   [ Vagrant Cascadian ]
@@ -534,6 +742,29 @@ u-boot (2018.07+dfsg-1) experimental; ur
 
  -- Vagrant Cascadian <vagrant@debian.org>  Mon, 09 Jul 2018 13:34:06 -0700
 
+u-boot (2018.07~rc3+dfsg1-0ubuntu2) disco; urgency=medium
+
+  * d/control: Add missing dependency on binutils (for strings) (LP: #1814930)
+
+ -- Dave Jones <dave.jones@canonical.com>  Wed, 06 Feb 2019 16:40:22 +0000
+
+u-boot (2018.07~rc3+dfsg1-0ubuntu1) disco; urgency=medium
+
+  * New interim upstream release.
+    - We pull in an rc version because that's the u-boot version we use in
+      our current core18 images and we want to provide 'feature parity'.
+  * debian/control:
+    - Added missing build-deps bison and flex.
+  * debian/patches:
+    - Refresh am57xx/omap5_distro_bootcmd.
+    - Refreshed patches.
+    - Removed odroid-xu3/bootdelay which was applied upstream.
+    - Add lzo-to-lzno.patch to use gzip instead of lzo compression for FIT
+      images as lzop in Ubuntu is in universe. This should be temporary and
+      in the next releases ideally we should follow what Debian does.
+
+ -- Dave Jones <dave.jones@canonical.com>  Fri, 11 Jan 2019 16:43:27 +0000
+
 u-boot (2018.07~rc2+dfsg-1) experimental; urgency=medium
 
   * New upstream release candidate:
@@ -595,6 +826,26 @@ u-boot (2018.05~rc2+dfsg-1) experimental
 
  -- Vagrant Cascadian <vagrant@debian.org>  Tue, 17 Apr 2018 16:05:55 -0700
 
+u-boot (2018.03+dfsg1-2ubuntu2) disco; urgency=medium
+
+  * debian/u-boot-rpi.postinst:
+    - Support the fact that we now ship multiple uboot binaries for multiple
+      Pi platforms in one package. Try to determine which device we're running
+      on and use the right binary during upgrade/installation.
+
+ -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com>  Thu, 29 Nov 2018 01:16:07 +0100
+
+u-boot (2018.03+dfsg1-2ubuntu1) cosmic; urgency=low
+
+  * Merge from Debian unstable.  Remaining changes:
+    - rpi-import-mkknlimg.patch import tools/mkknlimg from Xenial/raspi2 -
+      scripts/mkknlimg @ 83a3ebb
+  * debian/patches/rpi2-rpi3-config-tweaks.patch: basing on the earlier
+    rpi2-config-tweaks.patch, make configuration adjustments to the rpi2 and
+    rpi3 configs.
+
+ -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com>  Fri, 27 Apr 2018 12:38:24 +0100
+
 u-boot (2018.03+dfsg1-2) unstable; urgency=medium
 
   [ Riku Voipio ]
@@ -1071,6 +1322,26 @@ u-boot (2016.05~rc3+dfsg1-1) experimenta
 
  -- Vagrant Cascadian <vagrant@debian.org>  Sat, 30 Apr 2016 18:53:04 -0700
 
+u-boot (2016.03+dfsg1-6ubuntu2) zesty; urgency=medium
+
+  * From upstream u-boot: (LP: #1636838)
+    - debian/patches/rpi-import-mkknlimg.patch: import tools/mkknlimg from
+      Xenial/raspi2 - scripts/mkknlimg @ 83a3ebb
+    - debian/u-boot-rpi.postinst: pass u-boot.bin through mkknlimg before
+      installing it as /boot/firmware/uboot.bin
+    - debian/patches/serial-pl01x-Add-support-for-devices-with-the-rate-p.patch:
+      Skip serial clock initialization when it's done by the firmware.
+
+ -- Paolo Pisati <paolo.pisati@canonical.com>  Wed, 09 Nov 2016 17:09:29 +0200
+
+u-boot (2016.03+dfsg1-6ubuntu1) yakkety; urgency=low
+
+  * Merge from Debian unstable.  Remaining changes:
+    - debian/patches/rpi2-config-tweaks.patch: configuration adjustments
+      to the RPi2 config.
+
+ -- Steve Langasek <steve.langasek@ubuntu.com>  Wed, 06 Jul 2016 17:30:44 -0700
+
 u-boot (2016.03+dfsg1-6) unstable; urgency=medium
 
   [ Vagrant Cascadian ]
@@ -1092,6 +1363,14 @@ u-boot (2016.03+dfsg1-6) unstable; urgen
 
  -- Vagrant Cascadian <vagrant@debian.org>  Tue, 28 Jun 2016 09:38:27 +0200
 
+u-boot (2016.03+dfsg1-5ubuntu1) yakkety; urgency=low
+
+  * Merge from Debian unstable.  Remaining changes:
+    - debian/patches/rpi2-config-tweaks.patch: configuration adjustments
+      to the RPi2 config.
+
+ -- Steve Langasek <steve.langasek@ubuntu.com>  Fri, 10 Jun 2016 21:46:33 -0700
+
 u-boot (2016.03+dfsg1-5) unstable; urgency=medium
 
   [ Vagrant Cascadian ]
@@ -1117,6 +1396,14 @@ u-boot (2016.03+dfsg1-5) unstable; urgen
 
  -- Vagrant Cascadian <vagrant@debian.org>  Sun, 29 May 2016 14:29:59 -0700
 
+u-boot (2016.03+dfsg1-4ubuntu1) yakkety; urgency=low
+
+  * Merge from Debian unstable.  Remaining changes:
+    - debian/patches/rpi2-config-tweaks.patch: configuration adjustments
+      to the RPi2 config.
+
+ -- Steve Langasek <steve.langasek@ubuntu.com>  Tue, 26 Apr 2016 21:06:04 -0700
+
 u-boot (2016.03+dfsg1-4) unstable; urgency=medium
 
   * Add patch to fix detected ram size on Firefly boards by reverting
@@ -1175,6 +1462,14 @@ u-boot (2016.03~rc2+dfsg1-1) experimenta
 
  -- Vagrant Cascadian <vagrant@debian.org>  Tue, 16 Feb 2016 15:01:48 -0800
 
+u-boot (2016.01+dfsg1-2ubuntu1) xenial; urgency=low
+
+  * Merge from Debian unstable.  Remaining changes:
+    - debian/patches/rpi2-config-tweaks.patch: configuration adjustments
+      to the RPi2 config.
+
+ -- Steve Langasek <steve.langasek@ubuntu.com>  Thu, 11 Feb 2016 21:55:38 -0800
+
 u-boot (2016.01+dfsg1-2) unstable; urgency=medium
 
   * u-boot-omap:
@@ -1188,6 +1483,13 @@ u-boot (2016.01+dfsg1-2) unstable; urgen
 
  -- Vagrant Cascadian <vagrant@debian.org>  Mon, 08 Feb 2016 20:14:04 -0800
 
+u-boot (2016.01+dfsg1-1ubuntu1) xenial; urgency=medium
+
+  * debian/patches/rpi2-config-tweaks.patch: configuration adjustments
+    to the RPi2 config.
+
+ -- Steve Langasek <steve.langasek@ubuntu.com>  Tue, 02 Feb 2016 11:43:50 -0800
+
 u-boot (2016.01+dfsg1-1) unstable; urgency=medium
 
   * u-boot-sunxi: Enable orangepi_plus target.
@@ -2250,3 +2552,4 @@ u-boot (2010.03-1) unstable; urgency=low
   * Initial packaging.  closes: #583605.
 
  -- Clint Adams <schizo@debian.org>  Fri, 28 May 2010 16:20:39 -0400
+
diff -pruN 2020.10+dfsg-1/debian/control 2020.10+dfsg-1ubuntu6/debian/control
--- 2020.10+dfsg-1/debian/control	2020-09-20 21:41:57.000000000 +0000
+++ 2020.10+dfsg-1ubuntu6/debian/control	2020-12-10 23:44:09.000000000 +0000
@@ -1,7 +1,8 @@
 Source: u-boot
 Section: admin
 Priority: optional
-Maintainer: Vagrant Cascadian <vagrant@debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Vagrant Cascadian <vagrant@debian.org>
 Uploaders: Loïc Minier <lool@debian.org>, Clint Adams <clint@debian.org>
 Build-Depends:
  arm-trusted-firmware (>= 2.3+dfsg) [arm64],
@@ -16,7 +17,9 @@ Build-Depends:
  libc6:armhf [armhf] <cross !pkg.uboot.notools>,
  libc6:armel [armel] <cross !pkg.uboot.notools>,
  libc6:riscv64 [riscv64] <cross !pkg.uboot.notools>,
+ opensbi,
  libpython3-dev:native [linux-any],
+ libssl-dev,
  python3:any [linux-any],
  python3-distutils [linux-any],
  swig [linux-any],
@@ -223,6 +226,7 @@ Description: A boot loader for Raspberry
 Package: u-boot-sifive
 Architecture: riscv64
 Multi-Arch: same
+Built-Using: ${uboot:Built-Using}
 Depends: ${misc:Depends}
 Description: A boot loader for SiFive systems
  Das U-Boot is a cross-platform bootloader for embedded systems,
diff -pruN 2020.10+dfsg-1/debian/patches/rpi-8gb-pci.patch 2020.10+dfsg-1ubuntu6/debian/patches/rpi-8gb-pci.patch
--- 2020.10+dfsg-1/debian/patches/rpi-8gb-pci.patch	1970-01-01 00:00:00.000000000 +0000
+++ 2020.10+dfsg-1ubuntu6/debian/patches/rpi-8gb-pci.patch	2020-12-10 23:44:09.000000000 +0000
@@ -0,0 +1,34 @@
+Author: Dave Jones <dave.jones@canonical.com>
+Forwarded: yes
+Description: Disable Broadcom PCI driver
+ The Broadcom PCI driver seems to break u-boot when booting on a Pi 4B with
+ 8Gb of RAM, when no monitor is attached. This is a brute-force and ignorance
+ patch and further (upstream) investigation is warranted to discover why this
+ is the case. Commit 3113c84ba25ec3ceae072cc5ad450c4238425939 (a merge,
+ annoyingly) is the first bad commit in the u-boot repository when bisecting
+ this issue.
+
+Index: u-boot/configs/rpi_4_32b_defconfig
+===================================================================
+--- u-boot.orig/configs/rpi_4_32b_defconfig
++++ u-boot/configs/rpi_4_32b_defconfig
+@@ -31,7 +31,6 @@ CONFIG_DM_ETH=y
+ CONFIG_BCMGENET=y
+ CONFIG_PCI=y
+ CONFIG_DM_PCI=y
+-CONFIG_PCI_BRCMSTB=y
+ CONFIG_PINCTRL=y
+ # CONFIG_PINCTRL_GENERIC is not set
+ CONFIG_DM_RESET=y
+Index: u-boot/configs/rpi_4_defconfig
+===================================================================
+--- u-boot.orig/configs/rpi_4_defconfig
++++ u-boot/configs/rpi_4_defconfig
+@@ -31,7 +31,6 @@ CONFIG_DM_ETH=y
+ CONFIG_BCMGENET=y
+ CONFIG_PCI=y
+ CONFIG_DM_PCI=y
+-CONFIG_PCI_BRCMSTB=y
+ CONFIG_PINCTRL=y
+ # CONFIG_PINCTRL_GENERIC is not set
+ CONFIG_DM_RESET=y
diff -pruN 2020.10+dfsg-1/debian/patches/rpi-board-dt.patch 2020.10+dfsg-1ubuntu6/debian/patches/rpi-board-dt.patch
--- 2020.10+dfsg-1/debian/patches/rpi-board-dt.patch	1970-01-01 00:00:00.000000000 +0000
+++ 2020.10+dfsg-1ubuntu6/debian/patches/rpi-board-dt.patch	2020-12-10 23:44:09.000000000 +0000
@@ -0,0 +1,37 @@
+Author: Dave Jones <dave.jones@canonical.com>
+Description: Use the board's device-tree rather than embedded
+ Our u-boot binaries should accept the device-tree passed by the firmware
+ rather than use an embedded one. Firstly, the OF_EMBED option is actively
+ discouraged by u-boot itself, and secondly it allows the same binary to
+ operate correctly on platforms with differing serial configurations, e.g. the
+ Pi 3 and Compute Module 3.
+--- a/configs/rpi_2_defconfig
++++ b/configs/rpi_2_defconfig
+@@ -18,6 +18,7 @@
+ CONFIG_CMD_USB=y
+ CONFIG_CMD_FS_UUID=y
+ CONFIG_OF_EMBED=y
++CONFIG_OF_BOARD=y
+ CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
+ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+--- a/configs/rpi_3_32b_defconfig
++++ b/configs/rpi_3_32b_defconfig
+@@ -19,6 +19,7 @@
+ CONFIG_CMD_USB=y
+ CONFIG_CMD_FS_UUID=y
+ CONFIG_OF_EMBED=y
++CONFIG_OF_BOARD=y
+ CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
+ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+--- a/configs/rpi_3_defconfig
++++ b/configs/rpi_3_defconfig
+@@ -19,6 +19,7 @@
+ CONFIG_CMD_USB=y
+ CONFIG_CMD_FS_UUID=y
+ CONFIG_OF_EMBED=y
++CONFIG_OF_BOARD=y
+ CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
+ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff -pruN 2020.10+dfsg-1/debian/patches/rpi-cm4-sdhci.patch 2020.10+dfsg-1ubuntu6/debian/patches/rpi-cm4-sdhci.patch
--- 2020.10+dfsg-1/debian/patches/rpi-cm4-sdhci.patch	1970-01-01 00:00:00.000000000 +0000
+++ 2020.10+dfsg-1ubuntu6/debian/patches/rpi-cm4-sdhci.patch	2020-12-10 23:44:09.000000000 +0000
@@ -0,0 +1,26 @@
+Author: Dave Jones <dave.jones@canonical.com>
+Forwarded: yes
+Description: Revert commit c6b9fbf7566f84a807a5c116288648085fa529df
+ This commit adds SDHCI DMA support which works happily with the SD card
+ interface on the Pi 4, but breaks eMMC support on the CM4
+
+--- a/configs/rpi_4_32b_defconfig
++++ b/configs/rpi_4_32b_defconfig
+@@ -26,7 +26,6 @@
+ CONFIG_DM_KEYBOARD=y
+ CONFIG_DM_MMC=y
+ CONFIG_MMC_SDHCI=y
+-CONFIG_MMC_SDHCI_SDMA=y
+ CONFIG_MMC_SDHCI_BCM2835=y
+ CONFIG_DM_ETH=y
+ CONFIG_BCMGENET=y
+--- a/configs/rpi_4_defconfig
++++ b/configs/rpi_4_defconfig
+@@ -26,7 +26,6 @@
+ CONFIG_DM_KEYBOARD=y
+ CONFIG_DM_MMC=y
+ CONFIG_MMC_SDHCI=y
+-CONFIG_MMC_SDHCI_SDMA=y
+ CONFIG_MMC_SDHCI_BCM2835=y
+ CONFIG_DM_ETH=y
+ CONFIG_BCMGENET=y
diff -pruN 2020.10+dfsg-1/debian/patches/rpi-config-tweaks.patch 2020.10+dfsg-1ubuntu6/debian/patches/rpi-config-tweaks.patch
--- 2020.10+dfsg-1/debian/patches/rpi-config-tweaks.patch	1970-01-01 00:00:00.000000000 +0000
+++ 2020.10+dfsg-1ubuntu6/debian/patches/rpi-config-tweaks.patch	2020-12-10 23:44:09.000000000 +0000
@@ -0,0 +1,110 @@
+Author: Dave Jones <dave.jones@canonical.com>
+Description: Configuration adjustments to the RPi2 and RPi3 configs
+ Based off rpi2-config-tweaks.patch created by Steve Langasek, and
+ subsequently rpi2-rpi3-config-tweaks.patch created by Łukasz Zemczak, this
+ ensures that all pi-related configurations are consistent. Specifically that
+ all support "raw" initrds (used by Core to append the psplash initrd to the
+ regular one), that all use 128Kb environments (excessive, but several related
+ code-bases now assume this), and that all use the "redundant" environment
+ setting (entirely pointlessly but this changes the env header and, again,
+ several related code-bases now assume this).
+
+--- a/include/configs/rpi.h
++++ b/include/configs/rpi.h
+@@ -13,7 +13,7 @@
+ #include <asm/arch/base.h>
+ #endif
+ 
+-#if defined(CONFIG_TARGET_RPI_2) || defined(CONFIG_TARGET_RPI_3_32B)
++#ifndef CONFIG_ARM64
+ #define CONFIG_SKIP_LOWLEVEL_INIT
+ #endif
+ 
+@@ -96,6 +96,7 @@
+ 
+ /* Environment */
+ #define CONFIG_SYS_LOAD_ADDR		0x1000000
++#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
+ 
+ /* Shell */
+ 
+--- a/configs/rpi_2_defconfig
++++ b/configs/rpi_2_defconfig
+@@ -4,7 +4,7 @@
+ CONFIG_SYS_TEXT_BASE=0x00008000
+ CONFIG_TARGET_RPI_2=y
+ CONFIG_NR_DRAM_BANKS=1
+-CONFIG_ENV_SIZE=0x4000
++CONFIG_ENV_SIZE=0x20000
+ CONFIG_DEFAULT_DEVICE_TREE="bcm2836-rpi-2-b"
+ CONFIG_DISTRO_DEFAULTS=y
+ CONFIG_OF_BOARD_SETUP=y
+@@ -42,3 +42,4 @@
+ CONFIG_CONSOLE_SCROLL_LINES=10
+ CONFIG_PHYS_TO_BUS=y
+ CONFIG_OF_LIBFDT_OVERLAY=y
++CONFIG_SUPPORT_RAW_INITRD=y
+--- a/configs/rpi_3_32b_defconfig
++++ b/configs/rpi_3_32b_defconfig
+@@ -5,7 +5,7 @@
+ CONFIG_TARGET_RPI_3_32B=y
+ CONFIG_SYS_MALLOC_F_LEN=0x2000
+ CONFIG_NR_DRAM_BANKS=1
+-CONFIG_ENV_SIZE=0x4000
++CONFIG_ENV_SIZE=0x20000
+ CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b"
+ CONFIG_DISTRO_DEFAULTS=y
+ CONFIG_OF_BOARD_SETUP=y
+@@ -45,3 +45,4 @@
+ CONFIG_CONSOLE_SCROLL_LINES=10
+ CONFIG_PHYS_TO_BUS=y
+ CONFIG_OF_LIBFDT_OVERLAY=y
++CONFIG_SUPPORT_RAW_INITRD=y
+--- a/configs/rpi_3_defconfig
++++ b/configs/rpi_3_defconfig
+@@ -5,7 +5,7 @@
+ CONFIG_TARGET_RPI_3=y
+ CONFIG_SYS_MALLOC_F_LEN=0x2000
+ CONFIG_NR_DRAM_BANKS=1
+-CONFIG_ENV_SIZE=0x4000
++CONFIG_ENV_SIZE=0x20000
+ CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b"
+ CONFIG_DISTRO_DEFAULTS=y
+ CONFIG_OF_BOARD_SETUP=y
+@@ -45,3 +45,4 @@
+ CONFIG_CONSOLE_SCROLL_LINES=10
+ CONFIG_PHYS_TO_BUS=y
+ CONFIG_OF_LIBFDT_OVERLAY=y
++CONFIG_SUPPORT_RAW_INITRD=y
+--- a/configs/rpi_4_32b_defconfig
++++ b/configs/rpi_4_32b_defconfig
+@@ -3,7 +3,7 @@
+ CONFIG_SYS_TEXT_BASE=0x00008000
+ CONFIG_TARGET_RPI_4_32B=y
+ CONFIG_SYS_MALLOC_F_LEN=0x2000
+-CONFIG_ENV_SIZE=0x4000
++CONFIG_ENV_SIZE=0x20000
+ CONFIG_DISTRO_DEFAULTS=y
+ CONFIG_OF_BOARD_SETUP=y
+ CONFIG_USE_PREBOOT=y
+@@ -58,3 +58,4 @@
+ CONFIG_ADDR_MAP=y
+ CONFIG_SYS_NUM_ADDR_MAP=2
+ CONFIG_OF_LIBFDT_OVERLAY=y
++CONFIG_SUPPORT_RAW_INITRD=y
+--- a/configs/rpi_4_defconfig
++++ b/configs/rpi_4_defconfig
+@@ -3,7 +3,7 @@
+ CONFIG_SYS_TEXT_BASE=0x00080000
+ CONFIG_TARGET_RPI_4=y
+ CONFIG_SYS_MALLOC_F_LEN=0x2000
+-CONFIG_ENV_SIZE=0x4000
++CONFIG_ENV_SIZE=0x20000
+ CONFIG_DISTRO_DEFAULTS=y
+ CONFIG_OF_BOARD_SETUP=y
+ CONFIG_USE_PREBOOT=y
+@@ -56,3 +56,4 @@
+ CONFIG_CONSOLE_SCROLL_LINES=10
+ CONFIG_PHYS_TO_BUS=y
+ CONFIG_OF_LIBFDT_OVERLAY=y
++CONFIG_SUPPORT_RAW_INITRD=y
diff -pruN 2020.10+dfsg-1/debian/patches/rpi-maxargs.patch 2020.10+dfsg-1ubuntu6/debian/patches/rpi-maxargs.patch
--- 2020.10+dfsg-1/debian/patches/rpi-maxargs.patch	1970-01-01 00:00:00.000000000 +0000
+++ 2020.10+dfsg-1ubuntu6/debian/patches/rpi-maxargs.patch	2020-12-10 23:44:09.000000000 +0000
@@ -0,0 +1,17 @@
+Author: Dave Jones <dave.jones@canonical.com>
+Forwarded: no
+Description: Allow more than 16 args for a command for LP: #1910094
+ The default u-boot command line configuration only permits a maximum of
+ 16 arguments per command. Unfortunately, the fix for LP: #1900879 demands
+ considerably more than this.
+
+--- a/include/configs/rpi.h
++++ b/include/configs/rpi.h
+@@ -93,6 +93,7 @@
+ 
+ /* Console configuration */
+ #define CONFIG_SYS_CBSIZE		1024
++#define CONFIG_SYS_MAXARGS		64
+ 
+ /* Environment */
+ #define CONFIG_SYS_LOAD_ADDR		0x1000000
diff -pruN 2020.10+dfsg-1/debian/patches/series 2020.10+dfsg-1ubuntu6/debian/patches/series
--- 2020.10+dfsg-1/debian/patches/series	2020-09-13 16:59:26.000000000 +0000
+++ 2020.10+dfsg-1ubuntu6/debian/patches/series	2020-12-10 23:44:09.000000000 +0000
@@ -16,3 +16,11 @@ exynos/0001-arm-config-fix-default-conso
 riscv64/qemu-riscv64_smode-sifive-fu540-fix-extlinux-define-.patch
 
 n900/bootz_and_raw_initrd.patch
+
+rpi-config-tweaks.patch
+ubuntu-hardening-limit-keynames-to-keydir.patch
+ubuntu-nitrogen6q2g-config-tweaks.patch
+rpi-board-dt.patch
+rpi-cm4-sdhci.patch
+rpi-8gb-pci.patch
+rpi-maxargs.patch
diff -pruN 2020.10+dfsg-1/debian/patches/ubuntu-hardening-limit-keynames-to-keydir.patch 2020.10+dfsg-1ubuntu6/debian/patches/ubuntu-hardening-limit-keynames-to-keydir.patch
--- 2020.10+dfsg-1/debian/patches/ubuntu-hardening-limit-keynames-to-keydir.patch	1970-01-01 00:00:00.000000000 +0000
+++ 2020.10+dfsg-1ubuntu6/debian/patches/ubuntu-hardening-limit-keynames-to-keydir.patch	2020-12-10 23:44:09.000000000 +0000
@@ -0,0 +1,49 @@
+Description: limit keyname to prevent escape from keydir
+ Limit key names to keys within the keydir by refusing keynames containing
+ a slash.
+Author: Andy Whitcroft <apw@canonical.com>
+Forwarded: no
+Last-Update: 2019-05-31
+
+---
+
+--- a/lib/rsa/rsa-sign.c
++++ b/lib/rsa/rsa-sign.c
+@@ -63,6 +63,11 @@
+ 	FILE *f;
+ 	int ret;
+ 
++	if (strchr(name, '/')) {
++		fprintf(stderr, "Invalid key name '%s': contains '/' \n", name);
++		return -EACCES;
++	}
++
+ 	*rsap = NULL;
+ 	snprintf(path, sizeof(path), "%s/%s.crt", keydir, name);
+ 	f = fopen(path, "r");
+@@ -210,6 +215,11 @@
+ 	RSA *rsa;
+ 	FILE *f;
+ 
++	if (strchr(name, '/')) {
++		fprintf(stderr, "Invalid key name '%s': contains '/' \n", name);
++		return -EACCES;
++	}
++
+ 	*rsap = NULL;
+ 	snprintf(path, sizeof(path), "%s/%s.key", keydir, name);
+ 	f = fopen(path, "r");
+--- a/tools/kwbimage.c
++++ b/tools/kwbimage.c
+@@ -395,6 +395,11 @@
+ 	if (!keydir)
+ 		keydir = ".";
+ 
++	if (strchr(name, '/')) {
++		fprintf(stderr, "Invalid key name '%s': contains '/' \n", name);
++		return -EACCES;
++	}
++
+ 	snprintf(path, sizeof(path), "%s/%s.key", keydir, name);
+ 	f = fopen(path, "r");
+ 	if (!f) {
diff -pruN 2020.10+dfsg-1/debian/patches/ubuntu-nitrogen6q2g-config-tweaks.patch 2020.10+dfsg-1ubuntu6/debian/patches/ubuntu-nitrogen6q2g-config-tweaks.patch
--- 2020.10+dfsg-1/debian/patches/ubuntu-nitrogen6q2g-config-tweaks.patch	1970-01-01 00:00:00.000000000 +0000
+++ 2020.10+dfsg-1ubuntu6/debian/patches/ubuntu-nitrogen6q2g-config-tweaks.patch	2020-12-10 23:44:09.000000000 +0000
@@ -0,0 +1,54 @@
+--- a/configs/nitrogen6q2g_defconfig
++++ b/configs/nitrogen6q2g_defconfig
+@@ -3,7 +3,7 @@
+ CONFIG_SYS_TEXT_BASE=0x17800000
+ CONFIG_SYS_MALLOC_F_LEN=0x4000
+ CONFIG_NR_DRAM_BANKS=1
+-CONFIG_ENV_SIZE=0x2000
++CONFIG_ENV_SIZE=0x20000
+ CONFIG_ENV_OFFSET=0xC0000
+ CONFIG_ENV_SECT_SIZE=0x2000
+ CONFIG_MX6Q=y
+@@ -28,8 +28,10 @@
+ CONFIG_SYS_MEMTEST_END=0x10010000
+ # CONFIG_CMD_FLASH is not set
+ CONFIG_CMD_GPIO=y
++CONFIG_CMD_GPT=y
+ CONFIG_CMD_I2C=y
+ CONFIG_CMD_MMC=y
++CONFIG_CMD_PART=y
+ CONFIG_CMD_SATA=y
+ CONFIG_CMD_USB=y
+ CONFIG_CMD_USB_MASS_STORAGE=y
+@@ -47,12 +49,18 @@
+ CONFIG_OF_CONTROL=y
+ CONFIG_ENV_OVERWRITE=y
+ CONFIG_ENV_IS_IN_SPI_FLASH=y
++CONFIG_ENV_IS_IN_FAT=y
++CONFIG_ENV_FAT_INTERFACE="mmc"
++CONFIG_ENV_FAT_DEVICE_AND_PART="0:auto"
++CONFIG_ENV_FAT_FILE="uboot.env"
+ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+ CONFIG_NETCONSOLE=y
+ CONFIG_DM=y
+ CONFIG_DWC_AHSATA=y
+ CONFIG_USB_FUNCTION_FASTBOOT=y
+ CONFIG_FASTBOOT_BUF_ADDR=0x12000000
++CONFIG_FAT_WRITE=y
++CONFIG_FS_FAT=y
+ CONFIG_DM_MMC=y
+ CONFIG_FSL_USDHC=y
+ CONFIG_MTD=y
+--- a/include/configs/nitrogen6x.h
++++ b/include/configs/nitrogen6x.h
+@@ -11,6 +11,10 @@
+ 
+ #include "mx6_common.h"
+ 
++#if defined(CONFIG_TARGET_NITROGEN6X)
++#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
++#endif
++
+ #define CONFIG_MACH_TYPE	3769
+ 
+ /* Size of malloc() pool */
diff -pruN 2020.10+dfsg-1/debian/rules 2020.10+dfsg-1ubuntu6/debian/rules
--- 2020.10+dfsg-1/debian/rules	2020-09-13 16:59:26.000000000 +0000
+++ 2020.10+dfsg-1ubuntu6/debian/rules	2020-12-10 23:44:09.000000000 +0000
@@ -35,6 +35,8 @@ else
 TARGETSUBARCH = $(patsubst pkg.uboot.subarch.%,%,$(filter pkg.uboot.subarch.%,$(DEB_BUILD_PROFILES)))
 endif
 
+export OPENSBI=/usr/lib/riscv64-linux-gnu/opensbi/generic/fw_dynamic.bin
+
 %:
 	dh $@
 
@@ -118,10 +120,6 @@ build-targets: configs/novena-rawsd_defc
 
 build-tools:
 	$(MAKE) V=$(VERBOSE) O=$(TOOLSDIR) CROSS_COMPILE=$(CROSS_COMPILE) tools-only_defconfig
-	# Disable fit signatures, which requires OpenSSL which triggers
-	# licensing incompatibilities with the GPL:
-	# https://people.gnome.org/~markmc/openssl-and-the-gpl.html
-	sed -i -e 's,CONFIG_FIT_SIGNATURE=y,# CONFIG_FIT_SIGNATURE is not set,g' $(TOOLSDIR)/.config
 	cp $(TOOLSDIR)/.config $(TOOLSDIR)/config
 	# board-independent tools
 	$(MAKE) V=$(VERBOSE) O=$(TOOLSDIR) $(DEB_UBOOT_FLAGS) \
diff -pruN 2020.10+dfsg-1/debian/targets 2020.10+dfsg-1ubuntu6/debian/targets
--- 2020.10+dfsg-1/debian/targets	2020-09-13 16:59:26.000000000 +0000
+++ 2020.10+dfsg-1ubuntu6/debian/targets	2020-12-10 23:44:09.000000000 +0000
@@ -43,6 +43,9 @@ armhf	imx		mx6qsabrelite	u-boot-dtb.imx
 # Hector Oron <zumbi@debian.org>
 armhf	imx		nitrogen6q	u-boot-dtb.imx
 
+# Shrirang Bagul <shrirang.bagul@canonical.com>
+armhf	imx		nitrogen6q2g	u-boot-dtb.imx
+
 # Vagrant Cascadian <vagrant@debian.org>
 armhf	imx		novena		u-boot.img SPL
 armhf	imx		novena-rawsd SPL
@@ -257,7 +260,7 @@ arm64	tegra		p2371-2180	u-boot.bin
 avr32	-		hammerhead	u-boot.img
 
 # Hector Oron <zumbi@debian.org>
-riscv64	sifive	sifive_fu540	u-boot.bin
+riscv64	sifive	sifive_fu540	u-boot.bin spl/u-boot-spl.bin u-boot.itb
 
 sh4	-		r2dplus		u-boot.bin
 
diff -pruN 2020.10+dfsg-1/debian/u-boot-rpi.postinst 2020.10+dfsg-1ubuntu6/debian/u-boot-rpi.postinst
--- 2020.10+dfsg-1/debian/u-boot-rpi.postinst	1970-01-01 00:00:00.000000000 +0000
+++ 2020.10+dfsg-1ubuntu6/debian/u-boot-rpi.postinst	2020-12-10 23:44:09.000000000 +0000
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+BOOT="/boot/firmware"
+
+set -e
+
+case "$1" in
+  configure)
+    if ischroot; then
+      echo "chroot detected; skipping postinst"
+      exit 0
+    fi
+    if ! mountpoint -q "$BOOT"; then
+      echo "Error: missing $BOOT, did you forget to mount it?" >&2
+      exit 1
+    fi
+
+    # The u-boot-rpi package now ships more than just one u-boot binary. Copy
+    # all supported u-boot binaries to the boot partition to support the
+    # case of switching the SD card between Pis
+    for uboot_binary in /usr/lib/u-boot/*/u-boot.bin; do
+        dest_binary=uboot_$(basename $(dirname "$uboot_binary")).bin
+        cp "$uboot_binary" "$BOOT/$dest_binary"
+    done
+    ;;
+esac
+
+exit 0
+
+#DEBHELPER#
