configs/pine64_star64: new defconfig
This patch adds a new defconfig for the Star64 board made by Pine64. This board is based on the Starfive JH7110 RISC-V 64 bits SoC. See: https://wiki.pine64.org/wiki/STAR64. This patch uses a custom Kernel and U-Boot made for this board. The SPL has to be signed with the Starfive SPL-Tool which is a software provided by the vendor to get the necessary headers on the SPL. The image configuration is based on the work done by Ivan Velickovic <i.velickovic@unsw.edu.au>. Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
6c4a992050
commit
35635cdc5b
@ -2961,6 +2961,8 @@ F: package/ranger/
|
||||
F: package/x265/
|
||||
|
||||
N: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
|
||||
F: board/pine64/star64
|
||||
F: configs/pine64_star64_defconfig
|
||||
F: package/starfive-spltool/
|
||||
|
||||
N: Thomas Claveirole <thomas.claveirole@green-communications.fr>
|
||||
|
24
board/pine64/star64/genimage.cfg
Normal file
24
board/pine64/star64/genimage.cfg
Normal file
@ -0,0 +1,24 @@
|
||||
# SD card image for the Pine64 Star64 board
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
partition-table-type = "gpt"
|
||||
}
|
||||
|
||||
partition spl {
|
||||
image = "u-boot-spl.bin.normal.out"
|
||||
partition-type-uuid = 2E54B353-1271-4842-806F-E436D6AF6985
|
||||
offset = 2M
|
||||
}
|
||||
|
||||
partition uboot {
|
||||
image = "opensbi_uboot_payload.img"
|
||||
partition-type-uuid = 5B193300-FC78-40CD-8002-E86C45580B47
|
||||
offset = 4M
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
image = "rootfs.ext4"
|
||||
bootable = true
|
||||
}
|
||||
}
|
4
board/pine64/star64/overlay/boot/extlinux/extlinux.conf
Normal file
4
board/pine64/star64/overlay/boot/extlinux/extlinux.conf
Normal file
@ -0,0 +1,4 @@
|
||||
label star64
|
||||
kernel /boot/Image
|
||||
devicetree /boot/jh7110-pine64-star64.dtb
|
||||
append root=/dev/mmcblk1p3 earlycon=sbi
|
9
board/pine64/star64/post-build.sh
Executable file
9
board/pine64/star64/post-build.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
BOARD_DIR="$CONFIG_DIR"/board/pine64/star64
|
||||
|
||||
# Add header to the SPL
|
||||
"$HOST_DIR"/bin/spl_tool -c -f "$BINARIES_DIR"/u-boot-spl.bin
|
||||
|
||||
# Create the u-boot FIT image
|
||||
cp "$BOARD_DIR"/star64-uboot-fit-image.its "$BINARIES_DIR"
|
||||
mkimage -f "$BINARIES_DIR"/star64-uboot-fit-image.its -A riscv -O u-boot -T firmware "$BINARIES_DIR"/opensbi_uboot_payload.img
|
32
board/pine64/star64/readme.txt
Normal file
32
board/pine64/star64/readme.txt
Normal file
@ -0,0 +1,32 @@
|
||||
Pine64 Star64
|
||||
=============
|
||||
|
||||
The Star64 is a low-cost RISC-V 64-bit based platform, powered by a
|
||||
Starfive JH7110 processor.
|
||||
|
||||
https://wiki.pine64.org/wiki/STAR64
|
||||
|
||||
How to build
|
||||
============
|
||||
|
||||
$ make pine64_star64_defconfig
|
||||
$ make
|
||||
|
||||
How to write the SD card
|
||||
========================
|
||||
|
||||
Once the build process is finished you will have an image called "sdcard.img"
|
||||
in the output/images/ directory.
|
||||
|
||||
Copy the bootable "sdcard.img" onto an SD card with "dd":
|
||||
|
||||
$ sudo dd if=output/images/sdcard.img of=/dev/sdX conv=fdatasync
|
||||
|
||||
Preparing the board
|
||||
===================
|
||||
|
||||
Connect a TTL UART cable to pin 6 (GND), 8 (TX) and 10 (RX).
|
||||
|
||||
Insert your SD card.
|
||||
|
||||
Power-up the board using a 12V power supply.
|
29
board/pine64/star64/star64-uboot-fit-image.its
Normal file
29
board/pine64/star64/star64-uboot-fit-image.its
Normal file
@ -0,0 +1,29 @@
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
description = "U-boot-spl FIT image for JH7110 Pine64 Star64";
|
||||
#address-cells = <2>;
|
||||
|
||||
images {
|
||||
firmware {
|
||||
description = "u-boot";
|
||||
data = /incbin/("fw_payload.bin");
|
||||
type = "firmware";
|
||||
arch = "riscv";
|
||||
os = "u-boot";
|
||||
load = <0x0 0x40000000>;
|
||||
entry = <0x0 0x40000000>;
|
||||
compression = "none";
|
||||
};
|
||||
};
|
||||
|
||||
configurations {
|
||||
default = "config-1";
|
||||
|
||||
config-1 {
|
||||
description = "U-boot-spl FIT config for JH7110 Pine64 Star64";
|
||||
firmware = "firmware";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
40
configs/pine64_star64_defconfig
Normal file
40
configs/pine64_star64_defconfig
Normal file
@ -0,0 +1,40 @@
|
||||
BR2_riscv=y
|
||||
|
||||
# Linux headers same as kernel, a 5.15 series
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y
|
||||
|
||||
# Kernel configuration
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,Fishwaldo,Star64_linux,1456c984f15e21e28fb8a9ce96d0ca10e61a71c4)/linux-1456c984f15e21e28fb8a9ce96d0ca10e61a71c4.tar.gz"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="pine64_star64"
|
||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="starfive/jh7110-pine64-star64"
|
||||
BR2_LINUX_KERNEL_INSTALL_TARGET=y
|
||||
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
|
||||
|
||||
# OpenSBI configuration
|
||||
BR2_TARGET_OPENSBI=y
|
||||
BR2_TARGET_OPENSBI_UBOOT_PAYLOAD=y
|
||||
BR2_TARGET_OPENSBI_PLAT="generic"
|
||||
|
||||
# U-Boot configuration
|
||||
BR2_TARGET_UBOOT=y
|
||||
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
|
||||
BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,Fishwaldo,u-boot,172b47f62039605d6806fa96bd403c21cda28996)/u-boot-172b47f62039605d6806fa96bd403c21cda28996.tar.gz"
|
||||
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="pine64_star64"
|
||||
BR2_TARGET_UBOOT_SPL=y
|
||||
|
||||
# Misc
|
||||
BR2_ROOTFS_OVERLAY="board/pine64/star64/overlay/"
|
||||
BR2_PACKAGE_HOST_STARFIVE_SPLTOOL=y
|
||||
BR2_TARGET_ROOTFS_EXT2=y
|
||||
BR2_TARGET_ROOTFS_EXT2_4=y
|
||||
BR2_TARGET_ROOTFS_EXT2_SIZE="100M"
|
||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
|
||||
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/pine64/star64/genimage.cfg"
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="board/pine64/star64/post-build.sh"
|
||||
BR2_PACKAGE_HOST_GENIMAGE=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
|
Loading…
Reference in New Issue
Block a user