Re: [android-building] How to upload a driver that I created to my device?

2019-07-18 Thread 'Chris Fries' via Android Building
Unfortunately, until you have a Q based kernel, you'll be hitting a bug 
that we left module signature verification enabled.

You'll want a patch like this, rebuild the kernel and then you could load a 
module.

commit e8291e13f6a669e9f751975ce169be291fc01e64
Author: Steve Muckle <>
Date:   Thu Dec 20 16:19:13 2018 -0800

defconfig: b1c1: disable module signing

CONFIG_CRYPTO_SHA512 was being enabled by CONFIG_MODULE_SIG_SHA512, and
is needed by CONFIG_CRYPTO_NIAP_FPT_TST_EXT_11 (currently set), so it
is enabled.

Bug: 121347485
Change-Id: I5d5c93ded53ba4d9ab12f8684364db0f581e4d17
Signed-off-by: Steve Muckle <>

diff --git a/arch/arm64/configs/b1c1_defconfig 
b/arch/arm64/configs/b1c1_defconfig
index 77e7dead49bd..26d976ae3c16 100644
--- a/arch/arm64/configs/b1c1_defconfig
+++ b/arch/arm64/configs/b1c1_defconfig
@@ -55,9 +55,6 @@ CONFIG_MODULES=y
 CONFIG_MODULE_UNLOAD=y
 CONFIG_MODULE_FORCE_UNLOAD=y
 CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SIG=y
-CONFIG_MODULE_SIG_FORCE=y
-CONFIG_MODULE_SIG_SHA512=y
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_PARTITION_ADVANCED=y
 CONFIG_ARCH_QCOM=y
@@ -641,6 +638,7 @@ CONFIG_CRYPTO_NIAP_FPT_TST_EXT_11=y
 CONFIG_CRYPTO_GCM=y
 CONFIG_CRYPTO_XCBC=y
 CONFIG_CRYPTO_MD4=y
+CONFIG_CRYPTO_SHA512=y
 CONFIG_CRYPTO_TWOFISH=y
 CONFIG_CRYPTO_LZ4=y
 CONFIG_CRYPTO_ANSI_CPRNG=y


On Thursday, July 18, 2019 at 11:31:18 AM UTC-5, Dan Willemsen wrote:
>
> As far as I know, when loading a module using the "insmod" command from 
>> the *ENG*(or userdebug) binary, it is not necessary to verify the 
>> signature of the module.
>
>
> The kernel configuration / image doesn't change between eng/userdebug and 
> user, so this would surprise me. I suspect you'd have to rebuild the 
> kernel, but I don't know for sure. The android-kernel google group may be 
> able to help you more -- we generally only deal with prebuilt kernels when 
> building the rest of the platform.
>
> - Dan
>
> On Thu, Jul 18, 2019 at 7:37 AM Lucas. B > 
> wrote:
>
>> *@Dear All,*
>>
>>
>>
>> I've been wondering about some of the android functions for some time 
>> now, so I made a device driver.
>>
>> And I downloaded the *AOSP *source code and built it into *ENG*(or 
>> userdebug), then flash it into my *Pixel 3 XL*.
>>
>> But as I tried to load the module with the "insmod" command, I could find 
>> the following:
>>
>>  
>>
>>> *insmod: failed to load /sdcard/.../my_driver.ko: Required key not 
>>> available*
>>>
>>
>>
>> As far as I know, when loading a module using the "insmod" command from 
>> the *ENG*(or userdebug) binary, it is not necessary to verify the 
>> signature of the module.
>>
>> Anyway, I have the above signature problem, and I wonder how to solve it.
>>
>> How build own drive into the kernel, whether modify the .config in the *AOSP 
>> *source to build a new binary, or whatever can try to build a device 
>> driver, etc. I welcome everyone.
>>
>> I want to make sure my driver is working normally on the my *Pixel 3 XL*.
>>
>>
>>
>> *with best regard,*
>>
>> *Thanks =)*
>> *Lucas. B.*
>>
>> -- 
>> -- 
>> 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/efbcb066-7ef7-4cb7-a5b6-55e39bfedfe2%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
-- 
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/7067004f-43ae-4157-b3fb-b36d85c38eea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-building] Re: Unable to build bluecross kernel

2019-03-11 Thread 'Chris Fries' via Android Building
The b1c1_defconfig should be the one you want for Pixel 3.  Does that 
resolve the issue?

-Chris


