(AXT1800) Which `distfeeds.conf`(kmod repo) should I use for self-compiled firmware?

I compiled firmware from open source code by gl-infra-builder. It seems the kernel version from open source code doesn’t match any gl-inet distfeeds repo.

My kernel version in open source self-compiled firmware is 4.4.60-1-5a275068e02c23caff9109dc0a624b90 (No change in open source kernel code), but gl-inet official kmod repo need kernel version 4.4.60-1-5c79df825364eed582b9e6554972c148.

This is my self-compiled firmware kernel info:

# opkg info kernel
Package: kernel
Version: 4.4.60-1-5a275068e02c23caff9109dc0a624b90
Depends: libc
Status: install user installed
Architecture: arm_cortex-a7
Installed-Time: 1662185567

This is the kernel mod distfeeds that I used:

src/gz glinet_core https://fw.gl-inet.cn/releases/v21.02-SNAPSHOT/kmod-4.0/arm_cortex-a7/ip60xx

When I install kernel mod from this repo, I will get error info:

# opkg install --force-depends kmod-usb-storage-uas
Unknown package 'kmod-usb-storage-uas'.
Collected errors:
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 4.4.60-1-5c79df825364eed582b9e6554972c148) for kmod-scsi-core
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-scsi-core found, but incompatible with the architectures configured
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 4.4.60-1-5c79df825364eed582b9e6554972c148) for kmod-usb-storage
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-usb-storage found, but incompatible with the architectures configured
 * pkg_hash_check_unresolved: cannot find dependency kernel (= 4.4.60-1-5c79df825364eed582b9e6554972c148) for kmod-usb-storage-uas
 * pkg_hash_fetch_best_installation_candidate: Packages for kmod-usb-storage-uas found, but incompatible with the architectures configured
 * opkg_install_cmd: Cannot install package kmod-usb-storage-uas.

Is there any solution to force install this kernel mod, skip these errors or compile a firmware with same kernel version that matches the official repo dependency?

Maybe I use the wrong kmod repo, is there a kmod repo that matches the self-complied kernel version?

You can manually change the kernel hash to be the same as your kmod repo hash before compiling the firmware so that you can work with glinet or other openwrt kmod repo.

git diff include/kernel.mk
diff --git a/include/kernel.mk b/include/kernel.mk
index 56fa06b..9b4d335 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -78,6 +78,8 @@ else
   endif
 endif
 
+LINUX_VERMAGIC:=5c79df825364eed582b9e6554972c148
+
 ifneq (,$(findstring uml,$(BOARD)))
   LINUX_KARCH=um
 else ifneq (,$(findstring $(ARCH) , aarch64 aarch64_be ))

Note: after modifying the hash, you need to execute the following command to recompile kernel.

make target/linux/{clean,compile}
1 Like

It works for me, thanks a lot for your solution.