“Build Linux for Hikey log”的版本间的差异

来自个人维基
跳转至: 导航搜索
第39行: 第39行:
  
 
</source>                                           
 
</source>                                           
 +
* Errors:
 +
scripts/extract-cert.c:21:25: fatal error: openssl/bio.h: 沒有此一檔案或目錄
 +
==> sudo apt install libssl-dev
 +
  
 
2. Remove printk log:
 
2. Remove printk log:

2019年10月22日 (二) 11:18的版本

1. How to build kernel
cd /data/cj.chang/hikey960/tools-images-hikey960/build-from-source
./genimg.sh

# AOSP root directory:
AOSP_ROOTDIR=/data/cj.chang/hikey960/android
# AOSP build output directory:
PRODUCT_OUT=${AOSP_ROOTDIR}/out/target/product/hikey960/
# RAMDISK_IMG:
RAMDISK_IMG=${PRODUCT_OUT}/ramdisk.img
 
# kernel source code is in this repository:
#    https://github.com/96boards-hikey/linux/
# Kernel source code directory:
KERNEL_DIR=/data/cj.chang/hikey960/hikey-linaro/
# Tool directory: for mkbootimg and mkdtimg
GEN_IMAGES_DIR=/data/cj.chang/hikey960/tools-images-hikey960/build-from-source
 
export ARCH=arm64
export CROSS_COMPILE=${AOSP_ROOTDIR}/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
 
cd ${KERNEL_DIR}
make distclean
make hikey960_defconfig
make -j7 Image.gz
make hisilicon/hi3660-hikey960.dtb
 
cp arch/arm64/boot/Image.gz ${GEN_IMAGES_DIR}/.
cp arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dtb ${GEN_IMAGES_DIR}/.
 
cd ${GEN_IMAGES_DIR}
# Note: here build result boot.img and dt.img are in folder ${PRODUCT_OUT}
#       To change this, change --output and -o.
./mkbootimg  --kernel Image.gz --ramdisk ${RAMDISK_IMG} --cmdline "loglevel=15 androidboot.hardware=hikey960 androidboot.selinux=permissive firmware_class.path=/system/etc/firmware" --base 0x0 --tags-addr 0x07A00000 --kernel_offset 0x00080000 --ramdisk_offset 0x07c00000 --os_version 7.0 --os_patch_level 2016-08-05  --output ${PRODUCT_OUT}/boot.img
./mkdtimg -d hi3660-hikey960.dtb -s 2048 -c -o ${PRODUCT_OUT}/dt.img
 
echo "dt.img boot.img build finished!"
  • Errors:

scripts/extract-cert.c:21:25: fatal error: openssl/bio.h: 沒有此一檔案或目錄
==> sudo apt install libssl-dev


2. Remove printk log:
(1). CPU7: update max cpu_capacity 1024

implemented in ./kernel/sched/fair.c:7131
undefine CONFIG_SCHED_DEBUG in .config

(2) audit: audit_lost=54513 audit_rate_limit=5 audit_backlog_limit=64

implemented in ./kernel/audit.c:277
remark it. if(print)==> if(0)

3. if mouse not work
==> remove type-C connection cable.
If OTG is connected, the log is shown

[    6.633955] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:3
[    6.633963] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:3
[    6.633970] [USB3][hisi_usb_otg_event]event: 3
[    6.634001] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in:0
[    6.634008] [USB3][hisi_usb_otg_event]hisi_usb_otg_event in otg:0
[    6.634014] [USB3][hisi_usb_otg_event]event: 0
[    6.634021] [USB3][hisi_dwc3_wake_lock]usb otg wake lock
[    6.634032] [USB3][hisi_usb_otg_event]schedule event_work wait:0]

If type-A device is found:

[    7.502211] usb 1-1.1: new full-speed USB device number 3 using xhci-hcd
[    7.614859] usb 1-1.1: New USB device found, idVendor=046d, idProduct=c534
[    7.626342] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    7.680763] usb 1-1.1: Product: USB Receiver
[    7.697470] usb 1-1.1: Manufacturer: Logitech
[    7.734436] input: Logitech USB Receiver as /devices/platform/soc/ff200000.hisi_usb/ff100000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.0/0003:046D:C534.0001/input/input1
[    7.806769] hid-generic 0003:046D:C534.0001: input,hidraw0: USB HID v1.11 Keyboard [Logitech USB Receiver] on usb-xhci-hcd.0.auto-1.1/input0
[    7.825661] input: Logitech USB Receiver as /devices/platform/soc/ff200000.hisi_usb/ff100000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1:1.1/0003:046D:C534.0002/input/input2
[    7.867323] hid-generic 0003:046D:C534.0002: input,hiddev96,hidraw1: USB HID v1.11 Mouse [Logitech USB Receiver] on usb-xhci-hcd.0.auto-1.1/input1
[    7.962001] usb 1-1.5: new high-speed USB device number 4 using xhci-hcd