【分享】减小MPSoC XEN Dom-0的target文件系统大小

作者:hankf,Xilinx Employee

Xen Dom 0的Linux kernel和文件系统,功能应该越少越好,文件应该越小越好。文件太大,可能引起启动失败。

只含有PS的HDF文件,编译出来的rootfs.cpio.gz.u-boot有49MB。经过分析,target文件系统中,/usr/bin占用93MB,其中QEMU的文件占用了92MB.

[qemu]$ ls -l -h
total 92M
1.5M qemu-aarch64
1.4M qemu-arm
490K qemu-ga
1.5M qemu-i386
1.2M qemu-img
1.2M qemu-io
1.1M qemu-microblaze
1.1M qemu-microblazeel
173 qemu-mips
1.6M qemu-mips64
1.5M qemu-mips64el
1.5M qemu-mipsel
1.5M qemu-mips.real
1.2M qemu-nbd
022K qemu-nios2
2.0M qemu-ppc
7.5M qemu-system-aarch64
7.3M qemu-system-arm
6.9M qemu-system-i386
3.1M qemu-system-microblaze
3.1M qemu-system-microblazeel
6.5M qemu-system-mips
6.6M qemu-system-mips64
6.7M qemu-system-mips64el
6.5M qemu-system-mipsel
3.0M qemu-system-nios2
7.0M qemu-system-ppc
6.9M qemu-system-x86_64
1.5M qemu-x86_64

在project-spec/petalinuxbsp.conf里增加上述后,还剩MiroBlaze和arm64的文件,目录/usr/bin/从94MB减少到23MB。

QEMU_TARGETS = "aarch64"

重新编译后,rootfs.cpio.gz.u-boot从49MB变为25MB。

最新文章

最新文章