§2023-10-06

After you did what is said in 30-odroid-c2.md,

  1. nano /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
`
- make sure you could `ping google.com`
- `/etc/portgage/make.conf` add `MAKEOPTS="-j8"`
2) `nano /etc/locale.gen` and `locale-gen

3) setup gentoo.conf
- `mair /etc/portage/respos.conf`
- `nano /etc/portage/respo.conf/gentoo.conf`

[DEFAULT] main-repo = gentoo

[gentoo] location = /var/db/repos/gentoo sync-type = rsync sync-uri = rsync://rsync.gentoo.org/gentoo-portage auto-sync = yes sync-rsync-verify-jobs = 1 sync-rsync-verify-metamanifest = yes sync-rsync-verify-max-age = 24 sync-openpgp-key-path = /usr/share/openpgp-keys/gentoo-release.asc sync-openpgp-key-refresh-retry-count = 40 sync-openpgp-key-refresh-retry-overall-timeout = 1200 sync-openpgp-key-refresh-retry-delay-exp-base = 2 sync-openpgp-key-refresh-retry-delay-max = 60 sync-openpgp-key-refresh-retry-delay-mult = 4 sync-webrsync-verify-signature = yes sync-git-verify-commit-signature = yes

- `emerge-webrsync` for the first time
  - error msgs about /var/db/repos/gentoo got the first time, it will bw created

4) `emerge --ask --update --deep --newuse @world` && `emerge --depclean"`

5) mount /boot

(chroot) orangepi5plus / # mount /dev/nvme0n1p4 /boot

  1. nano /etc/fstab

  2. emerge sys-kernel/gentoo-kernel-bin

