Re: [android-building] Android.bp file copy issue

2019-10-09 Thread 'Dan Willemsen' via Android Building
The same definition would be a problem in Android.mk too -- in fact, this
warning is coming from the makefile system (since the makefile system still
handles installation for both Make and Soong).

It looks like inside Google, we're not defining `prebuilt_etc` or
`BUILD_PREBUILT` definitions for this file, instead we're installing it via
PRODUCT_COPY_FILES in your product configuration. That way every product
can choose how to install that file.

Or you could "hide" one of the modules from Make using soong namespaces,
only turning on the one that you want for a particular device. Then make
will only create a single installation rule. (I haven't tried it, but it
should work -- this is how we handle more complicated modules that need to
be different per device)

- Dan

On Wed, Oct 9, 2019 at 3:58 PM 'Kyle Cai' via Android Building <
android-building@googlegroups.com> wrote:

> Thanks Dan for the reply. Yes I do see the warning msgs you pointed out.
>
> Now the question is how should I fix this given that the destination file
> has to be google.xml? I believe previously with .mk files this was not an
> issue?
>
> Thanks in advance.
>
> Kyle
>
> On Wednesday, October 9, 2019 at 1:24:32 PM UTC-7, Dan Willemsen wrote:
>>
>> Modules must have unique output names, as the installation rules are
>> always defined. You should be seeing warnings during the build startup
>> about duplicate rules for target:
>>
>> build/make/core/base_rules.mk:481: warning: overriding commands for
>> target `out/target/product//product/etc/sysconfig/google.xml'
>> build/make/core/base_rules.mk:481: warning: ignoring old commands for
>> target `out/target/product//product/etc/sysconfig/google.xml'
>>
>> That's saying that there are two ways to build a specific installation
>> file, and we may pick one or the other (fairly arbitrarily, and sometimes
>> using a mix of the two rules).
>>
>> - Dan
>>
>> On Wed, Oct 9, 2019 at 1:09 PM 'Kyle Cai' via Android Building <
>> android-...@googlegroups.com> wrote:
>>
>>> Hi,
>>>
>>> I'm not sure if this is the right place to ask about android.bp files.
>>> Here is an issue that I'm seeing and I can't figure out why I'm seeing
>>> this. My .bp file has the following two sections, one for regular android
>>> build and one for android go:
>>>
>>> prebuilt_etc {
>>> name: "*sysconfig_google*",
>>> product_specific: true,
>>> sub_dir: "sysconfig",
>>> *src: "google.xml",*
>>> *filename_from_src: true,*
>>> }
>>>
>>> prebuilt_etc {
>>> name: "*sysconfig_google_go*",
>>> product_specific: true,
>>> sub_dir: "sysconfig",
>>> *src: "google_go.xml",*
>>> *filename: "google.xml",*
>>> }
>>>
>>> The intention is that if I'm making a regular build, a gms.mk file is
>>> used and it calls sysconfig_google. If I'm making a Go build, the
>>> gms_go.mk file is used, and that calls  sysconfig_google_go. In the
>>> source directory there is "google.xml" and "google_go.xml" and depending on
>>> which is called, it should go to the destination directory as "google.xml".
>>> However, currently when I build a regular build (non-Go), I see in the
>>> destination directory that the google.xml file has the content of the
>>> google_go.xml file. Any idea why it's doing that?
>>>
>>> Thanks,
>>>
>>> Kyle
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the "Android
>>> Building" mailing list.
>>> To post to this group, send email to android-...@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-...@googlegroups.com
>>> 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 android-...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/android-building/a37db4cd-f4b0-43bf-a507-964f552873f1%40googlegroups.com
>>> 
>>> .
>>>
>> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> 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 android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/4499c9d7-c210-4f99-8dd6-dc7c4acb3888%40googlegroups.com
> 

Re: [android-building] Android.bp file copy issue

2019-10-09 Thread 'Kyle Cai' via Android Building
Thanks Dan for the reply. Yes I do see the warning msgs you pointed out. 

Now the question is how should I fix this given that the destination file 
has to be google.xml? I believe previously with .mk files this was not an 
issue?

Thanks in advance.

Kyle 

