maruos / vendor_maruos

Common files for Maru OS.
Apache License 2.0
5 stars 15 forks source link

Support vendors overriding desktop rootfs img (cherry-pick to maru-0.6) #14

Open pdsouza opened 3 years ago

pdsouza commented 3 years ago

Signed-off-by: Preetam D'Souza preetamjdsouza@gmail.com (cherry picked from commit a27420a8acb6bc36cb12743c158c94ed3a991ae7)

pdsouza commented 3 years ago

@makinbacon21 Can you check if this builds properly on maru-0.6? My workspace is on maru-0.7 and its a pain to swap branches and rebuild.

makinbacon21 commented 3 years ago

@pdsouza I don't currently have sources downloaded or an environment for them, and my server won't be back up till Sunday--if you can wait till Sunday afternoon/evening (EST), I can test that out for you.

pdsouza commented 3 years ago

@makinbacon21 Sounds good, thanks.

makinbacon21 commented 3 years ago

@pdsouza Finally got my tree running again on my server--the first build failed:


FAILED:
vendor/maruos/prebuilts/Android.mk:37: warning: target `out/target/product/icosa_sr/obj/ETC/rootfs.tar.gz_intermediates/rootfs.tar.gz' doesn't match the target pattern
vendor/maruos/prebuilts/Android.mk:37: error: target pattern contains no '%'.
18:49:09 ckati failed with: exit status 1

#### failed to build some targets (01:10 (mm:ss)) ####```
pdsouza commented 3 years ago

@makinbacon21 Thanks for the update!

Yikes. Looks like there is some weird Make error with the way the target was specified. It's strange because this worked fine for me on maru-0.7. Usually you get this if there is an extra ':' or something in the path name.

Can you show me where you set TARGET_DESKTOP_ROOTFS and what you set it to?

makinbacon21 commented 3 years ago

realized my stupid mistake--updated makefile:

PHOTON_PATH := vendor/photon

# maru rootfs
TARGET_DESKTOP_ROOTFS := $(PHOTON_PATH)/prebuilts/$(PRODUCT_DEVICE)/desktop-rootfs.tar.gz

New error:

[100% 12815/12815] writing build rules ...
FAILED:
build/make/core/Makefile:28: error: overriding commands for target `out/target/product/icosa_sr/system/maru/containers/default/rootfs.tar.gz', previously defined at build/make/core/base_rules.mk:510
01:58:07 ckati failed with: exit status 1

#### failed to build some targets (01:12 (mm:ss)) ####
pdsouza commented 3 years ago

Thanks @makinbacon21 for the new logs. Do you set TARGET_DESKTOP_ROOTFS before or after you include the maru stuff? I would include it after all the maru includes if you're not already doing that.

If you are already including it after, then I'll take a deeper look on my end this weekend.

makinbacon21 commented 3 years ago

@pdsouza I moved it to after--this might be a stupid mistake on my part but here is the new error:


[ 96% 486/502] including vendor/maruos/Android.mk ...
FAILED:
vendor/maruos/prebuilts/Android.mk:37: warning: target `out/target/product/icosa_sr/obj/ETC/rootfs.tar.gz_intermediates/rootfs.tar.gz' doesn't match the target pattern
vendor/maruos/prebuilts/Android.mk:37: warning: target `out/target/product/icosa_sr/obj/ETC/rootfs.tar.gz_intermediates/rootfs.tar.gz' doesn't match the target pattern
vendor/maruos/prebuilts/Android.mk:37: error: multiple target patterns.
12:12:10 ckati failed with: exit status 1
make: *** [build/make/core/main.mk:21: run_soong_ui] Error 1
'''