Unable to flash/boot the Pixel5 with custom build kernel

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to flash/boot the Pixel5 with custom build kernel

xiling.gong
Hello, I'm working on a Pixel5 with AOSP and custom build kernel.
The issue is that I can't flash/boot the Pixel5 with custom build kernel.
Anyone please help to check this issue?
Thanks a lot.

kernel source:
       repo init -u https://android.googlesource.com/kernel/manifest -b android-msm-redfin-4.19-android11-d1 
AOSP source:
      repo init -u https://android.googlesource.com/platform/manifest -b android-11.0.0_r15

Build the kernel
       ./build/build.sh
Then put
       MSM_KERNEL/out/android-msm-pixel-4.19/dist/Image.gz-dtb 
to 
       AOSP_SOURCE/device/google/redfin-kernel/
then build the aosp
       source build/environment
       lunch aosp_redfin-userdebug
       make -j8
       fastboot flashall
When do flash, the flash process will hang at 
       < waiting for any device >
       --------------------------------------------
      Bootloader Version...: r3-0.3-6776358
      Baseband Version.....: g7250-00016-200911-B-6826885
      Serial Number........: 09261FDD4003XC
      --------------------------------------------
      Checking 'product'                                 OKAY [  0.068s]
      Setting current slot to 'b'                        OKAY [  0.411s]
      Sending 'boot_b' (98304 KB)                        OKAY [ 12.051s]
      Writing 'boot_b'                                   OKAY [  1.977s]
      Sending 'dtbo_b' (16384 KB)                        OKAY [  2.150s]
      Writing 'dtbo_b'                                   OKAY [  0.386s]
      Sending 'vbmeta_b' (8 KB)                          OKAY [  0.139s]
      Writing 'vbmeta_b'                                 OKAY [  0.078s]
       Sending 'vbmeta_system_b' (4 KB)                   OKAY [  0.140s]
       Writing 'vbmeta_system_b'                          OKAY [  0.078s]
       Sending 'vendor_boot_b' (98304 KB)                 OKAY [ 12.632s]
       Writing 'vendor_boot_b'                            OKAY [  2.020s]
       Rebooting into fastboot                            OKAY [  0.066s]
       < waiting for any device >  
And the phone keeps rebooting.

I've also tried to replace a single .ko (e.g., cam_flash.ko) in 
       MSM_KERNEL/android-msm-pixel-4.19/dist/
into 
       AOSP_SOURCE/device/google/redfin-kernel/
Then build the aosp and flashall, it will also failed to finish the flash and the system hang.

If I push MSM_KERNEL/android-msm-pixel-4.19/dist/cam_flash.ko to /data/local/tmp/,
and then insmod
     insmod cam_flash.ko
it will fail with message
     insmod : failed to load cam_flash.ko: Exec format error

Thanks a lot.

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to
[hidden email]
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/f6f8fcc5-e617-4ef7-93ec-6b65a573b43fn%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Unable to flash/boot the Pixel5 with custom build kernel

Henry da Costa
Hello,

I had a similar problem on a Pixel 4 and fixed it by pushing all the .ko files from the kernel dist directory to /vendor/lib/modules.

On Sun, 29 Nov 2020 at 19:11, xiling.gong <[hidden email]> wrote:
Hello, I'm working on a Pixel5 with AOSP and custom build kernel.
The issue is that I can't flash/boot the Pixel5 with custom build kernel.
Anyone please help to check this issue?
Thanks a lot.

kernel source:
       repo init -u https://android.googlesource.com/kernel/manifest -b android-msm-redfin-4.19-android11-d1 
AOSP source:
      repo init -u https://android.googlesource.com/platform/manifest -b android-11.0.0_r15

Build the kernel
       ./build/build.sh
Then put
       MSM_KERNEL/out/android-msm-pixel-4.19/dist/Image.gz-dtb 
to 
       AOSP_SOURCE/device/google/redfin-kernel/
then build the aosp
       source build/environment
       lunch aosp_redfin-userdebug
       make -j8
       fastboot flashall
When do flash, the flash process will hang at 
       < waiting for any device >
       --------------------------------------------
      Bootloader Version...: r3-0.3-6776358
      Baseband Version.....: g7250-00016-200911-B-6826885
      Serial Number........: 09261FDD4003XC
      --------------------------------------------
      Checking 'product'                                 OKAY [  0.068s]
      Setting current slot to 'b'                        OKAY [  0.411s]
      Sending 'boot_b' (98304 KB)                        OKAY [ 12.051s]
      Writing 'boot_b'                                   OKAY [  1.977s]
      Sending 'dtbo_b' (16384 KB)                        OKAY [  2.150s]
      Writing 'dtbo_b'                                   OKAY [  0.386s]
      Sending 'vbmeta_b' (8 KB)                          OKAY [  0.139s]
      Writing 'vbmeta_b'                                 OKAY [  0.078s]
       Sending 'vbmeta_system_b' (4 KB)                   OKAY [  0.140s]
       Writing 'vbmeta_system_b'                          OKAY [  0.078s]
       Sending 'vendor_boot_b' (98304 KB)                 OKAY [ 12.632s]
       Writing 'vendor_boot_b'                            OKAY [  2.020s]
       Rebooting into fastboot                            OKAY [  0.066s]
       < waiting for any device >  
