clean up device tree package

This commit is contained in:
Florian Agbuya 2024-02-16 18:47:16 +08:00
parent 25ef8fa486
commit afa00efee3
2 changed files with 34 additions and 36 deletions

View File

@ -10,7 +10,6 @@
pkgs = import nixpkgs { system = "x86_64-linux"; };
not-os-cfg = not-os-configured.config.system;
fsbl-support = ./fast-servo/fsbl-support;
dts-support = ./fast-servo/dts-support;
patched-not-os = pkgs.applyPatches {
name = "not-os-patched";
@ -214,7 +213,9 @@
dontFixup = true;
};
u-boot = (pkgs.pkgsCross.armv7l-hf-multiplatform.buildUBoot {
u-boot = let
fast-servo-dts = fast-servo/fast-servo.dts;
in (pkgs.pkgsCross.armv7l-hf-multiplatform.buildUBoot {
defconfig = "xilinx_zynq_virt_defconfig";
patches = [] ++ pkgs.lib.optional (board == "fast-servo") ./fast-servo/u-boot.patch;
preConfigure = ''
@ -237,7 +238,7 @@
filesToInstall = [ "u-boot.elf" ];
}).overrideAttrs (oldAttrs: {
postUnpack = ''
cp ${dts-support}/fast-servo.dts $sourceRoot/arch/arm/dts/zynq-fast-servo.dts
cp ${fast-servo-dts} $sourceRoot/arch/arm/dts/zynq-fast-servo.dts
'';
postInstall = ''
mkdir -p $out/dts
@ -274,8 +275,6 @@
}
''
mkdir -p $out
DTSDIR=$(mktemp -d /tmp/dts-XXXXXX)
cd $DTSDIR
cp ${u-boot}/dts/zynq-${board}.dts .
if [ ${board} == "zc706" ]; then
@ -286,7 +285,6 @@
dtc -I dts -O dtb -o ${board}.dtb zynq-${board}.dts
cp ${board}.dtb $out
rm -rf $DTSDIR
'';
sd-image = let