On Wednesday, October 9, 2019 at 1:24:32 PM UTC-7, Dan Willemsen wrote:
>
> Modules must have unique output names, as the installation rules are 
> always defined. You should be seeing warnings during the build startup 
> about duplicate rules for target:
>
> build/make/core/base_rules.mk:481: warning: overriding commands for 
> target `out/target/product//product/etc/sysconfig/google.xml'
> build/make/core/base_rules.mk:481: warning: ignoring old commands for 
> target `out/target/product//product/etc/sysconfig/google.xml'
>
> That's saying that there are two ways to build a specific installation 
> file, and we may pick one or the other (fairly arbitrarily, and sometimes 
> using a mix of the two rules).
>
> - Dan
>
> On Wed, Oct 9, 2019 at 1:09 PM 'Kyle Cai' via Android Building <
> android-...@googlegroups.com > wrote:
>
>> Hi, 
>>
>> I'm not sure if this is the right place to ask about android.bp files. 
>> Here is an issue that I'm seeing and I can't figure out why I'm seeing 
>> this. My .bp file has the following two sections, one for regular android 
>> build and one for android go:
>>
>> prebuilt_etc {
>> name: "*sysconfig_google*",
>> product_specific: true,
>> sub_dir: "sysconfig",
>> *src: "google.xml",*
>> *filename_from_src: true,*
>> }
>>
>> prebuilt_etc {
>> name: "*sysconfig_google_go*",
>> product_specific: true,
>> sub_dir: "sysconfig",
>> *src: "google_go.xml",*
>> *filename: "google.xml",*
>> }
>>
>> The intention is that if I'm making a regular build, a gms.mk file is 
>> used and it calls sysconfig_google. If I'm making a Go build, the 
>> gms_go.mk file is used, and that calls  sysconfig_google_go. In the 
>> source directory there is "google.xml" and "google_go.xml" and depending on 
>> which is called, it should go to the destination directory as "google.xml". 
>> However, currently when I build a regular build (non-Go), I see in the 
>> destination directory that the google.xml file has the content of the 
>> google_go.xml file. Any idea why it's doing that? 
>>
>> Thanks,
>>
>> Kyle 
>>
>> -- 
>> -- 
>> You received this message because you are subscribed to the "Android 
>> Building" mailing list.
>> To post to this group, send email to android-...@googlegroups.com 
>> 
>> To unsubscribe from this group, send email to
>> android-...@googlegroups.com 
>> 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 android-...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/android-building/a37db4cd-f4b0-43bf-a507-964f552873f1%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
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 android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/4499c9d7-c210-4f99-8dd6-dc7c4acb3888%40googlegroups.com.


Re: [android-building] Android.bp file copy issue

2019-10-09 Thread 'Dan Willemsen' via Android Building
Modules must have unique output names, as the installation rules are always
defined. You should be seeing warnings during the build startup about
duplicate rules for target:

build/make/core/base_rules.mk:481: warning: overriding commands for target
`out/target/product//product/etc/sysconfig/google.xml'
build/make/core/base_rules.mk:481: warning: ignoring old commands for
target `out/target/product//product/etc/sysconfig/google.xml'

That's saying that there are two ways to build a specific installation
file, and we may pick one or the other (fairly arbitrarily, and sometimes
using a mix of the two rules).

- Dan

On Wed, Oct 9, 2019 at 1:09 PM 'Kyle Cai' via Android Building <
android-building@googlegroups.com> wrote:

> Hi,
>
> I'm not sure if this is the right place to ask about android.bp files.
> Here is an issue that I'm seeing and I can't figure out why I'm seeing
> this. My .bp file has the following two sections, one for regular android
> build and one for android go:
>
> prebuilt_etc {
> name: "*sysconfig_google*",
> product_specific: true,
> sub_dir: "sysconfig",
> *src: "google.xml",*
> *filename_from_src: true,*
> }
>
> prebuilt_etc {
> name: "*sysconfig_google_go*",
> product_specific: true,
> sub_dir: "sysconfig",
> *src: "google_go.xml",*
> *filename: "google.xml",*
> }
>
> The intention is that if I'm making a regular build, a gms.mk file is
> used and it calls sysconfig_google. If I'm making a Go build, the
> gms_go.mk file is used, and that calls  sysconfig_google_go. In the
> source directory there is "google.xml" and "google_go.xml" and depending on
> which is called, it should go to the destination directory as "google.xml".
> However, currently when I build a regular build (non-Go), I see in the
> destination directory that the google.xml file has the content of the
> google_go.xml file. Any idea why it's doing that?
>
> Thanks,
>
> Kyle
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> 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 android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/a37db4cd-f4b0-43bf-a507-964f552873f1%40googlegroups.com
> 
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
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 android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CALQgHdk_kXp3TJZ_NnJELDUK0jwHm_1w4KQ2zQmAvdAc%2BpRyfg%40mail.gmail.com.


