0

Currently I am doing Android update for our custom device. Updating from known working Android 4.3 with u-boot 2015.04 and Linux kernel 3.2 to Android 7.1.2 with u-boot 2015.07 Linux kernel 4.5. The u-boot 2015.07 and Linux kernel 4.5 are known working on our custom device. While integrating the u-boot and Linux kernel into Android 7.1.2, the Linux kernel failed to boot.

Here is the log:

[    3.667772] sr_init: No PMIC hook to init smartreflex
[    3.673780] sr_init: platform driver register failed for SR
[    3.716721] vdd5_reg: disabling
[    3.720220] regulator-wl18xx-wl-en: disabling
[    3.724826] regulator-wl18xx-bt-en: disabling
[    3.959011] usb 2-1: new high-speed USB device number 2 using musb-hdrc
[    4.099854] usb 2-1: New USB device found, idVendor=0424, idProduct=2513
[    4.106939] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    4.120895] hub 2-1:1.0: USB hub found
[    4.126728] hub 2-1:1.0: 3 ports detected
[    4.311994] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    4.320977] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    4.331395] devtmpfs: error mounting -2
[    4.336827] Freeing unused kernel memory: 452K (c09b5000 - c0a26000)
[    4.348323] Starting init: /etc/init exists but couldn't execute it (error -13)
[    4.377888] Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[    4.391965] ---[ end Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[   77.048831] random: nonblocking pool is initialized

The file system for root (label as system) is ext4 format. When the kernel is built, there are /bin/sh, /etc/init/ in it, but no /sbin/ folder and /bin/init /etc/init files. I tried to change the permission to anyone can execute the files, but it doesn't work. Do anybody knows what is wrong with that?

Edit: I think the major problem is the file system is not mounted.

[    4.295699] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    4.304608] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    4.314750] devtmpfs: error mounting -2

Do anyone know what causes this error?

  • Often iOT kernels are heavily hacked by the original vendor. You might not be able to upgrade to any random version at all, and it is a fairly common occurrence to be tied forever to the particular version it came with, or having random updates hacks to that version by the vendor. If you are the vendor, than I would get worried. – Rui F Ribeiro Aug 22 '17 at 0:22
  • The old kernel is 3.2, it is not even compiled on the Android 7.1.2, newer compiler throws whole bunch errors. Fixing them is tough. Generally speaking, the Android runs on top of the Linux kernel and they are independent. I feel there are some sort of configuration problems only, because the Linux kernel 4.5 is proven working on Yocto project. Last, you can assume I am the vendor. – Jason Liu Aug 22 '17 at 0:40
  • 1
    Your sentence "there are /bin/sh, /etc/init/ in it, but no /sbin/ folder and /bin/init /etc/init files" is a bit ambiguous. Do you mean that /etc/init exists but is not a file? Could you provide us with the result of ls -ld /etc/init? – xhienne Aug 22 '17 at 0:44
  • We do not know what you are doing, how you are compiling it, or your specific set of patches. (...) You might also not be using the right header files (i.e) using the headers of the wrong kernel version. There are too many unknowns. – Rui F Ribeiro Aug 22 '17 at 0:49
  • ls -ld /etc/init shows drwxr-xr-x 2 root root 4096 Aug 21 13:50 /media/yangjiel/system/etc/init, it is a folder not an executable file. There is 29 rc files in it. I tried using the upstream kernel provide by Android (branch name call android-4.4-n-release, Linux kernel v4.4), but I got the same error. I am using the old /device/vendor folder for the new Android system which probably where the problem is. – Jason Liu Aug 22 '17 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.