Guest User

Untitled

a guest
Jun 6th, 2019
176
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Script to load Xen on FVP model using U-boot and EFI image
  2. #
  3. # Requirements:
  4. # Binaries loaded at:
  5. # - fdt: 0x83000000
  6. # - kernel: 0x80080000
  7. # - xen: 0x84000000
  8. #
  9. # This script should be encapsulate in U-boot Image (see below how to
  10. # create it) and loaded at 0x85000000.
  11. #
  12. # Please modify Xen command line (see xen_bootargs) and Linux command
  13. # line (see dom0_bootargs) at your convenience.
  14. #
  15. # We assume the Linux kernel is no bigger than 16Mb. If it is not the
  16. # case, please update kernel_size.
  17. #
  18. # Use the following command to generate the U-boot Image
  19. #
  20. # mkimage -T script -C none -d load-xen.scr load-xen.img
  21.  
  22. # Conveniences environment variables
  23.  
  24. setenv fdt_addr_r 0x83000000
  25.  
  26. setenv kernel_addr_r 0x80080000
  27. setenv kernel_size 0x01000000
  28.  
  29. setenv xen_addr_r 0x84000000
  30.  
  31. # Command line for xen and kernel
  32. setenv xen_bootargs "dtuart=serial0 console=dtuart noreboot dom0_mem=128M"
  33. setenv dom0_bootargs "console=hvc0 earlycon=pl011,0x1c090000"
  34.  
  35. ## Fixup the device tree
  36.  
  37. # Be sure U-boot is using our FDT
  38. fdt addr $fdt_addr
  39. # Resize the FDT just in case
  40. fdt resize
  41. # Set Xen arguments based on $xen_bootargs
  42. fdt set /chosen xen,xen-bootargs \"$xen_bootargs\"
  43. #setenv bootargs $xen_bootargs # On Xen unstable, xen cmdline is in bootargs
  44. # Set Dom0 arguments based on $dom0_bootargs
  45. fdt set /chosen xen,dom0-bootargs \"$dom0_bootargs\"
  46. # Create modules node
  47. fdt mknode /chosen modules
  48. fdt set /chosen/modules '#address-cells' <1>
  49. fdt set /chosen/modules '#size-cells' <1>
  50. # Create node for the linux located at $kernel_addr_r
  51. # We don't have the size in hand, set to a big value (16Mb)
  52. fdt mknode /chosen/modules module@0
  53. fdt set /chosen/modules/module@0 compatible multiboot,module
  54. fdt set /chosen/modules/module@0 reg <$kernel_addr_r $kernel_size>
  55.  
  56. # Dump the nodes created for debugging purpose
  57. fdt ls /chosen
  58. fdt ls /chosen/modules
  59. fdt ls /chosen/modules/module@0
  60.  
  61. ## Boot Xen
  62. bootefi $xen_addr_r $fdt_addr_r
RAW Paste Data