AOSP vendor trees? - G1 Android Development

Im trying to build a ROM from the AOSP source(just for a learning experience). I followed the guide on the AOSP website up to downloading the source. I got the source downloaded when i found ctso's guide.
It had all the info on getting the HTC binaries and junk, so i followed that and extracted all the stuff.
The guide by ctso says that i need to source a vendor tree, something the AOSP website doesnt mention at all.
$ source build/envsetup.sh
$ lunch cyanogen_dream_us-eng
If i just want to make a ROM for the G1 what should i do? Should i just skip this part and do:
$ cd ~/mydroid
$ make
or do i need to source a vendor tree? if so how would i do this, because the specified command above only seems to be for the people who used the cyanogen repository?

how do i specify a build target?

kingkurry said:
how do i specify a build target?
Click to expand...
Click to collapse
Code:
source build/envsetup.sh
including vendor/aosp/vendorsetup.sh
debian:~/Desktop/android/master$ lunch
You're building on Linux
generic-eng simulator aosp_emulator_us-eng aosp_emulator_eu-eng aosp_dream_us-userdebug aosp_dream_eu-userdebug aosp_dream_us-eng aosp_dream_eu-eng aosp_sapphire_us-userdebug aosp_sapphire_eu-userdebug aosp_sapphire_us-eng aosp_sapphire_eu-eng
Lunch menu... pick a combo:
1. generic-eng
2. simulator
3. aosp_emulator_us-eng
4. aosp_emulator_eu-eng
5. aosp_dream_us-userdebug
6. aosp_dream_eu-userdebug
7. aosp_dream_us-eng
8. aosp_dream_eu-eng
9. aosp_sapphire_us-userdebug
10. aosp_sapphire_eu-userdebug
11. aosp_sapphire_us-eng
12. aosp_sapphire_eu-eng
Which would you like? [generic-eng]
Choose the one you like....
Code:
Which would you like? [generic-eng]
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.1-update1
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ECLAIR
============================================
and build it....
Code:
make
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.1-update1
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ECLAIR
============================================
....

So after picking the target, and building, will it compile the source into an img file or what?

also, how would i select which os version i want to build? it seems to default to android 2.1.

Related

building from cyanogen git

