[SCRIPT] Compile kernel source for the Zenwatch3 - Asus ZenWatch 3

DEPRECATED because I don't have the watch anymore. Might still work, might also not. Feel free to just try and iterate on my work.
To port over TWRP, I needed a prebuilt kernel. With a little reading around the web, I managed to compile the kernel source for the Zenwatch3 from the Asus website.
Now, to make things easier for others, I created a script which handles the setup and compilation.
You can clone the script from GitHub: https://github.com/Maxr1998/asus_swift_tools
To continue, follow the instructions from the README.
Huge thanks to @joeykrim and @T10NAZ for their work in their Zenwatch2 thread, from which I got the ASUS_SW_VER fix for the Makefile and general directions.

Maxr1998 said:
To port over TWRP, I needed a prebuilt kernel. With a little reading around the web, I managed to compile the kernel source for the Zenwatch3 from the Asus website.
Now, to make things easier for others, I created a script which handles the setup and compilation.
You can clone the script from GitHub: https://github.com/Maxr1998/asus_swift_tools
To continue, follow the instructions from the README.
Huge thanks to @joeykrim and @T10NAZ for their work in their Zenwatch2 thread, from which I got the ASUS_SW_VER fix for the Makefile and general directions.
Click to expand...
Click to collapse
Thanks for the recovery and instructions.
I faces the following issue when trying to compile. Any tips to avoid this issue. thanks in advance.
drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c: In function 'hdd_RoamIbssIndicationHandler':
drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c:2170:13: warning: passing argument 3 of 'cfg80211_ibss_joined' makes pointer from integer without a cast [enabled by default]
error, forbidden warning: wlan_hdd_assoc.c:2170
/home/toffyjan/android/Test/kernel/scripts/Makefile.build:257: recipe for target 'drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.o' failed
make[3]: *** [drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.o] Error 1
/home/toffyjan/android/Test/kernel/scripts/Makefile.build:402: recipe for target 'drivers/staging/prima' failed
make[2]: *** [drivers/staging/prima] Error 2
/home/toffyjan/android/Test/kernel/scripts/Makefile.build:402: recipe for target 'drivers/staging' failed
make[1]: *** [drivers/staging] Error 2
Makefile:820: recipe for target 'drivers' failed
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
CC net/key/af_key.o
CC net/ipv6/ip6_input.o
LD net/wireless/built-in.o
LD net/built-in.o
[email protected]:~/android/Test/kernel$

janjan said:
Thanks for the recovery and instructions.
I faces the following issue when trying to compile. Any tips to avoid this issue. thanks in advance.
drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c: In function 'hdd_RoamIbssIndicationHandler':
drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c:2170:13: warning: passing argument 3 of 'cfg80211_ibss_joined' makes pointer from integer without a cast [enabled by default]
error, forbidden warning: wlan_hdd_assoc.c:2170
/home/toffyjan/android/Test/kernel/scripts/Makefile.build:257: recipe for target 'drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.o' failed
make[3]: *** [drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.o] Error 1
/home/toffyjan/android/Test/kernel/scripts/Makefile.build:402: recipe for target 'drivers/staging/prima' failed
make[2]: *** [drivers/staging/prima] Error 2
/home/toffyjan/android/Test/kernel/scripts/Makefile.build:402: recipe for target 'drivers/staging' failed
make[1]: *** [drivers/staging] Error 2
Makefile:820: recipe for target 'drivers' failed
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
CC net/key/af_key.o
CC net/ipv6/ip6_input.o
LD net/wireless/built-in.o
LD net/built-in.o
[email protected]:~/android/Test/kernel$
Click to expand...
Click to collapse
Weird. Are you using the same toolchain I use?

Maxr1998 said:
Weird. Are you using the same toolchain I use?
Click to expand...
Click to collapse
Yes I did. I using arm-eabi-4.8. I replaced the Makefile with one you linked. Then followed by.
export PATH=~/android/arm-eabi-4.8/bin:$PATH
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
make swift_defconfig
make -j `getconf _NPROCESSORS_ONLN`
Error due to 'drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.o' failed anf stopped.

janjan said:
Yes I did. I using arm-eabi-4.8. I replaced the Makefile with one you linked. Then followed by.
export PATH=~/android/arm-eabi-4.8/bin:$PATH
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
make swift_defconfig
make -j `getconf _NPROCESSORS_ONLN`
Error due to 'drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.o' failed anf stopped.
Click to expand...
Click to collapse
That explains it. You shouldn't replace the Makefile, but keep the default one, it gets patched with the fix automatically

Maxr1998 said:
That explains it. You shouldn't replace the Makefile, but keep the default one, it gets patched with the fix automatically
Click to expand...
Click to collapse
I can't get the patch to work. It seems it does not patched the makefile. It trying to patch but nothing happen.
~/android/Test/test111$ sudo ./build.sh
[sudo] password for toffyjan:
Welcome!
Extracting files..
Archive: WI503Q_kernel_5_8_0_54.zip
inflating: ASUS_Swift-5.8.0.54-kernel-src.tar
Press any key to continue, Ctrl + C to cancel.
Compiling kernel
Trying to patch Makefile..
--------------------------------------
I edit your script like following.
#!/bin/bash
ARCH=arm CROSS_COMPILE=/home/toffyjan/android/arm-eabi-4.8/bin/arm-eabi-
echo "Welcome!"
##################
# Setup
##################
if [ ! -d kernel ]; then
echo "Extracting files.."
unzip "WI503Q_kernel_*.zip"
tar -xf ASUS_Swift-*-kernel-src.tar
fi
echo "Press any key to continue, Ctrl + C to cancel."
read
##################
# Compile kernel
##################
echo "Compiling kernel"
cd kernel
# Patch Makefile
echo "Trying to patch Makefile.."
patch -N -r /home/toffyjan/android/Test/test111/Patch-Makefile.patch
# Exports
export ARCH=arm
export CROSS_COMPILE=/home/toffyjan/android/arm-eabi-4.8/bin/arm-eabi-
# Make
echo "Starting compilation.."
make clean
make swift_defconfig
make -j3
# Copy kernel
cp "arch/arm/boot/zImage-dtb" ../zImage-dtb
---
I can't get your point here..
OMNI_TREE="/home/max/Development/Android/TWRP" # Enter path of your Omni tree with the toolchain here ? Do I need OMNI_TREE? Is it necessary?

janjan said:
I can't get the patch to work. It seems it does not patched the makefile. It trying to patch but nothing happen.
~/android/Test/test111$ sudo ./build.sh
[sudo] password for toffyjan:
Welcome!
Extracting files..
Archive: WI503Q_kernel_5_8_0_54.zip
inflating: ASUS_Swift-5.8.0.54-kernel-src.tar
Press any key to continue, Ctrl + C to cancel.
Compiling kernel
Trying to patch Makefile..
--------------------------------------
I edit your script like following.
...
I can't get your point here..
OMNI_TREE="/home/max/Development/Android/TWRP" # Enter path of your Omni tree with the toolchain here ? Do I need OMNI_TREE? Is it necessary?
Click to expand...
Click to collapse
Does applying the patch manually from Terminal work?
You don't really need the whole omni tree for compiling the kernel, I only use it for the CROSS_COMPILE/toolchain. Maybe I'll update the script.
Btw, you normally don't need to run this with sudo.

Maxr1998 said:
Does applying the patch manually from Terminal work?
You don't really need the whole omni tree for compiling the kernel, I only use it for the CROSS_COMPILE/toolchain. Maybe I'll update the script.
Btw, you normally don't need to run this with sudo.
Click to expand...
Click to collapse
It seems it is working now at least the patch. Let me see if it finish compiling without error. I will report when it finish. Thanks. I edited like
#!/bin/bash
CROSS_COMPILE=/home/xxxxx/android/arm-eabi-4.8/bin/arm-eabi- # PLACE YOUR CROSS_COMPILE HERE
echo "Welcome!"
##################
# Setup
##################
if [ ! -d kernel ]; then
echo "Extracting files.."
unzip "WI503Q_kernel_*.zip"
tar -xf ASUS_Swift-*-kernel-src.tar
fi
echo "Press any key to continue, Ctrl + C to cancel."
read
##################
# Compile kernel
##################
echo "Compiling kernel"
cd kernel
# Patch Makefile
echo "Trying to patch Makefile.."
patch -N -r /home/xxxxx/android/asus_swift_tools-master/null Makefile ../Patch-Makefile.patch
# Exports
export PATH=~/android/arm-eabi-4.8/bin:$PATH
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
export CROSS_COMPILE=/home/xxxxx/android/arm-eabi-4.8/bin/arm-eabi-
# Make
echo "Starting compilation.."
make clean
make swift_defconfig
make -j `getconf _NPROCESSORS_ONLN`
# Copy kernel
cp "arch/arm/boot/zImage-dtb" ../zImage-dtb
Edit: YES It complete the compiling without any issue. Seems good. Thanks a lot. Now we need to compile a boot.img to try it out. OR maybe use AnyKernel2 Ramdisk Mod Script. The best and the safe way to try by making a boot.img and then try by fastboot boot boot.img It should not hurt the device.

Do you mind to share the stock boot.img? Thanks

janjan said:
Do you mind to share the stock boot.img? Thanks
Click to expand...
Click to collapse
I currently don't have my watch with me, but I will extract it for you tomorrow.
Don't know why my script doesn't work for you :/

Maxr1998 said:
I currently don't have my watch with me, but I will extract it for you tomorrow.
Don't know why my script doesn't work for you :/
Click to expand...
Click to collapse
Sounds good. Thank you very much. It works with a bit edit. Happy new

