My linux build machine died some days ago, and then I lost my working build environment.
Luckily I found this helpful post on XDA with a working VM out-of-the-box and then, after the usual repo sync… I found a strange error during kernel build
/bin/sh: -c: line 0: syntax error near unexpected token `('
/home/android/i9515/kernel/samsung/jf/scripts/Makefile.build:307: recipe for target 'scripts/mod/empty.o' failed
Changing the /bin/sh from /bin/dash to /bin/bash the error changes a little bit and shows some other infos
/bin/sh: -c: line 0: `set -e; echo ' CC scripts/mod/empty.o'; /home/android/i9515/kernel/samsung/jf/scripts/gcc-wrapper.py /home/android/i9515/prebuilts/misc/linux-x86/ccache/ccache /home/android/i9515/prebuilts/gcc/linux-x86/arm/arm-eabi-4.9/bin/arm-eabi-gcc -Wp,-MD,scripts/mod/.empty.o.d -nostdinc -isystem ccache: FATAL: /home/android/i9515/prebuilts/gcc/linux-x86/arm/arm-eabi-4.9/bin/arm-eabi-gcc: execv returned (No such file or directory)
So…this is simple an error with my cross compiler configuration. Google team changes the compiler name from arm-eabi to arm-linux-androideabi, and so it’s very simple to fix.
This is the diff for the “BoardConfigCommon.mk” file
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index 872bdc9..fe64f87 100644
@@ -43,8 +43,8 @@ BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x02000000
BOARD_KERNEL_PAGESIZE := 2048
TARGET_KERNEL_CONFIG := cyanogen_jfve_defconfig
TARGET_KERNEL_SOURCE := kernel/samsung/jf
-KERNEL_TOOLCHAIN := $(ANDROID_BUILD_TOP)/prebuilts/gcc/$(HOST_OS)-x86/arm/arm-eabi-4.9/bin
-KERNEL_TOOLCHAIN_PREFIX := arm-eabi-
+KERNEL_TOOLCHAIN := $(ANDROID_BUILD_TOP)/prebuilts/gcc/$(HOST_OS)-x86/arm/arm-linux-androideabi-4.9/bin
+KERNEL_TOOLCHAIN_PREFIX := arm-linux-androideabi-
XDA user “sombree” has ported CM 13.0 on Samsung Galaxy S4 Value Edition (i9515)
In order to build a working rom you need to add a local manifest with the right device configuration and kernel
Edit the file and add the following XML
<?xml version="1.0" encoding="UTF-8"?>
<project name="jfvelte-dev/proprietary_vendor_samsung" path="vendor/samsung" remote="github" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" />
<project name="CyanogenMod/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" />
<project name="jfvelte-dev/android_device_samsung_jfvelte" path="device/samsung/jfvelte" remote="github" />
<project name="jfvelte-dev/android_device_samsung_jf-common" path="device/samsung/jf-common" remote="github" />
<project name="jfvelte-dev/android_kernel_samsung_jf" path="kernel/samsung/jf" remote="github" />
Then do a simply
Thanks to Sombree for the hints about roomservice.xml and for the porting, of course 🙂
Source: XDA Forum
I’ve submited another change to CyanogenMod project that add the “Delete application” menu to the “Developer Option” advanced menu (link to gerrit)
An user has requested an edit to a file in order to change the string displayed in the setting application, and initially I’ve thought that the change was related to my submit (but after I realized that is another CM project…)
BTW the question is: “How to amend a commit that another user has previously changed with another changeset not in my working copy?” (…a little bit obscure….)
For example, the commit status on Gerrit is:
- Patchset 1 : author Sarbyn
- Patchset 2 : author Sarbyn
- Patchset 3 : author Sarbyn
- Patchset 4 : author XYZ
My working copy is on patchset 3 and I need to submit a change about patchset 4.
The steps are:
- git stash
- click on the checkout-link in Download on the right patch set and copy&paste the git command in your working copy
- git stash pop
- Edit the file
- git commit –amend and keep the Change-Id the same
Just a little reminder for the future
Run DDMS and select the process that you want to debug (for example, com.android.calendar).
Now, in eclipse, you can attach to the emulator or device:
- Run > Open Debug Dialog…
- Right-click “Remote Java Application”, select “New”.
- Pick a name, i.e. “android-debug” or anything you like.
- Set the “Project” to your project name.
- Keep the Host set to “localhost”, but change Port to 8700.
- Click the “Debug” button and you should be all set.
Note that port 8700 is attached to whatever process is currently selected in the DDMS console, so you need to sure that DDMS has selected the process you want to debug
Tonight my changes goes in main CyanogenMod 11.0 branch. After years of using open source software this is my first contribution to a project.
I hope that more will come 🙂
Yeah! A little bit proud of it 😉