Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A13 => Topic started by: ehj666 on January 13, 2013, 10:38:07 PM

Title: Another case of unable to boot from SD
Post by: ehj666 on January 13, 2013, 10:38:07 PM
I just received an A13-Olinuxino-Wifi. It booted to Android first time, and everything seems fine there. I could not find a distributor carrying the debian image SD here in the US, so I downloaded the image and burned it to a 4GB SD. When trying to boot I get nothing, screen is black, and if I try to connect the serial cable to a USB port on a PC, I also get nothing.

While I did have a problem installing the serial driver for Windows, I at least get that usual bing that a USB device is ready or ready to install when booting to Android. When I try to boot to the SD I get nothing on the PC.

I have tried 3 SDs, 2 4GB from PNY and one 32GB from Transcend. Unfortunately my local Best Buy only carries PNY in the 4GB size. If I plug any of the SDs into my Android tablet, I can read them just fine. If I boot the Oliuxino to Android and then install any one of the SDs, all three report damaged SD.

My intended power supply has not arrived (1.2A @ 12V), but I am using a USB power supply suitable for charging tablets (2.1A @ 5V).

Is it the brand of SDs I am using, or is there another problem? Can anyone confirm whether PNY or Transcend SDs work in the Olinuxino?

Thanks,
Eric
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 13, 2013, 11:24:48 PM
Which prebuilt image are you trying? How are you putting the image on the card?
Title: Re: Another case of unable to boot from SD
Post by: ehj666 on January 13, 2013, 11:55:17 PM
I used the R4 image here:
https://www.olimex.com/wiki/Prebuilt_SD_card_images_running_debian#Debian_with_GUI_.28X.29

I have tried writing it with both Win32 Disk Manager and from Ubuntu 12.04 Linux.
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 13, 2013, 11:59:58 PM
Do you have all four pins of the serial port connected, or just three? That was my problem, initially. Have you verified that there are two partitions on the card? When you load it in Ubuntu, do you see what you would expect (kernel/script.bin) on /dev/sdb1, rootfs on /dev/sdb2?

Sorry for all the questions - just trying to debug.
Title: Re: Another case of unable to boot from SD
Post by: ehj666 on January 14, 2013, 12:40:26 AM
What is the fourth pin, my cable has three, gnd, rx and tx. You mean this cable, right:
https://www.olimex.com/Products/Components/Cables/USB-Serial-Cable/USB-Serial-Cable-F/

There are two partitions on the card, fdisk on ubuntu reports sdb1 start 2048, size 16384, and sdb2, start 34816, size 3795968.

I can read the SD successfully from windows, ubuntu linux and a tablet running android. Only the Olinuxino reports that the SD is damaged from android. This is true for both 4GB SDs.
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 14, 2013, 12:48:37 AM
My cable has a +5V pin as well - so if you've only got 3, that solves that.

If you mount the card in Linux, what is on it?

sudo mount /dev/sdb1 /mnt
cd /mnt
ls

do you see uImage and script.bin?


When you mean the serial port is blank, what exactly do you mean? Are you using Putty to try to view the output? Do you have the right COM port (varies, depending on the computer - one of mine is COM3, one is COM11 - go figure?) and baud rate (115200)?

Again - just trying to get on the same page with you to know what to try next.




Quote from: ehj666 on January 14, 2013, 12:40:26 AM
What is the fourth pin, my cable has three, gnd, rx and tx. You mean this cable, right:
https://www.olimex.com/Products/Components/Cables/USB-Serial-Cable/USB-Serial-Cable-F/

There are two partitions on the card, fdisk on ubuntu reports sdb1 start 2048, size 16384, and sdb2, start 34816, size 3795968.

I can read the SD successfully from windows, ubuntu linux and a tablet running android. Only the Olinuxino reports that the SD is damaged from android. This is true for both 4GB SDs.
Title: Re: Another case of unable to boot from SD
Post by: ehj666 on January 14, 2013, 01:49:22 AM
As I said in the first post, I had a problem with the windows drivers. They seemed to have installed alright, but when I boot the Olinuxino to Android and connect the USB, it sees a new device and tries to install it, but gives an error that it cannot find the appropriate drivers. Booting to the SD gives nothing. In neither case does a new port appear.

The first partition of the SD has those two files, and only those two files.
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 14, 2013, 01:56:22 AM
Ok - so I think the problem may lie in your technique. When you boot with the SD card in Linux, it's not supposed to do anything on your computer unless you have a terminal emulator running.

If you don't have Putty, download it (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html).

Now, plug in your USB/serial cable. Go to Device Manager. Under "Ports" you should see a listing for USB-to-Serial connector (or some such) and it should have the COM port number beside it (COM3, in my case). If it doesn't, then you should probably right click and check on properties - it should be in there somewhere.

