Skip to content

Commit

Permalink
Updated documentation regarding source based ramdisk (buildroot). Clo…
Browse files Browse the repository at this point in the history
…ses issue RedPitaya#1.
  • Loading branch information
alesb committed Mar 4, 2014
1 parent e5f3cf2 commit af26b23
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 53 deletions.
1 change: 1 addition & 0 deletions COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Red Pitaya software is released under BSD license.
Explicitly, "Red Pitaya software", affected by this license, includes files
in the following directories recursively:
- Applications
- OS/buildroot
- OS/discovery
- OS/filesystem
- Bazaar/nginx/ngx_ext_modules/ngx_http_rp_module
Expand Down
67 changes: 23 additions & 44 deletions OS/README
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,34 @@ This is the GNU/Linux Operating system for Red Pitaya, an Open-source
instrument based on Xilinx Zynq.


FILESYSTEM

The operating system consists of the following components:
- BOOT.BIN: U-boot boot loader + initial FPGA image.
- uImage: Linux kernel.
- devicetree.dtb: Linux kernel device tree describing the Xilinx Zynq
hardware configuration.
- uramdisk.image.gz: Initial ramdisk, holding the root ext2 filesystem for
the GNU/Linux OS. It is based on Busybox, but contains
several other pieces of SW like:
+ Nginx web server
+ WiFi tools
+ SSH server


Upon boot, the ramdisk image and the root filesystem resides in RAM.
Although it is writable, its content is lost at next reboot or power cycle.
This way, better OS robustness to abrupt power loss is achieved.

BUILD

These OS components sould have an automated build from the respective
sources and configuration with clear versioning. Until this is established,
these components are staged in the filesystem sub-directory.

The Linux kernel uImage is build from git repository defined by LINUX_GIT build
valiable. By defaulty local (/var/git/linux-xlnx.git) bare repository is used.
This can be changed if remote repository is to be used.
e.g. make clean all LINUX_GIT=git://10.0.1.150/linux-xlnx.git
DIRECTORIES

TOOLS
u-boot U-boot boot loader.
linux Linux kernel.
buildroot Root filesystem (ramdisk).
discovery IP discovery connection agent.
filesystem Overlay for SD card filesystem, holding user configurable
files.

The tools sub-directory contains the tools to allow for easy manipulation of
the ramdisk content.

Usage (on any Linux system):

> cd filesystem
> ../tools/extract_image.sh uramdisk.image.gz
> sudo mount -t ext2 -o loop ramdisk.img /mnt
Upon boot, the ramdisk image and thus the root filesystem resides in RAM.
Although it is writable, its content is lost at next reboot or power cycle.
This way, better OS robustness to abrupt power loss is achieved, compared
to a root filesystem on an SD card partition being mounted in read-write
mode.

Edit files in /mnt, which represents the Linux root filesystem.

> sudo umount /mnt
> ../tools/create_image.sh ramdisk.img
BUILD

All the OS components, including the u-boot, FSBL, FPGA image, devicetree,
Linux kernel and the ramdisk are built from sources using ../Makefile.

The Linux kernel uImage is built from git repository defined by LINUX_GIT
build valiable. By defaulty local (/var/git/linux-xlnx.git) bare repository
is used. This can be changed if remote repository is to be used.
E.g. make clean all LINUX_GIT=git://<host>/linux-xlnx.git.

INSTALLATION
The u-boot is built from git repository defined by UBOOT_GIT build valiable.
By defaulty local (/var/git/u-boot-xlnx.git) bare repository is used.
This can be changed if remote repository is to be used.
E.g. make clean all UBOOT_GIT=git://<host>/u-boot-xlnx.git.

Copy the contents of the filesystem sub-directory to the empty first partition
of the SD card. The SD partiton must be Windows FAT type (vfat - 0xb).
17 changes: 8 additions & 9 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
TODO

1. Fix bugs.
2. Build GNU/Linux ramdisk from sources, e.g. use buildroot, Yocto.
3. Decrease the amount of duplicated code and move common components
to shared.
4. Bring OS & ecosystem sources together as they compose one package.
5. Comment the code extensively in Doxygen style. Provide Doxygen
documentation.
6. Move FPGA images to specific applications.
7. Simplify Test/monitor.
* Fix bugs.
* Decrease the amount of duplicated code and move common components
to shared.
* Bring OS & ecosystem sources together as they compose one package.
* Comment the code extensively in Doxygen style. Provide Doxygen
documentation.
* Move FPGA images to specific applications.
* Simplify Test/monitor.

0 comments on commit af26b23

Please sign in to comment.