Xen ARM with Virtualization Extensions/Stout: Difference between revisions
Otyshchenko (talk | contribs) |
Otyshchenko (talk | contribs) No edit summary |
||
Line 11: | Line 11: | ||
Clone sources from upstream and checkout on commit 425c0a43fbbec36571f6a03b530695b8b16a841d |
Clone sources from upstream and checkout on commit 425c0a43fbbec36571f6a03b530695b8b16a841d |
||
“Prepare v2019.01-rc3”: |
“Prepare v2019.01-rc3”: |
||
<pre> |
<pre> |
||
git clone git://git.denx.de/u-boot.git |
git clone git://git.denx.de/u-boot.git |
||
Line 54: | Line 53: | ||
== Get Xen sources == |
== Get Xen sources == |
||
Clone sources from upstream and checkout on commit ca135a4863ffeedca451651835fcd9aef6c872ff |
Clone sources from upstream and checkout on commit ca135a4863ffeedca451651835fcd9aef6c872ff |
||
“xen/arm: Add early printk support for SCIFA compatible UARTs” |
“xen/arm: Add early printk support for SCIFA compatible UARTs”: |
||
<pre> |
<pre> |
||
git clone git://xenbits.xenproject.org/xen.git |
git clone git://xenbits.xenproject.org/xen.git |
||
Line 69: | Line 67: | ||
Please note, if you can’t apply that patch series to Xen for some reason, then you should apply the following patch to Linux when preparing it (to not use “interrupts-extended” property for ARCH timer node): |
Please note, if you can’t apply that patch series to Xen for some reason, then you should apply the following patch to Linux when preparing it (to not use “interrupts-extended” property for ARCH timer node): |
||
0003-r8a7790.dtsi-temp-Use-interrupt-parent-interrupts-fo.patch |
"0003-r8a7790.dtsi-temp-Use-interrupt-parent-interrupts-fo.patch" |
||
== Configure Xen == |
== Configure Xen == |
||
Line 117: | Line 115: | ||
sudo cp tools/flask/policy/xenpolicy* <path_to_sd_card_partition>/boot/xenpolicy |
sudo cp tools/flask/policy/xenpolicy* <path_to_sd_card_partition>/boot/xenpolicy |
||
</pre> |
</pre> |
||
= Prepare Linux = |
|||
== Get Linux sources == |
|||
Clone sources from upstream and checkout on v5.1 tag: |
|||
<pre> |
|||
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git |
|||
cd linux |
|||
git checkout v5.1 -b stout_linux |
|||
</pre> |
|||
== Apply additional patches == |
|||
Apply the following patch (to not initialize CNTVOFF/counter module): |
|||
https://marc.info/?l=linux-kernel&m=155808712932351&w=2 |
|||
Apply the following patches from [1], which add Host Device Tree and Dom0 defconfig needed to run Xen: |
|||
<pre> |
|||
0001-ARM-dts-stout-Add-host-device-tree-to-be-able-to-run.patch |
|||
0002-ARM-shmobile-defconfig-Add-new-defconfig-to-be-able-.patch |
|||
</pre> |
|||
Apply the following patch from [1] (to not use “interrupts-extended” property for ARCH timer node) if needed: |
|||
<pre> |
|||
0003-r8a7790.dtsi-temp-Use-interrupt-parent-interrupts-fo.patch |
|||
</pre> |
|||
== Configure Linux == |
|||
<pre> |
|||
export CROSS_COMPILE=<path_to_gcc> |
|||
make ARCH=arm shmobile_dom0_defconfig |
|||
</pre> |
|||
== Build Linux and Device Tree == |
|||
<pre> |
|||
LOADADDR=0x48000000 make ARCH=arm uImage dtbs -j8 |
|||
</pre> |
|||
Copy resulting images to SD card (prepared beforehand): |
|||
<pre> |
|||
sudo cp arch/arm/boot/dts/r8a7790-stout-host.dtb <path_to_sd_card_partition>/boot/ |
|||
sudo cp arch/arm/boot/uImage <path_to_sd_card_partition>/boot/ |
|||
</pre> |
|||
[[Category:XenARM]] |
[[Category:XenARM]] |
Revision as of 18:25, 17 May 2019
This wiki describes how to run Xen on Renesas Stout board with R-Car H2 SoC.
Main information how to deal with Stout board are located at: https://elinux.org/R-Car/Boards/Yocto https://elinux.org/R-Car/Boards/Stout
Prepare U-boot
Get U-Boot sources
Clone sources from upstream and checkout on commit 425c0a43fbbec36571f6a03b530695b8b16a841d “Prepare v2019.01-rc3”:
git clone git://git.denx.de/u-boot.git cd u-boot git checkout 425c0a43fbbec36571f6a03b530695b8b16a841d -b stout_uboot
Apply additional patches
Apply the following patch series (PSCI support for r8a7790 SoC): http://u-boot.10912.n7.nabble.com/PATCH-0-3-PSCI-support-for-r8a7790-SoC-Lager-Stout-boards-td357352.html
Configure U-Boot
export CROSS_COMPILE=<path_to_gcc> make stout_defconfig make menuconfig
Set maximum supported CPUs for PSCI to 8:
ARM architecture ---> [*] Enable support for booting in non-secure mode (8) Maximum supported CPUs for PSCI
Build U-Boot
make
Copy resulting images to tftp directory for the future flashing:
sudo cp u-boot.img <path_to_tftp_dir>/ sudo cp spl/u-boot-spl.bin <path_to_tftp_dir>/
Prepare Xen
Get Xen sources
Clone sources from upstream and checkout on commit ca135a4863ffeedca451651835fcd9aef6c872ff “xen/arm: Add early printk support for SCIFA compatible UARTs”:
git clone git://xenbits.xenproject.org/xen.git cd xen git checkout ca135a4863ffeedca451651835fcd9aef6c872ff -b stout_xen
Apply additional patches
Apply the following small patch series (Support of handling nodes with “interrupts-extended” property): https://www.mail-archive.com/xen-devel@lists.xenproject.org/msg44364.html
Please note, if you can’t apply that patch series to Xen for some reason, then you should apply the following patch to Linux when preparing it (to not use “interrupts-extended” property for ARCH timer node): "0003-r8a7790.dtsi-temp-Use-interrupt-parent-interrupts-fo.patch"
Configure Xen
export CROSS_COMPILE=<path_to_gcc> XEN_TARGET_ARCH=arm32 ./configure cd xen make menuconfig XEN_TARGET_ARCH=arm32
Enable debugging option:
Debugging Options ---> [*] Developer Checks
Build Xen
With earlyprintk support:
cd ../ make xen XEN_TARGET_ARCH=arm32 debug=y CONFIG_EARLY_PRINTK=scif,0xe6c40000,A
- or -
Without earlyprintk support:
cd ../ make xen XEN_TARGET_ARCH=arm32 debug=y
Make Xen uImage:
mkimage -A arm -C none -T kernel -a 0x48000000 -e 0x48000000 -n "XEN" -d xen/xen xen-uImage
Build xenpolicy:
make -C tools/flask/policy
Copy resulting images to micro SD card (prepared beforehand):
sudo cp xen-uImage <path_to_sd_card_partition>/boot/ sudo cp tools/flask/policy/xenpolicy* <path_to_sd_card_partition>/boot/xenpolicy
Prepare Linux
Get Linux sources
Clone sources from upstream and checkout on v5.1 tag:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git cd linux git checkout v5.1 -b stout_linux
Apply additional patches
Apply the following patch (to not initialize CNTVOFF/counter module): https://marc.info/?l=linux-kernel&m=155808712932351&w=2
Apply the following patches from [1], which add Host Device Tree and Dom0 defconfig needed to run Xen:
0001-ARM-dts-stout-Add-host-device-tree-to-be-able-to-run.patch 0002-ARM-shmobile-defconfig-Add-new-defconfig-to-be-able-.patch
Apply the following patch from [1] (to not use “interrupts-extended” property for ARCH timer node) if needed:
0003-r8a7790.dtsi-temp-Use-interrupt-parent-interrupts-fo.patch
Configure Linux
export CROSS_COMPILE=<path_to_gcc> make ARCH=arm shmobile_dom0_defconfig
Build Linux and Device Tree
LOADADDR=0x48000000 make ARCH=arm uImage dtbs -j8
Copy resulting images to SD card (prepared beforehand):
sudo cp arch/arm/boot/dts/r8a7790-stout-host.dtb <path_to_sd_card_partition>/boot/ sudo cp arch/arm/boot/uImage <path_to_sd_card_partition>/boot/