Rebuilding U-Boot fails

I took the Vivado hardware description and have successfully booted Hello World on my SD_black with a fresh FSBL from SDK.

However, I followed the instructions to build U-Boot from scratch, and I don't get the u-boot prompt when I replace the hello_world.elf from my BOOT.bin with the u-boot.elf I build. I increased the u-boot bootdelay time to 30 to make sure I didn't miss it, but I am not seeing ANY output on the board.

Here are the steps I used to get U-Boot built:
git clone https://github.com/krtkl/snickerdoodle-u-boot.git
cd snickerdoodle-u-boot
make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- zynq_snickerdoodle_black_config
make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-
cp u-boot u-boot <WORKSPACE>/u-boot.elf
replace hello_world.elf from boot.bif with u-boot.elf
copy new BOOT.bin to SD card

Am I missing some fundamental step? I can do this just fine on the ZC702 board from Xilinx.
Can you post the build output? It looks like it may be an issue with your configuration. The correct command to set the configuration for snickerdoodle black is:

make ARCH=arm zynq_snickerdoodle_black_defconfig


Thanks for the reply. I'll try the defconfig next. I thought that defconfig was for linux, and plain old config was for u-boot.

[rob:~/git_repos/
snickerdoodle-u-boot]$ make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi- zynq_snickerdoodle_black_config
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#

On Friday, August 26, 2016 at 4:24:43 PM UTC-7, Bush wrote:
Can you post the build output? It looks like it may be an issue with your configuration. The correct command to set the configuration for snickerdoodle black is:

make ARCH=arm zynq_snickerdoodle_black_defconfig

Removing the CROSS_COMPILE flag from the set configuration command, and adding the def to the config as you mentioned hasn't had any different output :(

Any other thing you could recommend?

On Friday, August 26, 2016 at 4:24:43 PM UTC-7, Bush wrote:
Can you post the build output? It looks like it may be an issue with your configuration. The correct command to set the configuration for snickerdoodle black is:

make ARCH=arm zynq_snickerdoodle_black_defconfig

Can you post your .config file? Did you do any custom configuration with your hardware/processing subsystem in your Vivado project (i.e. changing the peripheral allocations)? Can you try to build your BOOT.bin file using the prebuilt .elf file from https://github.com/krtkl/snickerdoodle-linux-prebuilt and verify that you get a U-Boot prompt on boot?

On Friday, August 26, 2016 at 4:35:40 PM UTC-7, Rob wrote:
Removing the CROSS_COMPILE flag from the set configuration command, and adding the def to the config as you mentioned hasn't had any different output :(

Any other thing you could recommend?

On Friday, August 26, 2016 at 4:24:43 PM UTC-7, Bush wrote:
Can you post the build output? It looks like it may be an issue with your configuration. The correct command to set the configuration for snickerdoodle black is:

make ARCH=arm zynq_snickerdoodle_black_defconfig

If I use the stock U-Boot.elf with the following "my stuff", I boot successfully, seeing the U-Boot prompt too.

My FSBL, bitstream, my uImage (using mkimage from the "broken" u-boot), my DTB. These all work, it's just the u-boot build that's not working...


On Friday, August 26, 2016 at 4:43:26 PM UTC-7, Bush wrote:
Can you post your .config file? Did you do any custom configuration with your hardware/processing subsystem in your Vivado project (i.e. changing the peripheral allocations)? Can you try to build your BOOT.bin file using the prebuilt .elf file from https://github.com/krtkl/snickerdoodle-linux-prebuilt and verify that you get a U-Boot prompt on boot?

On Friday, August 26, 2016 at 4:35:40 PM UTC-7, Rob wrote:
Removing the CROSS_COMPILE flag from the set configuration command, and adding the def to the config as you mentioned hasn't had any different output :(

Any other thing you could recommend?

On Friday, August 26, 2016 at 4:24:43 PM UTC-7, Bush wrote:
Can you post the build output? It looks like it may be an issue with your configuration. The correct command to set the configuration for snickerdoodle black is:

make ARCH=arm zynq_snickerdoodle_black_defconfig

Can you post your .config and your build output?

On Friday, August 26, 2016 at 4:56:44 PM UTC-7, Rob wrote:
If I use the stock U-Boot.elf with the following "my stuff", I boot successfully, seeing the U-Boot prompt too.

My FSBL, bitstream, my uImage (using mkimage from the "broken" u-boot), my DTB. These all work, it's just the u-boot build that's not working...


On Friday, August 26, 2016 at 4:43:26 PM UTC-7, Bush wrote:
Can you post your .config file? Did you do any custom configuration with your hardware/processing subsystem in your Vivado project (i.e. changing the peripheral allocations)? Can you try to build your BOOT.bin file using the prebuilt .elf file from https://github.com/krtkl/snickerdoodle-linux-prebuilt and verify that you get a U-Boot prompt on boot?

On Friday, August 26, 2016 at 4:35:40 PM UTC-7, Rob wrote:
Removing the CROSS_COMPILE flag from the set configuration command, and adding the def to the config as you mentioned hasn't had any different output :(

