Permalink
Browse files

[TESTS] Update README for atomthreads RTOS on Realview-PB-A8 guest

Recently, we moved to boot time loading of Guest images from a block
device (i.e. RAM disk or some other disk). We have updated most of
our documentation as-per the new way of loading Guest images but
forgot to update documentation of running atomthreads RTOS on the
Realview-PB-A8 guest.

This patch updates README for atomthreads RTOS on Realview-PB-A8 guest.

Signed-off-by: Anup Patel <anup@brainfault.org>
  • Loading branch information...
1 parent 2c78ee3 commit 2f8fb0914c0eacab5eb97a96f38b9e96661ed227 @avpatel avpatel committed Feb 20, 2014
Showing with 101 additions and 13 deletions.
  1. +61 −13 tests/arm32/realview-pb-a8/atomthreads/README
  2. +40 −0 tests/arm32/realview-pb-a8/atomthreads/nor_flash.list
@@ -13,13 +13,13 @@ Please follow the steps below to build & run Atomthreads on Realview-PB-A8
Guest with Xvisor running on QEMU Realview-PB-A8 Host:
[1. Build environment for Xvisor]
- # CROSS_COMPILE=arm-none-linux-gnueabi-
+ # CROSS_COMPILE=arm-unknown-linux-gnueabi-
[2. GoTo Xvisor source directory]
# cd <xvisor_source_directory>
[3. Configure Xvisor with Realview-PB-A8 default settings]
- # make ARCH=arm realview-pb-a8-defconfig
+ # make ARCH=arm realview-pb-a8-defconfig
[4. Build Xvisor]
# make
@@ -41,40 +41,88 @@ Guest with Xvisor running on QEMU Realview-PB-A8 Host:
[9. Rebuild Atomthreads to reflect changed object files]
# make
- [10. Create qemu.img (from vmm.bin, firmware.bin.patched and all atomthreads testcases) for running it on QEMU]
- # <xvisor_source_directory>/tools/scripts/memimg.py -a 0x70010000 -o build/qemu.img <xvisor_source_directory>/build/vmm.bin@0x70010000 <xvisor_source_directory>/build/tests/arm32/realview-pb-a8/basic/firmware.bin.patched@0x71000000 build/kern1.bin@0x71100000 build/kern2.bin@0x71120000 build/kern3.bin@0x71140000 build/kern4.bin@0x71160000 build/mutex1.bin@0x71180000 build/mutex2.bin@0x711A0000 build/mutex3.bin@0x711C0000 build/mutex4.bin@0x711E0000 build/mutex5.bin@0x71200000 build/mutex6.bin@0x71220000 build/mutex7.bin@0x71240000 build/mutex8.bin@0x71260000 build/mutex9.bin@0x71280000 build/queue1.bin@0x712A0000 build/queue2.bin@0x712C0000 build/queue3.bin@0x712E0000 build/queue4.bin@0x71300000 build/queue5.bin@0x71320000 build/queue6.bin@0x71340000 build/queue7.bin@0x71360000 build/queue8.bin@0x71380000 build/queue9.bin@0x713A0000 build/queue10.bin@0x713C0000 build/sem1.bin@0x713E0000 build/sem2.bin@0x71400000 build/sem3.bin@0x71420000 build/sem4.bin@0x71440000 build/sem5.bin@0x71460000 build/sem6.bin@0x71480000 build/sem7.bin@0x714A0000 build/sem8.bin@0x714C0000 build/sem9.bin@0x714E0000 build/timer1.bin@0x71500000 build/timer2.bin@0x71520000 build/timer3.bin@0x71540000 build/timer4.bin@0x71560000 build/timer5.bin@0x71580000 build/timer6.bin@0x715A0000 build/timer7.bin@0x715C0000
+ [10. GoTo Xvisor source directory]
+ # cd <xvisor_source_directory>
- [11. Launch QEMU]
+ [11. Create disk image for Xvisor]
+ # mkdir -p ./build/disk/images/arm32/realview-pb-a8
+ # cp -f ./build/tests/arm32/realview-pb-a8/basic/firmware.bin.patched ./build/disk/images/arm32/realview-pb-a8/firmware.bin
+ # cp -f ./tests/arm32/realview-pb-a8/atomthreads/nor_flash.list ./build/disk/images/arm32/realview-pb-a8/nor_flash.list
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/kern1.bin ./build/disk/images/arm32/realview-pb-a8/kern1.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/kern2.bin ./build/disk/images/arm32/realview-pb-a8/kern2.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/kern3.bin ./build/disk/images/arm32/realview-pb-a8/kern3.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/kern4.bin ./build/disk/images/arm32/realview-pb-a8/kern4.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/mutex1.bin ./build/disk/images/arm32/realview-pb-a8/mutex1.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/mutex2.bin ./build/disk/images/arm32/realview-pb-a8/mutex2.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/mutex3.bin ./build/disk/images/arm32/realview-pb-a8/mutex3.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/mutex4.bin ./build/disk/images/arm32/realview-pb-a8/mutex4.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/mutex5.bin ./build/disk/images/arm32/realview-pb-a8/mutex5.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/mutex6.bin ./build/disk/images/arm32/realview-pb-a8/mutex6.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/mutex7.bin ./build/disk/images/arm32/realview-pb-a8/mutex7.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/mutex8.bin ./build/disk/images/arm32/realview-pb-a8/mutex8.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/mutex9.bin ./build/disk/images/arm32/realview-pb-a8/mutex9.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/queue1.bin ./build/disk/images/arm32/realview-pb-a8/queue1.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/queue2.bin ./build/disk/images/arm32/realview-pb-a8/queue2.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/queue3.bin ./build/disk/images/arm32/realview-pb-a8/queue3.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/queue4.bin ./build/disk/images/arm32/realview-pb-a8/queue4.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/queue5.bin ./build/disk/images/arm32/realview-pb-a8/queue5.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/queue6.bin ./build/disk/images/arm32/realview-pb-a8/queue6.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/queue7.bin ./build/disk/images/arm32/realview-pb-a8/queue7.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/queue8.bin ./build/disk/images/arm32/realview-pb-a8/queue8.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/queue9.bin ./build/disk/images/arm32/realview-pb-a8/queue9.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/queue10.bin ./build/disk/images/arm32/realview-pb-a8/queue10.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/sem1.bin ./build/disk/images/arm32/realview-pb-a8/sem1.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/sem2.bin ./build/disk/images/arm32/realview-pb-a8/sem2.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/sem3.bin ./build/disk/images/arm32/realview-pb-a8/sem3.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/sem4.bin ./build/disk/images/arm32/realview-pb-a8/sem4.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/sem5.bin ./build/disk/images/arm32/realview-pb-a8/sem5.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/sem6.bin ./build/disk/images/arm32/realview-pb-a8/sem6.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/sem7.bin ./build/disk/images/arm32/realview-pb-a8/sem7.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/sem8.bin ./build/disk/images/arm32/realview-pb-a8/sem8.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/sem9.bin ./build/disk/images/arm32/realview-pb-a8/sem9.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/timer1.bin ./build/disk/images/arm32/realview-pb-a8/timer1.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/timer2.bin ./build/disk/images/arm32/realview-pb-a8/timer2.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/timer3.bin ./build/disk/images/arm32/realview-pb-a8/timer3.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/timer4.bin ./build/disk/images/arm32/realview-pb-a8/timer4.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/timer5.bin ./build/disk/images/arm32/realview-pb-a8/timer5.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/timer6.bin ./build/disk/images/arm32/realview-pb-a8/timer6.bin
+ # cp -f <atomthreads_source_directory>/ports/arm32/build/timer7.bin ./build/disk/images/arm32/realview-pb-a8/timer7.bin
+ # genext2fs -B 1024 -b 16384 -d ./build/disk ./build/disk.img
+
+ [12. Create qemu.img for running it on QEMU]
+ # ./tools/scripts/memimg.py -a 0x70010000 -o build/qemu.img build/vmm.bin@0x70010000 build/disk.img@0x71000000
+
+ [13. Launch QEMU 0.14.xx or higher]
# qemu-system-arm -M realview-pb-a8 -m 256M -display none -serial stdio -kernel build/qemu.img
- [12. Kick Guest0 for starting Basic Firmware]
+ [14. Kick Guest0 for starting Basic Firmware]
XVisor# guest kick guest0
- [13. Bind to virtual UART]
+ [15. Bind to virtual UART]
XVisor# vserial bind guest0/uart0
- [14. Copy kern1.bin atomthreads test from NOR flash to DDR]
+ [16. Copy kern1.bin atomthreads test from NOR flash to DDR]
[guest0/uart0] basic# copy 0x100000 0x40100000 0x20000
- [15. Start atomthreads]
+ [17. Start atomthreads]
[guest0/uart0] basic# go 0x100000
- [16. Enter character seqence 'ESCAPE+x+q" return to Xvisor prompt]
+ [18. Enter character seqence 'ESCAPE+x+q" return to Xvisor prompt]
[guest0/uart0]
(Note: replace all <> brackets based on your workspace)
(Note: the above steps assumes Xvisor running on Realview-PB-A8 host emulated
by QEMU 0.14.xx or higher. For other types of ARM host some of the above
steps will need to be adapted for that specfic ARM host. For more info on
your desired ARM host refer docs/arm/)
- (Note: step 14 copies kern1.bin test case to 0x100000 instead of this you
+ (Note: step 16 copies kern1.bin test case to 0x100000 instead of this you
can use kern2.bin, ..., mutex1.bin, ..., etc. testcases. All testcases are
loaded to NOR flash location 0x40100000 at 0x20000 offset. All testcases are
compiled for 0x100000 location so you have to copy them to same location and
you can test only one test case at a time. To try another test after running
a particular test we have to reset the guest from Xvisor prompt using guest
- command after step 16 and do step 14 to step 16 for another testcase.)
- (Note: step 14 & step 15 assume that text base address for atomthreads
+ command after step 18 and do step 16 to step 18 for another testcase.)
+ (Note: step 16 & step 17 assume that text base address for atomthreads
binary is 0x100000. You can change this in atomthreads source and modify
the above steps accordingly.)
@@ -0,0 +1,40 @@
+0x40000000 /images/arm32/realview-pb-a8/firmware.bin
+0x40100000 /images/arm32/realview-pb-a8/kern1.bin
+0x40120000 /images/arm32/realview-pb-a8/kern2.bin
+0x40140000 /images/arm32/realview-pb-a8/kern3.bin
+0x40160000 /images/arm32/realview-pb-a8/kern4.bin
+0x40180000 /images/arm32/realview-pb-a8/mutex1.bin
+0x401A0000 /images/arm32/realview-pb-a8/mutex2.bin
+0x401C0000 /images/arm32/realview-pb-a8/mutex3.bin
+0x401E0000 /images/arm32/realview-pb-a8/mutex4.bin
+0x40200000 /images/arm32/realview-pb-a8/mutex5.bin
+0x40220000 /images/arm32/realview-pb-a8/mutex6.bin
+0x40240000 /images/arm32/realview-pb-a8/mutex7.bin
+0x40260000 /images/arm32/realview-pb-a8/mutex8.bin
+0x40280000 /images/arm32/realview-pb-a8/mutex9.bin
+0x402A0000 /images/arm32/realview-pb-a8/queue1.bin
+0x402C0000 /images/arm32/realview-pb-a8/queue2.bin
+0x402E0000 /images/arm32/realview-pb-a8/queue3.bin
+0x40300000 /images/arm32/realview-pb-a8/queue4.bin
+0x40320000 /images/arm32/realview-pb-a8/queue5.bin
+0x40340000 /images/arm32/realview-pb-a8/queue6.bin
+0x40360000 /images/arm32/realview-pb-a8/queue7.bin
+0x40380000 /images/arm32/realview-pb-a8/queue8.bin
+0x403A0000 /images/arm32/realview-pb-a8/queue9.bin
+0x403C0000 /images/arm32/realview-pb-a8/queue10.bin
+0x403E0000 /images/arm32/realview-pb-a8/sem1.bin
+0x40400000 /images/arm32/realview-pb-a8/sem2.bin
+0x40420000 /images/arm32/realview-pb-a8/sem3.bin
+0x40440000 /images/arm32/realview-pb-a8/sem4.bin
+0x40460000 /images/arm32/realview-pb-a8/sem5.bin
+0x40480000 /images/arm32/realview-pb-a8/sem6.bin
+0x404A0000 /images/arm32/realview-pb-a8/sem7.bin
+0x404C0000 /images/arm32/realview-pb-a8/sem8.bin
+0x404E0000 /images/arm32/realview-pb-a8/sem9.bin
+0x40500000 /images/arm32/realview-pb-a8/timer1.bin
+0x40520000 /images/arm32/realview-pb-a8/timer2.bin
+0x40540000 /images/arm32/realview-pb-a8/timer3.bin
+0x40560000 /images/arm32/realview-pb-a8/timer4.bin
+0x40580000 /images/arm32/realview-pb-a8/timer5.bin
+0x405A0000 /images/arm32/realview-pb-a8/timer6.bin
+0x405C0000 /images/arm32/realview-pb-a8/timer7.bin

0 comments on commit 2f8fb09

Please sign in to comment.