Skip to content

Commit

Permalink
Support fastboot with slim bootloader
Browse files Browse the repository at this point in the history
Fastboot is used to flash Android images.
Build fastboot as ELF format to support SBL boot

Tracked-On: OAM-111201
Signed-off-by: Chen, Gang G <[email protected]>
  • Loading branch information
GangSecurity authored and sysopenci committed Jul 19, 2023
1 parent 0d59a22 commit 1f11cec
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 11 additions & 3 deletions core/definitions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,17 @@ $(hide)$(IAFW_STRIP) --strip-all $(@:.sbl=.sym.elf) -o $(@:.sbl=.elf)

$(hide) cp $(@:.sbl=.elf) $@

$(hide)rm -rf $(PRODUCT_OUT)/cmdline1
$(hide)touch $(PRODUCT_OUT)/cmdline1
python3 $(INTEL_PATH_BUILD)/containertool/GenContainer.py create -t MULTIBOOT -cl CMD1:$(PRODUCT_OUT)/cmdline1 ELF1:$@ -k $(INTEL_PATH_BUILD)/testkeys/OS1_TestKey_Priv_RSA3072.pem -o $(PRODUCT_OUT)/sbl_os
$(eval SBL_DIR := $(dir $@))
$(hide)rm -rf $(SBL_DIR)/cmdline1
$(hide)touch $(SBL_DIR)/cmdline1
python3 $(INTEL_PATH_BUILD)/containertool/GenContainer.py create -t MULTIBOOT -cl CMD1:$(SBL_DIR)/cmdline1 \
ELF1:$@ -k $(INTEL_PATH_BUILD)/testkeys/OS1_TestKey_Priv_RSA3072.pem -o $(SBL_DIR)/sbl_os

if [ $(findstring kf4sbl,$(PRIVATE_MODULE) ) ]; then \
cp $(SBL_DIR)/sbl_os $(PRODUCT_OUT)/sbl_os; \
elif [ $(findstring fb4sbl,$(PRIVATE_MODULE) ) ]; then \
cp $(SBL_DIR)/sbl_os $(PRODUCT_OUT)/sbl_fb; \
fi

$(hide) if [ "$(PRIVATE_MODULE:debug=)" = fb4sbl-user ]; then \
zip -juy $(FB4SBL_SYMBOLS_ZIP) $(@:.sbl=.map) $(@:.sbl=.sym.elf); \
Expand Down
4 changes: 2 additions & 2 deletions tasks/publish.mk
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ endif
# Publish kf4sbl symbols files
.PHONY: publish_kf4sbl_symbols
ifeq ($(TARGET_BUILD_VARIANT:debug=)|$(KERNELFLINGER_SUPPORT_NON_EFI_BOOT),user|true)
publish_kf4sbl_symbols: publish_mkdir_dest kf4sbl-$(TARGET_BUILD_VARIANT)
$(hide)($(ACP) $(KF4SBL_SYMBOLS_ZIP) $(publish_dest))
publish_kf4sbl_symbols: publish_mkdir_dest kf4sbl-$(TARGET_BUILD_VARIANT) fb4sbl-$(TARGET_BUILD_VARIANT)
$(hide)($(ACP) $(KF4SBL_SYMBOLS_ZIP) $(FB4SBL_SYMBOLS_ZIP) $(publish_dest))
else
publish_kf4sbl_symbols:
@echo "Publish kf4sbl symbols: skipped"
Expand Down

0 comments on commit 1f11cec

Please sign in to comment.