VMM Demo on i.MX53 QSB

Stefan Kalkowski stefan.kalkowski at ...1...
Sat Jun 14 11:48:44 CEST 2014


Hi David,

On 06/12/2014 01:39 PM, David Goltzsche wrote:
> Hi Stefan, hi all,
> 
> thanks for pointing that out. I am able to boot the linux kernel in the
> normal world now. 

that's good news!

> 
> Here are a few more questions / notes I would like to share:
> 
> 1.
> In order to let the runscript exit successfully, I commented out the
> this line in tz_vmm.run:
> 
> #run_genode_until forever
> 
> Is there a more sophisticated way to do so, like defining s.th. in the
> specs.conf file?

Run-scripts that end with "run_genode_until forever" don't exit
automatically, but wait until the user cancels execution of the script.
In contrast to waiting "forever" the "run_genode_until" function can
wait for some expression in the serial output via "expect". There are
several run scripts in Genode that automatically check outputs, or even
interact with the remote system via serial line to test functionality.
Such run scripts are listed for example in "tool/autopilot.list". These
run-scripts are tested on a wide variety of kernel and hardware
platforms each night at Genode Labs. Unfortunately, by now the TrustZone
test script is not such an automated test, otherwise it could be
incorporated in the nightly testing infrastructure.

> 
> 2.
> The tz_vmm runscript only works for me in the 14.02 branch of the genode
> repository, the  runscript exits with the following error in the 14.05
> branch and in the current master branch:
> 
> COMPILE  vm_session_component.o
> ~/genode/repos/base-hw/src/core/vm_session_component.cc: In member
> function ‘virtual void
> Genode::Vm_session_component::exception_handler(Genode::Signal_context_capability)’:
> ~/genode/repos/base-hw/src/core/vm_session_component.cc:33:11: error:
> ‘new_vm’ is not a member of ‘Kernel’
> ~/genode/repos/base-hw/src/core/vm_session_component.cc: In member
> function ‘virtual void Genode::Vm_session_component::run()’:
> ~/genode/repos/base-hw/src/core/vm_session_component.cc:43:2: error:
> ‘run_vm’ is not a member of ‘Kernel’
> ~/genode/repos/base-hw/src/core/vm_session_component.cc: In member
> function ‘virtual void Genode::Vm_session_component::pause()’:
> ~/genode/repos/base-hw/src/core/vm_session_component.cc:53:2: error:
> ‘pause_vm’ is not a member of ‘Kernel’
> ~/genode/repos/base-hw/src/core/vm_session_component.cc: In constructor
> ‘Genode::Vm_session_component::Vm_session_component(Genode::Rpc_entrypoint*, Genode::Range_allocator*, Genode::size_t)’:
> ~/genode/repos/base-hw/src/core/vm_session_component.cc:66:6: error:
> ‘vm_size’ is not a member of ‘Kernel’
> ~/genode/repos/base-hw/src/core/vm_session_component.cc:67:22: error:
> ‘vm_size’ is not a member of ‘Kernel’
> ~/genode/repos/base/mk/generic.mk:56: recipe for target
> 'vm_session_component.o' failed
> make[4]: *** [vm_session_component.o] Error 1
> var/libdeps:23: recipe for target 'core.prg' failed
> make[3]: *** [core.prg] Error 2
> Makefile:209: recipe for target 'gen_deps_and_build_targets' failed
> 
> Are there important changes between version 14.02 and 14.05 that need to be considered when building?

I'm afraid you're the first who tested that script after several, recent
changes in the hw-kernel. I can confirm these build errors. As already
said, we need to incorporate this into the automated test.
I've opened a corresponding issue in our issue tracker at Github, and
will soon fix that (as well as incorporate it into testing, promised!):

  https://github.com/genodelabs/genode/issues/1182

> 
> 3.
> Since the busybox initrd has limited built-in commands (e.g. no sshd), I want to use another rootfs, more precicly the one from Arch Linux ARM.
> I thought that changing the kernel cmdline in genode/os/src/server/tz_vmm/imx53/main.cc to something like "root=/dev/mmcblk0p2 rootwait rw console=ttymxc0,115200 "
> would be sufficient, but seems not the case: the kernel still mounts the content of the initrd. 
> 
> Anyone here with experiences ?