Now open Putty. Click the "Serial" radio button.
Change the port from COM1 to whatever your USB-to-Serial is
Change the speed from 9600 to 115200
Hit "open"
Plug in the A13-Wifi.

You should now see at least *something* come up, and hopefully you will see it boot. If not there should at least be an error message.

Let me know if any of that was unclear.
Title: Re: Another case of unable to boot from SD
Post by: JohnS on January 14, 2013, 01:57:07 AM
I'm using a USB to 4-pin RS232 (well, there are 5 but I'm only using 4).  It's a PL2303 and I'm using 3.3V rather than 5V.  Works great but I had to swap Rx & Tx which reminds me of the old days...

My board is back to crashing during Linux boot.  No idea why or what's changed.

John
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 14, 2013, 01:58:43 AM
Quote from: JohnS on January 14, 2013, 01:57:07 AM
I'm using a USB to 4-pin RS232 (well, there are 5 but I'm only using 4).  It's a PL2303 and I'm using 3.3V rather than 5V.  Works great but I had to swap Rx & Tx which reminds me of the old days...

My board is back to crashing during Linux boot.  No idea why or what's changed.

John

What's the error?
Title: Re: Another case of unable to boot from SD
Post by: JohnS on January 14, 2013, 02:02:20 AM
The one in this thread:
https://www.olimex.com/forum/index.php?topic=356.0

Now it seems plugging the battery in has not cured it... well, I'm letting it flatten just incase that's the vital detail, unlikely though it seems.

John
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 14, 2013, 02:04:12 AM
Quote from: JohnS on January 14, 2013, 02:02:20 AM
The one in this thread:
https://www.olimex.com/forum/index.php?topic=356.0

Now it seems plugging the battery in has not cured it... well, I'm letting it flatten just incase that's the vital detail, unlikely though it seems.

John

Ahh... an Android error... sorry, can't help you there.
Title: Re: Another case of unable to boot from SD
Post by: JohnS on January 14, 2013, 09:15:27 AM
Not Android.  It's Linux that dies with a NULL pointer deref.
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 14, 2013, 04:30:23 PM
My bad - the title said Android and there was a lot of text there. I missed that you weren't the original author.

When you made your measurement of the voltage, was that from the battery or from a power supply - either way, is there a difference, and is there a difference between the three supplies you tried?

I am wondering if there is some sort of issue with the power connector on the board, especially since you say it fails at different points in the boot.

Quote from: jwischka on January 14, 2013, 02:04:12 AM
Quote from: JohnS on January 14, 2013, 02:02:20 AM
The one in this thread:
https://www.olimex.com/forum/index.php?topic=356.0

Now it seems plugging the battery in has not cured it... well, I'm letting it flatten just incase that's the vital detail, unlikely though it seems.

John

Ahh... an Android error... sorry, can't help you there.

Title: Re: Another case of unable to boot from SD
Post by: ehj666 on January 14, 2013, 05:14:31 PM
Quote from: jwischka on January 14, 2013, 01:56:22 AM
Now, plug in your USB/serial cable. Go to Device Manager. Under "Ports" you should see a listing for USB-to-Serial connector (or some such) and it should have the COM port number beside it (COM3, in my case). If it doesn't, then you should probably right click and check on properties - it should be in there somewhere.

Now open Putty. Click the "Serial" radio button.
Change the port from COM1 to whatever your USB-to-Serial is
Change the speed from 9600 to 115200
Hit "open"
Plug in the A13-Wifi.

You should now see at least *something* come up, and hopefully you will see it boot. If not there should at least be an error message.

Let me know if any of that was unclear.

Ok, I made a small amount of progress. Putty does not give a selection of com ports, it shows COM1 and I can type in anything I want. If I run hyperterminal I see that a COM8 has been added. It exists, however, only when the USB is connected. One improvement is that it does appear regardless of whether I boot to Android or the SD drive.

Unfortunately, neither hyperterminal nor putty will allow me to talk to the port. I get a connection error or something similar from both programs. With putty, if the USB cable is not connected, I do not think the port even exists, based on what hyperterminal displays. So the error might be valid if I try to open a non-existant port.

Going past that, let me ask a very specific question. If you boot the Olinuxino to Android and then insert the bootable SD, can you read it from Android? Secondly, if you put in an ordinary SD, with a file system but no bootable OS, can you read that from Android? In my case I cannot. So the first thing I would like to do is to elimnate the SD itself as problem.

Thanks
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 14, 2013, 05:29:28 PM
You will only see the port (COM8, in your case, it seems) when the USB adapter is plugged in. This is as expected.

You are correct that Putty does not give you a list of possible ports - you will need to type in COM8, then change the speed from 9600 to 115200, and then hit open. You shouldn't see anything at first, until you plug in the board. You won't be able to open the port if the USB cable isn't plugged in, obviously. Connect the serial cable to the board, plug the USB in, open the connection in Putty, then power on the board. You should see *something*.

As to your specific question, I have no idea about SD behavior in Android. I suspect that would come down to the default version of u-boot that is installed on the board, and I'm not sure if that is constant across all shipping revisions (and I have a Rev. B board, so I'm not sure I can help you there). I've also messed up the Android install on my nand, so I can't boot into it anymore, so I *really* can't help you there. Perhaps someone else can.



Quote from: ehj666 on January 14, 2013, 05:14:31 PM
Ok, I made a small amount of progress. Putty does not give a selection of com ports, it shows COM1 and I can type in anything I want. If I run hyperterminal I see that a COM8 has been added. It exists, however, only when the USB is connected. One improvement is that it does appear regardless of whether I boot to Android or the SD drive.

Unfortunately, neither hyperterminal nor putty will allow me to talk to the port. I get a connection error or something similar from both programs. With putty, if the USB cable is not connected, I do not think the port even exists, based on what hyperterminal displays. So the error might be valid if I try to open a non-existant port.

Going past that, let me ask a very specific question. If you boot the Olinuxino to Android and then insert the bootable SD, can you read it from Android? Secondly, if you put in an ordinary SD, with a file system but no bootable OS, can you read that from Android? In my case I cannot. So the first thing I would like to do is to elimnate the SD itself as problem.

Thanks
Title: Re: Another case of unable to boot from SD
Post by: JohnS on January 14, 2013, 07:09:25 PM
Quote from: jwischka on January 14, 2013, 04:30:23 PM
My bad - the title said Android and there was a lot of text there. I missed that you weren't the original author.

When you made your measurement of the voltage, was that from the battery or from a power supply - either way, is there a difference, and is there a difference between the three supplies you tried?

I am wondering if there is some sort of issue with the power connector on the board, especially since you say it fails at different points in the boot.
Don't worry, I'm glad of any help!

Any of the supplies results in 5.3V (on battery it's 0V but that's presumably OK).  And as I posted today my battery Charging LED (CHGLED / CHLED) no longer lights.  I wonder if the AX209 is not right.

Almost always the Oops is an attempted NULL pointer deref like this:

