I brought all the relevant changes related to the 5.10 kernel to the openwrt 21.02 branch. But I am facing one particular issue which breaks the build process.
make[2]: Entering directory '/home/shaheen/openwrt/package/firmware/linux-firmware'
mkdir -p /home/shaheen/openwrt/dl
SHELL= flock /home/shaheen/openwrt/tmp/.linux-firmware-20211216.tar.xz.flock -c ' /home/shaheen/openwrt/scripts/download.pl "/home/shaheen/openwrt/dl" "linux-firmware-20211216.tar.xz" "eeddb4e6bef31fd1a3757f12ccc324929bbad97855c0b9ec5ed780f74de1837d" "" "@KERNEL/linux/kernel/firmware" '
echo "r8169-firmware" >> /home/shaheen/openwrt/staging_dir/target-x86_64_musl/pkginfo/linux-firmware.default.install
echo "bnx2-firmware" >> /home/shaheen/openwrt/staging_dir/target-x86_64_musl/pkginfo/linux-firmware.default.install
make[2]: Leaving directory '/home/shaheen/openwrt/package/firmware/linux-firmware'
time: package/firmware/linux-firmware/compile#1.20#0.32#1.33
make[2]: Entering directory '/home/shaheen/openwrt/package/firmware/prism54-firmware'
make[2]: Nothing to be done for 'compile'.
make[2]: Leaving directory '/home/shaheen/openwrt/package/firmware/prism54-firmware'
time: package/firmware/prism54-firmware/compile#0.30#0.06#0.33
make[2]: Entering directory '/home/shaheen/openwrt/package/kernel/linux'
rm -f /home/shaheen/openwrt/build_dir/target-x86_64_musl/linux-x86_64/packages/.configured_*
rm -f /home/shaheen/openwrt/staging_dir/target-x86_64_musl/stamp/.linux_installed
( if [ -f /home/shaheen/openwrt/staging_dir/target-x86_64_musl/packages/linux.list ]; then /home/shaheen/openwrt/scripts/clean-package.sh "/home/shaheen/openwrt/staging_dir/target-x86_64_musl/packages/linux.list" "/home/shaheen/openwrt/staging_dir/target-x86_64_musl"; fi; )
touch /home/shaheen/openwrt/build_dir/target-x86_64_musl/linux-x86_64/packages/.configured_68b329da9893e34099c7d8ad5cb9c940
rm -f /home/shaheen/openwrt/build_dir/target-x86_64_musl/linux-x86_64/packages/.built_2c7a09cd05b66a539263fa44204a3555
touch /home/shaheen/openwrt/build_dir/target-x86_64_musl/linux-x86_64/packages/.built_2c7a09cd05b66a539263fa44204a3555_check
touch /home/shaheen/openwrt/build_dir/target-x86_64_musl/linux-x86_64/packages/.built_2c7a09cd05b66a539263fa44204a3555
rm -rf /home/shaheen/openwrt/build_dir/target-x86_64_musl/linux-x86_64/packages/.pkgdir/kernel.installed /home/shaheen/openwrt/build_dir/target-x86_64_musl/linux-x86_64/packages/.pkgdir/kernel
mkdir -p /home/shaheen/openwrt/build_dir/target-x86_64_musl/linux-x86_64/packages/.pkgdir/kernel
# nothing to do
touch /home/shaheen/openwrt/build_dir/target-x86_64_musl/linux-x86_64/packages/.pkgdir/kernel.installed
mkdir -p /home/shaheen/openwrt/staging_dir/target-x86_64_musl/root-x86/stamp
SHELL= flock /home/shaheen/openwrt/tmp/.root-copy.flock -c 'cp -fpR /home/shaheen/openwrt/build_dir/target-x86_64_musl/linux-x86_64/packages/.pkgdir/kernel/. /home/shaheen/openwrt/staging_dir/target-x86_64_musl/root-x86/'
touch /home/shaheen/openwrt/staging_dir/target-x86_64_musl/root-x86/stamp/.kernel_installed
sed: can't read /home/shaheen/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-5.10.96/modules.builtin: No such file or directory
Packaged contents of /home/shaheen/openwrt/build_dir/target-x86_64_musl/linux-x86_64/packages/ipkg-x86_64/kernel into /home/shaheen/openwrt/bin/targets/x86/64/packages/kernel_5.10.96-1-447d68e2a8b3dcff08803345d319c942_x86_64.ipk
grep: /home/shaheen/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-5.10.96/modules.builtin: No such file or directory
grep: /home/shaheen/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-5.10.96/modules.builtin: No such file or directory
grep: /home/shaheen/openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-5.10.96/modules.builtin: No such file or directory
Following are the changes I have done to back port kernel from master branch to the 21.02 branch
- Copied following folders and files from the master to 21.02 branch
1 target/linux/generic/backport-5.10/
2 target/linux/generic/config-5.10
3 target/linux/generic/hack-5.10/
4 target/linux/generic/pending-5.10/
5 target/linux/x86/64/config-5.10
6 target/linux/x86/config-5.10
7 target/linux/x86/generic/config-5.10
8 target/linux/x86/geode/config-5.10
9 target/linux/x86/legacy/config-5.10
10 target/linux/x86/patches-5.10/`
- Compared and modified the following files to support the kernel 21.02 changes.
1 modified: include/kernel-version.mk
2 modified: package/kernel/linux/modules/block.mk
3 modified: package/kernel/linux/modules/crypto.mk
4 modified: package/kernel/linux/modules/fs.mk
5 modified: package/kernel/linux/modules/netdevices.mk
6 modified: package/kernel/linux/modules/netfilter.mk
7 modified: package/kernel/linux/modules/netsupport.mk
8 modified: package/kernel/linux/modules/other.mk
9 modified: package/kernel/linux/modules/usb.mk
10 modified: target/linux/x86/Makefile`
While building firmware the modules.builtin(build_dir/target-x86_64_musl/linux-x86_64/linux-5.10.96/modules.builtin) file is not getting created inside the build directory which is breaking the build process. When I copy this file from the master branch build_dir and keep it inside the build_dir of the 21.02 branch it will compile successfully. But that is not a permanent solution.
Can anyone suggest how to fix this issue?