Dear Gentoo folks :

    It has taken a lot of effort but I managed to get my SiFive RISC-V
P550 board to boot and run entirely from an external attached SATA disk.
I am fairly sure that there is still stuff left behind on some flash
memory chip somewhere and that is the OpenSBI and U-Boot stuff.

    I created a new GPT partition table on the boards NVME chip. It is
something called /dev/mmcblk0 and the partition data looks like this :

p550# fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.40.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): p

Disk /dev/mmcblk0: 116.48 GiB, 125069950976 bytes, 244277248 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 175E3A93-158D-401E-BEC5-0041355DA342

Device            Start       End   Sectors  Size Type
/dev/mmcblk0p1     2048   1050623   1048576  512M EFI System
/dev/mmcblk0p2  1050624  17827839  16777216    8G Linux swap
/dev/mmcblk0p3 17827840 244275199 226447360  108G Linux filesystem

Command (m for help):


There is also some UUID data that I am sure to need later :

p550# blkid | grep 'mmc'
/dev/mmcblk0p3: UUID="6383942e-8974-4671-88f6-5dd37c045417" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="0f600fa5-8141-4ed4-879b-a939ace93d5b" /dev/mmcblk0p1: LABEL_FATBOOT="EFI" LABEL="EFI" UUID="0AC0-79CF" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="931fec17-08d4-4220-97f9-be7b5fb014c0" /dev/mmcblk0p2: UUID="ee902d2d-2420-419e-bb06-b43be416e780" TYPE="swap" PARTUUID="8a5d1595-2a78-471f-a2b8-f89d05c1c108"
p550#

    I extracted the stage3 file into the p3 partition there.

I am trying to follow the instructions for the AMD64 stuff in the handbook. I do not think there are any docs for RISC-V. Really I just needed to get the magic mounts done for /proc and /dev etc. Then I was
able to chroot into the stage3 and begin a few trivial steps.

    I am not going with anything complicated at all and the "profile" is
whatever the default thing is. No desktop stuff at all. I was able to
setup a trivial make.conf file with nothing special in it :

p550# cat  /mnt/gentoo/etc/portage/make.conf
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
MAKEOPTS="-j4 -l5"
COMMON_FLAGS="-O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"

# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult https://wiki.gentoo.org/wiki/Changing_the_CHOST_variable before changing.
CHOST="riscv64-unknown-linux-gnu"

# NOTE: This stage was built with the bindist USE flag enabled

# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C.utf8

GENTOO_MIRRORS="https://mirror.csclub.uwaterloo.ca/gentoo-distfiles/";
p550#

That works and so does the web-sync stuff and then I did the emerge of whatever needs to be updated. Also I did emerge a trivial editor ed and
also vim. Here are the interesting buts from the emerge.log :

p550# grep 'completed emerge' /mnt/gentoo/var/log/emerge.log
1753148811: ::: completed emerge (1 of 3) net-analyzer/netselect-0.4-r2 to / 1753148889: ::: completed emerge (2 of 3) dev-util/dialog-1.3.20250116-r1 to / 1753148918: ::: completed emerge (3 of 3) app-portage/mirrorselect-2.5.0 to / 1753148982: ::: completed emerge (1 of 1) app-portage/mirrorselect-2.5.0 to /
1753149691:  ::: completed emerge (1 of 2) sys-apps/ed-1.21.1 to /
1753149787:  ::: completed emerge (2 of 2) sys-process/time-1.9-r1 to /
1753149929: ::: completed emerge (1 of 5) app-eselect/eselect-vi-20221122 to / 1753150056: ::: completed emerge (2 of 5) dev-libs/libsodium-1.0.20_p20250606 to / 1753150345: ::: completed emerge (3 of 5) app-editors/vim-core-9.1.1500 to /
1753150619:  ::: completed emerge (4 of 5) app-editors/vim-9.1.1500 to /
1753150643:  ::: completed emerge (5 of 5) app-vim/gentoo-syntax-16 to /
1753151247:  ::: completed emerge (1 of 10) app-shells/bash-5.3-r2 to /
1753151443:  ::: completed emerge (2 of 10) dev-libs/libxml2-2.13.8-r2 to /
1753152456:  ::: completed emerge (3 of 10) sys-devel/gettext-0.23.2 to /
1753152673:  ::: completed emerge (4 of 10) dev-libs/libgcrypt-1.11.1 to /
1753152803:  ::: completed emerge (5 of 10) sys-libs/pam-1.7.1 to /
1753152871:  ::: completed emerge (6 of 10) app-crypt/libb2-0.98.1-r3 to /
1753152909: ::: completed emerge (7 of 10) net-misc/iputils-20250605-r1 to /
1753153184:  ::: completed emerge (8 of 10) sys-apps/texinfo-7.2-r3 to /
1753153519:  ::: completed emerge (9 of 10) app-text/po4a-0.74-r1 to /
1753153679: ::: completed emerge (10 of 10) app-portage/portage-utils-0.97 to /
p550#