Hi all.
Im trying to build firmwre from git
repo init -u git://github.com/CyanogenMod/android.git -b froyo
cd ~/android/system/vendor/cyanogen/
./get-rommanager
Code:
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.2.1
TARGET_PRODUCT=cyanogen_dream_sapphire
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=FRG83
And in failing at
make -j10 bacon
Code:
Install: out/host/linux-x86/bin/dx
Copying: out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/classes-full-debug.jar
Install: out/host/linux-x86/lib/libneo_cgi.so
Install: out/host/linux-x86/framework/droiddoc.jar
Copying: out/target/common/obj/JAVA_LIBRARIES/jsr305_intermediates/classes-full-names.jar
target asm: libicudata-large
<= out/target/product/dream_sapphire/obj/SHARED_LIBRARIES/libicudata-large_intermediates/icu_data_large.S
make: *** No rule to make target `out/target/product/dream_sapphire/obj/lib/libskiagl.so',
needed by `out/target/product/dream_sapphire/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/LINKED/libandroid_runtime.so'. Stop.
No rule to make target `out/target/product/dream_sapphire/obj/lib/libskiagl.so'
Whats that mean?
Google does not tell me something usefull.
Halp!
bump for thread

[Q] Having issues compiling my first CM kernel build.

Hello all!
I have recently started to get my system ready for some android software and kernel programming. I am following the guide from the cyanogenmod website. I am unable to post an exact link due to my low post count, apologies. If you really need to see which guide I am using, message me and ill get it to you.
I am stuck on the last step of "Configure the Build."
When I send "make ARCH=arm CROSS_COMPILE=$CCOMPILER oldconfig" to terminal, the following is my output.
Code:
[email protected]:~/android/system# make ARCH=arm CROSS_COMPILE=$CCOMPILER oldconfig
/bin/bash: bison: command not found
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.1.2
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.8.0-19-generic-x86_64-with-Ubuntu-13.04-raring
HOST_BUILD_TYPE=release
BUILD_ID=JZO54K
OUT_DIR=/root/android/system/out
============================================
grep: build/target/board/generic/recovery.fstab: No such file or directory
find: `src': No such file or directory
build/core/tasks/kernel.mk:82: **********************************************************
build/core/tasks/kernel.mk:83: * Kernel source found, but no configuration was defined *
build/core/tasks/kernel.mk:84: * Please add the TARGET_KERNEL_CONFIG variable to your *
build/core/tasks/kernel.mk:85: * BoardConfig.mk file *
build/core/tasks/kernel.mk:86: **********************************************************
make: *** No rule to make target `oldconfig'. Stop.
[email protected]:~/android/system#
I am unable to locate BoardConfig.mk for an unknown reason. Also, I dont know why the GREP returned no such file or directory, and why src wasnt found either.
Please help, I am almost completely set up to start helping the community!
Thanks,
Azraelpwnz

[Q] How to build Android Source for Moto G?

I want to know how to build android source code
using Motorola-provided sources at sourceforge.net/projects/motog.motorola/files
I tried following works:
Download pure Android Sources from google
Replace some files with Motorola-provided sources
Follow README file instructions
----------------------------- My terminal output messages ------------------------------------
[email protected]:~/android1$ source build/envsetup.sh
including device/asus/deb/vendorsetup.sh
including device/asus/flo/vendorsetup.sh
including device/asus/tilapia/vendorsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/lge/mako/vendorsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/samsung/manta/vendorsetup.sh
including device/samsung_slsi/arndale/vendorsetup.sh
including device/samsung/toroplus/vendorsetup.sh
including device/samsung/toro/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including sdk/bash_completion/adb.bash
[email protected]:~/android1$ lunch generic-user
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.3
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=user
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.8.0-29-generic-x86_64-with-Ubuntu-12.04-precise
HOST_BUILD_TYPE=release
BUILD_ID=JLS36G
OUT_DIR=out
============================================
[email protected]:~/android1$ make BOARD_HAVE_BLUETOOTH=true TARGET_BOARD_PLATFORM=msm8226 out/target/product/generic/system/bin/bluetoothd
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.3
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=user
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.8.0-29-generic-x86_64-with-Ubuntu-12.04-precise
HOST_BUILD_TYPE=release
BUILD_ID=JLS36G
OUT_DIR=out
============================================
Checking build tools versions...
motorola/security/moto_crypto/Android.mk:15: build/dlkm/AndroidKernelModule.mk: No such file or directory
make: *** No rule to make target `build/dlkm/AndroidKernelModule.mk'. Stop.
Shouldn't you have a device/motorola/falcon or something similar included upon running lunch? (At least if you're trying to build en entire ROM vs just a kernel.)
You might be missing a dependency, check out line 15 in that Android.mk file for possible clues.
Thanks for reply
I think I need some more files to succeed in building but there are no more files at Motorola Opensource Site
I've already suceeded in building for GS3 in the same way.
bump

module "generated_kernel_includes": cmd: unknown variable '$(KERNEL_MAKE_FLAGS)'

