Hi Guys,
I add initramfs(based on busy box) in linux kernel compiling. uImage becomes bigger than default(no initramfs support):
Error message generates in the process of downloading uboot and kernel image using Mfgtools:
Header 1 |
---|
U-Boot 2009.08 (Aug 16 2013 - 15:02:51) CPU: Freescale i.MX6 family TO1.1 at 792 MHz Thermal sensor with ratio = 188 Temperature: 39 C, calibration data 0x5a34e87d mx6q pll1: 792MHz mx6q pll2: 528MHz mx6q pll3: 480MHz mx6q pll8: 50MHz ipg clock : 66000000Hz ipg per clock : 66000000Hz uart clock : 80000000Hz cspi clock : 60000000Hz ahb clock : 132000000Hz axi clock : 198000000Hz emi_slow clock: 99000000Hz ddr clock : 396000000Hz usdhc1 clock : 198000000Hz usdhc2 clock : 198000000Hz usdhc3 clock : 198000000Hz usdhc4 clock : 198000000Hz nfc clock : 24000000Hz Board: i.MX6DL/Solo-SABRESD: unknown-board Board: 0x61011 [POR ] Boot Device: MMC I2C: ready DRAM: 512 MB MMC: FSL_USDHC: 0,FSL_USDHC: 1,FSL_USDHC: 2,FSL_USDHC: 3 Using default environment In: serial Out: serial Err: serial Net: got MAC address from IIM: 00:00:00:00:00:00 FEC0 [PRIME] Hit any key to stop autoboot: 0 ## Booting kernel from Legacy Image at 10800000 ... Image Name: Linux-3.0.35-2508-g54750ff Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 9181376 Bytes = 8.8 MB Load Address: 10008000 Entry Point: 10008000 Verifying Checksum ... Bad Data CRC ERROR: can't get kernel image! MX6Solo SABRESD-MFG U-Boot > |
uboot environment:
Header 1 |
---|
MX6Solo SABRESD-MFG U-Boot > printenv bootargs=console=ttymxc0,115200 rdinit=/linuxrc enable_wait_mode=off nosmp bootcmd=bootm 0x10800000 0x10c00000 bootdelay=0 baudrate=115200 ipaddr=192.168.1.103 serverip=192.168.1.101 netmask=255.255.255.0 loadaddr=0x10800000 rd_loadaddr=(0x10800000 + 0x300000) netdev=eth0 ethprime=FEC0 uboot=u-boot.bin kernel=uImage stdin=serial stdout=serial stderr=serial ethact=FEC0 Environment size: 371/131068 bytes |
I enlarged parameter rd_loadaddr, which is 10 times than before:
Header 1 |
---|
MX6Solo SABRESD-MFG U-Boot > set rd_loadaddr (0x10800000+0x1E00000) MX6Solo SABRESD-MFG U-Boot > printenv bootargs=console=ttymxc0,115200 rdinit=/linuxrc enable_wait_mode=off nosmp bootcmd=bootm 0x10800000 0x10c00000 bootdelay=0 baudrate=115200 ipaddr=192.168.1.103 serverip=192.168.1.101 netmask=255.255.255.0 loadaddr=0x10800000 netdev=eth0 ethprime=FEC0 uboot=u-boot.bin kernel=uImage stdin=serial stdout=serial stderr=serial ethact=FEC0 rd_loadaddr=(0x10800000+0x1E00000) Environment size: 370/131068 bytes |
But still same error appears:
Header 1 |
---|
MX6Solo SABRESD-MFG U-Boot > boot ## Booting kernel from Legacy Image at 10800000 ... Image Name: Linux-3.0.35-2508-g54750ff Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 9181376 Bytes = 8.8 MB Load Address: 10008000 Entry Point: 10008000 Verifying Checksum ... Bad Data CRC ERROR: can't get kernel image! |
Two possible reasons for the issue :
- kernel image was not written to the same place (start # of block) as was read ;
- kernel image size is not set correctly.
Please check if kernel image size is correct in U-Boot command "mmc read".
Parameter length (say, 0x1800 for 3M kernel) should be greater or equal real
kernel size.
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Muri,
Iam facing the same issue with i.MX6 Sabrelite platform. Below are the environment variables that I have issued by interuupting the booting for the first time.
MX6Q SABRELITE U-Boot > setenv bootcmd 'run bootargs; mmc dev 1;mmc read ${loadaddr} 0x800 0x2000;bootm'
MX6Q SABRELITE U-Boot > setenv bootargs 'console=ttymxc0,115200 root=/dev/mmcblk0p1 rootwait rw video=mxcfb0:dev=ldb,LDB-XGA,if=RGB666 video=mxcfb0:dev=hdmi'
MX6Q SABRELITE U-Boot > saveenv
Saving Environment to SPI Flash...
Erasing SPI flash...Erasing SPI NOR flash 0xc0000 [0x2000 bytes]
..SUCCESS
Writing to SPI flash...Writing SPI NOR flash 0xc0000 [0x2000 bytes] <- ram 0x276009b8
SUCCESS
done
MX6Q SABRELITE U-Boot > reset
resetting ...
U-Boot 2009.08-00530-g1f7edab (Nov 08 2012 - 10:51:22)
CPU: Freescale i.MX 6 family 0.0V at 792 MHz
Temperature: 36 C, calibration data 0x5b050d7d
mx6q pll1: 792MHz
mx6q pll2: 528MHz
mx6q pll3: 480MHz
mx6q pll8: 50MHz
ipg clock : 66000000Hz
ipg per clock : 66000000Hz
uart clock : 80000000Hz
cspi clock : 60000000Hz
ahb clock : 132000000Hz
axi clock : 264000000Hz
emi_slow clock: 29333333Hz
ddr clock : 528000000Hz
usdhc1 clock : 200000000Hz
usdhc2 clock : 200000000Hz
usdhc3 clock : 200000000Hz
usdhc4 clock : 200000000Hz
nfc clock : 24000000Hz
Board: MX6Q-SABRELITE:[ WDOG]
Boot Device: I2C
DRAM: 1 GB
MMC: FSL_USDHC: 0,FSL_USDHC: 1
JEDEC ID: 0xbf:0x25:0x41
Reading SPI NOR flash 0xc0000 [0x2000 bytes] -> ram 0x276009b8
SUCCESS
In: serial
Out: serial
Err: serial
Checking for recovery command file...
Card did not respond to voltage select!
** Bad partition 6 **
** Bad partition 6 **
Net: got MAC address from IIM: 11:22:33:44:55:66
FEC0 [PRIME]
Hit any key to stop autoboot: 0
Unknown command 'rootwait' - try 'help'
mmc1 is current device
MMC read: dev # 1, block # 2048, count 8192 ... 8192 blocks read: OK
## Booting kernel from Legacy Image at 10800000 ...
Image Name: Linux-3.0.35-2310-gc27cb38
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3686476 Bytes = 3.5 MB
Load Address: 10008000
Entry Point: 10008000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!
MX6Q SABRELITE U-Boot >
can you please let me know where Iam going wrong? I have used the below procedure to flash the microSD card.
[root@localhost Binaries]# ls rootfs rootfs.tgz u-boot.bin uImage [root@localhost Binaries]# dd if=u-boot.bin of=/dev/sdb1 bs=512 && sync && sync 349+1 records in 349+1 records out 179040 bytes (179 kB) copied, 0.160394 s, 1.1 MB/s [root@localhost Binaries]# dd if=uImage of=/dev/sdb bs=512 seek=2048 && sync && sync 7200+1 records in 7200+1 records out 3686540 bytes (3.7 MB) copied, 1.85114 s, 2.0 MB/s [root@localhost Binaries]# cd rootfs/ [root@localhost rootfs]# fdisk -l Disk /dev/sda: 500.1 GB, 500107862016 bytes, 976773168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x8b7ac3f0 Device Boot Start End Blocks Id System /dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT /dev/sda2 206848 209717247 104755200 7 HPFS/NTFS/exFAT /dev/sda3 209717248 210126847 204800 83 Linux /dev/sda4 210126848 976773167 383323160 5 Extended /dev/sda5 524703744 629561343 52428800 83 Linux /dev/sda6 629563392 663117823 16777216 82 Linux swap / Solaris /dev/sda7 663119872 976771071 156825600 83 Linux /dev/sda8 210130263 524698964 157284351 83 Linux Partition table entries are not in disk order Disk /dev/sdb: 3904 MB, 3904897024 bytes, 7626752 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 8192 7626751 3809280 b W95 FAT32 [root@localhost rootfs]# fdisk /dev/sdb Welcome to fdisk (util-linux 2.22.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): d Selected partition 1 Partition 1 is deleted Command (m for help): d No partition is defined yet! Command (m for help): u Changing display/entry units to cylinders (DEPRECATED!) Command (m for help): u Changing display/entry units to sectors Command (m for help): n Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select (default p): p Partition number (1-4, default 1): 1 First sector (2048-7626751, default 2048): 8192 Last sector, +sectors or +size{K,M,G} (8192-7626751, default 7626751): Using default value 7626751 Partition 1 of type Linux and of size 3.6 GiB is set Command (m for help): d Selected partition 1 Partition 1 is deleted Command (m for help): d No partition is defined yet! Command (m for help): d No partition is defined yet! Command (m for help): n Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select (default p): p Partition number (1-4, default 1): 1 First sector (2048-7626751, default 2048): 8192 Last sector, +sectors or +size{K,M,G} (8192-7626751, default 7626751): Using default value 7626751 Partition 1 of type Linux and of size 3.6 GiB is set Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@localhost rootfs]# mkfs.ext3 /dev/sdb1 mke2fs 1.42.5 (29-Jul-2012) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 238080 inodes, 952320 blocks 47616 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=977272832 30 block groups 32768 blocks per group, 32768 fragments per group 7936 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736 Allocating group tables: done Writing inode tables: done Creating journal (16384 blocks): done Writing superblocks and filesystem accounting information: done [root@localhost rootfs]# mount /dev/sdb1 /mnt/ [root@localhost rootfs]# cp -r* /mnt/ cp: invalid option -- '*' Try 'cp --help' for more information. [root@localhost rootfs]# cp -r * /mnt/ [root@localhost rootfs]# umount /mnt
Looks like Kernel size is small.
Please try the following :
MX6Q SABRELITE U-Boot > setenv bootcmd 'run bootargs; mmc dev 1;mmc read ${loadaddr} 0x800 0x3000;bootm'
~Yuri.
Eddy
We have not got your response yet and will close the discussion in 3 days. If you still need help, please feel free to reply with an update to this discussion.
Thanks,
Yixing
Eddy
We are sorry for getting back to you so late. Are you still stuck with the issue? If you have somehow resolved the issue, can we close the discussion? If you still need help, please feel free to reply with an update to this discussion.
Thanks,
Yixing