自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

OpenHarmony中Linux內(nèi)核手動(dòng)編譯調(diào)試解讀

原創(chuàng)
系統(tǒng) OpenHarmony
本篇帶給大家OpenHarmony 3.1Beta版本linux內(nèi)核手動(dòng)編譯調(diào)試的三個(gè)步驟。

??想了解更多內(nèi)容,請(qǐng)?jiān)L問:??

??51CTO和華為官方合作共建的鴻蒙技術(shù)社區(qū)??

??https://harmonyos.51cto.com??

一、OpenHarmony手動(dòng)編譯Linux內(nèi)核

1.首次編譯標(biāo)準(zhǔn)系統(tǒng)

./build.sh --product-name Hi3516DV300 --ccache

2.編譯完成在編譯的內(nèi)核

在OpenHarmony-v3.1-Beta/out/KERNEL_OBJ/kernel/src_tmp/linux-5.10目錄下

配置編譯環(huán)境變量

export OHOS_ROOT=/home/weimin/OpenHarmony/OpenHarmony-v3.1-Beta
export PATH=$OHOS_ROOT/prebuilts/clang/ohos/linux-x86_64/llvm/bin:$PATH
export PATH=$OHOS_ROOT/prebuilts/gcc/linux-x86/arm/gcc-linaro-7.5.0-arm-linux-gnueabi/bin:$PATH
export MAKE_OPTIONS="ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- CC=clang HOSTCC=clang"
export PRODUCT_PATH=vendor/hisilicon/Hi3516DV300

編譯內(nèi)核

make ${MAKE_OPTIONS} menuconfig hi3516dv300_standard_defconfig
或者
make ${MAKE_OPTIONS} menuconfig hi3516dv300_small_defconfig
make ${MAKE_OPTIONS} uImage

編譯完成在out/KERNEL_OBJ/kernel/src_tmp/linux-5.10/arch/arm/boot目錄下生成uImage,zImage-dtb,zImage和Image等鏡像文件。

二、手動(dòng)打包ramdisk鏡像

進(jìn)入ramdisk的文件目錄執(zhí)行如下命令:

進(jìn)入ramdisk的文件目錄執(zhí)行如下命令:
find . | cpio -c -o -v |gzip >../ramdisk.img

三、打包ramdisk.img和zImage-dtb生成boot.img

ohos.its文件內(nèi)容如下:

/dts-v1/;

/ {
description = "U-Boot uImage source file for Hi3516DV300";
#address-cells = <1>;

images {
kernel@1 {
description = "Linux kernel for Hi3516DV300";
data = /incbin/("./zImage-dtb");
type = "kernel";
arch = "arm";
os = "linux";
compression = "none";
load = <0x82000000>;
entry = <0x82000000>;
};
ramdisk@1 {
description = "ohos Ramdisk Image";
data = /incbin/("./ramdisk.img");
type = "ramdisk";
arch = "arm";
os = "linux";
compression = "none";
load = <0x84000000>;
entry = <0x84000000>;
};
};

configurations {
default = "conf@boot";
conf@boot {
description = "booting ARM Linux Kernel Image";
kernel = "kernel@1";
ramdisk = "ramdisk@1";
};
};
};

data = /incbin/(“./zImage-dtb”);指定zImage文件的路徑

data = /incbin/(“./ramdisk.img”); 指定ramdisk文件的路徑

如果ohos.its沒有修改,將ohos.its、ramdisk.img和zImage-dtb文件放入同一目錄下,執(zhí)行下面命令生成boot.img:

mkimage -f ohos.its boot.img

??想了解更多內(nèi)容,請(qǐng)?jiān)L問:??

??51CTO和華為官方合作共建的鴻蒙技術(shù)社區(qū)??

??https://harmonyos.51cto.com??

責(zé)任編輯:jianghua 來源: 鴻蒙社區(qū)
相關(guān)推薦

2023-04-10 09:44:22

內(nèi)核鼠標(biāo)調(diào)試鴻蒙

2023-02-01 16:28:30

Linux內(nèi)核鴻蒙

2010-01-22 11:01:04

linux內(nèi)核模塊

2014-08-28 15:08:35

Linux內(nèi)核

2010-07-20 10:04:25

Linux內(nèi)核編譯

2017-03-27 18:05:49

Linux內(nèi)核編譯與開發(fā)

2021-10-17 19:52:40

Python:源碼編譯器

2010-03-02 16:13:56

Linux升級(jí)

2009-10-16 09:45:41

Linux內(nèi)核操作系統(tǒng)

2009-12-17 15:18:47

2023-10-05 15:47:04

Linux內(nèi)核編譯

2011-01-04 17:00:32

Linux內(nèi)核編譯

2010-04-12 11:19:47

編譯內(nèi)核模塊

2021-05-26 07:53:58

Linux運(yùn)維Linux系統(tǒng)

2010-02-26 10:17:15

Linux uClin

2010-04-20 10:12:05

2010-02-02 13:26:53

Linux內(nèi)核

2009-10-23 16:35:44

linux Debia

2023-05-08 08:05:42

內(nèi)核模塊Linux

2017-01-12 19:15:03

Linux內(nèi)核調(diào)試自構(gòu)proc
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)