mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-08 22:36:48 +00:00
* 添加了GCC_cross_compile——tool_chain * - 解决环境变量路径拼接时,多了`/`的问题 - apt安装时增加-y,不需用户确认 * 解决添加环境变量的命令有误的问题 * 修正编译错误时,还会执行下一步的问题 * new: 编译完成后清理临时文件 * 更新makefile * 调整:把grub安装在 $HOME/opt/dragonos-grub下 * new: 新增dockerfile * 将镜像源换成中科大的(原因是清华的总是ban掉用于构建镜像的服务器的ip) * 修改为基于debian bullseye构建 * 取消指定版本 * 修复MBR磁盘镜像未设置启动标志的bug * 取消在docker中安装grub * 安装grub的过程改到客户机上进行 * bootstrap.sh 添加--no-docker * 使用新版的docker编译镜像 * 修补, 添加了一些关于gcc的check Co-authored-by: longjin <longjin@RinGoTek.cn>
16 lines
626 B
Makefile
16 lines
626 B
Makefile
# 获得当前git提交的sha1,并截取前8位
|
|
GIT_COMMIT_SHA1=$(shell git log -n 1 | head -n 1 | cut -d ' ' -f 2 | cut -c1-8)
|
|
|
|
all: about.o
|
|
|
|
$(LD) -b elf64-x86-64 -z muldefs -o $(tmp_output_dir)/about $(shell find . -name "*.o") $(shell find $(sys_libs_dir) -name "*.o") -T about.lds
|
|
|
|
$(OBJCOPY) -I elf64-x86-64 -R ".eh_frame" -R ".comment" -O elf64-x86-64 $(tmp_output_dir)/about $(output_dir)/about.elf
|
|
|
|
about.o: version_header about.c
|
|
$(CC) $(CFLAGS) -c about.c -o about.o
|
|
|
|
# 生成版本头文件sys_version.h
|
|
version_header: about.c
|
|
@echo "#define DRAGONOS_GIT_COMMIT_SHA1 \"$(GIT_COMMIT_SHA1)\"" > sys_version.h
|