Hi all,
i'm developing a OS solution for the old iMX51.
I downloaded U-Boot 2016.09.01, compiled it with an old gcc crosscompiler. The initial settings is based on imx51evk board - our custom board is quite similar to the EVK.
Then I've prepared a SD card and generated the following state:
Disk /dev/sdd: 14,52 GiB, 15590227968 bytes, 30449664 sectors
Disk model: Multi-Card
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf3c8bcdf
Device Boot Start End Sectors Size Id Type
/dev/sdd1 2048 131071 129024 63M e W95 FAT16 (LBA)
/dev/sdd2 133120 30449663 30316544 14,5G 83 Linux
The initial space is filled with the uboot.imx file by dd command.
Into the first partition I put the zImage and imx51-memorex.dtb files.
When the board starts I see on console:
U-Boot 2016.09.01 (Nov 03 2025 - 17:01:15 +0100) CPU: Freescale i.MX51 rev3.0 at 800 MHz Reset cause: WDOG Board: MX51EVK DRAM: 512 MiB MMC: FSL_SDHC: 0, FSL_SDHC: 1 *** Warning - read failed, using default environment In: serial Out: serial Err: serial Net: FEC Error: FEC address not set. Hit any key to stop autoboot: 0 switch to partitions #0, OK mmc0 is current device ** No partition table - mmc 0 ** ** No partition table - mmc 0 ** Booting from net ... *** ERROR: `ethaddr' not set *** ERROR: `ethaddr' not set Bad Linux ARM zImage magic! =>
Here other outputs from relative commands:
=> mmc part
## Unknown partition table type 0
=> mmc list
FSL_SDHC: 0 (SD)
FSL_SDHC: 1
=> mmc dev
switch to partitions #0, OK
mmc0 is current device
=> mmcinfo
Device: FSL_SDHC
Manufacturer ID: 27
OEM: 5048
Name: SD16G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.5 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
Any idea abuot the cause of this problem?
Thanks, regards
Hello,
in these days I made a lot of tests. In the last one I discovered that uboot was deleted when I run the partion creation.
This is part of my script:
..
sudo dd if=/dev/zero of=$SDCARD bs=1M count=1 conv=fsync status=none
echo "Primo MB azzerato"
echo "Scrittura U-Boot a offset 2..."
sudo dd if=$UBOOT of=$SDCARD bs=512 conv=fsync status=progress seek=2
echo "U-Boot scritto"
# seek=2 → salta i primi 2 settori (1024 bytes)
# U-Boot inizia a byte 1024
echo "Verifica U-Boot a offset 1024"
sudo hexdump -C $SDCARD -s 1024 -n 64 | head -4
## DEVE mostrare: 00 00 80 97 (DCD header)
echo "Creazione tabella partizioni..."
sudo parted $SDCARD --script mklabel msdos
UBOOT_CHECK2=$(sudo hexdump -C $SDCARD -s 1024 -n 4 | head -1 | awk '{print $2$3$4$5}')
if [[ "$UBOOT_CHECK2" == "00008097" ]]; then
echo "U-Boot ancora integro dopo creazione partizioni"
else
echo "ERRORE: U-Boot sovrascritto dalle partizioni!"
exit 1
fi
Running the script I see the problem:
Verifica U-Boot a offset 1024
00000400 00 00 80 97 b1 00 00 00 00 00 00 00 14 f0 7f 97 |................|
00000410 00 00 00 00 1c f0 7f 97 00 ec 7f 97 e9 19 72 b1 |..............r.|
00000420 a0 02 00 00 04 00 00 00 a0 88 fa 73 00 02 00 00 |...........s....|
00000430 04 00 00 00 0c 85 fa 73 c5 20 00 00 04 00 00 00 |.......s. ......|Creazione tabella partizioni... MBR creato
00000400 00 00 00 00 |....|ERRORE: U-Boot sovrascritto dalle partizioni!
Any idea?
Why parted overwrites the uboot??
Thanks, regards
Hello,
The error indicates that U-Boot cannot find a valid partition table on the SD card, preventing it from accessing your kernel image and device tree file.
The root cause appears to be in your SD card preparation method. When you use the dd command to write the U-Boot image to the SD card, it doesn't automatically create a partition table. You need to:
1. First write the U-Boot image to the correct location (typically the beginning of the SD card).
2. Create a proper partition table with at least one partition formatted as FAT for boot files.
3. Format this partition and copy your kernel (zImage) and device tree blob (imx51-memorex.dtb) to it.
For proper SD card preparation, follow these steps:
1. Use fdisk to create a proper partition table on your SD card
2. Format the first partition as FAT32: `mkfs.vfat /dev/sdX1`
3. Mount the partition and copy your zImage and DTB file to it
4. Ensure the file names match what U-Boot expects (typically "zImage" for kernel and "imx51-memorex.dtb" for device tree)
The issue is similar to other cases we've seen with i.MX boards where the SD card preparation process wasn't completed correctly. Make sure to follow the complete procedure in the i.MX Linux User's Guide for preparing bootable SD cards.
Regards