Re: [android-building] Android.bp to support architectural files

2019-10-09 Thread 'Colin Cross' via Android Building
Use a single module, and put the differences into multilib lib32/lib64
clauses:

multilib: {
lib32: {
srcs: ["foo32.c"],
},
lib64: {
srcs: ["foo32.c"],
},
},

On Wed, Oct 9, 2019 at 1:09 PM REGURI AKANKSHA 
wrote:

> Suppose say a module  has name - x and compile_multilib =32 and other
> module has name - x and compile_multilib = 64. When executed this would
> result in module duplication? How can this duplication be solved?
> Thanks in advance
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> 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 android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/63c8a7f0-b53a-473c-82d6-f623df2fa8cf%40googlegroups.com
> 
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
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 android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CAMbhsRS76XHJ0M9XjV12_n%2Bt2yMR4kgc5q6AGfQZ7vQgtS80pw%40mail.gmail.com.


[android-building] Re: Building for Crosshatch/Blueline Android 10

2019-10-09 Thread Troy Mazerolle
Mine freezes after rebooting to fastbootd. it hangs on waiting for device.

Doing on pixelbook with linux apps. everything up to date.

On Monday, September 16, 2019 at 4:00:07 PM UTC-4, Chyifeng Ding wrote:
>
> I am not sure what was wrong with your case. If you have successfully 
> upgraded bootloader, you should see bootloader version
>
> b1c1-0.2-5672671
>
>
> /home/wrk/q-10.0.0_r1$ fastboot flashall
> 
> Bootloader Version...: b1c1-0.2-5672671
> Baseband Version.: g845-00023-180815-B-4956438
> Serial Number: 89RY0ABZE
> 
> Checking 'product' OKAY [  0.059s]
> Setting current slot to 'a'OKAY [  0.074s]
> Sending 'boot_a' (65536 KB)OKAY [  2.730s]
> Writing 'boot_a'   OKAY [  0.317s]
> Sending 'dtbo_a' (8192 KB) OKAY [  0.430s]
> Writing 'dtbo_a'   OKAY [  0.095s]
> Sending 'vbmeta_a' (4 KB)  OKAY [  0.120s]
> Writing 'vbmeta_a' OKAY [  0.063s]
> Rebooting into fastbootOKAY [  0.060s]
> < waiting for any device >
> Sending 'system_a' (4 KB)  OKAY [  0.001s]
> Updating super partition   OKAY [  0.019s]
> Resizing 'product_a'   OKAY [  0.005s]
> Resizing 'system_a'OKAY [  0.005s]
> Resizing 'vendor_a'OKAY [  0.005s]
> Resizing 'product_a'   OKAY [  0.006s]
> Sending 'product_a' (317212 KB)OKAY [ 12.736s]
> Writing 'product_a'OKAY [  1.828s]
> Resizing 'system_a'OKAY [  0.006s]
> Sending sparse 'system_a' 1/2 (524284 KB)  OKAY [ 21.396s]
> Writing 'system_a' OKAY [  2.637s]
> Sending sparse 'system_a' 2/2 (287436 KB)  OKAY [ 11.680s]
> Writing 'system_a' OKAY [  1.600s]
> Sending 'system_b' (45756 KB)  OKAY [  1.863s]
> Writing 'system_b' OKAY [  0.235s]
> Resizing 'vendor_a'OKAY [  0.006s]
> Sending 'vendor_a' (453888 KB) OKAY [ 18.193s]
> Writing 'vendor_a' OKAY [  2.280s]
> Rebooting  OKAY [  0.000s]
> Finished. Total time: 95.849s
>
> You can see the device rebooted once during flashing. In addition, you 
> don't need to do " mkdir dist; make -j80 dist DIST_DIR=dist" since it 
> fastboot should be able to locate out/target/product/crosshatch/ for new 
> build image files.
>
> On Monday, September 16, 2019 at 7:38:34 AM UTC-7, subhani shaik wrote:
>>
>> Hi Chyifeng,
>>
>> I am facing the same problem like above. I even tried to flash both 
>> partition using your steps and then flash the new build, hit the same 
>> issue. Please check if my sequence of steps are incorrect.
>>
>> repo init -u https://android.googlesource.com/platform/manifest -b 
>> android-10.0.0_r2
>>
>> repo sync -j80 -c --no-clone-bundle --no-tags
>>
>> curl --output - 
>> https://dl.google.com/dl/android/aosp/google_devices-crosshatch-qp1a.190711.020-861edfad.tgz
>>  | 
>> tar -xzvf -
>>
>> tail -n +315 extract-google_devices-crosshatch.sh | tar -zxvf -
>>
>>
>> curl --output - 
>> https://dl.google.com/dl/android/aosp/qcom-crosshatch-qp1a.190711.020-f44a22d8.tgz
>>  
>> | tar -xzvf -
>>
>> tail -n +315 extract-qcom-crosshatch.sh | tar -xzvf -
>>
>>
>> source build/envsetup.sh
>>
>> lunch 14 //crosshatch
>>
>> make -j80; mkdir dist; make -j80 dist DIST_DIR=dist
>>
>> copy and unzip aosp_crosshatch-img-eng.subani.zip
>>
>> fastboot -w flashall
>>
>>
>> Thank you for your help.
>>
>> On Saturday, September 14, 2019 at 9:35:07 AM UTC-7, Chyifeng Ding wrote:
>>>
>>> Yes, crosshatch for Pixel3XL works fine. Your Pixel3XL may have older 
>>> version of bootloader. You need to upgrade bootloader first before flashing 
>>> AOSP phone image.
>>> Download the production phone image  
>>> https://dl.google.com/dl/android/aosp/crosshatch-qp1a.190711.019-factory-130c70be.zip
>>>
>>> unzip crosshatch-qp1a.190711.019-factory-130c70be.zip
>>> cd crosshatch-qp1a.190711.019
>>> fastboot flash bootloader bootloader-crosshatch-b1c1-0.2-5672671.img
>>> fastboot reboot-bootloader
>>>
>>> You should be able to do "fastboot flashall -w" after that.
>>>
>>> On Friday, September 13, 2019 at 9:44:42 AM UTC-7, Surge Raval wrote:

 I've been trying to build android for the pixel 3 devices. Both sargo 
 and bonito build successfully and boot. However, crosshatch and blueline 
 do 
 not. 

 This is what I've tried and has worked on sargo/bonito. 

 Pure aosp 10 r2 branch sync, lunch 

