help - General PAC Discussion

using prebuilt boot.img from IMAGES...
boot size (19613696) is 58.45% of limit (33554432)
warning radio-update: no radio image in input target_files; not flashing radio
running: openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
running: java -Xmx2048m -jar /home/pranav18062001/roms/pac/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp
/tmpI0uIDc /home/pranav18062001/roms/pac/out/target/product/lettuce/pac_lettuce-ota-1cdea6516f.zip
done.
ln: failed to access ‘/home/pranav18062001/roms/pac/out/target/product/lettuce/pac_lettuce-ota-1cdea6516f.zip’: No such file or directory
build/core/Makefile:1759: recipe for target 'bacon' failed
make: *** [bacon] Error 1
#### make failed to build some targets (01:38:40 (hh:mm:ss)) ####

jasonhosu said:
using prebuilt boot.img from IMAGES...
boot size (19613696) is 58.45% of limit (33554432)
warning radio-update: no radio image in input target_files; not flashing radio
running: openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
running: java -Xmx2048m -jar /home/pranav18062001/roms/pac/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp
/tmpI0uIDc /home/pranav18062001/roms/pac/out/target/product/lettuce/pac_lettuce-ota-1cdea6516f.zip
done.
ln: failed to access ‘/home/pranav18062001/roms/pac/out/target/product/lettuce/pac_lettuce-ota-1cdea6516f.zip’: No such file or directory
build/core/Makefile:1759: recipe for target 'bacon' failed
make: *** [bacon] Error 1
#### make failed to build some targets (01:38:40 (hh:mm:ss)) ####
Click to expand...
Click to collapse
tried a lot still same

no dev to help
jasonhosu said:
using prebuilt boot.img from IMAGES...
boot size (19613696) is 58.45% of limit (33554432)
warning radio-update: no radio image in input target_files; not flashing radio
running: openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
running: java -Xmx2048m -jar /home/pranav18062001/roms/pac/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp
/tmpI0uIDc /home/pranav18062001/roms/pac/out/target/product/lettuce/pac_lettuce-ota-1cdea6516f.zip
done.
ln: failed to access ‘/home/pranav18062001/roms/pac/out/target/product/lettuce/pac_lettuce-ota-1cdea6516f.zip’: No such file or directory
build/core/Makefile:1759: recipe for target 'bacon' failed
make: *** [bacon] Error 1
#### make failed to build some targets (01:38:40 (hh:mm:ss)) ####
Click to expand...
Click to collapse
no dev to help me?

repo sync will help ?

jasonhosu said:
repo sync will help ?
Click to expand...
Click to collapse
Did you try make clean && make clobber?

Related

Compiling AOKP JellyBean from source

Hi,
I've been trying to build a rom from Lord ClockaN´s repo but I run into some issues when trying to embed the kernel.
I've done the following:
$ mkdir ~/src/android
$ cd ~/src/android
$ repo init -u git://github.com/IceColdJelly/platform_manifest.git -b jb
$ repo sync -j16
$ mkdir -p kernel/htc
$ cd kernel/htc
$ git clone git://github.com/TeamNDVRu/htc-kernel-endeavoru.git endeavoru
$ cd endeavoru
$ git checkout -b jellybean origin/jellybean
$ cd ~/src/android
$ cat device/htc/endeavoru/BoardConfig.mk | tail -3
# Kernel building
TARGET_KERNEL_SOURCE := kernel/htc/endeavoru
TARGET_KERNEL_CONFIG := arch/arm/configs/endeavoru_android_config
I copied the kernel config from my running IceColdJelly 0.3 to endeavoru_android_config
Within BoardConfig.mk, I changed endeavoru_android_defconfig to arch/arm/configs/endeavoru_android_config
$ . build/envsetup.sh
$ lunch aokp_endeavoru-userdebug
$ make bacon (or mka)
...
make -f /home/archv/src/android/kernel/htc/endeavoru/Makefile silentoldconfig
make -f /home/archv/src/android/kernel/htc/endeavoru/scripts/Makefile.build obj=scripts/basic
rm -f .tmp_quiet_recordmcount
ln -fsn /home/archv/src/android/kernel/htc/endeavoru source
/bin/sh /home/archv/src/android/kernel/htc/endeavoru/scripts/mkmakefile \
/home/archv/src/android/kernel/htc/endeavoru /home/archv/src/android/out/target/product/endeavoru/obj/KERNEL_OBJ 2 6
GEN /home/archv/src/android/out/target/product/endeavoru/obj/KERNEL_OBJ/Makefile
mkdir -p include/linux include/config
make -f /home/archv/src/android/kernel/htc/endeavoru/scripts/Makefile.build obj=scripts/kconfig silentoldconfig
mkdir -p include/generated
scripts/kconfig/conf --silentoldconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[4]: *** [silentoldconfig] Error 1
make[3]: *** [silentoldconfig] Error 2
make[2]: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/archv/src/android/kernel/htc/endeavoru'
make: *** [TARGET_KERNEL_BINARIES] Error 2
I get this error whether I have the kernel already compiled or not.
What is the supposed way to correctly embed the kernel with the ROM image, keeping the source in sync with
the repo command, just like everything else?
do it the easy way and copy your endeavoru_android_config to <kernel_dir>/.config.
seadersn said:
do it the easy way and copy your endeavoru_android_config to <kernel_dir>/.config.
Click to expand...
Click to collapse
It doesn´t make any difference. I tried compiling the kernel before building the rom, hence the <kernel_dir>/.config
already exists but I get the same error.

