U-Boot build not creating u-boot.imx. Question asked by Michael Perreca on Jun 2, 2017. This same method works for the image built by buildroot using the imx repositories. FSLSDHC: 0, FSLSDHC: 1. Warning - bad CRC, using default environment.
It seems that I have a lack of understanding how booting SD-Card images on devices like the Banana Pi work. The situation is as follows.
I have a Banana Pi and a Banana Pro. Every device has an image of some distribution on a SD card plugged into the device (Banana Pro -> Arch Linux, Banana Pi -> Bananian). The images can be downloaded from here and here. This works fine.
But since the Banana Pi / Pro has a SATA port, it would be nice if the root system could be booted from an attached Hard Drive. As can be read here this can be accomplished quite simple.
But now comes the part I'm struggling with. Flashing an entire 4GB SD card (or even larger ones) with the distributions image and using just a 50MB partition seems a bit wasteful. So I tried to use a smaller SD card.
I created a partiton with fdisk
(50MB size) and used mkfs.vfat -F 16 /dev/sdXX
to create the filesystem on the partiton. I made it FAT 16 because of the parted
output while examining the image file.
.
After that I mounted the partion from the image to /tmp/boot
with sudo mount -o loop,offset=1048576 ArchLinux_For_BananaPro_v1412.img /tmp/boot
. The offset value is the Start value in the parted output.
Copied the files (script.bin, uEnv.txt, uImage) to my SD card partition, changed the root path in uEnv.txt. Made a sync and dismounted the SD card.
Everything seems fine. Even when comparing the boot partitons on a SD card flashed with the entire image and my SD card with only the boot partiton, they are identical (according to fdisk
)
But the Banana Pi / Pro won't boot with the SD card with just a boot partition providing the u-boot files.
Has anyone a clue on that behaviour?
UPDATE:
Thanks to @BananaFreak I recognized my mistake. The bootloader was indeed missing but even after following that guide from lemaker the BananaPro does not boot. One weird thing on the lemaker wiki page is the first sentence stating:
Note: these instructions are for a Linux computer, not the Banana Pro/Pi!!
2 Answers
I think you've missed bootloader. U-Boot has to be present on your SD. Take a look at how the SD layout should be for the Banana Pi / Pro:
Jonathan KomarHere is my report on the deeper dives into the booting process on the BananaPro/Pi. First thing you'll need is a RS232 serial TTL UART converter to interface with the onboard UART.
Afterwards you can open that serial device to investigate the booting procedure (Be careful and leave the VCC pin of your TTL-UART converter unattached to the board. If your converter uses 5V TTL you could damage the BananaPro when conneting VCC to it.)
On the terminal I got output like this:
![Buildroot Loading Environment From Fat. Warning Bad Crc, Using Default Environment Buildroot Loading Environment From Fat. Warning Bad Crc, Using Default Environment](https://enclustra.github.io/ebe-docs/user-doc-altera/_images/welcome_screen.png)
It's quite likely that you get dropped off in a kind of shell environment provided by u-boot after a failed boot procedure. From there you can use u-boot tools to perfrom some diagnostics. Here is a list of commands, though it may be possible not all of them are available.
In my case the last few lines of the boot-output led to the conclusion that u-boot is compiled in a way that it looks for the second partition and eventually builds a CRC over some data. Since my goal was to omit the second partition I guess the only solution is compiling a u-boot binary with the needed modifications.
Not the answer you're looking for? Browse other questions tagged linuxembeddedu-boot or ask your own question.
I would like to specify U-Boot not to use uramdisk to boot because my ramdisk is part of the Linux image. The problem is that even if I choose sdboot which I modified and call 'bootm {linux} - {devicetree}' it checks for the uramdisk.image.gz file existence.
EDIT : Whatever I do it doesn't override sdboot property. It's like it is loading my uEnv.txt (and it works because it correctly takes my device tree blob which has a different name) and just after that it overrides the sdboot property...
Here is my uEnv.txt file :
And here is the log I get :
Here is the full trace if I let the autoboot fail with uramdisk, then printenv, then reset default env and printenv again :
1 Answer
My guess is that it is not running the sdboot
that is in uEnv.txt
but rather the sdboot
that is in the default environment.
Evidence of this is that you don't see Copying Device Tree from SD to RAM...
in your log output.
Try adding something like the following at the end of uEnv.txt
:
I can't test this of course - but you should see the following in your log:
![Buildroot Loading Environment From Fat. Warning Bad Crc, Using Default Environment Buildroot Loading Environment From Fat. Warning Bad Crc, Using Default Environment](https://balau82.files.wordpress.com/2010/04/u-boot.png)
Good luck!
Murray JensenMurray Jensen