Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the sbl_cd build in device-intel-build repo #213

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions core/definitions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ IASL := $(INTEL_PATH_BUILD)/acpi-tools/linux64/bin/iasl
# Generation
KF4SBL_SYMBOLS_ZIP := $(PRODUCT_OUT)/kf4sbl_symbols.zip
FB4SBL_SYMBOLS_ZIP := $(PRODUCT_OUT)/fb4sbl_symbols.zip
CD4SBL_SYMBOLS_ZIP := $(PRODUCT_OUT)/cd4sbl_symbols.zip

# Extra host tools we need built to use our *_from_target_files
# or sign_target_files_* scripts
Expand Down Expand Up @@ -147,13 +148,24 @@ endef
define transform-o-to-sbl-executable
@echo "target SBL Executable: $(PRIVATE_MODULE) ($@)"
$(hide) mkdir -p $(dir $@)
$(hide) $(IAFW_LD) $1 \
$(hide) if [ $(findstring cd4sbl,$(PRIVATE_MODULE) ) ]; then \
$(IAFW_LD) $1 \
--defsym=CONFIG_LP_BASE_ADDRESS=$(CRASHDUMP_BASE_ADDRESS) \
--defsym=CONFIG_LP_HEAP_SIZE=$(CRASHDUMP_HEAP_SIZE) \
--defsym=CONFIG_LP_STACK_SIZE=$(CRASHDUMP_STACK_SIZE) \
--whole-archive $(call module-built-files,$(LIBPAYLOAD_CRT0)) --no-whole-archive \
$(PRIVATE_ALL_OBJECTS) --start-group $(PRIVATE_ALL_STATIC_LIBRARIES) --end-group $(IAFW_LIBCLANG) \
-Map $(@:.sbl=.map) -o $(@:.sbl=.sym.elf); \
else \
$(IAFW_LD) $1 \
--defsym=CONFIG_LP_BASE_ADDRESS=$(LIBPAYLOAD_BASE_ADDRESS) \
--defsym=CONFIG_LP_HEAP_SIZE=$(LIBPAYLOAD_HEAP_SIZE) \
--defsym=CONFIG_LP_STACK_SIZE=$(LIBPAYLOAD_STACK_SIZE) \
--whole-archive $(call module-built-files,$(LIBPAYLOAD_CRT0)) --no-whole-archive \
$(PRIVATE_ALL_OBJECTS) --start-group $(PRIVATE_ALL_STATIC_LIBRARIES) --end-group $(IAFW_LIBCLANG) \
-Map $(@:.sbl=.map) -o $(@:.sbl=.sym.elf)
-Map $(@:.sbl=.map) -o $(@:.sbl=.sym.elf); \
fi

$(hide)$(IAFW_STRIP) --strip-all $(@:.sbl=.sym.elf) -o $(@:.sbl=.elf)

$(hide) cp $(@:.sbl=.elf) $@
Expand All @@ -168,6 +180,8 @@ if [ $(findstring kf4sbl,$(PRIVATE_MODULE) ) ]; then \
cp $(SBL_DIR)/sbl_bm $(PRODUCT_OUT)/sbl_bm; \
elif [ $(findstring fb4sbl,$(PRIVATE_MODULE) ) ]; then \
cp $(SBL_DIR)/sbl_bm $(PRODUCT_OUT)/sbl_fb; \
elif [ $(findstring cd4sbl,$(PRIVATE_MODULE) ) ]; then \
cp $(SBL_DIR)/sbl_bm $(PRODUCT_OUT)/sbl_cd; \
fi


Expand All @@ -176,6 +190,8 @@ $(hide) if [ "$(PRIVATE_MODULE:debug=)" = fb4sbl-user ]; then \
zip -juy $(FB4SBL_SYMBOLS_ZIP) $@; \
elif [ "$(PRIVATE_MODULE:debug=)" = kf4sbl-user ]; then \
zip -juy $(KF4SBL_SYMBOLS_ZIP) $(@:.sbl=.map) $(@:.sbl=.sym.elf); \
elif [ "$(PRIVATE_MODULE:debug=)" = cd4sbl-user ]; then \
zip -juy $(CD4SBL_SYMBOLS_ZIP) $(@:.sbl=.map) $(@:.sbl=.sym.elf); \
fi
endef

Expand Down
1 change: 1 addition & 0 deletions core/elf_ia32_sbl.lds
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ SECTIONS
_edata = .;

.bss : {
*(.sbss.pae)
*(.sbss)
*(.sbss.*)
*(.bss)
Expand Down
4 changes: 2 additions & 2 deletions tasks/publish.mk
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,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) fb4sbl-$(TARGET_BUILD_VARIANT)
$(hide)($(ACP) $(KF4SBL_SYMBOLS_ZIP) $(FB4SBL_SYMBOLS_ZIP) $(publish_dest))
publish_kf4sbl_symbols: publish_mkdir_dest kf4sbl-$(TARGET_BUILD_VARIANT) fb4sbl-$(TARGET_BUILD_VARIANT) cd4sbl-$(TARGET_BUILD_VARIANT)
$(hide)($(ACP) $(KF4SBL_SYMBOLS_ZIP) $(FB4SBL_SYMBOLS_ZIP) $(CD4SBL_SYMBOLS_ZIP) $(publish_dest))
else
publish_kf4sbl_symbols:
@echo "Publish kf4sbl symbols: skipped"
Expand Down