§2023-08-24 Kernel

¶Step 1. Do a native Compile

(chroot) hc4Gentoo /usr/src # cd linux-odroid-hc4/
(chroot) hc4Gentoo /usr/src/linux-odroid-hc4 # make odroidg12_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
(chroot) hc4Gentoo /usr/src/linux-odroid-hc4 # time make -j4
...
fs/logfs/readwrite.c: In function ‘fill_shadow_tree’:
fs/logfs/readwrite.c:1282:21: error: the comparison will always evaluate as ‘true’ for the address of ‘alias_map’ will never be NULL [-Werror=address]
 1282 |                 if (block->alias_map)
      |                     ^~~~~
In file included from fs/logfs/readwrite.c:19:
fs/logfs/logfs.h:304:23: note: ‘alias_map’ declared here
  304 |         unsigned long alias_map[LOGFS_BLOCK_FACTOR / BITS_PER_LONG];
      |                       ^~~~~~~~~
  CC [M]  fs/lockd/svc.o
  CC [M]  fs/jfs/jfs_metapage.o
  CC [M]  fs/jffs2/xattr_user.o
  CC [M]  fs/jffs2/security.o
  CC [M]  fs/jfs/jfs_logmgr.o
  CC [M]  fs/jffs2/acl.o
cc1: all warnings being treated as errors
make[2]: *** [scripts/Makefile.build:337: fs/logfs/readwrite.o] Error 1
make[1]: *** [scripts/Makefile.build:651: fs/logfs] Error 2
make[1]: *** Waiting for unfinished jobs....
  CC [M]  fs/jffs2/compr_rubin.o
  CC [M]  fs/lockd/svclock.o
  CC [M]  fs/lockd/svcshare.o
  CC [M]  fs/jffs2/compr_rtime.o
  CC [M]  fs/jffs2/compr_zlib.o
  CC [M]  fs/jfs/jfs_txnmgr.o
  CC [M]  fs/jfs/jfs_uniupr.o
  CC [M]  fs/jffs2/compr_lzo.o
  CC [M]  fs/lockd/svcproc.o
  CC [M]  fs/lockd/svcsubs.o
  CC [M]  fs/jffs2/summary.o
  CC [M]  fs/lockd/mon.o
  CC [M]  fs/jfs/resize.o
  LD [M]  fs/jffs2/jffs2.o
  CC [M]  fs/jfs/xattr.o
  CC [M]  fs/lockd/xdr.o
  CC [M]  fs/jfs/ioctl.o
  CC [M]  fs/jfs/acl.o
  CC [M]  fs/lockd/clnt4xdr.o
  CC [M]  fs/lockd/xdr4.o
  CC [M]  fs/lockd/svc4proc.o
  LD [M]  fs/jfs/jfs.o
  CC [M]  fs/lockd/procfs.o
  LD [M]  fs/lockd/lockd.o
make: *** [Makefile:1102: fs] Error 2

real    10m25.729s
user    37m55.363s
sys     2m45.160s

¶Step 2. go back to gentoo linux source

Kernel
Install the kernel tools and firmware.

emerge --ask sys-kernel/gentoo-sources
emerge --ask sys-kernel/genkernel
emerge --ask sys-fs/cryptsetup
emerge --ask sys-kernel/linux-firmware
  • make menuconfig
    • Navigate to the Joystick Driver Section:
      • Inside the configuration menu, navigate to the section that deals with joystick or game controller drivers. This might be located under "Device Drivers --> Input Device Support --> Joy Stick Interface" or a similar category.
(chroot) hc4Gentoo /usr/src/linux-6.1.46-gentoo # make menuconfig


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

(chroot) hc4Gentoo /usr/src/linux-6.1.46-gentoo # time make -j4

  LD [M]  sound/drivers/snd-serial-u16550.ko
  LD [M]  sound/usb/6fire/snd-usb-6fire.ko
  LD [M]  sound/usb/caiaq/snd-usb-caiaq.ko
  LD [M]  sound/usb/bcd2000/snd-bcd2000.ko
  LD [M]  sound/usb/hiface/snd-usb-hiface.ko
  LD [M]  sound/usb/line6/snd-usb-line6.ko
  LD [M]  sound/usb/line6/snd-usb-pod.ko
  LD [M]  sound/usb/line6/snd-usb-podhd.ko
  LD [M]  sound/usb/line6/snd-usb-toneport.ko
  LD [M]  sound/usb/line6/snd-usb-variax.ko
  LD [M]  sound/usb/misc/snd-ua101.ko

real    63m18.667s
user    215m50.610s
sys     19m16.718s

# make modules_install

¶ Step 3. move compiled kernel into boot

(chroot) n2Mnjaro /usr/src/linux-6.1.46-gentoo # mount /dev/sdb1 /boot
(chroot) n2Mnjaro /usr/src/linux-6.1.46-gentoo # cp -v arch/arm64/boot/Image*  /boot/
(chroot) n2Mnjaro /usr/src/linux-6.1.46-gentoo # cp -Rv arch/arm64/boot/dts/  /boot/
Return to Top