Hello,
I'm trying to boot genode on the secure world and linux on normal world of the iMX53-QSB board (freescale).
The problem I'm encountering is: [init -> tz_vmm] Start virtual machine ... and then various errors, either it hangs, or undefined instruction, or Pagefault in core thread (pager_activation): ip=70055228 fault=20ef8904 failed to communicate thread event
My steps leading to this:
Downloaded http://genode.org/files/images/imx53_qsb/initrd.gz and cloned https://github.com/skalk/linux.git git checkout imx53-tz
Kernel compile: using http://www.codesourcery.com/sgpp/lite/arm/portal/package4573/public/arm-none... make CROSS_COMPILE=/opt/codesourcery/bin/arm-none-linux-gnueabi- ARCH=arm imx5_android_tz_defconfig make CROSS_COMPILE=/opt/codesourcery/bin/arm-none-linux-gnueabi- ARCH=arm uImage copied the initrd and uImage into the micro sd card, changed the name of uImage into linux
I cloned https://github.com/genodelabs/genode.git working on the master branch, current commit hash: 54ef87c
Created build directory: tool/create_builddir hw_imx53_qsb_tz BUILD_DIR=hw_imx53_qsb_tz I added "SPECS += trustzone" to etc/specs.conf in the build directory
Compiled: make run/tz_vmm
Created u-boot image: /opt/gcc-linaro-arm-none-eabi-4.9-2014.09_linux/bin/arm-none-eabi-objcopy -O binary var/run/tz_vmm/image.elf var/run/tz_vmm/image.bin mkimage -A arm -O linux -T kernel -C none -a 0x70010000 -e 0x70010000 -d var/run/tz_vmm/image.bin var/run/tz_vmm/uImage
Next, i copy the image to the micro sd card.
On the u-boot shell: ext2load mmc 0:1 0x71000000 uImage bootm 0x71000000
OUTPUT: ## Booting kernel from Legacy Image at 71000000 ... Image Name: Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 9355264 Bytes = 8.9 MiB Load Address: 70010000 Entry Point: 70010000 Verifying Checksum ... OK Loading Kernel Image ... OK
Starting kernel ...
kernel initialized Genode 15.02 <local changes> int main(): --- create local services --- int main(): --- start init --- In Rom_connection(): /home/hassonof/arm-tz/devel/boards/iMX53/genode-original/repos/base/include/rom_session/con7 filename = init, label = <NULL> int main(): transferred 246 MB to init int main(): --- init created, waiting for exit condition --- [init] Could not open file "ld.lib.so" [init] In Rom_connection(): /home/hassonof/arm-tz/devel/boards/iMX53/genode-original/repos/base/include/rom_sess7 [init] filename = config, label = <NULL> [init] parent provides [init] service "ROM" [init] service "RAM" [init] service "IRQ" [init] service "IO_MEM" [init] service "CAP" [init] service "PD" [init] service "RM" [init] service "CPU" [init] service "LOG" [init] service "SIGNAL" [init] service "VM" [init] In Rom_connection(): /home/hassonof/arm-tz/devel/boards/iMX53/genode-original/repos/base/include/rom_sess7 [init] filename = tz_vmm, label = tz_vmm [init] child "tz_vmm" [init] RAM quota: 3932160 [init] ELF binary: tz_vmm [init] priority: 0 [init -> tz_vmm] Start virtual machine ...
and then errors described at the beginning. I was looking in the code and dumping some output to find the problem, at repos/os/src/server/tz_vmm/include/vm_base.h: _load_kernel() function, at lines #52-53 the memcpy crashes. the arguments being passed to him are: destination: 80008000 source: f0001000, size: 3203072
what am i doing wrong ?
Thanks Ofer
Hi Ofer,
On 10.03.2015 11:19, Ofer Hasson wrote:
Hello,
I'm trying to boot genode on the secure world and linux on normal world of the iMX53-QSB board (freescale).
The problem I'm encountering is: [init -> tz_vmm] Start virtual machine ... and then various errors, either it hangs, or undefined instruction, or Pagefault in core thread (pager_activation): ip=70055228 fault=20ef8904 failed to communicate thread event
My steps leading to this:
Downloaded http://genode.org/files/images/imx53_qsb/initrd.gz and cloned https://github.com/skalk/linux.git git checkout imx53-tz
Kernel compile: using http://www.codesourcery.com/sgpp/lite/arm/portal/package4573/public/arm-none... make CROSS_COMPILE=/opt/codesourcery/bin/arm-none-linux-gnueabi- ARCH=arm imx5_android_tz_defconfig make CROSS_COMPILE=/opt/codesourcery/bin/arm-none-linux-gnueabi- ARCH=arm uImage copied the initrd and uImage into the micro sd card, changed the name of uImage into linux
This looks like a misconception to me. Regarding the uImage: You don't have to copy it to the SD card. It must be merged into Genodes single boot-image. This is done by the 'tz_vmm' run-script automatically. But the vanilla run script is configured to download and use our mainline image. So, you have to provide your image to the run script and prevent the run script from assuming that our mainline image is in use. Hence, do the following:
cp $LINUX_BUILD_DIR/*/uImage $GENODE_BUILD_DIR/bin/linux # open $GENODE_DIR/repos/os/run/tz_vmm.run for editing # comment out "exec >& /dev/null wget -O bin/linux.md5 $linux_uri.md5" # comment out "exec md5sum -c linux.md5" cd $GENODE_BUILD_DIR # open etc/build.conf make sure that RUN_OPT is # set to "--include boot_dir/hw --include image/uboot" make run/tz_vmm cp var/run/tz_vmm/uImage $SD_CARD_MNT
Now you're using your own Linux with our mainline Initrd. The "comment out" stuff ensures that the tz_vmm script doesn't check your Linux against our Linux MD5-checksum. If you want to use your own Initrd, before doing 'make', additionally do:
cp initrd.gz $GENODE_BUILD_DIR/bin/initrd.gz # open $GENODE_DIR/repos/os/run/tz_vmm.run for editing # comment out "exec >& /dev/null wget -O bin/initrd.gz.md5 $init_uri.md5" # comment out "exec md5sum -c initrd.gz.md5"
I cloned https://github.com/genodelabs/genode.git working on the master branch, current commit hash: 54ef87c
Created build directory: tool/create_builddir hw_imx53_qsb_tz BUILD_DIR=hw_imx53_qsb_tz I added "SPECS += trustzone" to etc/specs.conf in the build directory
You don't have to add this to the specs.conf as it is added automatically by '$GENODE_DIR/repos/base-hw/mk/spec-hw_imx53_qsb_tz.mk' which gets included because 'hw_imx53_qsb_tz' spec is set.
Compiled: make run/tz_vmm
Created u-boot image: /opt/gcc-linaro-arm-none-eabi-4.9-2014.09_linux/bin/arm-none-eabi-objcopy -O binary var/run/tz_vmm/image.elf var/run/tz_vmm/image.bin mkimage -A arm -O linux -T kernel -C none -a 0x70010000 -e 0x70010000 -d var/run/tz_vmm/image.bin var/run/tz_vmm/uImage
Creating a uImage is done automatically on 'make run/tz_vmm' if you have the '--include image/uboot' in your 'RUN_OPT' in 'etc/build.conf' as I mentioned above. The uImage can then be found in '$GENODE_BUILD_DIR/var/run/tz_vmm'.
Please have a try on that and let me know the results. If you have further questions, don't hesitate to ask.
Cheers, Martin
Indeed, i didn't realized that this was a single image, It's working now,
Thanks a lot Ofer
On Wed, Mar 11, 2015 at 4:10 PM, Martin Stein <martin.stein@...1...> wrote:
Hi Ofer,
On 10.03.2015 11:19, Ofer Hasson wrote:
Hello,
I'm trying to boot genode on the secure world and linux on normal world of the iMX53-QSB board (freescale).
The problem I'm encountering is: [init -> tz_vmm] Start virtual machine ... and then various errors, either it hangs, or undefined instruction, or Pagefault in core thread (pager_activation): ip=70055228 fault=20ef8904 failed to communicate thread event
My steps leading to this:
Downloaded http://genode.org/files/images/imx53_qsb/initrd.gz and cloned https://github.com/skalk/linux.git git checkout imx53-tz
Kernel compile: using
http://www.codesourcery.com/sgpp/lite/arm/portal/package4573/public/arm-none...
make CROSS_COMPILE=/opt/codesourcery/bin/arm-none-linux-gnueabi- ARCH=arm imx5_android_tz_defconfig make CROSS_COMPILE=/opt/codesourcery/bin/arm-none-linux-gnueabi- ARCH=arm uImage copied the initrd and uImage into the micro sd card, changed the name of uImage into linux
This looks like a misconception to me. Regarding the uImage: You don't have to copy it to the SD card. It must be merged into Genodes single boot-image. This is done by the 'tz_vmm' run-script automatically. But the vanilla run script is configured to download and use our mainline image. So, you have to provide your image to the run script and prevent the run script from assuming that our mainline image is in use. Hence, do the following:
cp $LINUX_BUILD_DIR/*/uImage $GENODE_BUILD_DIR/bin/linux # open $GENODE_DIR/repos/os/run/tz_vmm.run for editing # comment out "exec >& /dev/null wget -O bin/linux.md5 $linux_uri.md5" # comment out "exec md5sum -c linux.md5" cd $GENODE_BUILD_DIR # open etc/build.conf make sure that RUN_OPT is # set to "--include boot_dir/hw --include image/uboot" make run/tz_vmm cp var/run/tz_vmm/uImage $SD_CARD_MNT
Now you're using your own Linux with our mainline Initrd. The "comment out" stuff ensures that the tz_vmm script doesn't check your Linux against our Linux MD5-checksum. If you want to use your own Initrd, before doing 'make', additionally do:
cp initrd.gz $GENODE_BUILD_DIR/bin/initrd.gz # open $GENODE_DIR/repos/os/run/tz_vmm.run for editing # comment out "exec >& /dev/null wget -O bin/initrd.gz.md5 $init_uri.md5" # comment out "exec md5sum -c initrd.gz.md5"
I cloned https://github.com/genodelabs/genode.git working on the master branch, current commit hash: 54ef87c
Created build directory: tool/create_builddir hw_imx53_qsb_tz BUILD_DIR=hw_imx53_qsb_tz I added "SPECS += trustzone" to etc/specs.conf in the build directory
You don't have to add this to the specs.conf as it is added automatically by '$GENODE_DIR/repos/base-hw/mk/spec-hw_imx53_qsb_tz.mk' which gets included because 'hw_imx53_qsb_tz' spec is set.
Compiled: make run/tz_vmm
Created u-boot image: /opt/gcc-linaro-arm-none-eabi-4.9-2014.09_linux/bin/arm-none-eabi-objcopy -O binary var/run/tz_vmm/image.elf var/run/tz_vmm/image.bin mkimage -A arm -O linux -T kernel -C none -a 0x70010000 -e 0x70010000 -d var/run/tz_vmm/image.bin var/run/tz_vmm/uImage
Creating a uImage is done automatically on 'make run/tz_vmm' if you have the '--include image/uboot' in your 'RUN_OPT' in 'etc/build.conf' as I mentioned above. The uImage can then be found in '$GENODE_BUILD_DIR/var/run/tz_vmm'.
Please have a try on that and let me know the results. If you have further questions, don't hesitate to ask.
Cheers, Martin
Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main