Unable to boot from SD

Started by Walter Artica, December 12, 2012, 07:51:29 AM

Previous topic - Next topic

Walter Artica

Hi.
I received a few days ago the A13-WiFi. Booting from the NAND image works well, including the SD mounting under Android. However, until now every attempt to boot from an SD card has been a failure.

I've followed the instructions of tutorials from different websites (including Olimex and Sunxi), with no luck. I've tried with 2 different microSD cards (2gb and 8gb). I've written both the SD image from the wiki and an image built from scratch (after the required partitioning), but none of them have worked, even after many different attempts.

I get no response from the USB-Serial adapter (USB-Serial-Cable-F from Olimex connected to UEXT's UART pins following the pinout from the user guide) nor from the VGA port. Just in case, the power source fulfill requirements.

Any suggestions? Thanks.

olimex


Cure

Here are a few things I struggled with when I first got my A13, hopefully you'll find something useful.  I corrupted my SD card because I powered on/off thinking it wasn't working right.  Big mistake, as I had to reimage the SD card a few times.

Before you do that here are a few things to try.  Make sure you have the right USB Serial pins plugged in to the UEXT (next to the vga connector).  Pin numbers are printed on the bottom of the board, when you look from the top you will see:

Pins:
2   4   6   8   10
1   3   5   7   9

USB Serial plugs go here:
blue   red   6   8   10
1    green   5   7   9

-Make sure the USB Serial drivers are installed properly and you are using the right COM port for communication.  I use windows and have found a few issues.  The USB serial cable only seems to like PuTTY terminal software.  The problem is Putty Crashes my Windows 7 64 bit (blue screen of death).  Maybe it's just my computer, but if I use a different terminal program it makes the A13 loop over and over and it refuses to boot.  The solution I found is close the terminal program, boot the A13 and wait 30 seconds, then turn on the terminal program, hit enter to refresh screen and it shows me the Login prompt.  I took Hyperterminal from an old Windows XP machine I have (it sucks but it works).

-If I mess up and plug in the terminal too soon and it starts to loop, I just wait and it says rebooting in 10 seconds, then it gives a countdown from 3 seconds giving you a chance to stop the bootup.  If you stop the boot and the SD card is not being read, you can safely unplug the A13.  Never just unplug it.

-Sometimes the terminal program gives lots of diagnostic messages like this over and over and you can't see what you're doing:
[ 7167.000000] rtl8192c_set_FwPwrMode_cmd(): Mode = 1, SmartPS = 2
[ 7168.000000] rtl8192c_set_FwPwrMode_cmd(): Mode = 1, SmartPS = 2
[ 7169.000000] rtl8192c_set_FwPwrMode_cmd(): Mode = 1, SmartPS = 2
There is nothing wrong with the A13 so don't pull the power and corrupt your SD card.  Instead check the VGA and it should be working.

-When I shutdown the A13 using the command:
#shutdown -h now
I find even if I unplug it (from power) and plug it back in later, I still have to hold the PWR_BUT for a few seconds before it boots up again.

-Startx took 5 minutes to download, 3.5 hours to install.  I bought a 2nd Micro SD card for this because $5 is worth 3.5 hours of my time.





If all else fails and you have to reimage your SD card, it's very easy.  Just download the image from the wiki page:

https://www.olimex.com/wiki/A13-OLinuXino
Look for:
DEBIAN SD CARD IMAGE
[A13 Debian Linux Image] Debian SD card image on A13...

You must use Linux to program the card, I boot ubuntu from a USB key and can give you instructions on how to make the USB key if you need.  Do not bother setting up a Virtual Machine, or VMWare because you might not be able to program the SD card.  When you boot up Linux open terminal and type:

# sudo su
# fdisk -l (lists all your drives, my SD card is called /dev/mmcblk0p1/, yours might be called /dev/sdX1/ or something else)
# fdisk -u=sectors /dev/mmcblk0 (again make sure this is your SD card reader)
# p   (lists all partitions)
# d   (delete partition)
# 1   (partition 1)
# p   (repeat until no partitions are left)
# d
# 2
# p

Next create 2 new partitions:

# n [enter] p [enter] 1 (new partition)
(beginning) 2048 [enter] 34815
# n [enter] p [enter] 2 [enter] [enter]
# p    (list all partitions, you should have 2)
# w   (exit)
# mkfs.vfat /dev/mmcblk0p1
# mkfs.ext3 /dev/mmcblk0p2 (takes about 2 minutes)

Using the .img file you downloaded (and extracted) dd the .img to the card:
# dd if=/home/user/Downloads/A13_debian_WIFI_GCC_GPIO_IN_OUT_AUTO_load_third_release.img of=/dev/mmcblk0 (takes around 15 minutes)

Done!

Let me know if it works for you, I almost pulled out my hair for the first few days and could have used a guide like this.  ;)

mouha

Hi,

I don't know if it worked for him, but was very valuable for me.
Thanks.

anubis

#4
Quote-If I mess up and plug in the terminal too soon and it starts to loop, I just wait and it says rebooting in 10 seconds, then it gives a countdown from 3 seconds giving you a chance to stop the bootup.  If you stop the boot and the SD card is not being read, you can safely unplug the A13.  Never just unplug it.

It looks like a bug.

I have similar issue:

with serial cable connected to UART1 I was unable to boot.

U-Boot warns me with "*** U-boot warning - bad crc using default environment"  message
and then during boot process kernel panic hapened following by "Reboot in 10 seconds..."  message.

I fixed it just by typing 'save'  in U-boot console.

After this you don't need to unplug UART1 when reboot and reconnect terminal.


UPDATE:
-------

looks like 'save' do not always help.

It happened one more time without U-Boot warning.
Fixed by single 'connect-disconnect' of USB plug of convertor, with A13 powered on and UART1 wires connected.

It fixes issue and next power on-off cycles it boots ok.

Really strange...

junetec

Sorry I have the same issue.

After the dd process(it takes 16 minutes) if I look on the sd there's nothing.

With ubuntu 12.10, if I make the procedure mencioned
fdisk dont't show anything in /dev/sdx but the SD it is and I can copy files in it.

And mkfs.ext3 /dev/sdc give me an device it's busy error

Any help will be apreciated

I can boot from 2gb sd with debian that I purchase with the A13wifi

JohnS

Don't use mkfs at all.

After using dd (and a sync) you can see what is on the SD card using tools such as sfdisk, cfdisk and/or fdisk

If it looks like at least 2 filesystems you could mount them if you wanted.

But just boot it if that's what you see.

In all cases, use /dev/sdc or whatever is the whole SD card on your host system.

John