Hikey970 Kernel Development Guide

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 8

HiKey970
Kernel Development Guide
Issue 01
Date 2018-03-11
Issue 01 (
2018-03-11
) HiSilicon Proprietary and Confidential
Copyright © HiSilicon Technologies Co., Ltd.
i
Copyright © HiSilicon Technologies Co., Ltd. 2018. All rights reserved.
No part of this document may be reproduced or transmitted in any form or by any means without prior written
consent of HiSilicon Technologies Co., Ltd.
Trademarks and Permissions
, , and other HiSilicon icons are trademarks of HiSilicon Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective holders.
Notice
The purchased products, services and features are stipulated by the contract made between HiSilicon and the
customer. All or part of the products, services and features described in this document may not be within the
purchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information,
and recommendations in this document are provided "AS IS" without warranties, guarantees or
representations of any kind, either express or implied.
The information in this document is subject to change without notice. Every effort has been made in the
preparation of this document to ensure accuracy of the contents, but all statements, information, and
recommendations in this document do not constitute a warranty of any kind, express or implied.
HiSilicon Technologies Co., Ltd.
Address: Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China
Website: http://www.hisilicon.com
Email: support@hisilicon.com
HiKey970
Kernel Development Guide Change History
Issue 01 (2018-03-11) HiSilicon Proprietary and Confidential
Copyright © HiSilicon Technologies Co., Ltd.
i
Change History
Changes between document issues are cumulative. The latest document issue
contains all the changes made in earlier issues.
Issue 01 (2018-03-11)
The first version.
HiKey970
Kernel Development Guide Contents
Issue 01 (2018-03-11) HiSilicon Proprietary and Confidential
Copyright © HiSilicon Technologies Co., Ltd.
ii
Contents
Change History .................................................................................................................................. i
Contents ............................................................................................................................................ ii
1 Compiling the image .................................................................................................................... 1
1.1 Download the code of Hikey970 on GitHub .................................................................................................... 1
1.2 Prepare tools and files ...................................................................................................................................... 1
1.2.1 Create a tools folder ................................................................................................................................ 1
1.2.2 Copy ramdisk.img and mkbootimg to the tools Directory ...................................................................... 1
1.2.3 Modify the compilation script ................................................................................................................. 1
1.3 Compile ............................................................................................................................................................ 2
1.3.1 Run build_kernel.sh ................................................................................................................................ 2
2 Loading the image ......................................................................................................................... 3
2.1 Entering the FastBoot mode ............................................................................................................................. 3
2.2 Load the boot image ......................................................................................................................................... 3
HiKey970
Kernel Development Guide 1 Compiling the image
Issue 01 (2018-03-11) HiSilicon Proprietary and Confidential
Copyright © HiSilicon Technologies Co., Ltd.
1
1
Compiling the image
1.1 Download the code of Hikey970 on GitHub
Git command:
git clone https://github.com/96boards-hikey/linux.git
Note: after the code is downloaded, switch to the hikey970 branch (Branch Name:
origin/hikey970-v4.9).
1.2 Prepare tools and files
1.2.1 Create a tools folder
Create a “tools” folder in the same level directory of the “linux” directory.
./linux/arch
./linux/mm
./linux/kernel
./tools/
1.2.2 Copy ramdisk.img and mkbootimg to the tools Directory
Copy the compiled ramdisk.img and mkbootimg into the tools directory.
1.2.3 Modify the compilation script
Move the build_kernel.sh compilation script to the tools folder; Edit the compile script
CROSS_COMPILE parameters to specify the compiler tool according to your own
compilation environment, For example:
export
CROSS_COMPILE=/home/xxxxxx/hikey970/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-
android-4.9/bin/aarch64-linux-android-
HiKey970
Kernel Development Guide 1 Compiling the image
Issue 01 (2018-03-11) HiSilicon Proprietary and Confidential
Copyright © HiSilicon Technologies Co., Ltd.
2
1.3 Compile
1.3.1 Run build_kernel.sh
Execute "./build_kernel.sh" in the tools directory to compile the image. After the compilation
is completed, the boot.img can be generated under “out/target/product/hikey970”.
HiKey970
Kernel Development Guide 2 Loading the image
Issue 01 (2018-03-11) HiSilicon Proprietary and Confidential
Copyright © HiSilicon Technologies Co., Ltd.
3
2
Loading the image
2.1 Entering the FastBoot mode
Input in ADB mode: adb reboot bootloader or dial the back of the code switch 3 (EXT_BOOT)
to ON, and press the RESET key to restart.
2.2 Load the boot image
Input in Fastboot mode: fastboot flash boot + "boot image path" starts to load the image, and
then input “fastboot reboot” to normal start.

Navigation menu