SOM boot in qemu

Few steps are required for booting petalinux som images on qemu

Create Petalinux project
1 petalinux-create -t project -s xilinx-k26-starterkit-v2022.1-final.bsp
Decompress and resize the wic image
1 2 xz -d -k pre-built/linux/images/petalinux-sdimage.wic.xz truncate -s 8G pre-built/linux/images/petalinux-sdimage.wic
Create EEPROM files
1 petalinux-build -c board-id-data

EEPROM files can be found in deploy directory , i.e “build/tmp/deploy/images/xilinx-k26-som/”

Note: tmp directory is base on petalinux-config->Yocto Settings->TMPDIR Location

Create pmu config file
1 aarch64-none-elf-objcopy --dump-section .sys_cfg_data=data.bin pre-built/linux/images/zynqmp_fsbl.elf
Petalinux Boot
1 petalinux-boot --qemu --prebuilt 2 --dtb pre-built/linux/images/fit-dtb.blob --qemu-args " -blockdev filename=build/tmp/deploy/images/xilinx-k26-som/som-eeprom.bin,node-name=i2c1.eeprom-50,driver=file -blockdev filename=build/tmp/deploy/images/xilinx-k26-som/kr-eeprom.bin,node-name=i2c1.eeprom-51,driver=file -nodefaults -global xlnx,zynqmp-boot.drive=pmu-cfg -blockdev node-name=pmu-cfg,filename=data.bin,driver=file -drive file=pre-built/linux/images/petalinux-sdimage.wic,if=none,format=raw,id=stick,force-share=on,read-only=on -device usb-hub,bus=usb3@0xFE200000.0,port=1,id=usb-hub -device usb-storage,bus=usb3@0xFE200000.0,port=1.1,id=usbstick,drive=stick"