Many thanks for your answers
In fact what I'm trying to do is using QEMU files into AOSP source code
to get Android (with GUI) built and running on a standard/upstream QEMU
version.
This would give the ability of running Android and its future releases
without real "porting", on any device running a Linux kernel (be it
upstream or not) and having KVM working on it. Which would be extremely
interesting.
From what you write, it seems qemu-trusty-arm64 is not really for me.
So what I'm trying to do is probably more about using
device/generic/qemu/qemu_arm64.mk (and others archs) files included into
AOSP. So I'll continue into this other subject :
https://groups.google.com/forum/?hl=bn#!topic/android-building/kbiEg5OxBGU
While talking with you, I noticed that AVD Emulator is different from
upstream QEMU, probably about goldfish and ranchu related things. Things
working fine with the emulator (aosp_x86_64-eng for example and
android-goldfish-4.14-dev which seems mandatory to get Android 10
working with AVD Emulator) does not seems to be working with upstream
QEMU (at least I can't get the GUI). Therefore the documentation about
AVD Emulator builds https://source.android.com/setup/create/avd didn't
really help me for upstream QEMU.
Can you confirm it's possible to use modern versions of AOSP on upstream
QEMU? Someone did succeed in the past with Android 6 / untouched AOSP
and a extended compatibility kernel (I have one based on
android-goldfish-4.14-dev), this is why I'm trying with newer versions
of AOSP. This was documented here, but it's not up to date anymore :
https://www.collabora.com/news-and-blog/blog/2016/09/02/building-android-for-qemu-a-step-by-step-guide/
Thank you in advance
Julien
On 3/2/20 10:51 PM, 'Matthew Maurer' via Android Building wrote:
This target is a testing target used for evaluating our reference
TrustZone implementation. "storageproxyd" is continuously resetting
there because it is not being launched by our test script
<https://android.googlesource.com/trusty/device/arm/generic-arm64/+/refs/heads/master/project/qemu/qemu.py> which
would attach a virtual RPMB resource.
A few notes about this target:
* It does not have a GUI
* Running Java is not supported and unlikely to work
* It requires a custom EL3 and Trusty running alongside it to work
The manifest for these components is at
https://android.googlesource.com/trusty/manifest, and that manifest
contains a checked in prebuilt of the qemu_trusty_arm64-userdebug
target that we are currently testing against.
If you tell me more about what you're trying to make the target do, I
may be able to give you further help with getting it to do what you
want. If you aren't trying to use or inspect the Trusty TZ
implementation, this target probably isn't the one you're looking for.
On Mon, Mar 2, 2020 at 1:34 PM Dan Willemsen <[email protected]
<mailto:[email protected]>> wrote:
+Matthew Maurer <mailto:[email protected]> Do we have any
documentation on this target? I think the last time we talked
about this target it was only minimally functional.
- Dan
On Mon, Mar 2, 2020 at 12:51 PM Julien Robin
<[email protected] <mailto:[email protected]>> wrote:
I succeeded to find a workaround for the issue I signaled
here, editing device/generic/trusty/BoardConfig.mk and putting
BUILD_QEMU_IMAGES to false, which still gives vendor.img,
system.img and userdata.img
I then found this kernel
https://android.googlesource.com/kernel/common/+/refs/heads/android-trusty-4.19,
and using arch/arm64/configs/trusty_qemu_defconfig, I
successfully built it.
Also, I'm able to start most of this Android build on Debian
10 provided qemu-system-aarch64 the following way :
|
qemu-system-aarch64
-M virt
-cpu cortex-a57
-smp 1
-m 2048
-monitor none
-parallel none
-serial mon:stdio
-kernel Image-append "root=/dev/vda rootfstype=ext4 ro
init=/init loglevel=8 selinux=1 checkreqprot=1
androidboot.selinux=permissive
androidboot.hardware=qemu_trusty console=ttyAMA0"
-device virtio-gpu-pci
-drive format=raw,file=system-custom.img
-drive format=raw,file=userdata-custom.img
|
userdata-custom.img is just a bigger userdata.img (1024MB
instead of 4) in which I used resize2fs, system-custom.img is
just a system.img in which the placeholder folder "vendor" now
embeds the content of vendor.img, copied by "cp -a". Finally,
still into system-custom.img, fstab.qemu_trusty only contains
|
LABEL=data /data ext4 noatime,nosuid,nodev,errors=panic
wait
|
So that /data (available at /dev/vdb) is mounted by its label,
while system-custom.img embeding root system and vendor is
already mounted by kernel cmdline (by /dev/vda). ramdisk.img
is not used as system.img already contains everything needed
to start init.
However, I guess I should use a slightly modified version of
qemu, available here
https://android.googlesource.com/trusty/external/qemu/+/refs/heads/master
Because using Debian 10 qemu version, I get the following
output, and no display :
|
init:init first stage started!
[...]
init:LoadingSELinuxpolicy
[...]
selinux:SELinux:Loadedpolicy
from/vendor/etc/selinux/precompiled_sepolicy
selinux:SELinux:Loadedfile_contexts
random:init:uninitialized urandom read (40bytes read)
random:init:uninitialized urandom read (40bytes read)
init:init second stage started!
[...]
ueventd:Coldboottook 1.344seconds
[...]
init:starting service 'storageproxyd'...
libprocessgroup:CgroupMap::FindControllercalled
for[1]failed,RC file was notinitialized properly
libprocessgroup:Failedto make andchown /uid_0:Read-only file
system
libprocessgroup:CgroupMap::FindControllercalled
for[829]failed,RC file was notinitialized properly
init:createProcessGroup(0,829)failed forservice
'storageproxyd':Read-only file system
init:cpuset cgroup controller isnotmounted!
init:Service'storageproxyd'(pid 829)exited withstatus 1
init:Sendingsignal 9to service 'storageproxyd'(pid 829)process
group...
libprocessgroup:CgroupMap::FindControllercalled
for[1]failed,RC file was notinitialized properly
libprocessgroup:CgroupMap::FindControllercalled
for[1]failed,RC file was notinitialized properly
init:starting service 'storageproxyd'...
libprocessgroup:CgroupMap::FindControllercalled
for[1]failed,RC file was notinitialized properly
libprocessgroup:Failedto make andchown /uid_0:Read-only file
system
init:createProcessGroup(0,830)failed forservice
'storageproxyd':Read-only file system
libprocessgroup:CgroupMap::FindControllercalled
for[830]failed,RC file was notinitialized properly
init:cpuset cgroup controller isnotmounted!
init:Service'storageproxyd'(pid 830)exited withstatus 1
init:Sendingsignal 9to service 'storageproxyd'(pid 830)process
group...
...andso on inloop
|
However I'm still not sure to proceed correctly, as I'm doing
everything alone with no documentation (I may have missed it?)
Is here some documentation available? If there isn't, is
someone able to provide an example of working qemu command
line (even old or unoptimized), or just few explanations so
that I can be placed on the right track?
Thank you very much in advance
On 3/1/20 2:14 PM, Julien Robin wrote:
Hi there,
I see that starting from branch android-10.0.0_r1, lunch
offers a choice called qemu_trusty_arm64-userdebug, in
which I'm interested
However, I got the following error, no matter which OS I'm
using for building (be it Ubuntu 18.048 or Debian 10). I
have this error on r1, r20 and r29.
|
[62%16150/26047]Createsystem-qemu.img now
FAILED:out/target/product/trusty/system-qemu.img
/bin/bash -c "(export SGDISK=out/host/linux-x86/bin/sgdisk
SIMG2IMG=out/host/linux-x86/bin/simg2img;
device/generic/goldfish/tools/mk_combined_img.py -i
out/target/product/trusty/system-qemu-config.txt -o
out/target/product/trusty/system-qemu.img)"
1+0records in
2048+0records out
1048576bytes (1.0MB,1.0MiB)copied,0.0063128s,166MB/s
Traceback(most recent call last):
File"device/generic/goldfish/tools/mk_combined_img.py",line
163,in<module>
main()
File"device/generic/goldfish/tools/mk_combined_img.py",line
135,inmain
ifcheck_sparse(partition["path"]):
File"device/generic/goldfish/tools/mk_combined_img.py",line
12,incheck_sparse
withopen(filename,'rb')asi:
IOError:[Errno2]Nosuch file
ordirectory:'out/target/product/trusty/vbmeta.img'
13:44:11ninja failed with:exitstatus 1
#### failed to build some targets (19:41 (mm:ss)) ####
|
What should I do to get qemu_trusty_arm64-userdebug
building successfully?
Thank you in advance!
Best regards,
Julien ROBIN
--
--
You received this message because you are subscribed to the
"Android Building" mailing list.
To post to this group, send email to
[email protected]
<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]
<mailto:android-building%[email protected]>
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en
---
You received this message because you are subscribed to the
Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to
[email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-building/a30c5a05-6134-43a5-8f3b-32313e32bac0%40googlegroups.com
<https://groups.google.com/d/msgid/android-building/a30c5a05-6134-43a5-8f3b-32313e32bac0%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
--
You received this message because you are subscribed to the "Android
Building" mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en
---
You received this message because you are subscribed to a topic in the
Google Groups "Android Building" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/android-building/fY-gdZQ-67M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
[email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-building/CAGSQo01HoD%2B8b1LdOrqaqmnQK5Fa1Ys9REVZ9Rt-85E4WrYRaw%40mail.gmail.com
<https://groups.google.com/d/msgid/android-building/CAGSQo01HoD%2B8b1LdOrqaqmnQK5Fa1Ys9REVZ9Rt-85E4WrYRaw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
--
--
You received this message because you are subscribed to the "Android Building"
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-building/3ab7300c-7917-911c-4940-4c08e45c0667%40gmail.com.