From 0c5557c257b36e8456ab5c0d8473e9505534c424 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sun, 4 Feb 2024 18:31:58 +0100 Subject: auto start the linux kernel --- .gitignore | 1 + makefile | 3 +++ uboot.txt | 15 +++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 uboot.txt diff --git a/.gitignore b/.gitignore index 4f52db2..bd2ccd8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ state/* !state/gen mnt +uboot.env diff --git a/makefile b/makefile index e7b7356..c75fb11 100644 --- a/makefile +++ b/makefile @@ -55,10 +55,13 @@ bootloader/.config: state/submodules state/container_img .PHONY: build_bootloader build_bootloader: bootloader/.config state/container_img $(CTRIZE) $(MAKE) -C bootloader +uboot.env: uboot.txt + $(CTRIZE) bootloader/tools/mkenvimage -p 0x00 -s 0x20000 -o $@ $< # NOTE: MLO MUST be copied first BOOTLOADER_FILES += bootloader/MLO BOOTLOADER_FILES += bootloader/u-boot.img BOOTLOADER_FILES += bootloader/u-boot.dtb +BOOTLOADER_FILES += uboot.env $(BOOTLOADER_FILES): build_bootloader kernel/.config: state/submodules state/container_img diff --git a/uboot.txt b/uboot.txt new file mode 100644 index 0000000..44f6d3c --- /dev/null +++ b/uboot.txt @@ -0,0 +1,15 @@ +# do not wait for three seconds +bootdelay=0 + +# kernel arguments +bootargs=console=ttyS0,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait + +# boot command (three commands separated by semicolons): +# 1. load zImage format kernel at address 0x80008000 +# 2. load device tree at address 0x82000000 +# 3. start the kernel (kernel is in zImage format, so bootz is used here) +bootcmd=fatload mmc 0:1 0x80008000 zImage ; fatload mmc 0:1 0x82000000 am335x-boneblack.dtb ; bootz 0x80008000 - 0x82000000 + +# happy editor +# vim:ft=sh + -- cgit v1.2.3