janjan said:
Sounds good. Thank you very much. It works with a bit edit. Happy new
Click to expand...
Click to collapse
I think that my current paths setup still needs some tweaking
Happy new year!

Maxr1998 said:
I think that my current paths setup still needs some tweaking
Happy new year!
Click to expand...
Click to collapse
We can always add tweaking afterward as long we are able to build. Really appreciate your work for script and custom recovery :good:

janjan said:
Sounds good. Thank you very much. It works with a bit edit. Happy new
Click to expand...
Click to collapse
Here you are. A little later than I wanted, but I hope it's ok

Maxr1998 said:
Here you are. A little later than I wanted, but I hope it's ok
EDIT: mirrored to Dropbox, since attachments are broken right now in XDA.
Click to expand...
Click to collapse
Thank you so much. I will play with the kernel in coming days. :good:

Hello Maxr1998.
Edit.
I tried your custom kernel. It seems everything is working fine. Backup, Restore, flash boot.img and flash zips. Great work there. Really appreciate your work. :good:

Can anyone post a quick list of what commands I would need to enter to get all the required packages/toolchain stuff? I'm fine with plugging commands in to the shell, but I don't really know what I need to get started. Was gonna give this a try to see if it fixes my problem with rebooting when I try to charge.

jobarr said:
Can anyone post a quick list of what commands I would need to enter to get all the required packages/toolchain stuff? I'm fine with plugging commands in to the shell, but I don't really know what I need to get started. Was gonna give this a try to see if it fixes my problem with rebooting when I try to charge.
Click to expand...
Click to collapse
I will upload my kernel soon. Need to upload the source first. You can try my build if you want.

janjan said:
I will upload my kernel soon. Need to upload the source first. You can try my build if you want.
Click to expand...
Click to collapse
Really looking forward to it!
I am quite interested in what the tweaks/changes are

Maxr1998 said:
Really looking forward to it!
I am quite interested in what the tweaks/changes are
Click to expand...
Click to collapse
Nothing so much now. I will add tweaks later. I disabled dm-verity and forced encryption. Possibility to modify system partition and ability to add BusyBox and SuperSu. I will play with other tweaks later. I am a bit busy with exams etc. Did you also build a kernel ?

Related

[HOW TO] compile lge_star_kernel for cm7