[android-building] Android.bp to support architectural files

2019-10-09 Thread REGURI AKANKSHA
Suppose say a module  has name - x and compile_multilib =32 and other 
module has name - x and compile_multilib = 64. When executed this would 
result in module duplication? How can this duplication be solved?
Thanks in advance 

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
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 android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/63c8a7f0-b53a-473c-82d6-f623df2fa8cf%40googlegroups.com.


[android-building] Android.bp file copy issue

2019-10-09 Thread 'Kyle Cai' via Android Building
Hi, 

I'm not sure if this is the right place to ask about android.bp files. Here 
is an issue that I'm seeing and I can't figure out why I'm seeing this. My 
.bp file has the following two sections, one for regular android build and 
one for android go:

prebuilt_etc {
name: "*sysconfig_google*",
product_specific: true,
sub_dir: "sysconfig",
*src: "google.xml",*
*filename_from_src: true,*
}

prebuilt_etc {
name: "*sysconfig_google_go*",
product_specific: true,
sub_dir: "sysconfig",
*src: "google_go.xml",*
*filename: "google.xml",*
}

The intention is that if I'm making a regular build, a gms.mk file is used 
and it calls sysconfig_google. If I'm making a Go build, the gms_go.mk file 
is used, and that calls  sysconfig_google_go. In the source directory there 
is "google.xml" and "google_go.xml" and depending on which is called, it 
should go to the destination directory as "google.xml". However, currently 
when I build a regular build (non-Go), I see in the destination directory 
that the google.xml file has the content of the google_go.xml file. Any 
idea why it's doing that? 

Thanks,

Kyle 

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
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 android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/a37db4cd-f4b0-43bf-a507-964f552873f1%40googlegroups.com.