diff --git a/debian/changelog b/debian/changelog index dd4b32ba2..e8343d592 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,57 @@ +u-boot (2022.10+dfsg-1ubuntu1) lunar; urgency=medium + + * Merge from Debian unstable (LP: #1999039). Remaining changes: + - d/p/rpi-config-tweaks.patch: Configuration adjustments to the RPi + configs + - Enable FIT signing support + - Limit key names to keys within the keydir. + - Enable Ubuntu support for the Nitrogen6x board + - 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. + - d/p/rpi-board-dt.patch: use the board's device-tree instead of an + embedded one + - Add d/p/rpi-cm4-sdhci.patch for CM4 eMMC support + - Add d/p/rpi-8gb-pci.patch for Pi400 and Pi4-8Gb support + - Add d/p/rpi-maxargs.patch for new Core 18 boot-env + - Removed d/u-boot-rpi.postinst. The task of copying the u-boot binaries + to the boot partition is now performed by flash-kernel + - Revert '* debian/rules: Ensure debugging symbols are enabled.' as it + breaks riscv64 booting. + - Implement u-boot-sifive.postinst to upgrade u-boot in loader1/loader2 + partitions upon package upgrades. Maybe this should move to flash- + kernel, and update SPI too. + - Provide compat symlinks for old unleashed & unmatched platform names + - In postinst support Unmatched model name without A00 suffix, as used by + meta-sifive kernels and may be contributed upstream in the future. + - Re-added target for nitrogen6q2 u-boot binary (missed in prior merge) + - Enable commands for displaying and configuring the UEFI environment + - Fix nitrogen6q2g patch to build properly on armhf + - In u-boot-sifive.postinst support partition names Loader1, Loader2 as + the installer image uses these. + - Remove the MIPS targets as the mips cross-compiler is currently + uninstallable in Ubuntu + - Add package for PolarFire SoC Icicle Kit + - Adjust u-boot-microchip on PolarFire Icicle Kit for the changed memory + layout of the HSS 2022.10 firmware + - Enable reset via SBI on PolarFire Icicle Kit d/p/riscv64/enable-reset- + via-SBI-on-PolarFire-Icicle-Kit.patch + - Fix probing of virtio devices d/p/virtio-pci-fix-bug-of- + virtio_pci_map_capability.patch + - SECURITY UPDATE: unchecked length field in DFU implementation + - debian/patches/CVE-2022-2347.patch: fix the unchecked length field in + drivers/usb/gadget/f_dfu.c. + - CVE-2022-2347 + * Removed patches obsoleted/merged by upstream: + - System reset via the SRST extension in the SBI should be the default. + * Refreshed patches: + - d/p/rpi-config-tweaks.patch + - d/p/rpi-cm4-sdhci.patch + - d/p/rpi-8gb-pci.patch + - d/p/rpi-maxargs.patch + + -- Dave Jones Wed, 07 Dec 2022 12:37:17 +0000 + u-boot (2022.10+dfsg-1) unstable; urgency=medium * New upstream release. (Closes: #1019004) @@ -23,6 +77,97 @@ u-boot (2022.10~rc2+dfsg-1) experimental; urgency=medium -- Vagrant Cascadian Fri, 12 Aug 2022 07:18:56 -0700 +u-boot (2022.07+dfsg-1ubuntu7) lunar; urgency=medium + + * SECURITY UPDATE: unchecked length field in DFU implementation + - debian/patches/CVE-2022-2347.patch: fix the unchecked length field in + drivers/usb/gadget/f_dfu.c. + - CVE-2022-2347 + + -- Marc Deslauriers Tue, 06 Dec 2022 09:21:18 -0500 + +u-boot (2022.07+dfsg-1ubuntu6) lunar; urgency=medium + + * Fix probing of virtio devices (LP: #1996285) + d/p/virtio-pci-fix-bug-of-virtio_pci_map_capability.patch + + -- Heinrich Schuchardt Fri, 11 Nov 2022 16:14:13 +0100 + +u-boot (2022.07+dfsg-1ubuntu5) lunar; urgency=medium + + * Rebuild against updated OpenSBI + Fixes emulation of fence.tso on Allwinner D1 (LP: #1995860) + * Enable reset via SBI on PolarFire Icicle Kit (LP: #1995932) + d/p/riscv64/enable-reset-via-SBI-on-PolarFire-Icicle-Kit.patch + + -- Heinrich Schuchardt Mon, 07 Nov 2022 13:25:23 +0100 + +u-boot (2022.07+dfsg-1ubuntu4) kinetic; urgency=medium + + * Adjust u-boot-microchip on PolarFire Icicle Kit for the changed memory + layout of the HSS 2022.10 firmware (LP: #1992776) + + -- Heinrich Schuchardt Thu, 13 Oct 2022 12:12:03 +0200 + +u-boot (2022.07+dfsg-1ubuntu3) kinetic; urgency=medium + + * Add package for PolarFire SoC Icicle Kit (LP: #1987505) + * System reset via the SRST extension in the SBI should be the default. + + -- Heinrich Schuchardt Wed, 24 Aug 2022 10:12:10 +0200 + +u-boot (2022.07+dfsg-1ubuntu2) kinetic; urgency=medium + + * Remove the MIPS targets as the mips cross-compiler is currently + uninstallable in Ubuntu + + -- Dave Jones Thu, 01 Sep 2022 16:51:48 +0100 + +u-boot (2022.07+dfsg-1ubuntu1) kinetic; urgency=medium + + * Merge from Debian unstable (LP: #1980017). Remaining changes: + - d/p/rpi-config-tweaks.patch: Configuration adjustments to the RPi + configs + - Enable FIT signing support + - Limit key names to keys within the keydir. + - Enable Ubuntu support for the Nitrogen6x board + - 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. + - d/p/rpi-board-dt.patch: use the board's device-tree instead of an + embedded one + - Add d/p/rpi-cm4-sdhci.patch for CM4 eMMC support + - Add d/p/rpi-8gb-pci.patch for Pi400 and Pi4-8Gb support + - Add d/p/rpi-maxargs.patch for new Core 18 boot-env + - Removed d/u-boot-rpi.postinst. The task of copying the u-boot binaries + to the boot partition is now performed by flash-kernel + - Revert '* debian/rules: Ensure debugging symbols are enabled.' as it + breaks riscv64 booting. + - Implement u-boot-sifive.postinst to upgrade u-boot in loader1/loader2 + partitions upon package upgrades. Maybe this should move to flash- + kernel, and update SPI too. + - Provide compat symlinks for old unleashed & unmatched platform names + - In postinst support Unmatched model name without A00 suffix, as used by + meta-sifive kernels and may be contributed upstream in the future. + - Re-added target for nitrogen6q2 u-boot binary (missed in prior merge) + - Enable commands for displaying and configuring the UEFI environment + - Fix nitrogen6q2g patch to build properly on armhf + - In u-boot-sifive.postinst support partition names Loader1, Loader2 as + the installer image uses these. + * Removed patches obsoleted/merged by upstream: + - Enabling booting via SCSI and USB on SiFive Unmatched + - d/patches: Add SiFive Unmatched PCIe fix + - In u-boot-sifive.postinst support partition names Loader1, Loader2 + as the installer image uses these. + - d/p/efi-loader-copy-guid.patch: Copy GUID in InstallProtocolInterface to + avoid crash with systemd-boot + - d/p/efi-part-list.patch: Permit listing of non-contiguous partitions in + GPT tables + - Fix Unleashed name typo that resulted in an unbootable image due to + missing OpenSBI. + + -- Dave Jones Tue, 23 Aug 2022 11:57:13 +0100 + u-boot (2022.07+dfsg-1) unstable; urgency=medium [ Dave Jones ] @@ -111,6 +256,86 @@ u-boot (2022.04~rc2+dfsg-1) experimental; urgency=medium -- Vagrant Cascadian Wed, 23 Feb 2022 17:10:03 -0800 +u-boot (2022.01+dfsg-2ubuntu3) kinetic; urgency=medium + + * Enabling booting via SCSI and USB on SiFive Unmatched + (LP: #1968174) + * In u-boot-sifive.postinst support partition names Loader1, Loader2 + as the installer image uses these. + + -- Heinrich Schuchardt Sun, 15 May 2022 08:13:41 +0200 + +u-boot (2022.01+dfsg-2ubuntu2) jammy; urgency=medium + + * d/patches: Add SiFive Unmatched PCIe fix (LP: #1965321) + + -- Alexandre Ghiti Fri, 25 Mar 2022 11:15:18 +0100 + +u-boot (2022.01+dfsg-2ubuntu1) jammy; urgency=medium + + [ Dave Jones ] + * Merge from Debian unstable (LP: #1964365). Remaining changes: + - d/p/rpi-config-tweaks.patch: Configuration adjustments to the RPi + configs + - Enable FIT signing support + - Limit key names to keys within the keydir. + - Enable Ubuntu support for the Nitrogen6x board + - 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. + - d/p/rpi-board-dt.patch: use the board's device-tree instead of an + embedded one + - Add d/p/rpi-cm4-sdhci.patch for CM4 eMMC support + - Add d/p/rpi-8gb-pci.patch for Pi400 and Pi4-8Gb support + - Add d/p/rpi-maxargs.patch for new Core 18 boot-env + - Removed d/u-boot-rpi.postinst. The task of copying the u-boot binaries + to the boot partition is now performed by flash-kernel + - Revert '* debian/rules: Ensure debugging symbols are enabled.' as it + breaks riscv64 booting. + - Implement u-boot-sifive.postinst to upgrade u-boot in loader1/loader2 + partitions upon package upgrades. Maybe this should move to flash- + kernel, and update SPI too. + - Provide compat symlinks for old unleashed & unmatched platform names + - sifive boards: re-enable back USE_PREBOOT< it used to be there in + 2021.01 releases, and I suspect it affects unleashed bootability. + - In postinst support Unmatched model name without A00 suffix, as used by + meta-sifive kernels and may be contributed upstream in the future. + - Fix Unleashed name typo that resulted in an unbootable image due to + missing OpenSBI. + * Removed obsolete patches/changes: + - fix cmd_sysconfig in qemu + - set default fdtfile names for sifive boards + - Drop unleashed hunk from + riscv64/qemu-riscv64_smode-sifive-fu540-fix-extlinux-define-.patch, as + the same preboot is specified in unleashed board include. + - Cherrypick patch from Heinrich Schuchardt (xypron) to fix failure to + boot on Unmatched. + - Drop 75efe7dc996ddb9835590b1a8970f19b5c4b1ade.patch included upstream. + - Remove unreferenced fe01f41d57b79d9ca94604503a25e55175744d42.patch, + included as riscv64/0013-riscv-sifive-Set-default-fdtfile-names.patch. + - Build against opensbi with reboot support on Unmatched + - Add missing trailing \n to arch/arm/mach-stm32mp/cmd_stm32prog/Kconfig. + Fixes a rare (but reliable) FTBFS from check-config.sh. In the original + case on LP armhf, mach-imx/Kconfig sorted immediately after + cmd_stm32prog/Kconfig, causing lines to run together and the sed to not + match the "config HAS_CAAM" line, causing the dh_imx6 defconfig to + appear invalid. + - Import meta-sifive patch series. + - Refreshed rk3399 patches for new release + * Refreshed patches for new release + * Re-added target for nitrogen6q2 u-boot binary (missed in prior merge) + * Fixed nitrogen6q2g patch to build properly on armhf + + [ Heinrich Schuchardt ] + * d/p/efivars-commands.patch: Enable commands for displaying and configuring + the UEFI environment + * d/p/efi-part-list.patch: Permit listing of non-contiguous partitions in + GPT tables + * d/p/efi-loader-copy-guid.patch: Copy GUID in InstallProtocolInterface to + avoid crash with systemd-boot + + -- Dave Jones Thu, 10 Mar 2022 16:54:01 +0000 + u-boot (2022.01+dfsg-2) unstable; urgency=medium * debian/patches: Fix building qemu-ppce500 target with binutils @@ -199,6 +424,109 @@ u-boot (2021.07+dfsg-1) experimental; urgency=medium -- Vagrant Cascadian Sat, 24 Jul 2021 18:35:37 -0700 +u-boot (2021.07+dfsg-0ubuntu10) jammy; urgency=medium + + * No-change rebuild against openssl3 + + -- Simon Chopin Fri, 03 Dec 2021 14:16:56 +0000 + +u-boot (2021.07+dfsg-0ubuntu9) jammy; urgency=medium + + * No change rebuild with new opensbi snapshot. + + -- Dimitri John Ledkov Tue, 02 Nov 2021 12:41:21 +0000 + +u-boot (2021.07+dfsg-0ubuntu8) impish; urgency=medium + + * Add missing trailing \n to arch/arm/mach-stm32mp/cmd_stm32prog/Kconfig. + Fixes a rare (but reliable) FTBFS from check-config.sh. In the original + case on LP armhf, mach-imx/Kconfig sorted immediately after + cmd_stm32prog/Kconfig, causing lines to run together and the sed to not + match the "config HAS_CAAM" line, causing the dh_imx6 defconfig to appear + invalid. + + -- William Grant Wed, 13 Oct 2021 20:05:23 +1100 + +u-boot (2021.07+dfsg-0ubuntu7) impish; urgency=medium + + * Fix Unleashed name typo that resulted in an unbootable image due to + missing OpenSBI (LP: #1946913). + + -- William Grant Wed, 13 Oct 2021 14:59:55 +1100 + +u-boot (2021.07+dfsg-0ubuntu6) impish; urgency=medium + + * Build against opensbi with reboot support on Unmatched + * In postinst support Unmatched model name without A00 suffix, as used + by meta-sifive kernels and may be contributed upstream in the future. + + -- Dimitri John Ledkov Wed, 25 Aug 2021 17:22:24 +0100 + +u-boot (2021.07+dfsg-0ubuntu4) impish; urgency=medium + + * sifive boards: re-enable back USE_PREBOOT< it used to be there in + 2021.01 releases, and I suspect it affects unleashed bootability. + * control: add crust-firmware build-dep, it is now available in the + archive. + * Remove unreferenced fe01f41d57b79d9ca94604503a25e55175744d42.patch, + included as riscv64/0013-riscv-sifive-Set-default-fdtfile-names.patch. + * Skip removed/incorrect 0ubuntu3 upload. + + -- Dimitri John Ledkov Wed, 04 Aug 2021 11:18:25 +0100 + +u-boot (2021.07+dfsg-0ubuntu2) impish; urgency=medium + + * Import meta-sifive patch series. + + -- Dimitri John Ledkov Fri, 23 Jul 2021 17:14:09 +0100 + +u-boot (2021.07+dfsg-0ubuntu1) impish; urgency=medium + + * New upstream release. + - Drop 75efe7dc996ddb9835590b1a8970f19b5c4b1ade.patch included upstream. + + -- Dimitri John Ledkov Fri, 23 Jul 2021 12:45:26 +0100 + +u-boot (2021.07~rc4+dfsg-1ubuntu2) impish; urgency=medium + + * Cherrypick patch from Heinrich Schuchardt (xypron) to fix failure to + boot on Unmatched. LP: #1937246 + + -- Dimitri John Ledkov Thu, 22 Jul 2021 12:33:49 +0100 + +u-boot (2021.07~rc4+dfsg-1ubuntu1) impish; urgency=medium + + * Merge from Debian Experimental, remaining changes: + - Implement u-boot-sifive.postinst to upgrade u-boot in + loader1/loader2 partitions upon package upgrades. LP: #1936370 Maybe + this should move to flash-kernel, and update SPI too. + - Revert '* debian/rules: Ensure debugging symbols are enabled.' as it + breaks riscv64 booting. + - d/p/rpi-config-tweaks.patch: Configuration adjustments to the RPi + configs + - Enable FIT signing support + - Limit key names to keys within the keydir. + - Enable Ubuntu support for the Nitrogen6x board + - 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. + - d/p/rpi-board-dt.patch: use the board's device-tree instead of an + embedded one + - Add d/p/rpi-cm4-sdhci.patch for CM4 eMMC support + - Add d/p/rpi-8gb-pci.patch for Pi400 and Pi4-8Gb support + - Add d/p/rpi-maxargs.patch for new Core 18 boot-env + * Cherrypick upstream patches to: + - fix cmd_sysconfig in qemu + - set default fdtfile names for sifive boards + * Provide compat symlinks for old unleashed & unmatched platform names + * Drop unleashed hunk from + riscv64/qemu-riscv64_smode-sifive-fu540-fix-extlinux-define-.patch, as + the same preboot is specified in unleashed board include. + * Drop crust-firmware build-dep, until it is available in Ubuntu, + currently in impish NEW queue. + + -- Dimitri John Ledkov Tue, 20 Jul 2021 12:30:01 +0100 + u-boot (2021.07~rc4+dfsg-1) experimental; urgency=medium [ Nicolas Boulenguez ] @@ -282,6 +610,55 @@ u-boot (2021.04~rc3+dfsg-1) experimental; urgency=medium -- Vagrant Cascadian Fri, 12 Mar 2021 16:22:35 -0800 +u-boot (2021.01+dfsg-4ubuntu3) impish; urgency=medium + + * Implement u-boot-sifive.postinst to upgrade u-boot in loader1/loader2 + partitions upon package upgrades. LP: #1936370 + + -- Dimitri John Ledkov Thu, 15 Jul 2021 13:01:50 +0100 + +u-boot (2021.01+dfsg-4ubuntu2) impish; urgency=medium + + * Revert '* debian/rules: Ensure debugging symbols are enabled.' as it + breaks riscv64 booting. + + -- Dimitri John Ledkov Wed, 02 Jun 2021 16:52:03 +0100 + +u-boot (2021.01+dfsg-4ubuntu1) impish; urgency=medium + + * Merge from Debian unstable (LP: #1928777). Remaining changes: + - d/p/rpi-config-tweaks.patch: Configuration adjustments to the RPi + configs + - Enable FIT signing support + - Limit key names to keys within the keydir. + - Enable Ubuntu support for the Nitrogen6x board + - 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. + - d/p/rpi-board-dt.patch: use the board's device-tree instead of an + embedded one + - Enable u-boot spl for unleashed. + - Add d/p/rpi-cm4-sdhci.patch for CM4 eMMC support + - Add d/p/rpi-8gb-pci.patch for Pi400 and Pi4-8Gb support + - Add d/p/rpi-maxargs.patch for new Core 18 boot-env + - Import meta-sifive u-boot patches. + - Enable sifive_hifive_unmatched_fu740 target. + - Build-depend on opensbi with fu740 errata fix. + - Set default FDT files for the sifive boards. + - Set USE_PREBOOT on unmatched board too (just like unleashed & qemu), + otherwise u-boot's fdtfile from itb is not used (i.e. when extlinux.conf + does not specify fdtdir). LP: #1923162 + - Unapply unmatched patches, whilst building unleashed platform. Fixes + failure to boot from sd-card on Unleashed. LP: #1924761 + - Skip processing fdtdir on qemu-riscv64_smode target, as it crashes the + riscv qemu VM. LP: #1925267 LP: #1923162 + - sifive-unleashed-default-fdt-files.patch: split into unleashed & + unmatched separate patches, for ease of upstreaming to meta-sifive and + u-boot upstreams. Also this ensures that unleashed target is built with + fdtfile= set, as unleashed target unapplies lots of patches. + + -- Dave Jones Tue, 18 May 2021 11:07:17 +0100 + u-boot (2021.01+dfsg-4) unstable; urgency=medium [ Arnaud Ferraris ] @@ -297,6 +674,83 @@ u-boot (2021.01+dfsg-4) unstable; urgency=medium -- Vagrant Cascadian Fri, 12 Mar 2021 15:00:43 -0800 +u-boot (2021.01+dfsg-3ubuntu9) hirsute; urgency=medium + + * sifive-unleashed-default-fdt-files.patch: split into unleashed & + unmatched separate patches, for ease of upstreaming to meta-sifive and + u-boot upstreams. Also this ensures that unleashed target is built + with fdtfile= set, as unleashed target unapplies lots of patches. + + -- Dimitri John Ledkov Wed, 21 Apr 2021 18:05:00 +0100 + +u-boot (2021.01+dfsg-3ubuntu8) hirsute; urgency=medium + + * Skip processing fdtdir on qemu-riscv64_smode target, as it crashes the + riscv qemu VM. LP: #1925267 LP: #1923162 + + -- Dimitri John Ledkov Wed, 21 Apr 2021 01:25:13 +0100 + +u-boot (2021.01+dfsg-3ubuntu7) hirsute; urgency=medium + + * Unapply unmatched patches, whilst building unleashed platform. Fixes + failure to boot from sd-card on Unleashed. LP: #1924761 + + -- Dimitri John Ledkov Fri, 16 Apr 2021 14:07:49 +0100 + +u-boot (2021.01+dfsg-3ubuntu6) hirsute; urgency=medium + + * Set USE_PREBOOT on unmatched board too (just like unleashed & qemu), + otherwise u-boot's fdtfile from itb is not used (i.e. when + extlinux.conf does not specify fdtdir). LP: #1923162 + + -- Dimitri John Ledkov Tue, 13 Apr 2021 14:52:32 +0100 + +u-boot (2021.01+dfsg-3ubuntu5) hirsute; urgency=medium + + * Set default FDT files for the sifive boards. + + -- Dimitri John Ledkov Tue, 16 Mar 2021 18:03:09 +0000 + +u-boot (2021.01+dfsg-3ubuntu4) hirsute; urgency=medium + + * Update patch for unmatched. + + -- Dimitri John Ledkov Mon, 15 Mar 2021 21:26:35 +0000 + +u-boot (2021.01+dfsg-3ubuntu3) hirsute; urgency=medium + + * Update patches for unmatched. + + -- Dimitri John Ledkov Mon, 15 Mar 2021 16:29:23 +0000 + +u-boot (2021.01+dfsg-3ubuntu2) hirsute; urgency=medium + + * Import meta-sifive u-boot patches. + * Enable sifive_hifive_unmatched_fu740 target. + * Build-depend on opensbi with fu740 errata fix. + + -- Dimitri John Ledkov Wed, 10 Mar 2021 12:27:57 +0000 + +u-boot (2021.01+dfsg-3ubuntu1) hirsute; urgency=medium + + * Merge from Debian unstable. Remaining changes: + - d/p/rpi-config-tweaks.patch: Configuration adjustments to the RPi + configs + - Enable FIT signing support + - Limit key names to keys within the keydir. + - Enable Ubuntu support for the Nitrogen6x board + - 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. + - d/p/rpi-board-dt.patch: use the board's device-tree instead of an + embedded one + - Enable u-boot spl for unleashed. + - Add d/p/rpi-cm4-sdhci.patch for CM4 eMMC support + - Add d/p/rpi-8gb-pci.patch for Pi400 and Pi4-8Gb support + - Add d/p/rpi-maxargs.patch for new Core 18 boot-env + + -- Dave Jones Wed, 10 Mar 2021 12:02:04 +0000 + u-boot (2021.01+dfsg-3) unstable; urgency=medium [ Domenico Andreoli ] @@ -329,6 +783,33 @@ u-boot (2021.01+dfsg-3) unstable; urgency=medium -- Vagrant Cascadian Mon, 01 Mar 2021 00:00:18 -0800 +u-boot (2021.01+dfsg-2ubuntu1) hirsute; urgency=medium + + * Merge from Debian unstable. Remaining changes: + - d/p/rpi-config-tweaks.patch: Configuration adjustments to the RPi + configs + - Enable FIT signing support + - Limit key names to keys within the keydir. + - Enable Ubuntu support for the Nitrogen6x board + - 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. + - d/p/rpi-board-dt.patch: use the board's device-tree instead of an + embedded one + - Enable u-boot spl for unleashed. + - Add d/p/rpi-cm4-sdhci.patch for CM4 eMMC support + - Add d/p/rpi-8gb-pci.patch for Pi400 and Pi4-8Gb support + - Add d/p/rpi-maxargs.patch for new Core 18 boot-env + * Dropped changes, included in Debian: + - Enable FIT signing support + - Enable CONFIG_FIT_SIGNATURE so we can sign FIT images. + - Add libssl-dev to Build-Depends: to enable crypto functionality. + * Dropped changes, no longer needed: + - Added d/u-boot-rpi.postinst to install u-boot binaries + (previously unnoted) + + -- Dave Jones Thu, 18 Feb 2021 18:15:04 +0000 + u-boot (2021.01+dfsg-2) unstable; urgency=medium * debian/patches: Disable USE_PREBOOT on rockpro64 and pinebook-pro to @@ -444,6 +925,63 @@ u-boot (2020.10+dfsg-2) unstable; urgency=medium -- Vagrant Cascadian Mon, 04 Jan 2021 19:59:11 -0800 +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 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 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 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 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 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 Tue, 06 Oct 2020 03:18:18 +0000 + u-boot (2020.10+dfsg-1) unstable; urgency=medium * New upstream release. @@ -529,6 +1067,53 @@ u-boot (2020.07~rc2+dfsg-1) experimental; urgency=medium -- Vagrant Cascadian 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 Sat, 16 May 2020 01:02:53 +0000 + u-boot (2020.04+dfsg-2) unstable; urgency=medium * debian/patches: @@ -674,6 +1259,68 @@ u-boot (2019.10~rc4+dfsg-1) experimental; urgency=medium -- Vagrant Cascadian 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 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 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 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 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 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 Tue, 23 Jul 2019 10:02:04 +0000 + u-boot (2019.07+dfsg-1) experimental; urgency=medium * New upstream release. @@ -780,6 +1427,48 @@ u-boot (2019.07~rc1+dfsg-1) experimental; urgency=medium -- Vagrant Cascadian 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 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 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 Mon, 03 Jun 2019 14:41:23 +0000 + u-boot (2019.04+dfsg-2) experimental; urgency=medium [ Vagrant Cascadian ] @@ -980,6 +1669,29 @@ u-boot (2018.07+dfsg-1) experimental; urgency=medium -- Vagrant Cascadian 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 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 Fri, 11 Jan 2019 16:43:27 +0000 + u-boot (2018.07~rc2+dfsg-1) experimental; urgency=medium * New upstream release candidate: @@ -1041,6 +1753,26 @@ u-boot (2018.05~rc2+dfsg-1) experimental; urgency=medium -- Vagrant Cascadian 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 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 Fri, 27 Apr 2018 12:38:24 +0100 + u-boot (2018.03+dfsg1-2) unstable; urgency=medium [ Riku Voipio ] @@ -1517,6 +2249,26 @@ u-boot (2016.05~rc3+dfsg1-1) experimental; urgency=medium -- Vagrant Cascadian 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 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 Wed, 06 Jul 2016 17:30:44 -0700 + u-boot (2016.03+dfsg1-6) unstable; urgency=medium [ Vagrant Cascadian ] @@ -1538,6 +2290,14 @@ u-boot (2016.03+dfsg1-6) unstable; urgency=medium -- Vagrant Cascadian 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 Fri, 10 Jun 2016 21:46:33 -0700 + u-boot (2016.03+dfsg1-5) unstable; urgency=medium [ Vagrant Cascadian ] @@ -1563,6 +2323,14 @@ u-boot (2016.03+dfsg1-5) unstable; urgency=medium -- Vagrant Cascadian 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 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 @@ -1621,6 +2389,14 @@ u-boot (2016.03~rc2+dfsg1-1) experimental; urgency=medium -- Vagrant Cascadian 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 Thu, 11 Feb 2016 21:55:38 -0800 + u-boot (2016.01+dfsg1-2) unstable; urgency=medium * u-boot-omap: @@ -1634,6 +2410,13 @@ u-boot (2016.01+dfsg1-2) unstable; urgency=medium -- Vagrant Cascadian 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 Tue, 02 Feb 2016 11:43:50 -0800 + u-boot (2016.01+dfsg1-1) unstable; urgency=medium * u-boot-sunxi: Enable orangepi_plus target. @@ -2696,3 +3479,4 @@ u-boot (2010.03-1) unstable; urgency=low * Initial packaging. closes: #583605. -- Clint Adams Fri, 28 May 2010 16:20:39 -0400 + diff --git a/debian/control b/debian/control index 3cd3a17c0..e256c1008 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,8 @@ Source: u-boot Section: admin Priority: optional -Maintainer: Vagrant Cascadian +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Vagrant Cascadian Uploaders: Loïc Minier , Clint Adams Build-Depends: arm-trusted-firmware (>= 2.6~) [arm64], @@ -11,6 +12,7 @@ Build-Depends: debhelper-compat (= 13), device-tree-compiler, flex, + hart-payload-generator [riscv64], libfdt-dev:native [arm64], libc6:arm64 [arm64] , libc6:armhf [armhf] , @@ -37,8 +39,6 @@ Build-Depends-Indep: gcc-riscv64-linux-gnu [!riscv64], gcc-x86-64-linux-gnu [!amd64], gcc-powerpc-linux-gnu [!powerpc], - gcc-mips64el-linux-gnuabi64 [!mips64el], - gcc-mipsel-linux-gnu [!mipsel], Rules-Requires-Root: no Standards-Version: 4.6.1 Homepage: https://www.denx.de/wiki/U-Boot/ @@ -204,6 +204,23 @@ Description: A boot loader for exynos systems Included platforms: ${u-boot-exynos:platforms} +Package: u-boot-microchip +Architecture: riscv64 +Multi-Arch: same +Depends: ${misc:Depends} +Built-Using: ${u-boot-microchip:Built-Using} +Description: A boot loader for Microchip systems + Das U-Boot is a cross-platform bootloader for embedded systems, + used as the default boot loader by several board vendors. It is + intended to be easy to port and to debug, and runs on many + supported architectures, including PPC, ARM, MIPS, x86, m68k, + NIOS, and Microblaze. + . + This package includes boot loaders for various Microchip platforms. + . + Included platforms: + ${u-boot-microchip:platforms} + Package: u-boot-mvebu Architecture: arm64 Multi-Arch: same @@ -243,6 +260,7 @@ Package: u-boot-rpi Architecture: armel armhf arm64 Multi-Arch: same Depends: ${misc:Depends} +Breaks: flash-kernel (<< 3.104) Description: A boot loader for Raspberry PI systems Das U-Boot is a cross-platform bootloader for embedded systems, used as the default boot loader by several board vendors. It is diff --git a/debian/microchip_mpfs_icicle.yaml b/debian/microchip_mpfs_icicle.yaml new file mode 100644 index 000000000..52ff6cd16 --- /dev/null +++ b/debian/microchip_mpfs_icicle.yaml @@ -0,0 +1,4 @@ +set-name: 'PolarFire-SoC-HSS::U-Boot' +hart-entry-points: {u54_1: '0x80200000', u54_2: '0x80200000', u54_3: '0x80200000', u54_4: '0x80200000'} +payloads: + debian/build/microchip_mpfs_icicle/u-boot.bin: {exec-addr: '0x80200000', owner-hart: u54_1, secondary-hart: u54_2, secondary-hart: u54_3, secondary-hart: u54_4, priv-mode: prv_s} diff --git a/debian/patches/CVE-2022-2347.patch b/debian/patches/CVE-2022-2347.patch new file mode 100644 index 000000000..87447437d --- /dev/null +++ b/debian/patches/CVE-2022-2347.patch @@ -0,0 +1,124 @@ +From fbce985e28eaca3af82afecc11961aadaf971a7e Mon Sep 17 00:00:00 2001 +From: Venkatesh Yadav Abbarapu +Date: Thu, 3 Nov 2022 09:37:48 +0530 +Subject: [PATCH] usb: gadget: dfu: Fix the unchecked length field + +DFU implementation does not bound the length field in USB +DFU download setup packets, and it does not verify that +the transfer direction. Fixing the length and transfer +direction. + +CVE-2022-2347 + +Signed-off-by: Venkatesh Yadav Abbarapu +Reviewed-by: Marek Vasut +--- + drivers/usb/gadget/f_dfu.c | 58 ++++++++++++++++++++++++-------------- + 1 file changed, 37 insertions(+), 21 deletions(-) + +diff --git a/drivers/usb/gadget/f_dfu.c b/drivers/usb/gadget/f_dfu.c +index e9340ff5cb4d..33ef62f8babe 100644 +--- a/drivers/usb/gadget/f_dfu.c ++++ b/drivers/usb/gadget/f_dfu.c +@@ -321,23 +321,29 @@ static int state_dfu_idle(struct f_dfu *f_dfu, + u16 len = le16_to_cpu(ctrl->wLength); + int value = 0; + ++ len = len > DFU_USB_BUFSIZ ? DFU_USB_BUFSIZ : len; ++ + switch (ctrl->bRequest) { + case USB_REQ_DFU_DNLOAD: +- if (len == 0) { +- f_dfu->dfu_state = DFU_STATE_dfuERROR; +- value = RET_STALL; +- break; ++ if (ctrl->bRequestType == USB_DIR_OUT) { ++ if (len == 0) { ++ f_dfu->dfu_state = DFU_STATE_dfuERROR; ++ value = RET_STALL; ++ break; ++ } ++ f_dfu->dfu_state = DFU_STATE_dfuDNLOAD_SYNC; ++ f_dfu->blk_seq_num = w_value; ++ value = handle_dnload(gadget, len); + } +- f_dfu->dfu_state = DFU_STATE_dfuDNLOAD_SYNC; +- f_dfu->blk_seq_num = w_value; +- value = handle_dnload(gadget, len); + break; + case USB_REQ_DFU_UPLOAD: +- f_dfu->dfu_state = DFU_STATE_dfuUPLOAD_IDLE; +- f_dfu->blk_seq_num = 0; +- value = handle_upload(req, len); +- if (value >= 0 && value < len) +- f_dfu->dfu_state = DFU_STATE_dfuIDLE; ++ if (ctrl->bRequestType == USB_DIR_IN) { ++ f_dfu->dfu_state = DFU_STATE_dfuUPLOAD_IDLE; ++ f_dfu->blk_seq_num = 0; ++ value = handle_upload(req, len); ++ if (value >= 0 && value < len) ++ f_dfu->dfu_state = DFU_STATE_dfuIDLE; ++ } + break; + case USB_REQ_DFU_ABORT: + /* no zlp? */ +@@ -426,11 +432,15 @@ static int state_dfu_dnload_idle(struct f_dfu *f_dfu, + u16 len = le16_to_cpu(ctrl->wLength); + int value = 0; + ++ len = len > DFU_USB_BUFSIZ ? DFU_USB_BUFSIZ : len; ++ + switch (ctrl->bRequest) { + case USB_REQ_DFU_DNLOAD: +- f_dfu->dfu_state = DFU_STATE_dfuDNLOAD_SYNC; +- f_dfu->blk_seq_num = w_value; +- value = handle_dnload(gadget, len); ++ if (ctrl->bRequestType == USB_DIR_OUT) { ++ f_dfu->dfu_state = DFU_STATE_dfuDNLOAD_SYNC; ++ f_dfu->blk_seq_num = w_value; ++ value = handle_dnload(gadget, len); ++ } + break; + case USB_REQ_DFU_ABORT: + f_dfu->dfu_state = DFU_STATE_dfuIDLE; +@@ -513,13 +523,17 @@ static int state_dfu_upload_idle(struct f_dfu *f_dfu, + u16 len = le16_to_cpu(ctrl->wLength); + int value = 0; + ++ len = len > DFU_USB_BUFSIZ ? DFU_USB_BUFSIZ : len; ++ + switch (ctrl->bRequest) { + case USB_REQ_DFU_UPLOAD: +- /* state transition if less data then requested */ +- f_dfu->blk_seq_num = w_value; +- value = handle_upload(req, len); +- if (value >= 0 && value < len) +- f_dfu->dfu_state = DFU_STATE_dfuIDLE; ++ if (ctrl->bRequestType == USB_DIR_IN) { ++ /* state transition if less data then requested */ ++ f_dfu->blk_seq_num = w_value; ++ value = handle_upload(req, len); ++ if (value >= 0 && value < len) ++ f_dfu->dfu_state = DFU_STATE_dfuIDLE; ++ } + break; + case USB_REQ_DFU_ABORT: + f_dfu->dfu_state = DFU_STATE_dfuIDLE; +@@ -595,6 +609,8 @@ dfu_handle(struct usb_function *f, const struct usb_ctrlrequest *ctrl) + int value = 0; + u8 req_type = ctrl->bRequestType & USB_TYPE_MASK; + ++ len = len > DFU_USB_BUFSIZ ? DFU_USB_BUFSIZ : len; ++ + debug("w_value: 0x%x len: 0x%x\n", w_value, len); + debug("req_type: 0x%x ctrl->bRequest: 0x%x f_dfu->dfu_state: 0x%x\n", + req_type, ctrl->bRequest, f_dfu->dfu_state); +@@ -614,7 +630,7 @@ dfu_handle(struct usb_function *f, const struct usb_ctrlrequest *ctrl) + value = dfu_state[f_dfu->dfu_state] (f_dfu, ctrl, gadget, req); + + if (value >= 0) { +- req->length = value; ++ req->length = value > DFU_USB_BUFSIZ ? DFU_USB_BUFSIZ : value; + req->zero = value < len; + value = usb_ep_queue(gadget->ep0, req, 0); + if (value < 0) { diff --git a/debian/patches/efivars-commands.patch b/debian/patches/efivars-commands.patch new file mode 100644 index 000000000..fa70359cc --- /dev/null +++ b/debian/patches/efivars-commands.patch @@ -0,0 +1,31 @@ +Enable commands for display and manipulation of UEFI boot options by +default. + +Signed-off-by: Heinrich Schuchardt +--- + cmd/Kconfig | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/cmd/Kconfig b/cmd/Kconfig +index 02c298fdbe..cfc4563f59 100644 +--- a/cmd/Kconfig ++++ b/cmd/Kconfig +@@ -502,6 +502,7 @@ config CMD_ENV_FLAGS + config CMD_NVEDIT_EFI + bool "env [set|print] -e - set/print UEFI variables" + depends on EFI_LOADER ++ default y + imply HEXDUMP + help + UEFI variables are encoded as some form of U-Boot variables. +@@ -1757,6 +1758,7 @@ config CMD_CLS + config CMD_EFIDEBUG + bool "efidebug - display/configure UEFI environment" + depends on EFI_LOADER ++ default y + select EFI_DEVICE_PATH_TO_TEXT + help + Enable the 'efidebug' command which provides a subset of UEFI +-- +2.33.1 + diff --git a/debian/patches/riscv64/dts-mpfs-icicle-kit-update-memory-configuratio.patch b/debian/patches/riscv64/dts-mpfs-icicle-kit-update-memory-configuratio.patch new file mode 100644 index 000000000..bb95452a8 --- /dev/null +++ b/debian/patches/riscv64/dts-mpfs-icicle-kit-update-memory-configuratio.patch @@ -0,0 +1,109 @@ +From 4efdcb27771b2057dd7e5c2cd6cafa97ea0fb746 Mon Sep 17 00:00:00 2001 +From: Conor Dooley +Date: Tue, 4 Oct 2022 13:47:43 +0100 +Subject: [PATCH] riscv: dts: mpfs-icicle-kit: update memory configuration for + v2022.10 + +In the v2022.10 reference design, the seg registers are going to be +changed, resulting in a required change to the memory map in Linux. +A small 4M reservation is made at the end of 32-bit DDR to provide some +memory for the HSS to use, so that it can cache its payload.bin between +reboots of a specific context. + +Signed-off-by: Conor Dooley +--- + arch/riscv/dts/microchip-mpfs-icicle-kit.dts | 70 ++++---------------- + 1 file changed, 14 insertions(+), 56 deletions(-) + +diff --git a/arch/riscv/dts/microchip-mpfs-icicle-kit.dts b/arch/riscv/dts/microchip-mpfs-icicle-kit.dts +index 287ef3d23b..1b47865557 100644 +--- a/arch/riscv/dts/microchip-mpfs-icicle-kit.dts ++++ b/arch/riscv/dts/microchip-mpfs-icicle-kit.dts +@@ -28,70 +28,28 @@ + timebase-frequency = ; + }; + +- reserved-memory { +- ranges; +- #size-cells = <2>; +- #address-cells = <2>; +- +- fabricbuf0: fabricbuf@0 { +- compatible = "shared-dma-pool"; +- reg = <0x0 0xae000000 0x0 0x2000000>; +- label = "fabricbuf0-ddr-c"; +- }; +- +- fabricbuf1: fabricbuf@1 { +- compatible = "shared-dma-pool"; +- reg = <0x0 0xc0000000 0x0 0x8000000>; +- label = "fabricbuf1-ddr-nc"; +- }; +- +- fabricbuf2: fabricbuf@2 { +- compatible = "shared-dma-pool"; +- reg = <0x0 0xd8000000 0x0 0x8000000>; +- label = "fabricbuf2-ddr-nc-wcb"; +- }; +- }; +- +- udmabuf0 { +- compatible = "ikwzm,u-dma-buf"; +- device-name = "udmabuf-ddr-c0"; +- minor-number = <0>; +- size = <0x0 0x2000000>; +- memory-region = <&fabricbuf0>; +- sync-mode = <3>; +- }; +- +- udmabuf1 { +- compatible = "ikwzm,u-dma-buf"; +- device-name = "udmabuf-ddr-nc0"; +- minor-number = <1>; +- size = <0x0 0x8000000>; +- memory-region = <&fabricbuf1>; +- sync-mode = <3>; +- }; +- +- udmabuf2 { +- compatible = "ikwzm,u-dma-buf"; +- device-name = "udmabuf-ddr-nc-wcb0"; +- minor-number = <2>; +- size = <0x0 0x8000000>; +- memory-region = <&fabricbuf2>; +- sync-mode = <3>; +- }; +- + ddrc_cache_lo: memory@80000000 { + device_type = "memory"; +- reg = <0x0 0x80000000 0x0 0x2e000000>; +- clocks = <&clkcfg CLK_DDRC>; ++ reg = <0x0 0x80000000 0x0 0x40000000>; + status = "okay"; + }; +- ++ + ddrc_cache_hi: memory@1000000000 { + device_type = "memory"; +- reg = <0x10 0x0 0x0 0x40000000>; +- clocks = <&clkcfg CLK_DDRC>; ++ reg = <0x10 0x40000000 0x0 0x40000000>; + status = "okay"; + }; ++ ++ reserved-memory { ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ranges; ++ ++ hss_payload: region@BFC00000 { ++ reg = <0x0 0xBFC00000 0x0 0x400000>; ++ no-map; ++ }; ++ }; + }; + + &uart1 { +-- +2.37.2 + diff --git a/debian/patches/riscv64/enable-reset-via-SBI-on-PolarFire-Icicle-Kit.patch b/debian/patches/riscv64/enable-reset-via-SBI-on-PolarFire-Icicle-Kit.patch new file mode 100644 index 000000000..9010a5d86 --- /dev/null +++ b/debian/patches/riscv64/enable-reset-via-SBI-on-PolarFire-Icicle-Kit.patch @@ -0,0 +1,28 @@ +From 52ab8ff4f5fd68c066962e7cc55b87594172b5b3 Mon Sep 17 00:00:00 2001 +From: Heinrich Schuchardt +Date: Mon, 7 Nov 2022 10:45:00 +0100 +Subject: [PATCH 1/1] riscv: enable reset via SBI on PolarFire Icicle Kit + +HSS 2022.10 provides support for resetting the board. + +Signed-off-by: Heinrich Schuchardt +Reviewed-by: Padmarao Begari +Tested-by: Padmarao Begari +Origin: https://lists.denx.de/pipermail/u-boot/2022-November/499280.html +--- + configs/microchip_mpfs_icicle_defconfig | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/configs/microchip_mpfs_icicle_defconfig b/configs/microchip_mpfs_icicle_defconfig +index c295b9bad3..65bd50db80 100644 +--- a/configs/microchip_mpfs_icicle_defconfig ++++ b/configs/microchip_mpfs_icicle_defconfig +@@ -21,3 +21,5 @@ CONFIG_SYS_MEM_TOP_HIDE=0x400000 + CONFIG_SYS_RELOC_GD_ENV_ADDR=y + CONFIG_BOOTP_SEND_HOSTNAME=y + CONFIG_DM_MTD=y ++CONFIG_SYSRESET=y ++CONFIG_SYSRESET_SBI=y +-- +2.37.2 + diff --git a/debian/patches/riscv64/mpfs-icicle-reserve-the-top-of-memory-for-the-.patch b/debian/patches/riscv64/mpfs-icicle-reserve-the-top-of-memory-for-the-.patch new file mode 100644 index 000000000..cdff244c1 --- /dev/null +++ b/debian/patches/riscv64/mpfs-icicle-reserve-the-top-of-memory-for-the-.patch @@ -0,0 +1,27 @@ +From 41972b043b205b7e0847d747a41d488c5e3d189e Mon Sep 17 00:00:00 2001 +From: Conor Dooley +Date: Wed, 5 Oct 2022 13:34:13 +0100 +Subject: [PATCH 1/1] riscv: mpfs icicle: reserve the top of memory for the HSS + +Signed-off-by: Conor Dooley +Signed-off-by: Heinrich Schuchardt +--- + include/configs/microchip_mpfs_icicle.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/include/configs/microchip_mpfs_icicle.h b/include/configs/microchip_mpfs_icicle.h +index 4c7cfac8af..922cae9df7 100644 +--- a/include/configs/microchip_mpfs_icicle.h ++++ b/include/configs/microchip_mpfs_icicle.h +@@ -13,6 +13,8 @@ + + #define CONFIG_STANDALONE_LOAD_ADDR 0x80200000 + ++#define CONFIG_SYS_MEM_TOP_HIDE SZ_4M ++ + /* Environment options */ + + #define BOOT_TARGET_DEVICES(func) \ +-- +2.37.2 + diff --git a/debian/patches/rpi-8gb-pci.patch b/debian/patches/rpi-8gb-pci.patch new file mode 100644 index 000000000..51160fd95 --- /dev/null +++ b/debian/patches/rpi-8gb-pci.patch @@ -0,0 +1,30 @@ +Author: Dave Jones +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. + +--- a/configs/rpi_4_32b_defconfig ++++ b/configs/rpi_4_32b_defconfig +@@ -37,7 +37,6 @@ CONFIG_MMC_SDHCI=y + CONFIG_MMC_SDHCI_BCM2835=y + CONFIG_BCMGENET=y + CONFIG_PCI=y +-CONFIG_PCI_BRCMSTB=y + CONFIG_PINCTRL=y + # CONFIG_PINCTRL_GENERIC is not set + CONFIG_DM_RESET=y +--- a/configs/rpi_4_defconfig ++++ b/configs/rpi_4_defconfig +@@ -37,7 +37,6 @@ CONFIG_MMC_SDHCI=y + CONFIG_MMC_SDHCI_BCM2835=y + CONFIG_BCMGENET=y + CONFIG_PCI=y +-CONFIG_PCI_BRCMSTB=y + CONFIG_PINCTRL=y + # CONFIG_PINCTRL_GENERIC is not set + CONFIG_DM_RESET=y diff --git a/debian/patches/rpi-board-dt.patch b/debian/patches/rpi-board-dt.patch new file mode 100644 index 000000000..bee8fafef --- /dev/null +++ b/debian/patches/rpi-board-dt.patch @@ -0,0 +1,46 @@ +Author: Dave Jones +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. +Index: u-boot-2021.07~rc4+dfsg/configs/rpi_2_defconfig +=================================================================== +--- u-boot-2021.07~rc4+dfsg.orig/configs/rpi_2_defconfig ++++ u-boot-2021.07~rc4+dfsg/configs/rpi_2_defconfig +@@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y + CONFIG_CMD_MMC=y + CONFIG_CMD_USB=y + CONFIG_CMD_FS_UUID=y +-CONFIG_OF_EMBED=y ++CONFIG_OF_BOARD=y + CONFIG_SYS_REDUNDAND_ENVIRONMENT=y + CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" + CONFIG_SYS_RELOC_GD_ENV_ADDR=y +Index: u-boot-2021.07~rc4+dfsg/configs/rpi_3_32b_defconfig +=================================================================== +--- u-boot-2021.07~rc4+dfsg.orig/configs/rpi_3_32b_defconfig ++++ u-boot-2021.07~rc4+dfsg/configs/rpi_3_32b_defconfig +@@ -18,7 +18,7 @@ CONFIG_CMD_GPIO=y + CONFIG_CMD_MMC=y + CONFIG_CMD_USB=y + CONFIG_CMD_FS_UUID=y +-CONFIG_OF_EMBED=y ++CONFIG_OF_BOARD=y + CONFIG_SYS_REDUNDAND_ENVIRONMENT=y + CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" + CONFIG_SYS_RELOC_GD_ENV_ADDR=y +Index: u-boot-2021.07~rc4+dfsg/configs/rpi_3_defconfig +=================================================================== +--- u-boot-2021.07~rc4+dfsg.orig/configs/rpi_3_defconfig ++++ u-boot-2021.07~rc4+dfsg/configs/rpi_3_defconfig +@@ -18,7 +18,7 @@ CONFIG_CMD_GPIO=y + CONFIG_CMD_MMC=y + CONFIG_CMD_USB=y + CONFIG_CMD_FS_UUID=y +-CONFIG_OF_EMBED=y ++CONFIG_OF_BOARD=y + CONFIG_SYS_REDUNDAND_ENVIRONMENT=y + CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" + CONFIG_SYS_RELOC_GD_ENV_ADDR=y diff --git a/debian/patches/rpi-cm4-sdhci.patch b/debian/patches/rpi-cm4-sdhci.patch new file mode 100644 index 000000000..737e59652 --- /dev/null +++ b/debian/patches/rpi-cm4-sdhci.patch @@ -0,0 +1,26 @@ +Author: Dave Jones +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 +@@ -34,7 +34,6 @@ CONFIG_SYS_DFU_DATA_BUF_SIZE=0x100000 + CONFIG_SYS_DFU_MAX_FILE_SIZE=0x200000 + CONFIG_BCM2835_GPIO=y + CONFIG_MMC_SDHCI=y +-CONFIG_MMC_SDHCI_SDMA=y + CONFIG_MMC_SDHCI_BCM2835=y + CONFIG_BCMGENET=y + CONFIG_PCI=y +--- a/configs/rpi_4_defconfig ++++ b/configs/rpi_4_defconfig +@@ -34,7 +34,6 @@ CONFIG_SYS_DFU_DATA_BUF_SIZE=0x100000 + CONFIG_SYS_DFU_MAX_FILE_SIZE=0x200000 + CONFIG_BCM2835_GPIO=y + CONFIG_MMC_SDHCI=y +-CONFIG_MMC_SDHCI_SDMA=y + CONFIG_MMC_SDHCI_BCM2835=y + CONFIG_BCMGENET=y + CONFIG_PCI=y diff --git a/debian/patches/rpi-config-tweaks.patch b/debian/patches/rpi-config-tweaks.patch new file mode 100644 index 000000000..cdc53ba85 --- /dev/null +++ b/debian/patches/rpi-config-tweaks.patch @@ -0,0 +1,104 @@ +Author: Dave Jones +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 enable the "redundant" environment setting + (entirely pointlessly but this changes the env header and, again, + several related code-bases now assume this). + +--- a/configs/rpi_2_defconfig ++++ b/configs/rpi_2_defconfig +@@ -6,7 +6,7 @@ CONFIG_SYS_TEXT_BASE=0x00008000 + CONFIG_SYS_MALLOC_F_LEN=0x400 + 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_SYS_PROMPT="U-Boot> " + CONFIG_SYS_LOAD_ADDR=0x1000000 +@@ -25,6 +25,7 @@ CONFIG_CMD_MMC=y + CONFIG_CMD_USB=y + CONFIG_CMD_FS_UUID=y + CONFIG_OF_EMBED=y ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=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 +@@ -5,7 +5,7 @@ CONFIG_ARCH_BCM283X=y + CONFIG_SYS_TEXT_BASE=0x00008000 + CONFIG_TARGET_RPI_3_32B=y + CONFIG_NR_DRAM_BANKS=1 +-CONFIG_ENV_SIZE=0x4000 ++CONFIG_ENV_SIZE=0x20000 + CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b" + CONFIG_SYS_PROMPT="U-Boot> " + CONFIG_SYS_LOAD_ADDR=0x1000000 +@@ -24,6 +24,7 @@ CONFIG_CMD_MMC=y + CONFIG_CMD_USB=y + CONFIG_CMD_FS_UUID=y + CONFIG_OF_EMBED=y ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=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 +@@ -4,7 +4,7 @@ CONFIG_ARCH_BCM283X=y + CONFIG_SYS_TEXT_BASE=0x00080000 + CONFIG_TARGET_RPI_3=y + CONFIG_NR_DRAM_BANKS=1 +-CONFIG_ENV_SIZE=0x4000 ++CONFIG_ENV_SIZE=0x20000 + CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b" + CONFIG_SYS_PROMPT="U-Boot> " + CONFIG_SYS_LOAD_ADDR=0x1000000 +@@ -23,6 +23,7 @@ CONFIG_CMD_MMC=y + CONFIG_CMD_USB=y + CONFIG_CMD_FS_UUID=y + CONFIG_OF_EMBED=y ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=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_4_32b_defconfig ++++ b/configs/rpi_4_32b_defconfig +@@ -2,7 +2,7 @@ CONFIG_ARM=y + CONFIG_ARCH_BCM283X=y + CONFIG_SYS_TEXT_BASE=0x00008000 + CONFIG_TARGET_RPI_4_32B=y +-CONFIG_ENV_SIZE=0x4000 ++CONFIG_ENV_SIZE=0x20000 + CONFIG_DEFAULT_DEVICE_TREE="bcm2711-rpi-4-b" + CONFIG_SYS_PROMPT="U-Boot> " + CONFIG_SYS_LOAD_ADDR=0x1000000 +@@ -23,6 +23,7 @@ CONFIG_CMD_MMC=y + CONFIG_CMD_PCI=y + CONFIG_CMD_USB=y + CONFIG_CMD_FS_UUID=y ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=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_4_defconfig ++++ b/configs/rpi_4_defconfig +@@ -2,7 +2,7 @@ CONFIG_ARM=y + CONFIG_ARCH_BCM283X=y + CONFIG_SYS_TEXT_BASE=0x00080000 + CONFIG_TARGET_RPI_4=y +-CONFIG_ENV_SIZE=0x4000 ++CONFIG_ENV_SIZE=0x20000 + CONFIG_DEFAULT_DEVICE_TREE="bcm2711-rpi-4-b" + CONFIG_SYS_PROMPT="U-Boot> " + CONFIG_SYS_LOAD_ADDR=0x1000000 +@@ -23,6 +23,7 @@ CONFIG_CMD_MMC=y + CONFIG_CMD_PCI=y + CONFIG_CMD_USB=y + CONFIG_CMD_FS_UUID=y ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y + CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" + CONFIG_SYS_RELOC_GD_ENV_ADDR=y + CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y diff --git a/debian/patches/rpi-maxargs.patch b/debian/patches/rpi-maxargs.patch new file mode 100644 index 000000000..8b709ba51 --- /dev/null +++ b/debian/patches/rpi-maxargs.patch @@ -0,0 +1,17 @@ +Author: Dave Jones +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 +@@ -53,6 +53,7 @@ + #endif + + /* Console configuration */ ++#define CONFIG_SYS_MAXARGS 64 + + /* Environment */ + diff --git a/debian/patches/series b/debian/patches/series index 1d33e8176..8510c6108 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -17,3 +17,21 @@ rockchip/rockchip-inno-usb.patch fix-qemu-ppce500-with-binutils-2.38.patch Makefile-Use-relative-paths-for-debugging-symbols.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 + +efivars-commands.patch + +# For PolarFire Icicle Kit with HSS 2022.10 +riscv64/dts-mpfs-icicle-kit-update-memory-configuratio.patch +riscv64/mpfs-icicle-reserve-the-top-of-memory-for-the-.patch +riscv64/enable-reset-via-SBI-on-PolarFire-Icicle-Kit.patch + +virtio-pci-fix-bug-of-virtio_pci_map_capability.patch +CVE-2022-2347.patch diff --git a/debian/patches/ubuntu-hardening-limit-keynames-to-keydir.patch b/debian/patches/ubuntu-hardening-limit-keynames-to-keydir.patch new file mode 100644 index 000000000..8fe7f3c5f --- /dev/null +++ b/debian/patches/ubuntu-hardening-limit-keynames-to-keydir.patch @@ -0,0 +1,55 @@ +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 +Forwarded: no +Last-Update: 2019-05-31 + +--- + +Index: u-boot-2021.07~rc4+dfsg/lib/rsa/rsa-sign.c +=================================================================== +--- u-boot-2021.07~rc4+dfsg.orig/lib/rsa/rsa-sign.c ++++ u-boot-2021.07~rc4+dfsg/lib/rsa/rsa-sign.c +@@ -67,7 +67,12 @@ static int rsa_pem_get_pub_key(const cha + if (!evpp) + return -EINVAL; + +- *evpp = NULL; ++ if (strchr(name, '/')) { ++ fprintf(stderr, "Invalid key name '%s': contains '/' \n", name); ++ return -EACCES; ++ } ++ ++ *evpp = NULL; + snprintf(path, sizeof(path), "%s/%s.crt", keydir, name); + f = fopen(path, "r"); + if (!f) { +@@ -199,6 +204,11 @@ static int rsa_pem_get_priv_key(const ch + if (!evpp) + return -EINVAL; + ++ if (strchr(name, '/')) { ++ fprintf(stderr, "Invalid key name '%s': contains '/' \n", name); ++ return -EACCES; ++ } ++ + *evpp = NULL; + if (keydir && name) + snprintf(path, sizeof(path), "%s/%s.key", keydir, name); +Index: u-boot-2021.07~rc4+dfsg/tools/kwbimage.c +=================================================================== +--- u-boot-2021.07~rc4+dfsg.orig/tools/kwbimage.c ++++ u-boot-2021.07~rc4+dfsg/tools/kwbimage.c +@@ -395,6 +395,11 @@ static int kwb_load_rsa_key(const char * + 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 --git a/debian/patches/ubuntu-nitrogen6q2g-config-tweaks.patch b/debian/patches/ubuntu-nitrogen6q2g-config-tweaks.patch new file mode 100644 index 000000000..ca7ac8108 --- /dev/null +++ b/debian/patches/ubuntu-nitrogen6q2g-config-tweaks.patch @@ -0,0 +1,41 @@ +--- a/configs/nitrogen6q2g_defconfig ++++ b/configs/nitrogen6q2g_defconfig +@@ -4,7 +4,7 @@ + CONFIG_SYS_MALLOC_LEN=0xa00000 + 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_IMX_CONFIG="board/boundary/nitrogen6x/nitrogen6q2g.cfg" +@@ -34,8 +34,10 @@ + CONFIG_SYS_ALT_MEMTEST=y + # 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 +@@ -53,7 +55,12 @@ + 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_SYS_REDUNDAND_ENVIRONMENT=y + CONFIG_USE_ETHPRIME=y + CONFIG_ETHPRIME="FEC" + CONFIG_NETCONSOLE=y +@@ -101,3 +108,5 @@ + CONFIG_VIDEO_BMP_GZIP=y + CONFIG_VIDEO_BMP_RLE8=y + CONFIG_BMP_16BPP=y ++CONFIG_FAT_WRITE=y ++CONFIG_FS_FAT=y diff --git a/debian/patches/virtio-pci-fix-bug-of-virtio_pci_map_capability.patch b/debian/patches/virtio-pci-fix-bug-of-virtio_pci_map_capability.patch new file mode 100644 index 000000000..69daf7014 --- /dev/null +++ b/debian/patches/virtio-pci-fix-bug-of-virtio_pci_map_capability.patch @@ -0,0 +1,34 @@ +From 04dd7c8e5624ee971004a6b310c2e7d958a0018c Mon Sep 17 00:00:00 2001 +From: Xiang W +Date: Mon, 29 Aug 2022 07:53:15 +0800 +Subject: [PATCH] virtio: pci: fix bug of virtio_pci_map_capability + +The bar of the structure virtio_pci_cap is the index, and each base +address occupies 4 bytes, so it needs to be multiplied by 4. + +This patch fixes a bug reported by Felix Yan +https://lists.denx.de/pipermail/u-boot/2022-August/492779.html + +Signed-off-by: Xiang W +Tested-by: Felix Yan +Origin: https://source.denx.de/u-boot/u-boot/-/commit/04dd7c8e5624ee971004a6b310c2e7d958a0018c +--- + drivers/virtio/virtio_pci_modern.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c +index 880a12cc28..cfde4007f5 100644 +--- a/drivers/virtio/virtio_pci_modern.c ++++ b/drivers/virtio/virtio_pci_modern.c +@@ -466,7 +466,7 @@ static void __iomem *virtio_pci_map_capability(struct udevice *udev, + unsigned long mask = + PCI_REGION_TYPE | PCI_REGION_SYS_MEMORY | PCI_REGION_RO; + unsigned long flags = PCI_REGION_MEM; +- u8 *p = dm_pci_map_bar(udev, PCI_BASE_ADDRESS_0 + cap->bar, cap->offset, ++ u8 *p = dm_pci_map_bar(udev, PCI_BASE_ADDRESS_0 + 4 * cap->bar, cap->offset, + cap->length, mask, flags); + + return (void __iomem *)p; +-- +2.37.2 + diff --git a/debian/rules b/debian/rules index 89455e024..540ea2155 100755 --- a/debian/rules +++ b/debian/rules @@ -51,9 +51,10 @@ ifneq (,$(only_platforms)) $(pkg)_platforms := $(filter $(only_platforms),$($(pkg)_platforms)))) endif +## Disable, as it breaks riscv64 booting # Enable debugging symbols and remove build paths -HOSTCFLAGS = -g -ffile-prefix-map=$(CURDIR)=. -common_make_args += HOSTCFLAGS='$(HOSTCFLAGS)' +#HOSTCFLAGS = -g -ffile-prefix-map=$(CURDIR)=. +#common_make_args += HOSTCFLAGS='$(HOSTCFLAGS)' %: dh $@ @@ -96,6 +97,10 @@ define build_template ifneq (,$(filter uboot.elf,$($(platform)_targets))) cp -u debian/build/$(platform)/u-boot debian/build/$(platform)/uboot.elf endif + ifeq ($(package),u-boot-microchip) + hss-payload-generator -c debian/microchip_mpfs_icicle.yaml \ + debian/build/microchip_mpfs_icicle/u-boot.payload + endif ifeq ($(package),u-boot-qemu) # TODO: --strip-unneeded as policy recommends? If not, why? $($(platform)_CROSS_COMPILE)strip --remove-section=.comment --remove-section=.note \ diff --git a/debian/targets.mk b/debian/targets.mk index 235d74527..1900b9aeb 100644 --- a/debian/targets.mk +++ b/debian/targets.mk @@ -318,6 +318,10 @@ else ifeq (${DEB_HOST_ARCH},armhf) u-boot-imx_platforms += nitrogen6q nitrogen6q_targets := u-boot-dtb.imx uboot.elf + # Shrirang Bagul + u-boot-imx_platforms += nitrogen6q2g + nitrogen6q2g_targets := u-boot-dtb.imx uboot.elf + # Vagrant Cascadian u-boot-imx_platforms += novena novena_targets := SPL u-boot.img uboot.elf @@ -554,6 +558,11 @@ else ifeq (${DEB_HOST_ARCH},avr32) else ifeq (${DEB_HOST_ARCH},riscv64) +# u-boot-microchip + + u-boot-microchip_platforms += microchip_mpfs_icicle + microchip_mpfs_icicle_targets := u-boot.bin + # u-boot-sifive dpkg-gencontrol_args += "-Vu-boot-sifive:Built-Using=$(shell dpkg-query -Wf \ @@ -580,14 +589,6 @@ endif # u-boot-qemu (Architecture: all) - u-boot-qemu_platforms += malta64el - malta64el_CROSS_COMPILE := mips64el-linux-gnuabi64- - malta64el_targets := u-boot.bin uboot.elf - - u-boot-qemu_platforms += maltael - maltael_CROSS_COMPILE := mipsel-linux-gnu- - maltael_targets := u-boot.bin uboot.elf - u-boot-qemu_platforms += qemu-ppce500 qemu-ppce500_CROSS_COMPILE := powerpc-linux-gnu- qemu-ppce500_targets := u-boot.bin uboot.elf diff --git a/debian/u-boot-microchip.README.Debian b/debian/u-boot-microchip.README.Debian new file mode 100644 index 000000000..0b1e8dac8 --- /dev/null +++ b/debian/u-boot-microchip.README.Debian @@ -0,0 +1,13 @@ +== Installation == + +The u-boot-microchip package installs U-Boot in its post installations script +to the partition named 'loader'. If that partition does not exist, you will +have to copy U-Boot manually. + +For the Microchip Icicle Kit, something like the following should work: + + dd conv=fsync,notrunc if=/usr/lib/u-boot/microchip_icicle/u-boot.payload \ + of=/dev/DEVICE + +Replace DEVICE by the partition with partition type EF02 +(GUID type 21686148-6449-6E6F-744E-656564454649) of the SD-card. diff --git a/debian/u-boot-microchip.docs b/debian/u-boot-microchip.docs new file mode 100644 index 000000000..4ce8126b4 --- /dev/null +++ b/debian/u-boot-microchip.docs @@ -0,0 +1 @@ +doc/board/microchip/mpfs_icicle.rst diff --git a/debian/u-boot-microchip.install b/debian/u-boot-microchip.install new file mode 100644 index 000000000..93c71688d --- /dev/null +++ b/debian/u-boot-microchip.install @@ -0,0 +1 @@ +debian/build/microchip_mpfs_icicle/u-boot.payload /usr/lib/u-boot/microchip_icicle diff --git a/debian/u-boot-microchip.links b/debian/u-boot-microchip.links new file mode 100644 index 000000000..5568390e0 --- /dev/null +++ b/debian/u-boot-microchip.links @@ -0,0 +1 @@ +usr/lib/u-boot/microchip_icicle usr/lib/u-boot/doc/board/microchip/mpfs_icicle.rst diff --git a/debian/u-boot-microchip.lintian-overrides b/debian/u-boot-microchip.lintian-overrides new file mode 100644 index 000000000..0ef47b8b1 --- /dev/null +++ b/debian/u-boot-microchip.lintian-overrides @@ -0,0 +1,15 @@ + +# There are no file conflicts across architectures for u-boot, as each +# target is only installed on a single architecture. In theory, some +# targets could be built on multiple architectures, but could instead install +# the package for the architecture needed. +u-boot-microchip binary: arch-dependent-file-not-in-arch-specific-directory *usr/lib/u-boot/*/uboot.elf* + +# These bootloaders need to be statically linked. +u-boot-microchip binary: statically-linked-binary *usr/lib/u-boot/*/uboot.elf* + +# These are bootloader binaries, and have no external dependency information +u-boot-microchip binary: shared-library-lacks-prerequisites *usr/lib/u-boot/*/uboot.elf* + +u-boot-microchip: description-synopsis-starts-with-article + diff --git a/debian/u-boot-microchip.postinst b/debian/u-boot-microchip.postinst new file mode 100644 index 000000000..60972b493 --- /dev/null +++ b/debian/u-boot-microchip.postinst @@ -0,0 +1,19 @@ +#!/bin/sh + +##DEBHELPER## + +set -e + +case "$1" in + configure) + target="" + if grep -q '^Microchip PolarFire-SoC Icicle Kit$' /sys/firmware/devicetree/base/model; then + target="microchip_icicle" + fi + if [ -n "$target" ] && [ -e /dev/disk/by-partlabel/loader ]; then + dd if=/usr/lib/u-boot/$target/u-boot.payload of=/dev/disk/by-partlabel/loader + fi + ;; +esac + +exit 0 diff --git a/debian/u-boot-rpi.triggers b/debian/u-boot-rpi.triggers new file mode 100644 index 000000000..b1c3678ca --- /dev/null +++ b/debian/u-boot-rpi.triggers @@ -0,0 +1 @@ +activate-noawait flash-kernel diff --git a/debian/u-boot-sifive.links b/debian/u-boot-sifive.links new file mode 100644 index 000000000..5a71e1fac --- /dev/null +++ b/debian/u-boot-sifive.links @@ -0,0 +1,2 @@ +usr/lib/u-boot/sifive_unleashed usr/lib/u-boot/sifive_fu540 +usr/lib/u-boot/sifive_unmatched usr/lib/u-boot/sifive_hifive_unmatched_fu740 diff --git a/debian/u-boot-sifive.postinst b/debian/u-boot-sifive.postinst new file mode 100755 index 000000000..28bbf5142 --- /dev/null +++ b/debian/u-boot-sifive.postinst @@ -0,0 +1,29 @@ +#!/bin/sh + +##DEBHELPER## + +set -e + +case "$1" in + configure) + target="" + if grep -q '^SiFive HiFive Unleashed A00$' /sys/firmware/devicetree/base/model; then + target="sifive_unleashed" + fi + if grep -q '^SiFive HiFive Unmatched A00$' /sys/firmware/devicetree/base/model; then + target="sifive_unmatched" + fi + if grep -q '^SiFive HiFive Unmatched$' /sys/firmware/devicetree/base/model; then + target="sifive_unmatched" + fi + if [ -n "$target" ] && [ -e /dev/disk/by-partlabel/loader1 ] && [ -e /dev/disk/by-partlabel/loader2 ]; then + dd if=/usr/lib/u-boot/$target/u-boot-spl.bin of=/dev/disk/by-partlabel/loader1 + dd if=/usr/lib/u-boot/$target/u-boot.itb of=/dev/disk/by-partlabel/loader2 + elif [ -n "$target" ] && [ -e /dev/disk/by-partlabel/Loader1 ] && [ -e /dev/disk/by-partlabel/Loader2 ]; then + dd if=/usr/lib/u-boot/$target/u-boot-spl.bin of=/dev/disk/by-partlabel/Loader1 + dd if=/usr/lib/u-boot/$target/u-boot.itb of=/dev/disk/by-partlabel/Loader2 + fi + ;; +esac + +exit 0