How to specify a custom defconfig file in Android 10 Kernel compilation - Google Pixel 3 Questions & Answers

I wanted to enable certain kernel features and in my Android 10 build for Pixel 3. I downloaded and built the correct msm kernel and successfully flashed it on the Pixel. To build the kernel I'm using the build/build.sh from the kernel source. I tried adding a custom defconfig file in private/msm-google/arch/arm64/configs/ and changing the DEFCONFIG variable in build.config to that file. When I compile I get following error:
Code:
++ echo ERROR: savedefconfig does not match private/msm-google/arch/arm64/configs/sdm845_defconfig
ERROR: savedefconfig does not match private/msm-google/arch/arm64/configs/sdm845_defconfig
How can I compile the kernel with a custom defconfig? It doesn't have to be through the build.sh method (although it would be preferable)

gardeimasei said:
I wanted to enable certain kernel features and in my Android 10 build for Pixel 3. I downloaded and built the correct msm kernel and successfully flashed it on the Pixel. To build the kernel I'm using the build/build.sh from the kernel source. I tried adding a custom defconfig file in private/msm-google/arch/arm64/configs/ and changing the DEFCONFIG variable in build.config to that file. When I compile I get following error:
Code:
++ echo ERROR: savedefconfig does not match private/msm-google/arch/arm64/configs/sdm845_defconfig
ERROR: savedefconfig does not match private/msm-google/arch/arm64/configs/sdm845_defconfig
How can I compile the kernel with a custom defconfig? It doesn't have to be through the build.sh method (although it would be preferable)
Click to expand...
Click to collapse
I don't know if it's solved, but I solved the problem removing the "check defconfig" in build.config (the symlink in the root which points to the kernel build.config).
Change
Code:
POST_DEFCONFIG_CMDS="check_defconfig"
to
Code:
POST_DEFCONFIG_CMDS=""

I've been working with a Google engineer who showed me the fix for my savedefconfig problem. Maybe it will fix yours, too.
The key is to set ARCH:
Code:
$ export ARCH=arm64
Here's the context and full procedure. My work is based on the b1c1_defconfig config. Your directory names may vary.
Code:
$ cd private/msm-google
$ export ARCH=arm64 # this is the magic line
$ make b1c1_defconfig # This sets up the config for my hardware. Yours is probably different.
$ make menuconfig
Now edit the kernel configuration and save it as ".config", the default.
When you're done:
Code:
$ make savedefconfig
$ cp defconfig arch/arm64/configs/b1c1_defconfig # or whatever your hardware configuration is
$ make mrproper
With luck, you won't see any savedefconfig problems.

Related

[Tutorial] How to compile a kernel module outside the kernel

