• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Cyanogenmod12.1 Build Environment Set-Up

use these trees, compile error is fixed + added some drm stuff to help with video playback
(these are my most recent)
you may have to run "make clean" or "make clobber" after adding these.
Ok thanks trying now.
I didn't know make clean would delete the build. Darn it took roughly 6 hours. Ill do repo sync as well and then run brunch i'll be back when its done
 
Last edited:
well while running repo sync i got yet another error
Code:
Fetching project CyanogenMod/android_frameworks_support
Fetching project CyanogenMod/android_packages_wallpapers_LivePicker
Fetching projects:  95% (531/558)  Fetching project CyanogenMod/android_packages_apps_Provision
Fetching project platform/external/openfst
Fetching projects: 100% (558/558), done. 
Syncing work tree:  20% (112/558)  fatal: Unable to create '/home/dev/Cyanogenmod12.1/external/eclipse-basebuilder/.git/index.lock': File exists.

If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
Syncing work tree: 100% (558/558), done. 

error: external/eclipse-basebuilder/: platform/external/eclipse-basebuilder checkout 8992741248e10f0e0c474671170efd0571484c75
dev@dev-VGN-NS135E ~/Cyanogenmod12.1 $
Will run brunch after repo sync fix
 
Last edited:
well while running repo sync i got yet another error
Code:
error: external/eclipse-basebuilder/: platform/external/eclipse-basebuilder checkout 899274error: external/eclipse-basebuilder/: platform/external/eclipse-basebuilder checkout 8992741248e10f0e0c474671170efd0571484c75
just got same error, simply deleted that folder then ran repo sync again, and it went through
 
I haven't compiled anything yet but I cannot seem to find any "media_codecs.xml" or "media_profiles.xml" file. Could this be the reason for video playback issues?
 
Hey guy's I've been trying to build the rom for awhile now but I can't seem to get past this error although I've managed to get past a lot of other ones any idea on this? What's with the uint64_t and fs_config error? That's preventing me from building makebootfs.o.. Thank's for any help much appreciated!

Code:
system/core/cpio/mkbootfs.c: In function 'fix_stat':
system/core/cpio/mkbootfs.c:58:5: error: unknown type name 'uint64_t'
system/core/cpio/mkbootfs.c:82:9: error: too many arguments to function 'fs_config'
device/htc/a11/include/private/android_filesystem_config.h:177:20: note: declared here
build/core/binary.mk:699: recipe for target '/home/mike/android/cm12/out/host/linux-x86/obj32/EXECUTABLES/mkbootfs_intermediates/mkbootfs.o' failed
make: *** [/home/mike/android/cm12/out/host/linux-x86/obj32/EXECUTABLES/mkbootfs_intermediates/mkbootfs.o] Error 1
make: *** Waiting for unfinished jobs....
  HOSTCC  scripts/basic/fixdep
  GEN     /home/mike/android/cm12/out/target/product/a11/obj/KERNEL_OBJ/Makefile
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
arch/arm/configs/a11ul_defconfig:465:warning: override: reassigning to symbol ZRAM
arch/arm/configs/a11ul_defconfig:466:warning: override: reassigning to symbol ZSMALLOC
arch/arm/configs/a11ul_defconfig:625:warning: override: reassigning to symbol KEYS
arch/arm/configs/a11ul_defconfig:636:warning: override: reassigning to symbol SECURITY
#
# configuration written to .config
#
make[1]: Leaving directory '/home/mike/android/cm12/kernel/htc/a11'
# In case value of PACKAGES is empty.
 
Try running "make -jx otatools", where x is twice the number of cores you have.
Ok I did that and it gave me this... Which is the same error.

