网站建设网站制作有限,成立网站开发公司,今天的新闻联播内容,阿里云域名解析文章目录 一、卷首二、新增device目录2.1 基本信息2.2 操作步骤2.3 编辑h713\_tuna\_p3\_myboard.mk2.4 编辑AndroidProducts.mk 三、新增内核配置3.1 新增config目录3.2 新增defconfig文件 四、差异列表4.1 git add 之前4.2 git add 之后 五、编译5.1 编译kernel5.2 编译Andro… 文章目录 一、卷首二、新增device目录2.1 基本信息2.2 操作步骤2.3 编辑h713\_tuna\_p3\_myboard.mk2.4 编辑AndroidProducts.mk 三、新增内核配置3.1 新增config目录3.2 新增defconfig文件 四、差异列表4.1 git add 之前4.2 git add 之后 五、编译5.1 编译kernel5.2 编译Android 一、卷首
在开启一个新的android案子时为了和原有项目区分开一般均需要创建新产品自己的device或者Product目录。本文即以全志H713平台为例子介绍新增一个名为myboard的产品。同时因为其派生自公版h713-tuna_p3所以将其源码目录命名为h713-tuna_p3_myboard。
二、新增device目录
2.1 基本信息
确定产品基于device/softwinner/ares/h713-tuna_p3也就是和h713-tuna_p3比较像新board或者新产品的名字叫h713-tuna_p3_myboard
2.2 操作步骤
1cp -rf h713-tuna_p3 h713-tuna_p3_myboard 可对比类似产品看是否有Product差异配置本案例此处完全相同 2cp h713_tuna_p3.mk h713_tuna_p3_myboard.mk同理本案例需修改 3编辑h713_tuna_p3_myboard.mk 4编辑AndroidProducts.mk新增产品选项
2.3 编辑h713_tuna_p3_myboard.mk
新增并修改A:\works\aw\android\device\softwinner\ares\h713_tuna_p3_myboard.mk通过和相似产品的mk文件进行对比即可得知需要配置的项目修改项目如下
PRODUCT_NAME : h713_tuna_p3_myboard
PRODUCT_DEVICE : h713-tuna_p3_myboard
PRODUCT_BOARD : tuna_p3_myboard
PRODUCT_MODEL : QUAD-CORE h713 tuna_p3_myboard2.4 编辑AndroidProducts.mk
如下增加如下修改
diff --git a/device/softwinner/ares/AndroidProducts.mk b/device/softwinner/ares/AndroidProducts.mk
index 7a48abbb78..b3e7173f32 100644
--- a/device/softwinner/ares/AndroidProducts.mkb/device/softwinner/ares/AndroidProducts.mk-17,6 17,7 PRODUCT_MAKEFILES : \$(LOCAL_DIR)/h713_tuna_p3.mk \$(LOCAL_DIR)/h713_tuna_perf1.mk \$(LOCAL_DIR)/h713_tuna_p3_myboard.mk \$(LOCAL_DIR)/h713m_tuna_p3.mk \$(LOCAL_DIR)/h716m_tuna_p3.mk \$(LOCAL_DIR)/tv303c2_tuna_p4.mk \-37,6 38,8 COMMON_LUNCH_CHOICES : \h713_tuna_p3-user \h713_tuna_perf1-userdebug \h713_tuna_perf1-user \h713_tuna_p3_myboard-userdebug \h713_tuna_p3_myboard-user \h713m_tuna_p3-userdebug \h713m_tuna_p3-user \h716m_tuna_p3-userdebug \三、新增内核配置
3.1 新增config目录
产品派生自tuna_p3公版所以直接复制即可
cd longan/device/config/chips/h713/configs/
cp -rf tuna_p3 tuna_p3_myboard3.2 新增defconfig文件
产品派生自tuna_p3公版所以直接复制即可
cd longan/kernel/linux-5.4/arch/arm/configs/
cp sun50iw12p1smp_android_tuna_defconfig sun50iw12p1smp_android_tuna_myboard_defconfig同时修改 configs\tuna_p3\android\BoardConfig.mk将defconfig执行我们新增的这个配置
LICHEE_KERN_DEFCONF:sun50iw12p1smp_android_tuna_myboard_defconfig四、差异列表
4.1 git add 之前
szhouoa-R630:~/works/aw/android$ git status .
On branch dev_myboard
Your branch is up to date with origin/dev_myboard.Changes not staged for commit:(use git add file... to update what will be committed)(use git restore file... to discard changes in working directory)modified: device/softwinner/ares/AndroidProducts.mkUntracked files:(use git add file... to include in what will be committed)device/softwinner/ares/h713-tuna_p3_myboard/device/softwinner/ares/h713_tuna_p3_myboard.mklongan/device/config/chips/h713/configs/tuna_p3_myboard/longan/kernel/linux-5.4/arch/arm/configs/sun50iw12p1smp_android_tuna_myboard_defconfigIt took 2.79 seconds to enumerate untracked files. status -uno
may speed it up, but you have to be careful not to forget to add
new files yourself (see git help status).
no changes added to commit (use git add and/or git commit -a)
szhouoa-R630:~/works/aw/android$ 4.2 git add 之后
Changes to be committed:(use git restore --staged file... to unstage)modified: device/softwinner/ares/AndroidProducts.mknew file: device/softwinner/ares/h713-tuna_p3_myboard/BoardConfig.mknew file: device/softwinner/ares/h713-tuna_p3_myboard/audio/audio_mixer_paths.xmlnew file: device/softwinner/ares/h713-tuna_p3_myboard/audio/bootanimation.zipnew file: device/softwinner/ares/h713-tuna_p3_myboard/camera/camera.cfgnew file: device/softwinner/ares/h713-tuna_p3_myboard/camera/config.mknew file: device/softwinner/ares/h713-tuna_p3_myboard/camera/hawkview/sensor_list_cfg.ininew file: device/softwinner/ares/h713-tuna_p3_myboard/camera/init.camera.rcnew file: device/softwinner/ares/h713-tuna_p3_myboard/camera/media_profiles.xmlnew file: device/softwinner/ares/h713-tuna_p3_myboard/input/config.mknew file: device/softwinner/ares/h713-tuna_p3_myboard/input/gsensor.cfgnew file: device/softwinner/ares/h713-tuna_p3_myboard/input/init.input.rcnew file: device/softwinner/ares/h713-tuna_p3_myboard/input/sunxi-keyboard.klnew file: device/softwinner/ares/h713-tuna_p3_myboard/panel_config/panel_config.ininew file: device/softwinner/ares/h713-tuna_p3_myboard/secure/config.mknew file: device/softwinner/ares/h713-tuna_p3_myboard/system/awbms_confignew file: device/softwinner/ares/h713-tuna_p3_myboard/system/dragon_toc.cfgnew file: device/softwinner/ares/h713-tuna_p3_myboard/system/env.cfgnew file: device/softwinner/ares/h713-tuna_p3_myboard/system/sys_partition.fexnew file: device/softwinner/ares/h713-tuna_p3_myboard/system/vendor_ramdisk.modulesnew file: device/softwinner/ares/h713_tuna_p3_myboard.mknew file: longan/device/config/chips/h713/configs/tuna_p3_myboard/android/BoardConfig.mknew file: longan/device/config/chips/h713/configs/tuna_p3_myboard/android/sys_partition.fexnew file: longan/device/config/chips/h713/configs/tuna_p3_myboard/arisc.confignew file: longan/device/config/chips/h713/configs/tuna_p3_myboard/board-min.dtsnew file: longan/device/config/chips/h713/configs/tuna_p3_myboard/board.dtsnew file: longan/device/config/chips/h713/configs/tuna_p3_myboard/dragonboard/BoardConfig.mknew file: longan/device/config/chips/h713/configs/tuna_p3_myboard/dragonboard/env.cfgnew file: longan/device/config/chips/h713/configs/tuna_p3_myboard/dragonboard/sys_partition.fexnew file: longan/device/config/chips/h713/configs/tuna_p3_myboard/dragonboard/test_config.fexnew file: longan/device/config/chips/h713/configs/tuna_p3_myboard/linux-5.4/board.dtsnew file: longan/device/config/chips/h713/configs/tuna_p3_myboard/longan/BoardConfig.mknew file: longan/device/config/chips/h713/configs/tuna_p3_myboard/reserve0/panel_config.ininew file: longan/device/config/chips/h713/configs/tuna_p3_myboard/sys_config.fexnew file: longan/device/config/chips/h713/configs/tuna_p3_myboard/uboot-board.dtsnew file: longan/kernel/linux-5.4/arch/arm/configs/sun50iw12p1smp_android_tuna_myboard_defconfig五、编译
5.1 编译kernel
szhoubc01-R630:~/works/aw/android/longan$ ./build.sh configWelcome to mkscript setup progress
All available platform:0. android1. linux
Choice [android]: 0
All available ic:0. h7131. h713m2. h716m3. tv303-c14. tv303-c2
Choice [h713]: 0
All available board:0. ft1. tuna_p32. tuna_p3_myboard3. tuna_perf14. tuna_qa
Choice [tuna_p3_myboard]: 2
All available flash:0. default1. nor
Choice [default]: 0
All available arch:0. arm1. arm64
Choice [arm]: 0
INFO: Prepare toolchain ...
……略……
szhoubc01-R630:~/works/aw/android/longan$
szhoubc01-R630:~/works/aw/android/longan$ ./build.sh 5.2 编译Android
szhoubc01-R630:~/works/aw/android$ source build/envsetup.sh
szhoubc01-R630:~/works/aw/android$ lunch Youre building on LinuxLunch menu... pick a combo:1. aosp_arm-eng2. aosp_arm64-eng3. aosp_x86-eng4. aosp_x86_64-eng5. h713_tuna_p3-user6. h713_tuna_p3-userdebug7. h713_tuna_p3_myboard-user8. h713_tuna_p3_myboard-userdebug9. h713_tuna_perf1-user10. h713_tuna_perf1-userdebug
……略……Which would you like? [aosp_arm-eng] 8PLATFORM_VERSION_CODENAMEREL
PLATFORM_VERSION11
TARGET_PRODUCTh713_tuna_p3_myboard
TARGET_BUILD_VARIANTuserdebug
TARGET_BUILD_TYPErelease
TARGET_ARCHarm
TARGET_ARCH_VARIANTarmv7-a-neon
TARGET_CPU_VARIANTcortex-a7
HOST_ARCHx86_64
HOST_2ND_ARCHx86
HOST_OSlinux
HOST_OS_EXTRALinux-5.15.0-91-generic-x86_64-Ubuntu-20.04.6-LTS
HOST_CROSS_OSwindows
HOST_CROSS_ARCHx86
HOST_CROSS_2ND_ARCHx86_64
HOST_BUILD_TYPErelease
BUILD_IDRP1A.201005.006
OUT_DIRoutszhoubc01-R630:~/works/aw/android$ make -j32 pack