module "generated_kernel_includes": cmd: unknown variable '$(KERNEL_MAKE_FLAGS)'
Os-Ubuntu 18.10
android os-lineage os 16
download the lineage os 16 code using git
cd lineage_16
repo sync
make clobber
output
----------
15:09:36 Entire build directory removed.
source build/envsetup.sh
o/p
------------
including device/generic/car/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 device/generic/uml/vendorsetup.sh
including device/huawei/angler/vendorsetup.sh
including vendor/lineage/vendorsetup.sh
including sdk/bash_completion/adb.bash
lunch
o/p
-------
You're building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_arm64-eng
3. aosp_mips-eng
4. aosp_mips64-eng
5. aosp_x86-eng
6. aosp_x86_64-eng
7. aosp_car_arm-userdebug
8. aosp_car_arm64-userdebug
9. aosp_car_x86-userdebug
10. aosp_car_x86_64-userdebug
11. mini_emulator_arm64-userdebug
12. m_e_arm-userdebug
13. mini_emulator_x86_64-userdebug
14. mini_emulator_x86-userdebug
15. uml-userdebug
16. aosp_angler-userdebug
Which would you like? [aosp_arm-eng] :11
Trying dependencies-only mode on a non-existing device tree?
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
TARGET_PRODUCT=mini_emulator_arm64
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a15
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.18.0-10-generic-x86_64-Ubuntu-18.10
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PPR2.181005.003
OUT_DIR=/home/taqi/Documents/android-lineage-16.0/out
============================================
$make -j4
o/p
--------------
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
TARGET_PRODUCT=mini_emulator_arm64
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a15
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.18.0-10-generic-x86_64-Ubuntu-18.10
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PPR2.181005.003
OUT_DIR=/home/taqi/Documents/android-lineage-16.0/out
============================================
[1/1] /home/taqi/Documents/android-lineage-16.0/out/soong/.mi...cuments/android-lineage-16.0/out/soong/.bootstrap/build.ninja
[55/56] glob prebuilts/ndk/stl.bp
[80/80] /home/taqi/Documents/android-lineage-16.0/out/soong/....ome/taqi/Documents/android-lineage-16.0/out/soong/build.ninja
FAILED: /home/taqi/Documents/android-lineage-16.0/out/soong/build.ninja
/home/taqi/Documents/android-lineage-16.0/out/soong/.bootstrap/bin/soong_build -t -l /home/taqi/Documents/android-lineage-16.0/out/.module_paths/Android.bp.list -b /home/taqi/Documents/android-lineage-16.0/out/soong -n /home/taqi/Documents/android-lineage-16.0/out -d /home/taqi/Documents/android-lineage-16.0/out/soong/build.ninja.d -o /home/taqi/Documents/android-lineage-16.0/out/soong/build.ninja Android.bp
error: vendor/lineage/build/soong/Android.bp:31:8: module "generated_kernel_includes": cmd: unknown variable '$(KERNEL_MAKE_FLAGS)'
ninja: build stopped: subcommand failed.
15:49:16 soong bootstrap failed with: exit status 1
#### failed to build some targets (03:03 (mm:ss)) ####
Please conduct "repo sync" again. This issue will solve.
I've got the same issue. Unfortunately repo sync did not fix it. What is the patch/commit that fixes this?
SaburoSiro said:
Please conduct "repo sync" again. This issue will solve.
Click to expand...
Click to collapse
Could you please link the commit?
[email protected] said:
Os-Ubuntu 18.10
android os-lineage os 16
download the lineage os 16 code using git
cd lineage_16
repo sync
make clobber
output
----------
15:09:36 Entire build directory removed.
source build/envsetup.sh
o/p
------------
including device/generic/car/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 device/generic/uml/vendorsetup.sh
including device/huawei/angler/vendorsetup.sh
including vendor/lineage/vendorsetup.sh
including sdk/bash_completion/adb.bash
lunch
o/p
-------
You're building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_arm64-eng
3. aosp_mips-eng
4. aosp_mips64-eng
5. aosp_x86-eng
6. aosp_x86_64-eng
7. aosp_car_arm-userdebug
8. aosp_car_arm64-userdebug
9. aosp_car_x86-userdebug
10. aosp_car_x86_64-userdebug
11. mini_emulator_arm64-userdebug
12. m_e_arm-userdebug
13. mini_emulator_x86_64-userdebug
14. mini_emulator_x86-userdebug
15. uml-userdebug
16. aosp_angler-userdebug
Which would you like? [aosp_arm-eng] :11
Trying dependencies-only mode on a non-existing device tree?
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
TARGET_PRODUCT=mini_emulator_arm64
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a15
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.18.0-10-generic-x86_64-Ubuntu-18.10
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PPR2.181005.003
OUT_DIR=/home/taqi/Documents/android-lineage-16.0/out
============================================
$make -j4
o/p
--------------
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
TARGET_PRODUCT=mini_emulator_arm64
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a15
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.18.0-10-generic-x86_64-Ubuntu-18.10
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=PPR2.181005.003
OUT_DIR=/home/taqi/Documents/android-lineage-16.0/out
============================================
[1/1] /home/taqi/Documents/android-lineage-16.0/out/soong/.mi...cuments/android-lineage-16.0/out/soong/.bootstrap/build.ninja
[55/56] glob prebuilts/ndk/stl.bp
[80/80] /home/taqi/Documents/android-lineage-16.0/out/soong/....ome/taqi/Documents/android-lineage-16.0/out/soong/build.ninja
FAILED: /home/taqi/Documents/android-lineage-16.0/out/soong/build.ninja
/home/taqi/Documents/android-lineage-16.0/out/soong/.bootstrap/bin/soong_build -t -l /home/taqi/Documents/android-lineage-16.0/out/.module_paths/Android.bp.list -b /home/taqi/Documents/android-lineage-16.0/out/soong -n /home/taqi/Documents/android-lineage-16.0/out -d /home/taqi/Documents/android-lineage-16.0/out/soong/build.ninja.d -o /home/taqi/Documents/android-lineage-16.0/out/soong/build.ninja Android.bp
error: vendor/lineage/build/soong/Android.bp:31:8: module "generated_kernel_includes": cmd: unknown variable '$(KERNEL_MAKE_FLAGS)'
ninja: build stopped: subcommand failed.
15:49:16 soong bootstrap failed with: exit status 1
Click to expand...
Click to collapse
[email protected] said:
#### failed to build some targets (03:03 (mm:ss)) ####
Click to expand...
Click to collapse
your command make -j4 is wrong. Just use 'mka bacon -j4' if you are building a rom.
Im having the same issue building for flounder.
Hi. A am having the same issue.
Dut found solution, may be.
This link can be helpful.
This is a device tree adaptation problem. You just need to do a "breakfast <device_code>", and the error that it throws will automatically tell you what filename that your aosp_device.mk should have...
In my case, I had the same problem, when I'm trying with xpe_sunny.mk, but the actual string I should have was xperience_sunny.mk
After adapting my device tree (Android.mk, common lunch choices, rom.dependencies, etc,) then PRODUCT_SOONG_NAMESPACES successfully took all the directories that it needed.