...
dracut: Executing: /usr/bin/dracut --force --kernel-image /usr/src/linux-6.1.55-gentoo-dist/arch/arm64/boot/Image.gz /usr/src/linux-6.1.55-gentoo-dist/arch/arm64/boot/initrd 6.1.55-gentoo-dist
dracut: dracut module 'dash' will not be installed, because command 'dash' could not be found!
dracut: dracut module 'mksh' will not be installed, because command 'mksh' could not be found!
dracut: dracut module 'systemd-integritysetup' will not be installed, because command '/lib/systemd/systemd-integritysetup' could not be found!
dracut: dracut module 'systemd-integritysetup' will not be installed, because command '/lib/systemd/system-generators/systemd-integritysetup-generator' could not be found!
dracut: dracut module 'systemd-pcrphase' will not be installed, because command '/lib/systemd/systemd-pcrphase' could not be found!
dracut: dracut module 'systemd-veritysetup' will not be installed, because command '/lib/systemd/systemd-veritysetup' could not be found!
dracut: dracut module 'systemd-veritysetup' will not be installed, because command '/lib/systemd/system-generators/systemd-veritysetup-generator' could not be found!
dracut: dracut module 'modsign' will not be installed, because command 'keyctl' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
dracut: dracut module 'connman' will not be installed, because command 'connmand' could not be found!
dracut: dracut module 'connman' will not be installed, because command 'connmanctl' could not be found!
dracut: dracut module 'connman' will not be installed, because command 'connmand-wait-online' could not be found!
dracut: dracut module 'network-legacy' will not be installed, because command 'dhclient' could not be found!
dracut: dracut module 'network-wicked' will not be installed, because command 'wicked' could not be found!
dracut: 62bluetooth: Could not find any command of '/usr/lib/bluetooth/bluetoothd /usr/libexec/bluetooth/bluetoothd'!
dracut: dracut module 'lvmmerge' will not be installed, because command 'lvm' could not be found!
dracut: dracut module 'lvmthinpool-monitor' will not be installed, because command 'lvm' could not be found!
dracut: dracut module 'btrfs' will not be installed, because command 'btrfs' could not be found!
dracut: 90crypt: Could not find any command of '/lib/systemd/systemd-cryptsetup cryptsetup'!
dracut: dracut module 'dm' will not be installed, because command 'dmsetup' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command 'dmraid' could not be found!
dracut: dracut module 'dmsquash-live-ntfs' will not be installed, because command 'ntfs-3g' could not be found!
dracut: dracut module 'lvm' will not be installed, because command 'lvm' could not be found!
dracut: dracut module 'mdraid' will not be installed, because command 'mdadm' could not be found!
dracut: dracut module 'multipath' will not be installed, because command 'multipath' could not be found!
dracut: dracut module 'pcsc' will not be installed, because command 'pcscd' could not be found!
dracut: dracut module 'tpm2-tss' will not be installed, because command 'tpm2' could not be found!
dracut: dracut module 'cifs' will not be installed, because command 'mount.cifs' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'dcbtool' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fipvlan' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'lldpad' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fcoemon' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fcoeadm' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'dcbtool' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'fipvlan' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'lldpad' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!
dracut: dracut module 'nbd' will not be installed, because command 'nbd-client' could not be found!
dracut: 95nfs: Could not find any command of 'rpcbind portmap'!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut: dracut module 'biosdevname' will not be installed, because command 'biosdevname' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'memstrack' could not be found!
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack and procps-ng
dracut: dracut module 'squash' will not be installed, because command 'mksquashfs' could not be found!
dracut: dracut module 'squash' will not be installed, because command 'unsquashfs' could not be found!
dracut: *** Including module: systemd ***
dracut: *** Including module: systemd-initrd ***
dracut: *** Including module: i18n ***
dracut: *** Including module: kernel-modules ***
dracut: *** Including module: kernel-modules-extra ***
dracut: *** Including module: nvdimm ***
dracut: *** Including module: qemu ***
dracut: *** Including module: qemu-net ***
dracut: *** Including module: lunmask ***
dracut: *** Including module: resume ***
dracut: *** Including module: rootfs-block ***
dracut: *** Including module: terminfo ***
dracut: *** Including module: udev-rules ***
dracut: Skipping udev rule: 40-redhat.rules
dracut: Skipping udev rule: 50-firmware.rules
dracut: Skipping udev rule: 50-udev.rules
dracut: Skipping udev rule: 91-permissions.rules
dracut: Skipping udev rule: 80-drivers-modprobe.rules
dracut: *** Including module: virtiofs ***
dracut: *** Including module: dracut-systemd ***
dracut: *** Including module: usrmount ***
dracut: *** Including module: base ***
dracut: *** Including module: fs-lib ***
dracut: *** Including module: shutdown ***
dracut: *** Including modules done ***
dracut: *** Installing kernel module dependencies ***
dracut: *** Installing kernel module dependencies done ***
dracut: *** Resolving executable dependencies ***
dracut: *** Resolving executable dependencies done ***
dracut: *** Hardlinking files ***
dracut: Mode:                     real
dracut: Method:                   sha256
dracut: Files:                    2338
dracut: Linked:                   4 files
dracut: Compared:                 0 xattrs
dracut: Compared:                 493 files
dracut: Saved:                    6.9 KiB
dracut: Duration:                 0.038433 seconds
dracut: *** Hardlinking files done ***
dracut: *** Generating early-microcode cpio image ***
dracut: *** Store current command line parameters ***
dracut: *** Stripping files ***
dracut: *** Stripping files done ***
dracut: *** Creating image file '/usr/src/linux-6.1.55-gentoo-dist/arch/arm64/boot/initrd' ***
dracut: Using auto-determined compression method 'gzip'
dracut: *** Creating initramfs image file '/usr/src/linux-6.1.55-gentoo-dist/arch/arm64/boot/initrd' done ***                                                                  [ ok ]
 * Installing the kernel via installkernel ...                                                                                                                                 [ ok ]

>>> Recording sys-kernel/gentoo-kernel-bin in "world" favorites file...

>>> Completed (5 of 6) sys-kernel/gentoo-kernel-bin-6.1.55::gentoo

>>> Emerging (6 of 6) virtual/dist-kernel-6.1.55::gentoo
>>> Unpacking source...
>>> Source unpacked in /var/tmp/portage/virtual/dist-kernel-6.1.55/work
>>> Preparing source in /var/tmp/portage/virtual/dist-kernel-6.1.55/work ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/virtual/dist-kernel-6.1.55/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/virtual/dist-kernel-6.1.55/work ...
>>> Source compiled.
>>> Test phase [not enabled]: virtual/dist-kernel-6.1.55

