U-Boot error on kernel zImage boot
I have librecomputer all-h3-cc h2+ board.
I built u-boot for the board using board configuration of libretech_all_h3_cc_h2_plus_defconfig
. It gets me u-boot console on power on, but when I load kernel Image into memory and try to boot it, it throws error
Starting kernel
Error: ###Please reset the board.
Is the u-boot board configuration file correct. Or do I have to build it for some other configuration?
I have clone u-boot from git://git.denx.de/u-boot.git
Please help
Tagged:
Comments
It is probably the kernel image that is faulty. What is the boot command you are using in u-boot to start the kernel? What is the make command you use to build the kernel?
I'm loading bootz command to load kernel (at 0x42000000). Kernel image is fine, because I have an Armbian image for same board downloaded from the site. And if I replace kernel in that image with new one, system boots up perfectly.
make commands for kernel:
And for u-boot:
I suspect it has something to do with bootloader itself.
I even tried u-boot with configuration
libretech_all_h3_cc_h3_defconfig
, it also gives same error.Are the commands fine?
Or do I need to add some custom configuration in u-boot for this specific board?
Please suggest
Do you have the full u-boot commands you used to boot the board? What addresses you loaded the device tree, kernel?
Following are the commands I'm using to load kernel and device tree:
Following is the screen grab of console.
When you compiled u-boot did you compile the ATF as well?
make PLAT=sun50iw1p1 DEBUG=0 bl31
Are you flashing u-boot with this output binary? u-boot-sunxi-with-spl.bin
No, I have no clue about ATF, and the command u sent.
I simply followed some u-boot build guide.
And for flashing u-boot, instead of
u-boot-sunxi-with-spl.bin
, I even flashedsunx-spl.bin
andu-boot.img
separately. But I did tried u-boot-sunxi-with-spl.bin as well once and it throws the same error.PS: Is
make PLAT=sun50iw1p1 DEBUG=0 bl31
also required to build u-boot for this specific board?Sorry, that's for H5. Disregard that comment.
What are your bootargs? Can you provide the full u-boot output?
Just for basic sanity check of u-boot and kernel, I'm running only above provided commands without any file system.
So normally, I should get kernel boot logs from 0.00 seconds followed by a kernel panic for not providing any file system. But I'm not even get any boot log for kernel as shared in the screen grab above.
Not providing any bootargs as of now.
Please suggest something.
It's like a dead end to me.
Thanks.
Are you currently using http://share.loverpi.com/board/libre-computer-project/libre-computer-board-all-h3-cc/image/debian/libre-computer-all-h3-cc-h3-debian-stretch-lxde-4.18.0-rc6-gd72e90f33aa4-dirty-2018-07-23.zip as a basis? Have you tried just replacing the Image file?
The image file I'm using for basis is Armbian from https://libre.computer/products/boards/all-h3-cc/.
And yes, If I replace kernel in that image, system boots for perfectly.
I tried after replacing the kernel image in zip you shared. Even with that one I am getting kernel panic in u-boot terminal as expected due to no file system, which means the kernel image is fine, correct me if I'm wrong.
Can you share the u-boot commands you use to build u-boot for this board and the repo/ branch you specifically use. I think that might help.
Thanks
Copying u-boot-sunxi-with-spl.bin to sdcard doesn't even get the u-boot terminal.
That's why I was using dd command. Do I need to perform some additional steps after cp?
And when I write my u-boot-sunxi-with-spl.bin to sdcard using dd.
I get following data abort error, if it makes any sense.
The above error comes only on first boot after flashing u-boot-sunxi-with-spl.bin. After that, on every boot the same previous error
### ERROR ### Please reset the board
comes up.Hope it helps
Are you using a compiler/cross compiler newer than GCC 6? We recommend the Linaro 7.3.1 cross compilers. Also what dd command are you using to flash u-boot? Below is our u-boot script.
I'm using cross-compiler GCC 7 (Linaro 7.3.0).
dd command to flash u-boot
Commands to boot kernel from u-boot terminal
PS: Now that I have made u-boot log level to 7, I see the data abort error on every boot.
I would double check your zImage file.
Is there a way I can share my zImage with you to cross check?
Also I checked my zImage with u-boot.all.bin in zip file you suggested. Works fine.
You can download and check zImage from following link.
https://drive.google.com/open?id=19U4SC0FbxIqzkkK830HULeiHtG1YvtlR
Thanks
The image is good. Are you using u-boot master?
Yes. I am on master branch only.
Only thing I can suspect now is .config.
Or if you have any other suggestions?
I have uploaded .config for u-boot as well in the same directory, for you to check.
Try
http://share.loverpi.com/board/libre-computer-project/libre-computer-board-all-h3-cc/u-boot/u-boot.bin.h3
http://share.loverpi.com/board/libre-computer-project/libre-computer-board-all-h3-cc/u-boot/u-boot.config.h3
u-boot.bin.h3 works fine. But I am having the same issue with even if I use u-boot.config.h3 as my configuration file. I will try re-cloning u-boot repo again.
Also, with u-boot.config.h3 to properly build u-boot, I had to change device tree config from
CONFIG_DEFAULT_DEVICE_TREE="all-h3-cc-h3"
toCONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-libretech-all-h3-cc"
.And thanks for sharing bin file. If I couldn't build u-boot, I will continue with this file only.
Thanks
@Rhythm Thats a superficial change in our code. We are directly using master. Try updating your compiler.
Okay, I'll try that too.
Thanks
@loverpi I think it has nothing to do with compiler. I checked diff of config you shared with the one u-boot generates. The only significant difference I can see is in
CONFIG_ENV_FAT_DEVICE_AND_PART
value.The one you shared has
The one u-boot generates is
So I just had to change device partition to 0 and now it works fine. It was the partition number in u-boot configuration.
Thanks for your help
That is bizarre since it shouldn't have anything to do with the kernel.