GithubHelp home page GithubHelp logo

wxbbuaa2011 / sandylinux Goto Github PK

View Code? Open in Web Editor NEW

This project forked from steveicarus/sandylinux

0.0 1.0 0.0 20 KB

Boiler plate for making a Zynq/Microzed design

Makefile 2.70% Verilog 47.58% C++ 19.24% Forth 0.59% C 28.81% Shell 1.08%

sandylinux's Introduction

This project is a sandbox to experiment with writing software/firmware
for the Zynq.

* SandyLinux

This is the Vivado project for the FPGA. It pulls everything together
to make the hardware. In particular, the hardware description (hdf)
file that contains the hardware description and fpga bitstream are in
SandyLinux.sdk/System_wrapper.hdf.

* SandyLinux-xsdk

This is the xSDK project for making the first stage boot loader
(FSBL). It also includes a Hello World program that runs on the board
to test basic functionality.

Execute the xSDK GUI with a command like this:
   /opt/Xilinx/SDK/2019.1/bin/xsdk 2019.1

* u-boot-fsbl.bif

Boot information file for making the boot.bin file that is loaded onto
a bootable SD card. This file is used by xsdk to make the BOOT.bin
file from the FSBL.elf, the FPGA bit stream, and the u-boot.elf files.

* bootimage

This directory contains the image that go into the QSPI flash or boot
files that go onto rhe MicroSD disk. The plan is to keep the boon
image (including FPGA image) in the microsd card for easy update. The
bootimage contains the files needed (and built elsewhere) to make a
boot disk.

   - bootimage/BOOT.bin

     FSBL and uboot image. This is made by the SandyLinux-xsdk, and
     includes the FSBL and the ubooot.elf image. The u-boot-fsbl.bif
     is used by xsdk to make this image.

   - bootimage/devicetree.dtb

     Device Tree Blob made from files in the SandyLinux-xsdk, in
     particular the device_tree_bsp_0 project.

   - bootimage/uramdisk.image.gz

     Ramdisk image pulls from the Xilinx Wiki Linux Getting Started
     guide. The version here is modified to mount the two partitions
     of the sd disk.

   - bootimage/uImage

     Linux kernel image. The source is ../software/linux-xlnx, and the
     compiled image is ../software/linux-xlnx/arch/arm/boot/uImage.


** BUILDING u-boot **

The u-boot boot loader is cloned from the xilinx github page. Building
is pretty easy.

1) cd software/u-boot-xlnx

This is a clone of the xilinx u-boot repository. Sync if necessary.

2) sh go-microzed.sh

This script sets the tool path, configures, and builds
u-boot. Remember to put a link to mkimage in the software/tools
directory so that other tasks can find the mkimage program.


** BUILDING THE DTC COMPILER **

This is the device tree compiler, "dtc".

1) cd software/dtc

This is a clone of the source repository. Sync if needed.

2) make

Makes the "dtc" binary. Link this into the software/tools directory so
that other steps can find the program.


** BUILDING THE DEVICE TREE **

The device tree is made by the xSDK, and the devicetree.dtb is created
from the dts files generated by the xSDK. The device_tree_bsp_0
project in the SandyLinux-xsdk workspace contains and maintains the
dts files. The prerequisites are the hw_platform_0 as imported from
the SandyLinux Vivado project, and the device-tree-xlnx repository in
the ../software/device-tree-xlnx. (Add this repository by going
through the Xilinx->Repositories menu to the Preferences pane where
the repository is added.)

Create the device_tree_bsp_0 project like so:

1) In xSDK, File-->New-->Board Support Package

2) In the dialog box, change the "Board Support Package OS" from the
default "standalone" to device_tree.

The generated dts files are in the device_tree_bsp_0 project. The
system-top.dts file is the root of the tree, but note that it has some
errors in it. The following steps fix those errors.

3) Edit the system-top.dts, and change #include to /include/ to
conform to dtc syntax.

4) Edit the system-top.dts, and change the name of the memory node
from "memory" to "memory@0".

There is a go-dts.sh script is that directory that generates a
devicetree.dtb from the dts files.

5) cd .../SandyLinux-sdk/device_tree_bsp_0

6) sh go-dtc.sh

The devicetree.sdb file is ready to be copied to the boot image.


** BUILD THE LINUX KERNEL **

The linux kernel source is available from the xilinx github page.

1) cd software/linux-xlnx

This is a clone of the linux-xlnx repository. Sync if necessary.

2) sh go.sh

This does the build. Comment out steps that are not needed.


** BOOTING FROM THE SDCARD **

Put the BOOT.bin, the devicetree.dtb, the uImage, and the
uramdisk.image.gz files onto the first partition of an SD card. This
partition must be formatted FAT, and only these files need be there.

Set the jumpers on the MicroZed to boot from the sd card, and boot.

Catch the boot process during u-boot and press return to prevent the
autoboot to the kernel. This sets the Zynq> prompt.

Boot the linux on the sd card with the command "run sdboot". This
starts the linux kernel booting. It is done when there is a login
prompt. Log in as root with password root.


sandylinux's People

Contributors

steveicarus avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.