Methods for compiling and updating preloader and uboot programs in a soceds environment

Source: Internet
Author: User
Tags spl

methods for compiling and updating preloader and uboot programs in a soceds environmentThe previous introduction of Preloader in the HPS boot process of the role of the next user in the Soceds environment to change how to compile preloader and Uboot program! And how to update the Preloader and uboot! in the boot SD card
The SD image downloaded from the Terasic website is a compiled preloader and u-boot in 13.1 environment, which will be recompiled and updated to SD card in 14.0 environment! and update the Preloader and u-boot to the SD card under the Inux system. (Embedded Linux also requires a Linux machine, whether it is a virtual machine or a separate Linux system machine!) Especially in compile Linux kernel) use Quartus 14.0 to open the DE1_SOC_GHRD project and enter Qsys to open the HPS device. The main change with respect to 13.0 is the HPS clocks window is divided into input clocks and output clocks! For example: Quartus 13.0 HPS Clocks window Quartus 14.0 HPS Clocks Window
14.0The default clock for the Cyclone V device MPU in the software is 925Mhz, while version 13.1 is 800M. Here the compiler does not change the MPU clock, so remove the Usedefault mpu clock frequency option! Instead of changing the other options, clock is 800MHz. It would be nice to re-generate the closure. After compiling with Quarut, the files in the Hps_isw_handoff will be updated when the files are connected to the HPS hardware configuration with the Preloaderr software interface files.
Open the command shell in 14.0 to convert the working directory to GHRD and start compiling the hardware using Make-j8 SOF. (The-J8 option can be used without, just to open several threads more quickly, but requires four-core CPU support).
Using Bsp-editor.exe, open the Bsp-editor tool and select File->new BSP. Specify the Preloader settingdirectory as Hps_isw_handoff/soc_system_hps_0 in GHRD. Click OK to close. Then click Geneate to generate the BSP after exit BSP Editor. You should be able to see the software directory in GHRD at this time. The next thing to note is to replace the makefile in the GHRD with the \EMBEDDED\EXAMPLES\HARDWARE\CV_SOC_DEVKIT_GHRD makefile (13.0 compiles without replacing). Then use the make Uboot command to compile both the Preloader and uboot files. If you only need to compile preloader, use make prelaoder. The process is lengthy and the hardware engineering is recompiled again.
The u-boot.img file will be found in the SOFTWARE\PRELOADER\UBOOT-SOCFPGA directory after compilation, and will be found under SOFTWARE\PRELOADER\UBOOT-SOCFPGA\SPL u-boot- Spi.bin. For convenience, create a directory preloader under GHRD and copy the two files to that directory!
U-boot-spi.bin files in binary format, according to Altera requirements to add the file header in a specific format! The tool that needs to be used is the Mkpimage tool. Switch the tool directory to the Preloader directory you just created, using the command Mkpimage-o preloader_de1_soc.img u-boot-spl.bin. A preloader_de1_soc.img is generated under the folder. Can be used to update the preloader in SD image.

———————————————————————————————————————————————————
Before the update, let's say one of the tools in SoCEDS14.0 Alt-boot-disk-util.exe. Enter the name in the command Shell to see how it is used.
#Wirte BOOTLoader and Preloader to disk driver ' E '
Alt-boot-disk-util-p preloaer-b bootloader-a write-d E
My SD Card is recognized as I disk, so I use the command as:
Alt-boot-disk-util-p preloaer_de1_soc.img-b u-boot.img-a write-d I
Do not give me the current use will encounter device open error errors. I don't know if it's an environmental problem or any other reason. So the Linux system continues to update preloader.
————————————————————————————————————————————————————

(personal use of Ubuntu Linux machine, other versions should be similar)
Copy the two files to the Linux machine and mount the boot SD card. Use Fisk-l to view the node number corresponding to the SD card. For example, my SD card is 8G, you will see a message like this: disk/dev/sdb:7948 MB, 7948206080 bytes. Indicates that this node is/dev/sdb.
The Linux working directory switches to the place where preloader is placed. Use the following two commands to update Preloader and Uboot respectively.
    1. sudo dd if=preloader_de1_soc.img of=/dev/sdb3 bs=64k seek=0
    2. sudo dd if=u-boot.img of=/dev/sdb3 bs=64k seek=4
Copy Code
then use the sudo sync command to eject the sdcard.
Using this SD boot, you will find information related to clock printing. This is the print added in 14.0. Also notice that the timestamp should correspond to the compile time

Methods for compiling and updating preloader and uboot programs in a soceds environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.