Build appears good but card won't boot
Ronny Nilsson
rln-nard at arbetsmyra.dyndns.org
Fri Aug 22 10:57:42 CEST 2014
It looks like the initramfs is loaded but the kernel can't execute from it. We
need some more clues to solve this... Can you try these suggestions below:
1) In your build tree, verify that nard/intermediate/fs/init exists and has
execute permissions.
2) In your build tree, verify that nard/intermediate/fs/bin/ash is a symlink
to busybox.
3) In your build tree, run the command "file nard/intermediate/fs/bin/busybox"
it should output something like this (long wraped line):
nard/intermediate/fs/bin/busybox: setuid ELF 32-bit LSB executable, ARM,
version 1 (SYSV), for GNU/Linux 3.6.11, dynamically linked (uses shared
libs), stripped
Notice the ARM keyword! If it's anything else something is wrong.
4) Boot the Raspberry with a "good" SD-card. Then copy your
nard/intermediate/fs/* to a USB memory stick and mount that in the Raspberry.
Next check that you can execute files from the memstick,
e.g. "/memstick/bin/busybox" should output a help and version text.
/Ronny
-------------------
> Firstly my apologies for not subscribing - I thought I had, but probably
> pressed a wrong button somewhere.
>
> Thanks for your quick response
>
> Yes, it is only initramfs which needs to be changed to bring it to life.
>
> Full dump from serial port is attached as text file, but last few lines
> read:
>
> [ 4.346573] registered taskstats version 1
> [ 4.352907] console [netcon0] enabled
> [ 4.356590] netconsole: network logging started
> ø[ 4.365225] Freeing unused kernel memory: 160K (c04ce000 - c04f6000)
> [ 4.373845] Failed to execute /init
> [ 4.379220] Kernel panic - not syncing: No init found. Try passing
> init= option to kernel. See Linux Documentation/init.txt for guidance.
> [ 4.391675] CPU: 0 PID: 1 Comm: swapper Not tainted 3.10.19 #1
> [ 4.397556] [<c0013de8>] (unwind_backtrace+0x0/0xf4) from
> [<c00120e8>] (show_stack+0x10/0x14)
> [ 4.406103] [<c00120e8>] (show_stack+0x10/0x14) from [<c036ed18>]
> (panic+0x90/0x1f4)
> [ 4.413858] [<c036ed18>] (panic+0x90/0x1f4) from [<c036e4dc>]
> (kernel_init+0xb8/0xe4)
> [ 4.421699] [<c036e4dc>] (kernel_init+0xb8/0xe4) from [<c000e288>]
> (ret_from_fork+0x14/0x2c)
>
> Does this help point up what I've done wrong?
>
> With many thanks,
>
> Chris
> -------- Original Message --------
> *Subject: *Re: Build appears good but card won't boot
> *From: *Ronny Nilsson <rln-nard at arbetsmyra.dyndns.org>
> *To: *chris.miller at mesl.co.uk
> *CC: *nard at arbetsmyra.dyndns.org, "nf at file.mesl.co.uk" <nf at file.mesl.co.uk>
> *Date: *21/08/2014 09:12
>
> > Hi Chris
> > When you copy files from the good card to you "bad", is it enough to
> > copy only initramfs.cpio.gz? No need for "zImage"? In that case the
> > kernel probably starts but fails to recognize the filesystem. The
> > console messages one might see in the HDMI output of other distributions
> > at boot are disabled by default in Nard, however they are still
> > available in the serial port for diagnostics. Would it be possible for
> > you to get a USB-UART converter and connect it to the expansion pin
> > header? The kernel will likely print the errors there. (Remember to get
> > the 3.3V version).
> > /Ronny
> >
> > ---------------------------------------------------------
> >
> >> Hi there,
> >>
> >> I've run the 'make skeleton' build process in a Fedora 20 32bit VM
> >> and all appears to go fine (apart from many many _warnings _about
> >> comparing signed with unsigned, no fatal _errors_), and I get the
> >> image files such as sdcard.img.gz in nard/images.
> >>
> >> My SD card reader comes up as sdd sdd1 sdd2 rather than mmcblk0
> >>
> >> If I use the downloaded image nard-sdcard.img.gz in the command
> >> zcat nard-sdcard.img.gz >/dev/dd
> >> sync
> >> I can boot the resulting SD card in a R-Pi: ethernet comes up, and I
> >> can log in via ssh.
> >>
> >> However, if I use the home-built one, the zcat command appears to
> >> work, and I can then mount the SD card and see the expected list of
> >> files on the SD card - almost identical to a card made from
> >> nard-sdcard.img.gz. But on power up, the raspberry pi gives one green
> >> flash on the sd card activity light (presumably attempting to load
> >> bootcode.bin), then nothing further happens on LEDs, ethernet or
> >> (HDMI-attached) screen. I am using the same physical SD card for
> >> both loads.
> >>
> >> I can "mend" the broken card by copying initramfs.cpip.gz and
> >> initramfs.cpio.gz.md5sum from a "good" card to the "broken" card, so
> >> it seems likely that the build process is not working correctly.
> >>
> >> uname -a returns:
> >> Linux localhost.localdomain 3.15.10-200.fc20.i686+PAE #1 SMP Thu Aug
> >> 14 15:58:37 UTC 2014 i686 i686 i386 GNU/Linux
> >>
> >> Where should I start to look for my mistake?
> >>
> >> Thanks in advance for your suggestions,
> >>
> >> Chris Miller
More information about the Nard
mailing list