如何识别内核源代码生成的正确映像进行编译?

时间:2019-05-21 10:05:35

标签: android linux ubuntu kernel

我正在尝试学习内核自定义,为此,我有目标OnePlus 6T设备。我可以按照以下步骤在Ubuntu 18上编译内核源代码:

  • https://packages.ubuntu.com/cosmic/a...piler/download下载最新的dtc并进行安装。
  • 克隆内核源代码:git clone https://github.com/OnePlusOSS/androi...lus_sdm845.git
  • 克隆工具链:git clone -b linaro-4.9-arm-linux-androideabi https://github.com/ArchiDroid/Toolchain prebuilts / gcc / linux-x86 / arm / arm-linux-androideabi-linaro-4.8
  • 打开位于prebuilts / gcc / linux-x86 / aarch64 / aarch64-linux-android-linaro-4.9的终端并运行:export CROSS_COMPILE = $(pwd)/ bin / aarch64-linux-android-
  • 导航到同一终端中的内核源代码路径。
  • export ARCH = arm64 &&导出SUBARCH = arm64
  • 清洁
  • 制造合适的商品
  • mkdir退出
  • make O = Out sdm845_defconfig
  • make O = Out DTC_EXT = dtc CONFIG_BUILD_ARM64_DT_OVERLAY = y DTC_EXT = dtc -j4

以下是编译的最后几行:

CC drivers/media/platform/msm/broadcast/tspp.mod.o
CC drivers/media/platform/msm/dvb/adapter/mpq-adapter.mod.o
CC drivers/media/platform/msm/dvb/demux/mpq-dmx-hw-plugin.mod.o
GZIP arch/arm64/boot/Image.gz
CC drivers/soc/qcom/llcc_perfmon.mod.o
CC drivers/video/backlight/lcd.mod.o
CC net/bridge/br_netfilter.mod.o
LD [M] drivers/char/rdbg.ko
LD [M] drivers/media/platform/msm/broadcast/tspp.ko
LD [M] drivers/media/platform/msm/dvb/adapter/mpq-adapter.ko
LD [M] drivers/media/platform/msm/dvb/demux/mpq-dmx-hw-plugin.ko
LD [M] drivers/soc/qcom/llcc_perfmon.ko
LD [M] drivers/video/backlight/lcd.ko
LD [M] net/bridge/br_netfilter.ko
CAT arch/arm64/boot/Image.gz-dtb
make[1]: Leaving directory '/home/.../KernelCustomization/android_kernel_oneplus_sdm845/Out'

现在,下一步是刷新图像。我已经扎根OnePlus 6T设备,并且对成功编译后生成的三个图像文件感到困惑,即

  • arch / arm64 / boot / Image.gz-dtb
  • arch / arm64 / boot / Image.gz
  • arch / arm64 / boot / Image

我正在关注此线程:

https://forum.xda-developers.com/android/software-hacking/reference-how-to-compile-android-kernel-t3627297

我可以使用哪些图像在android设备上闪烁?

0 个答案:

没有答案