• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

sym-5.10/14-Jan-2024-7,8847,882

sym-5.15/15-Dec-2024-23,98023,976

sym-6.1/15-Dec-2024-34,46034,455

Android.bpD15-Dec-20241.8 KiB5550

MakefileD14-Jan-20241,022 3213

READMED14-Jan-20242.6 KiB6054

kmi_compatibility_test.shD15-Dec-20243.3 KiB10651

kmi_sym_list-7618735.incD14-Jan-2024155.4 KiB5,3245,323

kmi_sym_list-7732866.incD14-Jan-2024118.8 KiB4,3334,332

kmi_sym_list-7739788.incD14-Jan-2024161.6 KiB5,4885,487

kmi_sym_list-7748709.incD14-Jan-2024172.7 KiB5,8255,824

kmi_sym_list-7833008.incD14-Jan-2024179.4 KiB6,0386,037

kmi_sym_list-7855344.incD14-Jan-2024119.3 KiB4,3504,349

kmi_sym_list.SD14-Jan-2024920 3312

kmi_sym_main.cD14-Jan-20241.4 KiB4723

README

1
2#
3# How to build the KMI ABI test kernel module, kmi_sym.ko
4#
5
61. Set up the GKI source.
7   # Set up and export GKI_DIR to be used for kernel module building
8   $ cd $GKI_DIR
9   $ repo init -u https://android.googlesource.com/kernel/manifest \
10       -b common-android12-5.10
11   $ repo sync
12   See "GKI Monthly Branch Handbook" for details.
132. Build arm64 GKI under $GKI_DIR
14   $ BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh -j16
153. Download a supported kernel symbol file, vmlinux.symvers, from GKI AB:
16   $ export GKI_BID=7618735
17   https://ci.android.com/builds/submitted/$GKI_BID/kernel_aarch64/latest
18   $ cp vmlinux.symvers $ANDROID_BUILD_TOP/development/gki/kmi_abi_chk/vmlinux.symvers-$GKI_BID
194. Replace the Module.symvers just built with the supported kernel symbol file.
20   $ cp vmlinux.symvers $GKI_DIR/out/android12-5.10/common/Module.symvers
215. Create the KMI symbol list include file:
22   $ cd development/gki/kmi_abi_chk
23   $ cp $GKI_DIR/out/android12-5.10/common/Module.symvers vmlinux.symvers-$GKI_BID
24   $ awk '{printf("\t.xword\t%s\n",$2)}' vmlinux.symvers-$GKI_BID >> kmi_sym_list-$GKI_BID.inc
25   Note that kmi_sym_list-7618735.inc included in the current directory is a
26   version modified from the one based on vmlinux.symvers of build 7618735, the
27   initial GKI 5.10 released in July, 2021. Search b/197035344 for details.
286. Build the kernel module
29   $ make ARCH=arm64 CROSS_COMPILE=aarch64 LLVM=1 LLVM_IAS=1 LTO=thin
30
31A few prebuilt test kernel modules, kmi_sym-*.ko, for arm64 GKI 5.10
322021-07 and later builds is included under prebuilts/ directory.
33
34#
35# How to use/run KMI test kernel module, kmi_sym.ko, on GKI
36#
37
381. Copy the test kernel module to the Android device
39   $ adb push kmi_sym.ko /data/local/tmp
402. "Root" the Android device we'd like to run the test
41   $ adb root
423. Check the kernel information on the device
43   emulator64_arm64:/ # uname -a
44   Linux localhost 5.10.43-android12-9-00005-g376ecc372342-ab7614753 #1 SMP PREEMPT Thu Aug 5 15:12:49 UTC 2021 aarch64
454. Load the test kernel module
46   emulator64_arm64:/ # lsmod | grep kmi_sym
47   emulator64_arm64:/ # insmod /data/local/tmp/kmi_sym.ko; echo $?
48   0
495. Verify the test kernel module is loaded successfully
50   emulator64_arm64:/ # lsmod | grep kmi_sym
51   kmi_sym                57344  0
52   emulator64_arm64:/ # dmesg | grep KMI
53   [ 1669.833480] 5317 KMI ABI symbols at 00000000d34c59ea
546. Unload the test kernel module
55   emulator64_arm64:/ # rmmod kmi_sym; echo $?
56   0
57   emulator64_arm64:/ # dmesg | grep KMI
58   [ 1669.833480] 5317 KMI ABI symbols at 00000000d34c59ea
59   [ 1860.571944] Cleaning up KMI ABI.
60