mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-12 05:26:11 +01:00
mnt-reform: uboot remove x86 dependency
This commit is contained in:
parent
9fbdc8cbdb
commit
20baaa0d68
3 changed files with 10 additions and 23 deletions
|
|
@ -3,23 +3,9 @@
|
||||||
uboot,
|
uboot,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
}:
|
}:
|
||||||
# script from https://source.mnt.re/reform/reform-rk3588-uboot/-/blob/b530d65f4a878c0329a594fa248ba8da59d2e05f/build.sh
|
# script from https://source.mnt.re/reform/reform-rk3588-uboot/-/blob/28289e36cd1cb90b302780e83b014250c880c4ec/build.sh
|
||||||
runCommand "mnt-reform-firmware-rk3855${uboot.variant}" { } ''
|
runCommand "mnt-reform-firmware-rk3855${uboot.variant}" { } ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
cp -r ${uboot} u-boot
|
cp ${uboot}/idbloader.img $out/rk3588-mnt-reform2${uboot.variant}-flash.bin
|
||||||
cp -r ${uboot.rkbin} rkbin
|
dd if=${uboot}/u-boot.itb of=$out/rk3588-mnt-reform${uboot.variant}-flash.bin seek=16320
|
||||||
chmod -R +rw u-boot
|
|
||||||
chmod -R +rw rkbin
|
|
||||||
cd u-boot
|
|
||||||
mkdir spl
|
|
||||||
mv u-boot-spl.bin spl
|
|
||||||
../rkbin/tools/boot_merger rock5b-rk3588.ini
|
|
||||||
cd ..
|
|
||||||
# rkbin stuff
|
|
||||||
cd rkbin
|
|
||||||
./tools/boot_merger RKBOOT/RK3588MINIALL.ini
|
|
||||||
# concatenate
|
|
||||||
cd ..
|
|
||||||
cp u-boot/idbloader.img $out/mnt-reform2-rk3588${uboot.variant}-flash.bin
|
|
||||||
dd if=u-boot/u-boot.itb of=$out/mnt-reform2-rk3588${uboot.variant}-flash.bin seek=16320
|
|
||||||
''
|
''
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,7 @@
|
||||||
eval $(partx $img -o START,SECTORS --nr 1 --pairs)
|
eval $(partx $img -o START,SECTORS --nr 1 --pairs)
|
||||||
dd conv=notrunc if=${content} of=$img seek=$START count=$SECTORS
|
dd conv=notrunc if=${content} of=$img seek=$START count=$SECTORS
|
||||||
|
|
||||||
dd conv=notrunc if=${firmware}/mnt-reform2-rk3588-dsi-flash.bin of=$img seek=64
|
dd conv=notrunc if=${firmware}/rk3588-mnt-reform2-dsi-flash.bin of=$img seek=64
|
||||||
|
|
||||||
if test -n "$compressImage"; then
|
if test -n "$compressImage"; then
|
||||||
zstd -T$NIX_BUILD_CORES --rm $img
|
zstd -T$NIX_BUILD_CORES --rm $img
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,14 @@ let
|
||||||
domain = "source.mnt.re";
|
domain = "source.mnt.re";
|
||||||
owner = "reform";
|
owner = "reform";
|
||||||
repo = "reform-rk3588-uboot";
|
repo = "reform-rk3588-uboot";
|
||||||
rev = "55bca0174e7bb449e96028d64ad8348f5af35977";
|
rev = "28289e36cd1cb90b302780e83b014250c880c4ec";
|
||||||
hash = "sha256-A3u1afGK65cGOwENQtu8Hh+fLsSDNxc3rEebkd3QOic=";
|
hash = "sha256-fWGyC+rlfL0NYYRFLvdF7EiO3s9GfFkfhAbTEM5ECAM=";
|
||||||
};
|
};
|
||||||
rkbin = fetchFromGitHub {
|
rkbin = fetchFromGitHub {
|
||||||
owner = "rockchip-linux";
|
owner = "rockchip-linux";
|
||||||
repo = "rkbin";
|
repo = "rkbin";
|
||||||
rev = "f43a462e7a1429a9d407ae52b4745033034a6cf9";
|
rev = "272136301989d493000425935bd4ead0ef04d06b";
|
||||||
hash = "sha256-geESfZP8ynpUz/i/thpaimYo3kzqkBX95gQhMBzNbmk=";
|
hash = "sha256-qXnuZyFNc6gYTkAtPg1t9WHwj8OiTxOLvsHUuvolK/w=";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
buildUBoot rec {
|
buildUBoot rec {
|
||||||
|
|
@ -32,6 +32,7 @@ buildUBoot rec {
|
||||||
patches = [
|
patches = [
|
||||||
"${mntPatches}/0001-ini-ddrbin-bump.patch"
|
"${mntPatches}/0001-ini-ddrbin-bump.patch"
|
||||||
"${mntPatches}/0002-add-target-init-mnt-reform-series.patch"
|
"${mntPatches}/0002-add-target-init-mnt-reform-series.patch"
|
||||||
|
"${mntPatches}/0003-scripts-dtc-pylibfdt-libfdt-i_shipped-Use-SWIG_AppendOutp.patch"
|
||||||
];
|
];
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
cp ${mntPatches}/*.dts arch/arm/dts/
|
cp ${mntPatches}/*.dts arch/arm/dts/
|
||||||
|
|
@ -45,7 +46,7 @@ buildUBoot rec {
|
||||||
"spl/u-boot-spl.bin"
|
"spl/u-boot-spl.bin"
|
||||||
];
|
];
|
||||||
variant = "-dsi";
|
variant = "-dsi";
|
||||||
defconfig = "mnt-reform2-rk3588${variant}_defconfig";
|
defconfig = "rk3588-mnt-reform2${variant}_defconfig";
|
||||||
extraMakeFlags = [
|
extraMakeFlags = [
|
||||||
"BL31=${armTrustedFirmwareRK3588}/bl31.elf"
|
"BL31=${armTrustedFirmwareRK3588}/bl31.elf"
|
||||||
"ROCKCHIP_TPL=${rkbin}/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.18.bin"
|
"ROCKCHIP_TPL=${rkbin}/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.18.bin"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue