account arrowhead-down arrowhead-up mobile-menu search sm-bold-x x-skinny-rounded x-skinny arrowhead-right social-facebook social-googleplus social-instagram social-linkedin social-pinterest social-qzone social-renren social-tencent social-twitter social-vkontakt social-weibo social-youku social-youtube

Please help us improve our website

Take our customer survey to evaluate your visit.

It should only take a few minutes to answer five quick questions. Just click the Launch survey button at the end of your visit to begin.

cancel
Showing results for 
Search instead for 
Did you mean: 
Welcome to the Open Devices community!

This is where we discuss open source and development related questions on our Open Devices initiative.

Build kernel 47.1.A.3.254

SOLVED
Regular
Message 1 of 9
4,061 Views
Message 1 of 9

Build kernel 47.1.A.3.254

I'm try to build kernel from source 47.1.A.3.254 

 

here is build command

-----------------------------------

export PATH=/home/hasanbulat/Tools/aarch64-linux-android-4.9/bin:$PATH
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-android-
export KBUILD_DIFFCONFIG=maple_diffconfig

make msm-perf_defconfig O=./out
make -j4 O=./out

-------------------------------------------

 

The compilation was successful and I get the Imade.gz-dtb then copy and pack it to boot.img (get it from kernel.sin), but the phone won't boot 

I try using "msm_defconfig" and it's same 

I wonder which one is the correct configiration for build kernel for Xperia XZ Premium 

 

PS. I try clone the kernel source from "kernel" repo on github and compiled it, the phone won't boot too.

1 ACCEPTED SOLUTION

Accepted Solutions
Developer World
Message 5 of 9
6,135 Views
Message 5 of 9

Re: Build kernel 47.1.A.3.254

Hi,

 

I would sugest to recreate the ramdisk and to enshure that both selinux and dm-verity are off

 

Regards

Alin

8 REPLIES 8
Developer World
Message 2 of 9
4,046 Views
Message 2 of 9

Re: Build kernel 47.1.A.3.254

hi

 

There are 2 cases

1) the copyleft kernel

please follow the instructions from the README_Xperia  which comes in the archive

 

2)for the open devices kernel that you downloaded from the kernel git

we have 1 config for each device aosp_platform_device_defconfig and you should use it

 

Regards

Alin

 

 

 

 

 

Learner
Message 3 of 9
4,035 Views
Message 3 of 9

Re: Build kernel 47.1.A.3.254

No me llega la actualización 

Regular
Message 4 of 9
4,027 Views
Message 4 of 9

Re: Build kernel 47.1.A.3.254

Thank you for your reply sir

I've try build kernel from the source download from sony open devices and the phone still don't boot 

I follow the step from README_xperia 

 

this is my building script

--------------------------------

export PATH=/home/hasanbulat/Tools/aarch64-linux-android-4.9/bin:$PATH
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-android-
export KBUILD_DIFFCONFIG=maple_dsds_diffconfig 

make msmcortex-perf_defconfig O=./out
make -j4 O=./out

--------------------------------------------

the size of original kernel is about 15MB and this build give me 50+MB of Image.gz.dtb, I think it's too much diff. 

 

then I try to build kernel from the "kernel" repo on github, the phone still not boot

this is my build script

-------------------------------------------------

export PATH=/home/hasanbulat/Tools/aarch64-linux-android-4.9/bin:$PATH
export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-android-

make aosp_yoshino_maple_defconfig O=./out
make -j4 O=./out

------------------------------------------------------------

 

Other thing is Ramdisk, I using ramdisk that I get from 2 source first one is from extracted "kernel.sin" from firmware that I download from Xpirifirm then extracted "boot.000" inside using android image kitchen and got "ramdisk.cpio.gz" and second one I get "ramdisk.img" from building aosp android 8.0 for Xperia XZ Premium(btw aosp is working well), I try to use both but didn't work too.

I wonder that am I using the correct ramdisk?

 

Thank you

Developer World
Message 5 of 9
6,136 Views
Message 5 of 9

Re: Build kernel 47.1.A.3.254

Hi,

 

I would sugest to recreate the ramdisk and to enshure that both selinux and dm-verity are off

 

Regards

Alin

Regular
Message 6 of 9
3,958 Views
Message 6 of 9

Re: Build kernel 47.1.A.3.254

I've disble selinux and dm-verity and it's work

 

Thank you very much for your help

Apprentice
Message 7 of 9
3,095 Views
Message 7 of 9

Re: Build kernel 47.1.A.3.254

Hi,

I am struggling with similar issue.

Trying to build kernel for Xperia XZ1 G8342.

I downloaded the sources for 47.1.A.2.273 -  https://developer.sonymobile.com/downloads/xperia-open-source-archives/open-source-archive-47-1-a-2-...

Followed the instructions in README_Xperia: defconfig msmcortex-perf_defconfig, and export KBUILD_DIFFCONFIG=poplar_dsds_diffconfig.

Compilation passes without errors and Image.gz-dtb is created.

 

Got the same issue as @Akugila when flashing the boot.img - static "sony" logo.

 

I installed twrp and rooted the phone per the instruction in: https://forum.xda-developers.com/xperia-xz1-compact/how-to/how-to-root-xperia-xz1-compact-t3712385

I pulled out boot.img (/dev/block/sda38) and unpacked it.

So I am using the phone original boot.img-ramdisk.gz for  - - ramdisk, and not ramdisk.img.

The original boot.img is 64M, boot.img-ramdisk.gz is 6.7M, and the newly created boot.img is 22M.

 

Tried to disable dm-verity and selinux - got cyclic reboots now instead of static "sony" logo.

 

 - Should I do something more to disable dm-verity and selinux - see git diff below.

- Where should I get a pre-compiled ramdisk.img from?

 

Thanks a lot,

Avri

 

 

 

 

 

$ git diff arch/arm64/configs/msmcortex-perf_defconfig

diff --git a/arch/arm64/configs/msmcortex-perf_defconfig b/arch/arm64/configs/msmcortex-perf_defconfig

index 5692f0d..26c0527 100644

--- a/arch/arm64/configs/msmcortex-perf_defconfig

+++ b/arch/arm64/configs/msmcortex-perf_defconfig

@@ -268,9 +268,9 @@ CONFIG_BLK_DEV_DM=y

 CONFIG_DM_CRYPT=y

 CONFIG_DM_REQ_CRYPT=y

 CONFIG_DM_UEVENT=y

-CONFIG_DM_VERITY=y

-CONFIG_DM_VERITY_FEC=y

-CONFIG_DM_ANDROID_VERITY=y

+# CONFIG_DM_VERITY is not set

+# CONFIG_DM_VERITY_FEC is not set

+# CONFIG_DM_ANDROID_VERITY is not set

 CONFIG_NETDEVICES=y

 CONFIG_BONDING=y

 CONFIG_DUMMY=y

@@ -647,7 +647,7 @@ CONFIG_PFK=y

 CONFIG_SECURITY_PERF_EVENTS_RESTRICT=y

 CONFIG_SECURITY=y

 CONFIG_HARDENED_USERCOPY=y

-CONFIG_SECURITY_SELINUX=y

+# CONFIG_SECURITY_SELINUX is not set

 CONFIG_SECURITY_SMACK=y

 CONFIG_CRYPTO_ECHAINIV=y

 CONFIG_CRYPTO_XCBC=y

 

Apprentice
Message 8 of 9
3,066 Views
Message 8 of 9

Re: Build kernel 47.1.A.3.254

Tried to build the full AOSP per 

https://developer.sonymobile.com/open-devices/aosp-build-instructions/how-to-build-aosp-oreo-for-unl...

 

repo sync and/repo_update.sh passed with no errors.

On "source build/envsetup.sh && lunch" - choose 51 for g8342 userdebug.

when running make -j4, getting a lot of errors: "field "arch.arm.kryo" does not exist" in many modules.

 

Any Ideas?

 

Thanks,

Avri

Apprentice
Message 9 of 9
3,065 Views
Message 9 of 9

Re: Build kernel 47.1.A.3.254

One thing though, I had to change my local_manifest because I was getting sync errors:

 

~/android/.repo/local_manifests$ git show
commit 0e3b54f93d9df00de4e0f3eb87c339dbb06d6030
Author: Avi Sh <Avi.Shchislowski@Sandisk.com>
Date: Sun Feb 4 11:31:13 2018 +0200

fix repo sync error

diff --git a/LA.UM.6.4.r1.xml b/LA.UM.6.4.r1.xml
index ecf44b2..1d004ea 100644
--- a/LA.UM.6.4.r1.xml
+++ b/LA.UM.6.4.r1.xml
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="sony" fetch="https://github.com/sonyxperiadev/" />
-<remove-project name="platform/hardware/qcom/camera" />
<project path="device/sony/common-headers" name="device-sony-common-headers" groups="device" remote="sony" revision="aosp/LA.UM.6.4.r1" />
<project path="device/sony/common-kernel" name="vendor-sony-kernel" groups="device" remote="sony" revision="aosp/LA.UM.6.4.r1" clone-depth="1"/>
<project path="hardware/qcom/camera" name="camera" groups="device" remote="sony" revision="aosp/LA.UM.6.4.r1" />
diff --git a/untracked.xml b/untracked.xml
index c2e225c..11437c1 100644
--- a/untracked.xml
+++ b/untracked.xml
@@ -5,7 +5,6 @@
<remove-project name="device/google/accessory/demokit" />
<remove-project name="device/google/dragon-kernel" />
<remove-project name="device/google/marlin-kernel" />
-<remove-project name="device/google/wahoo-kernel" />
<remove-project name="device/huawei/angler-kernel" />
<remove-project name="device/lge/bullhead-kernel" />
<remove-project name="device/linaro/bootloader/OpenPlatformPkg" />
@@ -32,7 +31,6 @@
<remove-project name="platform/hardware/qcom/msm8960" />
<remove-project name="platform/hardware/qcom/msm8994" />
<remove-project name="platform/hardware/qcom/msm8996" />
-<remove-project name="platform/hardware/qcom/msm8998" />
<remove-project name="platform/hardware/qcom/msm8x26" />
<remove-project name="platform/hardware/qcom/msm8x27" />
<remove-project name="platform/hardware/qcom/msm8x84" />