I've decided to make a short tutorial and present the way I compile kernel modules (outside the kernel sources).
I've built few kernel modules (governors - ineractive and smartass, cifs, nls, etc) and I started receiving private messages asking how I did it.
For kernel modules that come with the kernel itself - cifs / tun for example - they just work if you compile the kernel and activate correct config parameters.
Some other modules (such as the smartass governor that doesn't come with the kernel) you compile outside the kernel source. However they require changes since kernel does not export the symbols the module needs to use - so you have to know what k_all_syms are needed, grab them from the phone and update the kernel module.
So there will be changes there. However, the main steps are:
a) follow tutorials to get the kernel / android ndk to compile. People seem able to do this.
b) then take the module you want (For example cpufreq_smartass.c from here: http://pastebin.com/rR4QUCrk ) and copy it in a new folder on the disk.
c) create a Makefile like the one below, but with your paths of course:
Code:
KERNEL_DIR=/home/viulian/android_platform/kernel-2.1.A.0.435/kernel
obj-m := cpufreq_smartass.o
PWD := $(shell pwd)
default:
$(MAKE) ARCH=arm CROSS_COMPILE=/home/viulian/android_platform/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- -C $(KERNEL_DIR) SUBDIRS=$(PWD) modules
clean:
$(MAKE) -C $(KERNEL_DIR) SUBDIRS=$(PWD) clean
d) execute make
Of course, the module source needs to be adjusted as you need to put in the frequencies, and also update the k_all_syms pointers .. But you can retrieve them from /proc/kallsyms on the device itself - just look for the method name, and use the address you see in the log.
If you still can't get it to compile, try to compile a very basic hello_world kernel module. I used the code below when testing:
Code:
#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_ALERT */
MODULE_LICENSE("GPL");
MODULE_AUTHOR("viulian, 2011");
MODULE_DESCRIPTION("Demo module for X10i");
int init_module(void)
{
printk("<1>Hello world\n");
// A non 0 return means init_module failed; module can't be loaded.
return 0;
}
void cleanup_module(void)
{
printk(KERN_ALERT "Goodbye world 1.\n");
}
It is not perfect, but if you manage to insmod-it and check dmesg, you will see "Hello world" written there.
One more thing, linux kernel is fussy about the module versions. Even if nothing is changed between two kernel versions related to what a module needs, is enough a small difference in module's modinfo value to make the kernel to refuse the module.
For this, you need to trick your local kernel and adjust EXTRAVERSION value in kernel's main Makefile to have the exact version of the one on the device:
In X10 stock kernel (GB 2.3.3 release), the kernel version is 2.6.29-00054-g5f01537 visible in phone settings.
This means that the kernel on the phone will only accept modules that are compiled for that exact version. But the kernel version is just a string in the module .ko, so is a string comparison - the module might work perfectly, but is not loaded.
There is luck though, the string value comes from a define in kernel's Makefile, which you can change before you compile!
The Makefile in the kernel you are going to use to build the module will have to include these lines at the top:
Code:
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 29
EXTRAVERSION = -00054-g5f01537
Other than that, it should work .. Expect phone reboots and difficulty to debug if stuff goes wrong. Android kernel doesn't come with syslog functionality, kernel prints are found in /proc/kmsg. Dmesg works, but you can't execute if if phone reboots.
I usually had to keep another adb shell opening with 'cat /proc/kmsg' which showed as much as possible from the module's outputs.
Happy compiling on your risk!
Good
Sent from my GT-S5570 using Tapatalk
Nice really nice.
Anyone help me.have someone who could compile the linux bluetooth modules please? Iam noob in linux
http://www.multiupload.com/58OPISAYNH
Anyone please can make a video tutorial?
That's really nice of you for sharing this.
Guide to Compiling Custom Kernel Modules in Android
I've spent the better part of today trying to figure out how to compile and load a custom kernel modules in android to aid me in my research. It has been in entirely frustrating experience, as there is almost no documentation on the topic that I can find. Below you will find my attempt at a guide. Hopefully this will help save someone else the hassle.
PREREQUISITES
Disclaimer: This list may be incomplete, since I've not tried it on a fresh install. Please let me know if I've missed anything.
Install the general android prereqs found here .
Download and un(zip|tar) the android NDK found here .
http://developer.android.com/sdk/ndk/index.html
Download and un(zip|tar) the android SDK found here .
http://developer.android.com/sdk/index.html
Download and untar the kernel source for your device. This can usually be found on the website of your device manufacturer or by a quick Google search.
Root your phone. In order to run custom kernel modules, you must have a rooted phone.
Plug your phone into your computer.
PREPARING YOUR KERNEL SOURCE
First we must retrieve and copy the kernel config from our device.
Code:
$ cd /path/to/android-sdk/tools
$ ./adk pull /proc/config.gz
$ gunzip ./config.gz
$ cp config /path/to/kernel/.config
Next we have to prepare our kernel source for our module.
Code:
$ cd /path/to/kernel
$ make ARCH=arm CROSS_COMPILE=/path/to/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- modules_prepare
PREPARING YOUR MODULE FOR COMPILATION
We need to create a Makefile to cross-compile our kernel module. The contents of your Makefile should be similar to the following:
Code:
obj-m := modulename.o
KDIR := /path/to/kernel
PWD := $(shell pwd)
CCPATH := /path/to/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
default:
$(MAKE) ARCH=arm CROSS_COMPILE=$(CCPATH)/arm-linux-androideabi- -C $(KDIR) M=$(PWD) modules
COMPILING AND INSTALLING YOUR MODULE
Code:
$ cd /path/to/module/src
$ make
$ cd /path/to/android-sdk/tools/
$ ./adb push /path/to/module/src/modulename.ko /sdcard/modulename.ko
RUNNING YOUR MODULE
Code:
$ cd /path/to/android-sdk/
$ ./adb shell
$ su
# insmod /sdcard/modulename.ko
---------- Post added at 07:40 PM ---------- Previous post was at 07:37 PM ----------
IMPORNTANT TOO
Preparing a build environment
To build an Android kernel, you need a cross-compiling toolchain. Theoretically, any will do, provided it targets ARM. I just used the one coming in the Android NDK:
$ wget http://dl.google.com/android/ndk/android-ndk-r6b-linux-x86.tar.bz2
$ tar -jxf android-ndk-r6b-linux-x86.tar.bz2
$ export ARCH=arm
$ export CROSS_COMPILE=$(pwd)/android-ndk-r6b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-
For the latter, you need to use a directory path containing prefixed versions (such as arm-eabi-gcc orarm-linux-androideabi-gcc), and include the prefix, but not “gcc”.
You will also need the adb tool coming from the Android SDK. You can install it this way:
$ wget http://dl.google.com/android/android-sdk_r12-linux_x86.tgz
$ tar -zxf android-sdk_r12-linux_x86.tgz
$ android-sdk-linux_x86/tools/android update sdk -u -t platform-tool
$ export PATH=$PATH:$(pwd)/android-sdk-linux_x86/platform-tools
not yet ((((
Come on, please make video tuto
that's interesting.
Thanks for sharing
Any takers to do a video status? Come on people it would be good for newbies like me and many that tme around. When teaching the community grows.
hi
i'm traing to compile module for acer a500.
but i have got an error: Nothing to be done for `default'.
my makefile:
Code:
obj-m += hello.o
KDIR := /home/hamster/android
PWD := $(shell pwd)
CCPATH := /home/hamster/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
default:
$(MAKE) ARCH=arm CROSS_COMPILE=$(CCPATH)/arm-linux-androideabi- -C $(KDIR) M=$(PWD) modules
acer kernel code is located in /home/hamster/android
could you help me?
thanks
Thanks man. The step "modules_prepare" is what did the trick for me!
Makefile including tabs
hamsterksu said:
hi
i'm traing to compile module for acer a500.
but i have got an error: Nothing to be done for `default'.
my makefile:
Code:
obj-m += hello.o
KDIR := /home/hamster/android
PWD := $(shell pwd)
CCPATH := /home/hamster/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
default:
$(MAKE) ARCH=arm CROSS_COMPILE=$(CCPATH)/arm-linux-androideabi- -C $(KDIR) M=$(PWD) modules
acer kernel code is located in /home/hamster/android
could you help me?
thanks
Click to expand...
Click to collapse
This is probably because you need to add a tab in front of your $(MAKE). Without the tab it will not recognize the command.
Help with compiling module
I am trying to compile a module for Galaxy S. I am getting this error.
# insmod hello_world.ko
insmod: init_module 'hello_world.ko' failed (Exec format error)
These are the module related options that I have enabled in the .config
CONFIG_MODULES=y
CONFIG_MODULE_FORCE_LOAD=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
Further this is the cat /proc/kmsg out put
<3>[53597.457275] hello_world: version magic '2.6.35.7-I900XXJVP-CL264642 preempt mod_unload ARMv7 ' should be '2.6.35.7-I9000XXJVP-CL264642 preempt mod_unload ARMv7 '
Why am I getting this error??
These are the steps I followed,
1. Downloaded the GT-I9000_OpenSource_GB.zip from samsung open source.
2. Change the EXTRAVERSION to EXTRAVERSION = .7-I900XXJVP-CL264642 (kernel version shown on phone is [email protected] #2)
I tried with EXTRAVERSION = [email protected] as well.
3. Added this line to the main make file -
core-y := usr/ TestModule/
5. Place the TestModule/ with the module code on the root directory.
6. Created the TestModule/Makefile and added this entry
obj-m := hello_world.o
4. On the read me of the kernel source it says to install Sourcery G++ Lite 2009q3-68 toolchain for ARM EABI, which I did.
5. Execute 'make aries_eur_defconfig'.
6. Execute make (again this is how the readme in the source says)
I have compiled this module for the emulator and it works fine, What am I doing wrong here?
Thanks in advance.
hamsterksu said:
hi
but i have got an error: Nothing to be done for `default'.
Code:
default:
$(MAKE) ARCH=arm CROSS_COMPILE=$(CCPATH)/arm-linux-androideabi- -C $(KDIR) M=$(PWD) modules
Click to expand...
Click to collapse
be sure to have {tab} not space or other symbol before: $(MAKE) in:
Code:
default:
$(MAKE) ARCH=arm CROSS_COMPILE=$(CCPATH)/arm-linux-androideabi- -C $(KDIR) M=$(PWD) modules
Hello,
I'm trying to load a module in my GS3 but I encounter problems about version. Maybe it's just a mismatch between the kernel i use to compile and the one on my phone.
I have a 3.0.31-742798 kernel version on my GS3, so I put this info in the makefile like viulian said but it didn't work.
I manage to compile and put the module on the phone, but when I want to insmod it, I've got
Code:
insmod: init_module 'hello_world.ko' failed (Exec format error)
and the /proc/kmsg say
Code:
... disagrees about version of symbol module_layout
And there no config.gz on the /proc/ dir like fabricioemmerick suggest to use
EDIT: I try to modify the symbol by copying the one of module from the phone. Have another error.
btw , with modinfo I found that the compilation always add -gc33f1bc-dirty after the subversion. Maybe something in the compilation goes wrong. Still use the stock kernel and the toolchain from the ndk sourcecode
m00gle said:
Hello,
I'm trying to load a module in my GS3 but I encounter problems about version. Maybe it's just a mismatch between the kernel i use to compile and the one on my phone.
I have a 3.0.31-742798 kernel version on my GS3, so I put this info in the makefile like viulian said but it didn't work.
I manage to compile and put the module on the phone, but when I want to insmod it, I've got
Code:
insmod: init_module 'hello_world.ko' failed (Exec format error)
and the /proc/kmsg say
Code:
... disagrees about version of symbol module_layout
And there no config.gz on the /proc/ dir like fabricioemmerick suggest to use
EDIT: I try to modify the symbol by copying the one of module from the phone. Have another error.
btw , with modinfo I found that the compilation always add -gc33f1bc-dirty after the subversion. Maybe something in the compilation goes wrong. Still use the stock kernel and the toolchain from the ndk sourcecode
Click to expand...
Click to collapse
Maybe your kernel source code version and your phone kernel version is different. If both are 3.0.31 but just the subversion is different, you can
try "insmod -f" to load. The -f option will ignore the version.
How can I get a dmesg of a specific kernel module using adb shell or any other way?
ravike14 said:
How can I get a dmesg of a specific kernel module using adb shell or any other way?
Click to expand...
Click to collapse
I'm not sure I understand the question ... you can just dmesg and grep by the module name ? Or some string that the module outputs ? You have full control
viulian said:
I'm not sure I understand the question ... you can just dmesg and grep by the module name ? Or some string that the module outputs ? You have full control
Click to expand...
Click to collapse
That's the part I don't understand, the grep part.. When I enter grep with my commamd I get as it's not a recognized command.. I'm using Windows is that the reason?
I'm using 'adb shell dmesg > dmesg.txt' how do I add the grep part for it and and the module name.. I did alot research but all are Linux kernel specific debugging guides.. What would be the exact command to grep a specific module.ko logs?
Sent from my HTC_Amaze_4G using XDA Premium 4 mobile app
ravike14 said:
I'm using 'adb shell dmesg > dmesg.txt' how do I add the grep part for it and and the module name.. I did alot research but all are Linux kernel specific debugging guides.. What would be the exact command to grep a specific module.ko logs?
Click to expand...
Click to collapse
I think I understand now
The order is this:
a) DroidSSHd from here: http://code.google.com/p/droidsshd/downloads/list
b) Busybox installer from the market.
c) Putty on your windows to connect to the phone
Now you can dmesg + grep once you are connected to the phone (don't forget to su before and allow DroidSSHd root).
You need to be connected to the phone since it is much more easier. Use the phone as your remote Linux machine.

[GUIDE][DEV][WIP] Compile unofficial CWM Recovery for Tom-Tec 7 excellent. TCC892x

Hello. After reading, reading and more reading i picked one of the most newbe freindly guides on how to make a CWM recovery for a new device.
I my case im going to build CWM recovery for the Tom-Tec 7 excellent.
It hase Android ICS V4.0.3
This guide is alsow to compile cyanogenmod for unsupported device!
I am using Ubuntu 64 bit. (Wy go for less if i dont have to.) But i gues it will work for most linux versions if you got the required packages installend. Even Max OS can be used to build i gues. But thats a bit differant guide..
Step 1:
Install the required packages
Links with info.....
Google’s official guide: http://source.android.com/source/initializing.html
Step 2:
Install java SDK, ADB and?
link adb....
[GUIDE] Lazyman's installation guide to ADB on Ubuntu 10.10 - Now with Ubuntu 11.10: http://forum.xda-developers.com/showthread.php?p=11823740#post11823740
[HOW-TO] Set up SDK/ADB on Ubuntu 11.10 | 32 & 64 bits: http://forum.xda-developers.com/showthread.php?t=1550414
RESERVED SPACE
Step 3:
In you´re ¨home¨ dir make a folder called ICS. (You can give it any name you like.. But i have to start with something right..)
Use the terminal app to cd into ICS folder. (click ¨Dash home¨ icon. from the menu on the left. In the cursor field type perminal to find the app) Just in case you dont know how to cd into the ICS folder. Just type ¨cd ICS¨ in the opend terminal app and you there. (with out the ¨¨)
Step 4:
Now we got to download the Cyanogenmod source files with the terminal app. This can take a very long time. The CWM recovery source comes bundled with the CyanogenMod source.
Pick the version you want to make a recovery for.
I have ICS on my tablet sow im gone use the ICS repo.
Code:
CWM 5 - Gingerbread
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
CWM 5:
repo init -u git://github.com/CyanogenMod/android.git -b ics
? repo init -u git://github.com/CyanogenMod/android.git -b ics android-4.0.4_r2.1 werkt..
CWM 6 - Jellybean
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
Sow i copy pastle this line in the terminal: ¨repo init -u git://github.com/CyanogenMod/android.git -b ics¨ with out the ¨¨ hit enter.
If asked give a name and email adres. Confirm with Y if its right.
Now type ¨repo sync¨ (with out the ¨¨) in the terminal and hit enter.
Downloading the source will take a very long time.
Step 5:
Now we come to the actuall compiling part. Make sure you have synced the latest source files using the "repo sync" command. Personally i run the ¨repo sync¨ command often to get the newest changes (commits).
Now issue this command :
make -j4 otatools
ore: make otatools
of with log: make otatools 2>&1 | tee tom-tec-OtaTools.log
If it wont work you can try: make CC=gcc CXX=g++ -j4 otatools
If it wont works scroll down to the part about Fix compile problems.
This will run a short time. It will make the tools needed to build the recovery. If everything executed properly a new set of files have been created in ICS/out/host/darwin-x86/bin:
Step 6:
Now we are going to add a not officially supported device. This way we can build CyanogenMod.
Using terminal emulator on your device, issue the command
Code:
dump_image boot /sdcard/boot.img
This will dump the boot image to your sdcard. Transfer it to your home directory.
My Tablet did not have the dump_image file on it..
Sow there are some options open:
Option 1:
place the dump_image file in the bin folder of the tablet. You will need to change the read/write rights of the file ofcource.
I used the root explorer app to do this.
Option 2: Take the boot.img from last official rom.
Link: https://helpdesk.tom-tec.nl/KB/a200/firmware-update-voor-de-tom-tec-atf3657-excellent-7.aspx
Ore here: http://portal.tom-tec.eu/KB/a204/firmware-update-for-the-tom-tec-atf-3657-excellent-7.aspx
ore:
http://portal.tom-tec.eu/KB/a204/firmware-update-for-the-tom-tec-atf-3657-excellent-7.aspx
Option 3: Just dump the boot.img file from the tablet. And dump the
recovery.img to.
Dump boot.img this way: dd if=/dev/block/mtdblock0 of=/mnt/ext_sd/boot.img bs=4096
Dump recovery.img this way: dd if=/dev/block/mtdblock6 of=/mnt/ext_sd/recovery.img bs=4096
You can use ADB terminal from pc ore go download a terminal from Google play store on you´re android device.
To build Android from source for a new device, you need to set up a board config and its makefiles. This is generally a long and tedious process. Luckily, if you are only building recovery, it is a lot easier. From the root of your Android source directory (assuming you've run envsetup.sh), run the following (substituting names appropriately):
Code:
build/tools/device/mkvendor.sh device_manufacturer_name device_name /your/path/to/the/boot.img
For Tom-Tec 7 excellent, the command will go as follows :
Code:
build/tools/device/mkvendor.sh YG m805_892x ~/boot.img
and for the recovery: of: build/tools/device/mkvendor.sh YG m805_892x ~/recovery.img
Please note that m805_892x is the device name..... Only use "~/boot.img" if you have the boot image in your home directory. Or else please specify the correct path.
You will receive the confirmation "Done!" if everything worked. The mkvendor.sh script will also have created the following directory in your Android source tree:
manufacturer_name/device_name
YG/m805_892x
In case of the Tom-Tec 7 excellent you can find the output files here:
/home/youreUsernames/ICS/device/YG/m805_892x
Step 7 :
Now that you have the device config ready, proceed.
Type the following code in your terminal in the source directory.
Code:
. build/envsetup.sh
gives:
including device/ti/panda/vendorsetup.sh
including device/YG/m805_892x/vendorsetup.sh
including vendor/cm/vendorsetup.sh
including sdk/bash_completion/adb.bash
This will setup the build environment for you to work.
Now launch the command
Code:
lunch full_device_name-eng
For Tom-tec 7 excellent it is: lunch full_m805_892x-eng
But seems best to me to use: lunch full_m805_892x-userdebug
This step will be done in a short time.
This will set the build system up to build for your new device. Open up the directory in a file explorer or IDE. You should have the following files: AndroidBoard.mk, AndroidProducts.mk, BoardConfig.mk, device_.mk, kernel, system.prop, recovery.fstab, and vendorsetup.sh.
Now we can go and eddit the files in the directory: /home/..username../ICS/device/YG/m805_892x
The two files you are interested in are recovery.fstab and kernel. The kernel in that directory is the stock one that was extracted from the boot.img that was provided earlier. For the most part, recovery.fstab will work on most devices that have mtd, emmc, or otherwise named partitions. But if not, recovery.fstab will need to be tweaked to support mounts and their mount points. For example, if your /sdcard mount is /dev/block/mmcblk1p1, you would need the following lines in your BoardConfig.mk
/sdcard vfat /dev/block/mmcblk1p1
Once the recovery.fstab has been properly setup, you can proceed to the next step.
Step 8 :
Now we build the recovery.
Code:
make -j4 recoveryimage
Ore with a log file:
make -j4 recoveryimage 2>&1 | tee tom-tec-revovery.log
(Will be checking build tools if clean command is used.)
This command builds the recovery image
You can use the command
Code:
make -j4 recoveryzip
Ore with a log:
make -j4 recoveryzip 2>&1 | tee tom-tec-fashableZip.log
To make a fakeflash recovery i.e. a temporary recovery to test out on the actual device.
Your recovery can then be found at "your_source_directory/OUT/target/product/m805_892x/recovery.img" and the temporary fakeflash zip in the utilities folder at the same location.
If everything works out well, you will have a working recovery.
At the moment i havent been able to make a CWM recovery with all the options working. Sow a nice bit of user feedback will help making it i hope.
Once you have working builds, notify "koush", on Github and he can build official releases and add ROM Manager support!
IF YOU HAVE ALREADY COMPILED THE SOURCE AND YOU MAKE CHANGES TO THE BoardConfig.mk YOU WILL HAVE TO DO THIS FOR YOUR NEXT BUILD
$ cd ICS
$ make clobber
ore make clean
$ . build/envsetup.sh
$ lunch full_m805_892x-eng ore lunch full_m805_892x-userdebug
of lunch en nummer kiezen
$ make -j4 recoveryimage 2>&1 | tee tom-tec-recovery.log
$ make -j4 recoveryzip
$ make -j4 bootimage
$ make -j4 userdataimage
$ make -j4 systemimage
And for building the rom: make -j4 otapackage 2>&1 | tee tom-tec-build.log
Download files:
New 2014:
CWM recover V6.0.12 last: http://www.mediafire.com/view/w40bzdl1ujh60ay/recovery
info:Making a backup and restore works. The best part i think.
Some options dont work jet. Its to late to tell much about.
Everything works except for:
USB mount
Key test close to working.
choose backup format
I made the recovery flashable from stock recovery. Download it here.
cwm recovery V6.x beta flashable:
later again
Recovery FakeFlash update.zip (recoveryzip): http://www.mediafire.com/?r3uhcqol1t55ii5
You can install this from the stock recovery. It wont harm the system! It will give you the option to make a rom backup.
Its not a full cwm recovery but it is a start.
If you install a rom using Recovery FakeFlash update.zip there will be a log file made in: /cach/recovery/
Very usefull to check if you´re rom is not booting
For me with the Tom-tec. If i restore the userdata.img the device wont fully start. It keeps loading the android image.
Dump you recovery. Flashable file.:
http://www.mediafire.com/?jk929dw8vpw1w1f
If you want to go back to the stock recovery use this file:
flashable stock recovery v3e
http://www.mediafire.com/?q8fgeqtwt2iqau8
If you´re not able to build the otatools.
Download Otatools CM9:
http://www.mediafire.com/?job80hd2n1jfnqa
Download the cm9 rom!:
http://forum.xda-developers.com/android/development/dev-unofficial-tom-tec-7-excellent-t2946072
Links:
Compile Tccutils to unpack and repack images: http://forum.xda-developers.com/showthread.php?t=1873041
How to install the SDK: http://wiki.cyanogenmod.com/index.php?title=Howto:_Install_the_Android_SDK
Official build guide by Google. http://source.android.com/source/initializing.html
Official cm guide: http://wiki.cyanogenmod.com/index.php?title=Building_from_source
Android Platform Developer's Guide: http://www.kandroid.org/online-pdk/guide/
Guide by koush: http://www.koushikdutta.com/2010/10/porting-clockwork-recovery-to-new.html
Newbe friendly guide i used: http://forum.xda-developers.com/showthread.php?t=1866545
Compile ICS on Ubuntu: http://forum.xda-developers.com/showthread.php?t=1354865
Android ROM Development From Source To End: http://forum.xda-developers.com/chef-central/android/guide-android-rom-development-t2814763
How To Port CyanogenMod Android To Your Own Device: http://wiki.cyanogenmod.org/w/Doc:_porting_intro
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Some tips :
If you want to compile CWM 6, sync the jellybean branch using the command :
Code:
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
repo sync
If you want to compile CWM 6 on a 32 bit system, you need to sync THIS source too. Instructions are given in the readme.
Run "make clobber" between builds if you change the BoardConfig.mk, or the change will not get picked up.
Credits :
Koush for this guide. Find 1 of his githubs to see the info he gives in the make files. Helps a lot.
Fix compile problems
Fix problems... This the learning part.. Fun but can be really anoying to.
First i got my self:
make otatools did not work.
-Try make -j4 out/host/linux-x86/bin/unpackbootimg
-put "unpackbootimg" in ~/android/system/out/host/linux-x86/bin then i copy it to ~/usr/bin and set chmod.
Im did see a download if it some place. Google.
-copy unpackbootimg to into /usr/bin If it is there, make it executable.
make executable: sudo chmod a+x /usr/bin/unpackbootimg
-Run make clubber from The ICS folder. Than restart pc might help to.
Problem: unpackbootimg not found. Is your android build environment set up and have the host tools been built?
build/tools/device/mkvendor.sh YG m805_892x ~/recovery.img
gives:
unpackbootimg not found. Is your android build environment set up and have the host tools been built?
fix: make -j4 out/host/linux-x86/bin/unpackbootimg
fix2: permission van de bestanden aanpassen.
fix3: copy unpackbootimg file into /usr/bin (change permissing)
(Look on google for: cp file to usr/bin)
how:
Copy unpackbootimg to you´re home dir.
sudo cp unpackbootimg /usr/bin
Give pasword.
chmod +x unpackbootimg ./unpackbootimg
Probleem . build/envsetup.sh with vendorsetup.sh not found (including device/YG/m805_892x/vendorsetup.sh
):
[email protected]:~/ICS$ . build/envsetup.sh
including device/ti/panda/vendorsetup.sh
including vendor/cm/vendorsetup.sh
including sdk/bash_completion/adb.bash
Make the file vendorsetup.sh in you´re device tree. Look at a nother device tree how it set up! Have a look in my github.
My device tree is in home dir at: / ICS/device/YG/m805_892x
Now run . build/envsetup.sh again it should be there now.
Still not there? Did you run the command from inside the right folder (project folder). I have to do cd ICS.
probleem:
build/core/product_config.mk:199: *** device/YG/m805_892x/full_m805_892x.mk: PRODUCT_NAME must be a valid C identifier, not "full_m805_892x-evm". Stop.
fix make files settings:
PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
#PRODUCT_NAME := full_m805_892x
PRODUCT_NAME := full_m805_892x-evm
PRODUCT_DEVICE := m805_892x
PRODUCT_BRAND := Android
PRODUCT_MODEL := A777
Change to this:
PRODUCT_NAME := full_m805_892x_evm
And yes you have to use _ insted of - i gues.
Make the change in: cm.mk, device_m805_892x.mk and full_m805_892x.mk
Problem building recovery:
out/target/product/K00F/recovery.img total size is 9388032
error: out/target/product/K00F/recovery.img too large (9388032 > [33792 - 8448])
make: *** [out/target/product/K00F/recovery.img] Error 1
make: *** Deleting file `out/target/product/K00F/recovery.img'
Fix use this in boardconfig (Not for the TomTec tablet but for Asus device):
BOARD_BOOTIMAGE_MAX_SIZE := $(call image-size-from-data-size,0x00010000)
BOARD_RECOVERYIMAGE_MAX_SIZE := $(call image-size-from-data-size,0x00020000)
BOARD_SYSTEMIMAGE_MAX_SIZE := $(call image-size-from-data-size,0x000FC000)
#data-size,0x00010000 this and sow on i found in the Asus stock rom.
Nother problem that i did run into trying to make ext4 images:
make_ext4fs -s -l 0x40000000 -a data out/target/product/m805_892x/userdata.img out/target/product/m805_892x/data
Need size of filesystem
make: *** [out/target/product/m805_892x/userdata.img] Error 4
make: *** Waiting for unfinished jobs..
The sizes need to be in bytes it seems.
make_ext4fs does not support hex in the -l argument
DD dump you´re partitions and you see the amount of bytes.
I put this in my BoardConfig.mk like this:
BOARD_USERDATAIMAGE_PARTITION_SIZE := 1073741824
Use this to finisch waiting jobs..:
make_ext4fs -s -l 1073741824 -a data out/target/product/m805_892x/userdata.img out/target/product/m805_892x/data
problem:
[email protected]:~/ICS$ make -j4 recoveryimage
build/core/product_config.mk:196: *** _nic.PRODUCTS.[[device/YG/m805_892x/device_m805_892x.mk]]: "device/YG/m805_892x/m805_892x-vendor-blobs.mk" does not exist. Stop.
The error is somewhare found in this file:
device_m805_892x.mk I used the original file and start adding things again.
Problem:
make: *** No rule to make target `vendor/cm/proprietary/RomManager.apk', needed by `out/target/product/m805_892x/system/app/RomManager.apk'. Stop.
make: *** Waiting for unfinished jobs....
Copy: out/target/product/m805_892x/system/bin/compcache
Copy: out/target/product/m805_892x/system/bin/handle_compcache
[email protected]:~/ICS$
For that use the terminal and cd to:
cd /vendor/cm
run:
./get-prebuilts
This will download the RomManager.apk and bit of other stuff.
Problem:
build/core/config.mk:162: *** TARGET_ARCH not defined by board config: device/
fix:
open ¨BoardConfig.mk¨
and ad: TARGET_ARCH :=arm (I have it under: TARGET_BOARD_PLATFORM)
Problem:
Which would you like? [full-eng] 5
build/core/product_config.mk:209: *** No matches for product "full_m805_892x". Stop.
Device not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Repository for m805_892x not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifest.xml.
build/core/product_config.mk:209: *** No matches for product "full_m805_892x". Stop.
** Don't have a product spec for: 'full_m805_892x'
** Do you have the right repo manifest?
fix:
What you need to do is to edit your blob to match the PRODUCT_NAME to the file name. For example with mine I have full_m805_892x therefore in this file I need to have PRODUCT_NAME to match it. Whatever error it is looking for you just need to change the PRODUCT_NAME line to match what the error shows. I did have a look in the files: cm.mk, device_m805_892x.mk, full_m805_892x.mk and vendorsetup.sh
probleem building obj/lib/libril.so out:
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: error: out/target/product/K00F/obj/lib/libril.so: unknown mandatory EABI object attribute 44
collect2: ld returned 1 exit status
make: *** [out/target/product/K00F/obj/EXECUTABLES/rild_intermediates/LINKED/rild] Error 1
make: *** Waiting for unfinished jobs....
fix: I did have to change the libril.so settings in BoardConfig.mk I did disable the libril.so settings for now.
I alsow did have to remove the libril.so file in ojb/lib of the project out folder. Than the build will go on.
repo problem:
repo sync gives:
gpg: Signature made do 01 mei 2014 22:34:18 CEST using RSA key ID 692B382C
gpg: Can't check signature: public key not found
error: could not verify the tag 'v1.12.16'
warning: Skipped upgrade to unverified version
Syncing work tree: 100% (255/255), done.
fix:
run: repo selfupdate --no-repo-verify
link: http://forum.xda-developers.com/showthread.php?t=1846651&page=97
known-issues: https://source.android.com/source/known-issues.html
Nandroid errors http://www.droidforums.net/threads/nandroid-error-codes.20546/
Edit make files..
Edit make files..
Edit:
vendorsetup.sh
This file you have to make you self first. Just make a new file in the device tree folder (Lunix OS). Not in Windows OS! Dont use Windows to edit files. Ore use the notpad+ edition if you really have to. You have to donwload it and install it.
I have this in it:
add_lunch_combo device_m805_892x-eng
add_lunch_combo full_m805_892x-eng
add_lunch_combo full_m805_892x-user
add_lunch_combo full_m805_892x-userdebug
add_lunch_combo full_m805_892x_evm-userdebug
The option: add_lunch_combo full_m805_892x_evm-userdebug will be used. Its set in the make files.
full_m805_892x.mk:
Make a nother file full_m805_892x.mk
Look in my device tree to see how its set up.
Most inportant part for now is:
PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
PRODUCT_NAME := PRODUCT_NAME := full_m805_892x_evm
PRODUCT_DEVICE := m805_892x
PRODUCT_BRAND := Android
PRODUCT_MODEL := A777
Make sure that PRODUCT_NAME := PRODUCT_NAME := full_m805_892x_evm uses the name ash used in vendorsetup.sh (and cm.mk and device_m805_892x.mk )
Yes it hase to be PRODUCT_NAME := full_m805_892x_evm
Not full_m805_892x-evm ore m805_892x-evm-userdebug its seems.
Android.mk:
Make this file in you´re device tree.
Put this in the file and save (No enter after it!):
LOCAL_PATH := $(call my-dir)
AndroidProducts.mk
Make this file in you´re device tree. Put this in the file and save:
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/full_m805_892x.mk
There is no \ behind full_m805_892x.mk. There is no \ after the last product! This file hase 1 product in it as you can see. If there are more products than ad \ after every product. But no \ on the last product listed.
BoardConfig.mk
Lost of things are set in this file.
When i made my device tree i got this line in it. (And others ofcourse)
BOARD_KERNEL_CMDLINE := console=null
I did change it to this:
BOARD_KERNEL_CMDLINE := console=vmalloc=256M
I found the cmdline when i did a search in the device kernel config..
I did look for: cmdline
The is a nother way to get the BOARD_KERNEL_CMDLINE :=
Open a terminal on you´re tablet and run: cat /proc/cmdline
ore cat /proc/cmdline > /ext_sd/cmdline.txt and it will put a text file on you´re sdcard.
I did get: cat /proc/cmdline > /ext_sd/cmdline.txt geeft : vmallc=256M logo_addr_size=0x85600000
I did left out het last part. I dont need a logo.. I need a cm bootanimation.
More someday later...
Some links for now.
Links:
build-options: http://vladnevzorov.com/2011/02/08/android-os-build-options/
Create a device tree for MTD devices: http://forum.xda-developers.com/showthread.php?t=2010281
Flash recovery image to tablet.
Flash recovery image to tablet.....
I used a terminal app on the tablet:
First run su
$ need to change to # (Make sure you´re tablet hase root and adb hase root permission.)
This command if you have put the recovery.img on external sd: dd if=/mnt/ext_sd/recovery.img of=/dev/block/mtdblock6
Ore this of you got the recovery.img on internal sd : dd if=/mnt/sdcard/recovery.img of=/dev/block/mtdblock6
ore use flash_image:
In terminal on the tablet
$ su
# cd /mnt/ext_sd
chmod 777 flash_image
(Yes you have to place the flash_image file on the sdcard)
flash_image recovery /mnt/ext_sd/recovery.img)
Using fastboot:
~$ adb reboot-bootloader
~$ fastboot flash recovery recovery.img
I did install a broken recovery on my tablet. And the current rom did not have root.. Using fastboot worked out great. The screem did stay back wile in fastboot mode.
Notes:
Needs fastboot/fastboot.exe in adb platform folder.
Needs you´re recovery.img file to in adb platform folder.
Build rom.
Build rom.....
Some links..
Links:
Tom-Tec websites:
http://www.kmb-international.com/category.php?id_category=33
Tom-tec: http://www.kmb-international.com/category.php?id_category=4&id_lang=4
http://www.tom-tec.nl/
Website Telechip: http://www.telechips.com/eng/Product/consumer_pro13.asp
Telechip wiki: http://en.wikipedia.org/wiki/Telechips
Telechips info: http://zomobo.net/telechips
QNX Neutrino for ARMv7 Cortex A-8 and A-9 Processors: http://www.qnx.com/developers/docs/...echnotes/QNX_for_ARMv7_Cortex_Processors.html
ARM7: http://review.cyanogenmod.org/#/c/15478/1/core/combo/arch/arm/armv7-a.mk
GPU Mali 400 http://en.wikipedia.org/wiki/Mali_(GPU)
Cortex-A8 http://processors.wiki.ti.com/index.php/Cortex-A8
http://androtab.info/telechips/cyanogenmod/
From Zero to Boot: Porting Android to your ARM platform:
http://blogs.arm.com/software-enablement/498-from-zero-to-boot-porting-android-to-your-arm-platform/
Source telechip site: https://www.telechips.com/technical_support/kor/opensource/opensource_list.asp
Source telechips:
Kernel: https://github.com/cnxsoft/telechips-linux
Android V4 and Hardware https://github.com/cnxsoft/telechips-android
source mali 400: https://github.com/rzk/Mali-400-r3p0-04rel0-X11-drivers
? repo init -u ssh://android.telechip.com/androidce/android/platform/manifest.git
repo sync
download android telechip sdk: ssh://android.telechips.com/androidce.com/
kernel source modded?
https://github.com/olexiyt/telechips-linux
Find kernel source for you´re device: http://forum.xda-developers.com/showthread.php?t=1808167
Some telechip doc´s:
http://wenku.baidu.com/view/6545cb13a216147917112879.html###n
XDA Telechips links:
unofficial CyanogenMod 7/ClockworkMod Recovery 5 for TCC8902/TCC8803 tablets: http://forum.xda-developers.com/showthread.php?t=1101094
Root/Clockwork mod on TCC8803 tablets: http://forum.xda-developers.com/showthread.php?t=1119778
HSG (X5A/X6) & Pandawill G11 rooting/dev thread (SetCPU & Root working!) http://forum.xda-developers.com/showthread.php?t=757992
Telechip forum:
http://www.androidtablets.net/forum/telechips-based/
http://www.androidtablets.net/forum/telechips-tcc8902-tablets/
http://androtab.info/cyanogenmod/telechips/
http://www.cnx-software.com/tag/telechips/
http://www.chinadigitalcomm.com/android-tablet.html
http://www.pandawillforum.com/forumdisplay.php?56-Telechips-Tablets
Cortex A8 not all TCC: http://www.slatedroid.com/forum/14-cortex-a8/
Some links with devices similar to the Tom-Tec 7 excellent:
Coby 8042: http://www.androidtablets.net/forum/coby-generation-3-development/
More links comming.
Usefull links:
Building a kernel: http://forum.xda-developers.com/nexus-4/general/guide-beginners-guide-to-building-t2986686
Uotkitchen v4.0 http://forum.xda-developers.com/showthread.php?t=990829
¨Some advice¨ from cyanogen: http://forum.xda-developers.com/showthread.php?t=667298
BoardConfig.mk for kernel developer and AOSP (platform) developer: http://forum.xda-developers.com/showthread.php?t=1630849
about how to unpack/repack recovery.img and boot.img http://forum.xda-developers.com/showthread.php?t=1494036
About how to unpack/repack recovery.img and boot.img https://www.miniand.com/wiki/Allwinner/Unpacking+and+building+LiveSuit+images
How to download and compile ICS from source: http://forum.xda-developers.com/showthread.php?t=1503093
List of arm 5, 6 and 7 devices: http://forum.xda-developers.com/showthread.php?t=1596800
How do you port Armv7 Roms to an Armv6 Device?: http://forum.xda-developers.com/showthread.php?t=1591878
What info to take from new device to build cwm recovery: http://androidforums.com/getitnowma...new-device-recovery-creation.html#post2714334
Dev basic´s: Source, Compiling, Github & co ~ Day 4: http://forum.xda-developers.com/showthread.php?t=1778984
Compile recovery: http://forum.xda-developers.com/showthread.php?t=1866545
Yaffey - Utility for reading, editing and writing YAFFS2 images: http://forum.xda-developers.com/showthread.php?t=1645412
port guide: http://apcmag.com/port-roms-to-your-android-device.htm
About tablets: http://www.androidtablets.net/forum...verything-you-want-know-get-started-here.html
> working-on-cyanogenmod: http://www.intervigil.net/working-on-cyanogenmod
How To Logcat: http://forum.xda-developers.com/showthread.php?t=1726238
Logcat links and some tools. 17-1-13: http://forum.xda-developers.com/showthread.php?p=36846151#post36846151
[Guide] How to use Github http://forum.xda-developers.com/showthread.php?t=1877040
[HELP/Q&A][SourceBuilding,AllDevices] The Source Building Q&A Help Thread: http://forum.xda-developers.com/showthread.php?t=2059939
Tips for CM7/CM9/CM10/CM10.1 :http://forum.xda-developers.com/showthread.php?t=1621301
[Guide and FAQ] CM9 / Android ICS for Defy:http://forum.xda-developers.com/showthread.php?t=1386680
TCC githubs:
source hardware: https://github.com/cnxsoft/telechips-android/tree/master/hardware/telechips/omx
koush githubs: https://github.com/koush
https://github.com/milaq/android_device_coby_em102
https://github.com/naobsd/cm_device_telechips_tcc8803
Kyros7015 https://github.com/csleex/cm_device_coby_kyros7015
https://github.com/Johnsel/android_device_coby_mid1125
https://github.com/mastermind1024/micromax_a70
https://github.com/abhis3k/Micromax_A70_device_folder/tree/master/a70
https://github.com/teamhacksung/and...tree/9b79b35d1554c20178cbe82fad0c8ab253630acb
Some telechips githubs:
> CX-01 mini PC https://github.com/olexiyt/cm_device_telechips_tcc8920st
common telechip stuff: https://github.com/naobsd/cm_device_telechips_common
https://github.com/naobsd/cm_device_telechips_tcc8902rt
https://github.com/naobsd/cm_device_telechips_tcc8902gb
https://github.com/naobsd/cm_device_telechips_tcc8902
https://github.com/naobsd/cm_device_telechips_tcc8803rt
https://github.com/naobsd/cm_device_telechips_tcc8803
https://github.com/milaq/android_device_coby_em102
https://github.com/Dreamboxuser/android_device_telechips_m801
https://github.com/Dreamboxuser/Vinci_m801_88
https://github.com/simone201/neak_bootable_recovery
Asure:
some prop. files https://github.com/Asure/android_vendor_samsung/blob/master/dropad/
https://github.com/Asure/android_vendor_samsung/tree/master/dropad
>> some kernel stuff: https://github.com/xxxFeLiXxxx/UltimateDropad
https://github.com/Asure/android_device_telechips_tcc8902
https://github.com/
Asure/android_vendor_telechips
Recovery builder: http://builder.clockworkmod.com/
Nice to try! Will give manufacturer and device name to!
Official CM tablets:
Not TCC..
cm_encore: https://github.com/fat-tire/android_device_bn_encore/tree/ics
https://github.com/fat-tire/android_device_bn_encore/blob/ics/device.mk
Lenovo_P700i https://github.com/Nikolas-LFDesigns/cm_device_lenovo_P700i
http://www.cyanogenmod.com/devices/nook-color
githubs nook: https://github.com/nookiedevs
http://www.cyanogenmod.com/devices/viewsonic-g-tablet
http://www.cyanogenmod.com/devices/advent-vega
CyanogenMod githubs:
https://github.com/CyanogenMod
Github by cyanogen: https://github.com/TeamChopsticks/cm_device_samsung_skyrocket
Just for me again. Just in case
Partial success on Ferguson S3 clone of this board
Hello,
using your tutorial I was able to successfully compile the fakeflash in-memory version (recoveryzip) from current ICS tree (v6.0.1.2) - View attachment rec-fakeflash-FergS3-v2.zip for Ferguson S3 device based on the same chipset. The touch variant on ICS tree did not build.
However, I have to note that the boot image does not work (the real fstab is generated incorrectly during bootup so it can't mount anything). But since the fakeflash ZIP image works, it is simple to boot into it without replacing the original recovery.
A few things had to be changed in ICS/device/YG/m805_892x/ directory:
There is no "central button", so the BoardConfig.mk must contain following line (you can just uncomment it):
Code:
BOARD_HAS_NO_SELECT_BUTTON := true
To backup correctly .android_secure and be able to use the external SD card for backups at the same time, the recovery.fstab lines for SD and nand were changed to:
Code:
/external_sd vfat /dev/block/mmcblk0p1 /dev/block/mmcblk0
/sdcard vfat /dev/block/ndda1 /dev/block/ndda
UPDATE: if you plan to use sd-ext partition as well (e.g. ext3 partition for Link2SD), you will also need following line (not included in the attatched zip image):
Code:
/sd-ext auto /dev/block/mmcblk0p2
Or maybe we could extend it just in case (if the internal SD-card is usable for this):
Code:
/sd-ext auto /dev/block/mmcblk0p2 /dev/block/ndda2
I have also added following line to BoardConfig.mk based on the (non-working) on-line builder, but it works even without it, so it might not be necessary
Code:
TARGET_ARCH_VARIANT := armv7-a
I´m happy my thread did help you. I´ll well keep adding new stuff to tis thread over time Im first trying to make a working rom and recovey for my self at the moment.
I see you try builing the for JB. Make files for JB work a bit differnt than from ICS it seems to me after a short try. I havent tryed a touch version my self jet. But if you know a nice github that is for making a touch version let me know.
To fix you´re boot.img i gues you should try and unpack the original and the 1 you build. Compaire them. There is a nice guide with tools + instruction here:
http://forum.xda-developers.com/showthread.php?p=23298690#post23298690
I got my self a working boot.img that way. Hope it will be a bit of help to you. Have a look how others use the make files to putt the right stuff in the boot.img and recovery.img
I to did have to use: BOARD_HAS_NO_SELECT_BUTTON := true
to get the button working. I wanted to add that in my guide when i get my rom working.
I would just keep this part in you´re BoardConfig if it works: TARGET_ARCH_VARIANT := armv7-a
maybe even have to make it like this? armv7-a-neon
if you have the neon feature. I think sow.
Try the android info app.
Thx for you´re nice post. If you make a nice github i would like to check it out
Its songs werry interesting for me... I am too want get building CM9/10 for this tablets (i have one... its clone of you tablet named Enot j101 - CPU=Telechip TCC892X GPU=Mali 400mp Ram=512mb (ddr3 - ?) NAND=4Gb Dafault_build=Android 4.0.3 (suckasway )...
I am builds Roms from source for other device, but here many problems...
P.S. I make screenshot by ADB... LOOK on build date... If be needed (for proprientary - i am make dump of system).
And please say you status on Rom..
Hi,
I have some more info on the device here:
Some device info here:
http://www.androidworld.nl/forum/to...ellent-7-inch-android-4-0-tablet-atf3657.html
http://www.androidworld.nl/forum/tom-tec/34668-tom-tec-7-excellent-adb-terminal-info.html
Its Dutch but you're be able te get the specs.
I almost have a working rom at the moment. Some lib*.so file dont work and about 4 framework files.
The picture is to small for me to see right. sorry.
AntiBillOS said:
Its songs werry interesting for me... I am too want get building CM9/10 for this tablets (i have one... its clone of you tablet named Enot j101 - CPU=Telechip TCC892X GPU=Mali 400mp Ram=512mb (ddr3 - ?) NAND=4Gb Dafault_build=Android 4.0.3 (suckasway )...
I am builds Roms from source for other device, but here many problems...
P.S. I make screenshot by ADB... LOOK on build date... If be needed (for proprientary - i am make dump of system).
And please say you status on Rom..
Click to expand...
Click to collapse
Great! Thank you very much! I'm trying to build mk802 recovery image myself. Your post helps me so much!:good:
XmiData Fail In Odin
Solved
can anyone help me with this error
grep: build/target/board/generic/recovery.fstab: No such file or directory
Can I use kernel built from kernel source of Android 5 to build rom for Android 7?
My device repositories are not available on github, But I got device tree and vendor blobs by making changes in similar device repo. That reference device's kernel's lineageos_defconfig is situated in htc msm8974 kernel repo. So how can I get lineageos_defconfig for my device, and which other my device related kernel files(.dtsi or any other) I have to push in htc msm8974 repo and get those files to make things ready for build?
Please help......

[GUIDE] How to compile kernel for Xperia E3.

This guide is focused on xperia e3 but for other devices process will be simler too.
This guide is not in good shape now i will keep improving it and making it easier and better.
if xperia e3 don,t have too many developers then become one.
Requirements
linux os. -recommended ubuntu 14.04 LTS
(you can install ubuntu on virtualbox or dual boot ubuntu with windows)
cross compiler tool chain -recomended Linaro GCC 4.9.3 optimized for arm-cortex_a7
kernel source code. download it from sony or you can compile my nitrogen kernel only if you have D2212/02 recomended.
unlocked bootloader
tools for building boot.img Download HERE
Sony Kernel
D2202/12 DOWNLOAD
D2203/06/43 DOWNLOAD
Nitrogen Kernel
D2202/12/03/06/43 DOWNLOAD
config for lte varriants is not uploaded but u may find it in your device /proc/config.gz
extarct config from config.gz and rename it to Nitrogen_lte_defconfig and put it in
<kernel source folder>/arch/arm/config/<here>
Setting up Environment in Ubuntu.
boot up ubuntu and open Home directory.
create two new folder.
one with name "toolchain"
one with name "build"
now extract your toolchain to toolchain folder it must contain these folders
Code:
arm-cortex_a7-linux-gnueabihf
bin
include
lib
libexec
share
(depends on toolchain you have)
Extracting Nitrogen source code
if you downloaded zip then extract that zip home dir.
then rename flamingo-kernel folder to kernel
else you can use these commands
Code:
sudo apt-get update
sudo apt-get install git
then
Code:
git clone https://github.com/vinay94185vinay/Flamingo-kernel.git
after that rename flamingo kernel to kernel.
How to extract sony source code
open terminal type
Code:
tar -xjvf
then drag n drop source code file
then hit enter. (it will extract files in home firectory)
open your firmware number folder. eg: 18.5.C.0.19
delete extarnal folder then move/copy "kernel" folder to home dir.
and then extract build tools to build folder.
Compiling.
open an terminal (CTRL+ALT+T) and type
Code:
cd Kernel
(this will change directory to kernel folder.)
then type
Code:
export CROSS_COMPILE=[COLOR="Green"]~/toolchain/bin/[/COLOR][COLOR="Red"]arm-cortex_a7-linux-gnueabihf-[/COLOR]
(red line depend on tool chain and green line on it,s location)
how to find correct red line for toolchain.
open toolchain folder
then bin
in my case it contains files like
arm-cortex_a7-linux-gnueabihf-addr2line
arm-cortex_a7-linux-gnueabihf-ar
arm-cortex_a7-linux-gnueabihf-as
see all files contains that red line.
now you must understood how to know that line.
for sony kernel source code type
For D2202 and D2212
Code:
make [COLOR="Red"]ARCH=arm CROSS_COMPILE=$CROSS_COMPILE[/COLOR] [COLOR="Green"]arima_8226ds_dp_defconfig[/COLOR]
For D2203 and D2206 and D2243
Code:
make [COLOR="Red"]ARCH=arm CROSS_COMPILE=$CROSS_COMPILE[/COLOR] [COLOR="Green"]arima_8926ss_dp_defconfig[/COLOR]
"RED" line make sure that you compile kernel for arm based cpu that is in your android device
if you remove this line you will end up making a kernel for your pc.
"GREEN" is to load an preset default configuration for compiling kernel
it contains what thing,s has to be compiled in this kernel.
for nitrogen kernel source code type
D2202 and D2212
Code:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE Nitrogen_defconfig
D2203 and D2206 and D2243
Code:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE Nitrogen_lte_defconfig
Now type for dualcore cpu
Code:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE [COLOR="red"]-j3[/COLOR]
"red" -j3 tell,s compiler to make 3 job,s which is good for intel dual core cpu.
if you have dual core amd cpu it should be better for you to have 2 job,s mean -j2
and -j4 for quard core.
for quard core cpu
Code:
make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE -j5
(do it like this cores + 1)
now wait for untill your kernel get compiled.
it may take long time. depend on how fast and how many cores your cpu have.
if you don,t get any error then
you have compiled your kernel :good:.
building boot.img
copy zimage from kernel/arch/arm/boot folder.
to build/msm8226_flamingo/<zimage>
now in msm8226_flamingo folder.
open new_stock_files/<according to your device>/
copy ramdisk. and dt.img to msm8226_flamingo folder.
now open terminal (CTRL+ALT+T) and type
Code:
cd build/msm8226_flamingo/
then
Code:
./makeit.sh
(don,t forget dot.)
now you can see boot.img in build/msm8226_flamingo folder.
now you can flash boot.img with fastboot or flashtool.
feel free to ask if you don,t understand or have error in any step.
RESERVED
adding features.
adding your and kernel name in kernel version.
adding kernel name
in kernel folder you will see Makefile open and edit it.
find these lines.
Code:
VERSION = 3
PATCHLEVEL = 4
SUBLEVEL = 0
[COLOR=Red]EXTRAVERSION = [/COLOR]
NAME = Saber-toothed Squirrel
write name of kernel next to extraversion (highlited in red)
like this
Code:
VERSION = 3
PATCHLEVEL = 4
SUBLEVEL = 0
[COLOR=red]EXTRAVERSION = -My_Kernel[/COLOR]
NAME = Saber-toothed Squirrel
adding your name.
open kernel/scripts
edit file called mkcompile_h
find lines like this
Code:
# [All][Main][SI][DMS][44408][akenhsu] Fix the builder and build machine avoiding 'arima' in kernel version 20140926 BEGIN
# LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')
LINUX_COMPILE_BY=`echo [COLOR=red]build_admin`[/COLOR]
# [All][Main][SI][DMS][44408][akenhsu] 20140926 END
else
LINUX_COMPILE_BY=$KBUILD_BUILD_USER
fi
if test -z "$KBUILD_BUILD_HOST"; then
# [All][Main][SI][DMS][44408][akenhsu] Fix the builder and build machine avoiding 'arima' in kernel version 20140926 BEGIN
# LINUX_COMPILE_HOST=`hostname`
LINUX_COMPILE_HOST=`echo[COLOR=green] ubuntu_builder`[/COLOR]
# [All][Main][SI][DMS][44408][akenhsu] 20140926 END
change red one to your name and green one to your host it will look like this in kernel version.
build_admin@ubuntu_builder
change it like this
Code:
# [All][Main][SI][DMS][44408][akenhsu] Fix the builder and build machine avoiding 'arima' in kernel version 20140926 BEGIN
# LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')
LINUX_COMPILE_BY=`echo [COLOR=red]my_name`[/COLOR]
# [All][Main][SI][DMS][44408][akenhsu] 20140926 END
else
LINUX_COMPILE_BY=$KBUILD_BUILD_USER
fi
if test -z "$KBUILD_BUILD_HOST"; then
# [All][Main][SI][DMS][44408][akenhsu] Fix the builder and build machine avoiding 'arima' in kernel version 20140926 BEGIN
# LINUX_COMPILE_HOST=`hostname`
LINUX_COMPILE_HOST=`echo[COLOR=red] i_compiled_on[/COLOR]`
# [All][Main][SI][DMS][44408][akenhsu] 20140926 END
adding governors and i/o sheduer
http://xda-university.com/as-a-developer/adding-features-to-your-kernel
fixing error.
#1
if you get error with line
Code:
[-Werror=implicit-function-declaration]
like this one
Code:
CC drivers/video/msm/mdss/mdss_dsi_host.o
CC drivers/video/msm/mdss/mdss_dsi_cmd.o
CC drivers/video/msm/mdss/mdss_dsi_panel.o
drivers/video/msm/mdss/mdss_dsi_panel.c: In function ‘mdss_dsi_panel_reset’:
drivers/video/msm/mdss/mdss_dsi_panel.c:291:3: error: implicit declaration of function ‘mdss_dsi_request_gpios’ [COLOR="Red"][-Werror=implicit-function-declaration][/COLOR]
rc = mdss_dsi_request_gpios(ctrl_pdata);
^
cc1: some warnings being treated as errors
make[4]: *** [drivers/video/msm/mdss/mdss_dsi_panel.o] Error 1
make[3]: *** [drivers/video/msm/mdss] Error 2
make[2]: *** [drivers/video/msm] Error 2
make[1]: *** [drivers/video] Error 2
make: *** [drivers] Error 2
then open makefile in kernel folder and find line
Code:
CFLAGS_KERNEL =
and make it like this
Code:
CFLAGS_KERNEL = -w
then save and exit you will not see that error again.
I will try it
Thanks bro
arpit.j said:
I will try it
Thanks bro
Click to expand...
Click to collapse
export command was incorrect.
i fixed it and added details of it.
hi,
guy,s some info here.
if you compile nitrogen kernel from source code it will give you some extra features that i added in source code after release of Nitrogen 4.1.
nitrogen kernel source code have
- prima wifi drivers
- headset in high performance mode
- zzmove governor
- 30% faster input output
- enhance power efecency with series of NVIDIA patches
- some tweaks for ASoc
- Enabled TCP Congestions like high speed,westwood etc.
if you want these features then compile kernel from source.
i will keep adding features to source code
only D2202 and D2212 is supported.
Don,t forget the poll at top of thread.
any on making any kernel.
Hello
Thank you ver much, Vinay
Today i built my first Android kernel for D2203. Before i had your kernel LTE.7z from this post http://forum.xda-developers.com/xperia-e3/general/simplified-guide-to-root-sony-xperia-e3-t3012248 It was work perfectly. On my new kernel i have no CWM recovery. How to restore recovery?
Thanks
pjk11 said:
Hello
Thank you ver much, Vinay
Today i built my first Android kernel for D2203. Before i had your kernel LTE.7z from this post http://forum.xda-developers.com/xperia-e3/general/simplified-guide-to-root-sony-xperia-e3-t3012248 It was work perfectly. On my new kernel i have no CWM recovery. How to restore recovery?
Thanks
Click to expand...
Click to collapse
for a recovery you need a ramdisk with recovery. Tell me which recovery you want i can give you that ramdisk.
Sent from my Xperia E3 using XDA Free mobile app
vinay said:
for a recovery you need a ramdisk with recovery. Tell me which recovery you want i can give you that ramdisk.
Sent from my Xperia E3 using XDA Free mobile app
Click to expand...
Click to collapse
I have this kernel with cwm:
Code:
[email protected]:/ $ uname -a
Linux localhost [email protected] #2 SMP PREEMPT Wed Mar 25 19:54:11 IST 2015 armv7l GNU/Linux
Where i can download this sources, your config, and ramdisk with cwm?
Thanks.
pjk11 said:
I have this kernel with cwm:
Code:
[email protected]:/ $ uname -a
Linux localhost [email protected] #2 SMP PREEMPT Wed Mar 25 19:54:11 IST 2015 armv7l GNU/Linux
Where i can download this sources, your config, and ramdisk with cwm?
Thanks.
Click to expand...
Click to collapse
use this ramdisk while building boot.img
http://www.mediafire.com/download/w1xt9um1dm95mpp/ramdisk.cpio.gz
extract my config from your device.
/proc/config.gz
vinay said:
use this ramdisk while building boot.img
http://www.mediafire.com/download/w1xt9um1dm95mpp/ramdisk.cpio.gz
extract my config from your device.
/proc/config.gz
Click to expand...
Click to collapse
Thank you very much.
I have a questions. In normal linux complining i copy myconfig to .config and make oldconfig. But i dont how do it in android? And what are these files:
Code:
[[email protected] configs [j0]$>>> ls *arima*
arima_8226ds_ap_defconfig arima_8226ds_pdp2_defconfig arima_8226ss_dp_defconfig arima_8926ds_ap_defconfig arima_8926ds_pdp2_defconfig arima_8926ss_dp_defconfig
arima_8226ds_dp2_defconfig arima_8226ds_sp_defconfig arima_8226ss_pdp1_defconfig arima_8926ds_dp2_defconfig arima_8926ds_sp_defconfig arima_8926ss_pdp1_defconfig
arima_8226ds_dp_defconfig arima_8226ss_ap_defconfig arima_8226ss_pdp2_defconfig arima_8926ds_dp_defconfig arima_8926ss_ap_defconfig arima_8926ss_pdp2_defconfig
arima_8226ds_pdp1_defconfig arima_8226ss_dp2_defconfig arima_8226ss_sp_defconfig arima_8926ds_pdp1_defconfig arima_8926ss_dp2_defconfig arima_8926ss_sp_defconfig
[[email protected] configs [j0]$>>>
Whats is difference of these files?
Regards
pjk11 said:
Thank you very much.
I have a questions. In normal linux complining i copy myconfig to .config and make oldconfig. But i dont how do it in android? And what are these files:
Code:
[[email protected] configs [j0]$>>> ls *arima*
arima_8226ds_ap_defconfig arima_8226ds_pdp2_defconfig arima_8226ss_dp_defconfig arima_8926ds_ap_defconfig arima_8926ds_pdp2_defconfig arima_8926ss_dp_defconfig
arima_8226ds_dp2_defconfig arima_8226ds_sp_defconfig arima_8226ss_pdp1_defconfig arima_8926ds_dp2_defconfig arima_8926ds_sp_defconfig arima_8926ss_pdp1_defconfig
arima_8226ds_dp_defconfig arima_8226ss_ap_defconfig arima_8226ss_pdp2_defconfig arima_8926ds_dp_defconfig arima_8926ss_ap_defconfig arima_8926ss_pdp2_defconfig
arima_8226ds_pdp1_defconfig arima_8226ss_dp2_defconfig arima_8226ss_sp_defconfig arima_8926ds_pdp1_defconfig arima_8926ss_dp2_defconfig arima_8926ss_sp_defconfig
[[email protected] configs [j0]$>>>
Whats is difference of these files?
Regards
Click to expand...
Click to collapse
all are default configrations.
you should put config in /arch/arm/config/<here>
and rename it to something like my_defconfig
then use make ARCH=arm CROSS_COMPILE=$ROSS_COMPILE my_defconfig
because you may have to use make clean&&make mrproper many times which wiill delete .config keeping it in arch/arm/config
will kepp it safe.
and
arima_8226ds_dp_defconfig
is config for xperia e3.
arima (some sort of secret name for xperia e3)
8226 (name of cpu)
ds (d=>dual s=> sim)
dp (i don,t know)
defconfig (default config)
vinay said:
all are default configrations.
you should put config in /arch/arm/config/<here>
and rename it to something like my_defconfig
then use make ARCH=arm CROSS_COMPILE=$ROSS_COMPILE my_defconfig
because you may have to use make clean&&make mrproper many times which wiill delete .config keeping it in arch/arm/config
will kepp it safe.
and
arima_8226ds_dp_defconfig
is config for xperia e3.
arima (some sort of secret name for xperia e3)
8226 (name of cpu)
ds (d=>dual s=> sim)
dp (i don,t know)
defconfig (default config)
Click to expand...
Click to collapse
Thank you very much, Vinay.
Regards
guide updated.
added link to a guide about adding features to your kernel
if you wan,t to learn anything more just ask me..
vinay pls hlp me , nothing happens after adding this ( export CROSS_COMPILE=~/toolchain/bin/arm-cortex_a7-linux-gnueabihf-) line in terminal , do i need to install some xtra apps in ubuntu? because i have install ubuntu for the 1st time through virtualbox, and pls make a video for this guide.
himfa71 said:
vinay pls hlp me , nothing happens after adding this ( export CROSS_COMPILE=~/toolchain/bin/arm-cortex_a7-linux-gnueabihf-) line in terminal , do i need to install some xtra apps in ubuntu? because i have install ubuntu for the 1st time through virtualbox, and pls make a video for this guide.
Click to expand...
Click to collapse
nothing will happen after that command actually it tells terminal $CROSS_COMPILE is equal to home/username/toolchain/bin/arm-cortex_a7-linux-gnueabihf-
vinay pls see this , im getting these error,
Code:
[email protected]:~$ cd kernel
[email protected]:~/kernel$ export CROSS_COMPILE=~/toolchain/bin/arm-cortex_a7-linux-gnueabihf-
[email protected]:~/kernel$ make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE Nitrogen_defconfig
drivers/cpufreq/Kconfig:236:warning: multi-line strings not supported
drivers/cpufreq/Kconfig:288:warning: multi-line strings not supported
drivers/net/wireless/ath/Kconfig:27: can't open file "drivers/net/wireless/ath/carl9170/Kconfig"
make[1]: *** [Nitrogen_defconfig] Error 1
make: *** [Nitrogen_defconfig] Error 2
[email protected]:~/kernel$ make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE -j3
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/cpufreq/Kconfig:236:warning: multi-line strings not supported
drivers/cpufreq/Kconfig:288:warning: multi-line strings not supported
drivers/net/wireless/ath/Kconfig:27: can't open file "drivers/net/wireless/ath/carl9170/Kconfig"
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
[email protected]:~/kernel$
himfa71 said:
vinay pls see this , im getting these error,
Code:
[email protected]:~$ cd kernel
[email protected]:~/kernel$ export CROSS_COMPILE=~/toolchain/bin/arm-cortex_a7-linux-gnueabihf-
[email protected]:~/kernel$ make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE Nitrogen_defconfig
drivers/cpufreq/Kconfig:236:warning: multi-line strings not supported
drivers/cpufreq/Kconfig:288:warning: multi-line strings not supported
drivers/net/wireless/ath/Kconfig:27: can't open file "drivers/net/wireless/ath/carl9170/Kconfig"
make[1]: *** [Nitrogen_defconfig] Error 1
make: *** [Nitrogen_defconfig] Error 2
[email protected]:~/kernel$ make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE -j3
scripts/kconfig/conf --silentoldconfig Kconfig
drivers/cpufreq/Kconfig:236:warning: multi-line strings not supported
drivers/cpufreq/Kconfig:288:warning: multi-line strings not supported
drivers/net/wireless/ath/Kconfig:27: can't open file "drivers/net/wireless/ath/carl9170/Kconfig"
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
[email protected]:~/kernel$
Click to expand...
Click to collapse
did you used git clone or downloaded zip.
TRY
Code:
chmod -R 777 ~/kernel
and ~/kernel is path to folder which contains kernel source code.
i downloaded the zip, and after this "chmod -R 777 ~/kernel" command im still getting same error,
thanks vinay for help, but now im leaving this kernel compiling, thanks.

[HOW TO] Convert back Qualcomm's DTB to DTS file, extract kernel config

I assume you are a ROM builder. When your device vendor continue violate the GPL, refuse to open the device kernel source, let's we reverse engineering our device stock kernel.
Dedicated to ex Google Hugo Barra. Ends up as a GPL violator a pretty miserable.
Tools:
Python tool csplitb https://github.com/mypalmike/csplitb
dtc binary from out/target/product/<device>/obj/KERNEL_OBJ/scripts/dtc
unpackbootimg from out/host/linux-x86/bin
extract-ikconfig from kernel/<vendor>/<device>/scripts
Copy all needed tools to your PATH, $HOME/bin/
Steps:
Unpack stock boot.img using unpackbootimg:
Code:
$ mkdir boot
$ cd boot
$ unpackbootimg -i ../boot.img -o .
Split DT image to DTB files, for MSM8916 in this example:
Code:
$ mkdir dtb
$ cd dtb
$ csplitb.py --prefix msm8916- --suffix .dtb --number 4 D00DFEED ../boot.img-dt
Find proper DTB file for your device, device model "Qualcomm Technologies, Inc. MSM 8916 QRD SKUM" string from my device dmesg output in this example:
Code:
$ grep -r "QRD SKUM"
Binary file msm8916-0011.dtb matches
Convert DTB to DTS files:
Code:
$ dtc -I dtb -O dts -o ../msm8916-0011.dts msm8916-0011.dtb
$ cd ../
Extract kernel config
Code:
extract-ikconfig boot.img-zImage > msm8916_defconfig
This how to success story: http://forum.xda-developers.com/android/development/rom-cyanogenmod-unofficial-builds-t3200883
RESERVED.
what is use of convert DTB TO DTS
ela1103 said:
what is use of convert DTB TO DTS
Click to expand...
Click to collapse
Reconstruct a closed source kernel or vendor kernel update not in sync to their open source version or vendor DTS completely not available, prepared outside the kernel source.
Amazing! Hope Hugo Barra stumbles upon this post!
Nice Ketut! I love the way you live OpenSource!
guys, someone can send me dtc binary for me please? I extrcting the boot img of mtk device and I dont have the dtc binary
Thanks and sorry fir my bad english
Thanks for sharing this. :highfive:
Do you know any way to circumvent lz4 zImage compression? Trying to do it for Xiaomi Mi 5.
@ketut.kumajaya What if my boot.img does not have any dt files. My boot.img-dt is 0 bytes and the error prints this:
Traceback (most recent call last):
File "/home/nick/bin/csplitb.py", line 64, in <module>
main()
File "/home/nick/bin/csplitb.py", line 61, in main
return csplitb.run()
File "/home/nick/bin/csplitb.py", line 26, in run
self.mm = mmap.mmap(f.fileno(), 0)
ValueError: cannot mmap an empty file
Halp
For anyone that may need, another way to split appended dtbs is by using this tool.
i have only stock boot and recovery how to unpack in decompile plz upload video your tutroial
@ketut.kumajaya on step 2 you using this value D00DFEED, and what is that value mean? Is that value for dtb header or what? Can u explain sir, thanks
Guizão BR said:
guys, someone can send me dtc binary for me please? I extrcting the boot img of mtk device and I dont have the dtc binary
Thanks and sorry fir my bad english
Click to expand...
Click to collapse
Sometimes device tree binaries live in a separate partition. That's sort of the idea behind a device tree - it's just that the bindings on ARM are so in flux that keeping a static device tree embedded in "firmware" becomes impractical, and so vendors will ship a kernel with a device tree (or a bundle of device trees) appended to it.
You can get the 'dtc' binary by installing the 'device-tree-compiler' package on Ubuntu, or just use 'kernel/scripts/dtc' if you've got a kernel built.
zainifame said:
@ketut.kumajaya on step 2 you using this value D00DFEED, and what is that value mean? Is that value for dtb header or what? Can u explain sir, thanks
Click to expand...
Click to collapse
Instead of using that tool, use this one, it requires no arguments - https://github.com/dianlujitao/split-appended-dtb.
Hope it helps
Can anyone explain to me, how to extract touchscreen firmware from kernel binary? Thanks

Guide To Build Sultanxda CM13

since i'm a flashaholic and a great fan of sultan's cm13, i'm trying my hands on android rom development and i thought the first step would be to learn how to compile a rom from source and the best choice was cm13 by sultan.
i'm using google's cloud platform for vm instance and using ubuntu 14.04.
i've used @akhilnarang script (link to his github:github.com/akhilnarang/scripts ) to setup the build environment and followed these commands to build the rom.
Code:
~$ repo init -u git://github.com/CyanogenMod/android.git -b stable/cm-13.0-ZNH2K
~$ mkdir .repo/local_manifests
~$ curl https://raw.githubusercontent.com/sultanxda/android/master/bacon/cm-13.0-stable/local_manifest.xml > .repo/local_manifests/local_manifest.xml
~$ repo sync -c -j10
~$ ./patcher/patcher.sh
~$ make clobber
~$ . build/envsetup.sh
~$ lunch cm_bacon-user
~$ time mka bacon -j8
but after 1h or so the compiler spilled these errors
Code:
Package OTA: /home/arjunmanoj1995/out/target/product/bacon/cm_bacon-ota-f59d4b6456.zip
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 1782, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 1674, in main
], extra_option_handler=option_handler)
File "/home/arjunmanoj1995/build/tools/releasetools/common.py", line 826, in ParseOptions
if extra_option_handler is None or not extra_option_handler(o, a):
File "./build/tools/releasetools/ota_from_target_files", line 1644, in option_handler
from backports import lzma
ImportError: No module named backports
make: *** [/home/arjunmanoj1995/out/target/product/bacon/cm_bacon-ota-f59d4b6456.zip] Error 1
make: Leaving directory `/home/arjunmanoj1995'
#### make failed to build some targets (01:07:57 (hh:mm:ss)) ####
can someone plz help me resolve this error.
baconxda said:
since i'm a flashaholic and a great fan of sultan's cm13, i'm trying my hands on android rom development and i thought the first step would be to learn how to compile a rom from source and the best choice was cm13 by sultan.
i'm using google's cloud platform for vm instance and using ubuntu 14.04.
i've used @akhilnarang script (link to his github:github.com/akhilnarang/scripts ) to setup the build environment and followed these commands to build the rom.
Code:
~$ repo init -u git://github.com/CyanogenMod/android.git -b stable/cm-13.0-ZNH2K
~$ mkdir .repo/local_manifests
~$ curl https://raw.githubusercontent.com/sultanxda/android/master/bacon/cm-13.0-stable/local_manifest.xml > .repo/local_manifests/local_manifest.xml
~$ repo sync -c -j10
~$ ./patcher/patcher.sh
~$ make clobber
~$ . build/envsetup.sh
~$ lunch cm_bacon-user
~$ time mka bacon -j8
but after 1h or so the compiler spilled these errors
Code:
Package OTA: /home/arjunmanoj1995/out/target/product/bacon/cm_bacon-ota-f59d4b6456.zip
Traceback (most recent call last):
File "./build/tools/releasetools/ota_from_target_files", line 1782, in <module>
main(sys.argv[1:])
File "./build/tools/releasetools/ota_from_target_files", line 1674, in main
], extra_option_handler=option_handler)
File "/home/arjunmanoj1995/build/tools/releasetools/common.py", line 826, in ParseOptions
if extra_option_handler is None or not extra_option_handler(o, a):
File "./build/tools/releasetools/ota_from_target_files", line 1644, in option_handler
from backports import lzma
ImportError: No module named backports
make: *** [/home/arjunmanoj1995/out/target/product/bacon/cm_bacon-ota-f59d4b6456.zip] Error 1
make: Leaving directory `/home/arjunmanoj1995'
#### make failed to build some targets (01:07:57 (hh:mm:ss)) ####
can someone plz help me resolve this error.
Click to expand...
Click to collapse
It seems like your missing the backports module to build certain parts of the rom. As i looked at the prepare script you used I noticed an commented piece of code in there refering exectly to your error regarding lzma backports:
Code:
#echo Cloning LZMA repo
#git clone https://github.com/peterjc/backports.lzma /tmp/backports.lzma
#cd /tmp/backports.lzma
#sudo python2 setup.py install
#python2 test/test_lzma.py
#rm -rf /tmp/backports.lzma
#echo LZMA compression for ROMs enabled
#echo "WITH_LZMA_OTA=true" >> ~/.bashrc
Running this, or running the prepare script again with this uncommented might acctualy fix your import problem
gs-crash-24-7 said:
It seems like your missing the backports module to build certain parts of the rom. As i looked at the prepare script you used I noticed an commented piece of code in there refering exectly to your error regarding lzma backports:
Code:
#echo Cloning LZMA repo
#git clone https://github.com/peterjc/backports.lzma /tmp/backports.lzma
#cd /tmp/backports.lzma
#sudo python2 setup.py install
#python2 test/test_lzma.py
#rm -rf /tmp/backports.lzma
#echo LZMA compression for ROMs enabled
#echo "WITH_LZMA_OTA=true" >> ~/.bashrc
Running this, or running the prepare script again with this uncommented might acctualy fix your import problem
Click to expand...
Click to collapse
thanks mate, i'll give this a try and report back
edit: thanks .... it worked...:good:
I can't install the backports thing... I can't use the script to setup the build environment. How did you do it @baconxda? I uncommented those lines and it says that it doesn't have the lzma.h thing.
gs-crash-24-7 said:
It seems like your missing the backports module to build certain parts of the rom. As i looked at the prepare script you used I noticed an commented piece of code in there refering exectly to your error regarding lzma backports:
Code:
#echo Cloning LZMA repo
#git clone https://github.com/peterjc/backports.lzma /tmp/backports.lzma
#cd /tmp/backports.lzma
#sudo python2 setup.py install
#python2 test/test_lzma.py
#rm -rf /tmp/backports.lzma
#echo LZMA compression for ROMs enabled
#echo "WITH_LZMA_OTA=true" >> ~/.bashrc
Running this, or running the prepare script again with this uncommented might acctualy fix your import problem
Click to expand...
Click to collapse
Cesaragus said:
I can't install the backports thing... I can't use the script to setup the build environment. How did you do it @baconxda? I uncommented those lines and it says that it doesn't have the lzma.h thing.
Click to expand...
Click to collapse
just run the script then run those commands quoted above, thats it.
@baconxda Any idea if this ROM could be built for any other device?
Has.007 said:
@baconxda Any idea if this ROM could be built for any other device?
Click to expand...
Click to collapse
only for devices supported by @Sultanxda.

Categories

Resources