>>> Install virtual/dist-kernel-6.1.55 into /var/tmp/portage/virtual/dist-kernel-6.1.55/image
>>> Completed installing virtual/dist-kernel-6.1.55 into /var/tmp/portage/virtual/dist-kernel-6.1.55/image

 * Final size of build directory: 4 KiB
 * Final size of installed tree:  4 KiB


>>> Installing (6 of 6) virtual/dist-kernel-6.1.55::gentoo

>>> Completed (6 of 6) virtual/dist-kernel-6.1.55::gentoo

 * Messages for package sys-kernel/gentoo-kernel-bin-6.1.55:

 * sys-kernel/linux-firmware not found installed on your system.   <---- 
 * This package provides various firmware files that may be needed
 * for your hardware to work.  If in doubt, it is recommended
 * to pause or abort the build process and install it before
 * resuming.
 * 
 * If you decide to install linux-firmware later, you can rebuild
 * the initramfs via issuing a command equivalent to:
 * 
 *     emerge --config sys-kernel/gentoo-kernel-bin:6.1.55         <---- 

 * Messages for package app-text/asciidoc-10.2.0:

 * If you are going to use a2x, please also look at a2x(1) under
 * REQUISITES for a list of runtime dependencies.
 * 
 * (Note: Above message is only printed the first time package is
 * installed. Please look at /usr/share/doc/asciidoc-10.2.0/README.gentoo*
 * for future reference)
 * Install additional packages for optional runtime features:
 *   media-sound/lilypond and virtual/imagemagick-tools for music filter support
 *   dev-util/source-highlight and dev-python/pygments and app-text/highlight for source filter support
 *   dev-texlive/texlive-latex and app-text/dvipng for latex filter support
 *   dev-texlive/texlive-latex and app-text/dvisvgm for latex filter support
 *   media-gfx/graphviz for graphviz filter support

 * Messages for package app-alternatives/cpio-0:

 * This package will overwrite one or more files that may belong to other
 * packages (see list below). You can use a command such as `portageq
 * owners / <filename>` to identify the installed package that owns a
 * file. If portageq reports that only one package owns a file then do
 * NOT file a bug report. A bug report is only useful if it identifies at
 * least two or more packages that are known to install the same file(s).
 * If a collision occurs and you can not explain where the file came from
 * then you should simply ignore the collision since there is not enough
 * information to determine if a real problem exists. Please do NOT file
 * a bug report at https://bugs.gentoo.org/ unless you report exactly
 * which two packages install the same file(s). See
 * https://wiki.gentoo.org/wiki/Knowledge_Base:Blockers for tips on how
 * to solve the problem. And once again, please do NOT file a bug report
 * unless you have completely understood the above message.
 * 
 * Detected file collision(s):
 * 
 * 	/bin/cpio
 * 
 * Searching all installed packages for file collisions...
 * 
 * Press Ctrl-C to Stop
 * 
 * None of the installed packages claim the file(s).
 * 
 * Package 'app-alternatives/cpio-0' merged despite file collisions. If
 * necessary, refer to your elog messages for the whole content of the
 * above message.

 * Messages for package sys-kernel/dracut-059-r3:

 * Unable to find kernel sources at /usr/src/linux
 * Unable to calculate Linux Kernel version for build, attempting to use running version
 * 
 * If the following test report contains a missing kernel
 * configuration option, you should reconfigure and rebuild your
 * kernel before booting image generated with this Dracut version.
 * 
 * Install additional packages for optional runtime features:
 *   net-misc/networkmanager for Networking support
 *   sys-fs/btrfs-progs for Scan for Btrfs on block devices
 *   net-fs/cifs-utils for Support CIFS
 *   sys-fs/cryptsetup[-static-libs] for Decrypt devices encrypted with cryptsetup/LUKS
 *   app-shells/dash for Allows use of dash instead of default bash (on your own risk)
 *   sys-apps/busybox for Allows use of busybox instead of default bash (on your own risk)
 *   sys-block/open-iscsi for Support iSCSI
 *   sys-fs/lvm2[lvm] for Support Logical Volume Manager
 *   sys-fs/mdadm for Support MD devices, also known as software RAID devices
 *   sys-fs/dmraid for Support MD devices, also known as software RAID devices
 *   sys-fs/multipath-tools for Support Device Mapper multipathing
 *   >=sys-boot/plymouth-0.8.5-r5 for Plymouth boot splash
 *   sys-block/nbd for Support network block devices
 *   net-fs/nfs-utils for Support NFS
 *   net-nds/rpcbind for Support NFS
 *   app-admin/rsyslog for Enable logging with rsyslog
 *   sys-fs/squashfs-tools for Support Squashfs
 *   app-crypt/tpm2-tools for Support TPM 2.0 TSS
 *   net-wireless/bluez for Support Bluetooth (experimental)
 *   sys-apps/biosdevname for Support BIOS-given device names
 *   sys-apps/nvme-cli for Support network NVMe
 *   sys-apps/rng-tools for Enable rngd service to help generating entropy early during boot

 * Regenerating GNU info directory index...
 * Processed 107 info files.

