Skip to content

Commit

Permalink
Merge pull request #379 from shzhxh/master
Browse files Browse the repository at this point in the history
修改Makefile以减小测试镜像的大小;添加星光开发板所需的二进制以优化编译步骤
  • Loading branch information
elliott10 authored Oct 1, 2022
2 parents 38902a5 + 5a1135b commit 3e141a8
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

ARCH ?= x86_64

STRIP := $(ARCH)-linux-musl-strip
export PATH=$(shell printenv PATH):$(CURDIR)/ignored/target/$(ARCH)/$(ARCH)-linux-musl-cross/bin/

.PHONY: help zircon-init update rootfs libc-test other-test image check doc clean

# print top level help
Expand All @@ -23,6 +26,8 @@ rootfs:
# put libc tests into rootfs
libc-test:
cargo libc-test --arch $(ARCH)
find rootfs/$(ARCH)/libc-test -type f \
-name "*so" -o -name "*exe" -exec $(STRIP) {} \;

# put other tests into rootfs
other-test:
Expand Down
4 changes: 2 additions & 2 deletions docs/README-visionfive.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ saveenv # 保存配置到 flash,之后就不再需要配置
# 2. 使用以下命令编译 dtb
cpp -nostdinc -I include -undef -x assembler-with-cpp starfive_vic7100_evb.dts starfive.dts.0

dtc -o starfive.dtb starfive.dts.0
dtc -o starfive.dtb starfive.dts.0 # 预编译的starfive.dtb已放在prebuilt目录

# 3. 压缩内核镜像到 `z.bin.gz`
gzip -9 -cvf z.bin > z.bin.gz

# 4. 制作 itb 文件
mkimage -f zcore-starfive.its z.itb
mkimage -f zcore-starfive.its z.itb # zcore-starfive.its即prebuilt目录下的starfive_fdt.its,故也可使用mkimage -f prebuilt/firmware/riscv/starfive_fdt.its z.itb达到相同的效果

下面是 zcore-starfive.its 内容
--------------------------------------------------------------------
Expand Down
Binary file added prebuilt/firmware/riscv/starfive.dtb
Binary file not shown.
39 changes: 39 additions & 0 deletions prebuilt/firmware/riscv/starfive_fdt.its
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* U-Boot uImage source file for "zCore-visionfive"
*/

/dts-v1/;

/ {
description = "U-Boot uImage source file for zCore-visionfive";
#address-cells = <1>;

images {
kernel {
description = "Linux kernel for zCore-visionfive";
data = /incbin/("../../../zcore.bin.gz");
type = "kernel";
arch = "riscv";
os = "linux";
compression = "gzip";
load = <0x80200000>;
entry = <0x80200000>;
};
fdt {
description = "Flattened Device Tree blob for zCore-visionfive";
data = /incbin/("./starfive.dtb");
type = "flat_dt";
arch = "riscv";
compression = "none";
};
};

configurations {
default = "conf";
conf {
description = "Boot Linux kernel with FDT blob";
kernel = "kernel";
fdt = "fdt";
};
};
};

0 comments on commit 3e141a8

Please sign in to comment.