forked from LineageOS/android_kernel_sony_msm8974
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME_Xperia
73 lines (54 loc) · 3.02 KB
/
README_Xperia
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#
# Copyright (C) 2016 Sony Mobile Communications Inc.
# All rights, including trade secret rights, reserved.
#
Configuration files can be found in arch/arm/configs.
Xperia Z2 D6543 => shinano_sirius_defconfig
Xperia Z3 Dual D6683 => shinano_leo_dsds_defconfig
Xperia Z3 D6603 => shinano_leo_defconfig
Xperia Z3 Tablet Compact SGP611 => shinano_scorpion_windy_defconfig
Xperia Z3 Compact D5803 => shinano_aries_defconfig
Xperia Z2 Tablet SGP511 => shinano_castor_windy_defconfig
Xperia Z2a D6563 => shinano_canopus_defconfig
Xperia Z2 Tablet SGP541 => shinano_castor_defconfig
Xperia Z2 Tablet SGP551 => shinano_castor_brazil_defconfig
Xperia Z3 Tablet Compact SGP621 => shinano_scorpion_defconfig
How to build your kernel:
Prerequisites:
* ramdisk.img - root fs
* mkbootimg - boot.img generator
* dtbTool - DTB combiner
You can obtain it from various trusted sites including
https://www.codeaurora.org/
* The ARM cross-compiler
You can use prebuilt executable binary which is included in
standard Android repository. Please visit to external site.
In case of this platform, we recommend to use gcc 4.9 or later
such as arm-linux-androideabi-4.9 to avoid known issues.
Step 1: Build Your Kernel (zImage-dtb)
$ cd kernel
$ export ARCH=arm
$ export PATH=<path-to-cross-compiler-executables>:$PATH
NOTE: Please set the location of the ARM cross-compiler.
ex) prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin
$ export CROSS_COMPILE=<toolchain-prefix>
NOTE: Please set the prefix of the ARM cross-compiler.
ex) arm-linux-androideabi-
$ make shinano_sirius_defconfig
$ make
You can see arch/arm/boot/zImage-dtb if you succeed in building the kernel.
Step 2: Prepare Device Tree Image (dt.img)
(In the Linux Kernel directory)
$ dtbTool -o dt.img -s 2048 -p scripts/dtc/ arch/arm/boot/
NOTE: The input path is not arch/arm/boot.
Step 3: Assembling the boot.img
(In the Linux Kernel directory)
$ mkbootimg \
--kernel arch/arm/boot/zImage-dtb \
--ramdisk ramdisk.img \
--cmdline "console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=23 msm_rtb.filter=0x3b7 ehci-hcd.park=3 androidboot.bootdevice=msm_sdcc.1 vmalloc=300M dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y" \
--base 0x00000000 \
--pagesize 2048 \
--dt dt.img \
--ramdisk_offset 0x02000000 --tags_offset 0x01E00000 \
--output boot.img