(chroot) orangepi5plus / # ls -l /boot/
total 47344
-rw-r--r-- 1 root root   281506 Oct  6 00:42 config-6.1.55-gentoo-dist
drwxr-xr-x 3 root root     4096 Oct  6 00:41 dtbs
-rw-r--r-- 1 root root 28912893 Oct  6 00:42 initramfs-6.1.55-gentoo-dist.img
drwx------ 2 root root    16384 Oct  5 22:04 lost+found
-rw-r--r-- 1 root root  6986092 Oct  6 00:42 System.map-6.1.55-gentoo-dist
-rw-r--r-- 1 root root 12272594 Oct  6 00:42 vmlinuz-6.1.55-gentoo-dist
  1. sys-kernel/linux-firmware
(chroot) orangepi5plus / # emerge sys-kernel/linux-firmware
Calculating dependencies... done!
Dependency resolution took 0.78 s.


!!! All ebuilds that could satisfy "sys-kernel/linux-firmware" have been masked.
!!! One of the following masked packages is required to complete your request:
- sys-kernel/linux-firmware-99999999::gentoo (masked by: || ( ) linux-fw-redistributable license(s), missing keyword)
A copy of the 'linux-fw-redistributable' license is located at '/var/db/repos/gentoo/licenses/linux-fw-redistributable'.

- sys-kernel/linux-firmware-20230919::gentoo (masked by: || ( ) linux-fw-redistributable license(s))
- sys-kernel/linux-firmware-20230804::gentoo (masked by: || ( ) linux-fw-redistributable license(s))
- sys-kernel/linux-firmware-20230625_p20230724::gentoo (masked by: || ( ) linux-fw-redistributable license(s))

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

(chroot) orangepi5plus / # emerge sys-kernel/linux-firmware --autounmask-write --autounmask 
Calculating dependencies... done!
Dependency resolution took 1.14 s.

[ebuild  N     ] sys-kernel/linux-firmware-20230919  USE="redistributable -compress-xz -compress-zstd (-initramfs) -savedconfig (-unknown-license)" 

The following license changes are necessary to proceed:
 (see "package.license" in the portage(5) man page for more details)
# required by sys-kernel/linux-firmware (argument)
=sys-kernel/linux-firmware-20230919 linux-fw-redistributable

Autounmask changes successfully written.

 * IMPORTANT: config file '/etc/portage/package.license' needs updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.

(chroot) orangepi5plus / # dispatch-conf
-- /tmp/tmp9wvfwtdj/0  2023-10-06 00:56:26.694890108 -0000
+++ /etc/portage/._cfg0000_package.license      2023-10-06 00:55:21.028984482 -0000
@@ -1 +1,2 @@
-/dev/null
+# required by sys-kernel/linux-firmware (argument)
+=sys-kernel/linux-firmware-20230919 linux-fw-redistributable

>> (1 of 1) -- /etc/portage/package.license
>> q quit, h help, n next, e edit-new, z zap-new, u use-new
   m merge, t toggle-merge, l look-merge: 

(chroot) orangepi5plus / # cat /etc/portage/package.license
# required by sys-kernel/linux-firmware (argument)
=sys-kernel/linux-firmware-20230919 linux-fw-redistributable

(chroot) orangepi5plus / # emerge sys-kernel/linux-firmware
....
* Messages for package sys-kernel/linux-firmware-20230919:

 * Your configuration for sys-kernel/linux-firmware-20230919 has been saved in 
 * "/etc/portage/savedconfig/sys-kernel/linux-firmware-20230919" for your editing pleasure.
 * You can edit these files by hand and remerge this package with
 * USE=savedconfig to customise the configuration.
 * You can rename this file/directory to one of the following for
 * its configuration to apply to multiple versions:
 * ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/
 * [${CTARGET}|${CHOST}|""]/${CATEGORY}/[${PF}|${P}|${PN}]
 * If you are only interested in particular firmware files, edit the saved
 * configfile and remove those that you do not want.

 * GNU info directory index is up-to-date.
  1. again emerge --config sys-kernel/gentoo-kernel-bin:6.1.55
(chroot) orangepi5plus / # emerge --config sys-kernel/gentoo-kernel-bin:6.1.55 


Configuring pkg...

 * Your boot partition was detected as being mounted at /boot.
 * Files will be installed there for gentoo-kernel-bin to function correctly.
 * Building initramfs via dracut ...
dracut: Executing: /usr/bin/dracut --force --kernel-image /usr/src/linux-6.1.55-gentoo-dist/arch/arm64/boot/Image.gz /usr/src/linux-6.1.55-gentoo-dist/arch/arm64/boot/initrd 6.1.55-gentoo-dist
dracut: dracut module 'dash' will not be installed, because command 'dash' could not be found!
dracut: dracut module 'mksh' will not be installed, because command 'mksh' could not be found!
dracut: dracut module 'systemd-integritysetup' will not be installed, because command '/lib/systemd/systemd-integritysetup' could not be found!
dracut: dracut module 'systemd-integritysetup' will not be installed, because command '/lib/systemd/system-generators/systemd-integritysetup-generator' could not be found!
dracut: dracut module 'systemd-pcrphase' will not be installed, because command '/lib/systemd/systemd-pcrphase' could not be found!
dracut: dracut module 'systemd-veritysetup' will not be installed, because command '/lib/systemd/systemd-veritysetup' could not be found!
dracut: dracut module 'systemd-veritysetup' will not be installed, because command '/lib/systemd/system-generators/systemd-veritysetup-generator' could not be found!
dracut: dracut module 'modsign' will not be installed, because command 'keyctl' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
dracut: dracut module 'connman' will not be installed, because command 'connmand' could not be found!
dracut: dracut module 'connman' will not be installed, because command 'connmanctl' could not be found!
dracut: dracut module 'connman' will not be installed, because command 'connmand-wait-online' could not be found!
dracut: dracut module 'network-legacy' will not be installed, because command 'dhclient' could not be found!
dracut: dracut module 'network-wicked' will not be installed, because command 'wicked' could not be found!
dracut: 62bluetooth: Could not find any command of '/usr/lib/bluetooth/bluetoothd /usr/libexec/bluetooth/bluetoothd'!
dracut: dracut module 'lvmmerge' will not be installed, because command 'lvm' could not be found!
dracut: dracut module 'lvmthinpool-monitor' will not be installed, because command 'lvm' could not be found!
dracut: dracut module 'btrfs' will not be installed, because command 'btrfs' could not be found!
dracut: 90crypt: Could not find any command of '/lib/systemd/systemd-cryptsetup cryptsetup'!
dracut: dracut module 'dm' will not be installed, because command 'dmsetup' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command 'dmraid' could not be found!
dracut: dracut module 'dmsquash-live-ntfs' will not be installed, because command 'ntfs-3g' could not be found!
dracut: dracut module 'lvm' will not be installed, because command 'lvm' could not be found!
dracut: dracut module 'mdraid' will not be installed, because command 'mdadm' could not be found!
dracut: dracut module 'multipath' will not be installed, because command 'multipath' could not be found!
dracut: dracut module 'pcsc' will not be installed, because command 'pcscd' could not be found!
dracut: dracut module 'tpm2-tss' will not be installed, because command 'tpm2' could not be found!
dracut: dracut module 'cifs' will not be installed, because command 'mount.cifs' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'dcbtool' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fipvlan' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'lldpad' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fcoemon' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fcoeadm' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'dcbtool' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'fipvlan' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'lldpad' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!
dracut: dracut module 'nbd' will not be installed, because command 'nbd-client' could not be found!
dracut: 95nfs: Could not find any command of 'rpcbind portmap'!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut: dracut module 'biosdevname' will not be installed, because command 'biosdevname' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'memstrack' could not be found!
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack and procps-ng
dracut: dracut module 'squash' will not be installed, because command 'mksquashfs' could not be found!
dracut: dracut module 'squash' will not be installed, because command 'unsquashfs' could not be found!
dracut: *** Including module: systemd ***
dracut: *** Including module: systemd-initrd ***
dracut: *** Including module: i18n ***
dracut: *** Including module: kernel-modules ***
dracut: *** Including module: kernel-modules-extra ***
dracut: *** Including module: nvdimm ***
dracut: *** Including module: qemu ***
dracut: *** Including module: qemu-net ***
dracut: *** Including module: lunmask ***
dracut: *** Including module: resume ***
dracut: *** Including module: rootfs-block ***
dracut: *** Including module: terminfo ***
dracut: *** Including module: udev-rules ***
dracut: Skipping udev rule: 40-redhat.rules
dracut: Skipping udev rule: 50-firmware.rules
dracut: Skipping udev rule: 50-udev.rules
dracut: Skipping udev rule: 91-permissions.rules
dracut: Skipping udev rule: 80-drivers-modprobe.rules
dracut: *** Including module: virtiofs ***
dracut: *** Including module: dracut-systemd ***
dracut: *** Including module: usrmount ***
dracut: *** Including module: base ***
dracut: *** Including module: fs-lib ***
dracut: *** Including module: shutdown ***
dracut: *** Including modules done ***
dracut: *** Installing kernel module dependencies ***
dracut: *** Installing kernel module dependencies done ***
dracut: *** Resolving executable dependencies ***
dracut: *** Resolving executable dependencies done ***
dracut: *** Hardlinking files ***
dracut: Mode:                     real
dracut: Method:                   sha256
dracut: Files:                    2387
dracut: Linked:                   4 files
dracut: Compared:                 0 xattrs
dracut: Compared:                 504 files
dracut: Saved:                    6.9 KiB
dracut: Duration:                 0.041073 seconds
dracut: *** Hardlinking files done ***
dracut: *** Store current command line parameters ***
dracut: *** Stripping files ***
dracut: *** Stripping files done ***
dracut: *** Creating image file '/usr/src/linux-6.1.55-gentoo-dist/arch/arm64/boot/initrd' ***
dracut: Using auto-determined compression method 'gzip'
dracut: *** Creating initramfs image file '/usr/src/linux-6.1.55-gentoo-dist/arch/arm64/boot/initrd' done ***                                                                  [ ok ]
 * Installing the kernel via installkernel ...       

(chroot) orangepi5plus / # ls -l /boot
total 98696
-rw-r--r-- 1 root root   281506 Oct  6 01:09 config-6.1.55-gentoo-dist
-rw-r--r-- 1 root root   281506 Oct  6 00:42 config-6.1.55-gentoo-dist.old
drwxr-xr-x 3 root root     4096 Oct  6 00:41 dtbs
-rw-r--r-- 1 root root 33035121 Oct  6 01:09 initramfs-6.1.55-gentoo-dist.img
-rw-r--r-- 1 root root 28912893 Oct  6 00:42 initramfs-6.1.55-gentoo-dist.img.old
drwx------ 2 root root    16384 Oct  5 22:04 lost+found
-rw-r--r-- 1 root root  6986092 Oct  6 01:09 System.map-6.1.55-gentoo-dist
-rw-r--r-- 1 root root  6986092 Oct  6 00:42 System.map-6.1.55-gentoo-dist.old
-rw-r--r-- 1 root root 12272594 Oct  6 01:09 vmlinuz-6.1.55-gentoo-dist
-rw-r--r-- 1 root root 12272594 Oct  6 00:42 vmlinuz-6.1.55-gentoo-dist.old
(chroot) orangepi5plus / # ls -l /usr/src/linux-6.1.55-gentoo-dist/arch/arm64/boot/initrd
-rw------- 1 root root 33035121 Oct  6 01:09 /usr/src/linux-6.1.55-gentoo-dist/arch/arm64/boot/initrd
  1. copy files
alexlai@orangepi5plus:/boot$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
mtdblock0    31:0    0    16M  0 disk 
zram0       254:0    0   3.8G  0 disk [SWAP]
zram1       254:1    0   200M  0 disk /var/log
nvme0n1     259:0    0 238.5G  0 disk 
├─nvme0n1p1 259:1    0     1G  0 part /boot
├─nvme0n1p2 259:2    0    16G  0 part [SWAP]
├─nvme0n1p3 259:3    0    60G  0 part /mnt/gentoo/etc/resolv.conf
│                                     /var/log.hdd
│                                     /
├─nvme0n1p4 259:4    0     1G  0 part /mnt/gentoo/boot            <-- arch-chroot
└─nvme0n1p5 259:5    0    60G  0 part /mnt/gentoo
alexlai@orangepi5plus:/$ ls -l /boot
total 114920
-rwxr-xr-x 1 root root   230456 Jun  1 12:07 boot.bmp
-rwxr-xr-x 1 root root     3339 Jun  1 12:05 boot.cmd
-rwxr-xr-x 1 root root     3411 Oct  5 18:35 boot.scr
-rwxr-xr-x 1 root root   219610 Jun  1 11:43 config-5.10.110-rockchip-rk3588
drwxr-xr-x 3 root root     4096 Jun  1 12:06 dtb
drwxr-xr-x 3 root root     4096 Jun  1 12:06 dtb-5.10.110-rockchip-rk3588
-rwxr-xr-x 1 root root 34109952 Jun  1 11:43 Image
-rwxr-xr-x 1 root root 20017100 Oct  5 18:46 initrd.img-5.10.110-rockchip-rk3588
-rwxr-xr-x 1 root root  1152056 Jun  1 12:07 logo.bmp
-rwxr-xr-x 1 root root      226 Oct  6 06:01 orangepiEnv.txt
-rwxr-xr-x 1 root root     1542 Jun  1 12:13 orangepi_first_run.txt.template
-rwxr-xr-x 1 root root  7780782 Jun  1 11:43 System.map-5.10.110-rockchip-rk3588
-rwxr-xr-x 1 root root 20017164 Oct  5 18:46 uInitrd
-rwxr-xr-x 1 root root 34109952 Jun  1 11:43 vmlinuz-5.10.110-rockchip-rk3588

alexlai@orangepi5plus:/$ ls -l /mnt/gentoo/boot/
total 98696
-rw-r--r-- 1 root root   281506 Oct  6 09:09 config-6.1.55-gentoo-dist
-rw-r--r-- 1 root root   281506 Oct  6 08:42 config-6.1.55-gentoo-dist.old
drwxr-xr-x 3 root root     4096 Oct  6 08:41 dtbs
-rw-r--r-- 1 root root 33035121 Oct  6 09:09 initramfs-6.1.55-gentoo-dist.img
-rw-r--r-- 1 root root 28912893 Oct  6 08:42 initramfs-6.1.55-gentoo-dist.img.old
drwx------ 2 root root    16384 Oct  6 06:04 lost+found
-rw-r--r-- 1 root root  6986092 Oct  6 09:09 System.map-6.1.55-gentoo-dist
-rw-r--r-- 1 root root  6986092 Oct  6 08:42 System.map-6.1.55-gentoo-dist.old
-rw-r--r-- 1 root root 12272594 Oct  6 09:09 vmlinuz-6.1.55-gentoo-dist
-rw-r--r-- 1 root root 12272594 Oct  6 08:42 vmlinuz-6.1.55-gentoo-dist.old
root@orangepi5plus:/# cp -v /boot/boot.* /mnt/gentoo/boot/
'/boot/boot.bmp' -> '/mnt/gentoo/boot/boot.bmp'
'/boot/boot.cmd' -> '/mnt/gentoo/boot/boot.cmd'
'/boot/boot.scr' -> '/mnt/gentoo/boot/boot.scr'


