Files
lk/scripts/do-bananapi-f3
Travis Geiselbrecht d1f4b4a546 [target][banana pi f3] quick n dirty port to the bananapi f3 board
A decent 8 core riscv64 board with dual ethernet and 2 or 4GB ram.

Fairly easy to bring up on, though not a lot of docs at the moment.
2024-06-19 16:43:16 -07:00

34 lines
927 B
Bash
Executable File

#!/usr/bin/env bash
# Quick script to build and copy the kernel to the tftp server.
# Modify the TFTPHOST variable to match your setup.
# Alternatively change the scp to a cp to copy the kernel to the SD card.
set -e
export PROJECT=bananapi-f3-test
BUILDDIR="build-${PROJECT}"
RAMDISK="${BUILDDIR}/ramdisk.img"
OUTPUT="${BUILDDIR}/lk.img"
TFTPHOST=192.168.0.4
set -x
./scripts/make-parallel
# create a small ramdisk to satisfy the mkimage tool
truncate -s 4 ${BUILDDIR}/ramdisk.img
# build a uboot uimage containing the lk binary, the ramdisk and the device tree
mkimage -A riscv -O linux -T multi -C none -a 0x10200000 -e 0x10200000 -n LK -d ${BUILDDIR}/lk.bin:${RAMDISK}:target/bananapi-f3/bananapi-f3.dtb ${OUTPUT}
# copy to a local tftp server, replace with cp if a using a local directory
scp ${BUILDDIR}/lk.img ${TFTPHOST}:/tftpboot
set +x
echo boot with
echo dhcp\; tftpboot ${TFTPHOST}:lk.img\; bootm
exit 1