User:Minou/RiscV/BeagleV-Ahead
From Gentoo Wiki
< User:Minou | RiscV
Jump to:navigation
Jump to:search
This document describes how to install Gentoo Linux on the Beaglev-ahead.
Setup directories for Gentoo build
I create the gentoo rootfs on /usr/src/riscv/beaglev-ahead/
root #
mkdir /usr/src/riscv/beaglev-ahead
root #
cd /usr/src/riscv/beaglev-ahead
root #
mkdir deploy
root #
mkdir rootfs-beaglev-ahead
Cross Toolchain
Install the crossdev utils
root #
emerge --ask sys-devel/crossdev
Generate cross toolchains, including gcc, glibc, binutils, gdb
root #
crossdev --target riscv64-unknown-linux-gnu
u-boot
Build the u-boot image
root #
cd /usr/src/riscv/beaglev-ahead
root #
git clone https://openbeagle.org/beaglev-ahead/beaglev-ahead-u-boot.git
root #
cd beaglev-ahead-u-boot
root #
make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu- distclean
root #
make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu- light_beagle_defconfig
root #
make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu- all
root #
cp -v u-boot-with-spl.bin ../deploy/
root #
cd ..
OpenSBI
root #
cd /usr/src/riscv/beaglev-ahead
root #
git clone https://openbeagle.org/beaglev-ahead/beaglev-ahead-opensbi.git
root #
cd beaglev-ahead-opensbi
root #
make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu-PLATFORM=generic
root #
cp -v ./build/platform/generic/firmware/fw_dynamic.bin ../deploy/
root #
cd ..
Create Gentoo rootfs
To Do
Compress Gentoo rootfs
To Do
Partition and format micro SD
To Do
Decompress Gentoo roofs on micro SD rootfs partition
To Do
Flash the Firmware
Prepare tools
To flash firmware, we need fastboot, so please install
root #
emerge --ask dev-util/android-tools
Flash the latest image on eMMC
To Do