<div dir="ltr"><div>Hi Stefan,<br><br>Thank you so much. I will check out some Android developer forums. <br><br></div><div>But for now, I tried it in a different way. Unlike your demo in this <a href="https://github.com/skalk/genode/blob/i.MX53_tablet_demo/os/src/server/vmm/imx53/README">article</a>,
I wanted the display to be usable only by the normal world
(Linux/Android kernel). So I have downloaded the pre-built Linux/Android
kernel uImage binary for i.mx53QSB from Adeneo Embedded website (<a class="" href="http://www.adeneo-embedded.com/en/Products/Board-Support-Packages/Freescale-i.MX53-QSB" rel="nofollow">http://www.adeneo-embedded.com/en/Products/Board-Support-Packages/Freescale-i.MX53-QSB</a>)
and copy the binary to the 'bin' subdirectory of the Genode build
directory. I have also marked like I2C, GPIO and IPU as unsecure devices
in the csu.h file. However, I got a data abort error (see attached) at
boot time. Could you please tell me what is wrong? <br><br><br></div>Thanks and best regards, </div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 8, 2016 at 8:53 AM, Stefan Kalkowski <span dir="ltr"><<a href="mailto:stefan.kalkowski@...1..." target="_blank">stefan.kalkowski@...1...</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<span class=""><br>
On 01/05/2016 11:34 PM, Joseph Lee wrote:<br>
> Hi Stefan,<br>
><br>
> Thanks a lot for your explanation.<br>
><br>
> when i reset the GPU to be unsecure in csu.h file, it displays the attached<br>
> output and gets stuck again. I assume a user prompt will appear in the end<br>
> to execute Linux commands. is that right? what does "sh: can't access tty;<br>
> job control turned off" error mean?<br>
<br>
</span>whether you will see a shell prompt on the serial line fully depends on<br>
the initramfs and the android services that are under your control. As I<br>
already said the original example you have adapted depends on the<br>
display driver etc. which doesn't seem to be incorporated into your run<br>
script.<br>
<br>
The message "sh: can't access tty; job control turned off" point to the<br>
fact that your initramfs starts a shell in the end (with other words the<br>
linux boot process finished) but it isn't writing to a proper tty,<br>
thereby it does not support e.g.: background processes or in general<br>
"job control". Probably it does not use the right serial tty in your<br>
initramfs. Does the /dev/ttymxc0 file exists within your initramfs, or<br>
is it created via udev or android configuration?<br>
What I can see from your output is, that you are still using the same<br>
kernel command line parameters like in the automated tz_vmm run-script<br>
version. In the old android demonstration scenario we used the following<br>
additional parameters: "androidboot.console=ttymxc0<br>
video=mxcdi1fb:RGB666,XGA gpu_memory=64M lpj=4997120". Although the<br>
video and lpj parameter probably must be different when using the<br>
Quickstart board instead of the tablet, the console parameter should be<br>
important for android.<br>
<br>
To be honest, I'm no expert for bootstrapping an Android system.<br>
Although, I brought that Android example on top of Genode/TrustZone to<br>
life, I'm not so much familiar with the internals of the Android<br>
configuration system. So if you are dealing with problems here, it might<br>
be valueable to look into Android porting howtos and Android system<br>
developer forums.<br>
<br>
Best regards<br>
<span class="HOEnZb"><font color="#888888">Stefan<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> Thanks,<br>
><br>
> On Tue, Jan 5, 2016 at 8:47 AM, Stefan Kalkowski <<br>
> <a href="mailto:stefan.kalkowski@...1...">stefan.kalkowski@...1...</a>> wrote:<br>
><br>
>> Hi Joseph,<br>
>><br>
>> On 01/05/2016 01:49 AM, Joseph Lee wrote:<br>
>>> Hello everyone,<br>
>>><br>
>>> I have built and run the current Genode version(15.11) with trustzone for<br>
>>> hw_imx53_qsb_tz platform but i used the initramfs (initrd.gz) for Android<br>
>>> image that are used in the demo for Sabre tablet (<br>
>>><br>
>> <a href="https://github.com/skalk/genode/blob/i.MX53_tablet_demo/os/src/server/vmm/imx53/README" rel="noreferrer" target="_blank">https://github.com/skalk/genode/blob/i.MX53_tablet_demo/os/src/server/vmm/imx53/README</a><br>
>> ).<br>
>><br>
>> That is right, one has to distinguish between Sabre Tablet and<br>
>> Quickstart Board on different levels including the Android images. There<br>
>> might be more surprises when porting the existent demo to the Quickstart<br>
>> board.<br>
>><br>
>>> After some trials and errors, I have managed to get the following outputs<br>
>>> (see attached) on the serial console and it got stuck. is this the right<br>
>>> approach to run Android in the normal world of i.mx53 QSB? What is<br>
>> missing<br>
>>> ? lvds display is connected to the board but nothing is displayed.<br>
>><br>
>> When looking at the attached output I cannot see any initialization of<br>
>> drivers (e.g.: the framebuffer driver). It looks to me as if you are<br>
>> using the current 'tz_vmm' run-script that is used for automated testing<br>
>> only without any graphical setup. Is that right?<br>
>> As an alternative, you might use the run script from the tablet demo as<br>
>> a starting point:<br>
>><br>
>><br>
>><br>
>> <a href="https://raw.githubusercontent.com/skalk/genode/i.MX53_tablet_demo/os/run/vmm.run" rel="noreferrer" target="_blank">https://raw.githubusercontent.com/skalk/genode/i.MX53_tablet_demo/os/run/vmm.run</a><br>
>><br>
>> But again, you must brace yourself for surprises, because the run-script<br>
>> is pretty much outdated and was created for a very specific setup on top<br>
>> of the SABRE tablet.<br>
>><br>
>> Apart from that, the output really looks good, but in the end your<br>
>> Android VM faults when trying to access the GPU (data-abort at physical<br>
>> address 0x30001740). That is because the GPU is set as secure within the<br>
>> kernel device initialization (more precisely the Central Security Unit<br>
>> initialization) in file:<br>
>> repos/base-hw/src/core/include/spec/imx53/trustzone/csu.h<br>
>><br>
>> The GPU is set as secure like the "Image Processing Unit" (framebuffer<br>
>> device), because we enabled the DMA channel of the framebuffer driver to<br>
>> access secure memory, as it is driven by Genode's framebuffer driver<br>
>> that runs within the secure world. Sadly the GPU device uses the same<br>
>> DMA channel ID, and thereby the GPU is allowed to access secure memory<br>
>> via DMA too. Therefore, we set the GPU to be used by the secure world only.<br>
>><br>
>> If you want to use the GPU within the normal world (Android) for<br>
>> demonstration purposes only, and do not matter about DMA device attacks,<br>
>> you can also re-set the GPU to be unsecure (search for GPU 2D and 3D in<br>
>> the csu.h file).<br>
>><br>
>> Regards<br>
>> Stefan<br>
>><br>
>>><br>
>>> Thanks,<br>
>>><br>
>>> On Mon, Dec 28, 2015 at 4:48 AM, Joseph Lee <<a href="mailto:leejose911@...9...">leejose911@...9...</a>><br>
>> wrote:<br>
>>><br>
>>>> Hi everyone,<br>
>>>><br>
>>>> i am currently trying to run trustzone demo on imx53 Quick Start Board<br>
>>>> (qsb). In which i want to run Android OS in the normal world. i followed<br>
>>>> the instruction in this link (<br>
>>>><br>
>> <a href="https://github.com/skalk/genode/blob/i.MX53_tablet_demo/os/src/server/vmm/imx53/README" rel="noreferrer" target="_blank">https://github.com/skalk/genode/blob/i.MX53_tablet_demo/os/src/server/vmm/imx53/README</a><br>
>> )<br>
>>>> and built the uImage successfully. I put the uImage on the SD card<br>
>>>> partition (/dev/mmcblk0p1). However, when try to boot the uImage, it<br>
>> gets<br>
>>>> stuck after displaying the following outputs. I have attached the whole<br>
>> log<br>
>>>> messages. FYI, the SD card has two partitions(/dev/mmcblk0p1 and<br>
>>>> /dev/mmcblk0p2) with ext4 format.<br>
>>>><br>
>>>> mmc0: new high speed SDHC card at address 0007<br>
>>>> mmcblk0: mmc0:0007 SD32G 28.9 GiB<br>
>>>> mmcblk0: p1 p2<br>
>>>> init: cannot open '/initlogo.rle'<br>
>>>> EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts:<br>
>>>> (null)<br>
>>>> EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)<br>
>>>> init: Unable to open persistent property directory /data/property<br>
>> errno: 2<br>
>>>> init: cannot find '/system/bin/sh', disabling 'console'<br>
>>>> init: cannot find '/system/bin/servicemanager', disabling<br>
>> 'servicemanager'<br>
>>>> init: cannot find '/system/bin/vold', disabling 'vold'<br>
>>>> init: cannot find '/system/bin/netd', disabling 'netd'<br>
>>>> init: cannot find '/system/bin/dispd', disabling 'dispd'<br>
>>>> init: cannot find '/system/bin/debuggerd', disabling 'debuggerd'<br>
>>>> init: cannot find '/system/bin/app_process', disabling 'zygote'<br>
>>>> init: cannot find '/system/bin/mediaserver', disabling 'media'<br>
>>>> init: cannot find '/system/bin/dbus-daemon', disabling 'dbus'<br>
>>>> init: cannot find '/system/bin/installd', disabling 'installd'<br>
>>>> init: cannot find '/system/etc/install-recovery.sh', disabling<br>
>>>> 'flash_recovery'<br>
>>>> init: cannot find '/system/bin/keystore', disabling 'keystore'<br>
>>>> init: cannot find '/system/bin/rild', disabling 'ril-daemon'<br>
>>>> init: cannot find '/system/bin/magd', disabling 'magd'<br>
>>>> init: cannot find '/system/bin/wlan_tool', disabling 'wlan_tool'<br>
>>>><br>
>>>> could you please let me know what is missing?<br>
>>>><br>
>>>> thank you!<br>
>>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>> ------------------------------------------------------------------------------<br>
>>><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> genode-main mailing list<br>
>>> <a href="mailto:genode-main@lists.sourceforge.net">genode-main@lists.sourceforge.net</a><br>
>>> <a href="https://lists.sourceforge.net/lists/listinfo/genode-main" rel="noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/genode-main</a><br>
>>><br>
>><br>
>> --<br>
>> Stefan Kalkowski<br>
>> Genode Labs<br>
>><br>
>> <a href="http://www.genode-labs.com/" rel="noreferrer" target="_blank">http://www.genode-labs.com/</a> · <a href="http://genode.org/" rel="noreferrer" target="_blank">http://genode.org/</a><br>
>><br>
>><br>
>> ------------------------------------------------------------------------------<br>
>> _______________________________________________<br>
>> genode-main mailing list<br>
>> <a href="mailto:genode-main@lists.sourceforge.net">genode-main@...173...ists.sourceforge.net</a><br>
>> <a href="https://lists.sourceforge.net/lists/listinfo/genode-main" rel="noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/genode-main</a><br>
>><br>
><br>
><br>
><br>
> ------------------------------------------------------------------------------<br>
><br>
><br>
><br>
> _______________________________________________<br>
> genode-main mailing list<br>
> <a href="mailto:genode-main@lists.sourceforge.net">genode-main@...49....sourceforge.net</a><br>
> <a href="https://lists.sourceforge.net/lists/listinfo/genode-main" rel="noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/genode-main</a><br>
><br>
<br>
--<br>
Stefan Kalkowski<br>
Genode Labs<br>
<br>
<a href="http://www.genode-labs.com/" rel="noreferrer" target="_blank">http://www.genode-labs.com/</a> · <a href="http://genode.org/" rel="noreferrer" target="_blank">http://genode.org/</a><br>
<br>
------------------------------------------------------------------------------<br>
_______________________________________________<br>
genode-main mailing list<br>
<a href="mailto:genode-main@lists.sourceforge.net">genode-main@...12...ceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/genode-main" rel="noreferrer" target="_blank">https://lists.sourceforge.net/lists/listinfo/genode-main</a><br>
</div></div></blockquote></div><br></div>