From 52675eefd441ff8cb289f615adec10eae009c967 Mon Sep 17 00:00:00 2001 From: Florian Agbuya Date: Mon, 18 Dec 2023 15:38:32 +0800 Subject: [PATCH] flake: configure u-boot to autoboot kernel Signed-off-by: Florian Agbuya --- flake.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 3a9033f..a8695d2 100644 --- a/flake.nix +++ b/flake.nix @@ -204,8 +204,20 @@ preConfigure = '' export DEVICE_TREE=zynq-${board} ''; - extraMeta.platforms = ["armv7l-linux"]; - filesToInstall = ["u-boot.elf"]; + extraConfig = '' + CONFIG_AUTOBOOT=y + CONFIG_BOOTCOMMAND="${builtins.replaceStrings [ "\n" ] [ "; " ] '' + setenv bootargs 'root=/dev/mmcblk0p2 console=ttyPS0,115200n8 systemConfig=${builtins.unsafeDiscardStringContext not-os-configured.config.system.build.toplevel}' + fatload mmc 0 0x6400000 uImage + fatload mmc 0 0x8000000 devicetree.dtb + fatload mmc 0 0xA400000 uramdisk.image.gz + bootm 0x6400000 0xA400000 0x8000000 + ''}" + CONFIG_BOOTDELAY=0 + CONFIG_USE_BOOTCOMMAND=y + ''; + extraMeta.platforms = [ "armv7l-linux" ]; + filesToInstall = [ "u-boot.elf" ]; }; bootimage = { board ? "zc706" }: pkgs.runCommand "${board}-bootimage"