[    1.380000] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    1.390000] Registering SWP/SWPB emulation handler
[    1.390000] registered taskstats version 1
[    1.400000] Unable to handle kernel NULL pointer dereference at virtual address 00000018
[    1.410000] pgd = c0004000
[    1.410000] [00000018] *pgd=00000000
[    1.410000] Internal error: Oops: 5 [#1] PREEMPT
[    1.410000] Modules linked in:
[    1.410000] CPU: 0    Not tainted  (3.0.57jwischka-20130109+ #26)
[    1.410000] PC is at mutex_lock+0x10/0x4c
[    1.410000] LR is at axp_clr_bits+0x2c/0xb8
[    1.410000] pc : [<c0509084>]    lr : [<c038cf64>]    psr: a0000013
[    1.410000] sp : df83bd48  ip : df83bd58  fp : df83bd54
[    1.410000] r10: 00000a68  r9 : 00000006  r8 : 00000092
[    1.410000] r7 : 00000092  r6 : 00000018  r5 : 00000000  r4 : df83bdd0
[    1.410000] r3 : c07c511c  r2 : 00000000  r1 : 00000092  r0 : 00000018
[    1.410000] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[    1.410000] Control: 10c5387d  Table: 40004019  DAC: 00000015

(the above is your image, which used to boot)

I just found u-boot's "reset" command doesn't work, but don't know if it ever did or is implemented for this board.

Is it realistic to download the kernel over the uart to rule out the SD?  u-boot appears to say it does kermit etc and I guess I can find something at the Linux end that'll send the file, if so.

umm, no, it'll want some other file(s) like script.bin, what a shame.

John
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 14, 2013, 07:17:55 PM
You should only need uImage and script.bin - and actually, you might not fully need script.bin to boot, though I haven't tested this. It basically gives you some options.

I wonder if you would have different results with a 3.4 kernel instead of a 3.0. The fact that it's failing at different points in the process points to a hardware issue, I think, since if it was fully software you would expect it to be more deterministic (unless there is a race condition there somewhere, but that seems unlikely given that things are failing seconds apart (failed ~1.5 in this boot, ~5 in the other you posted).

Can you send me a full boot log from a couple of different boots?
Title: Re: Another case of unable to boot from SD
Post by: ehj666 on January 14, 2013, 11:31:15 PM
Quote from: jwischka on January 14, 2013, 05:29:28 PM
You will only see the port (COM8, in your case, it seems) when the USB adapter is plugged in. This is as expected.

You are correct that Putty does not give you a list of possible ports - you will need to type in COM8, then change the speed from 9600 to 115200, and then hit open. You shouldn't see anything at first, until you plug in the board. You won't be able to open the port if the USB cable isn't plugged in, obviously. Connect the serial cable to the board, plug the USB in, open the connection in Putty, then power on the board. You should see *something*.

As to your specific question, I have no idea about SD behavior in Android. I suspect that would come down to the default version of u-boot that is installed on the board, and I'm not sure if that is constant across all shipping revisions (and I have a Rev. B board, so I'm not sure I can help you there). I've also messed up the Android install on my nand, so I can't boot into it anymore, so I *really* can't help you there. Perhaps someone else can.

One step forward, two steps back. The good news is that I finally got the serial port to work. The bad news is that I seem to have screwed up android, and it no longer boots, although I get a lot logged to the serial port and no obvious errors. I tried reloading Android, but LiveSuit never seems to see it.

The worse new is, when I try to boot from the SD all I get is:

sp1: mmc blk read err - 0
### Error ### Please reset the board ###

If I reset I just get the same thing. That would indicate to me that it is not able to read the SD.
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 14, 2013, 11:35:04 PM
Correct. I assume with multiple cards, as well?

People are reporting that some cards don't work, though it's hard to know whether this is a widespread phenomenon, or not. For my board, I've had no problems booting with legitimate Sandisk cards (UHS-I), but someone else reported that they had problems with Sandisk. Of course, fake cards are rampant, so that could be part of it as well.

Then there's also the possibility (given what you said re: sd card not reading in Android) that your SD slot is broken, or the connection isn't firm, or ________?

Are you getting any messages from u-boot at all, or just the sp1 message you listed below?




Quote from: ehj666 on January 14, 2013, 11:31:15 PM
Quote from: jwischka on January 14, 2013, 05:29:28 PM
You will only see the port (COM8, in your case, it seems) when the USB adapter is plugged in. This is as expected.

You are correct that Putty does not give you a list of possible ports - you will need to type in COM8, then change the speed from 9600 to 115200, and then hit open. You shouldn't see anything at first, until you plug in the board. You won't be able to open the port if the USB cable isn't plugged in, obviously. Connect the serial cable to the board, plug the USB in, open the connection in Putty, then power on the board. You should see *something*.

As to your specific question, I have no idea about SD behavior in Android. I suspect that would come down to the default version of u-boot that is installed on the board, and I'm not sure if that is constant across all shipping revisions (and I have a Rev. B board, so I'm not sure I can help you there). I've also messed up the Android install on my nand, so I can't boot into it anymore, so I *really* can't help you there. Perhaps someone else can.

One step forward, two steps back. The good news is that I finally got the serial port to work. The bad news is that I seem to have screwed up android, and it no longer boots, although I get a lot logged to the serial port and no obvious errors. I tried reloading Android, but LiveSuit never seems to see it.

The worse new is, when I try to boot from the SD all I get is:

sp1: mmc blk read err - 0
### Error ### Please reset the board ###

If I reset I just get the same thing. That would indicate to me that it is not able to read the SD.
Title: Re: Another case of unable to boot from SD
Post by: ehj666 on January 14, 2013, 11:48:17 PM
Quote from: jwischka on January 14, 2013, 11:35:04 PM
Correct. I assume with multiple cards, as well?

People are reporting that some cards don't work, though it's hard to know whether this is a widespread phenomenon, or not. For my board, I've had no problems booting with legitimate Sandisk cards (UHS-I), but someone else reported that they had problems with Sandisk. Of course, fake cards are rampant, so that could be part of it as well.

Then there's also the possibility (given what you said re: sd card not reading in Android) that your SD slot is broken, or the connection isn't firm, or ________?

Are you getting any messages from u-boot at all, or just the sp1 message you listed below?

Yes, same thing with both bootable SDs. Unfortunately they are both 4GB PNY. The other SD was a 32GB Transcend, but it is not bootable, I was just trying to read it, and it gave the same damaged SD error when trying to read it from Android on the Olinuxino as the PNYs.

I am getting no messages from u-boot.

Separate question for anyone else. I am not that familiar with what is available from the command line in Android, but is there an equivalent to 'fsck'. It comes back as an unrecognized command, as does shutdown and a bunch of others I am used to having under Debian / Ubuntu.

