Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
label linux
kernel /Image
devicetree /th1520-lichee-pi-4a.dtb
append console=ttyS0,115200 root=/dev/mmcblk0p4 rootfstype=ext4 rootwait rw earlycon clk_ignore_unused init=/sbin/init

View File

@@ -0,0 +1,7 @@
image boot.ext4 {
ext4 {
label = "boot"
}
size = 64M
}

View File

@@ -0,0 +1 @@
../linux/linux.hash

View File

@@ -0,0 +1,2 @@
# From https://www.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc
sha256 beb902a5f69d9e57710112203db38111dad6d30556ea8ce389284c8077fe944d linux-6.12.18.tar.xz

View File

@@ -0,0 +1,2 @@
# Locally computed
sha256 2510c0e867b4f8c28579def9a21e97fa2e8de95b8c7d66bb8b6642202bcee3b4 opensbi-61d7484c752a5e4c464d5dc18e21d9ac67fbbefa-git4.tar.gz

View File

@@ -0,0 +1,2 @@
# Locally computed
sha256 6158b9c6faee41a1e790ad4ba2e1b3e18a122ecdb5749fa77c7495a2d1c56262 uboot-b5ee6e549a7b5ff382a14021a5d6a3c94017bddd-git4.tar.gz

View File

@@ -0,0 +1,24 @@
#!/bin/sh
set -e
BOARD_DIR="$(dirname "$0")"
GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
trap 'rm -rf "${ROOTPATH_TMP}"' EXIT
ROOTPATH_TMP="$(mktemp -d)"
rm -rf "${GENIMAGE_TMP}"
cp "${BINARIES_DIR}"/Image "${BINARIES_DIR}"/*.dtb "${BINARIES_DIR}"/fw_dynamic.bin "${ROOTPATH_TMP}"
cp -a "${BINARIES_DIR}"/bootbins/* "${ROOTPATH_TMP}"
cp -a "${BOARD_DIR}"/extlinux "${ROOTPATH_TMP}"
genimage \
--rootpath "${ROOTPATH_TMP}" \
--tmppath "${GENIMAGE_TMP}" \
--inputpath "${BINARIES_DIR}" \
--outputpath "${BINARIES_DIR}" \
--config "${GENIMAGE_CFG}"
exit $?

View File

@@ -0,0 +1,97 @@
Intro
=====
This directory contains a Buildroot configuration for building a
LicheePi 4A image. For more information, see the board wiki page [1].
How to build it
===============
Configure Buildroot
-------------------
make sipeed_licheepi_4a_defconfig
Build the boot and rootfs
-------------------------
Note: you will need to have access to the network, since Buildroot
will download the packages' sources.
You may now build your rootfs with:
make
(This may take a while, consider getting yourself a coffee ;-) )
Result of the build
-------------------
After building, you should obtain this tree:
output/images/
+-- boot.ext4
+-- rootfs.ext2
+-- rootfs.ext4 -> rootfs.ext2
+-- rootfs.tar
+-- u-boot.bin
+-- u-boot-with-spl.bin
+-- fw_dynamic.bin
`-- Image
How to flash the board
======================
Once the build process is finished you will have to flash the
correspoding images to the respective partitions in the eMMC.
LicheePi 4A uses fastboot to flash the images.
The board needs to be booted in "Burning Mode". For that, check first
the boot switches (SW1, SW2) on the base board are set up on the
"eMMC" mode (this is the factory default). Then, boot the board while
pressing the "BOOT" button. See [2].
Note that the board can be booted by either:
- attaching the USB-C power cable, or
- pressing the "RESET" button (near the USB-C power connector) if the
power cable is already connected to the host computer.
The board should be enumerated from the host computer. This can be
confirmed with "lsusb". The board should be listed as:
ID 2345:7654 T-HEAD USB download gadget
The device should also be listed by the "fastboot devices" command:
???????????? Android Fastboot
The board can be flashed with the commands:
fastboot flash ram output/images/u-boot-with-spl.bin
fastboot reboot
fastboot flash uboot output/images/u-boot-with-spl.bin
fastboot flash boot output/images/boot.ext4
fastboot flash root output/images/rootfs.ext2
Boot the board
==============
Connect the console on the System Serial Port on pins
U0-RX, U0-TX and GND. For more details, see [3].
When resetting or powering up the board on the USB-C port, the U-Boot
prompt and Linux console will appear on this System Serial Port.
References
==========
[1] https://wiki.sipeed.com/hardware/en/lichee/th1520/lpi4a/1_intro.html
[2] https://wiki.sipeed.com/hardware/en/lichee/th1520/lpi4a/4_burn_image.html#How-to-enter-burning-mode
[3] https://wiki.sipeed.com/hardware/en/lichee/th1520/lpi4a/6_peripheral.html#System-Serial-Port