On Monday, March 11, 2019 at 1:24:34 PM UTC-5, Saurabh Sakhare wrote:
>
> Use Makefile in KSRC to get to know more about kernel requirements and 
> compatibility. And check build.config file that'll give you specific 
> requirements for kernel compilation.
> I'm compiling wahoo kernel so in my build.config i found 
> "ARCH=arm64
> BRANCH=android-msm-wahoo-4.4
> CC=clang
> CLANG_TRIPLE=aarch64-linux-gnu-
> CROSS_COMPILE=aarch64-linux-android-
> CROSS_COMPILE_ARM32=arm-linux-androideabi-
> DEFCONFIG=wahoo_defconfig
> EXTRA_CMDS=''
> KERNEL_DIR=private/msm-google
> POST_DEFCONFIG_CMDS='check_defconfig'
> CLANG_PREBUILT_BIN=prebuilts-master/clang/host/linux-x86/clang-4053586/bin/
>
> LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin
>
> LINUX_GCC_CROSS_COMPILE_ARM32_PREBUILTS_BIN=prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin
> LZ4_PREBUILTS_BIN=prebuilts-master/misc/linux-x86/lz4
> DTC_PREBUILTS_BIN=prebuilts-master/misc/linux-x86/dtc
> LIBUFDT_PREBUILTS_BIN=prebuilts-master/misc/linux-x86/libufdt"
>
> This info so I got all requirements to build the kerne. And do add path 
> properly check path using tab.
>
> Saurabh Sakhare
>
>
>
> On Mon, Mar 11, 2019 at 10:46 PM Emanuele Vannacci  > wrote:
>
>> i have the same problem. Do you solve this error?
>>
>> Il giorno giovedì 15 novembre 2018 20:44:31 UTC+1, Lance Vick ha scritto:
>>>
>>> I am unable to build a kernel for crosshatch. 
>>>
>>> Looks like a missing file or broken path?
>>>
>>> Also I am only assuming "android-msm-bluecross-4.9-pie-dr1-release" for 
>>> the branch and "sdm845-perf" for the defconfig from looking at git history 
>>> as there is no documentation for crosshatch or blueline in 
>>> https://source.android.com/setup/build/building-kernels
>>>
>>> Build commands:
>>>
>>> git clone https://android.googlesource.com/kernel/msm kernel/msm
>>> cd "kernel/msm"
>>> git checkout android-msm-bluecross-4.9-pie-dr1-release
>>>
>>> export ARCH=arm64
>>> export 
>>> CROSS_COMPILE="$PWD/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-${gcc_version}/bin/aarch64-linux-android-"
>>>
>>> make "sdm845-perf_defconfig"
>>> make -j8
>>>
>>>
>>> Failure output:
>>>
>>> In file included from drivers/clk/qcom/mdss/mdss_pll_trace.h:116:0,  
>>> 
>>>  from drivers/clk/qcom/mdss/mdss-dsi-pll-10nm.c:24:  
>>> 
>>> ./include/trace/define_trace.h:88:43: fatal error: ./mdss_pll_trace.h: 
>>> No such file or directory 
>>>  #include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
>>>
>>> compilation terminated.
>>>
>>> scripts/Makefile.build:336: recipe for target 
>>> 'drivers/clk/qcom/mdss/mdss-dsi-pll-10nm.o' failed
>>> make[4]: *** [drivers/clk/qcom/mdss/mdss-dsi-pll-10nm.o] Error 1
>>> make[4]: *** Waiting for unfinished jobs
>>> scripts/Makefile.build:650: recipe for target 'drivers/clk/qcom/mdss' 
>>> failed
>>> make[3]: *** [drivers/clk/qcom/mdss] Error 2  
>>> scripts/Makefile.build:650: recipe for target 'drivers/clk/qcom' failed 
>>> make[2]: *** [drivers/clk/qcom] Error 2   
>>> scripts/Makefile.build:650: recipe for target 'drivers/clk' failed 
>>> make[1]: *** [drivers/clk] Error 2
>>> make[1]: *** Waiting for unfinished jobs
>>>   
>>> create image file: arch/arm64/boot/dtbo.img... 
>>> Can not read file: 
>>> arch/arm64/boot/dts/google/sdm845-v2-b1c1-devboard.dtbo
>>> arch/arm64/boot/Makefile:71: recipe for target 
>>> 'arch/arm64/boot/dtbo.img' failed
>>> make[1]: *** [arch/arm64/boot/dtbo.img] Error 255  
>>> arch/arm64/Makefile:214: recipe for target 'dtbo.img' failed
>>> make: *** [dtbo.img] Error 2
>>> make: *** Waiting for unfinished jobs  
>>>   
>>> Makefile:1117: recipe for target 'drivers' failed
>>> 
>>> make: *** [drivers] Error 2  
>>>
>>>
>>> -- 
>> -- 
>> 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-buildi...@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-buildi...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.