Thanks
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 14, 2013, 11:52:10 PM
I'm not sure if you can try imaging the 32gb card, but that would be something I'd suggest, if you're willing to, at least to debug. It won't do any permanent damage to the card. That would at least help to rule out the PNY cards, if the Transcend still doesn't boot.



Quote from: ehj666 on January 14, 2013, 11:48:17 PM
Quote from: jwischka on January 14, 2013, 11:35:04 PM
Correct. I assume with multiple cards, as well?

People are reporting that some cards don't work, though it's hard to know whether this is a widespread phenomenon, or not. For my board, I've had no problems booting with legitimate Sandisk cards (UHS-I), but someone else reported that they had problems with Sandisk. Of course, fake cards are rampant, so that could be part of it as well.

Then there's also the possibility (given what you said re: sd card not reading in Android) that your SD slot is broken, or the connection isn't firm, or ________?

Are you getting any messages from u-boot at all, or just the sp1 message you listed below?

Yes, same thing with both bootable SDs. Unfortunately they are both 4GB PNY. The other SD was a 32GB Transcend, but it is not bootable, I was just trying to read it, and it gave the same damaged SD error when trying to read it from Android on the Olinuxino.

Separate question for anyone else. I am not that familiar with what is available from the command line in Android, but is there an equivalent to 'fsck'. It comes back as an unrecognized command, as does shutdown and a bunch of others I am used to having under Debian / Ubuntu.

Thanks
Title: Re: Another case of unable to boot from SD
Post by: ehj666 on January 14, 2013, 11:58:32 PM
I am reluctant to use the Transcend since it has the backups for my tablet and could not be read under Android anyway. I have another class 10 32GB SD on order, it just has not arrived. The Best Buy near me seems to only carry PNY. I can try Radio Shack and see if they carry Sandisk or any other brand.

BTW, thanks for all the help.
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 14, 2013, 11:59:18 PM
No problem. RadShack does carry Sandisk cards, FYI.

Quote from: ehj666 on January 14, 2013, 11:58:32 PM
I am reluctant to use the Transcend since it has the backups for my tablet and could not be read under Android anyway. I have another class 10 32GB SD on order, it just has not arrived. The Best Buy near me seems to only carry PNY. I can try Radio Shack and see if they carry Sandisk or any other brand.

BTW, thanks for all the help.
Title: Re: Another case of unable to boot from SD
Post by: JohnS on January 15, 2013, 12:08:42 AM
Quote from: jwischka on January 14, 2013, 07:17:55 PM
You should only need uImage and script.bin - and actually, you might not fully need script.bin to boot, though I haven't tested this. It basically gives you some options.

I wonder if you would have different results with a 3.4 kernel instead of a 3.0. The fact that it's failing at different points in the process points to a hardware issue, I think, since if it was fully software you would expect it to be more deterministic (unless there is a race condition there somewhere, but that seems unlikely given that things are failing seconds apart (failed ~1.5 in this boot, ~5 in the other you posted).

Can you send me a full boot log from a couple of different boots?
Where would you like me to send them?

Thanks in advance,

John
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 15, 2013, 12:09:28 AM
PM sent.

Quote from: JohnS on January 15, 2013, 12:08:42 AM
Quote from: jwischka on January 14, 2013, 07:17:55 PM
You should only need uImage and script.bin - and actually, you might not fully need script.bin to boot, though I haven't tested this. It basically gives you some options.

I wonder if you would have different results with a 3.4 kernel instead of a 3.0. The fact that it's failing at different points in the process points to a hardware issue, I think, since if it was fully software you would expect it to be more deterministic (unless there is a race condition there somewhere, but that seems unlikely given that things are failing seconds apart (failed ~1.5 in this boot, ~5 in the other you posted).

Can you send me a full boot log from a couple of different boots?
Where would you like me to send them?

Thanks in advance,

John
Title: Re: Another case of unable to boot from SD
Post by: JohnS on January 15, 2013, 12:58:37 AM
Thanks - will send.

If my board needed the LiPo then it now won't work because something is wrong with the LiPo charging circuit or the like - zero volts at the pins when it ought to be charging.  The plot thickens...
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 15, 2013, 01:36:33 AM
Could be that there's not enough power to start charging the battery, and the battery is pulling the voltage to look like a dead short. I've seen that on much larger cells where the power supply is a bit undersized. Can you charge it a bit (say, to 20%) externally and then see if you get a non-zero voltage?

Quote from: JohnS on January 15, 2013, 12:58:37 AM
Thanks - will send.

If my board needed the LiPo then it now won't work because something is wrong with the LiPo charging circuit or the like - zero volts at the pins when it ought to be charging.  The plot thickens...
Title: Re: Another case of unable to boot from SD
Post by: ehj666 on January 15, 2013, 02:37:25 AM
Quote from: jwischka on January 14, 2013, 11:59:18 PM
No problem. RadShack does carry Sandisk cards, FYI.

