§2023-09-19
linux-6.3-manjaro
/usr/src/.And then move on to hc4Gentoo.yushei.net, to make initramfs...
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 232.9G 0 disk
├─sda1 8:1 0 512M 0 part
├─sda2 8:2 0 16G 0 part
└─sda3 8:3 0 60G 0 part
$ sudo mount /dev/sda3 root
$ ls root
bin boot dev etc home lib lib64 lost+found media mnt opt proc root run sbin sys tmp usr var
$ sudo arch-chroot root /bin/bash
hc4Gentoo / # source /etc/profile
hc4Gentoo / # export PS1="(chroot) $PS1"
(chroot) hc4Gentoo / #
nano /etc/resolv.conf
<-- look like has been setnameserver 8.8.8.8
nameserver 8.8.4.4
(chroot) hc4Gentoo / # ping google.com
PING google.com (172.217.160.110) 56(84) bytes of data.
64 bytes from tsa03s06-in-f14.1e100.net (172.217.160.110): icmp_seq=1 ttl=57 time=3.91 ms
64 bytes from tsa03s06-in-f14.1e100.net (172.217.160.110): icmp_seq=2 ttl=57 time=3.80 ms
/etc/portage/repos.conf/gentoo.conf
(chroot) hc4Gentoo / # mkdir /etc/portage/repos.conf/
(chroot) hc4Gentoo / # /etc/portage/repos.conf/gentoo.conf --> as follows
[gentoo]
location = /var/db/repos/gentoo
sync-type = rsync
sync-uri = rsync://rsync.namerica.gentoo.org/gentoo-portage
auto-sync = yes
priority = 10
(chroot) hc4Gentoo /# mkdir -p /var/db/repos/gentoo
(chroot) hc4Gentoo / # chown portage:portage -R /var/db/repos/
(chroot) hc4Gentoo / # emerge-webrsync
....
# eselect profile list
# eselect profile se 4
# # ls -l /etc/portage/make.profile
lrwxrwxrwx 1 root root 67 Sep 19 06:24 /etc/portage/make.profile -> ../../var/db/repos/gentoo/profiles/default/linux/arm64/17.0/deskto
# emerge -av u-boot-tools
# qlist u-boot-tools
/etc/fw_env.config
/usr/share/man/man1/mkimage.1.bz2
/usr/bin/fdtgrep
/usr/bin/img2srec
/usr/bin/fw_printenv
/usr/bin/mkimage
/usr/bin/dumpimage
/usr/bin/gen_eth_addr
/usr/bin/bmp_logo
/usr/bin/mkenvimage
/usr/bin/fw_setenv
/etc/portgage/make.conf
add these lines# emerge --ask sys-kernel/genkernel
ACCEPT_LICENSE="linux-fw-redistributable"
# emerge --ask sys-kernel/genkernel
# qlist genkernel|grep bin
/usr/share/genkernel/netboot/misc/bin/ashlogin
/usr/share/genkernel/netboot/misc/bin/net-setup
/usr/bin/genkernel
# ls -l /usr/src/
total 4
lrwxrwxrwx 1 root root 18 Sep 19 06:52 linux -> linux-6.3-manjaro/
drwxr-xr-x 26 root root 4096 Sep 19 05:56 linux-6.3-manjaro
# mount /dev/sda1 /boot
(chroot) hc4Gentoo / # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 232.9G 0 disk
├─sda1 8:1 0 512M 0 part /boot
├─sda2 8:2 0 16G 0 part
└─sda3 8:3 0 60G 0 part /
# ls /boot
Image Image.gz boot.ini dtbs initramfs-linux.img initramfs-linux.uimg sd_fusing.sh u-boot.bin
# genkernel --install initramfs
* Gentoo Linux Genkernel; Version 4.3.6
* Using genkernel configuration from '/etc/genkernel.conf' ...
* Running with options: --install initramfs
* Working with Linux kernel 6.3.0 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 eudev 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.3.0.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
# ls /boot
Image Image.gz boot.ini dtbs initramfs-6.3.0.img initramfs-linux.img initramfs-linux.uimg sd_fusing.sh u-boot.bin
# time genkernel all
* Gentoo Linux Genkernel; Version 4.3.6
* Using genkernel configuration from '/etc/genkernel.conf' ...
* Running with options: all
* Working with Linux kernel 6.3.0 for arm64
* Using kernel config file '/usr/share/genkernel/arch/arm64/generated-config' ...
*
* Note: The version above is subject to change (depends on config and status of kernel sources).
* kernel: >> Initializing ...
* >> Running 'make mrproper' ...
* >> Running 'make oldconfig' ...
* >> Ignoring --microcode parameter; Architecture does not support microcode loading ...
* >> Re-running 'make oldconfig' due to changed kernel options ...
* >> Kernel version has changed (probably due to config change) since genkernel start:
* We are now building Linux kernel 6.3.0-arm64 for arm64 ...
* >> Compiling 6.3.0-arm64 Image ...
* >> Installing 6.3.0-arm64 modules (and stripping) ...
* >> Generating module dependency data ...
* >> Compiling out-of-tree module(s) ...
* >> Saving config of successful build to '/etc/kernels/kernel-config-6.3.0-arm64' ...
* initramfs: >> Initializing ...
* >> Appending devices cpio data ...
* >> Appending base_layout cpio data ...
* >> Appending util-linux cpio data ...
* >> Appending eudev 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.
* Kernel compiled successfully!
*
* --no-bootloader set; Skipping bootloader update ...
*
* Required kernel parameter:
*
* root=/dev/$ROOT
*
* Where $ROOT is the device node for your root partition as the
* one specified in /etc/fstab
* If you require Genkernel's hardware detection features, you MUST
* tell your bootloader to use the provided initramfs file '/boot/initramfs-6.3.0-arm64.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.
real 327m4.380s
user 1180m54.158s
sys 103m34.782s
5. mkimage
(chroot) hc4Gentoo /boot # # mkimage -A arm64 -O linux -T ramdisk -C none -a 0x0 -e 0x0 -d initramfs-6.3.0-arm64.img initramfs-6.3.0-arm64.img.uimg
Image Name:
Created: Tue Sep 19 21:54:34 2023
Image Type: AArch64 Linux RAMDisk Image (uncompressed)
Data Size: 9842028 Bytes = 9611.36 KiB = 9.39 MiB
Load Address: 00000000
Entry Point: 00000000
Image Name:
Created: Tue Sep 19 21:43:10 2023
Image Type: AArch64 Linux RAMDisk Image (uncompressed)
Data Size: 9842028 Bytes = 9611.36 KiB = 9.39 MiB
Load Address: 01080000
Entry Point: 01080000
---
- /etc/genkernel.conf
#INSTALL="yes"
#OLDCONFIG="yes"
#MENUCONFIG="no"
#GCONFIG="no"
#NCONFIG="no"
#XCONFIG="no"
#MRPROPER="yes"
#CLEAN="yes"
#MOUNTBOOT="yes"
#SYMLINK="no"
#SAVE_CONFIG="yes"
NOCOLOR="false"
#CLEAR_CACHEDIR="no"
#POSTCLEAR="no"
#CHECK_FREE_DISK_SPACE_BOOTDIR=0
#CHECK_FREE_DISK_SPACE_KERNELOUTPUTDIR=0
#MAKEOPTS="$(portageq envvar MAKEOPTS)"
#NICE=10
#BCACHE="no"
#LVM="no"
#LUKS="no"
#GPG="no"
#KEYCTL="no"
#MICROCODE="all"
#MICROCODE_INITRAMFS="no"
#NFS="no"
#DMRAID="no"
#SSH="no"
#B2SUM="no"
#BUSYBOX="yes"
#MDADM="no"
#MDADM_CONFIG="/etc/mdadm.conf"
#MULTIPATH="no"
#ISCSI="no"
#E2FSPROGS="no"
#UNIONFS="no"
#ZFS="no"
#BTRFS="no"
#XFSPROGS="no"
#FIRMWARE_INSTALL="no"
#FIRMWARE="no"
#FIRMWARE_DIR="/lib/firmware"
#FIRMWARE_FILES=""
#BOOTLOADER="no"
#SANDBOX="yes"
#BOOTFONT="none"
#SPLASH="no"
#SPLASH_THEME="gentoo"
#MODULEREBUILD="yes"
#CMD_CALLBACK=""
#DOKEYMAPAUTO="no"
#KEYMAP="yes"
#KERNEL_AS="as"
#KERNEL_AR="ar"
#KERNEL_CC="gcc"
#KERNEL_LD="ld"
#KERNEL_NM="nm"
#KERNEL_MAKE="make"
#KERNEL_OBJCOPY="objcopy"
#KERNEL_OBJDUMP="objdump"
#KERNEL_RANLIB="ranlib"
#KERNEL_READELF="readelf"
#KERNEL_STRIP="strip"
#UTILS_AS="as"
#UTILS_AR="ar"
#UTILS_CC="gcc"
#UTILS_CXX="g++"
#UTILS_LD="ld"
#UTILS_NM="nm"
#UTILS_MAKE="make"
#CROSS_COMPILE=""
#KERNEL_CROSS_COMPILE=""
#KERNEL_MAKE_DIRECTIVE_OVERRIDE="fooImage"
#KERNEL_BINARY_OVERRIDE="arch/foo/boot/bar"
#TMPDIR="/var/tmp/genkernel"
#BOOTDIR="/boot"
GK_SHARE="${GK_SHARE:-/usr/share/genkernel}"
CACHE_DIR="/var/cache/genkernel"
DISTDIR="${GK_SHARE}/distfiles"
LOGFILE="/var/log/genkernel.log"
LOGLEVEL=1
DEFAULT_KERNEL_SOURCE="/usr/src/linux"
#DEFAULT_KERNEL_CONFIG="${GK_SHARE}/arch/%%ARCH%%/kernel-config"
#BUSYBOX_CONFIG="/path/to/file"
#KERNEL_FILENAME="vmlinuz-%%KV%%"
#KERNEL_SYMLINK_NAME="kernel"
#KERNEL_LOCALVERSION="-%%ARCH%%"
#KERNEL_SOURCES="yes"
#BUILD_STATIC="no"
#GENZIMAGE="no"
#KERNCACHE="/path/to/file.tar.xz"
#KERNEL_MODULES_PREFIX=""
#INITRAMFS_FILENAME="initramfs-%%KV%%.img"
#INITRAMFS_SYMLINK_NAME="initramfs"
#ALLRAMDISKMODULES="no"
#RAMDISKMODULES="yes"
#MINKERNPACKAGE="/path/to/file.tar.xz"
#AMODULES_group="module-to-include another-module"
#MODULES_group1="some-module" #MODULES_group2="" # Load no modules for this group
#LINUXRC="/path/to/custom/linuxrc"
#MODULESPACKAGE="/path/to/file.tar.xz"
#INITRAMFS_OVERLAY=""
#INTEGRATED_INITRAMFS="no"
#COMPRESS_INITRD="yes"
#COMPRESS_INITRD_TYPE="best"
#NETBOOT="no"
#REAL_ROOT="/dev/one/two/gentoo"
Return to Top