Code:
host C: libcutils_32 <= system/core/libcutils/socket_network_client.c
host C: libcutils_32 <= system/core/libcutils/sockets.c
host C: libcutils_32 <= system/core/libcutils/ashmem-host.c
host C: libcutils_32 <= system/core/libcutils/dlmalloc_stubs.c
host C: mkbootfs <= system/core/cpio/mkbootfs.c
host C: mkbootimg <= system/core/mkbootimg/mkbootimg.c
system/core/cpio/mkbootfs.c: In function 'fix_stat':
system/core/cpio/mkbootfs.c:58:5: error: unknown type name 'uint64_t'
system/core/cpio/mkbootfs.c:82:9: error: too many arguments to function 'fs_config'
device/htc/a11/include/private/android_filesystem_config.h:177:20: note: declared here
build/core/binary.mk:699: recipe for target '/home/mike/android/cm12/out/host/linux-x86/obj32/EXECUTABLES/mkbootfs_intermediates/mkbootfs.o' failed
make: *** [/home/mike/android/cm12/out/host/linux-x86/obj32/EXECUTABLES/mkbootfs_intermediates/mkbootfs.o] Error 1
make: *** Waiting for unfinished jobs....
host StaticLib: libmincrypt_32 (/home/mike/android/cm12/out/host/linux-x86/obj32/STATIC_LIBRARIES/libmincrypt_intermediates/libmincrypt.a)
make: *** wait: No child processes.  Stop
 
Hmmmmmmm if I had to guess, I'd say that some library/libraries didn't get configured properly.
That's kind of what I thought yesterday, which is why I decided to delete the entire android source directory and start over which isn't fun when it comes to that much data to be downloaded but it still threw that error... So I'm at a loss now.

P.S I'm on Ubuntu 15.10 btw.
 
Try looking in /system/core/cpio/
I managed to get past some of the errors except this one..
Code:
ystem/core/cpio/mkbootfs.c: In function 'fix_stat':
system/core/cpio/mkbootfs.c:83:24: error: passing argument 3 of 'fs_config' from incompatible pointer type [-Werror]
system/core/include/private/android_filesystem_config.h:303:20: note: expected 'unsigned int *' but argument is of type 'char *'
system/core/cpio/mkbootfs.c:83:24: error: passing argument 6 of 'fs_config' from incompatible pointer type [-Werror]
system/core/include/private/android_filesystem_config.h:303:20: note: expected 'uint64_t *' but argument is of type 'unsigned int *'
system/core/cpio/mkbootfs.c:83:24: error: too many arguments to function 'fs_config'
system/core/include/private/android_filesystem_config.h:303:20: note: declared here
cc1: all warnings being treated as errors

build/core/binary.mk:699: recipe for target '/home/mike/android/cm12/out/host/linux-x86/obj32/EXECUTABLES/mkbootfs_intermediates/mkbootfs.o' failed
make: *** [/home/mike/android/cm12/out/host/linux-x86/obj32/EXECUTABLES/mkbootfs_intermediates/mkbootfs.o] Error 1

All I need is mkbootfs.o and I'm good to go but I don't get that error.
 
If I try to build it myself I get this.

