Home › Forums › snickerdoodle › • Getting Started › u-boot.elf for Pre-Built Ubuntu
-
AuthorPosts
-
-
Does anyone know how you get the u-boot.elf for the prebuilt Ubuntu 20.04 image/5.4 Kernel ? I have cloned both the Xilinx git’s of Linux of U-boot and compiled them successfully, but I have had trouble booting it and hesitant to continue on that line as that image does not any of the preconfigured stuff that the snickerdoodle image has. I have cloned the snicerdoodle’s branches of linux and u-boot, but can’t seem to compile it with the latest tools/commands and the u-boot github says it was updated 3 to 4 years ago, so I am not sure if it will generate the same Kernel as the prebuilt Ubuntu 20 image.
Ultimately what I am trying to do is compile the boot.bin, consisting of the FSBL etc and then boot into the default Ubuntu image, with a custom PS as defined in Vivado. I have seen people hinting they are trying to do this in the forum, but I have not seen anyone post a solution, any help would be much appreciated as I have been stuck on this for a month and working on it in my spare time. I have been through a lot of tutorials which offer a good perspective on how to compile the boot.bin, but the tools/linux build process for the Zynq has changed, especially in versions 2020+.
I am able to generate and run the hello-world image in Vitis and it works in the snickerdoodle, correctly raising the PS settings I have defined, however it obviously does not boot into Ubuntu. I also don’t seem to get a proper serial terminal with the booting process to debug what is going wrong with the FSBL, but it does come up eventually as the hello world image reports hello world (same story whether serial is in linux or windows). I will try with a fresh image later on today, but my main focus is getting the Zynq to boot from a custom boot.bin and go straight into Ubuntu. I will happily document my process fully, as I know this is something which a lot of people with the snickerdoodle will want to do.
Thanks in advance anyone..
-
I am just going to document my process and where I am with this below:
Following the linux compilation Video by snickerdoodle, here are the updated commands I ran:
git clone https://github.com/krtkl/snickerdoodle-linux.git
skipped the git checkout process, but noticed you could probably run something like: (to get the latest version of the kernel)
git checkout tags/xilinx-v2020.2 -b current
make ARCH=arm snickerdoodle_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- scripts
cd scripts/dtc/
export PATH=$PATH:$(pwd)
back out and then: cd snickerdoodle-u-boot
make ARCH=arm snickerdoodle_config
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
cd tools
export PATH=$PATH:$(pwd)
back out and then: cd snickerdoodle-linux
Now we want to wrap the kernel image into the uboot header, however there are some TI wifi binary files missing
cd firmware/ti-connectivity
git clone https://git.ti.com/cgit/wilink8-wlan/18xx-ti-utils/?h=R8.7_SP3
git clone https://git.ti.com/cgit/wilink8-wlan/wl18xx_fw/
take out the wl18xx-fw-4.bin from wl18xx_fw
take out the wl18xx-conf-default.bin and rename to wl18xx-conf.bin, place in the ti-connectivity folder
cd back out to snickerdoodle-linux
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- LOADADDR=0x8000 uImage
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules
make ARCH=arm INSTALL_MOD_PATH=/media/<username>/ROOTFS/ modules_install
cp arch/arm/boot/uImage /media/<username>/BOOT
This did work, however the kernel image was 4.14 as opposed to 5.40 on the prebuilt version of the image, obviously because I skipped the checkout process, in hindsight it may have been possible to use the Xilinx version of the Linux branch, however I learnt a lot in the process. If anyone wants to chip in, with how you switch to the latest Kernel branch, please do, (should be just one command).
Now going back to the snickerdoodle-uboot folder, take the u-boot file, copy it to the Vitis build directory and rename to u-boot.elf
My bif consists of:
//arch = zynq; split = false; format = BIN
the_ROM_image:
{
[bootloader]fsbl.elf
block_design_wrapper.bit
u-boot.elf
[load = 0x2a00000]devicetree.dtb
[load = 0x2000000]uramdisk.image.gz
[load = 0x3000000]uImage.bin
}I switched back to the clean default image of snickerdoodle and replaced the boot.bin file and it successfully booted up, programmed the PL and PS with the correct configuration. Happy days, though now the WiFi setup seems to be failing!!! :( , I gained the serial terminal but lost the WiFi capabilities, so debugging that now. The above commands should be useful for people wanting to compile the Kernel and u-boot from scratch in 2021.
-
Upon boot it was reporting with something like: wl1271-nvs.bin returned with exit code -2 (as the binary file did not exist), so I put the binary file in the firmware/ti-connectivity directory in the rootfs on the SD card and that solved the problem. Then had to set the wifi configuration properly in config.txt and hostapd.conf – a computer restart then did it, as the wifi name I had chosen was the same as one previously and wasnt working even though I had selected forget connection.
-
-
AuthorPosts
- You must be logged in to reply to this topic.