Flashing an SD Card from scratch takes many steps and can be error-prone. The attached script will partition, format an SD Card, then write the files generated by LTIB in one single line.
It copies the bootloader, the kernel, then creates an ext3 partition where the root filesystem is copied.
32MB are reserved for the bootloader and the kernel. The rest of the SD Card is allocated for the ext3 partition.
Usage:
# export LTIB_PATH=~/training_mx53/linux/ltib (only needs to be done once in your current shell)
# ./flash_ltib.sh [SD Card block device]
The first command tells the script where the root directory of LTIB is located
You will be prompted for super-user rights (so you do not need to call the script with sudo)
Example:
# export LTIB_PATH=~/training_mx53/linux/ltib
# ./flash_ltib.sh /dev/sdb
Target setup:
To boot from the SD Card, you can set the following environment variables in U-Boot:
U-Boot> setenv bootargs_mmc 'setenv bootargs ${bootargs} console=tty1 root=/dev/mmcblk0p1 rootwait rw'
U-Boot> setenv loadk 'mmc read 0 ${loadaddr} 0x800 0x1800'
U-Boot> setenv bootcmd_mmc 'run bootargs_base bootargs_mmc; run loadk; bootm'
U-Boot> setenv bootcmd 'run bootcmd_mmc'
If you want the board to boot on the SD Card by default, you can save the environment using:
U-Boot> saveenv
Caution:
This script will repartition and reformat the block device. Make sure you are supplying the right parameter!
Note:
The script uses the unstripped version of the root filesystem.
Original Attachment has been moved to: 777-flash_ltib.sh
Hello Remi,
Thanks for your help... The problem was solved :-)
In my previous reply I forgot to mention one detail ... the problem was not only the USB keyboard connected to the QSB board ... i.e. ... as I had problems at the boot was normal that it was not detected ... More serious was the fact that in the host I can't write anything via serial port ...
I finally discovered where the problem was ... I don't have the solution ... but I discovered that the problem was in minicom ... I can't send commands via minicom ... Today, I tried to send via gtkterm and could finally change the U-Boot :-)
Next step, create a custom image without X but with DirectFB and Qt... we'll see :-)))
You interact with the bootloader using the serial console, which is how you got your logs. You will need to strike a key before it times out and enter the commands I have mentioned.
You definitely want to look at i.MX53_START_Linux_BSP_UserGuide.pdf supplied with the latest version of the Linux BSP (part of the documentation archive).
Hello Joao, Are you placing the microSD card into the small microSD card slot, or are you plugging in the full sized SD card adapter with the microSD card inside? Just making sure as the i.MX53 Quick Start board boots from microSD.
Hello Joao, Are you placing the microSD card into the small microSD card slot, or are you plugging in the full sized SD card adapter with the microSD card inside? Just making sure as the i.MX53 Quick Start board boots from microSD.
Hello,
I'm new in this area... and I've a "start" problem.
I try many times to flash a new SD Card (with default image and Custom image using LTIB) with differents sizes (1Gb, 4Gb and 8 Gb). I follow the flash_ltib.sh and the steps described in i.MX53_START_Linux_DemoImage_Readme.doc with no sucess... the problem occurs when I put the SD Card into QSB board and make boot. The error is the same:
*** Warning - bad CRC or MMC, using default environment
In: serial
Out: serial
Err: serial
Net: got MAC address from IIM: 00:04:9f:01:aa:6d
FEC0 [PRIME]
Hit any key to stop autoboot: 0
FEC: enable RMII gasket
PHY indentify @ 0x0 = 0x0007c0f1
*** ERROR: `serverip' not set
Wrong Image Format for bootm command
ERROR: can't get kernel image!
MX53-LOCO U-Boot >
Thanks