Well I just went up to Radio Shack. They apparently just had a big sale on Sandisk. The prices were very good, unfortunately they sold out of the 4GB SDs. I got a 16, burned the image with no problem, but it generates the same error. I should have added, the first line of the error message reads:

U-Boot SPL 2012.10-04266-g20efdee-dirty (Jan 08 2013 - 16:20:29)

At this point I have to believe something is wrong with the SD interface itself on this particular board.
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 15, 2013, 02:41:46 AM
Hrm... that's somewhat interesting, because it means it is reading *some* of the card, because that's the version of u-boot that I compiled.

What it should say is:

QuoteU-Boot 2012.10-04266-g20efdee-dirty (Jan 08 2013 - 16:20:29) Allwinner Technology

CPU:   SUNXI Family
Board: A13-OLinuXino
I2C:   ready
DRAM:  512 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0

Do you get any of that? If so, can you hit any key to stop the autoboot?
Title: Re: Another case of unable to boot from SD
Post by: ehj666 on January 15, 2013, 03:09:45 AM
That is all there is, in fact "Allwinner Technology" does not even appear on the first line.

That is followed by:

DRAM: 512MB
SUNXI SD/MMC: 0
sp1: mmc blk read err - 0
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 15, 2013, 03:18:58 AM
You may have mentioned this before, but what are you using to power the board? I am wondering if you have enough power to drive the nand, but not enough to drive the SD and the nand.

Quote from: ehj666 on January 15, 2013, 03:09:45 AM
That is all there is, in fact "Allwinner Technology" does not even appear on the first line.

That is followed by:

DRAM: 512MB
SUNXI SD/MMC: 0
sp1: mmc blk read err - 0
Title: Re: Another case of unable to boot from SD
Post by: ehj666 on January 15, 2013, 03:56:24 AM
At the moment I am using a 2.1A 5V USB power supply. A 1.2A @ 12V just arrived today, but I have not hooked it up as yet.
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 15, 2013, 03:57:44 AM
Quote from: ehj666 on January 15, 2013, 03:56:24 AM
At the moment I am using a 2.1A 5V USB power supply. A 1.2A @ 12V just arrived today, but I have not hooked it up as yet.

See if it makes any difference. If not let me know and I'll brainstorm some more.
Title: Re: Another case of unable to boot from SD
Post by: JohnS on January 15, 2013, 01:59:45 PM
With that missing text, I wonder if it could be dropping characters at the host end?
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 15, 2013, 03:08:43 PM
Quote from: JohnS on January 15, 2013, 01:59:45 PM
With that missing text, I wonder if it could be dropping characters at the host end?

I would think dropping characters, or a bad cable would be a more intermittent problem, but given that the text is at the beginning, I suppose it's possible.

One other thing might be to recompile u-boot to use a different UART by default and try that.

Title: Re: Another case of unable to boot from SD
Post by: ehj666 on January 16, 2013, 10:46:02 PM
Just to update status, Olimex got back to me and also concludes that there is probably something wrong with the SD port. I did not want to wait to go through the whole RMA process to get a replacement, so I ordered a second board and will return the first one after the new one arrives, if necessary. Fortunately they had one A13-Olinuxino-SD in stock so snagged that as well.

Thanks for all the input everyone.
Title: Re: Another case of unable to boot from SD
Post by: ehj666 on January 19, 2013, 01:03:02 AM
Well I am really perplexed now. I just received another A13_Olinuxino-Wifi and this time I got the A13-Olinuxino-SD (the SD itself is a Samsung). It boots just fine to Android, but again if I insert the SD while Android is running, I get damaged SD. If I try to boot to the supplied SD I get:

U-Boot SPL 2012.10-rc1-03956-gd7ea23d (Oct 11 2012 - 15:48:58)
MMC:   SUNXI SD/MMC: 0
Loading U-Boot...
### ERROR ### Please RESET the board ###

Resetting the board results in exactly the same message.

If I try to boot to one of the SDs burned from the downloaded image, I get:

U-Boot SPL 2012.10-04266-g20efdee-dirty (Jan 08 2013 - 16:20:29)
DRAM: 512MB
SUNXI SD/MMC: 0
sp1: mmc blk read err - 0
### ERROR ### Please RESET the board ###

The latter is basically exactly what I was seeing on the first board.

I do not believe that I have two bad boards. I am still running just from the USB port / 2.1A @ 5V power. I cannot believe that is insufficient for the very slight additional draw of the SD, but am willing to try another power supply.

