Android OS Forum banner

CyanogenMod build issues

24K views 20 replies 3 participants last post by  doug piston  
#1 ·
This is my first attempt at building CyanogenMod from source. I have two issues.

1. I tried doing "make -j4 otatools" and I get this:

Code:
<br />
grep: build/target/board/generic/recovery.fstab: No such file or directory<br />
find: `out/target/common/docs/gen': No such file or directory<br />
find: `out/target/common/docs/gen': No such file or directory<br />
find: `out/target/common/docs/gen': No such file or directory<br />
find: `out/target/common/docs/gen': No such file or directory<br />
find: `out/target/common/docs/gen': No such file or directory<br />
Install: out/host/linux-x86/bin/minigzip<br />
Install: out/host/linux-x86/bin/mkbootfs<br />
Notice file: system/core/libmincrypt/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libmincrypt.a.txt<br />
Install: out/host/linux-x86/bin/unpackbootimg<br />
Install: out/host/linux-x86/bin/fs_config<br />
Install: out/host/linux-x86/bin/mkyaffs2image<br />
Notice file: frameworks/base/libs/utils/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libutils.a.txt<br />
Notice file: system/core/liblog/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/liblog.a.txt<br />
Notice file: system/core/libcutils/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libcutils.a.txt<br />
Notice file: external/expat/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libexpat.a.txt<br />
Notice file: external/libpng/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libpng.a.txt<br />
Notice file: external/bzip2/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libbz.a.txt<br />
Install: out/host/linux-x86/framework/dumpkey.jar<br />
Install: out/host/linux-x86/framework/signapk.jar<br />
host Prebuilt: mkuserimg.sh (out/host/linux-x86/obj/EXECUTABLES/mkuserimg.sh_intermediates/mkuserimg.sh)<br />
Notice file: system/extras/ext4_utils/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//bin/mkuserimg.sh.txt<br />
Notice file: system/extras/ext4_utils/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//bin/make_ext4fs.txt<br />
Notice file: system/extras/ext4_utils/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libext4_utils.a.txt<br />
Install: out/host/linux-x86/bin/mkbootimg<br />
Install: out/host/linux-x86/bin/zipalign<br />
Install: out/host/linux-x86/bin/aapt<br />
Install: out/host/linux-x86/bin/bsdiff<br />
Install: out/host/linux-x86/bin/imgdiff<br />
Install: out/host/linux-x86/bin/make_ext4fs<br />
2. The second issue is the envtools doesn't appear to build. I just get this:

Code:
<br />
including device/advent/vega/vendorsetup.sh<br />
including device/bn/encore/vendorsetup.sh<br />
including device/geeksphone/one/vendorsetup.sh<br />
including device/htc/ace/vendorsetup.sh<br />
including device/htc/bravoc/vendorsetup.sh<br />
including device/htc/bravo/vendorsetup.sh<br />
including device/htc/buzz/vendorsetup.sh<br />
including device/htc/click/vendorsetup.sh<br />
including device/htc/desirec/vendorsetup.sh<br />
including device/htc/dream_sapphire/vendorsetup.sh<br />
including device/htc/espresso/vendorsetup.sh<br />
including device/htc/glacier/vendorsetup.sh<br />
including device/htc/heroc/vendorsetup.sh<br />
including device/htc/hero/vendorsetup.sh<br />
including device/htc/inc/vendorsetup.sh<br />
including device/htc/legend/vendorsetup.sh<br />
including device/htc/leo/vendorsetup.sh<br />
including device/htc/liberty/vendorsetup.sh<br />
including device/htc/mecha/vendorsetup.sh<br />
including device/htc/passion/vendorsetup.sh<br />
including device/htc/saga/vendorsetup.sh<br />
including device/htc/speedy/vendorsetup.sh<br />
including device/htc/supersonic/vendorsetup.sh<br />
including device/htc/vision/vendorsetup.sh<br />
including device/htc/vivo/vendorsetup.sh<br />
including device/htc/vivow/vendorsetup.sh<br />
including device/huawei/u8150/vendorsetup.sh<br />
including device/huawei/u8220/vendorsetup.sh<br />
including device/lge/p999/vendorsetup.sh<br />
including device/malata/smb_a1002/vendorsetup.sh<br />
including device/malata/smb_b9701/vendorsetup.sh<br />
including device/motorola/droid2/vendorsetup.sh<br />
including device/motorola/droid2we/vendorsetup.sh<br />
including device/motorola/jordan/vendorsetup.sh<br />
including device/motorola/morrison/vendorsetup.sh<br />
including device/motorola/motus/vendorsetup.sh<br />
including device/motorola/olympus/vendorsetup.sh<br />
including device/motorola/shadow/vendorsetup.sh<br />
including device/motorola/sholes/vendorsetup.sh<br />
including device/motorola/zeppelin/vendorsetup.sh<br />
including device/samsung/captivatemtd/vendorsetup.sh<br />
including device/samsung/cooper/vendorsetup.sh<br />
including device/samsung/crespo4g/vendorsetup.sh<br />
including device/samsung/crespo/vendorsetup.sh<br />
including device/samsung/epicmtd/vendorsetup.sh<br />
including device/samsung/fascinatemtd/vendorsetup.sh<br />
including device/samsung/galaxys2att/vendorsetup.sh<br />
including device/samsung/galaxys2/vendorsetup.sh<br />
including device/samsung/galaxysbmtd/vendorsetup.sh<br />
including device/samsung/galaxysmtd/vendorsetup.sh<br />
including device/samsung/mesmerizemtd/vendorsetup.sh<br />
including device/samsung/showcasemtd/vendorsetup.sh<br />
including device/samsung/sidekick4g/vendorsetup.sh<br />
including device/samsung/tass/vendorsetup.sh<br />
including device/samsung/vibrantmtd/vendorsetup.sh<br />
including device/semc/mimmi/vendorsetup.sh<br />
including device/semc/robyn/vendorsetup.sh<br />
including device/semc/shakira/vendorsetup.sh<br />
including device/zte/blade/vendorsetup.sh<br />
including device/zte/v9/vendorsetup.sh<br />
including vendor/cyanogen/vendorsetup.sh<br />
I have tried looking around the xna-developers forum and have found people with similar issues. Some say it's missing dependencies and some say the prebuild didn't sync right. Tried every trick I could find yet I am still receiving these errors.
 
#2 · (Edited by Moderator)
Run ...
. build/envsetup.sh
lunch
make bacon

Those are not errors envsetup is a script to load variables and methods called by the build system into the memory (enviroment). Think of it as getting into a car.

Then we customized the environment for your device with lunch or brunch (brunch is a customized version of lunch both are initialized in envsetup.sh). Think of lunch as checking the mirrors and adjusting the seat. ( brunch actually starts the build)

Now we are ready to build make otapackage or make bacon. This is where the actual compiling begins or to keep the analogy going like starting the car and driving off. (bacon is a cm customized version of otapackage)
 
#3 ·
Ok. Looks like I've got another issue.

Code:
<br />
============================================<br />
build/core/base_rules.mk:78: *** Module name: grub_stage1<br />
build/core/base_rules.mk:79: *** Makefile location: external/grub<br />
build/core/base_rules.mk:80: *<br />
build/core/base_rules.mk:81: * Each module must use a LOCAL_MODULE_TAGS in its<br />
build/core/base_rules.mk:82: * Android.mk. Possible tags declared by a module:<br />
build/core/base_rules.mk:83: *<br />
build/core/base_rules.mk:84: *	 optional, debug, eng, tests, samples<br />
build/core/base_rules.mk:85: *<br />
build/core/base_rules.mk:86: * If the module is expected to be in all builds<br />
build/core/base_rules.mk:87: * of a product, then it should use the<br />
build/core/base_rules.mk:88: * "optional" tag:<br />
build/core/base_rules.mk:89: *<br />
build/core/base_rules.mk:90: *    Add "LOCAL_MODULE_TAGS := optional" in the<br />
build/core/base_rules.mk:91: *    Android.mk for the affected module, and add<br />
build/core/base_rules.mk:92: *    the LOCAL_MODULE value for that component<br />
build/core/base_rules.mk:93: *    into the PRODUCT_PACKAGES section of product<br />
build/core/base_rules.mk:94: *    makefile(s) where it's necessary, if<br />
build/core/base_rules.mk:95: *    appropriate.<br />
build/core/base_rules.mk:96: *<br />
build/core/base_rules.mk:97: * If the component should be in EVERY build of ALL<br />
build/core/base_rules.mk:98: * products, then add its LOCAL_MODULE value to the<br />
build/core/base_rules.mk:99: * PRODUCT_PACKAGES section of<br />
build/core/base_rules.mk:100: * build/target/product/core.mk<br />
build/core/base_rules.mk:101: *<br />
build/core/base_rules.mk:102: *** user tag detected on new module - user tags are only supported on legacy modules.  Stop.<br />
When I do this running non-root I get a permission denied error at the end.
 
#4 · (Edited by Moderator)
You setup something while logged in as root and now thatvu are regular user you don't have permission to access.

In non phone Linux root should almost never be used.

I think you can run sudo chown -r ~/android $USERNAME:$USERNAME

them try again
 
#5 · (Edited by Moderator)
Ok looks like that solved it. As for the above code, turns out I needed to add "LOCAL_MODULE_TAGS := optional" above grub stage 1, gurb pre stage 2 and stage 2.

Now I'm getting:

Code:
<br />
find: `out/target/common/docs/gen': No such file or directory<br />
find: `out/target/common/docs/gen': No such file or directory<br />
find: `out/target/common/docs/gen': No such file or directory<br />
find: `out/target/common/docs/gen': No such file or directory<br />
find: `out/target/common/docs/gen': No such file or directory<br />
make: *** No rule to make target `bacon'.  Stop.<br />
 
#8 · (Edited by Moderator)
I assume you are trying to build a recovery.img... cd to your device dir and you'll see a BoardConfig.mk. Make sure you have the correct BOOTIMAGE size

Code:
<br />
TARGET_BOOTLOADER_BOARD_NAME := mecha<br />
<br />
# Use stock libril for now<br />
TARGET_PROVIDES_LIBRIL := vendor/htc/mecha/proprietary/libril.so<br />
BOARD_MOBILEDATA_INTERFACE_NAME := "rmnet_sdio0"<br />
BOARD_HAS_EXTRA_SYS_PROPS := true<br />
USE_IPV6_ROUTE := true<br />
<br />
# Additional Camera hacks for mecha<br />
#BOARD_HAVE_HTC_FFC := true<br />
#BOARD_USE_REVERSE_FFC := true<br />
<br />
# Hack for improper scaling.<br />
BOARD_OVERLAY_MINIFICATION_LIMIT := 2<br />
BOARD_USES_GENLOCK := true<br />
TARGET_FORCE_CPU_UPLOAD := true<br />
BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := mecha<br />
BOARD_VENDOR_QCOM_GPS_LOC_API_AMSS_VERSION := 50000<br />
<br />
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 585101312<br />
BOARD_USERDATAIMAGE_PARTITION_SIZE := 1232072704<br />
BOARD_BOOTIMAGE_PARTITION_SIZE := 4194304 <-- Most Important!!!<br />
BOARD_FLASH_BLOCK_SIZE := 262144<br />
Once thats done to build do
Code:
<br />
. build/envsetup.sh && full_deviceName-eng && make -j* recoveryimage<br />
Replace the * with how many processors you have.
 
#9 · (Edited by Moderator)
Looks like doing this:

Code:
<br />
. build/envsetup.sh && full_deviceName-eng && make -j* recoveryimage<br />
gives me this:

Code:
<br />
kyocera_milano-eng: command not found<br />
Also I'm wondering, do I have to change

Code:
<br />
BOARD_FLASH_BLOCK_SIZE :=<br />
Right now it's set at 131072 is that default or does the build get that automatically?
When I do a cat /proc/mtd I get 00040000 as my block size....I think. According to one forum I read the erasesize is the block size.
 
#11 ·
Ok....

Code:
<br />
# export PATH=/data/local/bin:$PATH<br />
# cat proc/mtd<br />
dev:    size  erasesize  name<br />
mtd0: 00600000 00040000 "boot"<br />
mtd1: 08e00000 00040000 "system"<br />
mtd2: 02780000 00040000 "fota"<br />
mtd3: 00100000 00040000 "pltable"<br />
mtd4: 00100000 00040000 "splash"<br />
mtd5: 00600000 00040000 "recovery"<br />
mtd6: 09640000 00040000 "userdata"<br />
mtd7: 06f00000 00040000 "cache"<br />
#<br />
 
#13 ·
I took a moment to re-read this thread, I am getting the sense you are not just building CyanogenMod for the first time but are trying to builld it for a non-supported device. I.E make the first CyanogenMod rom for it. Is that what you are trying to?

Basically what is it that you are trying to accomplish here?
 
#21 ·
I had issues with the "make otatools" command where it was creating my unpackbootimg. I had to build it on its own and move it to my /bin dir or my platform-tools dir.

It doesnt seem that its dealing with your boot.img correctly. Just a thought to go over the steps again and see if it spouts any errors that you didn't see.