zynq_image: fix image size for qemu

This commit is contained in:
Florian Agbuya 2023-11-08 15:56:56 +08:00
parent 62a97f5510
commit 09cd531c2b

View File

@ -22,9 +22,10 @@ in {
set -x set -x
base=$(dirname $0) base=$(dirname $0)
cp $base/root.squashfs /tmp/ mkdir ./tmp/
chmod +w /tmp/root.squashfs cp $base/root.squashfs ./tmp/
truncate -s 64m /tmp/root.squashfs chmod +w ./tmp/root.squashfs
truncate -s 64M ./tmp/root.squashfs
qemu-system-arm \ qemu-system-arm \
-M xilinx-zynq-a9 \ -M xilinx-zynq-a9 \
@ -34,7 +35,7 @@ in {
-dtb $base/zynq-zc702.dtb \ -dtb $base/zynq-zc702.dtb \
-kernel $base/zImage \ -kernel $base/zImage \
-initrd $base/initrd \ -initrd $base/initrd \
-drive file=/tmp/root.squashfs,if=sd,format=raw \ -drive file=./tmp/root.squashfs,if=sd,format=raw \
-append "${cmdline}" -append "${cmdline}"
''; '';
in pkgs.runCommand "zynq_image" { in pkgs.runCommand "zynq_image" {