-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme.qcn
54 lines (50 loc) · 2.82 KB
/
readme.qcn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# directories:
# - /compile/doc/stable-qc - the files in this dir
# - /compile/source/linux-stable-qcn - the kernel sources checked out from gitrepo
# - /compile/result/stable-qc - the resulting kernel, modules etc. tar.gz files
# - /compile/doc/kernel-config-options - https://github.com/hexdump0815/kernel-config-options
# name: stb-qcn - msm8998 qualcom asus novago
# INFO: this is not working yet and still very much work in progress
# based on linux-stable
cd /compile/source/linux-stable-qcn
# patches:
# fix kernel version number: + instead of -dirty at the end
patch -p1 < /compile/doc/stable-qc/misc.qcn/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-qc/misc.qcn/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-qc/misc.qcn/options/additional-options-special.cfg
( cd /compile/doc/kernel-config-options ; git rev-parse --verify HEAD ) > /compile/doc/stable-qc/misc.qcn/options/kernel-config-options.version
make olddefconfig
make -j 8 Image dtbs modules
cd tools/perf
# this is to avoid compile errors
export NO_JEVENTS=1
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}
# just in case to have it around
#mkimage -A arm64 -O linux -T kernel -C none -a 0x1080000 -e 0x1080000 -n linux-${kver} -d arch/arm64/boot/Image /boot/uImage-${kver}
mkdir -p /boot/dtb-${kver}
cp -v arch/arm64/boot/dts/qcom/msm8998*.dtb /boot/dtb-${kver}
cp -v System.map /boot/System.map-${kver}
cd /boot
update-initramfs -c -k ${kver}
# just in case to have it around
#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-qcn/${kver}.tar.gz /boot/*-${kver} /lib/modules/${kver}
cp -v /compile/doc/stable-qc/config.qcn /compile/doc/stable-qc/config.qcn.old
cp -v /compile/source/linux-stable-qcn/.config /compile/doc/stable-qc/config.qcn
cp -v /compile/source/linux-stable-qcn/.config /compile/doc/stable-qc/config.qcn-${kver}
cp -v /compile/source/linux-stable-qcn/*.tar.gz /compile/result/stable-qc