this thread is a short how to compile lge_star_kernel for cm7. as i am a noobie, if there is mistake, wrong, etc. please correct me.
there is cm kernel how to at http://wiki.cyanogenmod.com/wiki/Building_Kernel_from_source. i will make a few change from there for p990 (shown in bold)
benee in vorkKernel project posted how to compile vorkKernel at https://github.com/VorkTeam/vorkKernel-Scripts/wiki
git tutorial at http://gitref.org/creating/
lge-kernel-star is at http://github.com/CyanogenMod/lge-kernel-star/
# how to #
0. install required development support package : (see cm kernel how to)
0. assuming that cm rom source in ~/android/system and kernel source in ~/android/kernel for 1A and 1B or ~/android/system/kernel for 1C
1A. download kernel source : (first time only. you can use git for deltas only. see post #4 and follow step 1B instead)
> mkdir -p ~/android/kernel
> cd ~/android/kernel
> git clone git://github.com/CyanogenMod/lge-kernel-star.git
> cd lge-kernel-star
1B. update kernel source by git for new commits
> cd ~/android/kernel/lge-kernel-star
> git pull
1C. alternatively, set up git for cm repo
> cp local_manifest.xml ~/android/system/.repo/local_manifest.xml
> cd ~/android/system
> repo sync -j16 kernel/lge-kernel-star
> cd ~/android/system/kernel/lge-kernel-star
2. set up compiler prefix : we need "ARM EABI Toolchain" from prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/ in CM ROM source tree (4.4.3 also works, and i'm using it)
> export CCOMPILER=${HOME}/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
3. copy config
> cp arch/arm/configs/star_cyanogenmod_defconfig .config
4. run configuration
> make ARCH=arm CROSS_COMPILE=$CCOMPILER oldconfig
5. build
> make ARCH=arm CROSS_COMPILE=$CCOMPILER -j`grep 'processor' /proc/cpuinfo | wc -l`
6. copy kernel and modules to cm source device folder (zImage is renamed as kernel)
> cp arch/arm/boot/zImage ~/android/system/device/lge/p990/kernel
> cp drivers/net/wireless/bcm4329/wireless.ko ~/android/system/device/lge/p990/prebuilt/wireless.ko
7. build CM ROM using the compiled kernel and modules
p.s. i use a bash script that does 2 to 6 automatically.
kernel source mod
# version : the current versioning that shows up in Settings > About phone > kernel version is a bit hard to follow if everybody compiles his/her own kernel. i customize lge-kernel-star/scripts/mkcompile_h and use date as version
46: DATETODAY=`date +"%Y%m%d"`
47: UTS_VERSION="$DATETODAY#$VERSION"
# compiled by : since i have a different username on linux system that i use, force it to show the name you want on it.
67: echo \#define LINUX_COMPILE_BY \"YOUR_NAME\"
68: echo \#define LINUX_COMPILE_HOST \"YOUR_MACHINE\"
here is my (simplified) shell script to compile kernel
Code:
#!/bin/sh
export CCOMPILER=${HOME}/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
cd ${HOME}/android/kernel/lge-kernel-star || exit
${CCOMPILER}gcc --verbose || exit # show the cross compiler
\cp arch/arm/configs/star_cyanogenmod_defconfig .config
make ARCH=arm CROSS_COMPILE=$CCOMPILER oldconfig
make ARCH=arm CROSS_COMPILE=$CCOMPILER -j`grep 'processor' /proc/cpuinfo | wc -l`
edit: added a printout of manual checking of compiler in line 4
Following is from myfluxi
myfluxi said:
Hey, it's me again. Regarding the kernel thread, cloning the kernel ressources is not very efficient, instead add the git to your repository and just download deltas. Edit (typically) ~/android/.repo/local_manifest.xml by adding:
Code:
<project path="kernel/lge-kernel-star" name="CyanogenMod/lge-kernel-star.git" remote="github" revision="android-tegra-2.6.32" />
And a late happy birthday...
Cheers
Marc
Click to expand...
Click to collapse
Thanks for sharing. I suppose that's the next fun thing to learn.
Oh btw how do u add/remove kernel or init.rc commits?
Exactly what I looked for the other day. Thanks a lot pastime1971!!
This time I won't fail ;-)
EDIT: but I did... I guess it's the export that made me fail?
Code:
[email protected]:~/android/kernel/lge-kernel-star$ make ARCH=arm CROSS_COMPILE=$CCOMPILER -j`grep 'processor' /proc/cpuinfo | wc -l`
scripts/kconfig/conf -s arch/arm/Kconfig
CHK include/linux/version.h
SYMLINK include/asm -> include/asm-arm
make[1]: `include/asm-arm/mach-types.h' is up to date.
CHK include/linux/utsrelease.h
CC scripts/mod/empty.o
cc1: error: unrecognized command line option "-mlittle-endian"
cc1: error: unrecognized command line option "-mapcs"
cc1: error: unrecognized command line option "-mno-sched-prolog"
cc1: error: unrecognized command line option "-mno-thumb-interwork"
scripts/mod/empty.c:1:0: error: unknown ABI (aapcs-linux) for -mabi= switch
scripts/mod/empty.c:1:0: error: bad value (armv5t) for -march= switch
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
temasek said:
Thanks for sharing. I suppose that's the next fun thing to learn.
Oh btw how do u add/remove kernel or init.rc commits?
Click to expand...
Click to collapse
the way i understand it is that boot.img is built w/ kernel (as prebuilt) and init ram disk when you brunch.
there are several init.rc involved. (see out/target/product/p990/root/)
for example w/ secure clock commit, init.p990.rc is from device/lge/p990/init.p990.rc
so, i build (brunch) cyanogen w/ kernel (zImage goes to device/lge/p990/kernel and modules go to device/lge/p990/prebuilt/) compiled as above and init.rc's changed in cm (you could cherry pick them, i suppose)
for kernel itself, i don't know if you can cherry pick them or not. typically, i just apply diff patches. (if someone know how to cherry pick kernel commits, please let us know.)
pastime1971 said:
the way i understand it is that boot.img is built w/ kernel (as prebuilt) and init ram disk when you brunch.
there are several init.rc involved. (see out/target/product/p990/root/)
for example w/ secure clock commit, init.p990.rc is from device/lge/p990/init.p990.rc
so, i build (brunch) cyanogen w/ kernel (zImage goes to device/lge/p990/kernel and modules go to device/lge/p990/prebuilt/) compiled as above and init.rc's changed in cm (you could cherry pick them, i suppose)
for kernel itself, i don't know if you can cherry pick them or not. typically, i just apply diff patches. (if someone know how to cherry pick kernel commits, please let us know.)
Click to expand...
Click to collapse
Thanks.
I'll have a go and it when I'm free. Good to have u onboard.
sibbor said:
Exactly what I looked for the other day. Thanks a lot pastime1971!!
This time I won't fail ;-)
EDIT: but I did... I guess it's the export that made me fail?
Click to expand...
Click to collapse
can you "echo $CCOMPILER" or "env | grep CCOMPILER" before make to ensure that it is exported correctly ?
it re-defines to use those arm-eabi-gcc and others. see lge-kernel-star/Makefile, line 309 : CC = $(CROSS_COMPILE)gcc
without it, you would be calling gcc which doesn't understand -mlittle-endian or other options in that log
edit: i commented out the line of export from my shell script, and i get the exact same error message. it must be export issue.
edit: you should get the following when you do "${CCOMPILER}gcc --verbose"
> ${CCOMPILER}gcc --verbose
Using built-in specs.
Target: arm-eabi
Configured with: /home/jingyu/projects/gcc/android-toolchainsrc/build/../gcc/gcc-4.4.3/configure --prefix=/usr/local --target=arm-eabi --host=x86_64-linux-gnu --build=x86_64-linux-gnu --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --with-gmp=/home/jingyu/projects/gcc/toolchain_build/gingerbreadobj/temp-install --with-mpfr=/home/jingyu/projects/gcc/toolchain_build/gingerbreadobj/temp-install --disable-libssp --enable-threads --disable-nls --disable-libmudflap --disable-libgomp --disable-libstdc__-v3 --disable-sjlj-exceptions --disable-shared --disable-tls --with-float=soft --with-fpu=vfp --with-arch=armv5te --enable-target-optspace --with-abi=aapcs --with-gcc-version=4.4.3 --with-binutils-version=2.19 --with-gmp-version=4.2.4 --with-mpfr-version=2.4.1 --with-gdb-version=7.1.x --with-arch=armv5te --with-multilib-list=mandroid --with-sysroot=/usr/local/google/home/android/cupcake_rel_root --enable-gold=both/gold --program-transform-name='s&^&arm-eabi-&'
Thread model: single
myfluxi said:
pastime1971 said:
Dear Marc,
Do you know how to set up local copy of git for lge-kernel-star ?
I can add that line to cm/.repo/local_manifest.xml and it works.
But I would like to have a separate one just for kernel.
I can copy .repo from cm and strip it down, and leave just kernel. That works as well.
But I was wondering if there is a better way to do it. I tried to "repo init -u git://github.com/CyanogenMod/lge-kernel-star.git -b android-tegra-2.6.32" but it fails w/ the following message: #error message deleted#
besides, the source goes into .repo/manifests/
maybe I need to use git command directly ?
regards,
pastime
Click to expand...
Click to collapse
Hey,
if you just want to be on top of things of our beloved lge-kernel-star, maybe just:
git clone git://github.com/CyanogenMod/lge-kernel-star.git
and then sync with
cd lge-kernel-star
git [pull | fetch]
What do you think?
Cheers
Marc
Click to expand...
Click to collapse
thanks for your advice. i updated the first post accordingly.
edit: w/ today's commit, i tried "git fetch", and nothing happens. tried "git pull" and it downloads new commits. updated the first post. comment welcome if you know the difference between fetch and pull.
Managed to build the kernel now. Will see if my freshly compiled Kang include it or not. If it's included I think it's magic... because I had to create the folders manually where I copied the zImage. Feels like it should already have been there, no?
Hey, pastime, you've got an error in point #6:
Code:
cp arch/arm/boot/zImage ~/andoid/system/device/lge/p990/kernel
should be
Code:
cp arch/arm/boot/zImage ~/and[B]r[/B]oid/system/device/lge/p990/kernel
sibbor said:
Managed to build the kernel now. Will see if my freshly compiled Kang include it or not. If it's included I think it's magic... because I had to create the folders manually where I copied the zImage. Feels like it should already have been there, no?
Hey, pastime, you've got an error in point #6:
Code:
cp arch/arm/boot/zImage ~/andoid/system/device/lge/p990/kernel
should be
Code:
cp arch/arm/boot/zImage ~/and[B]r[/B]oid/system/device/lge/p990/kernel
Click to expand...
Click to collapse
omg, sorry about the typo.... i manually typed those...
glad it is working for you now
when your kernel is included in your kang, you would see your name and host in "About phone"
edit: typo corrected
edit: i just read your comment on the folder... it should be there already, isn't it ? it is under YOUR_CYANOGEN_ROM_SOURCE_FOLDER/device/lge/p990/
edit: device/lge/p990/kernel is a file, not a folder. "zImage" is renamed to "kernel" in that folder (p990). wireless.ko is the same name in p990/prebuilt/
pastime1971 said:
omg, sorry about the typo.... i manually typed those...
glad it is working for you now
when your kernel is included in your kang, you would see your name and host in "About phone"
edit: typo corrected
edit: i just read your comment on the folder... it should be there already, isn't it ? it is under YOUR_CYANOGEN_ROM_SOURCE_FOLDER/device/lge/p990/
edit: device/lge/p990/kernel is a file, not a folder. "zImage" is renamed to "kernel" in that folder (p990). wireless.ko is the same name in p990/prebuilt/
Click to expand...
Click to collapse
Ah, yeah. Thanks!
Sure, it's working for me. [email protected] Sweet stuff! Thanks for the brilliant guide pastime.
Making my own shell scripts now I learn the whole process a bit better too, from A to Z ;-)
sibbor said:
Ah, yeah. Thanks!
Sure, it's working for me. [email protected] Sweet stuff! Thanks for the brilliant guide pastime.
Making my own shell scripts now I learn the whole process a bit better too, from A to Z ;-)
Click to expand...
Click to collapse
you are welcome.
enlighten us if you find a way to improve it, too.
i moved on to using "git pull", thanks to myfluxi
I did another "pull request" on kernel regarding touch screen.
Not sure if I did it right this time, it seems somehow different from last.
Let say you have a old pull request.
How do I withdraw it, update to the latest, and make a new pull request? (Assuming that is a right procedure.) I had to delete the old one, and started from the scratch. Doesn't feel right.
If you're only interested in the kernel, you can build just the boot image if you like:
make -j4 bootimage
Only takes a few seconds really.
Rusty! said:
If you're only interested in the kernel, you can build just the boot image if you like:
make -j4 bootimage
Only takes a few seconds really.
Click to expand...
Click to collapse
i imagined that something like that would be possible.
never knew how...
thanks, rusty
Rusty! said:
If you're only interested in the kernel, you can build just the boot image if you like:
make -j4 bootimage
Only takes a few seconds really.
Click to expand...
Click to collapse
Could u be a little more specific? I tried that command but it builds generic one... Am I missing something here? I think I am....
Insights pls?
make clean
. build/envsetup.sh
lunch p990-eng
make -j4 bootimage
Rusty! said:
make clean
. build/envsetup.sh
lunch p990-user
make -j4 bootimage
Click to expand...
Click to collapse
Cool.
The boot.img created in a blaze. But this method is only applicable if the kernel is committed? What if it is just committed in the star kernel git but yet to be merged to cm, then we do we have to create a zImage and then compile CM ?
Thanks.....

M source has posted for AOSP. Compiling issues.

Has anyone gotten M to build?
Just did an init(1), sync, install binaries(2), lunch, but then make fails after only a few minutes in.
Here are the last few lines before it fails I can't make any sense of it:
Code:
including ./system/media/camera/src/Android.mk ...
including ./system/media/camera/tests/Android.mk ...
including ./system/media/radio/src/Android.mk ...
including ./system/netd/Android.mk ...
including ./system/security/keystore-engine/Android.mk ...
including ./system/security/keystore/Android.mk ...
including ./system/security/softkeymaster/Android.mk ...
including ./system/vold/Android.mk ...
including ./tools/external/fat32lib/Android.mk ...
including ./vendor/lge/hammerhead/proprietary/Android.mk ...
including ./vendor/qcom/hammerhead/proprietary/Android.mk ...
PRODUCT_COPY_FILES device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml ignored.
PRODUCT_COPY_FILES vendor/broadcom/hammerhead/proprietary/bcm4335c0.hcd:system/vendor/firmware/bcm4335c0.hcd:broadcom ignored.
build/core/Makefile:34: warning: overriding recipe for target 'out/target/product/hammerhead/system/lib/hw/gps.msm8974.so'
build/core/base_rules.mk:559: warning: ignoring old recipe for target 'out/target/product/hammerhead/system/lib/hw/gps.msm8974.so'
build/core/Makefile:34: warning: overriding recipe for target 'out/target/product/hammerhead/system/lib/libgps.utils.so'
build/core/base_rules.mk:559: warning: ignoring old recipe for target 'out/target/product/hammerhead/system/lib/libgps.utils.so'
build/core/Makefile:34: warning: overriding recipe for target 'out/target/product/hammerhead/system/lib/libloc_core.so'
build/core/base_rules.mk:559: warning: ignoring old recipe for target 'out/target/product/hammerhead/system/lib/libloc_core.so'
build/core/Makefile:34: warning: overriding recipe for target 'out/target/product/hammerhead/system/lib/libloc_eng.so'
build/core/base_rules.mk:559: warning: ignoring old recipe for target 'out/target/product/hammerhead/system/lib/libloc_eng.so'
No private recovery resources for TARGET_DEVICE hammerhead
Import includes file: out/host/linux-x86/obj/EXECUTABLES/validatekeymaps_intermediates/import_includes
host C: libcompiler_rt-extras <= external/compiler-rt/lib/builtins/mulodi4.c
Import includes file: out/host/linux-x86/obj/STATIC_LIBRARIES/libc++_static_intermediates/import_includes
prebuilts/clang/linux-x86/host/3.6/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
build/core/binary.mk:801: recipe for target 'out/host/linux-x86/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/lib/builtins/mulodi4.o' failed
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/lib/builtins/mulodi4.o] Error 127
make: *** Waiting for unfinished jobs....
host C++: libc++abi <= external/libcxxabi/src/abort_message.cpp
prebuilts/clang/linux-x86/host/3.6/bin/clang++: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
build/core/binary.mk:706: recipe for target 'out/host/linux-x86/obj/STATIC_LIBRARIES/libc++abi_intermediates/src/abort_message.o' failed
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libc++abi_intermediates/src/abort_message.o] Error 127
#### make failed to build some targets (01:08 (mm:ss)) ####
1. repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.0_r1
2. https://developers.google.com/android/nexus/drivers#hammerheadmra58k
I built yesterday on opensuse without issues.
Go with the master branch, they merged it with the 6.0.0_r1 tag:
https://groups.google.com/d/topic/android-building/KuVIYWOcXMo/discussion
ezio84 said:
I built yesterday on opensuse without issues.
Go with the master branch, they merged it with the 6.0.0_r1 tag:
https://groups.google.com/d/topic/android-building/KuVIYWOcXMo/discussion
Click to expand...
Click to collapse
So you're telling me this error didn't occur with openSuse? Damn it. Might be time to ditch Arch and join the club. Oh, it's almost the same error as the op. Any thoughts I'm all ears.
Code:
prebuilts/clang/linux-x86/host/3.6/bin/clang++ -fno-exceptions -Wno-multichar -m64 -Wa,--noexecstack -fPIC -no-canonical-prefixes -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 --sysroot=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/sysroot -target x86_64-linux-gnu -Wsign-promo -Wno-inconsistent-missing-override --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 --sysroot=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/sysroot -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8 -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8/x86_64-linux -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8/backward -target x86_64-linux-gnu -c -std=c++11 -g -W -Wall -MMD -MP -O -DNOLOG -o out/host/linux-x86/obj/EXECUTABLES/ckati_intermediates/command.o build/kati/command.cc
prebuilts/clang/linux-x86/host/3.6/bin/clang++: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
build/kati/Makefile.ckati:82: recipe for target 'out/host/linux-x86/obj/EXECUTABLES/ckati_intermediates/command.o' failed
make: *** [out/host/linux-x86/obj/EXECUTABLES/ckati_intermediates/command.o] Error 127
theesotericone said:
So you're telling me this error didn't occur with openSuse? Damn it. Might be time to ditch Arch and join the club. Oh, it's almost the same error as the op. Any thoughts I'm all ears.
Code:
prebuilts/clang/linux-x86/host/3.6/bin/clang++ -fno-exceptions -Wno-multichar -m64 -Wa,--noexecstack -fPIC -no-canonical-prefixes -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 --sysroot=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/sysroot -target x86_64-linux-gnu -Wsign-promo -Wno-inconsistent-missing-override --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 --sysroot=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/sysroot -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8 -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8/x86_64-linux -isystem prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/include/c++/4.8/backward -target x86_64-linux-gnu -c -std=c++11 -g -W -Wall -MMD -MP -O -DNOLOG -o out/host/linux-x86/obj/EXECUTABLES/ckati_intermediates/command.o build/kati/command.cc
prebuilts/clang/linux-x86/host/3.6/bin/clang++: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
build/kati/Makefile.ckati:82: recipe for target 'out/host/linux-x86/obj/EXECUTABLES/ckati_intermediates/command.o' failed
make: *** [out/host/linux-x86/obj/EXECUTABLES/ckati_intermediates/command.o] Error 127
Click to expand...
Click to collapse
If it can help, i have these package versions:
- libncurses 5 5.9-52.2.3
- glibc 2.19-16.15.1
Sorry for OT, but anyone pushed hammerhead blobs to github? Would like to give a build a testdrive, but running lollipop on my device still
Thank you very much
Sick1 said:
Sorry for OT, but anyone pushed hammerhead blobs to github? Would like to give a build a testdrive, but running lollipop on my device still
Thank you very much
Click to expand...
Click to collapse
Extracted some days ago and pushed here:
https://github.com/ezio84/
in these trees (mm6.0 branch):
proprietary_vendor_qcom
proprietary_vendor_lge
proprietary_vendor_broadcom
I was able to get it to build on a Debian machine. Something is missing on my main build machine (Gentoo) that I'll have to track down. It took almost 3 hours on my debian machine. 5.1 builds took about 45 minutes on my gentoo machine.
Edit: looks like Gentoo was missing the libtinfo libraries. This is a USE option for the ncurses package. Recompiling with the "tinfo" USE flag got me the necessary libraries and it now compiles fine on my Gentoo machine.
ezio84 said:
If it can help, i have these package versions:
- libncurses 5 5.9-52.2.3
- glibc 2.19-16.15.1
Click to expand...
Click to collapse
Oh, it helped all right. Here's a funny story for you.
Two nights ago I did an upgrade on my Arch install. It crashed my whole system. As in I couldn't even boot a live cd and chroot into my drive. Lost tons of unimportant stuff in the process. So, now I'm more pissed at Arch then I ever have been in the three years I've been using it. What do you do when you're not happy with your current distro? You nuke it. Except, in this case, Arch did that for me.
I looked into openSUSE mainly because of your and @letmedanz success with it. Plus I really like the direction they've taken it over the last few years. So, I begrudgingly used my wifes MAC to make a bootable USB of openSUSU 13.2. During the install I checked EVERY dev package group that it offered. It did it's magic and I was left to explore the openSUSE universe while I was repo syncing AOSP. It's a really nice distro man. I can see why you use it.
So, after sync and with installing ZERO extra packages for building, I hit up the old make otapackage. It started to build. I waited for an error. Than I waited some more. Then I gave up and went and had some coffee. When I got back I was amazed to see it completed. First build on the new distro was a success. That does not happen often. So thanks for the help man.
Oh I did change java to openjdk7 before building but that was the only system change I made.
theesotericone said:
Oh, it helped all right. Here's a funny story for you.
Two nights ago I did an upgrade on my Arch install. It crashed my whole system. As in I couldn't even boot a live cd and chroot into my drive. Lost tons of unimportant stuff in the process. So, now I'm more pissed at Arch then I ever have been in the three years I've been using it. What do you do when you're not happy with your current distro? You nuke it. Except, in this case, Arch did that for me.
I looked into openSUSE mainly because of your and @letmedanz success with it. Plus I really like the direction they've taken it over the last few years. So, I begrudgingly used my wifes MAC to make a bootable USB of openSUSU 13.2. During the install I checked EVERY dev package group that it offered. It did it's magic and I was left to explore the openSUSE universe while I was repo syncing AOSP. It's a really nice distro man. I can see why you use it.
So, after sync and with installing ZERO extra packages for building, I hit up the old make otapackage. It started to build. I waited for an error. Than I waited some more. Then I gave up and went and had some coffee. When I got back I was amazed to see it completed. First build on the new distro was a success. That does not happen often. So thanks for the help man.
Oh I did change java to openjdk7 before building but that was the only system change I made.
Click to expand...
Click to collapse
Indeed, i love it. I'm also curious to see the new incoming "Leap" release, it will be developed by their Enterprise stuff too
PS: run this command too (after "su"):
Code:
ln -s /usr/sbin/schedtool /usr/bin/schedtool
so the build process can access the schedtool bin (it's needed to handle cpu cores) without root privileges.
theesotericone said:
Oh, it helped all right. Here's a funny story for you.
Two nights ago I did an upgrade on my Arch install. It crashed my whole system. As in I couldn't even boot a live cd and chroot into my drive. Lost tons of unimportant stuff in the process. So, now I'm more pissed at Arch then I ever have been in the three years I've been using it. What do you do when you're not happy with your current distro? You nuke it. Except, in this case, Arch did that for me.
I looked into openSUSE mainly because of your and @letmedanz success with it. Plus I really like the direction they've taken it over the last few years. So, I begrudgingly used my wifes MAC to make a bootable USB of openSUSU 13.2. During the install I checked EVERY dev package group that it offered. It did it's magic and I was left to explore the openSUSE universe while I was repo syncing AOSP. It's a really nice distro man. I can see why you use it.
So, after sync and with installing ZERO extra packages for building, I hit up the old make otapackage. It started to build. I waited for an error. Than I waited some more. Then I gave up and went and had some coffee. When I got back I was amazed to see it completed. First build on the new distro was a success. That does not happen often. So thanks for the help man.
Oh I did change java to openjdk7 before building but that was the only system change I made.
Click to expand...
Click to collapse
Wise choice
Better late than ever eh? LOL
Never had any issues with opensuse, except of course some hardware compatibility with certain aspects of the apple hardware, but that's pretty minimal.
Am sure you'll like it as you use it
good luck :good:
I was able to build M for my Nexus 5 last night (took 3 hours). And I found a work around fix for getting rid of the google play services fcs.
Gene Poole said:
Has anyone gotten M to build?
Just did an init(1), sync, install binaries(2), lunch, but then make fails after only a few minutes in.
Here are the last few lines before it fails I can't make any sense of it:
Code:
prebuilts/clang/linux-x86/host/3.6/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
1. repo init -u [url]https://android.googlesource.com/platform/manifest[/url] -b android-6.0.0_r1
2. [url]https://developers.google.com/android/nexus/drivers#hammerheadmra58k[/url][/QUOTE]
For the record (i know I'm a bit late), you were missing libtinfo. That happens mostly on arch Linux, you have to install it from AUR. Other than that you might need other package for ncurse that is compatible with v5. The package is available on AUR as well.
Hope it helps future builders with arch
Click to expand...
Click to collapse
I'm on Arch as well, you need ncurses5-compat-libs from the AUR to fix the build.
possible solution compiling in Archlinux
I saw you had problems compiling it in archlinux, I managed to build the LineageOS in arch and was having the same problem as you. I solved it by installing lib32-libtinfo libtinfo5 and then creating a symlink
Code:
yaourt lib32-libtinfo libtinfo5
ln -sf /usr/lib/libncurses.so.5 /usr/lib/libtinfo.so.5

LineageOS 15.0 Self-Builder's thread

This is the thread where people trying to build LineageOS themselves communicate. Communication up until now happend inside the "[ROM+Kernel][Unofficial][Unified]LineageOS 15.0[8.0.0]" thread. Picking the important parts in all the user-talk was hard.
So here we go, lets get this **** build.
Short summary - I try to build from LineageOS sources, taking roomservice from LineageOS and - except for blobs from muppets - not using any external repos. If you try to build from akhilnarang's sources, please note that in your post.
Anyways, I wrote this:
mad-murdock said:
If you build from vanilla laos sources, with roomservice, you must "repopick -t kryo-libc" after repo sync to get rid of those soong "arch.arm64.kryo" errors. see https://review.lineageos.org/#/q/branch:lineage-15.0+topic:kryo-libc
credits go to dianlujitao who was so kind to answer my question.
also, in device/oneplus/oneplus3/lineage.mk there is a reference to vendor/cm which you must change to vendor/lineage
then another error happen
Click to expand...
Click to collapse
And got a reply here:
joshndroid said:
Are you referring to the cmsdk/api/7.txt needed by blah/blah/checkpublicapi-cm-last-timestamp is missing and no know rule to make it.
repopicking the lineagesdk-oreo-briungup topic (although it was slated as working) doesn't seem to fix that issue. i must be missing something.
Click to expand...
Click to collapse
No josh, I don't repo-pick that. The error happening for me - which I look into once this is done - is
Code:
[ 99% 1105/1108] glob vendor/qcom/opensource/interfaces/*/Android.bp
[ 99% 1106/1108] glob vendor/qcom/opensource/interfaces/camera/device/1.0/Android.bp
[ 99% 1107/1108] glob vendor/qcom/opensource/interfaces/display/config/1.0/Android.bp
ninja: error: '/opt/develop/lineage-15.0/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.internal_intermediates/link_type', needed by '/opt/develop/lineage-15.0/out/target/common/obj/APPS/OneplusDoze_intermediates/link_type', missing and no known rule to make it
19:31:54 ninja failed with: exit status 1
make: *** [build/core/main.mk:21: run_soong_ui] Error 1
make: Leaving directory '/opt/develop/lineage-15.0'
#### make failed to build some targets (35 seconds) ####
I built a non-booting image of LOS15 a while back, I think it was when they started tagging repositories with LOS15 branch - I still can't seem to boot it myself, so I'll ignore that for a moment.
I do have several word to say about this, for one, I had followed what Google have done to the the CPU arch of Sailfish and Marlin. Making them a generic ARMv8 (for the main arch) and ARMv7 Neon for the secondary arch. Of course, I could've merged the libc changes, but they didn't exist when I started doing the early bringup hence the reason why I stuck myself with Google's way of doing things.
As for the OneplusDoze, I simply commented it out due to the fact that Lineage themselves has yet to bring up the necessary CMHW-related changes. However, this is an experience speaking from about a month ago, I have yet to see whether they have started merging new things connected to CMHW.
I still wonder why my build doesn't boot though. I have done practically everything needed for the bringup, but I'm stuck in this loop where the device would hang on the OnePlus logo before jumping to Fastboot Mode; I suppose someone can help me with this?
F4uzan said:
I still wonder why my build doesn't boot though. I have done practically everything needed for the bringup, but I'm stuck in this loop where the device would hang on the OnePlus logo before jumping to Fastboot Mode; I suppose someone can help me with this?
Click to expand...
Click to collapse
Thanks for your input. Well, it was a month ago. I would try again. Unfortunately, my time is limited, so I have little time to spend on this. Very curious though, if the ROM boots once finished. If not, we still can try the repo's akhilnarang builds from:
akhilnarang said:
Sources
Device tree - https://github.com/akhilnarang/device_oneplus_oneplus3
Vendor - https://github.com/akhilnarang/proprietary_vendor_oneplus
Common tree - https://github.com/akhilnarang/device_oppo_common
Has my Derp kernel builtin
Click to expand...
Click to collapse
My issue is, that ROM is a week behind current development, and somehow I don't want to go back to 7.1.2 - so getting this stuff compiled myself is the best way. Guess thats motivation for most who raised their voice on the 8.0 thread
So I'm getting something like this, will experiment further.
Code:
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
build/core/base_rules.mk:467: warning: overriding commands for target `/Volumes/android/los/out/host/darwin-x86/cts/android-cts/testcases/libcrash-jni.so'
build/core/base_rules.mk:467: warning: ignoring old commands for target `/Volumes/android/los/out/host/darwin-x86/cts/android-cts/testcases/libcrash-jni.so'
build/core/base_rules.mk:467: warning: overriding commands for target `/Volumes/android/los/out/target/product/oneplus3/testcases/libcrash-jni/libcrash-jni.so'
build/core/base_rules.mk:467: warning: ignoring old commands for target `/Volumes/android/los/out/target/product/oneplus3/testcases/libcrash-jni/libcrash-jni.so'
build/core/base_rules.mk:467: warning: overriding commands for target `/Volumes/android/los/out/target/product/oneplus3/testcases/hello_world_test/hello_world_test'
build/core/base_rules.mk:467: warning: ignoring old commands for target `/Volumes/android/los/out/target/product/oneplus3/testcases/hello_world_test/hello_world_test'
./test/vts/utils/python/archive/Android.mk:28: warning: overriding commands for target `default'
./test/vts/runners/host/tcp_server/Android.mk:19: warning: ignoring old commands for target `default'
./test/vts/utils/python/coverage/Android.mk:28: warning: overriding commands for target `default'
./test/vts/utils/python/archive/Android.mk:28: warning: ignoring old commands for target `default'
build/core/Makefile:34: warning: overriding commands for target `/Volumes/android/los/out/target/product/oneplus3/system/etc/libnfc-brcm.conf'
build/core/base_rules.mk:375: warning: ignoring old commands for target `/Volumes/android/los/out/target/product/oneplus3/system/etc/libnfc-brcm.conf'
build/core/Makefile:34: warning: overriding commands for target `/Volumes/android/los/out/target/product/oneplus3/system/etc/libnfc-nxp.conf'
build/core/base_rules.mk:375: warning: ignoring old commands for target `/Volumes/android/los/out/target/product/oneplus3/system/etc/libnfc-nxp.conf'
[ 96% 29/30] glob frameworks/wilhelm/include/SLES/**/*.h
ninja: error: 'cm-api-stubs-docs', needed by '/Volumes/android/los/out/target/common/obj/PACKAGING/cm_public_api.txt', missing and no known rule to make it
20:00:43 ninja failed with: exit status 1
make: *** [run_soong_ui] Error 1
#### make failed to build some targets (59 seconds) ####
iMac-Micha:los magnum828$
Magnum828 said:
So I'm getting something like this, will experiment further.
Click to expand...
Click to collapse
I've tried Akhil's repos and a cherry pick from ElixiumOS which brings in a blob called libgpustats.so in vendor/oneplus
I get stuck @17% with ninja giving an error with relation to something in audio-caf.
Something to do with audio_hw.c
I ain't no coder so I can't fix it unfortunately. ?
inflames91 said:
I've tried Akhil's repos and a cherry pick from ElixiumOS which brings in a blob called libgpustats.so in vendor/oneplus
I get stuck @17% with ninja giving an error with relation to something in audio-caf.
Something to do with audio_hw.c
I ain't no coder so I can't fix it unfortunately. ?
Click to expand...
Click to collapse
How did you go past the cm-api-stubs ???
Oh man, thanks for seperating this out.
1) I repo sync'd lineage-15.0
2) breakfast oneplus3
3) cloned/checked-out akhil's 3 repo's for device/kernel/vendor replacing what I already had
3a) Dont need repo pick for kryo-libc unless you wanna change main arch in device/boardconfig back to kryo (which is really what it should be)
3b) If you use stock device tree, you may need to edit some files to point to lineage files instead of cm (look at this commit: http://tinyurl.com/y6u844ah)
~4) I might have needed to pull libgpustats from my phone or op3t or something, don't remember on that.
Pretty sure at this point it builds up to ~3-10k files before you run into failures in hardware/qcom/audio, hardware/qcom/display, and hardware/qcom/media.
5) Delete the following folders in hardware/qcom:
audio/audio-caf/display/display-caf/media/media-caf
and clone dianlujitao 3 repo's(specify branch lineage-15.0): hardware/qcom/audio, hardware/qcom/display, and hardware/qcom/media
From here I can compile up to ~35k files before i get failure generating cache.img.
I haven't had time to go back through the error but it might just be a simple "not enough space" error at which point we just need to edit boardconfig to make it think it can have a larger cache img, but im not positive thats the issue/fix. And I havent had time to do anything else from here yet either. Will update when I know more.
After reading all these self test stories I myself tried to build again.
I got this for the first time today, never saw this last time I tried to build [The line in RED]:
Code:
[email protected]:~/Android/AOSP/LineageOS15$ source build/envsetup.sh
including device/generic/car/car-arm64/vendorsetup.sh
including device/generic/car/car-armv7-a-neon/vendorsetup.sh
including device/generic/car/car-x86_64/vendorsetup.sh
including device/generic/car/car-x86/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including vendor/lineage/vendorsetup.sh
including sdk/bash_completion/adb.bash
[email protected]:~/Android/AOSP/LineageOS15$ brunch oneplus3
including vendor/lineage/vendorsetup.sh
[COLOR=Red][B]Trying dependencies-only mode on a non-existing device tree?[/B][/COLOR]
Any idea if this will cause any issue or not.
Magnum828 said:
How did you go past the cm-api-stubs ???
Click to expand...
Click to collapse
I was getting errors for libgpustats.
Solved that bit. ?
arnabJ said:
After reading all these self test stories I myself tried to build again.
I got this for the first time today, never saw this last time I tried to build [The line in RED]:
Code:
[email protected]:~/Android/AOSP/LineageOS15$ source build/envsetup.sh
including device/generic/car/car-arm64/vendorsetup.sh
including device/generic/car/car-armv7-a-neon/vendorsetup.sh
including device/generic/car/car-x86_64/vendorsetup.sh
including device/generic/car/car-x86/vendorsetup.sh
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including vendor/lineage/vendorsetup.sh
including sdk/bash_completion/adb.bash
[email protected]:~/Android/AOSP/LineageOS15$ brunch oneplus3
including vendor/lineage/vendorsetup.sh
[COLOR=Red][B]Trying dependencies-only mode on a non-existing device tree?[/B][/COLOR]
Any idea if this will cause any issue or not.
Click to expand...
Click to collapse
no that 'dependencies-only' notification has no real bearing on the issues that are being seen with building.
Update 1:
Bad luck. I too got stuck at making cache.img.
I got printname too large error. Probably cache.img size error as stated by @HolyAngel.
I have approximately 250GB of free HDD space left just in case it may be of some help to know.
I will now try to search for such an issue and try to fix if I get some fix related to it.
If someone knows anything regarding this and can shed some light on how to get past this it would be really appreciated.
Heres the whole error message:
Code:
14 warnings generated.
[ 55% 46381/83932] Target cache fs image: /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img
FAILED: /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img
/bin/bash -c "(mkdir -p /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache ) && (mkdir -p /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates && rm -rf /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"ext_mkuserimg=mkuserimg.sh\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"fs_type=ext4\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"system_size=3154116608\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"userdata_size=57436708864\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"cache_fs_type=f2fs\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"cache_size=268435456\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"extfs_sparse_flag=-s\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"squashfs_sparse_flag=-s\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"selinux_fc=/home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"skip_fsck=true\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (PATH=/home/arnabj/Android/AOSP/LineageOS15/out/host/linux-x86/bin/:\$PATH ./build/tools/releasetools/build_image.py /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/system ) && (size=\$(for i in /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img; do stat --format \"%s\" \"\$i\" | tr -d '\\n'; echo +; done; echo 0); total=\$(( \$( echo \"\$size\" ) )); printname=\$(echo -n \"/home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img\" | tr \" \" +); img_blocksize=270336; twoblocks=\$((img_blocksize * 2)); onepct=\$(((((276824064 / 100) - 1) / img_blocksize + 1) * img_blocksize)); reserve=\$((twoblocks > onepct ? twoblocks : onepct)); maxsize=\$((276824064 - reserve)); echo \"\$printname maxsize=\$maxsize blocksize=\$img_blocksize total=\$total reserve=\$reserve\"; if [ \"\$total\" -gt \"\$maxsize\" ]; then echo \"error: \$printname too large (\$total > [276824064 - \$reserve])\"; false; elif [ \"\$total\" -gt \$((maxsize - 32768)) ]; then echo \"WARNING: \$printname approaching size limit (\$total now; limit \$maxsize)\"; fi )"
error: failed to build /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img from /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache
Running: mkf2fsuserimg.sh /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img 268435456
in mkf2fsuserimg.sh PATH=/home/arnabj/Android/AOSP/LineageOS15/out/host/linux-x86/bin/:/usr/lib/jvm/java-8-openjdk-amd64/bin:/home/arnabj/Android/AOSP/LineageOS15/out/soong/host/linux-x86/bin:/home/arnabj/Android/AOSP/LineageOS15/out/host/linux-x86/bin:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/arnabj/Android/AOSP/LineageOS15/development/scripts:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/devtools/tools:/home/arnabj/Android/AOSP/LineageOS15/external/selinux/prebuilts/bin:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/android-emulator/linux-x86_64:/home/arnabj/bin:/home/arnabj/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
make_f2fs -l 268435456 /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img
[ 55% 46386/83932] ld /home/arnabj/Android/AOSP/LineageOS15/out/soong/.intermediates/external/protobuf/aprotoc/linux_x86_64/aprotoc
ninja: build stopped: subcommand failed.
15:58:23 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
make: Leaving directory '/home/arnabj/Android/AOSP/LineageOS15'
#### make failed to build some targets (04:37:46 (hh:mm:ss)) ####
Original:
Just an update.
Hoping for the best.
I am using Akhilnarang's device sources (kernel & vendor included).
I have replaced hardware_qcom_xyz / hardware_qcom_xyz-caf with hardware_qcom_xyz from Official LineageOS repo instead of that from dianlujitao as posted by HolyAngel.
Also I have cherry picked the required commit in vendor/oneplus3 as stated by inflames91.
The build is under process.
I am already at 52% with 44333 files out of 83932.
As per HolyAngel he/she got stuck at ~35k lines.
I am currently at ~45k lines.
Which is surely better.
I am completely noob on all these things.
I am just reading through different guides and posts here to try to build.
Wish me luck and give suggestions if you think it will be useful for me.
Sent from my OnePlus3 using XDA Labs
arnabJ said:
Update 1:
Bad luck. I too got stuck at making cache.img.
I got printname too large error. Probably cache.img size error as stated by @HolyAngel.
I have approximately 250GB of free HDD space left just in case it may be of some help to know.
I will now try to search for such an issue and try to fix if I get some fix related to it.
If someone knows anything regarding this and can shed some light on how to get past this it would be really appreciated.
Heres the whole error message:
Code:
14 warnings generated.
[ 55% 46381/83932] Target cache fs image: /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img
FAILED: /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img
/bin/bash -c "(mkdir -p /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache ) && (mkdir -p /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates && rm -rf /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"ext_mkuserimg=mkuserimg.sh\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"fs_type=ext4\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"system_size=3154116608\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"userdata_size=57436708864\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"cache_fs_type=f2fs\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"cache_size=268435456\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"extfs_sparse_flag=-s\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"squashfs_sparse_flag=-s\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"selinux_fc=/home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/ETC/file_contexts.bin_intermediates/file_contexts.bin\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (echo \"skip_fsck=true\" >> /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt ) && (PATH=/home/arnabj/Android/AOSP/LineageOS15/out/host/linux-x86/bin/:\$PATH ./build/tools/releasetools/build_image.py /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/obj/PACKAGING/cache_intermediates/cache_image_info.txt /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/system ) && (size=\$(for i in /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img; do stat --format \"%s\" \"\$i\" | tr -d '\\n'; echo +; done; echo 0); total=\$(( \$( echo \"\$size\" ) )); printname=\$(echo -n \"/home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img\" | tr \" \" +); img_blocksize=270336; twoblocks=\$((img_blocksize * 2)); onepct=\$(((((276824064 / 100) - 1) / img_blocksize + 1) * img_blocksize)); reserve=\$((twoblocks > onepct ? twoblocks : onepct)); maxsize=\$((276824064 - reserve)); echo \"\$printname maxsize=\$maxsize blocksize=\$img_blocksize total=\$total reserve=\$reserve\"; if [ \"\$total\" -gt \"\$maxsize\" ]; then echo \"error: \$printname too large (\$total > [276824064 - \$reserve])\"; false; elif [ \"\$total\" -gt \$((maxsize - 32768)) ]; then echo \"WARNING: \$printname approaching size limit (\$total now; limit \$maxsize)\"; fi )"
error: failed to build /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img from /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache
Running: mkf2fsuserimg.sh /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img 268435456
in mkf2fsuserimg.sh PATH=/home/arnabj/Android/AOSP/LineageOS15/out/host/linux-x86/bin/:/usr/lib/jvm/java-8-openjdk-amd64/bin:/home/arnabj/Android/AOSP/LineageOS15/out/soong/host/linux-x86/bin:/home/arnabj/Android/AOSP/LineageOS15/out/host/linux-x86/bin:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin:/home/arnabj/Android/AOSP/LineageOS15/development/scripts:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/devtools/tools:/home/arnabj/Android/AOSP/LineageOS15/external/selinux/prebuilts/bin:/home/arnabj/Android/AOSP/LineageOS15/prebuilts/android-emulator/linux-x86_64:/home/arnabj/bin:/home/arnabj/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
make_f2fs -l 268435456 /home/arnabj/Android/AOSP/LineageOS15/out/target/product/oneplus3/cache.img
[ 55% 46386/83932] ld /home/arnabj/Android/AOSP/LineageOS15/out/soong/.intermediates/external/protobuf/aprotoc/linux_x86_64/aprotoc
ninja: build stopped: subcommand failed.
15:58:23 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
make: Leaving directory '/home/arnabj/Android/AOSP/LineageOS15'
#### make failed to build some targets (04:37:46 (hh:mm:ss)) ####
Original:
Just an update.
Hoping for the best.
I am using Akhilnarang's device sources (kernel & vendor included).
I have replaced hardware_qcom_xyz / hardware_qcom_xyz-caf with hardware_qcom_xyz from Official LineageOS repo instead of that from dianlujitao as posted by HolyAngel.
Also I have cherry picked the required commit in vendor/oneplus3 as stated by inflames91.
The build is under process.
I am already at 52% with 44333 files out of 83932.
As per HolyAngel he/she got stuck at ~35k lines.
I am currently at ~45k lines.
Which is surely better.
I am completely noob on all these things.
I am just reading through different guides and posts here to try to build.
Wish me luck and give suggestions if you think it will be useful for me.
Sent from my OnePlus3 using XDA Labs
Click to expand...
Click to collapse
Have you tried commenting out "BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := f2fs" from device/oneplus/oneplus3/BoardConfig.mk?
This might be out of the question and implausible, and possibly would break something, but seeing that you're failing at F2FS cacheimage generation, it might be worth trying. I have never encountered such error, but then again, I hacked around the device tree a bit too much and may have accidentally "fixed" the error myself.
F4uzan said:
Update 1:
Bad luck. I too got stuck at making cache.img.
I got printname too large error. Probably cache.img size error as stated by @HolyAngel.
I have approximately 250GB of free HDD space left just in case it may be of some help to know.
I will now try to search for such an issue and try to fix if I get some fix related to it.
If someone knows anything regarding this and can shed some light on how to get past this it would be really appreciated.
Heres the whole error message:
Have you tried commenting out "BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := f2fs" from device/oneplus/oneplus3/BoardConfig.mk?
This might be out of the question and implausible, and possibly would break something, but seeing that you're failing at F2FS cacheimage generation, it might be worth trying. I have never encountered such error, but then again, I hacked around the device tree a bit too much and may have accidentally "fixed" the error myself.
Click to expand...
Click to collapse
Ok I will try that later tonight.
Also commenting it will be better or changing it to ext4?
Also should I start rebuild from where it got stuck or should I first delete the out directory and start fresh?
___________________________________________
Were you able to complete a working build?
If yes why not share your working device tree?
Sent from my OnePlus3 using XDA Labs
arnabJ said:
Ok I will try that later tonight.
Also commenting it will be better or changing it to ext4?
Also should I start rebuild from where it got stuck or should I first delete the out directory and start fresh?
___________________________________________
Were you able to complete a working build?
If yes why not share your working device tree?
Sent from my OnePlus3 using XDA Labs
Click to expand...
Click to collapse
I haven't tried changing it to EXT4 as I just pieced two and two together and came up with an amateurish solution. Commenting it out would be better, seeing that plenty of device tree doesn't seem to have that specific line anyway.
As for the out directory, I think building dirty is fine but should you encounter an issue, it'd be better if you do a make clean or something to that effect.
Device tree? My device tree has not been updated for about weeks now and most of the solutions there are either hacks or dirty workarounds. And as I have said before, my build compiles but it doesn't boot; I have tried building AOSP and Lineage (which does compiles) but sadly none of them boot. I suspect this is the cause of the device tree which I have hacked around.
F4uzan said:
I haven't tried changing it to EXT4 as I just pieced two and two together and came up with an amateurish solution. Commenting it out would be better, seeing that plenty of device tree doesn't seem to have that specific line anyway.
As for the out directory, I think building dirty is fine but should you encounter an issue, it'd be better if you do a make clean or something to that effect.
Device tree? My device tree has not been updated for about weeks now and most of the solutions there are either hacks or dirty workarounds. And as I have said before, my build compiles but it doesn't boot; I have tried building AOSP and Lineage (which does compiles) but sadly none of them boot. I suspect this is the cause of the device tree which I have hacked around.
Click to expand...
Click to collapse
Ok. I will update with new info when I have any.
Sent from my OnePlus3 using XDA Labs
I changed
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := F2FS
to
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
in boardconfig and cache builds fine now. still compiling. will update when i know more.
IT BUILDS! Got output zip, will upload here for testing.
---------- Post added at 08:31 AM ---------- Previous post was at 08:04 AM ----------
https://drive.google.com/open?id=0B7UqGxB-q5f3VVh1d3dkUjI1Rm8
that is link, haven't tried it, have authentication apps i need to backup first
HolyAngel said:
I changed
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := F2FS
to
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := EXT4
in boardconfig and cache builds fine now. still compiling. will update when i know more.
IT BUILDS! Got output zip, will upload here for testing.
---------- Post added at 08:31 AM ---------- Previous post was at 08:04 AM ----------
https://drive.google.com/open?id=0B7UqGxB-q5f3VVh1d3dkUjI1Rm8
that is link, haven't tried it, have authentication apps i need to backup first
Click to expand...
Click to collapse
I did exactly what you did and it compiled successfully.
However, it did not boot into system.
Booted to bootloader.
I used Sultan's kernel as source though.
Maybe that's why?
inflames91 said:
I did exactly what you did and it compiled successfully.
However, it did not boot into system.
Booted to bootloader.
I used Sultan's kernel as source though.
Maybe that's why?
Click to expand...
Click to collapse
could possibly be kernel, i'm using akhilnarangs but haven't tried to boot it yet
HolyAngel said:
I changed
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := F2FS
to
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := EXT4
in boardconfig and cache builds fine now. still compiling. will update when i know more.
IT BUILDS! Got output zip, will upload here for testing.
---------- Post added at 08:31 AM ---------- Previous post was at 08:04 AM ----------
https://drive.google.com/open?id=0B7UqGxB-q5f3VVh1d3dkUjI1Rm8
that is link, haven't tried it, have authentication apps i need to backup first
Click to expand...
Click to collapse
Does this boot?

a530_zap-pro.b00 Missing - Trying to build Lineage OS 15.1

I was following the official guide to building Lineage OS 15.1 for Oneplus 3T but when I executed "extract-files.sh" I got error with some files being missing.Ignoring that, when I ran brunch oneplus3 I got:
Code:
[1060/1060] including ./vendor/qcom/opensource/rcs-service/Android.mk ...
ninja: error: 'vendor/oneplus/oneplus3/proprietary/vendor/firmware/a530_zap-pro.b00', needed by '/home/user/Desktop/lineage/out/target/product/oneplus3/system/vendor/firmware/a530_zap-pro.b00', missing and no known rule to make it
20:25:42 ninja failed with: exit status 1
but I have checked with Root Browser and can say for sure that "a530_zap-pro.b00" file does not exist Anyone who has compiled Lineage OS before can you please tell how did you get it to work as the files don't exist. I'm currently on Oxygen OS Open Beta 24 with Magisk 16.3.
DelicatePanda said:
I was following the official guide to building Lineage OS 15.1 for Oneplus 3T but when I executed "extract-files.sh" I got error with some files being missing.Ignoring that, when I ran brunch oneplus3 I got:
Code:
[1060/1060] including ./vendor/qcom/opensource/rcs-service/Android.mk ...
ninja: error: 'vendor/oneplus/oneplus3/proprietary/vendor/firmware/a530_zap-pro.b00', needed by '/home/user/Desktop/lineage/out/target/product/oneplus3/system/vendor/firmware/a530_zap-pro.b00', missing and no known rule to make it
20:25:42 ninja failed with: exit status 1
but I have checked with Root Browser and can say for sure that "a530_zap-pro.b00" file does not exist Anyone who has compiled Lineage OS before can you please tell how did you get it to work as the files don't exist. I'm currently on Oxygen OS Open Beta 24 with Magisk 16.3.
Click to expand...
Click to collapse
Put this in your local_manifest/roomservice.xml file :
<project path="vendor/oneplus" name="TheMuppet/proprietary_vendor_oneplus" revision="lineage=15.1" />
Click to expand...
Click to collapse
and then do a `repo sync`. This repo wll add all mandatory files (files which are extracted by the `extract-files.sh' tool) to your build tree.
casual_kikoo said:
Put this in your local_manifest/roomservice.xml file :
and then do a `repo sync`. This repo wll add all mandatory files (files which are extracted by the `extract-files.sh' tool) to your build tree.
Click to expand...
Click to collapse
Thank you for that but I was curious about how those files were obtained. And now I'm having another error:
Code:
make[1]: Leaving directory '/home/user/Desktop/lineage/out/target/product/oneplus3/obj/KERNEL_OBJ'
make: Leaving directory '/home/user/Desktop/lineage/kernel/oneplus/msm8996'
Building DTBs
make: Entering directory '/home/user/Desktop/lineage/kernel/oneplus/msm8996'
make[1]: Entering directory '/home/user/Desktop/lineage/out/target/product/oneplus3/obj/KERNEL_OBJ'
CHK include/config/kernel.release
GEN ./Makefile
CHK include/generated/uapi/linux/version.h
Using /home/user/Desktop/lineage/kernel/oneplus/msm8996 as source for kernel
CHK include/generated/utsrelease.h
CALL /home/user/Desktop/lineage/kernel/oneplus/msm8996/scripts/checksyscalls.sh
make[2]: 'include/generated/vdso-offsets.h' is up to date.
make[1]: Leaving directory '/home/user/Desktop/lineage/out/target/product/oneplus3/obj/KERNEL_OBJ'
make: Leaving directory '/home/user/Desktop/lineage/kernel/oneplus/msm8996'
ninja: build stopped: subcommand failed.
20:21:02 ninja failed with: exit status 1
DelicatePanda said:
Thank you for that but I was curious about how those files were obtained. And now I'm having another error:
Code:
make[1]: Leaving directory '/home/user/Desktop/lineage/out/target/product/oneplus3/obj/KERNEL_OBJ'
make: Leaving directory '/home/user/Desktop/lineage/kernel/oneplus/msm8996'
Building DTBs
make: Entering directory '/home/user/Desktop/lineage/kernel/oneplus/msm8996'
make[1]: Entering directory '/home/user/Desktop/lineage/out/target/product/oneplus3/obj/KERNEL_OBJ'
CHK include/config/kernel.release
GEN ./Makefile
CHK include/generated/uapi/linux/version.h
Using /home/user/Desktop/lineage/kernel/oneplus/msm8996 as source for kernel
CHK include/generated/utsrelease.h
CALL /home/user/Desktop/lineage/kernel/oneplus/msm8996/scripts/checksyscalls.sh
make[2]: 'include/generated/vdso-offsets.h' is up to date.
make[1]: Leaving directory '/home/user/Desktop/lineage/out/target/product/oneplus3/obj/KERNEL_OBJ'
make: Leaving directory '/home/user/Desktop/lineage/kernel/oneplus/msm8996'
ninja: build stopped: subcommand failed.
20:21:02 ninja failed with: exit status 1
Click to expand...
Click to collapse
Your output is missing some information, there is no error in this, except
Code:
ninja: build stopped : subcommand failed
casual_kikoo said:
Your output is missing some information, there is no error in this, except
Code:
ninja: build stopped : subcommand failed
Click to expand...
Click to collapse
Sorry for the delay I am attaching the output of entire "brunch oneplus3" command to this and could you please tell me from where the files in the repo were obtained. Thanks for the help:highfive:
DelicatePanda said:
Sorry for the delay I am attaching the output of entire "brunch oneplus3" command to this and could you please tell me from where the files in the repo were obtained. Thanks for the help:highfive:
Click to expand...
Click to collapse
You have some problem with jack-server :
FAILED: setup-jack-server
/bin/bash -c "(prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar 2>&1 || (exit 0) ) && (JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx2G" prebuilts/sdk/tools/jack-admin start-server 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update server prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar 4.11.ALPHA 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-4.32.CANDIDATE.jar 4.32.CANDIDATE || exit 47 )"
Jack server already installed in "/home/user/.jack-server"
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx2G -cp /home/user/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher
Jack server failed to (re)start, try 'jack-diagnose' or see Jack server log
No Jack server running. Try 'jack-admin start-server'
No Jack server running. Try 'jack-admin start-server'
Click to expand...
Click to collapse
In the root of your Android build directory
Code:
prebuilts/sdk/tools/jack-admin start-server
and then, straight after starting jack-server, relaunch your build process.
Also, judging from the log, jack-server is launching with 2G of RAM, which is very low IMO. If you have a low end PC, check this XDA thread, which explains you how to use Google Cloud for free to build ROM.
If you still have issues with jack-server, check this build guide by @nathanchance : there is a part about jack-server memory's problem (Ctrl + F -> "Jack issues").
Also, check a look at this Google Groups thread, this might help you.
Concerning TheMuppets : to be honest with you, I don't know exactly where files come from, BUT looking at commit messages on their Github, you can see, among others, that fourkbomb is pushing to this organization; a quick Google Search, you find his Github profile, he's a member of LineageOS. Also, you'll find a lot of ROMs builders TheMuppet' repo, so nothing to worry about (their repos are on Github, so you can check by yourself ).

How to compile Samsung S10 kernel for Exynos 9820?

I tried the following:
Download toolchain from https://android.googlesource.com/pl....9/+/e54105c9f893a376232e0fc539c0e7c01c829b1e
Download clang-4639204
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2
sudo apt-get install flex bison
sudo apt-get install libelf-dev
export CROSS_COMPILE=/home/gilius/Desktop/tool/bin/aarch64-linux-android-
export ARCH=arm64
enter the 9820 directory
sudo -i
make xynos9820-beyond2lte_defconfig
make -j10
Am getting the following errors:
Code:
arch/arm64/Makefile:27: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum
arch/arm64/Makefile:57: Detected assembler with broken .inst; disassembly will be unreliable
../PLATFORM/prebuilts/clang/host/linux-x86/clang-4639204/bin/clang.real: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
../PLATFORM/prebuilts/clang/host/linux-x86/clang-4639204/bin/clang.real: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
../PLATFORM/prebuilts/clang/host/linux-x86/clang-4639204/bin/clang.real: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
../PLATFORM/prebuilts/clang/host/linux-x86/clang-4639204/bin/clang.real: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
CHK include/config/kernel.release
../PLATFORM/prebuilts/clang/host/linux-x86/clang-4639204/bin/clang.real: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
make: *** [Makefile:1244: prepare-compiler-check] Error 1
make: *** Waiting for unfinished jobs....
Hi,
for me : sudo ln -s /usr/lib/libtinfo.so /usr/lib/libtinfo.so.5 did the trick but I am now stuck with some assembly instructions "not existing" errors when compiling arch/arm64/kernel/vdso/gettimeofday.S
did you made any progress?
Update : linking libtinfo.so.6 to libtinfo.so.5 solved it but also failed with :
scripts/selinux/genheaders/genheaders.c:19:
./security/selinux/include/classmap.h:251:2: erreur: #error New address family defined, please update secclass_map.
251 | #error New address family defined, please update secclass_map.
| ^~~~~
make[3]: *** [scripts/Makefile.host:102: scripts/selinux/genheaders/genheaders] Error 1
make[2]: *** [scripts/Makefile.build:673: scripts/selinux/genheaders] Error 2
make[1]: *** [scripts/Makefile.build:673: scripts/selinux] Error 2
make: *** [Makefile:607: scripts] Error 2
I am currently trying it on archlinux and the ncurses5-compat-libs package didn't put a new library in my path I will try later on another distro see if it's just a library error.
Update 2 :
Compiled fine using rhel 8, I had to install ncurses compat libs and create a symbolic link from python2 to python in my $PATH.
Does it boot?
Does your kernel boot?
Mine, keep stuck at Samsung logo
Akugila said:
Does your kernel boot?
Mine, keep stuck at Samsung logo
Click to expand...
Click to collapse
Non, I can't even go further the unlocked warning screen, but my repacking of the image is wrong, my new image is always lighter than the original, I am using magiskboot to do it. How are you doing it ?
try AIK
shmsh9 said:
Non, I can't even go further the unlocked warning screen, but my repacking of the image is wrong, my new image is always lighter than the original, I am using magiskboot to do it. How are you doing it ?
Click to expand...
Click to collapse
Ahh, fool me. it's stuck at warning screen too (forgot there are another samsung logo during boot)
I use AIK [https://forum.xda-developers.com/showthread.php?t=2073775] for packing, the size is the same with original (I use "Image" file)
kernel build error: expected parameter declarator
Did you get these compilation errors?
In file included from kernel/bounds.c:10:
In file included from ./include/linux/page-flags.h:10:
In file included from ./include/linux/bug.h:5:
In file included from ./arch/arm64/include/asm/bug.h:37:
In file included from ./include/asm-generic/bug.h:16:
In file included from ./include/linux/kernel.h:14:
./include/linux/printk.h:149:24: error: expected parameter declarator
static inline __printf(1, 2) __cold
^
./include/linux/printk.h:149:24: error: expected ')'
./include/linux/printk.h:149:23: note: to match this '('
static inline __printf(1, 2) __cold
^
./include/linux/printk.h:149:23: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
static inline __printf(1, 2) __cold
^
void
./include/linux/printk.h:149:29: error: expected ';' after top level declarator
static inline __printf(1, 2) __cold
^
Linaro 4.9.4 aarch64-linux-gnu compiler tools for S10 5G kernel build
floor51 said:
Did you get these compilation errors?
In file included from kernel/bounds.c:10:
In file included from ./include/linux/page-flags.h:10:
In file included from ./include/linux/bug.h:5:
In file included from ./arch/arm64/include/asm/bug.h:37:
In file included from ./include/asm-generic/bug.h:16:
In file included from ./include/linux/kernel.h:14:
./include/linux/printk.h:149:24: error: expected parameter declarator
static inline __printf(1, 2) __cold
^
./include/linux/printk.h:149:24: error: expected ')'
./include/linux/printk.h:149:23: note: to match this '('
static inline __printf(1, 2) __cold
^
./include/linux/printk.h:149:23: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
static inline __printf(1, 2) __cold
^
void
./include/linux/printk.h:149:29: error: expected ';' after top level declarator
static inline __printf(1, 2) __cold
^
Click to expand...
Click to collapse
I found that using the Linaro 4.9.4 aarch64-linux-gnu compiler tools solved this:
https://releases.linaro.org/compone...4.9.4-2017.01-x86_64_aarch64-linux-gnu.tar.xz
I was previously using the toolchain that is in ianmacd's github repo here:
https://github.com/ianmacd/beyond2l...p/gcc-cfp-jopp-only/aarch64-linux-android-4.9
I changed this:
#CROSS_COMPILE ?= $(srctree)/toolchain/gcc-cfp/gcc-cfp-jopp-only/aarch64-linux-android-4.9/bin/aarch64-linux-android-
...to:
CROSS_COMPILE ?= ~/dev/projects/android/kernel/gcc-linaro-4.9.4-2017.01-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
I also used Linaro for CLANG_TRIPLE.
And I used clang for CC:
CC = ~/dev/projects/android/kernel/clang-4639204/bin/clang
...from here:
https://android.googlesource.com/pl...archive/android-9.0.0_r1/clang-4639204.tar.gz
All that info would have helped me a lot anyway. Hope it helps someone. Not that I've tried the image on device yet.
Hey,
I have managed to build the kernel by following the instructions in the samsung readme.
Code:
$ export ANDROID_MAJOR_VERSION=p
$ make ARCH=arm64 exynos9820-d2s_defconfig
$ make ARCH=arm64
I end up with an Image file and Image.gz with the same Image file inside. I'm not sure if this has built correctly as people talk about being able to use Android kitchen or similar unpacker to unpack and repack the img file. With the Image file I receive it is incompatible with Android Kitchen and another Perl unpacker I have tried.
When you compile your kernel do you get an Image.img file? Or the same as me, just Image, and if so, how do you make it usable?
JPNZ4 said:
Hey,
I have managed to build the kernel by following the instructions in the samsung readme.
Code:
$ export ANDROID_MAJOR_VERSION=p
$ make ARCH=arm64 exynos9820-d2s_defconfig
$ make ARCH=arm64
I end up with an Image file and Image.gz with the same Image file inside. I'm not sure if this has built correctly as people talk about being able to use Android kitchen or similar unpacker to unpack and repack the img file. With the Image file I receive it is incompatible with Android Kitchen and another Perl unpacker I have tried.
When you compile your kernel do you get an Image.img file? Or the same as me, just Image, and if so, how do you make it usable?
Click to expand...
Click to collapse
glad to hear that you could build the kernel.
could you please elaborate which build env you used and which version?
make clean destroys my build env and i needed some patches to make it even compile in the first place.
could you run the kernel successfully on the device?

Categories

Resources