-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DTB Overlay Support and extlinux.conf (#43)
- Loading branch information
Showing
8 changed files
with
58 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...pine64/ox64/patches/uboot/0002-add-a-few-more-variables-for-extlinux-loading-to-wor.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
From da8f2c5011a1783d3458b42d49b274e935fb80f9 Mon Sep 17 00:00:00 2001 | ||
From: Justin Hammond <justin@dynam.ac> | ||
Date: Sat, 4 Mar 2023 15:53:10 +0800 | ||
Subject: [PATCH] add a few more variables for extlinux loading to work | ||
|
||
--- | ||
diff --git a/include/configs/bl808.h b/include/configs/bl808.h | ||
index 976640894d..5de6947958 100644 | ||
--- a/include/configs/bl808.h | ||
+++ b/include/configs/bl808.h | ||
@@ -46,7 +46,10 @@ | ||
|
||
#define CFG_EXTRA_ENV_SETTINGS \ | ||
"scriptaddr=0x50000000\0" \ | ||
- BOOTENV | ||
+ "kernel_addr_r=0x50200000\0" \ | ||
+ "fdt_addr_r=0x51ff8000\0" \ | ||
+ "fdtoverlay_addr_r=0x52008000\0" \ | ||
+ BOOTENV | ||
#endif | ||
|
||
#endif /* __CONFIG_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
#!/bin/sh | ||
#echo "Compressing Kernel Image" | ||
#lz4 -9 -f $BINARIES_DIR/Image $BINARIES_DIR/Image.lz4 | ||
echo "Compressing UBoot Image" | ||
lz4 -9 -f $BINARIES_DIR/u-boot.bin $BINARIES_DIR/u-boot.bin.lz4 | ||
cd $BINARIES_DIR | ||
echo "Creating OpenSBI/DTB/Kernel Image" | ||
$BR2_EXTERNAL_BOUFFALO_BR_PATH/board/pine64/ox64/mergebin.py -o pine64-ox64-firmware.bin -k u-boot.bin.lz4 -d u-boot.dtb -s fw_jump.bin | ||
$BR2_EXTERNAL_BOUFFALO_BR_PATH/board/pine64/ox64/mergebin.py -o sispeed-m1s-firmware.bin -k u-boot.bin.lz4 -d u-boot.dtb -s fw_jump.bin | ||
echo "Creating OpenSBI/DTB/Uboot Image" | ||
$BR2_EXTERNAL_BOUFFALO_BR_PATH/board/pine64/ox64/mergebin.py -o bl808-firmware.bin -k u-boot.bin.lz4 -d u-boot.dtb -s fw_jump.bin | ||
echo "Copying Boot Script" | ||
$BINARIES_DIR/../host/bin/mkimage -C none -A riscv -T script -d $BR2_EXTERNAL_BOUFFALO_BR_PATH/board/pine64/ox64/boot-m1s.cmd $BINARIES_DIR/boot-m1s.scr | ||
$BINARIES_DIR/../host/bin/mkimage -C none -A riscv -T script -d $BR2_EXTERNAL_BOUFFALO_BR_PATH/board/pine64/ox64/boot-pine64.cmd $BINARIES_DIR/boot-pine64.scr | ||
cp $BINARIES_DIR/boot-pine64.scr $BINARIES_DIR/boot.scr | ||
cp $BINARIES_DIR/*.scr $TARGET_DIR/boot/ | ||
cp $BR2_EXTERNAL_BOUFFALO_BR_PATH/board/pine64/ox64/*.cmd $TARGET_DIR/boot/ | ||
mkdir -p $BINARIES_DIR/extlinux/ | ||
cp $TARGET_DIR/boot/extlinux/* $BINARIES_DIR/extlinux/ | ||
echo "Creating Filesystem Image" | ||
$BASE_DIR/../support/scripts/genimage.sh -c $BR2_EXTERNAL_BOUFFALO_BR_PATH/board/pine64/ox64/genimage.cfg | ||
echo "Completed - Images are at $BINARIES_DIR" |
12 changes: 12 additions & 0 deletions
12
board/pine64/ox64/rootfs-overlay/boot/extlinux/extlinux.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Generic Distro Configuration file generated by OpenEmbedded | ||
menu title Select the boot mode | ||
TIMEOUT 30 | ||
DEFAULT Pine64 OX64 Kernel | ||
LABEL Pine64 0X64 Kernel | ||
KERNEL ../Image | ||
FDT ../bl808-pine64-ox64.dtb | ||
APPEND root=PARTLABEL=rootfs rootwait rw rootfstype=ext4 console=ttyS0,2000000 loglevel=8 earlycon=sbi | ||
LABEL Sipeed M1SDock Kernel | ||
KERNEL ../Image | ||
FDT ../bl808-sipeed-m1s.dtb | ||
APPEND root=PARTLABEL=rootfs rootwait rw rootfstype=ext4 console=ttyS0,2000000 loglevel=8 earlycon=sbi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
By Default, this image is configured to boot the Pine64 Ox64 image. | ||
If you want to boot a different image, please copy the boot-m1s.scr | ||
in /boot to /boot/boot.scr | ||
|
||
The boot-m1s.scr/boot.scr file(s) are U-Boot scripts that will load the | ||
correct DTB file the board you are using. | ||
To change the image, you need to edit the file /boot/extlinux/extlinux.conf | ||
and change the Default entry to Sipeed M1SDock Kernel | ||
|
||
Alternatively, if you have custom images, and using uboot scripts, you can | ||
add the relevent uboot script to the /boot/boot.scr file. | ||
|
||
Please see the following link for more information on how how uboot is | ||
configured: | ||
https://github.com/openbouffalo/buildroot_bouffalo/wiki/U-Boot-Bootflow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters