§2023-08-30
- manjaro-arm-installer`
uname -m
will display asaarch64
this might cauuse ebuild KEYWORDS problem
- This part covers up to
make and make modules_install
for the kernel, using Jammy as the mother system
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 1050623 1048576 512M c W95 FAT32 (LBA) <-- /boot
/dev/sda2 1050624 34605055 33554432 16G 82 Linux swap / Solaris
/dev/sda3 34605056 160434175 125829120 60G 83 Linux <-- / root
/dev/sda4 160434176 468862127 308427952 147.1G 83 Linux
¶Step 1 : Setting up Partitions
Now we need a valid partition table on the Hard Drive or SSD that we are using to install Gentoo. We are free to choose any of the utilities available on our live system. I choose cfdisk
. You can go with gparted
or any other utility you like.
For this tutorial I have the following partitioning scheme.
/dev/sda1 → to be used as /boot
/dev/sda2 → to be used as /swap
/dev/sda3 → to be used as /root
Just create the partitions and you are ready to go, no need to format
or worry about mount points at this moment.
¶Step 2 : Formatting
pacman -S dosfstools
# mkfs.vfat - F32 /dev/sda1
# mkfs.ext4 /dev/sda3
# mkswap /dev/sda2
¶Step 3 : Downloading Stage3, arm64, systemd version and Extracting the Tarball into root
You can download the stage3 tarball from here. Choose your architecture, click on stages and download the latest stage3 tarball.
# cd /home/alexlai/build/gentoo/src
# wget https://distfiles.gentoo.org/releases/arm64/autobuilds/20230827T234643Z/stage3-arm64-systemd-20230827T234643Z.tar.xz <-- use systemd version
--- I will try openrc stage3
# ls
boot root stage3-arm64-systemd-20230827T234643Z.tar.xz
# mount /dev/sda3 root
# tar xvfp stage3-arm64-systemd-20230827T234643Z.tar.xz -C root
¶Step 4 : Chrooting
# apt install -y arch-install-scripts
# arch-chroot root /bin/bash # don't use chroot, might have some problem
# source /etc/profile
# export PS1="(chroot) $PS1"
¶Step 5. /etc/resolv.conf
(chroot) hc4Gentoo / # nano /etc/resolv.conf
(chroot) hc4Gentoo / # cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
(chroot) hc4Gentoo / # ping google.com
PING google.com (172.217.163.46) 56(84) bytes of data.
64 bytes from maa05s01-in-f14.1e100.net (172.217.163.46): icmp_seq=1 ttl=115 time=3.88 ms
64 bytes from maa05s01-in-f14.1e100.net (172.217.163.46): icmp_seq=2 ttl=115 time=3.81 ms
¶Step 6 : Edit /etc/portage/make.conf
This is one of the most crucial stages of installing Gentoo. Now we must edit /etc/portage/make.conf.
- /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.
COMMON_FLAGS="-O2 -pipe -march=armv8-a+crc -mtune=cortex-a76.cortex-a55"
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="aarch64-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=en_US.UTF-8 <-- do not change it here!
LC_MESSAGES=C.utf8
# Set the desired locale (adjust as needed)
LINGUAS="en_US.UTF-8"
# Set the system timezone (adjust as needed)
TIMEZONE="Asia/Taipei"
# Set the desired Python interpreter (adjust as needed)
# PYTHON_TARGETS="python3_7 python3_8"
PYTHON_TARGETS="python3_11 python3_10"
# Set the number of CPU cores for parallel compilation (adjust as needed)
MAKEOPTS="-j4"
¶ Step 7: nano /etc/portage/repos.conf/gentoo.conf
as
# mkdir /etc/portage/repos.conf
# nano /etc/portage/repos.conf/gentoo.conf
- /etc/portage/repos.conf/gentoo.conf as,
[gentoo]
location = /usr/portage
sync-type = rsync
sync-uri = rsync://rsync.namerica.gentoo.org/gentoo-portage
auto-sync = yes
priority = 10
¶ Step 8:
From here, emerge-webrsync will connect to the mirrors that you have selected and download the latest EBUILDS available for Gentoo.
(chroot) hc4Gentoo / # emerge-webrsync
....
!!! /etc/portage/make.profile is not a symlink and will probably prevent most merges.
!!! It should point into a profile within /usr/portage/profiles/
!!! (You can safely ignore this message when syncing. It's harmless.)
!!! Your current profile is invalid. If you have just changed your profile
!!! configuration, you should revert back to the previous configuration.
!!! Allowed actions are limited to --help, --info, --search, --sync, and
!!! --version.
- Fix
/etc/portage/make.profile is not a symlink
<-- !!! skip this
(chroot) hc4Gentoo / # ls -l /usr/portage/profiles/default/linux/amd64/
total 24
drwxr-xr-x 10 root root 4096 Aug 30 04:42 17.0
drwxr-xr-x 9 root root 4096 Aug 30 04:42 17.1
drwxr-xr-x 10 root root 4096 Aug 30 04:42 23.0
-rw-r--r-- 1 root root 2 Aug 9 2015 eapi
-rw-r--r-- 1 root root 338 Jul 1 2019 package.use.mask
-rw-r--r-- 1 root root 17 Dec 8 2017 parent
(chroot) hc4Gentoo / # ln -sf /usr/portage/profiles/default/linux/amd64/17.0 /etc/portage/make.profile <-- you have at least run `emerge-websync` once
ln -sf /usr/portage/profiles/default/linux/amd64/23.0 /etc/portage/make.profile WILL FAIL ??? >>> No ??? emerge --ask --verbose --update --deep --newuse @world
- And, eselect profile
(chroot) hc4Gentoo / # eselect profile list <-- has to wait after `emerge-webrsync`
Available profile symlink targets:
[1] default/linux/amd64/17.1 (stable) * <-- Mine is arm64
[2] default/linux/amd64/17.1/selinux (stable)
[3] default/linux/amd64/17.1/hardened (stable)
[4] default/linux/amd64/17.1/hardened/selinux (stable)
[5] default/linux/amd64/17.1/desktop (stable)
[6] default/linux/amd64/17.1/desktop/gnome (stable)
[7] default/linux/amd64/17.1/desktop/gnome/systemd (stable)
[8] default/linux/amd64/17.1/desktop/gnome/systemd/merged-usr (stable)
[9] default/linux/amd64/17.1/desktop/plasma (stable)
[10] default/linux/amd64/17.1/desktop/plasma/systemd (stable)
[11] default/linux/amd64/17.1/desktop/plasma/systemd/merged-usr (stable)
[12] default/linux/amd64/17.1/desktop/systemd (stable)
[13] default/linux/amd64/17.1/desktop/systemd/merged-usr (stable)
[14] default/linux/amd64/17.1/developer (exp)
[15] default/linux/amd64/17.1/no-multilib (stable)
[16] default/linux/amd64/17.1/no-multilib/hardened (stable)
[17] default/linux/amd64/17.1/no-multilib/hardened/selinux (stable)
[18] default/linux/amd64/17.1/no-multilib/systemd (dev)
[19] default/linux/amd64/17.1/no-multilib/systemd/merged-usr (dev)
[20] default/linux/amd64/17.1/no-multilib/systemd/selinux (exp)
[21] default/linux/amd64/17.1/no-multilib/systemd/selinux/merged-usr (exp)
[22] default/linux/amd64/17.1/systemd (stable)
[23] default/linux/amd64/17.1/systemd/merged-usr (stable)
[24] default/linux/amd64/17.1/systemd/selinux (exp)
[25] default/linux/amd64/17.1/systemd/selinux/merged-usr (exp)
[26] default/linux/amd64/17.1/clang (exp)
[27] default/linux/amd64/17.1/systemd/clang (exp)
[28] default/linux/amd64/17.1/systemd/clang/merged-usr (exp)
[29] default/linux/amd64/17.0/x32 (dev)
[30] default/linux/amd64/17.0/x32/systemd (exp)
[31] default/linux/amd64/17.0/x32/systemd/merged-usr (exp)
[32] default/linux/amd64/17.0/musl (dev)
[33] default/linux/amd64/17.0/musl/clang (exp)
[34] default/linux/amd64/17.0/musl/hardened (exp)
[35] default/linux/amd64/17.0/musl/hardened/selinux (exp)
(chroot) hc4Gentoo / # eselect profile set 1 <--- set to 7 takes too long to emerge
- retry adain
(chroot) hc4Gentoo / # emerge-webrsync
* PGP verification method: gemato
* Fetching most recent snapshot ...
* Latest snapshot date: 20230823
*
* Approximate snapshot timestamp: 1692837900
* Current local timestamp: 1692837601
*
* The current local timestamp is possibly identical to the
* timestamp of the latest snapshot. In order to force sync, use
* the --revert option or remove the timestamp file located at
* '/usr/portage/metadata/timestamp.x'.
(chroot) hc4Gentoo / # rm /usr/portage/metadata/timestamp.x
(chroot) hc4Gentoo / # emerge-webrsync
...
* Getting snapshot timestamp ...
* Syncing local repository ...
...
sent 3.87M bytes received 27.68K bytes 519.45K bytes/sec
total size is 194.17M speedup is 49.84
* Cleaning up ...
* IMPORTANT: 10 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.
¶Step 12. Your First Gentoo System Update
You can now update your system to match the latest EBUILDS by running this emerge command:
emerge --ask --verbose --update --deep --newuse @world` ---> if you use systemd Stage3 this will bw blocked, but openrc is OK!!!
emerge --ask --verbose --update --deep --newuse @world <-- skip this one???
[blocks B ] sys-apps/systemd ("sys-apps/systemd" is soft blocking sys-apps/systemd-utils-253.6)
[blocks B ] sys-apps/gentoo-systemd-integration ("sys-apps/gentoo-systemd-integration" is soft blocking sys-apps/systemd-utils-253.6)
Total: 106 packages (7 upgrades, 1 downgrade, 2 new, 1 in new slot, 95 reinstalls), Size of downloads: 276898 KiB
Conflict: 2 blocks (2 unsatisfied)
* Error: The above package list contains packages which cannot be
* installed at the same time on the same system.
(sys-apps/systemd-253.6:0/2::gentoo, ebuild scheduled for merge) pulled in by
>=sys-apps/systemd-207 required by (sys-apps/gentoo-systemd-integration-9-1:0/0::gentoo, installed) USE="(arm64)"
sys-apps/systemd required by (virtual/service-manager-1-r1-1:0/0::gentoo, installed) USE="(arm64)"
sys-apps/systemd:0= required by (sys-apps/dbus-1.15.6-2:0/0::gentoo, installed) USE="(arm64) systemd -X -debug -doc -elogind (-selinux) -static-libs -test -valgrind" ABI_X86="-32 (-64) (-x32)"
sys-apps/systemd:0/2= required by (sys-apps/dbus-1.15.6-2:0/0::gentoo, installed) USE="(arm64) systemd -X -debug -doc -elogind (-selinux) -static-libs -test -valgrind" ABI_X86="-32 (-64) (-x32)"
(sys-apps/systemd-utils-253.6:0/0::gentoo, ebuild scheduled for merge) pulled in by
sys-apps/systemd-utils[udev] required by (virtual/udev-217-r6:0/0::gentoo, ebuild scheduled for merge) USE="-systemd" ABI_X86="(64)"
sys-apps/systemd-utils[tmpfiles] required by (virtual/tmpfiles-0-r5:0/0::gentoo, ebuild scheduled for merge) USE="-systemd" ABI_X86="(64)"
For more information about Blocked Packages, please refer to the following
section of the Gentoo Linux x86 Handbook (architecture is irrelevant):
https://wiki.gentoo.org/wiki/Handbook:X86/Working/Portage#Blocked_packages```
(chroot) hc4Gentoo / # emerge --depclean
- Always study the list of packages to be cleaned for any obvious
- mistakes. Packages that are part of the world set will always
- be kept. They can be manually added to this set with
emerge --noreplace <atom>
. Packages that are listed in- package.provided (see portage(5)) will be removed by
- depclean, even if they are part of the world set.
- As a safety measure, depclean will not remove any packages
- unless all required dependencies have been resolved. As a
- consequence of this, it often becomes necessary to run
emerge --update --newuse --deep @world
prior to depclean. !!! You have no world file.
Calculating dependencies... done!
- Dependencies could not be completely resolved due to
- the following required packages not being installed:
- dev-libs/libunistring:0/2= pulled in by:
-
net-dns/libidn2-2.3.4
- dev-libs/libunistring:0/2= pulled in by:
-
net-libs/gnutls-3.7.8
- Have you forgotten to do a complete update prior to depclean? The
- most comprehensive command for this purpose is as follows:
- emerge --update --newuse --deep --with-bdeps=y @world
- Note that the --with-bdeps=y option is not required in many
- situations. Refer to the emerge manual page (run
man emerge
) - for more information about --with-bdeps.
- Also, note that it may be necessary to manually uninstall
- packages that no longer exist in the repository, since it may not
- be possible to satisfy their dependencies.
(chroot) hc4Gentoo / # emerge --update --newuse --deep --with-bdeps=y @world
- IMPORTANT: 13 news items need reading for repository 'gentoo'.
- Use eselect news read to view new items.
Calculating dependencies \
---
chatGPT,
The error message you've encountered indicates that there is a circular dependency issue involving the sys-libs/gpm and sys-libs/ncurses packages during the package update process. Circular dependencies occur when two or more packages depend on each other, creating a loop that prevents them from being installed or updated successfully.
To fix this issue, you can follow the suggested solution in the error message, which is to temporarily change the USE flag for the sys-libs/ncurses package by removing the "gpm" flag. Here's how you can do it:
Open your terminal.
Run the following command to edit the USE flags for the sys-libs/ncurses package in the Portage configuration:
bash
sudo nano /etc/portage/package.use/ncurses
This will open the Nano text editor for the newly created file.
Add USE Flag: In the opened file, add the following line to remove the "gpm" USE flag for the sys-libs/ncurses package:
plaintext
sys-libs/ncurses -gpm
This line tells Portage not to use the "gpm" feature for the sys-libs/ncurses package.
Save and Close: After adding the line, save the file and close the text editor. In Nano, you can do this by pressing Ctrl + O to write the changes and Ctrl + X to exit.
Run the Update Command: With the new file in place, you can now run the package update command again:
bash
emerge --ask --update --deep --newuse @world
bash
sys-libs/ncurses gpm
Remove the "gpm" USE flag from the line. After making the change, the line should look like this:
bash
sys-libs/ncurses
Save the changes and close the text editor.
Run the following command to update the package dependencies and resolve the circular dependency issue:
css
emerge --ask --update --deep --newuse @world
The package manager should now attempt to install the packages without the circular dependency. After the installation is complete, the circular dependency should be resolved.
If the installation is successful, you can revert the change you made to the USE flags for the sys-libs/ncurses package. Open the /etc/portage/package.use file again and add back the "gpm" USE flag to the line for sys-libs/ncurses.
Remember that while this solution should resolve the circular dependency issue, it's always a good idea to check for any updates or changes in package dependencies before performing updates to ensure a smooth process.
¶ 12. install git
- so that I could get [compile odroid-n2 kernel](https://wiki.odroid.com/odroid-n2/software/building_kernel
emerge --sync && emerge --ask dev-vcs/git
git clone --depth 1 https://github.com/hardkernel/linux.git -b odroidg12-4.9.y --> into /usr/src
¶Step 13, compile kernel
Kernel Install the kernel tools and firmware.
emerge --ask sys-kernel/gentoo-sources ---> get kernel source
emerge --ask sys-kernel/genkernel ---> to make initramfs.img, !!! All ebuilds that could satisfy "sys-kernel/linux-firmware" have been masked.
emerge --ask sys-fs/cryptsetup
emerge --ask sys-kernel/linux-
emerge --ask sys-kernel/dracut
emerge -av dev-embedded/u-boot-tools ---> mkimg
# emerge -av dev-embedded/u-boot-tools
...
>>> Merging dev-embedded/u-boot-tools-2023.01 to /
--- /usr/
--- /usr/share/
--- /usr/share/man/
--- /usr/share/man/man1/
>>> /usr/share/man/man1/mkimage.1.bz2
--- /usr/bin/
>>> /usr/bin/bmp_logo
>>> /usr/bin/gen_eth_addr
>>> /usr/bin/fdtgrep
>>> /usr/bin/mkimage
>>> /usr/bin/fw_printenv
>>> /usr/bin/fw_setenv -> fw_printenv
>>> /usr/bin/img2srec
>>> /usr/bin/mkenvimage
>>> /usr/bin/dumpimage
--- /etc/
>>> /etc/fw_env.config
Total: 2 packages (2 new), Size of downloads: 26525 KiB
Would you like to merge these packages? [Yes/No] yes
Verifying ebuild manifests
Emerging (1 of 2) dev-lang/swig-4.1.1-r1::gentoo
- Fetching files in the background.
- To view fetch progress, run in another terminal:
- tail -f /var/log/emerge-fetch.log
13.1. `emerge --ask sys-kernel/gentoo-sources` to get kernel source code
- try `sys-kernel/odroidc4-sources` ---> no good
(chroot) n2Mnjaro /usr/src # emerge --ask sys-kernel/gentoo-sources (chroot) n2Mnjaro /usr/src # ls linux linux-6.1.46-gentoo (chroot) n2Mnjaro /usr/src # git clone --depth 1 https://github.com/hardkernel/linux.git -b odroidg12-4.9.y chroot) hc4Gentoo /usr/src # ls linux linux-6.1.46-gentoo (chroot) n2Mnjaro /usr/src # mv linux linux-odroidg12-4.9.y (chroot) hc4Gentoo /usr/src # ls linux-odroidg12-4.9.y/arch/arm64/configs/ defconfig meson64_defconfig meson64_smarthome_defconfig odroidc4_defconfig odroidg12_defconfig odroidn2_drm_defconfig ranchu64_defconfig (c
13.2 `make menuconfig`
(chroot) n2Mnjaro /usr/src # cp -v linux-odroidg12-4.9.y/arch/arm64/configs/odroidn2_drm_defconfig linux-6.1.46-gentoo/arch/arm64/configs/
or
chroot) hc4Gentoo /usr/src # cp -v linux-odroidg12-4.9.y/arch/arm64/configs/odroidc4_defconfig linux-6.1.46-gentoo/arch/arm64/configs/ 'linux-odroidg12-4.9.y/arch/arm64/configs/odroidc4_defconfig' -> 'linux-6.1.46-gentoo/arch/arm64/configs/odroidc4_defconfig' 'linux-odroidg12-4.9.y/arch/arm64/configs/odroidn2_drm_defconfig' -> 'linux-6.1.46-gentoo/arch/arm64/configs/odroidn2_drm_defconfig' (chroot) n2Mnjaro /usr/src # cd linux-6.1.46-gentoo/
(chroot) n2Mnjaro /usr/src/linux-6.1.46-gentoo # make odroidn2_drm_defconfig HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/confdata.o HOSTCC scripts/kconfig/expr.o LEX scripts/kconfig/lexer.lex.c YACC scripts/kconfig/parser.tab.[ch] HOSTCC scripts/kconfig/lexer.lex.o HOSTCC scripts/kconfig/menu.o HOSTCC scripts/kconfig/parser.tab.o HOSTCC scripts/kconfig/preprocess.o HOSTCC scripts/kconfig/symbol.o HOSTCC scripts/kconfig/util.o HOSTLD scripts/kconfig/conf arch/arm64/configs/odroidn2_drm_defconfig:722:warning: symbol value 'm' invalid for NF_CT_PROTO_DCCP arch/arm64/configs/odroidn2_drm_defconfig:723:warning: symbol value 'm' invalid for NF_CT_PROTO_GRE arch/arm64/configs/odroidn2_drm_defconfig:724:warning: symbol value 'm' invalid for NF_CT_PROTO_SCTP arch/arm64/configs/odroidn2_drm_defconfig:725:warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE arch/arm64/configs/odroidn2_drm_defconfig:751:warning: symbol value 'm' invalid for NF_NAT_REDIRECT arch/arm64/configs/odroidn2_drm_defconfig:754:warning: symbol value 'm' invalid for NF_TABLES_INET arch/arm64/configs/odroidn2_drm_defconfig:755:warning: symbol value 'm' invalid for NF_TABLES_NETDEV arch/arm64/configs/odroidn2_drm_defconfig:932:warning: symbol value 'm' invalid for NF_TABLES_IPV4 arch/arm64/configs/odroidn2_drm_defconfig:936:warning: symbol value 'm' invalid for NF_TABLES_ARP arch/arm64/configs/odroidn2_drm_defconfig:977:warning: symbol value 'm' invalid for NF_TABLES_IPV6 arch/arm64/configs/odroidn2_drm_defconfig:3392:warning: symbol value 'm' invalid for LIRC
configuration written to .config
Or,
(chroot) hc4Gentoo /usr/src/linux-6.1.46-gentoo # make odroidc4_defconfig HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/confdata.o HOSTCC scripts/kconfig/expr.o LEX scripts/kconfig/lexer.lex.c YACC scripts/kconfig/parser.tab.[ch] HOSTCC scripts/kconfig/lexer.lex.o HOSTCC scripts/kconfig/menu.o HOSTCC scripts/kconfig/parser.tab.o HOSTCC scripts/kconfig/preprocess.o HOSTCC scripts/kconfig/symbol.o HOSTCC scripts/kconfig/util.o HOSTLD scripts/kconfig/conf arch/arm64/configs/odroidc4_defconfig:770:warning: symbol value 'm' invalid for NF_CT_PROTO_DCCP arch/arm64/configs/odroidc4_defconfig:771:warning: symbol value 'm' invalid for NF_CT_PROTO_GRE arch/arm64/configs/odroidc4_defconfig:772:warning: symbol value 'm' invalid for NF_CT_PROTO_SCTP arch/arm64/configs/odroidc4_defconfig:773:warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE arch/arm64/configs/odroidc4_defconfig:799:warning: symbol value 'm' invalid for NF_NAT_REDIRECT arch/arm64/configs/odroidc4_defconfig:802:warning: symbol value 'm' invalid for NF_TABLES_INET arch/arm64/configs/odroidc4_defconfig:803:warning: symbol value 'm' invalid for NF_TABLES_NETDEV arch/arm64/configs/odroidc4_defconfig:980:warning: symbol value 'm' invalid for NF_TABLES_IPV4 arch/arm64/configs/odroidc4_defconfig:984:warning: symbol value 'm' invalid for NF_TABLES_ARP arch/arm64/configs/odroidc4_defconfig:1025:warning: symbol value 'm' invalid for NF_TABLES_IPV6 arch/arm64/configs/odroidc4_defconfig:3863:warning: symbol value 'm' invalid for LIRC
configuration written to .config
(chroot) n2Mnjaro /usr/src/linux-6.1.46-gentoo # make menuconfig --> take out joysticks (chroot) n2Mnjaro /usr/src/linux-6.1.46-gentoo # time make -j4 real 134m36.418s user 491m18.156s sys 41m34.758s
(chroot) hc4Gentoo /usr/src/linux-6.1.46-gentoo # make modules_install ... INSTALL /lib/modules/6.1.46-gentoo/kernel/sound/drivers/snd-serial-u16550.ko INSTALL /lib/modules/6.1.46-gentoo/kernel/sound/usb/6fire/snd-usb-6fire.ko INSTALL /lib/modules/6.1.46-gentoo/kernel/sound/usb/bcd2000/snd-bcd2000.ko INSTALL /lib/modules/6.1.46-gentoo/kernel/sound/usb/caiaq/snd-usb-caiaq.ko INSTALL /lib/modules/6.1.46-gentoo/kernel/sound/usb/hiface/snd-usb-hiface.ko INSTALL /lib/modules/6.1.46-gentoo/kernel/sound/usb/line6/snd-usb-line6.ko INSTALL /lib/modules/6.1.46-gentoo/kernel/sound/usb/line6/snd-usb-pod.ko INSTALL /lib/modules/6.1.46-gentoo/kernel/sound/usb/line6/snd-usb-podhd.ko INSTALL /lib/modules/6.1.46-gentoo/kernel/sound/usb/line6/snd-usb-toneport.ko INSTALL /lib/modules/6.1.46-gentoo/kernel/sound/usb/line6/snd-usb-variax.ko INSTALL /lib/modules/6.1.46-gentoo/kernel/sound/usb/misc/snd-ua101.ko DEPMOD /lib/modules/6.1.46-gentoo
(chroot) hc4Gentoo /usr/src/linux-6.1.46-gentoo # mount /dev/sda1 /boot/ (chroot) hc4Gentoo /usr/src/linux-6.1.46-gentoo # make install INSTALL /boot (chroot) hc4Gentoo /usr/src/linux-6.1.46-gentoo # ls /boot/ System.map-6.1.46-gentoo config-6.1.46-gentoo vmlinuz-6.1.46-gentoo
¶Step 14. `emerge --ask sys-kernel/genkernel `
emerge --ask sys-kernel/genkernel
- IMPORTANT: 10 news items need reading for repository 'gentoo'.
- Use eselect news read to view new items.
These are the packages that would be merged, in order:
Calculating dependencies... done! Dependency resolution took 5.86 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 '/usr/portage/licenses/linux-fw-redistributable'.
-
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))
-
sys-kernel/linux-firmware-20230625_p20230707::gentoo (masked by: || ( ) linux-fw-redistributable license(s))
-
sys-kernel/linux-firmware-20230515::gentoo (masked by: || ( ) linux-fw-redistributable license(s))
(dependency required by "sys-kernel/genkernel-4.3.5::gentoo[firmware]" [ebuild]) (dependency required by "sys-kernel/genkernel" [argument]) For more information, see the MASKED PACKAGES section in the emerge man page or refer to the Gentoo Handbook.
¶Step 14.1.
To explicitly accept a license before installing a package, you can follow these general steps on a Gentoo Linux system:
Find the License: Locate the license that you need to accept. In your case, it's the linux-fw-redistributable license.
Edit Your ACCEPT_LICENSE Variable: Open your /etc/portage/make.conf file in a text editor (you might need superuser privileges) and add the license to the ACCEPT_LICENSE variable. If the variable doesn't exist, you can create it. For example:
- nano ` /etc/portage/make.conf
ACCEPT_LICENSE="linux-fw-redistributable" <-- append this line
Then
If you have other licenses to accept as well, you can separate them with spaces. If you're unsure about the exact license name, you might be able to find it in the package's metadata or documentation.
Update Your System: After making changes to your make.conf file, save the changes and exit the text editor. Then, you'll need to update your package manager's environment by running:
source /etc/portage/make.conf <-- seems not necessary !!!
Install the Package: With the license now accepted in your configuration, you can attempt to install the package again:
emerge --ask sys-kernel/genkernel
...
>>> Installing (2 of 2) sys-kernel/genkernel-4.3.5::gentoo
>>> Recording sys-kernel/genkernel in "world" favorites file...
>>> Completed (2 of 2) sys-kernel/genkernel-4.3.5::gentoo
* Messages for package sys-kernel/linux-firmware-20230804:
* Your configuration for sys-kernel/linux-firmware-20230804 has been saved in
* "/etc/portage/savedconfig/sys-kernel/linux-firmware-20230804" 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.
* IMPORTANT: 1 news items need reading for repository 'gentoo'.
* Use eselect news read to view new items.
(chroot) hc4Gentoo /usr/src/linux-6.1.46-gentoo # which genkernel
/usr/bin/genkernel
¶Step 14.3. `genkernel --install initramfs
- /etc/genkernel.conf
# Configuration file for genkernel
# This file is sourced by genkernel at startup and determines which options
# we will be using to compile our kernel. The order of precidence is simple,
# with the internal settings being least important, configuration file
# settings next, and command line options being most important.
# =========COMMON COMMAND LINE OPTION DEFAULTS=========
# Install to $BOOTDIR
#INSTALL="yes"
# Run 'make oldconfig' before compiling this kernel
#OLDCONFIG="yes"
# Run 'make menuconfig' before compiling this kernel
#MENUCONFIG="no"
# Run 'make gconfig' before compiling this kernel
#GCONFIG="no"
# Run 'make nconfig' (ncurses 'menuconfig') before compiling this kernel
#NCONFIG="no"
# Run 'make xconfig' before compiling this kernel
#XCONFIG="no"
# Run 'make mrproper' before compiling this kernel
#MRPROPER="yes"
# Run 'make clean' before compiling this kernel
# Only needed if MRPROPER is set to NO because
# MRPROPER implies 'make clean'.
#CLEAN="yes"
# Mount BOOTDIR automatically if it isn't mounted
#MOUNTBOOT="yes"
# Make symlinks in BOOTDIR automatically
#SYMLINK="no"
# Save the new configuration in /etc/kernels upon
# successful compilation
#SAVE_CONFIG="yes"
# Enable color output in genkernel
NOCOLOR="false"
# Clear build cache dir on gernkernel start
#CLEAR_CACHEDIR="no"
# Clear all tmp files and caches after genkernel has run
#POSTCLEAR="no"
# Check for x MB free disk space in BOOTDIR
#CHECK_FREE_DISK_SPACE_BOOTDIR=0
# Check for x MB free disk space in kernel outputdir
#CHECK_FREE_DISK_SPACE_KERNELOUTPUTDIR=0
# Genkernel uses an independent configuration for MAKEOPTS, and does not source
# /etc/portage/make.conf . You can override the default setting by uncommenting
# and tweaking the following line. Default setting is set up by
# ${GK_SHARE}/${ARCH_OVERRIDE}/config.sh . The recommended value for -j
# argument is: <number of processors>*<number of cores per processor>+1
#MAKEOPTS="$(portageq envvar MAKEOPTS)"
# Run the kernel make at the following NICE level
#NICE=10
# Add bcache support
#BCACHE="no"
# Add LVM support
#LVM="no"
# Add LUKS support
#LUKS="no"
# Add GnuPG support
#GPG="no"
# Add keyctl support for loading LUKS passphrase into a keyring
#KEYCTL="no"
# Add in early microcode support: this sets the kernel options for early microcode loading
# Possible values: empty/"no", "all", "intel", "amd"
#MICROCODE="all"
# Include early microcode in generated initramfs.
# Only needed if system cannot load multiple initramfs.
# NOTE: >=sys-boot/grub-2 will detect and auto-load {amd,intel}-uc.img file
# provided by sys-firmware/intel-microcode[initramfs] or
# sys-kernel/linux-firmware[initramfs].
#MICROCODE_INITRAMFS="no"
# Add NFS support
#NFS="no"
# Add DMRAID support
#DMRAID="no"
# Add SSH support
#SSH="no"
# Add b2sum support
#B2SUM="no"
# Include busybox in the initramfs. If included, busybox is rebuilt
# if the cached copy is out of date.
#BUSYBOX="yes"
# Add MDRAID support
#MDADM="no"
# Specify a custom mdadm.conf.
# By default the initramfs will be built *without* an mdadm.conf and will auto-detect
# arrays during bootup. Usually, this should not be needed.
#MDADM_CONFIG="/etc/mdadm.conf"
# Add Multipath support
#MULTIPATH="no"
# Add iSCSI support
#ISCSI="no"
# Add e2fsprogs support
#E2FSPROGS="no"
# Include support for unionfs
#UNIONFS="no"
# Include support for zfs volume management. If unset, genkernel will attempt
# to autodetect and enable this when rootfs is on zfs.
#ZFS="no"
# Add BTRFS support
#BTRFS="no"
# Add xfsprogs support
#XFSPROGS="no"
# Install firmware onto root filesystem
# Will conflict with sys-kernel/linux-firmware package
#FIRMWARE_INSTALL="no"
# Add firmware(s) to initramfs
#FIRMWARE="no"
# 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=""
# Add new kernel to grub
# Possible values: empty/"no", "grub", "grub2"
#BOOTLOADER="no"
# Use sandbox when building initramfs
#SANDBOX="yes"
# Embed and set font early on boot
# Possible values: empty/"none", "current", <PSF file>
#BOOTFONT="none"
# Add boot splash using splashutils
#SPLASH="no"
# Use this splash theme. If commented out - the "default" name theme is used.
# Also, SPLASH="yes" needs to be enabled for this one to work.
# This supersedes the "SPLASH_THEME" option in '/etc/conf.d/splash'.
#SPLASH_THEME="gentoo"
# Run "emerge @module-rebuild" automatically when possible and necessary
# after kernel and modules have been compiled
#MODULEREBUILD="yes"
# Run the specified command in the current environment after the kernel and
# modules have been compiled, useful to rebuild external kernel module
# (see MODULEREBUILD above) or installing additional
# files (use 'copy_image_with_preserve dtb path/to/dtb dtb <kernelname>')
#CMD_CALLBACK=""
# =========KEYMAP SETTINGS=========
#
# Force keymap selection at boot
#DOKEYMAPAUTO="no"
# Enables keymap selection support
#KEYMAP="yes"
# =========LOW LEVEL COMPILE SETTINGS=========
#
# Assembler to use for the kernel. See also the --kernel-as command line
# option.
#KERNEL_AS="as"
# Archiver to use for the kernel. See also the --kernel-ar command line
# option.
#KERNEL_AR="ar"
# Compiler to use for the kernel (e.g. distcc). See also the --kernel-cc
# command line option.
#KERNEL_CC="gcc"
# Linker to use for the kernel. See also the --kernel-ld command line option.
#KERNEL_LD="ld"
# NM utility to use for the kernel. See also the --kernel-nm command line option.
#KERNEL_NM="nm"
# GNU Make to use for kernel. See also the --kernel-make command line option.
#KERNEL_MAKE="make"
# objcopy utility to use for the kernel. See also the --kernel-objcopy command
# line option.
#KERNEL_OBJCOPY="objcopy"
# objdump utility to use for the kernel. See also the --kernel-objdump command
# line option.
#KERNEL_OBJDUMP="objdump"
# ranlib utility to use for the kernel. See also the --kernel-ranlib command
# line option.
#KERNEL_RANLIB="ranlib"
# readelf utility to use for the kernel. See also the --kernel-readelf command
# line option.
#KERNEL_READELF="readelf"
# strip utility to use for the kernel. See also the --kernel-strip command line
# option.
#KERNEL_STRIP="strip"
# Assembler to use for the utilities. See also the --utils-as command line
# option.
#UTILS_AS="as"
# Archiver to use for the utilities. See also the --utils-ar command line
# option.
#UTILS_AR="ar"
# C Compiler to use for the utilities (e.g. distcc). See also the --utils-cc
# command line option.
#UTILS_CC="gcc"
# C++ Compiler to use for the utilities (e.g. distcc). See also the --utils-cxx
# command line option.
#UTILS_CXX="g++"
# Linker to use for the utilities. See also the --utils-ld command line
# option.
#UTILS_LD="ld"
# NM utility to use for the utilities. See also the --utils-nm command line option.
#UTILS_NM="nm"
# GNU Make to use for the utilities. See also the --utils-make command line
# option.
#UTILS_MAKE="make"
# Target triple (i.e. aarch64-linux-gnu) to build for. If you do not
# cross-compile, leave blank for auto detection.
#CROSS_COMPILE=""
# Target triple (i.e. aarch64-linux-gnu) to build kernel for. Utilities will be
# built for the native target, not this target. If you do not cross-compile,
# leave blank.
#KERNEL_CROSS_COMPILE=""
# Override default make target (bzImage). See also the --kernel-target
# command line option. Useful to build a uImage on arm.
#KERNEL_MAKE_DIRECTIVE_OVERRIDE="fooImage"
# Override default kernel binary path. See also the --kernel-binary
# command line option. Useful to install a uImage on arm.
#KERNEL_BINARY_OVERRIDE="arch/foo/boot/bar"
# =========GENKERNEL LOCATION CONFIGURATION=========
#
# Variables:
# %%ARCH%% - Final determined architecture
# %%CACHE%% - Final determined cache location
# Set genkernel's temporary work directory
#TMPDIR="/var/tmp/genkernel"
# Set the boot directory, default is /boot
#BOOTDIR="/boot"
# Default share directory location
GK_SHARE="${GK_SHARE:-/usr/share/genkernel}"
# Location of the default cache
CACHE_DIR="/var/cache/genkernel"
# Location of DISTDIR, where our source tarballs are stored
DISTDIR="${GK_SHARE}/distfiles"
# Log output file
LOGFILE="/var/log/genkernel.log"
# Debug Level
LOGLEVEL=1
# =========COMPILED UTILS CONFIGURATION=========
#
# Default location of kernel source
DEFAULT_KERNEL_SOURCE="/usr/src/linux"
# Default kernel config (only use to override using
# arch/%%ARCH%%/kernel-config-${VER}.${PAT} !)
#DEFAULT_KERNEL_CONFIG="${GK_SHARE}/arch/%%ARCH%%/kernel-config"
# Specifies a user created busybox config
#BUSYBOX_CONFIG="/path/to/file"
# NOTE: Since genkernel 3.4.41 the version of
# busybox, lvm, mdadm, ... have been moved to
# /usr/share/genkernel/defaults/software.sh in order to
# reduce the merging you have to do during etc-update.
# You can still override these settings in here.
# =========MISC KERNEL CONFIGURATION=========
#
# Set kernel filename which will be used when kernel will be installed
# into BOOTDIR. See man page to learn more about available placeholders.
#KERNEL_FILENAME="vmlinuz-%%KV%%"
# Set kernel symlink name which will be used when kernel will be installed
# into BOOTDIR and SYMLINK option is enabled
#KERNEL_SYMLINK_NAME="kernel"
# This option will set kernel option CONFIG_LOCALVERSION.
# Use special value "UNSET" to unset already set CONFIG_LOCALVERSION.
#KERNEL_LOCALVERSION="-%%ARCH%%"
# This option is only valid if kerncache is
# defined. If there is a valid kerncache no checks
# will be made against a kernel source tree.
#KERNEL_SOURCES="yes"
# Build a static (monolithic kernel)
#BUILD_STATIC="no"
# Make and install kernelz image (PowerPC)
#GENZIMAGE="no"
# Archive file created using tar containing kernel binary, content
# of /lib/modules and the kernel config.
# NOTE: Archive is created before the callbacks are run!
#KERNCACHE="/path/to/file.tar.xz"
# Prefix to kernel module destination, modules
# will be installed in <prefix>/lib/modules
#KERNEL_MODULES_PREFIX=""
# =========MISC INITRAMFS CONFIGURATION=========
#
# Set initramfs filename which will be used when initramfs will be
# installed into BOOTDIR. See man page to learn more about available
# placeholders.
#INITRAMFS_FILENAME="initramfs-%%KV%%.img"
# Set initramfs symlink name which will be used when initramfs will be
# installed into BOOTDIR and SYMLINK option is enabled
#INITRAMFS_SYMLINK_NAME="initramfs"
# Copy all compiled kernel modules to the initramfs
#ALLRAMDISKMODULES="no"
# Copy selected modules to the initramfs based on arch-specific modules_load file
#RAMDISKMODULES="yes"
# Archive file created using tar containing kernel and initramfs.
# NOTE: No modules outside of the initramfs will be included!
#MINKERNPACKAGE="/path/to/file.tar.xz"
# Add additional modules to the initramfs using the module groups defined
# in /usr/share/genkernel/defaults/modules_load (see this file for
# more details). This would be used if, for example, you
# required an additional crypto module or network device at boot
# time and did not want to statically compile these in the kernel.
# Options take the form AMODULES_{group} where {group} is one of
# the groups in modules_load (which are in the form MODULES_{group}).
# Use this with caution.
#AMODULES_group="module-to-include another-module"
# Override the default modules in the initramfs, for a given group, as defined by
# /usr/share/genkernel/defaults/modules_load and the per-arch modules_load
# files. You PROBABLY want to use AMODULES_* above, and NOT MODULES_* here.
# If you use MODULES_* here, the default and per-arch modules will NOT be used.
#MODULES_group1="some-module"
#MODULES_group2="" # Load no modules for this group
# Override the default used linuxrc script.
#LINUXRC="/path/to/custom/linuxrc"
# Archive file created using tar containing modules after
# the callbacks have run
#MODULESPACKAGE="/path/to/file.tar.xz"
# Directory structure to include in the initramfs,
# only available on >=2.6 kernels
#INITRAMFS_OVERLAY=""
# Build the generated initramfs into the kernel instead of
# keeping it as a separate file
#INTEGRATED_INITRAMFS="no"
# Compress generated initramfs
#COMPRESS_INITRD="yes"
# Types of compression: best, xz, lzma, bzip2, gzip, lzop, lz4, zstd, fastest
# "best" selects the best available compression method
# "fastest" selects the fastest available compression method
#COMPRESS_INITRD_TYPE="best"
# wrap initramfs using mkimage for u-boot bootloader
# WRAP_INITRD=no
# Create a self-contained env in the initramfs
#NETBOOT="no"
# =========MISC BOOT CONFIGURATION=========
#
# Specify a default for real_root=
#REAL_ROOT="/dev/one/two/gentoo"
make sure you did
make modules_install
??make install
???
(chroot) hc4Gentoo /usr/src/linux-6.1.46-gentoo # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 223.6G 0 disk
├─sda1 8:1 0 512M 0 part /boot <----
├─sda2 8:2 0 16G 0 part
├─sda3 8:3 0 60G 0 part /
└─sda4 8:4 0 147.1G 0 part
mmcblk0 179:0 0 28.3G 0 disk
├─mmcblk0p1 179:1 0 457.8M 0 part
└─mmcblk0p2 179:2 0 27.9G 0 part
(chroot) hc4Gentoo /usr/src/linux-6.1.46-gentoo # ls -l /usr/src/
total 8
lrwxrwxrwx 1 root root 19 Aug 30 07:53 linux -> linux-6.1.46-gentoo
drwxr-xr-x 27 root root 4096 Aug 30 09:59 linux-6.1.46-gentoo
drwxr-xr-x 25 root root 4096 Aug 30 07:52 linux-odroid-c4
(chroot) hc4Gentoo /usr/src/linux-6.1.46-gentoo # genkernel --install initramfs
* Gentoo Linux Genkernel; Version 4.3.5
* Using genkernel configuration from '/etc/genkernel.conf' ...
* Running with options: --install initramfs
* Working with Linux kernel 6.1.46-gentoo for arm64
* Using kernel config file '/usr/share/genkernel/arch/arm64/generated-config' ...
* Current kernel's LOCALVERSION is set to ''; Will ignore set --kernel-localversion value '-arm64' because kernel was not built ...
* initramfs: >> Initializing ...
* >> Appending devices cpio data ...
* >> Appending base_layout cpio data ...
* >> Appending util-linux cpio data ...
* >> Appending auxiliary cpio data ...
* >> Appending busybox cpio data ...
* >> Appending modprobed cpio data ...
* >> Appending modules cpio data ...
* >> Deduping cpio ...
* >> Pre-generating initramfs' /etc/ld.so.cache ...
* >> Compressing cpio data (.xz) ...
xz: Reduced the number of threads from 4 to one. The automatic memory usage limit of 917 MiB is still being exceeded. 1250 MiB of memory is required. Continuing anyway.
*
* You will find the initramfs in '/boot/initramfs-6.1.46-gentoo.img'.
* WARNING... WARNING... WARNING...
* Additional kernel parameters that *may* be required to boot properly: <--- ???
* Do NOT report kernel bugs as genkernel bugs unless your bug
* is about the default genkernel configuration...
*
* Make sure you have the latest ~arch genkernel before reporting bugs.
* Failed to determine session leader; Will not try to stop child processes
(chroot) hc4Gentoo /usr/src/linux-6.1.46-gentoo # ls -l /boot/
total 35016
-rwxr-xr-x 1 root root 3941021 Aug 30 10:31 System.map-6.1.46-gentoo
-rwxr-xr-x 1 root root 218289 Aug 30 10:31 config-6.1.46-gentoo
-rwxr-xr-x 1 root root 5773088 Aug 30 11:33 initramfs-6.1.46-gentoo.img
-rwxr-xr-x 1 root root 25913856 Aug 30 10:31 vmlinuz-6.1.46-gentoo
¶Step 15. mkimage
The mkimage command is used to create images for use with the U-Boot boot loader. Thes eimages can contain the linux kernel, device tree blob, root file system image, firmware images etc., either separate or combined.
# emerge -av u-boot-tools
...
/usr/bin/dumpimage
/usr/bin/fdtgrep
/usr/bin/gen_eth_addr
/usr/bin/img2srec
/usr/bin/mkenvimage
/usr/bin/mkimage
/usr/bin/fw_printenv
(chroot) hc4Gentoo /boot # pwd
/boot
(chroot) hc4Gentoo /boot # ls
System.map-6.1.46-gentoo config-6.1.46-gentoo initramfs-6.1.46-gentoo.img vmlinuz-6.1.46-gentoo
(chroot) hc4Gentoo /boot # mkimage -A arm64 -O linux -T ramdisk -C none -a "0x1080000" -e "0x1080000" -d initramfs-6.1.41-gentoo.img initramfs-6.1.41-gentoo.uimg
(chroot) hc4Gentoo /boot # mkimage -A arm64 -O linux -T ramdisk -C none -a "
0x1080000" -e "0x1080000" -d initramfs-6.1.41-gentoo.img initramfs-6.1.41-gentoo.uimg
Image Name:
Created: Thu Aug 31 11:11:16 2023
Image Type: AArch64 Linux RAMDisk Image (uncompressed)
Data Size: 5768440 Bytes = 5633.24 KiB = 5.50 MiB
Load Address: 01080000
Entry Point: 01080000
(chroot) hc4Gentoo /boot # ls
System.map-6.1.46-gentoo config-6.1.46-gentoo initramfs-6.1.46-gentoo.img initramfs-6.1.46-gentoo.uimg vmlinuz-6.1.46-gentoo
(chroot) hc4Gentoo /boot # cp -Rv /usr/src/linux/arch/arm64/boot/dts/ ./
¶Step 16, /etc/fstab
(chroot) hc4Gentoo /boot # blkid
/dev/sda3: UUID="e7f251ea-94e7-4562-8dba-8b6d0b6a944e" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="f9aaf973-03"
/dev/sda4: PARTUUID="f9aaf973-04"
/dev/sda2: UUID="145cc487-b1ee-4de2-af3e-8580deac54a2" TYPE="swap" PARTUUID="f9aaf973-02"
/dev/sda1: UUID="577C-AD13" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="f9aaf973-01"
- /etc/fstab
# /etc/fstab: static file system information.
#
# See the manpage fstab(5) for more information.
#
# NOTE: The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# NOTE: Even though we list ext4 as the type here, it will work with ext2/ext3
# filesystems. This just tells the kernel to use the ext4 driver.
#
# NOTE: You can use full paths to devices like /dev/sda3, but it is often
# more reliable to use filesystem labels or UUIDs. See your filesystem
# documentation for details on setting a label. To obtain the UUID, use
# the blkid(8) command.
# <fs> <mountpoint> <type> <opts> <dump> <pass>
#LABEL=boot /boot ext4 defaults 1 2
UUID=577C-AD13 /boot vfat defaults 1 2
# / root
UUID=e7f251ea-94e7-4562-8dba-8b6d0b6a944e / ext4 defaults 0 1
#LABEL=swap none swap sw 0 0
#/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
¶Step 17,
(chroot) hc4Gentoo /usr/src/u-boot-odroid-hc4 # pwd
/usr/src/u-boot-odroid-hc4
(chroot) hc4Gentoo /usr/src/u-boot-odroid-hc4 # scp alexlai@192.168.48.131:/home/alexlai/build/u-boot-odrid-hc4/sd_fuse/* ./
alexlai@192.168.48.131's password:
sd_fusing.sh 100% 517 61.5KB/s 00:00
u-boot.bin 100% 855KB 9.0MB/s 00:00
u-boot.bin.sd.bin 100% 856KB 9.1MB/s 00:00
u-boot.bin.usb.bl2 100% 64KB 5.1MB/s 00:00
u-boot.bin.usb.tpl
(chroot) hc4Gentoo /usr/src/u-boot-odroid-hc4 # pwd
/usr/src/u-boot-odroid-hc4
(chroot) hc4Gentoo /usr/src/u-boot-odroid-hc4 # ./sd_fusing.sh /dev/sda
./sd_fusing.sh: line 21: sudo: command not found
./sd_fusing.sh: line 25: sudo: command not found
Finished.
(chroot) hc4Gentoo /usr/src/u-boot-odroid-hc4 # nano sd_fusing.sh
(chroot) hc4Gentoo /usr/src/u-boot-odroid-hc4 # ./sd_fusing.sh /dev/sda
1710+1 records in
1710+1 records out
875888 bytes (876 kB, 855 KiB) copied, 0.0258704 s, 33.9 MB/s
eject: /dev/sda: is not hot-pluggable device <--- ???
Finished.
¶ Step 18, boot.ini
# Default Console Device Setting
setenv condev "console=ttyAML0,115200n8" # on both
# Boot Args
setenv bootargs "root=PARTUUID=e9f2e6ef-02 rootwait rw ${condev} ${amlogic} no_console_suspend fsck.repair=yes net.ifnames=0 clk_ignore_unused quiet splash plymouth.ignore-serial-consoles"
# Set load addresses
setenv dtb_loadaddr "0x20000000"
setenv loadaddr "0x1080000"
setenv initrd_loadaddr "0x4080000"
# Load kernel, dtb and initrd
load mmc ${devno}:1 ${loadaddr} /Image
load mmc ${devno}:1 ${dtb_loadaddr} /dtbs/amlogic/meson-sm1-odroid-hc4.dtb
load mmc ${devno}:1 ${initrd_loadaddr} /initramfs-linux.uimg
#fdt addr ${dtb_loadaddr}
# boot
booti ${loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}