0

This is the first time am working on Raspberry Pi boards, and I have ordered and received a new Raspberry Pi 3 board, I have installed the default Raspbian OS. Now I wanted to update kernel and I followed the instructions provided in the link CROSS-COMPILING-KERNEL from Raspberry official site. After updating the SD card when I load my card in to the Pi board, I see that the board is not booting up and I see that am stuck at this point (when I see the logs in the uart console).

Welcome to the rescue system
recovery login:

But the keyboard does not seem to work. What am I missing? Any help is appreciated.

  • Are you compiling the kernel for some particular reason? Why not just update to the current 4.4.11 kernel? – Milliways Jun 23 '16 at 23:51
  • My intention was to learn how to do board bring up activities. And ultimately to install embedded Linux on Pi. – user12345 Jun 24 '16 at 4:04
  • @goldilocks: I figured out that if I dont connect the HDMI cable or monitor to the board am seeing the above situation on my Uart terminal. And what ever I enter via keyboard was also not getting accepted. There should be a configuration that I can set so that Pi will not wait for a valid pulse or something from HDMI and proceed to boot ? so that I can work with headless Pi board. – user12345 Jun 28 '16 at 8:21
  • At this point I would say there are things you need to accept about reality, such as the fact that you have been unable to cross-compile a working kernel. If you get the exact same symptoms with a stock distro kernel, that's a different issue and you should ask a different question. Otherwise, you should forget about this and move on. Just because there is a recipe somewhere does not mean all you have to do is spend a few hours in the kitchen, and voila, you have baked a delicacy. It could also come out as a total mess. What went wrong? It may take many tries before you get it right. – goldilocks Jun 28 '16 at 10:48
  • It may also be that what you are trying to do simply requires more skill and knowledge than you actually have right now. Not everybody can do anything just because they want to -- again, this is reality. If you had to have surgery and right before you were anesthetized the doctor said, "Well, actually I'm not a doctor but I read a blog article about it..." you might rightly assume you will never wake up again. – goldilocks Jun 28 '16 at 10:51
1

What am I missing?

It's not clear that you are missing anything. Unless you built in an initial ram disk (which is unnecessary and generally pointless on the pi), this at least indicates the kernel booted and accessed the root filesystem.

Did you try then logging in? You don't mention an OS, but having this happen on Raspbian might be a little awkward because if it requires root there.

I don't remember the last time I had to use "recovery mode" so I am not sure if it is asking for a log in name there, or just the root password. First try the Rasbian default user name pi and password raspberry. If that works you should be able to run the commands below that way, but if you still end up needing to login as root, keep reading (it will be clear if this is a username/password login, because after you enter something, it will ask for the password; if it does not and just says you failed, then it is just a root password, and you will need to set it first).

By default there isn't a root password, and you can't login as root. If that's the case, you can set it up so there isn't a password but you can login (see here; that refers to a case where there is a root password set and it appears in /etc/shadow as a long string, but in this case it is just * -- remove that so you end up with the same undefined field, ::, then there is no password and just hitting enter should work). Note do not try and set a password this way, it will not work; you can just make it possible to log in without one (it might be possible if you understand the hashing method used, but let's not bother).

Anyway, if you can login one way or another, you can check what kernel is being used with:

uname -r

If you added a string suffix to the version in configuration it should then be obvious. If you didn't and you build a different version than was otherwise available, it should be obvious. Otherwise, try:

uname -a

This will show the kernel type (Linux), the host name, that version string, then a build number (e.g., #2) and a date and time. That was from the machine it was built on during the time it was built, so that should be decisive.

An easy thing to forget especially if you are cross-compiling is to install the modules. The pi kernel's default configuration has enough drivers to access the root fs built in, but if you forgot to put the modules in the appropriate /lib/modules directory it will have trouble right off the bat, which might explain "emergency mode".

  • I have installed default Raspbian OS from NOOBS card and this is my kernel version: Linux raspberrypi 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux. After that I cross compiled the Kernel as per the instructions mentioned in this documentation. Copied the new kernel and device tree on to the SD card, and inserted the SD card on to Pi, and rebooted the Pi. I noticed that am stuck at recovery. – user12345 Jun 23 '16 at 14:07
  • I will work on your suggestions and will let you know how it goes. thanks. – user12345 Jun 23 '16 at 14:10
  • It may actually want a user name then a password -- try the default "pi" and password "raspberry" there. I will edit the answer a bit about this. – goldilocks Jun 23 '16 at 14:11
  • Right, I use that credentials if the board boots fine. But when I was stuck in recovery login: any input that am providing from keyboard was not getting reflected on the console. – user12345 Jun 23 '16 at 14:13
  • Hmmph. I'm not sure if the USB and HID (keyboard, mouse) drivers are built in, so if you didn't install the modules as mentioned in the last paragraph, the keyboard might not work. – goldilocks Jun 23 '16 at 14:19

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.