Code:
gcc mkbootfs.c  -o mkbootfs -I../include
mkbootfs.c: In function ‘fix_stat’:
mkbootfs.c:82:46: warning: passing argument 3 of ‘fs_config’ from incompatible pointer type [-Wincompatible-pointer-types]
         fs_config(path, S_ISDIR(s->st_mode), target_out_path,
                                              ^
In file included from mkbootfs.c:14:0:
../include/private/android_filesystem_config.h:303:20: note: expected ‘unsigned int *’ but argument is of type ‘char *’
static inline void fs_config(const char *path, int dir,
                    ^
mkbootfs.c:83:48: warning: passing argument 6 of ‘fs_config’ from incompatible pointer type [-Wincompatible-pointer-types]
                        &s->st_uid, &s->st_gid, &st_mode, &capabilities);
                                                ^
In file included from mkbootfs.c:14:0:
../include/private/android_filesystem_config.h:303:20: note: expected ‘uint64_t * {aka long unsigned int *}’ but argument is of type ‘unsigned int *’
static inline void fs_config(const char *path, int dir,
                    ^
mkbootfs.c:82:9: error: too many arguments to function ‘fs_config’
         fs_config(path, S_ISDIR(s->st_mode), target_out_path,
         ^
In file included from mkbootfs.c:14:0:
../include/private/android_filesystem_config.h:303:20: note: declared here
static inline void fs_config(const char *path, int dir,
 
If I try to build it myself I get this.

Code:
gcc mkbootfs.c  -o mkbootfs -I../include
mkbootfs.c: In function ‘fix_stat’:
mkbootfs.c:82:46: warning: passing argument 3 of ‘fs_config’ from incompatible pointer type [-Wincompatible-pointer-types]
         fs_config(path, S_ISDIR(s->st_mode), target_out_path,
                                              ^
In file included from mkbootfs.c:14:0:
../include/private/android_filesystem_config.h:303:20: note: expected ‘unsigned int *’ but argument is of type ‘char *’
static inline void fs_config(const char *path, int dir,
                    ^
mkbootfs.c:83:48: warning: passing argument 6 of ‘fs_config’ from incompatible pointer type [-Wincompatible-pointer-types]
                        &s->st_uid, &s->st_gid, &st_mode, &capabilities);
                                                ^
In file included from mkbootfs.c:14:0:
../include/private/android_filesystem_config.h:303:20: note: expected ‘uint64_t * {aka long unsigned int *}’ but argument is of type ‘unsigned int *’
static inline void fs_config(const char *path, int dir,
                    ^
mkbootfs.c:82:9: error: too many arguments to function ‘fs_config’
         fs_config(path, S_ISDIR(s->st_mode), target_out_path,
         ^
In file included from mkbootfs.c:14:0:
../include/private/android_filesystem_config.h:303:20: note: declared here
static inline void fs_config(const char *path, int dir,

I had a mkbootfs error a while back, one of the devs here told me this:

It looks like some file for your toolchain is missing or corrupt. You either have a bad download or your trying to build on an x86 distro instead of the needed 64 bit distro. You are running a 64 bit copy of debian/linux mint/ubuntu/etc right? it also could have something to do with ia32 libs that are needed for building in debian based distributions too.

look through this: http://forum.xda-developers.com/che...to-setup-ubuntu-14-10-utopic-unicorn-t2862442

and make sure you have all the packages it wants you to install and have followed the instructions to a T.

Also, are you using Bad_MOFO_33's device, vendor, and kernel trees from Github?
 
A
I had a mkbootfs error a while back, one of the devs here told me this:



Also, are you using Bad_MOFO_33's device, vendor, and kernel trees from Github?
Actually no I'm not using that specific device tree I'm using the Desire a11 device tree, kernel tree and vendor.. I'm trying to help them build CM12.1 for the device... We do have one successful build but it has to many problems like the no data connection only text messaging and phone calls and WiFi but no carrier data just an exclamation mark...
 
A

Actually no I'm not using that specific device tree I'm using the Desire a11 device tree, kernel tree and vendor.. I'm trying to help them build CM12.1 for the device... We do have one successful build but it has to many problems like the no data connection only text messaging and phone calls and WiFi but no carrier data just an exclamation mark...
Have you guys tried the APN fixes?
 
Have you guys tried the APN fixes?
Yeah that was the first thing I tried right after changing from gsm to cdma in #*#*4636*#*# and then it just caused it to reboot and it would reboot itself again right after the home screen appeared so it was a basically a bootloop and even before doing any of that it rebooted if you tried to do certain things like turn airplane mode on and a few other things.
 
Have you guys tried the APN fixes?
Quick question... Is there any sites that can teach you how to debug a custom rom that's not booting? I can't seem to find anything other than logcat but that's not even working because it's not loading that soon in the boot process.
 
Last edited:
Quick question... Is there any sites that can teach you how to debug a custom rom that's not booting? I can't seem ti find anything other than logcat but that's not even working because it's not loading that soon in the boot process.
I've queried @scary alien about this. He is trying to formulate (script) a way that will allow logs to run during bootup, so we can look at them for errors. I know I could use it.
 
I've queried @scary alien about this. He is trying to formulate (script) a way that will allow logs to run during bootup, so we can look at them for errors. I know I could use it.
Yeah I could definitely use that too because right now I'm basically just guessing as to what the problem is. And since the logs won't run that early, I'm rather stuck now.
 
Back
Top Bottom