Hi Qiang_FSL, raymondwang, JackLee1z igorpadykov YixingKong
alejandrolozano WilliamHuang PeterChan
I am using MCIMX28EVK board. I have used the script mk_mx28_sd to load uboot (imx28_ivt_uboot.sb) and rootfs on the SD card.
./mk_mx28_sd -u /dev/sdb
I need to configure u-boot to boot the kernel from the SD card. I used u-boot commands to boot(boot,bootm).
But linux image is not loading.
/* terminal message*/
PowerPrep start initialize power...
Battery Voltage = 4.24V
boot from battery. 5v input not detected
May 20 201412:16:00
FRAC 0x92925552
memory type is DDR2
Wait for ddr ready 1power 0x00820710
Frac 0x92925552
start change cpu freq
hbus 0x00000003
cpu 0x00010001
U-Boot 2009.08 (Jun 03 2014 - 16:56:55)
Freescale i.MX28 family
CPU: 454 MHz
BUS: 151 MHz
EMI: 205 MHz
GPMI: 24 MHz
DRAM: 128 MB
MMC: IMX_SSP_MMC: 0, IMX_SSP_MMC: 1
In: serial
Out: serial
Err: serial
Net: got MAC address from IIM: 00:04:9f:02:b6:94
FEC0
Hit any key to stop autoboot: 0
MX28 U-Boot > boot
Unknown command 'console=ttyAM0,115200' - try 'help'
MX28 U-Boot > bootm
Wrong Image Format for bootm command
ERROR: can't get kernel image!
MX28 U-Boot >
The printenv commands displays the following messages
MX28 U-Boot > printenv
ipaddr=192.168.1.103
serverip=192.168.1.101
netmask=255.255.255.0
bootcmd_net=run bootargs_nfs; dhcp; bootm
bootcmd_mmc=run bootargs_mmc; mmc read 0 ${loadaddr} 100 3000; bootm
ethact=FEC0
bootdelay=5
bootargs_mmc=console=ttyAM0,115200 root=/dev/mmcblk0p3 rw rootwait ip=none ssp1
bootcmd=run bootargs_mmc
bootargs_nfs=/boot/uImage
nfsroot=/tools/rootfs
bootfile=uImage
baudrate=115200
kernel=uImage
loadaddr=40000000
bootargs=noinitrd console=ttymxc0,115200 init=/linuxrc root=/dev/nfs nfsroot=10.29.244.27:/tftpboot/rootfs ip=dhcp
bootargs_base=setenv bootargs console=ttyAM0,115200
stdin=serial
stdout=serial
stderr=serial
ver=U-Boot 2009.08 (Jun 03 2014 - 16:56:55)
Environment size: 670/130044 bytes
How can I configure u-boot to be able to boot the linux image from sd?
Regards
Pt A R
Solved! Go to Solution.
Thanks PeterChan.
I have followed the steps provided in the following thread.
https://community.freescale.com/message/273177#273177
Linux booted successfully
Regards
Pt
Unknown command 'console=ttyAM0,115200' - try 'help'
- It is because the "setenv" is missing. You should use "bootargs_mmc=setenv bootargs console=ttyAM0,115200 root=/dev/mmcblk0p3 rw rootwait ip=none ssp1"
Wrong Image Format for bootm command
ERROR: can't get kernel image!
- In your boot argument "bootcmd_mmc=run bootargs_mmc; mmc read 0 ${loadaddr} 100 3000; bootm", you are attempting to load the uImage from MMC offset (100 x 512) or 0xC800. Are you sure your uImage is programmed to 0xC800 and not (0x100 x 512) = 0x20000? For the latter case, please change the load address from "100" to "0x100" and size from "3000" to "0x3000". Please also be reminded that MMC address offset (0x400 ~ 0x20000) is the reserved space for storing boot environment. You should never overwrite this area.
Hi PeterChan
I used ltib to build uboot and linux image and used the mk_mx28_sd script to load rootfs and uboot to sd.
I have tried this command
setenv bootcmd_mmc run bootargs_mmc; mmc read 0 ${loadaddr} 0x100 0x3000; bootm
But it throws the following error.
MMC read: dev # 0, block # 256,count 12288 ...
12288 blocks read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Is there any other method to program u-boot and rootfs to sd card?
Can you share the steps to configure the u-boot to boot linux from sd card?
Regards
Pt
Thanks PeterChan.
I have followed the steps provided in the following thread.
https://community.freescale.com/message/273177#273177
Linux booted successfully
Regards
Pt
I am sorry I made a mistake in the boot argument in my previous reply and I have amended it. To make it clear, here is the boot argument I am using to load i.MX28 uImage from SD.
bootdelay=3
baudrate=115200
ipaddr=192.168.1.103
serverip=192.168.1.101
netmask=255.255.255.0
bootfile="uImage"
loadaddr=0x42000000
nfsroot=/home/notroot/nfs/rootfs
bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp fec_mac=${ethaddr}
bootcmd_net=run bootargs_nfs; dhcp; bootm
ethact=FEC0
bootargs=console=ttyAM0,115200n8
bootargs_mmc=setenv bootargs ${bootargs} root=/dev/mmcblk0p3 rw rootwait ip=none fec_mac=${ethaddr}
bootcmd_mmc=run bootargs_mmc; mmc read 0 ${loadaddr} 0x100 0x2000; bootm
bootcmd=run bootcmd_mmc
stdin=serial
stdout=serial
stderr=serial
3 partitions are created on the SD card. The beginning few MB of the SD card is reserved for boot argument & uImage. The u-boot is stored to partition 1 and the rootfs is stored to partition 3.
Disk /dev/sdc: 1977 MB, 1977614336 bytes
61 heads, 62 sectors/track, 1021 cylinders
Units = cylinders of 3782 * 512 = 1936384 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb3157905
Device Boot Start End Blocks Id System
/dev/sdc1 16 32 32147 53 OnTrack DM6 Aux3
/dev/sdc2 33 128 181536 b W95 FAT32
/dev/sdc3 129 1021 1688663 83 Linux
DD command is used to program the uImage to SD at sector offset 0x100.
dd if=./rootfs/boot/uImage of=/dev/sdX bs=512 seek=256 && sync && sync
You wrote that U-boot and rootfs were located on SD. So, the kernel - does not.
It is needed to locate the kernel and rootfs ; U-boot is needed for NFS using.
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------