1 Star 0 Fork 4

孙昊一/plat-rk3568

forked from TenonOS/plat-rk3568 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Linker.uk 2.19 KB
一键复制 编辑 原始数据 按行查看 历史
ifeq (arm64,$(CONFIG_UK_ARCH))
RK3568_LDFLAGS-y += -Wl,--entry=_start
RK3568_LDFLAGS-y += -Wl,-m,aarch64elf
RK3568_LINK_LIBGCC_FLAG := -lgcc
endif
##
## Link image
##
RK3568_IMAGE := $(BUILD_DIR)/$(CONFIG_UK_NAME)_rk3568-$(CONFIG_UK_ARCH)
RK3568_DEBUG_IMAGE := $(RK3568_IMAGE).dbg
RK3568_LD_SCRIPT_FLAGS := $(addprefix -Wl$(comma)-dT$(comma),\
$(UK_PLAT_RK3568_DEF_LDS))
RK3568_LD_SCRIPT_FLAGS += $(addprefix -Wl$(comma)-T$(comma),\
$(RK3568_LD_SCRIPT-y) $(EXTRA_LD_SCRIPT-y))
$(RK3568_DEBUG_IMAGE): $(RK3568_ALIBS) $(RK3568_ALIBS-y) $(RK3568_OLIBS) $(RK3568_OLIBS-y) \
$(UK_ALIBS) $(UK_ALIBS-y) $(UK_OLIBS) $(UK_OLIBS-y) \
$(RK3568_LD_SCRIPT-y) $(EXTRA_LD_SCRIPT-y) \
$(UK_PLAT_RK3568_DEF_LDS) $(UK_LDEPS)
$(call build_cmd,LD,,$@,\
$(LD) \
$(RK3568_LDFLAGS) $(RK3568_LDFLAGS-y) \
$(RK3568_OLIBS) $(RK3568_OLIBS-y) \
$(UK_OLIBS) $(UK_OLIBS-y) \
-Wl$(comma)--start-group \
$(RK3568_ALIBS) $(RK3568_ALIBS-y) \
$(UK_ALIBS) $(UK_ALIBS-y) \
$(RK3568_LINK_LIBGCC_FLAG) \
-Wl$(comma)--end-group \
$(LDFLAGS) $(LDFLAGS-y) \
$(RK3568_LD_SCRIPT_FLAGS) \
-o $@)
ifeq ($(CONFIG_OPTIMIZE_PIE),y)
$(call build_uk_reloc,$@)
endif
$(RK3568_IMAGE): $(RK3568_IMAGE).dbg
$(call build_cmd,SCSTRIP,,$@,\
$(STRIP) -s \
$(SECT_STRIP_FLAGS) $(SECT_STRIP_FLAGS-y) \
$(RK3568_STRIPFLAGS) \
$< -o $@ 2>&1 | \
{ $(GREP) -Ev \
"Empty loadable segment detected|section.*lma.*adjusted to.*" || \
true; })
$(call build_bootinfo,$@)
$(call build_cmd,OBJCOPY,,$(RK3568_IMAGE).img,\
$(OBJCOPY) -O binary $(RK3568_IMAGE) $(BUILD_DIR)/kernel.img)
$(RK3568_IMAGE).sym: $(RK3568_DEBUG_IMAGE)
$(call build_cmd,NM,,$@, $(NM) -n $< > $@)
$(RK3568_IMAGE).gz: $(RK3568_IMAGE)
$(call build_cmd,GZ,,$@, $(GZIP) -f -9 -c $< >$@)
# register images to the build
ifeq ($(CONFIG_PLAT_RK3568),y)
UK_DEBUG_IMAGES-y += $(RK3568_DEBUG_IMAGE)
UK_IMAGES-y += $(RK3568_IMAGE)
UK_IMAGES-$(CONFIG_OPTIMIZE_SYMFILE) += $(RK3568_IMAGE).sym
UK_IMAGES-$(CONFIG_OPTIMIZE_COMPRESS) += $(RK3568_IMAGE).gz
endif
# ...for cleaning:
LIBRK3568PLAT_CLEAN += $(call build_clean,$(RK3568_DEBUG_IMAGE).bootinfo)
LIBRK3568PLAT_CLEAN += $(call build_clean,$(BUILD_DIR)/kernel.img)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/yingyisunhaoyi/plat-rk3568.git
git@gitee.com:yingyisunhaoyi/plat-rk3568.git
yingyisunhaoyi
plat-rk3568
plat-rk3568
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385