From f08c10c8ba1a4de32d72777e6e4f05d7e828802c Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Mon, 4 Dec 2023 23:39:27 +0000 Subject: [PATCH] patch u-boot to add ubifs support not that we're using it yet --- overlay.nix | 13 +++++++++++++ pkgs/u-boot/0001-add-ubifs-to-boot-targets.patch | 12 ++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/u-boot/0001-add-ubifs-to-boot-targets.patch diff --git a/overlay.nix b/overlay.nix index 0592389..8a89071 100644 --- a/overlay.nix +++ b/overlay.nix @@ -199,4 +199,17 @@ extraPkgs // { }; strace = prev.strace.override { libunwind = null; }; + + ubootQemuArm = final.buildUBoot { + defconfig = "qemu_arm_defconfig"; + extraMeta.platforms = ["armv7l-linux"]; + filesToInstall = ["u-boot.bin"]; + # enable looking for boot files on ubifs. this is unused at + # present, but added in the expectation of a future test + extraPatches = [ ./pkgs/u-boot/0001-add-ubifs-to-boot-targets.patch ]; + extraConfig = '' + CONFIG_CMD_UBI=y + CONFIG_CMD_UBIFS=y + ''; + }; } diff --git a/pkgs/u-boot/0001-add-ubifs-to-boot-targets.patch b/pkgs/u-boot/0001-add-ubifs-to-boot-targets.patch new file mode 100644 index 0000000..bea0edc --- /dev/null +++ b/pkgs/u-boot/0001-add-ubifs-to-boot-targets.patch @@ -0,0 +1,12 @@ +diff --git a/include/configs/qemu-arm.h b/include/configs/qemu-arm.h +index 535762ecb2..a947bae2e8 100644 +--- a/include/configs/qemu-arm.h ++++ b/include/configs/qemu-arm.h +@@ -72,6 +72,7 @@ + BOOT_TARGET_SCSI(func) \ + BOOT_TARGET_VIRTIO(func) \ + BOOT_TARGET_NVME(func) \ ++ func(UBIFS, ubifs, 0, UBI, boot) \ + BOOT_TARGET_DHCP(func) + + #include