[DEV ONLY]Xperia Z1 kernel building instructions

I think the time has come to share the info about kernel development we've been keeping for ourselves until now. just be sure to ready the complete thread and not just execute everything without thinking. I won't be responsible for any bricks etc.
Warnings!!
- Only start with a kernel if you are a developer with knowledge about kernel developping.
- Always use the specific dt.img build for your kernel!!!!! Very important!
- Don't complain if it doesn't work when you do something wrong!
== Information ==
Let's start with some info first.
MSM8974 needs something new to build a kernel, this is called a dt.img. This basically is an img file which holds information about the board pagesize, kernel version and some other kernel related things. You can only use a specific dt.img with a kernel, this file needs to be generated by a binary called dtbTool. This bin4ry can be found in the Cyanogen repo's or you can download a prebuild one in this thread.
== Compiling a kernel ==
I'll skip this part for now, every kernel dev should know this part maybe I'll add it later.
== Generating a dt.img ==
Basically you will only need your kernel sources and the dtbTool binary, then you need to generate it using a command like this:
Code:
./dtbTool -o ~/dt_files/dt.img -s 2048 -p ./scripts/dtc/ ./arch/arm/boot/
This seems very simple but it's quite important when building a kernel for MSM8974, or other S800 boards.
After this step has been completed you will find your dt.img in a folder callled dt_files, this folder should be in your home of linux now.
== Making the actual boot.img ==
After making the zImage and dt.img you need to have your ramdisk and an mkbootimg adapted for the dt.img to make a booting/working kernel for our rhine board.
be sure the naming of your files is correct:
- zImage
- dt.img
- intrd.img for your ramdisk
You can generate it by using the following command:
Code:
./mkbootimg --base 0x00000000 --kernel zImage --ramdisk_offset 0x02000000 --tags_offset 0x01E00000 --pagesize 2048 --cmdline "androidboot.hardware=qcom user_debug=31 maxcpus=2 msm_rtb.filter=0x3F ehci-hcd.park=3 msm_rtb.enable=0 lpj=192598 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y" --ramdisk initrd.img --dt dt.img -o boot.img
Let's get kernel development started for everyone!
== Extra ==
If you like my work consider donating me a beer
binary files attached
krabappel2548 said:
binary files attached
Click to expand...
Click to collapse
Awesome! Thanks! Will tinker around with it tonight!
@krabappel2548 : Thanks for the tutorial
I've been trying to compile the kernel using Linaro, and I'm constantly getting this error :
Code:
scripts/mod/empty.c:1: error: bad value (cortex-a15) for -mcpu= switch
kernel/bounds.c:1: error: bad value (cortex-a15) for -mcpu= switch
Could you please tell me what I am missing out on here?
Thanks
Pwng3 said:
@krabappel2548 : Thanks for the tutorial
I've been trying to compile the kernel using Linaro, and I'm constantly getting this error :
Code:
scripts/mod/empty.c:1: error: bad value (cortex-a15) for -mcpu= switch
kernel/bounds.c:1: error: bad value (cortex-a15) for -mcpu= switch
Could you please tell me what I am missing out on here?
Thanks
Click to expand...
Click to collapse
try this
https://github.com/faux123/Galaxy_Note_3/commit/8ad5dd6f969bb76ef970cbf101a255bb093efe5f
If you want to compil kernel, but with a full automation, you can use this script
"scriptZ1" : http://forum.xda-developers.com/attachment.php?attachmentid=2346163&stc=1&d=1382568778
With this script you have an automatic download/configuration (Toolchain, dtbTool, etc...)
You must go to $HOME, and "mkdir kernel"
cd kernel
unzip file (only 1 script) => scriptZ1
chmod 777 scriptZ1
./scriptZ1
Follow instructions
that's all
DooMLoRD said:
try this
https://github.com/faux123/Galaxy_Note_3/commit/8ad5dd6f969bb76ef970cbf101a255bb093efe5f
Click to expand...
Click to collapse
That resolved the issue. Thanks
Update :
I was getting this error :
Code:
ERROR: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
make[1]: *** [vmlinux.o] Error 1
make: *** [vmlinux.o] Error 2
So I went on to make the build with make CONFIG_DEBUG_SECTION_MISMATCH=y.
After which, when I tried generating the dt.img, I'm stuck up on this error that says :
Code:
Generating master DTB... error writing output file, please rerun: size mismatch 530432 vs -566
Could someone help please?
@krabappel2548
Hey,after repacking whole kernel I'm getting this error when I try to boot it:
Code:
fastboot boot boot.img
downloading 'boot.img'...
OKAY [ 0.319s]
booting...
FAILED (remote: dtb not found)
How do I create a dt.img? I always get Found 0 Unique dtbs.
Shoaib05 said:
How do I create a dt.img? I always get Found 0 Unique dtbs.
Click to expand...
Click to collapse
first download Doom-Lords kernel build tools
then copy dtbtool from msm8978aa folder in to you kernel source directory
then open terminal and cd to your kernel directory and enter these codes:
Code:
./dtbTool -o dt.img -s 2048 -p scripts/dtc/ arch/arm/boot/
instruction by DoomLord
Red-code said:
first download Doom-Lords kernel build tools
then copy dtbtool from msm8978aa folder in to you kernel source directory
then open terminal and cd to your kernel directory and enter these codes:
Code:
./dtbTool -o dt.img -s 2048 -p scripts/dtc/ arch/arm/boot/
instruction by DoomLord
Click to expand...
Click to collapse
Managed to get past it but now it is giving a size-mismatch error. :/
Shoaib05 said:
Managed to get past it but now it is giving a size-mismatch error. :/
Click to expand...
Click to collapse
Does this work? binary is x86_64
dt_dir is arch/arm/boot/ on 3.4 - arch/arm/boot/dts on 3.10
Code:
mkqcdtbootimg --kernel arch/arm/boot/zImage --ramdisk ramdisk.bz2 --base 0x00000000 --ramdisk_offset 0x02000000 --tags_offset 0x01E00000 --pagesize 2048 --cmdline "androidboot.hardware=qcom user_debug=31 maxcpus=2 msm_rtb.filter=0x3F ehci-hcd.park=3 msm_rtb.enable=0 lpj=192598 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y" --dt_dir arch/arm/boot/ -o boot-.img