And the phone keeps rebooting.

I've also tried to replace a single .ko (e.g., cam_flash.ko) in 
       MSM_KERNEL/android-msm-pixel-4.19/dist/
into 
       AOSP_SOURCE/device/google/redfin-kernel/
Then build the aosp and flashall, it will also failed to finish the flash and the system hang.

If I push MSM_KERNEL/android-msm-pixel-4.19/dist/cam_flash.ko to /data/local/tmp/,
and then insmod
     insmod cam_flash.ko
it will fail with message
     insmod : failed to load cam_flash.ko: Exec format error

Thanks a lot.

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to
[hidden email]
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/f6f8fcc5-e617-4ef7-93ec-6b65a573b43fn%40googlegroups.com.

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to
[hidden email]
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/CAF_Qg1M3K-3_mxSr5enfVabKhWWvojJjNOReimj_JTQAQo7E%2BQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Unable to flash/boot the Pixel5 with custom build kernel

xiling.gong

Hello Henry,

Thanks a lot for your reply.

I've got the same issue on Pixel4 and fixed it using your method. 

But Pixel5 looks like a bit different and unable to be fixed with the same solution.
All the .ko built on Pixel5 is unable to be insmod into kernel. 
Don't know where is the root cause...

在2020年12月3日星期四 UTC+8 上午2:36:48<[hidden email]> 写道:
Hello,

I had a similar problem on a Pixel 4 and fixed it by pushing all the .ko files from the kernel dist directory to /vendor/lib/modules.

On Sun, 29 Nov 2020 at 19:11, xiling.gong <[hidden email]> wrote:
Hello, I'm working on a Pixel5 with AOSP and custom build kernel.
The issue is that I can't flash/boot the Pixel5 with custom build kernel.
Anyone please help to check this issue?
Thanks a lot.

kernel source:
       repo init -u https://android.googlesource.com/kernel/manifest -b android-msm-redfin-4.19-android11-d1 
AOSP source:
      repo init -u https://android.googlesource.com/platform/manifest -b android-11.0.0_r15

Build the kernel
       ./build/build.sh
Then put
       MSM_KERNEL/out/android-msm-pixel-4.19/dist/Image.gz-dtb 
to 
       AOSP_SOURCE/device/google/redfin-kernel/
then build the aosp
       source build/environment
       lunch aosp_redfin-userdebug
       make -j8
       fastboot flashall
When do flash, the flash process will hang at 
       < waiting for any device >
       --------------------------------------------
      Bootloader Version...: r3-0.3-6776358
      Baseband Version.....: g7250-00016-200911-B-6826885
      Serial Number........: 09261FDD4003XC
      --------------------------------------------
      Checking 'product'                                 OKAY [  0.068s]
      Setting current slot to 'b'                        OKAY [  0.411s]
      Sending 'boot_b' (98304 KB)                        OKAY [ 12.051s]
      Writing 'boot_b'                                   OKAY [  1.977s]
      Sending 'dtbo_b' (16384 KB)                        OKAY [  2.150s]
      Writing 'dtbo_b'                                   OKAY [  0.386s]
      Sending 'vbmeta_b' (8 KB)                          OKAY [  0.139s]
      Writing 'vbmeta_b'                                 OKAY [  0.078s]
       Sending 'vbmeta_system_b' (4 KB)                   OKAY [  0.140s]
       Writing 'vbmeta_system_b'                          OKAY [  0.078s]
       Sending 'vendor_boot_b' (98304 KB)                 OKAY [ 12.632s]
       Writing 'vendor_boot_b'                            OKAY [  2.020s]
       Rebooting into fastboot                            OKAY [  0.066s]
       < waiting for any device >  
And the phone keeps rebooting.

I've also tried to replace a single .ko (e.g., cam_flash.ko) in 
       MSM_KERNEL/android-msm-pixel-4.19/dist/
into 
       AOSP_SOURCE/device/google/redfin-kernel/
Then build the aosp and flashall, it will also failed to finish the flash and the system hang.

If I push MSM_KERNEL/android-msm-pixel-4.19/dist/cam_flash.ko to /data/local/tmp/,
and then insmod
     insmod cam_flash.ko
it will fail with message
     insmod : failed to load cam_flash.ko: Exec format error

Thanks a lot.

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to
[hidden email]
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/f6f8fcc5-e617-4ef7-93ec-6b65a573b43fn%40googlegroups.com.

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to
[hidden email]
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/56211d4e-a7cd-40f9-a77c-6ec1617db17en%40googlegroups.com.