---
2. [systemd first boot](https://wiki.gentoo.org/wiki/Systemd#Configuration)

systemd-firstboot --prompt --setup-machine-id

Welcome to your new installation of Gentoo Linux!

Please configure your system!

-- Press any key to proceed -- . Please enter system keymap name or number (empty to skip, "list" to list options): 232 Select 'us' /etc/console.conf written.

. Please enter hostname for new system (empty to skip):rpi4bGentoo /etc/hostname written /etc/machine-id written

systemctl preset-all

Created symlink /etc/systemd/system/sysinit.target.wants/systemd-network-generator.service -> /lib/systemd/system/systemd-network-generator.service. Created symlink /etc/systemd/system/sysinit.target.wants/systemd-pstore.service -> /lib/systemd/system/systemd-pstore.service Created symlink /etc/systemd/system/dbus-org.freedesktop.network1.service -> /lib/systemd/system/systemd-networkd.service Created symlink /etc/systemd/system/multi-user.target.wants/systemd-networkd.service -> /lib/systemd/system/systemd-networkd.service Created symlink /etc/systemd/system/sockets.target.wants/systemd-networkd.socket -> /lib/systemd/system/systemd-networkd.socket Created symlink /etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service -> /lib/systemd/system/systemd-networkd-wait-online.service Created symlink /etc/systemd/system/ctrl-alt-del.target -> /lib/systemd/system/reboot.target Created symlink /etc/systemd/system/dbus-org.freedesktop.timesync1.service -> /lib/systemd/system/systemd-timesyncd.service Created symlink /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service -> /usr/lib/systemd/system/systemd-timesyncd.service Created symlink /etc/systemd/system/sockets.target.wants/systemd-journald-audit.socket -> /lib/systemd/system/systemd-journald-audit.socket Created symlink /etc/systemd/system/systemd-journald.service.wants/systemd-journald-audit.socket -> /lib/systemd/system/systemd-journald-audit.socket Created symlink /etc/systemd/system/dbus-org.freedesktop.resolv1 ?? Created symlink /etc/systemd/system/sysinit.target.wants/systemd-resolve.service ?? Created symlink /etc/systemd/system/multi-user.target.wants/machines.target -> /lib/systemd/system/machines.target Created symlink /etc/systemd/system/sockets.target.wants/systemd-userdbd.socket -> /lib/systemd/system/systemd-userdbd.socket


3. `emerge net-misc/dhcpcd`


rm /usr/bin/dhcpcd <-- I got it from archlinux

- /etc/systemd/network/50-dhcp.network

[Match] Name=end0

[Network] DHCP=yes


- `systemctl restart systemd-networkd.service`
      - end0 was up and set 192.168.48.7/24
      - could ping hosts on the net, but ping GW 192.168.48.254 faied
- `systemctl enable systemd-networkd.service`
  1. reboot

  2. emerge app-admin/sudo and visudo and usermod -G wheel alexlai

  3. set time-zone

hc4Gentoo /home/alexlai # cp -v /usr/share/zoneinfo/Asia/Taipei /etc/localtime
'/usr/share/zoneinfo/Asia/Taipei' -> '/etc/localtime'
hc4Gentoo /home/alexlai # echo "/Asia/Taipei" > /etc/timezone
hc4Gentoo /home/alexlai # date
Thu Sep 28 14:24:10 CST 2023
  1. gen locale
hc4Gentoo /home/alexlai # nano /etc/locale.gen
hc4Gentoo /home/alexlai # locale-gen
 * Generating 3 locales (this might take a while) with 4 jobs
 *  (3/3) Generating C.UTF-8 ...                                                                                                                                                                                                                                            [ ok ]
 *  (2/3) Generating ja_JP.UTF-8 ...                                                                                                                                                                                                                                        [ ok ]
 *  (1/3) Generating en_US.UTF-8 ...                                                                                                                                                                                                                                        [ ok ]
 * Generation complete
 * Adding locales to archive ...
  1. Your first time to sync the @world
$ sudo emerge --ask --update --deep --newuse @world