{"id":295,"date":"2016-01-07T22:20:28","date_gmt":"2016-01-07T21:20:28","guid":{"rendered":"http:\/\/www.sarbyn.com\/tech\/?p=295"},"modified":"2016-01-09T21:52:01","modified_gmt":"2016-01-09T20:52:01","slug":"error-buinding-i9515-kernel","status":"publish","type":"post","link":"https:\/\/www.sarbyn.com\/blog\/2016\/01\/07\/error-buinding-i9515-kernel\/","title":{"rendered":"Error building i9515 kernel"},"content":{"rendered":"<p>My linux build machine died some days ago, and then I lost my working build environment.<br \/>\nLuckily I found <a href=\"http:\/\/forum.xda-developers.com\/showthread.php?t=2585828\">this helpful post<\/a> on XDA with a working VM out-of-the-box and then, after the usual repo sync&#8230; I found a strange error during kernel build<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\/bin\/sh: -c: line 0: syntax error near unexpected token `('\r\n\/home\/android\/i9515\/kernel\/samsung\/jf\/scripts\/Makefile.build:307: recipe for target 'scripts\/mod\/empty.o' failed\r\n<\/pre>\n<p>Changing the \/bin\/sh from \/bin\/dash to \/bin\/bash the error changes a little bit and shows some other infos<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\/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)\r\n&#x5B;...]\r\n<\/pre>\n<p>So&#8230;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&#8217;s very simple to fix.<br \/>\nThis is the diff for the &#8220;BoardConfigCommon.mk&#8221; file<\/p>\n<pre class=\"brush: diff; title: ; notranslate\" title=\"\">\r\ndiff --git a\/BoardConfigCommon.mk b\/BoardConfigCommon.mk\r\nindex 872bdc9..fe64f87 100644\r\n--- a\/BoardConfigCommon.mk\r\n+++ b\/BoardConfigCommon.mk\r\n@@ -43,8 +43,8 @@ BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x02000000\r\nBOARD_KERNEL_PAGESIZE := 2048\r\nTARGET_KERNEL_CONFIG := cyanogen_jfve_defconfig\r\nTARGET_KERNEL_SOURCE := kernel\/samsung\/jf\r\n-KERNEL_TOOLCHAIN := $(ANDROID_BUILD_TOP)\/prebuilts\/gcc\/$(HOST_OS)-x86\/arm\/arm-eabi-4.9\/bin\r\n-KERNEL_TOOLCHAIN_PREFIX := arm-eabi-\r\n+KERNEL_TOOLCHAIN := $(ANDROID_BUILD_TOP)\/prebuilts\/gcc\/$(HOST_OS)-x86\/arm\/arm-linux-androideabi-4.9\/bin\r\n+KERNEL_TOOLCHAIN_PREFIX := arm-linux-androideabi-\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>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&#8230; I found a strange error during kernel build \/bin\/sh: -c: line 0: syntax error near unexpected token `(&#8216; \/home\/android\/i9515\/kernel\/samsung\/jf\/scripts\/Makefile.build:307: <a class=\"read-more\" href=\"https:\/\/www.sarbyn.com\/blog\/2016\/01\/07\/error-buinding-i9515-kernel\/\">&hellip;&nbsp;<span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[5],"tags":[27,22,76],"class_list":["post-295","post","type-post","status-publish","format-standard","hentry","category-android","tag-build","tag-cyanogenmod","tag-i9515"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3JApm-4L","jetpack_likes_enabled":true,"jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/posts\/295"}],"collection":[{"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/comments?post=295"}],"version-history":[{"count":5,"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/posts\/295\/revisions"}],"predecessor-version":[{"id":302,"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/posts\/295\/revisions\/302"}],"wp:attachment":[{"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/media?parent=295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/categories?post=295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/tags?post=295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}