mobileoverlord / nerves_system_linkit

System image for the LinkIt Smart 7688
Apache License 2.0
14 stars 6 forks source link

0.7.0-rc.0 Kernel Panic #3

Closed mobileoverlord closed 7 years ago

mobileoverlord commented 8 years ago

Herman reported a KP when trying to run the fw from https://s3.amazonaws.com/nerves/test/branch/nerves_system_linkit-v0.7.0-rc.0.fw

[    1.179274] Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[    1.207417] ---[ end Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
mobileoverlord commented 8 years ago

I checked for init by returning the file attributes from

unsquashfs -n -ll nerves_system_linkit-v0.7.0-rc.0/data/rootfs.img

-rwxr-xr-x root/wheel            23300 2016-09-20 11:27 squashfs-root/sbin/init
mobileoverlord commented 8 years ago

@fhunleth /cc

fhunleth commented 8 years ago

The problem is that init is trying to load the C library and Linux can't find it. I'm not sure why the library changed names and moved somewhere else. Since I don't have time to investigate, here's a workaround. In a project, just add the following to your rootfs-additions:

ln -s /usr/lib/libc.so rootfs-additions/lib/ld-musl-mipsel.so.1

Obviously, we don't want this, but it's the best I got for now.

fhunleth commented 8 years ago

I looked into it some more, and I think this is the best I can do for now. I committed the symlink, and a clean build works for me now.

mobileoverlord commented 8 years ago

Thanks @fhunleth :)

aselder commented 8 years ago

I'm getting the same error when running nerves_system_linkit 0.7.0:

[    1.067802] Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[    1.095942] ---[ end Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.

nerves 0.3.4

Let me know if there is any other info I can provide to help debug. Same code works fine when nerves_system_linkit pinned to 0.6.2

aselder commented 8 years ago

It looks like a badly packaged tarball on hex.pm. When I download https://repo.hex.pm/tarballs/nerves_system_linkit-0.7.0.tar, and expand it out, the symlink doesn't exist where it should.

fhunleth commented 8 years ago

Thanks - Maybe that's why @mobileoverlord didn't close this issue. We'll have to make a new release. For the time being, 0.7.0 has no improvements for the LinkIt Smart over 0.6.2, so you're not missing out on anything.

fhunleth commented 7 years ago

This is fixed by https://github.com/nerves-project/nerves_system_linkit/commit/21b148efae1e3b29938c477425275ac542181dcb.