[android-building] Re: Build error for pixel 3 XL kernel

2019-01-25 Thread 'Chris Fries' via Android Building
Probably this (internal) bug is relevant.  Can you hide /bin/as for now?

http://b/123422077 Clang uses bad search path when searching for "as". Breaks 
kernel build when /bin/as is present

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.


[android-building] Re: Build error for pixel 3 XL kernel

2019-01-22 Thread 'Chris Fries' via Android Building
I just built partner, it worked for me.

Anything unusual in your path?  I'm not sure "*/..//bin/as*" looks 
correct.  Do you have something in "/bin/as"?  It should be using the 
prebuilt one synced as part of the repo.  Otherwise, try a new shell 
without any "extra" environment variables set...

-Chris


$ repo init -u https://android.googlesource.com/kernel/manifest -b 
android-msm-bluecross-4.9-pie-qpr1

$ repo sync -j8

$ sh build/build.sh




= build config: /usr/local/google/home/cfries/work2/partner/build.config

KERNEL_DIR=private/msm-google

UNSTRIPPED_MODULES="

wlan.ko

"

. ${ROOT_DIR}/${KERNEL_DIR}/build.config.common.clang

POST_DEFCONFIG_CMDS="check_defconfig"


PATH=/usr/local/google/home/cfries/work2/partner/prebuilts-master/misc/linux-x86/libufdt:/usr/local/google/home/cfries/work2/partner/prebuilts-master/misc/linux-x86/dtc:/usr/local/google/home/cfries/work2/partner/prebuilts-master/misc/linux-x86/lz4:/usr/local/google/home/cfries/work2/partner/prebuilts-master/clang/host/linux-x86/clang-4393122/bin/:/usr/local/google/home/cfries/work2/partner/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/usr/local/google/home/cfries/work2/partner/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/usr/local/google/home/cfries/bin:/usr/lib/google-golang/bin:/usr/local/buildtools/java/jdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin




 Setting up for build

+ cd private/msm-google

+ make 
O=/usr/local/work2/partner/out/android-msm-bluecross-4.9/private/msm-google 
mrproper

make[1]: Entering directory 
'/usr/local/work2/partner/out/android-msm-bluecross-4.9/private/msm-google'

find: ‘arch/arm64/boot/dts/’: No such file or directory

find: ‘arch/arm64/boot/dts/’: No such file or directory

make[1]: Leaving directory 
'/usr/local/work2/partner/out/android-msm-bluecross-4.9/private/msm-google'

+ set +x

+ cd private/msm-google

+ make 
O=/usr/local/work2/partner/out/android-msm-bluecross-4.9/private/msm-google 
b1c1_defconfig

make[1]: Entering directory 
'/usr/local/work2/partner/out/android-msm-bluecross-4.9/private/msm-google'

  HOSTCC  scripts/basic/fixdep

  GEN ./Makefile

  HOSTCC  scripts/kconfig/conf.o

  SHIPPED scripts/kconfig/zconf.tab.c

  SHIPPED scripts/kconfig/zconf.lex.c

  SHIPPED scripts/kconfig/zconf.hash.c

  HOSTCC  scripts/kconfig/zconf.tab.o

  HOSTLD  scripts/kconfig/conf

#

# configuration written to .config

#

make[1]: Leaving directory 
'/usr/local/work2/partner/out/android-msm-bluecross-4.9/private/msm-google'

+ set +x



 Running pre-make command(s):

+ eval check_defconfig

++ check_defconfig

++ cd 
/usr/local/work2/partner/out/android-msm-bluecross-4.9/private/msm-google

++ make 
O=/usr/local/work2/partner/out/android-msm-bluecross-4.9/private/msm-google 
savedefconfig

  GEN ./Makefile

scripts/kconfig/conf  --savedefconfig=defconfig Kconfig

++ '[' arm64 = x86_64 -o arm64 = i386 ']'

