Image is not of type ARM barebox image but of type MBR sector, update failed
I have phyBOARD-MIRA i.MX6 development board from PHYTEC. It comes with preinstalled barebox bootloader on NAND Flash, and one can build embedded Linux distribution (more or less) easily using Yocto and documentation of PHYTEC.
I have built new embedded Linux distribution using Yocto (with new barebox), I have copied it to SD Card as shown later below, set switch S2 on phyBOARD-MIRA i.MX6 to ON so that Linux boots from SD Card, and I was happy with how it works. Barebox bootloader is still old Barebox from NAND Flash. Now I am trying to flash everything from this SD Card to NAND Flash on embedded board. When I stop autoboot of embedded board and try flashing barebox like this: Code:
barebox_update -t nand /dev/mmc0.barebox Quote:
Quote:
Did anyone have similar problems, and is there anything more useful than this dd command? |
Code:
of=/dev/<DEVICE> |
Well, I am writing as of=/dev/sdb .
These are the partitions, whereby my SD Card is D: Code:
wwwri@LAPTOP-HO38O9KH /cygdrive/c |
I do not know anything about this Windows business, will be 19 years this fall without MS for me.
Anyhow, your SD card is not D, the first partition of sdb is marked as D. Considering the error you are getting I bet you are writing to sdb1. |
When I use
Code:
dd if=phytec-qt5demo-image-phyboard-mira-imx6-3.sdcard of=/dev/sdb bs=1M conv=fsync With Code:
of=/dev/sdb1 Code:
of=/dev/sdb |
Quote:
|
Quote:
Even if you flash your SD-Card completely to NAND, it will not behave as you expect. The Phytec BSP can probably generate images for NAND as well, which you should rather use. A usual setup is having the NAND partitioning described in the device tree, then you use barebox_update to install barebox into the NAND and then the kernel, device tree and rootfs are in an UBI/UBIFS. I think the Phytec documentation should help you with all that. In general, it's often easiest to flash over USB: Code:
barebox$ usbgadget -A /dev/nand0.root(root-nand)u -b Quote:
address 0. That's ok, because the i.MX6 BootROM only cares about what's at location 0x400 of the SD-Card. barebox_update though will try to guess what kind of image it's given to protect your from soft-bricking your device. As you are pointing it at the start of the SD-Card, it will see the MBR 0xaa55 magic and tell you that it's not what it expects. In your case, because you know that the image is valid despite the mismatched header, you can pass barebox_update the force flag -f, so it ignores the header check. Another way is to update barebox over USB or over the network and use a pristine barebox image that hasn't been mangled by writing MBR magic over it. |
All times are GMT -5. The time now is 01:54 PM. |