Can't boot after build of AOSP with kernel on Pixel 4a sunfish

1,219 views
Skip to first unread message

zandr

unread,
Aug 17, 2021, 5:16:44 PM8/17/21
to Android Building
Hi,

1) After a build of AOSP+kernel I try to boot, but in the dmesg I infinitely see the following errors:

[   62.895275] init: starting service 'vendor.chre'...
[   62.901496] init: Created socket '/dev/socket/chre', mode 660, user 0, group 1080
[   62.999721] init: Control message: Could not find 'android.hardware.vibrator@1.0::IVibrator/default' for ctl.interface_start from pid: 599 (/system/bin/hwservicemanager)
[   63.802603] init: Control message: Could not find 'android.hardware.sensors@2.0::ISensors/default' for ctl.interface_start from pid: 599 (/system/bin/hwservicemanager)
[   63.852698] init: Control message: Could not find 'android.frameworks.sensorservice@1.0::ISensorManager/default' for ctl.interface_start from pid: 599 (/system/bin/hwservicemanager)
[   64.000882] init: Control message: Could not find 'android.hardware.vibrator@1.0::IVibrator/default' for ctl.interface_start from pid: 599 (/system/bin/hwservicemanager)
....

2) What I do to build:

a) Take the latest (for 08/10/2021) sunfish's AOSP + kernel + binaries from

repo init -u https://android.googlesource.com/platform/manifest -b android-11.0.0_r40
repo sync

repo init -u https://android.googlesource.com/kernel/manifest -b android-msm-sunfish-4.14-android11-qpr3
repo sync

unpack
google_devices-sunfish-rq3a.210805.001.a1-995ad0d0.tgz
qcom-sunfish-rq3a.210805.001.a1-1ec3b6e6.tgz
to AOSP/vendor folder

b) in kernel folder I run
./build_sunfish.sh

After the kernel build I copy all the files from out/android-msm-pixel-4.14/dist to the folder AOSP/device/google/sunfish-kernel.

NOTE: Also as an alternative I tried to follow the doc using
export TARGET_PREBUILT_KERNEL=DIST_DIR/Image.lz4-dtb
etc, but with the same net result.

c) in AOSP folder I run
 . build/envsetup.sh
lunch
<select> 26. aosp_sunfish-userdebug
m

d) finally flash the device and finally boot,
and then I stuck on boot logo and in dmesg I see errors mentioned in 1).
If I try to use prebuilt kernel from AOSP, so omitting of building and copying the kernel - b), then all went ok, but I need a kernel built by myself.

I believe I do something wrong, but can't figure out what exactly.

Could someone tell me how to build AOSP +kernel correctly?

Thanks.


Möbius

unread,
Nov 8, 2021, 5:15:50 PM11/8/21
to Android Building
Have you solved?

I am also encounting the same issue.

Could you help me?

2021년 8월 18일 수요일 오전 6시 16분 44초 UTC+9에 zandr님이 작성:

z-an...@yandex.ru

unread,
Nov 9, 2021, 2:43:34 PM11/9/21
to android-...@googlegroups.com

No. I use lineage though it's not exactly I want.

вторник, 09 ноября 2021г., 01:15 +03:00 от Möbius xiphia...@gmail.com:

 . build/envsetup.sh
lunch
m

d) finally flash the device and finally boot,
and then I stuck on boot logo and in dmesg I see errors mentioned in 1).
If I try to use prebuilt kernel from AOSP, so omitting of building and copying the kernel - b), then all went ok, but I need a kernel built by myself.

I believe I do something wrong, but can't figure out what exactly.

Could someone tell me how to build AOSP +kernel correctly?

Thanks.


--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/00901882-f642-4110-a172-b22536f34898n%40googlegroups.com.

shaoyang ding

unread,
Apr 1, 2022, 1:26:58 PM4/1/22
to Android Building
Hi  zandr,

Could you please help if you happen to known how to build the right Pixel6 kernel?

I am trying to build the Pixel6 kernel followed by https://source.android.com/setup/build/building-kernels#customize-build

Here is my step:

1. mkdir android-kernel && cd android-kernel 
2. repo init -u https://android.googlesource.com/kernel/manifest -b android-gs-raviole-5.10-android12L 
3. repo sync 
4. build/build.sh 

I could see the logs below after I build successfully.
--------------------------------------------------------------------------------------------------------------------------
Files copied to /mnt/code/shaoyang/kernel/out/android-gs-pixel-5.10/dist
vendor_ramdisk-oriole.img is LZ4 compressed boot image created at boot.img
Signing the boot.img...
vendor boot image created at /mnt/code/shaoyang/kernel/out/android-gs-pixel-5.10/dist/vendor_boot.img
-------------------------------------------------------------------------------------------------------------------------- 

Note that the boot.img and vendor_boot.img had already been generated, 
then I use “fastboot flash boot boot.img” and “fastboot flash vendor_boot vendor_boot.img”to flash the boot.img and vendor_boot.img. 
Unfortunately, the Pixel6 couldn’t boot up, it always stay in the fastboot mode. 

Could you please help if you happen to known how to build the right Pixel6 kernel?

I am also tried that  copy all the files from out/android-gs-pixel-5.10/dist to the folder AOSP/device/google/raviole-kernel/
export TARGET_PREBUILT_KERNEL=DIST_DIR/Image.lz4
make bootimage

after that I flash the boot.img  , Pixel 6 couldn't boot up.

could you please help??

Best Regards
Shaoyang


李大锐

unread,
Nov 3, 2022, 4:36:35 PM11/3/22
to Android Building
In fact, I use a very strange way to make it work.
1. Compile kernel
2. Copy kernel/.../dist/ to aosp/device/...-kernel/
3. Compile AOSP
4. Flash
5. After first boot, adb to push *.ko to  /vendor/lib/modules/
6. Reboot to fastboot, then flash boot.img again
7. Second boot, OK
Reply all
Reply to author
Forward
0 new messages