Tuesday, July 11, 2023

Battle with toolchain software part 13

FINALLY HAVE EVERYTHING BUILT

I completed the work to get the preloader and U-boot compiled, ensuring it pointed at the output of my SoC generated system. I also worked to ensure that I had a proper device tree blob generated - it kept getting regressed or picking up some junk from a demonstration program that somehow got onto the board files.

I then built the boot script. The U-boot as generated will start up and look for a file called u-boot.scr in the FAT partition of the SD card. If it finds it, that is executed. Here I find and load the FPGA bitstream soc_fpga.rbf from my generated file. I run the new command bridge enable which in principle will start up the H2F LW and the F2SDRAM bridges for me before we boot Linux. Then there are the commands that grab the zImage kernel image, the soc_fpga.dtb device tree blob, and begin to execute the bootup of Linux. 

For some reason the web of nested Makefiles for the preloader/u-boot insisted on grabbing the wrong device tree file, not the one that I built to match my project. It took a couple of hours to detangle and understand it all before I was able to generate the full and complete system with the correct device tree along with the proper other files. 

These various files were copied onto the SD Card in the appropriate partition. 

The A2 partition holds the preloader and U-boot files. This is executed by the chip hardware bootloader, with the preloader running in the under 64K of RAM available to the hardware boot function. It in turn configures SDRAM and puts U-boot into RAM before branching to it. 

The FAT partition holds the  zImage,  soc_fpga.dtb, soc_fpga.rbf and u-boot.scr files. 

The ext4 partition is the root partition of the Linux system once it is running. 

TESTING AND DEBUGGING THE BOOTUP ELEMENTS - TO NO AVAIL

I first powered up with the new sd card installed, which prior to my update had booted properly into the console only linux. Nothing happened at all, no messages on the console showing the startup of u-boot. I carefully checked over everything - everything appeared, and I stress the words appeared, to generate correctly and I installed them on the proper partitions of the SD card. 

No messages on the console, which would have appeared early on as U-boot executed. No signs of flickering on the board. Complete radio silence. Apparently I am going to have to dig through hundreds of source files and many configuration and Makefiles to see if I can figure out why the board no longer brings up U-boot. I am not even stumbling over Linux issues, and miles and miles from the bridge activation challenges before I began this awful slog through the swamps of preloader and U-boot. 

HAVING A MANUAL ABOUT U-BOOT WOULD BE NICE

If in fact I had a manual that was even in near sync to the version of preloader and U-boot I tried to generate, I would dig through it to understand what changes might have been made and the necessary files and configuration options. What I have instead is mountains of open source code and reams of mostly useless web pages generally covering much older and changed versions. 



No comments:

Post a Comment