Skip to content
sux2mfgj edited this page Jun 7, 2021 · 4 revisions

How to Build

$ make config
$ make CROSS_COMPILE=aarch64-linux-gnu-

How to run on QEMU virt

$ qemu-system-aarch64 \
    -M virt,
    -M virt,virtualization=on \
    -m 2G \
    -bios u-boot.bin \
    -drive if=none,file=fat:rw:mnt,id=hd0 \
    -device virtio-blk-device,drive=hd0 \
    -serial mon:stdio \
    -nographic
... boot and entry a u-boot shell
=> ls virtio 0                                                                                                                                                                                                                                                                              
76200   bitvisor.elf                                                                                                                                                                                                                                                                        
32995840   Image                                                                                                                                                                                                                                                                            
8248   bitvisor.image                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                            
3 file(s), 0 dir(s)                                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                            
=> fatload virtio 0 0x78000000 bitvisor.image                                                                                                                                                                                                                                               
8248 bytes read in 2 ms (3.9 MiB/s)                                                                                                                                                                                                                                                         
=> go 0x78000000                                                                                                                                                                                                                                                                                          
Clone this wiki locally