Well, that's due to initrd's internal init script. The initrd used in
the example doesn't mount any root filesystem regardless whether you add
something to the kernel commandline or not. So you have to change not
only the rootfs, but the initrd too.

Best regards
Stefan

> 
> Thanks in advance!
> 
> David
> 
> On So, 2014-06-08 at 10:37 +0200, Stefan Kalkowski wrote:
>> Hi David,
>>
>> On 06/05/2014 10:50 AM, David Goltzsche wrote:
>>> Hi everyone,
>>>
>>> in preparation for my master thesis, i need to deploy the vmm demo on
>>> the i.MX53 quick start board. 
>>>
>>> I followed Stefans instructions in this thread:
>>> http://sourceforge.net/p/genode/mailman/genode-main/thread/9167aa55bacd5e3f00e64168280aef3e%40lcc.uma.es/#msg31683911 , so i did the following:
>>>
>>> I am using the master branch of this repo:
>>> git at ...116...:skalk/genode.git
>>>
>>> tool/create_builddir hw_imx53 BUILD_DIR=hw_imx53
>>> cd hw_imx53 
>>> echo "SPECS += trustzone" >> etc/specs.conf
>>> echo "RUN_OPT = --target uboot" >> etc/build.conf
>>> make run/tz_vmm
>>>
>>>
>>> It starts compiling, after some time i get the following output:
>>>
>>>   Program core/imx53/trustzone/core
>>>     ASSEMBLE boot_modules.o
>>>     LINK     core
>>> make[1]: Leaving directory '/tmp/genode/hw_imx53'
>>> Error: Can't execute automatically on target 'uboot'
>>> Makefile:237: recipe for target 'run/tz_vmm' failed
>>> make: *** [run/tz_vmm] Error 255
>>>
>>
>> The building steps you've taken are fine. The error message only states
>> that it won't execute automatically e.g. on QEmu because you've
>> configured the run-tool of Genode to produce an u-boot image only. In
>> your case that image can be found in 'var/run/tz_vmm/uImage' within your
>> build directory. You can load it to your target via network or sd-card.
>>
>> Nevertheless, the tz_vmm example you've build is probably not what you
>> intended to do, when you say "i need to deploy the vmm demo on
>> the i.MX53 quick start board". If you mean the demo shown in the video
>> that is part of the trustzone article on genode.org, then you need to
>> build something else. In that case you might take the i.MX53_tablet_demo
>> branch from the very same repo you've referenced, and build:
>>
>>   make run/vmm
>>
>> But be warned: that demo is outdated with respect to the current
>> mainline Genode repository. Moreover, the i.MX53 QSB platform misses a
>> corresponding input driver to reproduce that demo.
>>
>> If you just want to showcase that TrustZone is working on top of the
>> i.MX53 QSB without showing fancy demo effects like switching between
>> native Genode and Android etc., the run script you've chosen is the
>> right starting point. Nevertheless, in that case I propose to use the
>> master branch of Genode's mainline repository instead of that old one
>> you've referenced.
>>
>> Best regards
>> Stefan
>>
>>>
>>> What am I missing? Any help appreciated!
>>>
>>> kind regards
>>>
>>> David
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Learn Graph Databases - Download FREE O'Reilly Book
>>> "Graph Databases" is the definitive new guide to graph databases and their 
>>> applications. Written by three acclaimed leaders in the field, 
>>> this first edition is now available. Download your free book today!
>>> http://p.sf.net/sfu/NeoTech
>>> _______________________________________________
>>> genode-main mailing list
>>> genode-main at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/genode-main
>>>
>>
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://p.sf.net/sfu/hpccsystems
> _______________________________________________
> genode-main mailing list
> genode-main at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
> 

-- 
Stefan Kalkowski
Genode Labs

http://www.genode-labs.com/ · http://genode.org/




More information about the users mailing list