Any idea what is going on or what could explain the symptoms I am seeing.
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 19, 2013, 01:24:06 AM
I would still vote for power supply. It's not really the sustained capacity, but whether it is strong enough to handle the spikes as loads switch on. Particularly since you are at 5v, you are more susceptible to dropping below the voltage needed to run the board. If you have an external hard drive, they are usually 12v 2a supplies, and should be more than enough to handle the board. Would be a good test, at least. First thing I'd try.
Title: Re: Another case of unable to boot from SD
Post by: ehj666 on January 19, 2013, 01:47:37 AM
I agree with you on the point of voltage drop, OTOH I do not think it can be current. I have booted both with and without a USB keyboard and mouse attached, and they are certainly going to draw more current than the SD port.

I will give it a shot with a different power supply over the weekend.
Title: Re: Another case of unable to boot from SD
Post by: JohnS on January 19, 2013, 02:00:26 AM
I've also had problems.  Different than yours but could only boot Linux with a LiPo battery attached.

I've tried very different supplies including 15V 4.5A and got the same result as with the other PSUs.

Still, I can run u-boot so can try other tests, step by step.

Try a battery if you have one.

Of course it could be some other issue: RAM timings or the like...

John
Title: Re: Another case of unable to boot from SD
Post by: ehj666 on January 19, 2013, 02:37:23 PM
It does not appear to be the power supply. I now have a 12V power supply powering the board. The one sold by Olimex is rated at 0.5A @ 12V, or 6W. The one I am using is rated at 1.2A @ 12V. Everything powers up fine, in fact acts exactly the same as powered with the USB OTG.

The manual also states that maximum current draw at 12V is approximately 350mA. I am only driving a USB keyboard, mouse, VGA and Wifi, and have disconnected the keyboard and mouse at various times. I have not even tried to connect the LCD display.

I read the manual cover to cover to see if there was anything I was missing and have not found anything. Any ideas would be greatly appreciated.
Title: Re: Another case of unable to boot from SD
Post by: JohnS on January 19, 2013, 03:52:11 PM
As I posted, the only way I got it to boot Linux (to a login prompt) at all was by connecting a LiPo battery.

I have much bigger PSUs and it seems either this board picks up some stray noise from them or needs some noise suppression internally or ... well, I don't know.  Something's wrong.  Doesn't seem to be the SD cards or my PSUs.

I'd try powering direct from a car battery if I could (guarantees no noise on power in lines) but not realistic here at the moment.

John
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 19, 2013, 03:53:29 PM
No need to get testy, friend. You asked for help, and the best idea that fit your symptoms was a weak power supply. Being an expert in, well, power system transients, I can certainly see how a weak supply would cause what you're seeing. "12V" does not mean "12V", especially when loads are coming on, and the steady state performance of a supply or a load can be significantly different from its characteristics during transients. An air-conditioner may draw 2-3kW at full load, but may draw 10kW+ when it is starting up. It was not at all unreasonable to ask you to try another supply, particularly in light of JohnS's symptoms.

I forget the whole sequence of this thing, but have you tried disconnecting the VGA and seeing what you get over the serial console?

Have you tried to make your own card from scratch? Partitioning manually, etc?

I might also try booting with a kernel / script.bin that has most stuff disabled.

Can you confirm that the card is a Samsung, and not a knockoff (check the manufacturer ID byte)? It shouldn't matter, but then again, this thing should be booting...

Title: Re: Another case of unable to boot from SD
Post by: ehj666 on January 19, 2013, 05:51:31 PM
I am not sure what I said that would give the impression I was getting testy? I admit my frustration level is getting rather high at this point, but I certainly would not want to take it out on people trying to help me.

I am going to combine replies to the last two posts here:

Noise:

Which port would be powered by a battery? The PWR jack I assume since a 12V car battery was mentioned. I have run into noise problems in the past and this just is not acting like a noise problem. Some noise on the power line is expected, the power supply should filter that out. If it propagates through to the board then there should be bigger problems, like the mouse acting erratically, junk characters on the serial port, etc. Noise problems tend to be inconsistent, whereas what I am seeing is consistent, repeatable and basically identical across two boards.

Power:

I do understand the concept of inrush current. The manual covers this in detail, next to last paragraph on page 9.

QuoteIf you have a standard LCD display connected to LCD_con, Android and WIFI running the typical consumption is between 150mA and 350mA depending on the current load. While the board is in stand-by mode it consumes 60mA. All the three approximate values above were taken when I applied 12V to the board.

I should be drawing even less, since I do not have an LCD display attached. If the maximum it should draw, even with an LCD is 350mA, then 1200mA should certainly provide sufficient margin for inrush current, given that the Olimex PS is rated at 500mA. Also, if it were on the harry edge, one would think something would change by increasing or decreasing the load. That is not the case, I increase or decrease the load by adding or removing components and it acts exactly the same.