++ echo Verifying that savedefconfig matches 
private/msm-google/arch/arm64/configs/b1c1_defconfig

Verifying that savedefconfig matches 
private/msm-google/arch/arm64/configs/b1c1_defconfig

++ RES=0

++ diff 
/usr/local/work2/partner/out/android-msm-bluecross-4.9/private/msm-google/defconfig
 
private/msm-google/arch/arm64/configs/b1c1_defconfig

++ '[' 0 -ne 0 ']'

++ return 0

+ set +x



 Building kernel

+ cd 
/usr/local/work2/partner/out/android-msm-bluecross-4.9/private/msm-google

++ nproc

+ make 
O=/usr/local/work2/partner/out/android-msm-bluecross-4.9/private/msm-google 
CC=clang -j56
...

On Friday, January 18, 2019 at 2:17:29 PM UTC-6, Chris Fries wrote:
>
> Which repo did you sync, when you built?  
>
> This reminds me of https://partner-android-review.googlesource.com/1089911
>
> On Thursday, January 17, 2019 at 6:36:19 PM UTC-6, shjeep...@gmail.com 
> wrote:
>>
>> Hi,
>> I'm try to build pixel3 xl kernel w/ this command
>> $sh build/build.sh
>> But facing below error, any idea on how to fix it?
>>
>>   VDSOSYM include/generated/vdso-offsets.h
>>   VDSOC32   arch/arm64/kernel/vdso32/vgettimeofday.o
>>   LDS arch/arm64/kernel/vdso32/vdso.lds
>>   VDSOA32   arch/arm64/kernel/vdso32/sigreturn.o
>>   HOSTCC  arch/arm64/kernel/vdso32/../../../arm/vdso/vdsomunge
>>
>> */..//bin/as: unrecognized option '-mfloat-abi=soft'clang-5.0: error: 
>> assembler command failed with exit code 1 (use -v to see invocation)*
>> make[3]: *** 
>> [/home/jiangenj/workspace/pixel3/kernel/private/msm-google/arch/arm64/kernel/vdso32/Makefile:144:
>>  
>> arch/arm64/kernel/vdso32/sigreturn.o] Error 1
>> make[3]: *** Waiting for unfinished jobs
>> /..//bin/as: unrecognized option '-mfloat-abi=soft'
>> clang-5.0: error: assembler command failed with exit code 1 (use -v to 
>> see invocation)
>> make[3]: *** 
>> 

[android-building] Re: Build error for pixel 3 XL kernel

2019-01-18 Thread 'Chris Fries' via Android Building
Which repo did you sync, when you built?  

This reminds me of https://partner-android-review.googlesource.com/1089911

On Thursday, January 17, 2019 at 6:36:19 PM UTC-6, shjeep...@gmail.com 
wrote:
>
> Hi,
> I'm try to build pixel3 xl kernel w/ this command
> $sh build/build.sh
> But facing below error, any idea on how to fix it?
>
>   VDSOSYM include/generated/vdso-offsets.h
>   VDSOC32   arch/arm64/kernel/vdso32/vgettimeofday.o
>   LDS arch/arm64/kernel/vdso32/vdso.lds
>   VDSOA32   arch/arm64/kernel/vdso32/sigreturn.o
>   HOSTCC  arch/arm64/kernel/vdso32/../../../arm/vdso/vdsomunge
>
> */..//bin/as: unrecognized option '-mfloat-abi=soft'clang-5.0: error: 
> assembler command failed with exit code 1 (use -v to see invocation)*
> make[3]: *** 
> [/home/jiangenj/workspace/pixel3/kernel/private/msm-google/arch/arm64/kernel/vdso32/Makefile:144:
>  
> arch/arm64/kernel/vdso32/sigreturn.o] Error 1
> make[3]: *** Waiting for unfinished jobs
> /..//bin/as: unrecognized option '-mfloat-abi=soft'
> clang-5.0: error: assembler command failed with exit code 1 (use -v to see 
> invocation)
> make[3]: *** 
> [/home/jiangenj/workspace/pixel3/kernel/private/msm-google/arch/arm64/kernel/vdso32/Makefile:142:
>  
> arch/arm64/kernel/vdso32/vgettimeofday.o] Error 1
> make[2]: *** [arch/arm64/Makefile:242: vdso_prepare] Error 2
> make[1]: *** [Makefile:152: sub-make] Error 2
> make: *** [Makefile:24: __sub-make] Error 2
>
> Thanks
>

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.