1 Star 0 Fork 10

张浩/plat-raspi

forked from YingyiTech/plat-raspi
关闭
 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Linker.uk 2.07 KB
一键复制 编辑 原始数据 按行查看 历史
RASPI_LDFLAGS-y += -Wl,-m,aarch64elf
ifeq ($(CONFIG_ARM64_ERRATUM_843419),y)
RASPI_LDFLAGS-y += -mfix-cortex-a53-843419
endif
##
## Link image
##
RASPI_IMAGE := $(BUILD_DIR)/$(CONFIG_UK_NAME)_raspi-$(CONFIG_UK_ARCH)
RASPI_ELF_IMAGE := $(RASPI_IMAGE).elf
RASPI_LD_SCRIPT_FLAGS := $(addprefix -Wl$(comma)-dT$(comma),\
$(UK_PLAT_RASPI_DEF_LDS))
RASPI_LD_SCRIPT_FLAGS += $(addprefix -Wl$(comma)-T$(comma),\
$(LIBRASPIPLAT_DEF_LDS) $(EXTRA_LD_SCRIPT-y))
$(RASPI_ELF_IMAGE): $(RASPI_ALIBS) $(RASPI_ALIBS-y) $(RASPI_OLIBS) $(RASPI_OLIBS-y) \
$(UK_ALIBS) $(UK_ALIBS-y) $(UK_OLIBS) $(UK_OLIBS-y)
$(call build_cmd,LD,,$(RASPI_IMAGE).ld.o,\
$(LD) -r $(LIBLDFLAGS) $(LIBLDFLAGS-y) \
$(RASPI_LDFLAGS) $(RASPI_LDFLAGS-y) \
$(RASPI_OLIBS) $(RASPI_OLIBS-y) \
$(UK_OLIBS) $(UK_OLIBS-y) \
-lgcc \
-Wl$(comma)--start-group \
$(RASPI_ALIBS) $(RASPI_ALIBS-y) \
$(UK_ALIBS) $(UK_ALIBS-y) \
-Wl$(comma)--end-group \
-o $(RASPI_IMAGE).ld.o)
$(call build_cmd,OBJCOPY,,$(RASPI_IMAGE).o,\
$(OBJCOPY) -w -G _libraspiplat_entry \
$(RASPI_IMAGE).ld.o $(RASPI_IMAGE).o)
$(call build_cmd,LD,,$@,\
$(LD) $(LDFLAGS) $(LDFLAGS-y) \
$(RASPI_LDFLAGS) $(RASPI_LDFLAGS-y) \
$(RASPI_LD_SCRIPT_FLAGS) \
$(RASPI_IMAGE).o -o $@)
$(RASPI_IMAGE): $(RASPI_IMAGE).elf
$(call build_cmd,SCSTRIP,,$@,\
$(STRIP) -s \
$(SECT_STRIP_FLAGS) $(SECT_STRIP_FLAGS-y) \
$< -o $@ 2>&1 | \
{ grep -v "Empty loadable segment detected" || true; })
$(call build_cmd,OBJCOPY,,$(RASPI_IMAGE).img,\
$(OBJCOPY) -O binary $(RASPI_ELF_IMAGE) $(BUILD_DIR)/kernel8.img)
# register images to the build
ifeq ($(CONFIG_PLAT_RASPI),y)
UK_DEBUG_IMAGES-y += $(RASPI_ELF_IMAGE)
UK_IMAGES-y += $(RASPI_IMAGE)
endif
# ...for cleaning:
LIBRASPIPLAT_CLEAN += $(call build_clean,$(RASPI_IMAGE).o)
LIBRASPIPLAT_CLEAN += $(call build_clean,$(RASPI_IMAGE).ld.o)
LIBRASPIPLAT_CLEAN += $(call build_clean,$(RASPI_IMAGE).elf)
LIBRASPIPLAT_CLEAN += $(call build_clean,$(RASPI_IMAGE).img)
LIBRASPIPLAT_CLEAN += $(call build_clean,$(BUILD_DIR)/kernel8.img)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/crazykev/plat-raspi.git
git@gitee.com:crazykev/plat-raspi.git
crazykev
plat-raspi
plat-raspi
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385