SD card and Partitioning

The SD card is a genuine Samsung. I have not at this point tried to partition manually, although I have retried the other SDs created from images. I posted the differences I saw between the Olimex supplied SD and the ones I imaged above.

Very early on, before the boards had even arrived, I built a custom kernel I expected I would need, partitioned an SD and burned the kernel and Debian image to it. When that did not work I opted for the safer routes of using known good images and finally a preloaded SD. I can try that again, but it would seem to increase the number of unknowns rather than decrease them.

I hope my answer does not sound testy, I am just supplying my thought process in trying to simplify and isolate the problem in the hopes someone will tell me where my logic is faulty. At no point to I want to appear ungrateful for all the help that has been provided.
Title: Re: Another case of unable to boot from SD
Post by: sebswed on January 19, 2013, 05:57:57 PM
Hi there.

Maybe a stupid question from a newbie :-)
But, do you experience the same problem with a different image?
The Linaro image works for me with both USB keyboard and mouse connected during start up with the default 12V Omilex power supply.

Its probably a stupid advise but what to loose by trying right :-)

Kind regards,
Sebastiaan
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 19, 2013, 05:59:24 PM
Frustrated is probably a good word - and I can understand. I've just done this enough to know that a lot of times funny stuff goes on with power supplies, and their steady-state ratings do not mean that they have any kind of stiffness at all when loads come on.

I will admit that it seems far fetched that this board should be pulling any kind of power that would depress a supply, but it seemed the best thing to try. For my part, I'm running on a hard drive supply, which is enough to spin a full-sized disk, and I haven't encountered any problems. I did encounter problems trying to power via USB, which is why I went to a dedicated supply. Combined with John's experience via the battery... you see where this is going. But since you have tried another supply, then we can probably rule that out.

You didn't mention trying console via UART and disconnecting the VGA - I'm just wondering if that would give a different output. This is a wifi board, correct? And this one still boots into Android fine, correct?

I could try building you a different u-boot, but at this point I'm not sure if that would help or not. As I recall, there aren't a ton of options in there that should be changeable. I'm willing to look into it as a next step, if the UART isn't working.
Title: Re: Another case of unable to boot from SD
Post by: JohnS on January 19, 2013, 06:27:24 PM
Quote from: sebswed on January 19, 2013, 05:57:57 PM
Hi there.

Maybe a stupid question from a newbie :-)
But, do you experience the same problem with a different image?
The Linaro image works for me with both USB keyboard and mouse connected during start up with the default 12V Omilex power supply.

Its probably a stupid advise but what to loose by trying right :-)

Kind regards,
Sebastiaan

No Linux image boots for me (except that all the ones I had worked when I had a LiPo battery connected).

Please - which Linaro image do you mean?  Do you have a URL?

John
Title: Re: Another case of unable to boot from SD
Post by: sebswed on January 19, 2013, 06:36:10 PM
Hello John.

I use the image inside olinuxino_linaro_alip_12_11.zip on:
https://docs.google.com/file/d/0B-bAEPML8fwlRm5ZSmZtUXQyMTg/edit (https://docs.google.com/file/d/0B-bAEPML8fwlRm5ZSmZtUXQyMTg/edit)

Kind regards,
Sebastiaan
Title: Re: Another case of unable to boot from SD
Post by: jwischka on January 19, 2013, 08:17:19 PM
I've uploaded a new image with a recompiled u-boot - there were several changes in the code that I pulled from git, though I didn't go through them individually. Might see if they solve your issues. R7, in the other thread.
Title: Re: Another case of unable to boot from SD
Post by: JohnS on January 19, 2013, 08:57:36 PM
Quote from: sebswed on January 19, 2013, 06:36:10 PM
Hello John.

I use the image inside olinuxino_linaro_alip_12_11.zip on:
https://docs.google.com/file/d/0B-bAEPML8fwlRm5ZSmZtUXQyMTg/edit (https://docs.google.com/file/d/0B-bAEPML8fwlRm5ZSmZtUXQyMTg/edit)

Kind regards,
Sebastiaan
Thanks.  Now I find the Micro doesn't have the AX209 so I suspect I can't use that kernel on my WiFi board.

John
Title: Re: Another case of unable to boot from SD
Post by: JohnS on January 19, 2013, 10:25:34 PM
I've built U-Boot with md5sum support and can see the kernel is loaded correctly from my SD card so it's not the card to blame for the failure to boot.  Progress!

Looks ever more like a hardware fault.

(The Micro's SD image doesn't work but that may be to do with the AX209.)

John