compiling kernel issues

Hi,
I own a velvet 5g and i want to be able to install drivers.
I unlocked the phone according to: https://developer.lge.com/resource/mobile/RetrieveBootloader.dev
and rooted it according to: https://forum.xda-developers.com/lg-velvet/how-to/root-lg-velvet-lm-g900em-t4171117
I also installed kali nethunter via the apk.
when i try to insert the module i get this:
Code:
# insmod 8188eu.ko
insmod: ERROR: could not insert module 8188eu.ko: Required key not available
Which makes sense, given that my kernelconfig has CONFIG_MODULE_SIG_FORCE=y.
Now i have to recompile the kernel with a modified config, so i can load modules at runtime.
I got the sourcecode here:
http://opensource.lge.com/osSch/list?types=ALL&search=LMG9 . I chose LMG900EM, i assume LMG900EMW is for another region?
And followed the steps in the README:
Code:
export CROSS_COMPILE=$(pwd)/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
export ARCH=arm64
export SUBARCH=arm64
export DTC_EXT=$(pwd)/prebuilts/misc/linux-x86/dtc/dtc
export CLANG_TRIPLE=aarch64-linux-gnu-
source build/envsetup.sh
lunch 1
make -j4 #1)
tar -xvzf *_Kernel_Q.tar.gz
cd kernel/msm-4.19
mkdir -p out
make ARCH=arm64 O=./out REAL_CC=../../../prebuilts/clang/host/linux-x86/clang-r353983c/bin/clang CLANG_TRIPLE=aarch64-linux-gnu- CROSS_COMPILE=../../../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android- DTC_EXT=../../../prebuilts/misc/linux-x86/dtc/dtc vendor/caymanlm-perf_defconfig
make ARCH=arm64 O=./out REAL_CC=../../../prebuilts/clang/host/linux-x86/clang-r353983c/bin/clang CLANG_TRIPLE=aarch64-linux-gnu- CROSS_COMPILE=../../../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android- DTC_EXT=../../../prebuilts/misc/linux-x86/dtc/dtc -j4
What strikes me as odd here is that is get this message at step 1):
Code:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=10
TARGET_PRODUCT=aosp_arm
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.15.0-124-generic-x86_64-Ubuntu-18.04.5-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=QQ1D.200205.002
OUT_DIR=out
============================================
Why is HOST_CROSS_OS set to windows? did i miss this value when setting my environment variables?
After i run it all I end up with an Image file in ./out/arch/arm64/boot and a dts folder.
I also tried this with the kali-nethunter-kernel from:
and then I end up with an Image an Image-dtb and a 20 byte Image-dtb-hdr file.
I tried booting from all of those Image files after repacking.
Code:
fastboot boot boot.img
But it is always stuck at boot until i restart.
I think this is because my extracted boot.img has a zImage file and my compile process is generating an Image file. Or because i dont use the dtb file correctly.
I havent tried flashing it yet, because i would assume the same result, except i just have to reflash it.
Did i go wrong anywhere or how can i fix this?
Thanks in advance for your advice.

Categories

Resources