+Matthew Maurer <[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]> 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: Loading SELinux policy > [...] > selinux: SELinux: Loaded policy from /vendor/etc/selinux/ > precompiled_sepolicy > > selinux: SELinux: Loaded file_contexts > > random: init: uninitialized urandom read (40 bytes read) > random: init: uninitialized urandom read (40 bytes read) > init: init second stage started! > [...] > ueventd: Coldboot took 1.344 seconds > [...] > init: starting service 'storageproxyd'... > libprocessgroup: CgroupMap::FindController called for [1] failed, RC file > was not initialized properly > libprocessgroup: Failed to make and chown /uid_0: Read-only file system > libprocessgroup: CgroupMap::FindController called for [829] failed, RC > file was not initialized properly > init: createProcessGroup(0, 829) failed for service 'storageproxyd': Read-only > file system > init: cpuset cgroup controller is not mounted! > init: Service 'storageproxyd' (pid 829) exited with status 1 > init: Sending signal 9 to service 'storageproxyd' (pid 829) process group > ... > libprocessgroup: CgroupMap::FindController called for [1] failed, RC file > was not initialized properly > libprocessgroup: CgroupMap::FindController called for [1] failed, RC file > was not initialized properly > > > init: starting service 'storageproxyd'... > libprocessgroup: CgroupMap::FindController called for [1] failed, RC file > was not initialized properly > libprocessgroup: Failed to make and chown /uid_0: Read-only file system > init: createProcessGroup(0, 830) failed for service 'storageproxyd': Read-only > file system > libprocessgroup: CgroupMap::FindController called for [830] failed, RC > file was not initialized properly > init: cpuset cgroup controller is not mounted! > init: Service 'storageproxyd' (pid 830) exited with status 1 > init: Sending signal 9 to service 'storageproxyd' (pid 830) process group > ... > > ...and so on in loop > > 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] Create system-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+0 records in >> 2048+0 records out >> 1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0063128 s, 166 MB/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, in >> main >> if check_sparse(partition["path"]): >> File "device/generic/goldfish/tools/mk_combined_img.py", line 12, in >> check_sparse >> with open(filename, 'rb') as i: >> IOError: [Errno 2] No such file or directory: >> 'out/target/product/trusty/vbmeta.img' >> 13:44:11 ninja failed with: exit status 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] > 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/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 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/CALQgHdn-jA81w1L9ood2fFFLdAJunVQZrZh8j9hz6XsvFiK%3DqQ%40mail.gmail.com.
