From 3ce88a59faf446949ae01bcf704efdbfe3292a56 Mon Sep 17 00:00:00 2001 From: Stancu Florin Date: Sun, 12 Nov 2023 16:45:27 +0200 Subject: [PATCH] labsi: build script for u-boot.scr to boot Linux --- configs/labsi-rpi4/build-uboot-script.sh | 10 ++++++++++ configs/labsi-rpi4/files/uboot-script.txt | 7 +++++++ 2 files changed, 17 insertions(+) create mode 100755 configs/labsi-rpi4/build-uboot-script.sh create mode 100644 configs/labsi-rpi4/files/uboot-script.txt diff --git a/configs/labsi-rpi4/build-uboot-script.sh b/configs/labsi-rpi4/build-uboot-script.sh new file mode 100755 index 0000000..e54ae9d --- /dev/null +++ b/configs/labsi-rpi4/build-uboot-script.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# Compiles the U-Boot script + +set -eo pipefail +SRC_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../" && pwd)" +source "$SRC_DIR/lib/common.sh" + +DIST_DIR="$SRC_DIR/dist" +"$UBOOT_DEST/tools/mkimage" -A arm64 -T script -C none -n "Boot script" -d "$CUSTOM_CONFIG_DIR/files/uboot-script.txt" "$DIST_DIR/labsi-rpi4/boot.scr" + diff --git a/configs/labsi-rpi4/files/uboot-script.txt b/configs/labsi-rpi4/files/uboot-script.txt new file mode 100644 index 0000000..b91152a --- /dev/null +++ b/configs/labsi-rpi4/files/uboot-script.txt @@ -0,0 +1,7 @@ +fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs +# set decompression zone in RAM at 400MB, 64MB in size +setenv kernel_comp_addr_r 0x19000000 +setenv kernel_comp_size 0x04000000 +fatload mmc 0:1 ${kernel_addr_r} vmlinuz-6.1.61-rpi+ +booti ${kernel_addr_r} - ${fdt_addr} +