Skip to content

Commit

Permalink
build_slider: Make modifications to not build boot.img
Browse files Browse the repository at this point in the history
Now that support for boot.img prebuilts has been added, we no longer
need to build boot.img when using prebuilts.

Bug: 191764119
Signed-off-by: J. Avila <[email protected]>
Change-Id: Ib4a1ce01447e3edcfa1db93a0f2ad57e6393b449
  • Loading branch information
J. Avila authored and Petri Gynther committed Jul 2, 2021
1 parent edcba76 commit 5a7fabf
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
3 changes: 1 addition & 2 deletions GKI-files
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
vmlinux
System.map
vmlinux.symvers
modules.builtin
modules.builtin.modinfo
Image.lz4
boot-5.10-lz4.img
9 changes: 8 additions & 1 deletion build.config.gs101
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ MAKE_GOALS=
KERNEL_BINARY=Image.lz4

if [ -z "$MIXED_BUILD" ]; then
USING_PREBUILTS=

MAKE_GOALS="
${KERNEL_BINARY}
"
Expand All @@ -24,6 +26,12 @@ arch/arm64/boot/${KERNEL_BINARY}
"
fi

if [ -n "${USING_PREBUILTS}" ]; then
BUILD_VENDOR_BOOT_IMG=1
else
BUILD_BOOT_IMG=1
fi

ABI_DEFINITION=android/abi_gki_aarch64_generic.xml
KMI_SYMBOL_LIST=android/abi_gki_aarch64_generic
ADDITIONAL_KMI_SYMBOL_LISTS="
Expand All @@ -46,7 +54,6 @@ KMI_SYMBOL_LIST_MODULE_GROUPING=0
BUILD_INITRAMFS=1
INITRAMFS_VENDOR_RAMDISK_FRAGMENT_NAME=dlkm
LZ4_RAMDISK=1
BUILD_BOOT_IMG=1
BOOT_IMAGE_HEADER_VERSION=4
VENDOR_DLKM_MODULES_LIST=${KERNEL_DIR}/vendor_dlkm_modules.slider
VENDOR_DLKM_PROPS=${KERNEL_DIR}/vendor_dlkm.props.slider
Expand Down
11 changes: 10 additions & 1 deletion build_slider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ if [ -z "${BUILD_KERNEL}" ]; then
fi

if [ "${BUILD_KERNEL}" = "0" ]; then
USING_PREBUILTS=1
GKI_KERNEL_PREBUILTS_DIR=$(readlink -m "prebuilts/boot-artifacts/kernel/")
else
USING_PREBUILTS=
if [ "${EXPERIMENTAL_BUILD}" != "0" ]; then
GKI_KERNEL_OUT_DIR=android12-5.10-staging
GKI_KERNEL_BUILD_CONFIG=common/build.config.gki.aarch64
Expand Down Expand Up @@ -86,6 +88,7 @@ export KMI_SYMBOL_LIST_STRICT_MODE
export TRIM_NONLISTED_KMI
export BASE_OUT=${OUT_DIR:-out}/mixed/
export DIST_DIR=${DIST_DIR:-${BASE_OUT}/dist/}
export USING_PREBUILTS

DEVICE_KERNEL_BUILD_CONFIG=${DEVICE_KERNEL_BUILD_CONFIG} \
GKI_KERNEL_BUILD_CONFIG=${GKI_KERNEL_BUILD_CONFIG} \
Expand All @@ -96,10 +99,16 @@ DEVICE_KERNEL_BUILD_CONFIG=${DEVICE_KERNEL_BUILD_CONFIG} \

exit_if_error $? "Failed to create mixed build"

if [ -f ${GKI_KERNEL_PREBUILTS_DIR}/vmlinux ]; then
SHA_FILE=vmlinux
else
SHA_FILE=boot.img
fi

# If BUILD_KERNEL is not explicitly set, be sure that there are no aosp/
# changes not present in the prebuilt.
if [ "${CHECK_DIRTY_AOSP}" != "0" ]; then
PREBUILTS_SHA=$(strings ${GKI_KERNEL_PREBUILTS_DIR}/vmlinux |
PREBUILTS_SHA=$(strings ${GKI_KERNEL_PREBUILTS_DIR}/${SHA_FILE} |
grep "Linux version 5.10" |
sed -n "s/^.*-g\([0-9a-f]\{12\}\)-.*/\1/p")
pushd aosp/ > /dev/null
Expand Down

0 comments on commit 5a7fabf

Please sign in to comment.