Discussion:
tz_vmm demo on imx53qsb
Joseph Lee
2015-12-28 03:48:14 UTC
Permalink
Hi everyone,

i am currently trying to run trustzone demo on imx53 Quick Start Board
(qsb). In which i want to run Android OS in the normal world. i followed
the instruction in this link (
https://github.com/skalk/genode/blob/i.MX53_tablet_demo/os/src/server/vmm/imx53/README)
and built the uImage successfully. I put the uImage on the SD card
partition (/dev/mmcblk0p1). However, when try to boot the uImage, it gets
stuck after displaying the following outputs. I have attached the whole log
messages. FYI, the SD card has two partitions(/dev/mmcblk0p1 and
/dev/mmcblk0p2) with ext4 format.

mmc0: new high speed SDHC card at address 0007
mmcblk0: mmc0:0007 SD32G 28.9 GiB
mmcblk0: p1 p2
init: cannot open '/initlogo.rle'
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
init: Unable to open persistent property directory /data/property errno: 2
init: cannot find '/system/bin/sh', disabling 'console'
init: cannot find '/system/bin/servicemanager', disabling 'servicemanager'
init: cannot find '/system/bin/vold', disabling 'vold'
init: cannot find '/system/bin/netd', disabling 'netd'
init: cannot find '/system/bin/dispd', disabling 'dispd'
init: cannot find '/system/bin/debuggerd', disabling 'debuggerd'
init: cannot find '/system/bin/app_process', disabling 'zygote'
init: cannot find '/system/bin/mediaserver', disabling 'media'
init: cannot find '/system/bin/dbus-daemon', disabling 'dbus'
init: cannot find '/system/bin/installd', disabling 'installd'
init: cannot find '/system/etc/install-recovery.sh', disabling
'flash_recovery'
init: cannot find '/system/bin/keystore', disabling 'keystore'
init: cannot find '/system/bin/rild', disabling 'ril-daemon'
init: cannot find '/system/bin/magd', disabling 'magd'
init: cannot find '/system/bin/wlan_tool', disabling 'wlan_tool'

could you please let me know what is missing?

thank you!
Joseph Lee
2016-01-05 00:49:55 UTC
Permalink
Hello everyone,

I have built and run the current Genode version(15.11) with trustzone for
hw_imx53_qsb_tz platform but i used the initramfs (initrd.gz) for Android
image that are used in the demo for Sabre tablet (
https://github.com/skalk/genode/blob/i.MX53_tablet_demo/os/src/server/vmm/imx53/README).
After some trials and errors, I have managed to get the following outputs
(see attached) on the serial console and it got stuck. is this the right
approach to run Android in the normal world of i.mx53 QSB? What is missing
? lvds display is connected to the board but nothing is displayed.

Thanks,
Post by Joseph Lee
Hi everyone,
i am currently trying to run trustzone demo on imx53 Quick Start Board
(qsb). In which i want to run Android OS in the normal world. i followed
the instruction in this link (
https://github.com/skalk/genode/blob/i.MX53_tablet_demo/os/src/server/vmm/imx53/README)
and built the uImage successfully. I put the uImage on the SD card
partition (/dev/mmcblk0p1). However, when try to boot the uImage, it gets
stuck after displaying the following outputs. I have attached the whole log
messages. FYI, the SD card has two partitions(/dev/mmcblk0p1 and
/dev/mmcblk0p2) with ext4 format.
mmc0: new high speed SDHC card at address 0007
mmcblk0: mmc0:0007 SD32G 28.9 GiB
mmcblk0: p1 p2
init: cannot open '/initlogo.rle'
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
init: Unable to open persistent property directory /data/property errno: 2
init: cannot find '/system/bin/sh', disabling 'console'
init: cannot find '/system/bin/servicemanager', disabling 'servicemanager'
init: cannot find '/system/bin/vold', disabling 'vold'
init: cannot find '/system/bin/netd', disabling 'netd'
init: cannot find '/system/bin/dispd', disabling 'dispd'
init: cannot find '/system/bin/debuggerd', disabling 'debuggerd'
init: cannot find '/system/bin/app_process', disabling 'zygote'
init: cannot find '/system/bin/mediaserver', disabling 'media'
init: cannot find '/system/bin/dbus-daemon', disabling 'dbus'
init: cannot find '/system/bin/installd', disabling 'installd'
init: cannot find '/system/etc/install-recovery.sh', disabling
'flash_recovery'
init: cannot find '/system/bin/keystore', disabling 'keystore'
init: cannot find '/system/bin/rild', disabling 'ril-daemon'
init: cannot find '/system/bin/magd', disabling 'magd'
init: cannot find '/system/bin/wlan_tool', disabling 'wlan_tool'
could you please let me know what is missing?
thank you!
Stefan Kalkowski
2016-01-05 07:47:01 UTC
Permalink
Hi Joseph,
Post by Joseph Lee
Hello everyone,
I have built and run the current Genode version(15.11) with trustzone for
hw_imx53_qsb_tz platform but i used the initramfs (initrd.gz) for Android
image that are used in the demo for Sabre tablet (
https://github.com/skalk/genode/blob/i.MX53_tablet_demo/os/src/server/vmm/imx53/README).
That is right, one has to distinguish between Sabre Tablet and
Quickstart Board on different levels including the Android images. There
might be more surprises when porting the existent demo to the Quickstart
board.
Post by Joseph Lee
After some trials and errors, I have managed to get the following outputs
(see attached) on the serial console and it got stuck. is this the right
approach to run Android in the normal world of i.mx53 QSB? What is missing
? lvds display is connected to the board but nothing is displayed.
When looking at the attached output I cannot see any initialization of
drivers (e.g.: the framebuffer driver). It looks to me as if you are
using the current 'tz_vmm' run-script that is used for automated testing
only without any graphical setup. Is that right?
As an alternative, you might use the run script from the tablet demo as
a starting point:


https://raw.githubusercontent.com/skalk/genode/i.MX53_tablet_demo/os/run/vmm.run

But again, you must brace yourself for surprises, because the run-script
is pretty much outdated and was created for a very specific setup on top
of the SABRE tablet.

Apart from that, the output really looks good, but in the end your
Android VM faults when trying to access the GPU (data-abort at physical
address 0x30001740). That is because the GPU is set as secure within the
kernel device initialization (more precisely the Central Security Unit
initialization) in file:
repos/base-hw/src/core/include/spec/imx53/trustzone/csu.h

The GPU is set as secure like the "Image Processing Unit" (framebuffer
device), because we enabled the DMA channel of the framebuffer driver to
access secure memory, as it is driven by Genode's framebuffer driver
that runs within the secure world. Sadly the GPU device uses the same
DMA channel ID, and thereby the GPU is allowed to access secure memory
via DMA too. Therefore, we set the GPU to be used by the secure world only.

If you want to use the GPU within the normal world (Android) for
demonstration purposes only, and do not matter about DMA device attacks,
you can also re-set the GPU to be unsecure (search for GPU 2D and 3D in
the csu.h file).

Regards
Stefan
Post by Joseph Lee
Thanks,
Post by Joseph Lee
Hi everyone,
i am currently trying to run trustzone demo on imx53 Quick Start Board
(qsb). In which i want to run Android OS in the normal world. i followed
the instruction in this link (
https://github.com/skalk/genode/blob/i.MX53_tablet_demo/os/src/server/vmm/imx53/README)
and built the uImage successfully. I put the uImage on the SD card
partition (/dev/mmcblk0p1). However, when try to boot the uImage, it gets
stuck after displaying the following outputs. I have attached the whole log
messages. FYI, the SD card has two partitions(/dev/mmcblk0p1 and
/dev/mmcblk0p2) with ext4 format.
mmc0: new high speed SDHC card at address 0007
mmcblk0: mmc0:0007 SD32G 28.9 GiB
mmcblk0: p1 p2
init: cannot open '/initlogo.rle'
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
init: Unable to open persistent property directory /data/property errno: 2
init: cannot find '/system/bin/sh', disabling 'console'
init: cannot find '/system/bin/servicemanager', disabling 'servicemanager'
init: cannot find '/system/bin/vold', disabling 'vold'
init: cannot find '/system/bin/netd', disabling 'netd'
init: cannot find '/system/bin/dispd', disabling 'dispd'
init: cannot find '/system/bin/debuggerd', disabling 'debuggerd'
init: cannot find '/system/bin/app_process', disabling 'zygote'
init: cannot find '/system/bin/mediaserver', disabling 'media'
init: cannot find '/system/bin/dbus-daemon', disabling 'dbus'
init: cannot find '/system/bin/installd', disabling 'installd'
init: cannot find '/system/etc/install-recovery.sh', disabling
'flash_recovery'
init: cannot find '/system/bin/keystore', disabling 'keystore'
init: cannot find '/system/bin/rild', disabling 'ril-daemon'
init: cannot find '/system/bin/magd', disabling 'magd'
init: cannot find '/system/bin/wlan_tool', disabling 'wlan_tool'
could you please let me know what is missing?
thank you!
------------------------------------------------------------------------------
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
--
Stefan Kalkowski
Genode Labs

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

------------------------------------------------------------------------------
Joseph Lee
2016-01-05 22:34:12 UTC
Permalink
Hi Stefan,

Thanks a lot for your explanation.

when i reset the GPU to be unsecure in csu.h file, it displays the attached
output and gets stuck again. I assume a user prompt will appear in the end
to execute Linux commands. is that right? what does "sh: can't access tty;
job control turned off" error mean?

Thanks,

On Tue, Jan 5, 2016 at 8:47 AM, Stefan Kalkowski <
Post by Stefan Kalkowski
Hi Joseph,
Post by Joseph Lee
Hello everyone,
I have built and run the current Genode version(15.11) with trustzone for
hw_imx53_qsb_tz platform but i used the initramfs (initrd.gz) for Android
image that are used in the demo for Sabre tablet (
https://github.com/skalk/genode/blob/i.MX53_tablet_demo/os/src/server/vmm/imx53/README
).
That is right, one has to distinguish between Sabre Tablet and
Quickstart Board on different levels including the Android images. There
might be more surprises when porting the existent demo to the Quickstart
board.
Post by Joseph Lee
After some trials and errors, I have managed to get the following outputs
(see attached) on the serial console and it got stuck. is this the right
approach to run Android in the normal world of i.mx53 QSB? What is
missing
Post by Joseph Lee
? lvds display is connected to the board but nothing is displayed.
When looking at the attached output I cannot see any initialization of
drivers (e.g.: the framebuffer driver). It looks to me as if you are
using the current 'tz_vmm' run-script that is used for automated testing
only without any graphical setup. Is that right?
As an alternative, you might use the run script from the tablet demo as
https://raw.githubusercontent.com/skalk/genode/i.MX53_tablet_demo/os/run/vmm.run
But again, you must brace yourself for surprises, because the run-script
is pretty much outdated and was created for a very specific setup on top
of the SABRE tablet.
Apart from that, the output really looks good, but in the end your
Android VM faults when trying to access the GPU (data-abort at physical
address 0x30001740). That is because the GPU is set as secure within the
kernel device initialization (more precisely the Central Security Unit
repos/base-hw/src/core/include/spec/imx53/trustzone/csu.h
The GPU is set as secure like the "Image Processing Unit" (framebuffer
device), because we enabled the DMA channel of the framebuffer driver to
access secure memory, as it is driven by Genode's framebuffer driver
that runs within the secure world. Sadly the GPU device uses the same
DMA channel ID, and thereby the GPU is allowed to access secure memory
via DMA too. Therefore, we set the GPU to be used by the secure world only.
If you want to use the GPU within the normal world (Android) for
demonstration purposes only, and do not matter about DMA device attacks,
you can also re-set the GPU to be unsecure (search for GPU 2D and 3D in
the csu.h file).
Regards
Stefan
Post by Joseph Lee
Thanks,
Post by Joseph Lee
Hi everyone,
i am currently trying to run trustzone demo on imx53 Quick Start Board
(qsb). In which i want to run Android OS in the normal world. i followed
the instruction in this link (
https://github.com/skalk/genode/blob/i.MX53_tablet_demo/os/src/server/vmm/imx53/README
)
Post by Joseph Lee
Post by Joseph Lee
and built the uImage successfully. I put the uImage on the SD card
partition (/dev/mmcblk0p1). However, when try to boot the uImage, it
gets
Post by Joseph Lee
Post by Joseph Lee
stuck after displaying the following outputs. I have attached the whole
log
Post by Joseph Lee
Post by Joseph Lee
messages. FYI, the SD card has two partitions(/dev/mmcblk0p1 and
/dev/mmcblk0p2) with ext4 format.
mmc0: new high speed SDHC card at address 0007
mmcblk0: mmc0:0007 SD32G 28.9 GiB
mmcblk0: p1 p2
init: cannot open '/initlogo.rle'
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
init: Unable to open persistent property directory /data/property
errno: 2
Post by Joseph Lee
Post by Joseph Lee
init: cannot find '/system/bin/sh', disabling 'console'
init: cannot find '/system/bin/servicemanager', disabling
'servicemanager'
Post by Joseph Lee
Post by Joseph Lee
init: cannot find '/system/bin/vold', disabling 'vold'
init: cannot find '/system/bin/netd', disabling 'netd'
init: cannot find '/system/bin/dispd', disabling 'dispd'
init: cannot find '/system/bin/debuggerd', disabling 'debuggerd'
init: cannot find '/system/bin/app_process', disabling 'zygote'
init: cannot find '/system/bin/mediaserver', disabling 'media'
init: cannot find '/system/bin/dbus-daemon', disabling 'dbus'
init: cannot find '/system/bin/installd', disabling 'installd'
init: cannot find '/system/etc/install-recovery.sh', disabling
'flash_recovery'
init: cannot find '/system/bin/keystore', disabling 'keystore'
init: cannot find '/system/bin/rild', disabling 'ril-daemon'
init: cannot find '/system/bin/magd', disabling 'magd'
init: cannot find '/system/bin/wlan_tool', disabling 'wlan_tool'
could you please let me know what is missing?
thank you!
------------------------------------------------------------------------------
Post by Joseph Lee
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
--
Stefan Kalkowski
Genode Labs
http://www.genode-labs.com/ · http://genode.org/
------------------------------------------------------------------------------
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
Stefan Kalkowski
2016-01-08 07:53:40 UTC
Permalink
Hi,
Post by Joseph Lee
Hi Stefan,
Thanks a lot for your explanation.
when i reset the GPU to be unsecure in csu.h file, it displays the attached
output and gets stuck again. I assume a user prompt will appear in the end
to execute Linux commands. is that right? what does "sh: can't access tty;
job control turned off" error mean?
whether you will see a shell prompt on the serial line fully depends on
the initramfs and the android services that are under your control. As I
already said the original example you have adapted depends on the
display driver etc. which doesn't seem to be incorporated into your run
script.

The message "sh: can't access tty; job control turned off" point to the
fact that your initramfs starts a shell in the end (with other words the
linux boot process finished) but it isn't writing to a proper tty,
thereby it does not support e.g.: background processes or in general
"job control". Probably it does not use the right serial tty in your
initramfs. Does the /dev/ttymxc0 file exists within your initramfs, or
is it created via udev or android configuration?
What I can see from your output is, that you are still using the same
kernel command line parameters like in the automated tz_vmm run-script
version. In the old android demonstration scenario we used the following
additional parameters: "androidboot.console=ttymxc0
video=mxcdi1fb:RGB666,XGA gpu_memory=64M lpj=4997120". Although the
video and lpj parameter probably must be different when using the
Quickstart board instead of the tablet, the console parameter should be
important for android.

To be honest, I'm no expert for bootstrapping an Android system.
Although, I brought that Android example on top of Genode/TrustZone to
life, I'm not so much familiar with the internals of the Android
configuration system. So if you are dealing with problems here, it might
be valueable to look into Android porting howtos and Android system
developer forums.

Best regards
Stefan
Post by Joseph Lee
Thanks,
On Tue, Jan 5, 2016 at 8:47 AM, Stefan Kalkowski <
Post by Stefan Kalkowski
Hi Joseph,
Post by Joseph Lee
Hello everyone,
I have built and run the current Genode version(15.11) with trustzone for
hw_imx53_qsb_tz platform but i used the initramfs (initrd.gz) for Android
image that are used in the demo for Sabre tablet (
https://github.com/skalk/genode/blob/i.MX53_tablet_demo/os/src/server/vmm/imx53/README
).
That is right, one has to distinguish between Sabre Tablet and
Quickstart Board on different levels including the Android images. There
might be more surprises when porting the existent demo to the Quickstart
board.
Post by Joseph Lee
After some trials and errors, I have managed to get the following outputs
(see attached) on the serial console and it got stuck. is this the right
approach to run Android in the normal world of i.mx53 QSB? What is
missing
Post by Joseph Lee
? lvds display is connected to the board but nothing is displayed.
When looking at the attached output I cannot see any initialization of
drivers (e.g.: the framebuffer driver). It looks to me as if you are
using the current 'tz_vmm' run-script that is used for automated testing
only without any graphical setup. Is that right?
As an alternative, you might use the run script from the tablet demo as
https://raw.githubusercontent.com/skalk/genode/i.MX53_tablet_demo/os/run/vmm.run
But again, you must brace yourself for surprises, because the run-script
is pretty much outdated and was created for a very specific setup on top
of the SABRE tablet.
Apart from that, the output really looks good, but in the end your
Android VM faults when trying to access the GPU (data-abort at physical
address 0x30001740). That is because the GPU is set as secure within the
kernel device initialization (more precisely the Central Security Unit
repos/base-hw/src/core/include/spec/imx53/trustzone/csu.h
The GPU is set as secure like the "Image Processing Unit" (framebuffer
device), because we enabled the DMA channel of the framebuffer driver to
access secure memory, as it is driven by Genode's framebuffer driver
that runs within the secure world. Sadly the GPU device uses the same
DMA channel ID, and thereby the GPU is allowed to access secure memory
via DMA too. Therefore, we set the GPU to be used by the secure world only.
If you want to use the GPU within the normal world (Android) for
demonstration purposes only, and do not matter about DMA device attacks,
you can also re-set the GPU to be unsecure (search for GPU 2D and 3D in
the csu.h file).
Regards
Stefan
Post by Joseph Lee
Thanks,
Post by Joseph Lee
Hi everyone,
i am currently trying to run trustzone demo on imx53 Quick Start Board
(qsb). In which i want to run Android OS in the normal world. i followed
the instruction in this link (
https://github.com/skalk/genode/blob/i.MX53_tablet_demo/os/src/server/vmm/imx53/README
)
Post by Joseph Lee
Post by Joseph Lee
and built the uImage successfully. I put the uImage on the SD card
partition (/dev/mmcblk0p1). However, when try to boot the uImage, it
gets
Post by Joseph Lee
Post by Joseph Lee
stuck after displaying the following outputs. I have attached the whole
log
Post by Joseph Lee
Post by Joseph Lee
messages. FYI, the SD card has two partitions(/dev/mmcblk0p1 and
/dev/mmcblk0p2) with ext4 format.
mmc0: new high speed SDHC card at address 0007
mmcblk0: mmc0:0007 SD32G 28.9 GiB
mmcblk0: p1 p2
init: cannot open '/initlogo.rle'
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
init: Unable to open persistent property directory /data/property
errno: 2
Post by Joseph Lee
Post by Joseph Lee
init: cannot find '/system/bin/sh', disabling 'console'
init: cannot find '/system/bin/servicemanager', disabling
'servicemanager'
Post by Joseph Lee
Post by Joseph Lee
init: cannot find '/system/bin/vold', disabling 'vold'
init: cannot find '/system/bin/netd', disabling 'netd'
init: cannot find '/system/bin/dispd', disabling 'dispd'
init: cannot find '/system/bin/debuggerd', disabling 'debuggerd'
init: cannot find '/system/bin/app_process', disabling 'zygote'
init: cannot find '/system/bin/mediaserver', disabling 'media'
init: cannot find '/system/bin/dbus-daemon', disabling 'dbus'
init: cannot find '/system/bin/installd', disabling 'installd'
init: cannot find '/system/etc/install-recovery.sh', disabling
'flash_recovery'
init: cannot find '/system/bin/keystore', disabling 'keystore'
init: cannot find '/system/bin/rild', disabling 'ril-daemon'
init: cannot find '/system/bin/magd', disabling 'magd'
init: cannot find '/system/bin/wlan_tool', disabling 'wlan_tool'
could you please let me know what is missing?
thank you!
------------------------------------------------------------------------------
Post by Joseph Lee
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
--
Stefan Kalkowski
Genode Labs
http://www.genode-labs.com/ · http://genode.org/
------------------------------------------------------------------------------
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
------------------------------------------------------------------------------
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
--
Stefan Kalkowski
Genode Labs

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

------------------------------------------------------------------------------
Joseph Lee
2016-01-10 23:19:58 UTC
Permalink
Hi Stefan,

Thank you so much. I will check out some Android developer forums.

But for now, I tried it in a different way. Unlike your demo in this article
<https://github.com/skalk/genode/blob/i.MX53_tablet_demo/os/src/server/vmm/imx53/README>,
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 (
http://www.adeneo-embedded.com/en/Products/Board-Support-Packages/Freescale-i.MX53-QSB)
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?


Thanks and best regards,

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

[init -> tz_vmm] dfar = 8a82c00c [63fa000c]

you see: first the virtual fault address and in squared brackets the
physical address, which is 0x63fa000c. When you look into the Reference
Manual of the Freescale i.MX53 in section "Memory Map" you will find out
that the machine is faulting when accessing the Cortex A9 memory mapped
I/O addresses (0x63fa000 - 0x63fa3fff). When using the current
instruction pointer of the VM (0x80042c1c), and lookup that address in
your unstripped Linux binary e.g.: via objdump, you will be able to find
the particular point in the source code where Linux tries to access this
region (probably: arch/arm/mach-mx5/cpu.c:257). Alternatively just
review my patches to the Linux kernel here:

https://github.com/skalk/linux/commits/imx53-tz

that were used for the demo.

Regards
Stefan
Post by Joseph Lee
Thanks and best regards,
On Fri, Jan 8, 2016 at 8:53 AM, Stefan Kalkowski <
Post by Joseph Lee
Hi,
Post by Joseph Lee
Hi Stefan,
Thanks a lot for your explanation.
when i reset the GPU to be unsecure in csu.h file, it displays the
attached
Post by Joseph Lee
output and gets stuck again. I assume a user prompt will appear in the
end
Post by Joseph Lee
to execute Linux commands. is that right? what does "sh: can't access
tty;
Post by Joseph Lee
job control turned off" error mean?
whether you will see a shell prompt on the serial line fully depends on
the initramfs and the android services that are under your control. As I
already said the original example you have adapted depends on the
display driver etc. which doesn't seem to be incorporated into your run
script.
The message "sh: can't access tty; job control turned off" point to the
fact that your initramfs starts a shell in the end (with other words the
linux boot process finished) but it isn't writing to a proper tty,
thereby it does not support e.g.: background processes or in general
"job control". Probably it does not use the right serial tty in your
initramfs. Does the /dev/ttymxc0 file exists within your initramfs, or
is it created via udev or android configuration?
What I can see from your output is, that you are still using the same
kernel command line parameters like in the automated tz_vmm run-script
version. In the old android demonstration scenario we used the following
additional parameters: "androidboot.console=ttymxc0
video=mxcdi1fb:RGB666,XGA gpu_memory=64M lpj=4997120". Although the
video and lpj parameter probably must be different when using the
Quickstart board instead of the tablet, the console parameter should be
important for android.
To be honest, I'm no expert for bootstrapping an Android system.
Although, I brought that Android example on top of Genode/TrustZone to
life, I'm not so much familiar with the internals of the Android
configuration system. So if you are dealing with problems here, it might
be valueable to look into Android porting howtos and Android system
developer forums.
Best regards
Stefan
Post by Joseph Lee
Thanks,
On Tue, Jan 5, 2016 at 8:47 AM, Stefan Kalkowski <
Post by Stefan Kalkowski
Hi Joseph,
Post by Joseph Lee
Hello everyone,
I have built and run the current Genode version(15.11) with trustzone
for
Post by Joseph Lee
Post by Stefan Kalkowski
Post by Joseph Lee
hw_imx53_qsb_tz platform but i used the initramfs (initrd.gz) for
Android
Post by Joseph Lee
Post by Stefan Kalkowski
Post by Joseph Lee
image that are used in the demo for Sabre tablet (
https://github.com/skalk/genode/blob/i.MX53_tablet_demo/os/src/server/vmm/imx53/README
Post by Joseph Lee
Post by Stefan Kalkowski
).
That is right, one has to distinguish between Sabre Tablet and
Quickstart Board on different levels including the Android images. There
might be more surprises when porting the existent demo to the Quickstart
board.
Post by Joseph Lee
After some trials and errors, I have managed to get the following
outputs
Post by Joseph Lee
Post by Stefan Kalkowski
Post by Joseph Lee
(see attached) on the serial console and it got stuck. is this the
right
Post by Joseph Lee
Post by Stefan Kalkowski
Post by Joseph Lee
approach to run Android in the normal world of i.mx53 QSB? What is
missing
Post by Joseph Lee
? lvds display is connected to the board but nothing is displayed.
When looking at the attached output I cannot see any initialization of
drivers (e.g.: the framebuffer driver). It looks to me as if you are
using the current 'tz_vmm' run-script that is used for automated testing
only without any graphical setup. Is that right?
As an alternative, you might use the run script from the tablet demo as
https://raw.githubusercontent.com/skalk/genode/i.MX53_tablet_demo/os/run/vmm.run
Post by Joseph Lee
Post by Stefan Kalkowski
But again, you must brace yourself for surprises, because the run-script
is pretty much outdated and was created for a very specific setup on top
of the SABRE tablet.
Apart from that, the output really looks good, but in the end your
Android VM faults when trying to access the GPU (data-abort at physical
address 0x30001740). That is because the GPU is set as secure within the
kernel device initialization (more precisely the Central Security Unit
repos/base-hw/src/core/include/spec/imx53/trustzone/csu.h
The GPU is set as secure like the "Image Processing Unit" (framebuffer
device), because we enabled the DMA channel of the framebuffer driver to
access secure memory, as it is driven by Genode's framebuffer driver
that runs within the secure world. Sadly the GPU device uses the same
DMA channel ID, and thereby the GPU is allowed to access secure memory
via DMA too. Therefore, we set the GPU to be used by the secure world
only.
Post by Joseph Lee
Post by Stefan Kalkowski
If you want to use the GPU within the normal world (Android) for
demonstration purposes only, and do not matter about DMA device attacks,
you can also re-set the GPU to be unsecure (search for GPU 2D and 3D in
the csu.h file).
Regards
Stefan
Post by Joseph Lee
Thanks,
Post by Joseph Lee
Hi everyone,
i am currently trying to run trustzone demo on imx53 Quick Start Board
(qsb). In which i want to run Android OS in the normal world. i
followed
Post by Joseph Lee
Post by Stefan Kalkowski
Post by Joseph Lee
Post by Joseph Lee
the instruction in this link (
https://github.com/skalk/genode/blob/i.MX53_tablet_demo/os/src/server/vmm/imx53/README
Post by Joseph Lee
Post by Stefan Kalkowski
)
Post by Joseph Lee
Post by Joseph Lee
and built the uImage successfully. I put the uImage on the SD card
partition (/dev/mmcblk0p1). However, when try to boot the uImage, it
gets
Post by Joseph Lee
Post by Joseph Lee
stuck after displaying the following outputs. I have attached the
whole
Post by Joseph Lee
Post by Stefan Kalkowski
log
Post by Joseph Lee
Post by Joseph Lee
messages. FYI, the SD card has two partitions(/dev/mmcblk0p1 and
/dev/mmcblk0p2) with ext4 format.
mmc0: new high speed SDHC card at address 0007
mmcblk0: mmc0:0007 SD32G 28.9 GiB
mmcblk0: p1 p2
init: cannot open '/initlogo.rle'
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
init: Unable to open persistent property directory /data/property
errno: 2
Post by Joseph Lee
Post by Joseph Lee
init: cannot find '/system/bin/sh', disabling 'console'
init: cannot find '/system/bin/servicemanager', disabling
'servicemanager'
Post by Joseph Lee
Post by Joseph Lee
init: cannot find '/system/bin/vold', disabling 'vold'
init: cannot find '/system/bin/netd', disabling 'netd'
init: cannot find '/system/bin/dispd', disabling 'dispd'
init: cannot find '/system/bin/debuggerd', disabling 'debuggerd'
init: cannot find '/system/bin/app_process', disabling 'zygote'
init: cannot find '/system/bin/mediaserver', disabling 'media'
init: cannot find '/system/bin/dbus-daemon', disabling 'dbus'
init: cannot find '/system/bin/installd', disabling 'installd'
init: cannot find '/system/etc/install-recovery.sh', disabling
'flash_recovery'
init: cannot find '/system/bin/keystore', disabling 'keystore'
init: cannot find '/system/bin/rild', disabling 'ril-daemon'
init: cannot find '/system/bin/magd', disabling 'magd'
init: cannot find '/system/bin/wlan_tool', disabling 'wlan_tool'
could you please let me know what is missing?
thank you!
------------------------------------------------------------------------------
Post by Joseph Lee
Post by Stefan Kalkowski
Post by Joseph Lee
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
--
Stefan Kalkowski
Genode Labs
http://www.genode-labs.com/ · http://genode.org/
------------------------------------------------------------------------------
Post by Joseph Lee
Post by Stefan Kalkowski
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
------------------------------------------------------------------------------
Post by Joseph Lee
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
--
Stefan Kalkowski
Genode Labs
http://www.genode-labs.com/ · http://genode.org/
------------------------------------------------------------------------------
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
--
Stefan Kalkowski
Genode Labs

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