[Q] Help with Compiling my First CM ROM

I am trying to compile my first CM rom for the m7vzw. I used http://wiki.cyanogenmod.org/w/Build_for_m7vzw as a tutorial.
My build does attempts to compile, but ends with this:
Code:
LZO
arch/arm/boot/compressed/piggy.lzo
/bin/sh: 1: lzop: not found
make[4]: *** [arch/arm/boot/compressed/piggy.lzo] Error 1
make[3]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make[2]: *** [zImage] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/*username*/android/system/kernel/htc/m7'
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
I have no idea where to start with this. I am new to building Roms and want to understand how I should go from here.
Thanks in Advance.
IamIronMan said:
I am trying to compile my first CM rom for the m7vzw. I used http://wiki.cyanogenmod.org/w/Build_for_m7vzw as a tutorial.
My build does attempts to compile, but ends with this:
Code:
LZO
arch/arm/boot/compressed/piggy.lzo
/bin/sh: 1: lzop: not found
make[4]: *** [arch/arm/boot/compressed/piggy.lzo] Error 1
make[3]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make[2]: *** [zImage] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/*username*/android/system/kernel/htc/m7'
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
I have no idea where to start with this. I am new to building Roms and want to understand how I should go from here.
Thanks in Advance.
Click to expand...
Click to collapse
I have only built kernels, but it seems you may want to try another compression type instead of lzo.
How should I go about doing that? I only have had a few tutorials. I have not been able to compile CM or PAC. I have moved my build setup to my desktop and am going to start from scratch.
I will be using the instructions from these two tutorials:
http://wiki.cyanogenmod.org/w/Build_for_m7vzw#Prepare_the_device-specific_code
http://forum.xda-developers.com/showthread.php?t=2223690
If anyone has any suggestions or tips let me know.
You need to install lzop (sudo apt-get install lzop) that should help you surpass the error.
IamIronMan said:
Here is the end snippet of my latest attempt at building CM-10.2 for m7vzw. I have no idea what I am doing wrong.
Code:
target Prebuilt: DroidSansArmenian.ttf (/home/ironman/android/cm-10.2/out/target/product/m7vzw/obj/ETC/DroidSansArmenian.ttf_intermediates/DroidSansArmenian.ttf)
target Prebuilt: DroidSansDevanagari-Regular.ttf (/home/ironman/android/cm-10.2/out/target/product/m7vzw/obj/ETC/DroidSansDevanagari-Regular.ttf_intermediates/DroidSansDevanagari-Regular.ttf)
target Prebuilt: DroidSansEthiopic-Regular.ttf (/home/ironman/android/cm-10.2/out/target/product/m7vzw/obj/ETC/DroidSansEthiopic-Regular.ttf_intermediates/DroidSansEthiopic-Regular.ttf)
target Prebuilt: DroidSansFallback.ttf (/home/ironman/android/cm-10.2/out/target/product/m7vzw/obj/ETC/DroidSansFallback.ttf_intermediates/DroidSansFallback.ttf)
make[2]: *** [arch/arm/mach-msm] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/ironman/android/cm-10.2/kernel/htc/m7'
make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....
target Prebuilt: DroidSansTamil-Regular.ttf (/home/ironman/android/cm-10.2/out/target/product/m7vzw/obj/ETC/DroidSansTamil-Regular.ttf_intermediates/DroidSansTamil-Regular.ttf)
EDIT: Turns out it was a java memory error. Did what was recommended below. On second build, got lzop error again. Currently trying to build again with santod040's suggestion above.
http://wiki.cyanogenmod.org/w/Build_for_m7vzw#If_the_build_breaks...
Click to expand...
Click to collapse
EDITx2: I successfully compiled cm-10.2 and installed it on my phone. It works great! Thank you for all your help!
Sorry for double post
So I have been trying to compile a PAC-man Rom. However, everytime I run "./build-pac.sh" It ends with this:
Code:
system_size = (int) 2348809216
tool_extensions = (str) device/htc/m7vzw/../common
userdata_size = (int) 27380416512
using device-specific extensions in device/htc/common
unable to load device-specific module; assuming none
building image from target_files BOOT...
running: mkbootfs -f /tmp/targetfiles-3Vfxa1/META/boot_filesystem_config.txt /tmp/targetfiles-3Vfxa1/BOOT/RAMDISK
running: minigzip
running: mkbootimg --kernel /tmp/targetfiles-3Vfxa1/BOOT/kernel --cmdline console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 --base 0x80600000 --pagesize 2048 --ramdisk_offset 0x01400000 --ramdisk /tmp/tmphX9a8v --output /tmp/tmpSA9Ntd
running: openssl pkcs8 -in build/target/product/security/testkey.pk8 -inform DER -nocrypt
running: java -Xmx2048m -jar /home/ironman/android/PAC-MAN/out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmp6VDlXw /home/ironman/android/PAC-MAN/out/target/product/m7vzw/pac_m7vzw-ota-bbf04d9f7d.zip
done.
Package Complete: /home/ironman/android/PAC-MAN/out/target/product/m7vzw/cm-10.2-20131112-UNOFFICIAL-m7vzw.zip
/home/ironman/android/PAC-MAN/out/target/product/m7vzw/pac_m7vzw-ota-eng.ironman.zip doesn't exist!
What is going on? I have tried to look back through and find any errors but were none.
Any ideas?

