linux-mainline-and-mali-allwinner-h6-kernel
linux-mainline-and-mali-allwinner-h6-kernel copied to clipboard
linux-mainline-and-mali-allwinner-h3-h6-kernel
directories:
- /compile/doc/stable-aw - the files in this dir
- /compile/source/linux-stable-616 - the kernel sources checked out from gitrepo
- /compile/result/stable-aw - the resulting kernel, modules etc. tar.gz files
- /compile/doc/kernel-config-options - https://github.com/hexdump0815/kernel-config-options
name: stb-616 - allwinner h313, h616 and h618
INFO: based on warpme minimyth2 patches from https://github.com/warpme/minimyth2
at commit 67c1dec6e93743c8f4de1d5299d06f4036a8ea2b (linux-6.6 subdir)
cd /compile/source/linux-stable-616
minimyth2 h616 patches
for i in /compile/doc/stable-aw/misc.616/patches/minimyth2/*.patch; do echo === $i patch -p1 < $i done
patches from https://patchwork.kernel.org
for i in /compile/doc/stable-aw/misc.616/patches/patchwork/*.diff; do echo === $i patch -p1 < $i done
add some own dtb files
cp -v /compile/doc/stable-aw/misc.616/dtb/.dts arch/arm64/boot/dts/allwinner cp -v /compile/doc/stable-aw/misc.616/dtb/.dtsi arch/arm64/boot/dts/allwinner patch -p0 < /compile/doc/stable-aw/misc.616/patches/add-own-dtb-files-v6.6.patch
make sure mmc devices always end up with the same device number
patch -p0 < /compile/doc/stable-aw/misc.616/patches/fixed-mmc-device-numbering.patch
raise the temp limits a bit to avoid throttling too much
patch -p0 < /compile/doc/stable-aw/misc.616/patches/h616-higher-temps-v6.1.patch
fix/hack eth for h618
patch -p0 < /compile/doc/stable-aw/misc.616/patches/fix-h618-eth-hack.patch
fix kernel version number: + instead of -dirty at the end
patch -p1 < /compile/doc/stable-aw/misc.616/patches/fix-kernel-version-number-v6.6.patch
export ARCH=arm64
scripts/kconfig/merge_config.sh -m arch/arm64/configs/defconfig /compile/doc/kernel-config-options/docker-options.cfg /compile/doc/kernel-config-options/options-to-remove-generic.cfg /compile/doc/stable-aw/misc.616/options/options-to-remove-special.cfg /compile/doc/kernel-config-options/additional-options-generic.cfg /compile/doc/kernel-config-options/additional-options-aarch64.cfg /compile/doc/stable-aw/misc.616/options/additional-options-special.cfg
( cd /compile/doc/kernel-config-options ; git rev-parse --verify HEAD ) > /compile/doc/stable-aw/misc.616/options/kernel-config-options.version
make olddefconfig
make -j 4 Image dtbs modules
cd tools/perf
make
cd ../power/cpupower
make
cd ../../..
export kver=make kernelrelease
echo ${kver}
remove debug info if there and wanted
find . -type f -name '*.ko' | sudo xargs -n 1 objcopy --strip-unneeded
make modules_install mkdir -p /lib/modules/${kver}/tools cp -v tools/perf/perf /lib/modules/${kver}/tools cp -v tools/power/cpupower/cpupower /lib/modules/${kver}/tools cp -v tools/power/cpupower/libcpupower.so.0.0.1 /lib/modules/${kver}/tools/libcpupower.so.0
make headers_install INSTALL_HDR_PATH=/usr
cp -v .config /boot/config-${kver} cp -v arch/arm64/boot/Image /boot/Image-${kver} mkdir /boot/dtb-${kver} cp -v arch/arm64/boot/dts/allwinner/sun50i-h313-.dtb /boot/dtb-${kver}/ cp -v arch/arm64/boot/dts/allwinner/sun50i-h616-.dtb /boot/dtb-${kver}/ cp -v arch/arm64/boot/dts/allwinner/sun50i-h618-.dtb /boot/dtb-${kver}/ cp -v System.map /boot/System.map-${kver} cd /boot update-initramfs -c -k ${kver} #mkimage -A arm64 -O linux -T ramdisk -a 0x0 -e 0x0 -n initrd.img-${kver} -d initrd.img-${kver} uInitrd-${kver} tar cvzf /compile/source/linux-stable-616/${kver}.tar.gz /boot/-${kver} /lib/modules/${kver} cp -v /compile/doc/stable-aw/config.616 /compile/doc/stable-aw/config.616.old cp -v /compile/source/linux-stable-616/.config /compile/doc/stable-aw/config.616 cp -v /compile/source/linux-stable-616/.config /compile/doc/stable-aw/config.616-${kver} cp -v /compile/source/linux-stable-616/*.tar.gz /compile/result/stable-aw