andreasgal / B2G

Boot to Gecko aims to create a complete, standalone operating system for the open web.
https://wiki.mozilla.org/B2G
909 stars 158 forks source link

Kernels built using ubuntu 11.10 and onwards don't boot on the sgs2 #280

Open dhylands opened 12 years ago

dhylands commented 12 years ago

It was discovered that sgs2 kernels which are built using a host machine running ubuntu 11.10 or newer don't boot.

shianyow commented 12 years ago

This happens on building SGS2-ICS kernel.

dhylands commented 12 years ago

The fix seems to work, but I'm not happy with not understanding why it works. I also notices that the file permissions in initramfs seem to be incorrect. If I boot my sgs2 into recovery mode, and then adb into the phone, I see that most of the files are owned by user-id 35029 which is the user-id of my dhylands account on my build machine. I think that they should be owned by root.

dhylands commented 12 years ago

The pertinent errors when files are group writable are:

[ 1.794046] init: skipping insecure file '/init.rc' [ 1.797667] init: skipping insecure file '/init.smdk4210.rc' [ 1.803434] init: skipping insecure file '/default.prop' [ 6.000636] init: Timed out waiting for /dev/.coldboot_done [ 6.004869] init: Unable to open persistent property directory /data/property errno: 2

Using

chmod g-w boot/initramfs/*.rc boot/initramfs/default.prop && \

in the Makefile is sufficient to fix the problem, rather than

chmod g-w -R boot/initramfs && \