Can't compile Galaxy Note 3 Kernel

I am kinda new to kernel development. I need to rebuild the kernel I'm using ((http://forum.xda-developers.com/showthread.php?t=2480353) Compulsion Kernel) with loadable module support. I have also tried other kernels. I also tried using the "-i" flag on make, but the errors kept getting worse, until the whole compilation output was errors...
I keep getting errors from the console output. For example:
Code:
net/bluetooth/hci_conn.c: In function 'hci_le_ltk_reply':
net/bluetooth/hci_conn.c:406:28: warning: argument to 'sizeof' in 'memcpy' call is the same pointer type '__u8 *' as the destination; expected '__u8' or an explicit length [-Wsizeof-pointer-memaccess]
error, forbidden warning: hci_conn.c:406
make[2]: [net/bluetooth/hci_conn.o] Error 1
-Wsizeof-pointer-memaccess errors pop up very often.
There are also file not found errors:
Code:
arm-eabi-ld: error: cannot open net/bluetooth/hci_conn.o: No such file or directory
make[2]: [net/bluetooth/bluetooth.o] Error 1
LD net/bluetooth/built-in.o
arm-eabi-ld: error: cannot open net/bluetooth/bluetooth.o: No such file or directory
make[2]: [net/bluetooth/built-in.o] Error 1
CC net/bridge/br_input.o
Heres another example:
Code:
CC net/bridge/br_ioctl.o
arch/arm/mach-msm/board-8974-sec.c:569:13: warning: 'modem_power_off' defined but not used [-Wunused-function]
error, forbidden warning: board-8974-sec.c:569
make[1]: [arch/arm/mach-msm/board-8974-sec.o] Error 1
LD arch/arm/mach-msm/built-in.o
CC drivers/gpu/ion/ion_cma_heap.o
arm-eabi-ld: error: cannot open arch/arm/mach-msm/bam_dmux.o: No such file or directory
arm-eabi-ld: error: cannot open arch/arm/mach-msm/board-8974-sec.o: No such file or directory
System information:
I attached my .config file. It is the default from the Compulsion kernel.
Compile commands (in order):
Code:
export VARIANT_DEFCONFIG=msm8974_sec_defconfig ##I added this because it wont generate .config if this variable is empty...
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=/home/julian/android-toolchain-eabi/bin/arm-eabi-
git pull
make clean
make msm8974_sec_defconfig
make -j4
Operating system: Fresh install of Linux Mint 16 (Petra)
Build-related packages I installed with apt: git-core, gnupg, flex, bison, gperf, libsdl-dev, libesd0-dev, libwxgtk2.6-dev, build-essential, zip, curl, libncurses5-dev, zlib1g-dev, ia32-libs, lib32z1-dev, lib32ncurses5-dev, gcc-multilib, g++-multilib, and Adb
Toolchain:
Tried linaro, the android NDK from Google's website, and various other toolchains. Same error.
Output of "echo $PATH"
Code:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/julian/android-toolchain-eabi/bin:/home/julian/androidkernel/N900T_Kernel
I think thats all the needed information
Thank you!
Your command for the configuration is incomplete. You need to type a command for the other files as well. Type this command "make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig".
djintrigue808 said:
Your command for the configuration is incomplete. You need to type a command for the other files as well. Type this command "make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig".
Click to expand...
Click to collapse
Still can't compile
No more file not found errors, but still getting:
Code:
arch/arm/mach-msm/bam_dmux.c: In function 'show_waketime':
arch/arm/mach-msm/bam_dmux.c:2440:29: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: bam_dmux.c:2440
make[1]: *** [arch/arm/mach-msm/bam_dmux.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
make: *** Waiting for unfinished jobs....
My compile script (easier then entering commands...)
#!/bin/bash
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
if [[ "$PATH" == *"/home/julian/android-toolchain-eabi/bin"* ]]; then
echo "PATH Contains toolchain"
else
export PATH=$PATH:/home/julian/android-toolchain-eabi/bin
echo "Toolchain added to PATH!"
fi
git pull
make clean -j4
echo "Building config..."
sleep 2
make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig -j4
sleep 1
read -p "Customize config? (Y/N): " yesno
if [ "$yesno" == "Y" ]; then
make menuconfig -j4
make -j4
else
make -j4
fi
Thank you!
Julian90090 said:
Still can't compile
No more file not found errors, but still getting:
Code:
arch/arm/mach-msm/bam_dmux.c: In function 'show_waketime':
arch/arm/mach-msm/bam_dmux.c:2440:29: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: bam_dmux.c:2440
make[1]: *** [arch/arm/mach-msm/bam_dmux.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
make: *** Waiting for unfinished jobs....
My compile script (easier then entering commands...)
#!/bin/bash
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
if [[ "$PATH" == *"/home/julian/android-toolchain-eabi/bin"* ]]; then
echo "PATH Contains toolchain"
else
export PATH=$PATH:/home/julian/android-toolchain-eabi/bin
echo "Toolchain added to PATH!"
fi
git pull
make clean -j4
echo "Building config..."
sleep 2
make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig -j4
sleep 1
read -p "Customize config? (Y/N): " yesno
if [ "$yesno" == "Y" ]; then
make menuconfig -j4
make -j4
else
make -j4
fi
Thank you!
Click to expand...
Click to collapse
Ok so I was messing around and decided to fix the -Wsizeof-pointer-memaccess errors. I opened bam_dmux.c and changed the line
Code:
return snprintf(buf, sizeof(buf), "%u\n", wakelock_timeout);
to
Code:
return snprintf(buf, (int)sizeof(buf), "%u\n", wakelock_timeout);
The kernel compiles now, but when I flash it to my device (mkbootimg), I get a ODIN message saying regular boot failed...
MORE UPDATES:
Tried flashing plain zImage in tar with ODIN, got a "unsupport dev_type" error on the device.
I fixed all the compile errors. I changed cross compilers to arm linux gnueabihf 4.7. There is still the task of getting the kernel on the device though... Thanks in advance!
EDIT AGAIN: Still can't get it to boot. Tried compiling stock kernel, leankernel, and Saber kernel. All same result after packing zImage and flashing with flashable zip...
Using repack-zImage.sh, I get a "gunzip result is oscillating between 'too small' and 'too large' at size: 7836575 7836576 7836577 7836578" error. There are no compile errors with any of the kernels. I attached my "finished" stock kernel flashable zip (doesn't work). I heard something about a mismatch between gzip and lzop... *feeling determined*
Any ideas?
EDIT:
Compile warnings about swp{b} although swp emulation is enabled in config. I still can't figure out how to get the zImage to work correctly on my device. I swapped the zImage out of the Saber kernel install zip boot.img and put my own in, flashed with TWRP, device doesn't boot until I go back and install the original kernel.
Julian90090 said:
Still can't compile
No more file not found errors, but still getting:
Code:
arch/arm/mach-msm/bam_dmux.c: In function 'show_waketime':
arch/arm/mach-msm/bam_dmux.c:2440:29: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: bam_dmux.c:2440
make[1]: *** [arch/arm/mach-msm/bam_dmux.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
make: *** Waiting for unfinished jobs....
My compile script (easier then entering commands...)
#!/bin/bash
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
if [[ "$PATH" == *"/home/julian/android-toolchain-eabi/bin"* ]]; then
echo "PATH Contains toolchain"
else
export PATH=$PATH:/home/julian/android-toolchain-eabi/bin
echo "Toolchain added to PATH!"
fi
git pull
make clean -j4
echo "Building config..."
sleep 2
make msm8974_sec_defconfig VARIANT_DEFCONFIG=msm8974_sec_hltetmo_defconfig DEBUG_DEFCONFIG= SELINUX_DEFCONFIG=selinux_defconfig SELINUX_LOG_DEFCONFIG=selinux_log_defconfig TIMA_DEFCONFIG=tima_defconfig -j4
sleep 1
read -p "Customize config? (Y/N): " yesno
if [ "$yesno" == "Y" ]; then
make menuconfig -j4
make -j4
else
make -j4
fi
Thank you!
Click to expand...
Click to collapse
Please ignore if irrelevant or ignorant. I'm in my infancy and still grasping the basics.
My environment is quite different than yours, on a Mac and using a Sprint note 3, but I came across this thread with the same compiler error using the 4.8 tools in the NDK. If I use 4.6 gcc I make it pretty far into the compilation process before error (failing @net/netfilter/xt_TCPMSS.c). However, using 4.8 gave me the same error as you:
Code:
arch/arm/mach-msm/bam_dmux.c: In function 'show_waketime':
arch/arm/mach-msm/bam_dmux.c:2440:29: warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: bam_dmux.c:2440
make[1]: *** [arch/arm/mach-msm/bam_dmux.o] Error 1
make: *** [arch/arm/mach-msm] Error 2
Here's the layout of my toolchains folder and my broken build file (looks like yours)
Code:
z:toolchains anon$ pwd
/Volumes/android/ndk/toolchains
z:toolchains anon$ ls arm-linux-androideabi-4.*/prebuilt/darwin-x86_64/arm-linux-androideabi/bin
arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/arm-linux-androideabi/bin:
ar c++ gcc ld.bfd ld.mcld objcopy ranlib
as g++ ld ld.gold nm objdump strip
arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/arm-linux-androideabi/bin:
ar c++ gcc ld.bfd ld.mcld objcopy ranlib
as g++ ld ld.gold nm objdump strip
Broken Make file edit:
Code:
CROSS_COMPILE ?= /Volumes/android/ndk/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-
Change to 4.6 for new compile error:
Code:
CROSS_COMPILE ?= /Volumes/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-
Made is a helluva lot father in the compilation process, but still won't compile correctly.
Code:
net/netfilter/xt_TCPMSS.c:50:8: warning: 'struct xt_tcpmss_info' declared inside parameter list [enabled by default]
error, forbidden warning: xt_TCPMSS.c:50
make[2]: *** [net/netfilter/xt_TCPMSS.o] Error 1
make[1]: *** [net/netfilter] Error 2
make: *** [net] Error 2
Got my NDK from here:
Code:
http://dl.google.com/android/ndk/android-ndk-r9c-darwin-x86_64.tar.bz2
I don't, yet, understand the differences between the versions. Not sure if this will be helpful, samsungs open source community page sure isn't very friendly.
Julian90090 said:
Ok so I was messing around and decided to fix the -Wsizeof-pointer-memaccess errors. I opened bam_dmux.c and changed the line
Code:
return snprintf(buf, sizeof(buf), "%u\n", wakelock_timeout);
to
Code:
return snprintf(buf, (int)sizeof(buf), "%u\n", wakelock_timeout);
The kernel compiles now, but when I flash it to my device (mkbootimg), I get a ODIN message saying regular boot failed...
MORE UPDATES:
Tried flashing plain zImage in tar with ODIN, got a "unsupport dev_type" error on the device.
I fixed all the compile errors. I changed cross compilers to arm linux gnueabihf 4.7. There is still the task of getting the kernel on the device though... Thanks in advance!
EDIT AGAIN: Still can't get it to boot. Tried compiling stock kernel, leankernel, and Saber kernel. All same result after packing zImage and flashing with flashable zip...
Using repack-zImage.sh, I get a "gunzip result is oscillating between 'too small' and 'too large' at size: 7836575 7836576 7836577 7836578" error. There are no compile errors with any of the kernels. I attached my "finished" stock kernel flashable zip (doesn't work). I heard something about a mismatch between gzip and lzop... *feeling determined*
Click to expand...
Click to collapse
I dunno if it is still relevant to you, but in your code change this
Code:
return snprintf(buf, sizeof(buf), "%u\n", wakelock_timeout);
to this
Code:
return snprintf(buf, sizeof([COLOR="Red"]*[/COLOR]buf), "%u\n", wakelock_timeout);
Do that for all the files you get error in.
This error is because the toolchain you are using is higher version than GCC 4.8.*
Use any lower GCC version toolchain and those changes are not needed.
If you want the newer cross compiler, You need to make the cnanges. I hope this helps...
Cheers!!!
daxgirl said:
I dunno if it is still relevant to you, but in your code change this
Code:
return snprintf(buf, sizeof(buf), "%u\n", wakelock_timeout);
to this
Code:
return snprintf(buf, sizeof([COLOR="Red"]*[/COLOR]buf), "%u\n", wakelock_timeout);
Do that for all the files you get error in.
This error is because the toolchain you are using is higher version than GCC 4.8.*
Use any lower GCC version toolchain and those changes are not needed.
If you want the newer cross compiler, You need to make the cnanges. I hope this helps...
Cheers!!!
Click to expand...
Click to collapse
I did the same thing; i.e. I added (int) to the line also. The compiler seems to be ok with it, but I have not installed it on a device yet. I actually see a number of these errors. Do you think there should be another fix for it perhaps? Did you findout anything else about this? I appreciate a reply.
sansari123 said:
I did the same thing; i.e. I added (int) to the line also. The compiler seems to be ok with it, but I have not installed it on a device yet. I actually see a number of these errors. Do you think there should be another fix for it perhaps? Did you findout anything else about this? I appreciate a reply.
Click to expand...
Click to collapse
Yeah there is another fix. You add flags to your makefile for the cross cimpiler to basically accept those. Since they are not errors. Than you can use any chain. I managed to compile on sabermod 4.10 a kernel for s5, which was giving me the same trouble. Once I upload my sources I will send you a link to the repo so you can tweak your makefile accordingly ?
Sent from my SM-G900F using Tapatalk
Thanks. The latest message I get is the following:
Code:
drivers/cpufreq/cpufreq_interactive.c: In function 'show_target_loads':
drivers/cpufreq/cpufreq_interactive.c:813:6: warning: operation on 'ret' may be undefined [-Wsequence-point]
error, forbidden warning: cpufreq_interactive.c:813
make[2]: *** [drivers/cpufreq/cpufreq_interactive.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
make: *** [drivers] Error 2
But this one is a warning also. I guess there is a flag for ignoring warning(s)? I'll wait to hear back from you.
daxgirl said:
Yeah there is another fix. You add flags to your makefile for the cross cimpiler to basically accept those. Since they are not errors. Than you can use any chain. I managed to compile on sabermod 4.10 a kernel for s5, which was giving me the same trouble. Once I upload my sources I will send you a link to the repo so you can tweak your makefile accordingly ?
Sent from my SM-G900F using Tapatalk
Click to expand...
Click to collapse
@daxgirl - I like to learn how to modify the flags. Did you find out which flags to modify by reading the Makefile documentation? I would really appreciate it if you tell me how I can learn which flags to modify and do it myself vs. copy your Makefile.

ninja: build stopped: subcommand failed.

I have been building LineageOS 15.1 for Samsung S6 and S6 Edge for a while without any real issues.
I am using my own 'zero' repo's that are duplicates of the ones available on the official LineageOS github repo with a few local fixes.
My build environment is an Ubuntu 16.04 VM. The build tools recently forced me to upgrade to Python 3.6.3 which I had to install manually.
Since then the build fails whilst compiling the Exynos7420 Kernel. The error message seems to vary but its always at the Exynos7420 kernel part.
I am building with my own certificates so the script is a little different from a standard LineageOS build:
Code:
source build/envsetup.sh
breakfast zeroltexx
mka target-files-package dist otatools
The last lines of the output and the error I got the last time:
Code:
[ 0% 2/93156] Generated: (/home/andy/android...ut/target/product/zeroltexx/android-info.txt)
FAILED: /home/andy/android/lineage/out/target/product/zeroltexx/android-info.txt
/bin/bash -c "(build/tools/check_radio_versions.py ) && (echo \"board=universal7420\" > /home/andy/android/lineage/out/target/product/zeroltexx/android-info.txt )"
File "build/tools/check_radio_versions.py", line 56
print "*** Error opening \"%s.sha1\"; can't verify %s" % (fn, key)
^
SyntaxError: invalid syntax
[ 0% 7/93156] Building Kernel Config
make: Entering directory '/home/andy/android/lineage/kernel/samsung/exynos7420'
GEN /home/andy/android/lineage/out/target/product/zeroltexx/obj/KERNEL_OBJ/Makefile
Kconfig:15:warning: environment variable ANDROID_MAJOR_VERSION undefined
arch/arm64/configs/lineageos_zeroltexx_defconfig:624:warning: override: reassigning to symbol INET_DIAG
#
# configuration written to .config
#
make: Leaving directory '/home/andy/android/lineage/kernel/samsung/exynos7420'
make: Entering directory '/home/andy/android/lineage/kernel/samsung/exynos7420'
GEN /home/andy/android/lineage/out/target/product/zeroltexx/obj/KERNEL_OBJ/Makefile
scripts/kconfig/conf --savedefconfig=defconfig Kconfig
Kconfig:15:warning: environment variable ANDROID_MAJOR_VERSION undefined
make: Leaving directory '/home/andy/android/lineage/kernel/samsung/exynos7420'
ninja: build stopped: subcommand failed.
19:27:22 ninja failed with: exit status 1
#### failed to build some targets (08:22 (mm:ss)) ####
Any pointers as to how I debug this? It must be something to do with the upgrade to python 3.6.3, however I am not skilled in the arts of scripting...
Cheers
Andy
If I clean everything out of the /out folder and re-run the commands it always fails at the same point:
Code:
FIPS : Generating hmac of fmp and updating vmlinux...
HMAC-SHA256(builtime_bytes.bin)= 5d384fe6b55f757aa0ef31391e8cbb5ffb947cd886235203f2690988f879aec8
FIPS : Generating hmac of crypto and updating vmlinux...
HMAC-SHA256(builtime_bytes.bin)= d6e18e7da3d688cd63ab5598991c05bd4c538f71d383fbe7e9f668f23d1e040a
OBJCOPY arch/arm64/boot/Image
make: Leaving directory '/home/andy/android/lineage/kernel/samsung/exynos7420'
Building DTBs
make: Entering directory '/home/andy/android/lineage/kernel/samsung/exynos7420'
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
make[2]: Nothing to be done for 'dtbs'.
make: Leaving directory '/home/andy/android/lineage/kernel/samsung/exynos7420'
Building Kernel Modules
make: Entering directory '/home/andy/android/lineage/kernel/samsung/exynos7420'
GEN /home/andy/android/lineage/out/target/product/zeroltexx/obj/KERNEL_OBJ/Makefile
CHK include/generated/uapi/linux/version.h
Using /home/andy/android/lineage/kernel/samsung/exynos7420 as source for kernel
CHK include/generated/utsrelease.h
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
CALL /home/andy/android/lineage/kernel/samsung/exynos7420/scripts/checksyscalls.sh
HOSTLD scripts/mod/modpost
Building modules, stage 2.
MODPOST 0 modules
/home/andy/android/lineage/kernel/samsung/exynos7420/scripts/Makefile.fwinst:45: target '/lib/firmware/tsp_stm/stm_z1.fw' given more than once in the same rule
/home/andy/android/lineage/kernel/samsung/exynos7420/scripts/Makefile.fwinst:45: target '/lib/firmware/abov/abov_valley.fw' given more than once in the same rule
make: Leaving directory '/home/andy/android/lineage/kernel/samsung/exynos7420'
ninja: build stopped: subcommand failed.
23:05:52 ninja failed with: exit status 1
#### failed to build some targets (17:53 (mm:ss)) ####
Anyone?
ADB100 said:
If I clean everything out of the /out folder and re-run the commands it always fails at the same point:
Code:
FIPS : Generating hmac of fmp and updating vmlinux...
HMAC-SHA256(builtime_bytes.bin)= 5d384fe6b55f757aa0ef31391e8cbb5ffb947cd886235203f2690988f879aec8
FIPS : Generating hmac of crypto and updating vmlinux...
HMAC-SHA256(builtime_bytes.bin)= d6e18e7da3d688cd63ab5598991c05bd4c538f71d383fbe7e9f668f23d1e040a
OBJCOPY arch/arm64/boot/Image
make: Leaving directory '/home/andy/android/lineage/kernel/samsung/exynos7420'
Building DTBs
make: Entering directory '/home/andy/android/lineage/kernel/samsung/exynos7420'
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
make[2]: Nothing to be done for 'dtbs'.
make: Leaving directory '/home/andy/android/lineage/kernel/samsung/exynos7420'
Building Kernel Modules
make: Entering directory '/home/andy/android/lineage/kernel/samsung/exynos7420'
GEN /home/andy/android/lineage/out/target/product/zeroltexx/obj/KERNEL_OBJ/Makefile
CHK include/generated/uapi/linux/version.h
Using /home/andy/android/lineage/kernel/samsung/exynos7420 as source for kernel
CHK include/generated/utsrelease.h
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
CALL /home/andy/android/lineage/kernel/samsung/exynos7420/scripts/checksyscalls.sh
HOSTLD scripts/mod/modpost
Building modules, stage 2.
MODPOST 0 modules
/home/andy/android/lineage/kernel/samsung/exynos7420/scripts/Makefile.fwinst:45: target '/lib/firmware/tsp_stm/stm_z1.fw' given more than once in the same rule
/home/andy/android/lineage/kernel/samsung/exynos7420/scripts/Makefile.fwinst:45: target '/lib/firmware/abov/abov_valley.fw' given more than once in the same rule
make: Leaving directory '/home/andy/android/lineage/kernel/samsung/exynos7420'
ninja: build stopped: subcommand failed.
23:05:52 ninja failed with: exit status 1
#### failed to build some targets (17:53 (mm:ss)) ####
Anyone?
Click to expand...
Click to collapse
I know it's old, but did you manage to solve it?
I have the same problem

Categories

Resources