Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Script to load Xen on FVP model using U-boot and EFI image
- #
- # Requirements:
- # Binaries loaded at:
- # - fdt: 0x83000000
- # - kernel: 0x80080000
- # - xen: 0x84000000
- #
- # This script should be encapsulate in U-boot Image (see below how to
- # create it) and loaded at 0x85000000.
- #
- # Please modify Xen command line (see xen_bootargs) and Linux command
- # line (see dom0_bootargs) at your convenience.
- #
- # We assume the Linux kernel is no bigger than 16Mb. If it is not the
- # case, please update kernel_size.
- #
- # Use the following command to generate the U-boot Image
- #
- # mkimage -T script -C none -d load-xen.scr load-xen.img
- # Conveniences environment variables
- setenv fdt_addr_r 0x83000000
- setenv kernel_addr_r 0x80080000
- setenv kernel_size 0x01000000
- setenv xen_addr_r 0x84000000
- # Command line for xen and kernel
- setenv xen_bootargs "dtuart=serial0 console=dtuart noreboot dom0_mem=128M"
- setenv dom0_bootargs "console=hvc0 earlycon=pl011,0x1c090000"
- ## Fixup the device tree
- # Be sure U-boot is using our FDT
- fdt addr $fdt_addr
- # Resize the FDT just in case
- fdt resize
- # Set Xen arguments based on $xen_bootargs
- fdt set /chosen xen,xen-bootargs \"$xen_bootargs\"
- #setenv bootargs $xen_bootargs # On Xen unstable, xen cmdline is in bootargs
- # Set Dom0 arguments based on $dom0_bootargs
- fdt set /chosen xen,dom0-bootargs \"$dom0_bootargs\"
- # Create modules node
- fdt mknode /chosen modules
- fdt set /chosen/modules '#address-cells' <1>
- fdt set /chosen/modules '#size-cells' <1>
- # Create node for the linux located at $kernel_addr_r
- # We don't have the size in hand, set to a big value (16Mb)
- fdt mknode /chosen/modules module@0
- fdt set /chosen/modules/module@0 compatible multiboot,module
- fdt set /chosen/modules/module@0 reg <$kernel_addr_r $kernel_size>
- # Dump the nodes created for debugging purpose
- fdt ls /chosen
- fdt ls /chosen/modules
- fdt ls /chosen/modules/module@0
- ## Boot Xen
- bootefi $xen_addr_r $fdt_addr_r
Advertisement
Add Comment
Please, Sign In to add comment