Any other thing you could recommend?

On Friday, August 26, 2016 at 4:24:43 PM UTC-7, Bush wrote:
Can you post the build output? It looks like it may be an issue with your configuration. The correct command to set the configuration for snickerdoodle black is:

make ARCH=arm zynq_snickerdoodle_black_defconfig

Attached

On Friday, August 26, 2016 at 5:00:59 PM UTC-7, Bush wrote:
Can you post your .config and your build output?

On Friday, August 26, 2016 at 4:56:44 PM UTC-7, Rob wrote:
If I use the stock U-Boot.elf with the following "my stuff", I boot successfully, seeing the U-Boot prompt too.

My FSBL, bitstream, my uImage (using mkimage from the "broken" u-boot), my DTB. These all work, it's just the u-boot build that's not working...


On Friday, August 26, 2016 at 4:43:26 PM UTC-7, Bush wrote:
Can you post your .config file? Did you do any custom configuration with your hardware/processing subsystem in your Vivado project (i.e. changing the peripheral allocations)? Can you try to build your BOOT.bin file using the prebuilt .elf file from https://github.com/krtkl/snickerdoodle-linux-prebuilt and verify that you get a U-Boot prompt on boot?

On Friday, August 26, 2016 at 4:35:40 PM UTC-7, Rob wrote:
Removing the CROSS_COMPILE flag from the set configuration command, and adding the def to the config as you mentioned hasn't had any different output :(

Any other thing you could recommend?

On Friday, August 26, 2016 at 4:24:43 PM UTC-7, Bush wrote:
Can you post the build output? It looks like it may be an issue with your configuration. The correct command to set the configuration for snickerdoodle black is:

make ARCH=arm zynq_snickerdoodle_black_defconfig

Hi Bush, and everyone,

Do you happen to have a master (as of today) .config that works for the SD_black that I could use or compare mine against?

Thanks,
Rob


On Friday, August 26, 2016 at 5:05:44 PM UTC-7, Rob wrote:
Attached

On Friday, August 26, 2016 at 5:00:59 PM UTC-7, Bush wrote:
Can you post your .config and your build output?

On Friday, August 26, 2016 at 4:56:44 PM UTC-7, Rob wrote:
If I use the stock U-Boot.elf with the following "my stuff", I boot successfully, seeing the U-Boot prompt too.

My FSBL, bitstream, my uImage (using mkimage from the "broken" u-boot), my DTB. These all work, it's just the u-boot build that's not working...


On Friday, August 26, 2016 at 4:43:26 PM UTC-7, Bush wrote:
Can you post your .config file? Did you do any custom configuration with your hardware/processing subsystem in your Vivado project (i.e. changing the peripheral allocations)? Can you try to build your BOOT.bin file using the prebuilt .elf file from https://github.com/krtkl/snickerdoodle-linux-prebuilt and verify that you get a U-Boot prompt on boot?

On Friday, August 26, 2016 at 4:35:40 PM UTC-7, Rob wrote:
Removing the CROSS_COMPILE flag from the set configuration command, and adding the def to the config as you mentioned hasn't had any different output :(

Any other thing you could recommend?

On Friday, August 26, 2016 at 4:24:43 PM UTC-7, Bush wrote:
Can you post the build output? It looks like it may be an issue with your configuration. The correct command to set the configuration for snickerdoodle black is:

make ARCH=arm zynq_snickerdoodle_black_defconfig

Can you try to build again without using the -j8 flag? I'm concerned that allowing GCC to spawn 8 separate threads during the build may have unknown effects. At the very least, it will allow us to eliminate that as a possible source of the issue (if it still fails). I didn't see anything in your .config that was out of place, as you are using the provided defconfig.

On Monday, August 29, 2016 at 2:43:51 PM UTC-7, Rob wrote:
Hi Bush, and everyone,

Do you happen to have a master (as of today) .config that works for the SD_black that I could use or compare mine against?

Thanks,
Rob


On Friday, August 26, 2016 at 5:05:44 PM UTC-7, Rob wrote:
Attached

On Friday, August 26, 2016 at 5:00:59 PM UTC-7, Bush wrote:
Can you post your .config and your build output?

On Friday, August 26, 2016 at 4:56:44 PM UTC-7, Rob wrote:
If I use the stock U-Boot.elf with the following "my stuff", I boot successfully, seeing the U-Boot prompt too.

My FSBL, bitstream, my uImage (using mkimage from the "broken" u-boot), my DTB. These all work, it's just the u-boot build that's not working...


On Friday, August 26, 2016 at 4:43:26 PM UTC-7, Bush wrote:
Can you post your .config file? Did you do any custom configuration with your hardware/processing subsystem in your Vivado project (i.e. changing the peripheral allocations)? Can you try to build your BOOT.bin file using the prebuilt .elf file from https://github.com/krtkl/snickerdoodle-linux-prebuilt and verify that you get a U-Boot prompt on boot?

On Friday, August 26, 2016 at 4:35:40 PM UTC-7, Rob wrote:
Removing the CROSS_COMPILE flag from the set configuration command, and adding the def to the config as you mentioned hasn't had any different output :(

