Initramfs
Initially I was hoping that it would not be needed, but since the SoC has a remote processor and the defconfig for it enables it, I guess it is simpler to use an initramfs.
Remoteproc firmware
As seen here the remoteproc needs a firmware bit and if you happen to forget about it you'd be welcomed by:
[ 4.205609] remoteproc remoteproc0: rcpu_rproc is available
[ 4.211421] remoteproc remoteproc0: Direct firmware load for esos.elf failed with error -2
[ 4.214379] riscv-pmu-sbi: SBI PMU extension is available
[ 4.219790] remoteproc remoteproc0: powering up rcpu_rproc
[ 4.225306] riscv-pmu-sbi: 16 firmware and 18 hardware counters
[ 4.230776] remoteproc remoteproc0: Direct firmware load for esos.elf failed with error -2
[ 4.245106] remoteproc remoteproc0: request_firmware failed: -2
[ 4.246235] es8326 2-0019: assuming static mclk
[ 4.256170] enter spacemit_snd_sspa_pdev_probe
[ 4.301833] usb 2-1: new high-speed USB device number 2 using xhci-hcd
If you like to use dracut all you need is to add to your /etc/dracut.conf.d/firmware.conf
is:
install_items+=" /lib/firmware/esos.elf "
If you use Genkernel, set in /etc/genkernel.conf
:
# Add firmware(s) to initramfs
FIRMWARE="yes"
# Specify directory to pull from
FIRMWARE_DIR="/lib/firmware"
# Specify a comma-separated list of firmware files or directories to include,
# relative to FIRMWARE_DIR. If empty or unset, the full contents of
# FIRMWARE_DIR will be included (if FIRMWARE option above is set to YES).
FIRMWARE_FILES="esos.elf"
as explained here.
Coming next
Now the remaining bits I'd like to have done are having a nicer u-boot configuration and hopefully wrap everything up so we can have a Gentoo image that can be simply flashed to the SD/eMMC/NVMe.
Top comments (0)