Skip to content

Commit

Permalink
labsi: build script for u-boot.scr to boot Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
niflostancu committed Nov 12, 2023
1 parent e81a690 commit 3ce88a5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions configs/labsi-rpi4/build-uboot-script.sh
Original file line number Diff line number Diff line change
@@ -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"

7 changes: 7 additions & 0 deletions configs/labsi-rpi4/files/uboot-script.txt
Original file line number Diff line number Diff line change
@@ -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}

0 comments on commit 3ce88a5

Please sign in to comment.