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