Now I am looking at the page in the handbook where it says we do then
"Installing a distribution kernel" and I want to run :

# emerge --ask sys-kernel/gentoo-kernel

That fails with a baffling message :

chroot# /usr/bin/time -p /usr/bin/nice -n +19 emerge --ask --verbose sys-kernel/gentoo-kernel
--- Invalid atom in /etc/portage/package.use/zz-autounmask: dracut

 * IMPORTANT: 3 config files in '/etc/portage' need updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 5.06 s (backtrack: 0/20).

[ebuild N ] app-text/asciidoc-10.2.1::gentoo USE="-test" PYTHON_SINGLE_TARGET="python3_13 (-pypy3_11) -python3_11 -python3_12" 1251 KiB
[ebuild  N     ] app-eselect/eselect-rust-20210703::gentoo  5 KiB
[ebuild  N     ] sys-apps/lsb-release-3.3::gentoo  16 KiB
[ebuild N ] sys-apps/dtc-1.7.2-r2::gentoo USE="-python -static-libs -test -yaml" PYTHON_SINGLE_TARGET="python3_13 -python3_11 -python3_12" 166 KiB [ebuild N ] dev-libs/elfutils-0.193::gentoo USE="bzip2 lzma nls utils -debuginfod (-stacktrace) -static-libs -test (-valgrind) -verify-sig -zstd" 11695 KiB [ebuild N ] dev-lang/rust-bin-1.88.0:1.88.0::gentoo USE="(-big-endian) -clippy (-doc) (-prefix) -rust-analyzer -rust-src -rustfmt -verify-sig" LLVM_SLOT="(20)" 244290 KiB
[ebuild  N     ] virtual/libelf-3-r1:0/1::gentoo  0 KiB
[ebuild  N     ] app-arch/cpio-2.15::gentoo  USE="nls" 1613 KiB
[ebuild N ] app-alternatives/cpio-0::gentoo USE="gnu -libarchive (-split-usr)" 0 KiB [ebuild N ] sys-kernel/dracut-107::gentoo USE="dracut-cpio -debug (-selinux) -test" 524 KiB [ebuild N ] sys-kernel/installkernel-60::gentoo USE="dracut (-efistub) -grub (-refind) -systemd -systemd-boot (-ugrd) -uki -ukify" 30 KiB [ebuild N ] sys-kernel/gentoo-kernel-6.15.7:6.15.7::gentoo USE="initramfs (savedconfig) strip -debug -experimental (-generic-uki) -hardened -modules-compress -modules-sign -secureboot -test -verify-sig" 148586 KiB
[ebuild  N     ] virtual/dist-kernel-6.15.7:0/6.15.7::gentoo  0 KiB

Total: 13 packages (13 new), Size of downloads: 408171 KiB

The following USE changes are necessary to proceed:
 (see "package.use" in the portage(5) man page for more details)
# required by sys-kernel/gentoo-kernel-6.15.7::gentoo[initramfs]
# required by virtual/dist-kernel-6.15.7::gentoo
>=sys-kernel/installkernel-60 dracut

Would you like to add these changes to your config files? [Yes/No] Yes

Autounmask changes successfully written.

 * IMPORTANT: 4 config files in '/etc/portage' need updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.
real 13.43
user 7.50
sys 0.30
chroot#

I have no idea what is needed in that file :

chroot# cat  /etc/portage/package.use/zz-autounmask
# package.use
dracut
chroot#

Also "Invalid atom" is a total mystery.

Is there a simple way to proceed here?

--
--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken


Reply via email to