Any other thing you could recommend?

On Friday, August 26, 2016 at 4:24:43 PM UTC-7, Bush wrote:
Can you post the build output? It looks like it may be an issue with your configuration. The correct command to set the configuration for snickerdoodle black is:

make ARCH=arm zynq_snickerdoodle_black_defconfig

I think I've found the issue. The configuration needs to be set to embed the devicetree blob. Specifically CONFIG_OF_SEPARATE needs to be unset and CONFIG_OF_EMBED needs to be set (=y) on lines 322 and 323 of your .config, respectively. You can set it in the menuconfig using:

$ make ARCH=arm menuconfig

Device Tree Control --->
Provider of DTB for DT control (Embedded DTB for DT control) --->
(X) Embedded DTB for DT control


Let me know if this fixes your issue. I've already updated the defconfig in the repo to reflect this change.

On Friday, August 26, 2016 at 5:05:44 PM UTC-7, Rob wrote:
Attached

On Friday, August 26, 2016 at 5:00:59 PM UTC-7, Bush wrote:
Can you post your .config and your build output?

On Friday, August 26, 2016 at 4:56:44 PM UTC-7, Rob wrote:
If I use the stock U-Boot.elf with the following "my stuff", I boot successfully, seeing the U-Boot prompt too.

My FSBL, bitstream, my uImage (using mkimage from the "broken" u-boot), my DTB. These all work, it's just the u-boot build that's not working...


On Friday, August 26, 2016 at 4:43:26 PM UTC-7, Bush wrote:
Can you post your .config file? Did you do any custom configuration with your hardware/processing subsystem in your Vivado project (i.e. changing the peripheral allocations)? Can you try to build your BOOT.bin file using the prebuilt .elf file from https://github.com/krtkl/snickerdoodle-linux-prebuilt and verify that you get a U-Boot prompt on boot?

On Friday, August 26, 2016 at 4:35:40 PM UTC-7, Rob wrote:
Removing the CROSS_COMPILE flag from the set configuration command, and adding the def to the config as you mentioned hasn't had any different output :(

Any other thing you could recommend?

On Friday, August 26, 2016 at 4:24:43 PM UTC-7, Bush wrote:
Can you post the build output? It looks like it may be an issue with your configuration. The correct command to set the configuration for snickerdoodle black is:

make ARCH=arm zynq_snickerdoodle_black_defconfig

U-Boot will compile the DTB for you. There is a DTS file in arch/arm/dts that should be pointed to by CONFIG_DEFAULT_DEVICE_TREE. You can make edits to the device tree source and the compiled DTB will be built into the U-Boot image and a copy will be stashed at dts/dt.dtb


On Wednesday, August 31, 2016 at 10:07:19 PM UTC-7, Rob wrote:
Thanks Bush,

Do I need a compiled Dtb anywhere in the path of uboot for this then?

Best,
Rob



On Wednesday, August 31, 2016, Bush <bu...@krtkl.com> wrote:
I think I've found the issue. The configuration needs to be set to embed the devicetree blob. Specifically CONFIG_OF_SEPARATE needs to be unset and CONFIG_OF_EMBED needs to be set (=y) on lines 322 and 323 of your .config, respectively. You can set it in the menuconfig using:

$ make ARCH=arm menuconfig

Device Tree Control --->
Provider of DTB for DT control (Embedded DTB for DT control) --->
(X) Embedded DTB for DT control


Let me know if this fixes your issue. I've already updated the defconfig in the repo to reflect this change.

On Friday, August 26, 2016 at 5:05:44 PM UTC-7, Rob wrote:
Attached

On Friday, August 26, 2016 at 5:00:59 PM UTC-7, Bush wrote:
Can you post your .config and your build output?

On Friday, August 26, 2016 at 4:56:44 PM UTC-7, Rob wrote:
If I use the stock U-Boot.elf with the following "my stuff", I boot successfully, seeing the U-Boot prompt too.

My FSBL, bitstream, my uImage (using mkimage from the "broken" u-boot), my DTB. These all work, it's just the u-boot build that's not working...


On Friday, August 26, 2016 at 4:43:26 PM UTC-7, Bush wrote:
Can you post your .config file? Did you do any custom configuration with your hardware/processing subsystem in your Vivado project (i.e. changing the peripheral allocations)? Can you try to build your BOOT.bin file using the prebuilt .elf file from https://github.com/krtkl/snickerdoodle-linux-prebuilt and verify that you get a U-Boot prompt on boot?

On Friday, August 26, 2016 at 4:35:40 PM UTC-7, Rob wrote:
Removing the CROSS_COMPILE flag from the set configuration command, and adding the def to the config as you mentioned hasn't had any different output :(

Any other thing you could recommend?

On Friday, August 26, 2016 at 4:24:43 PM UTC-7, Bush wrote:
Can you post the build output? It looks like it may be an issue with your configuration. The correct command to set the configuration for snickerdoodle black is:

make ARCH=arm zynq_snickerdoodle_black_defconfig