Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Starting with RCE SDK V1.7.0, Linux may be loaded an RCE may load Linux over NFS, and run as a diskless node.

...

cp arm-linux/tgt/linux/kernel/devicetree.dtb to <arch_linux_root>/bootcp arm-linux/tgt/linux/boot/<rce_type>/fpga.bit, or your own firmware file, to <arch

Copy your own firmware file to <arch_linux_root>/boot/fpga.bit

Or download and copy the default firmware bitfile for your RCE to <arch_linux_root>/boot/fpga.bit

For diskless DTMs, use a different filename than DPMs, like <arch_linux_root>/boot/fpga_dtm.bit

wget http://www.slac.stanford.edu/projects/CTK/SDK/fpga.dpm.bit

wget http://www.slac.stanford.edu/projects/CTK/SDK/fpga.dtm.bit

Remove the following service file links:

rm <arch_linux_root>/etc/systemd/system/sockets.target.wants/systemd-networkd.socket
rm <arch_linux_root>/etc/systemd/system/multi-user.target.wants/systemd-networkd.service

...

edit <arch_linux_root>/etc/ssh/sshd_config - uncomment PermitRootLogin and set value to yes

For SSH usage, allow read/write access for ssh key generation:

...

cp arm-linux/tgt/linux/fmd.service <arch_linux_root>/etc/systemd/system/multi-user.target.wants
cp arm-linux/tgt/linux/packages/system/minirc/* <arch_linux_root>/etc
cp <arch_linux_root>/etc/minirc.bay0.0 <arch_linux_root>/etc/minirc.dfl

DTM DHCP server only:

cp arm-linux/tgt/linux/dtm_dhcp.sh <arch_linux_root>/bin

...

First, update the RCE bootloader (boot.bin) with the version in the latest SDK.

Reboot the RCE.RCE with default firmware (reboot_rce -t linux -b 0)

Boot the RCE into the bootloader.

For non-eFUSE RCEs, make note of the ethaddr variable for later restoration.

Reset Apply the default u-boot environment:

...

zynq-uboot> setenv bootdelay 3

DTM Firmware FPGA Bitfile

DTMs use different firmware bit files than DPMs.

The default filename of fpga.bit must be updated to reflect the name of the DTM file located in <arch_linux_root>/boot.

In this example, the DTM firmware bitfile is named fpga_dtm.bit

zynq-uboot> setenv nfsfpga 'nfs 0x1000000 ${rootpath}/boot/fpga_dtm.bit && fpga loadb 0 0x1000000 ${filesize}'

Save the environment and reset:

zynq-uboot> saveenv
Saving Environment to FAT...
writing uboot.env
done
zynq-uboot> reset
resetting ...

...

zynq-uboot> run nfsboot
PHY not detected, assuming PHY at address 0
BOOTP broadcast 1
DHCP client bound to address 192.168.204.38
PHY not detected, assuming PHY at address 0
Gem.e000b000:0 is connected to Gem.e000b000. Reconnecting to Gem.e000b000
Using Gem.e000b000 device
File transfer via NFS from server 192.168.204.12; our IP address is 192.168.204.38
Filename '/nfsexport/users/smaldona/dat/arch-linux-arm/arch-linux/boot/uImage'.
Load address: 0x3000000
Loading: #################################################################
#########################
done
Bytes transferred = 3784144 (39bdd0 hex)
PHY not detected, assuming PHY at address 0
Gem.e000b000:0 is connected to Gem.e000b000. Reconnecting to Gem.e000b000
Using Gem.e000b000 device
File transfer via NFS from server 192.168.204.12; our IP address is 192.168.204.38
Filename '/nfsexport/users/smaldona/dat/arch-linux-arm/arch-linux/boot/devicetree.dtb'.
Load address: 0x2a00000
Loading: ##
done
Bytes transferred = 9984 (2700 hex)
PHY not detected, assuming PHY at address 0
Gem.e000b000:0 is connected to Gem.e000b000. Reconnecting to Gem.e000b000
Using Gem.e000b000 device
File transfer via NFS from server 192.168.204.12; our IP address is 192.168.204.38
Filename '/nfsexport/users/smaldona/dat/arch-linux-arm/arch-linux/boot/fpga.bit'.
Load address: 0x1000000
Loading: #################################################################
##
done
Bytes transferred = 13321492 (cb4514 hex)
design filename = "DpmTest;UserID=0XFFFFFFFF"
part number = "7z045ffg900"
date = "2014/10/22"
time = "15:38:09"
bytes in bitstream = 13321404
zynq_load: Bitstream is not swapped(1) - swap it
Net: mac 08:00:56:00:44:3f
## Booting kernel from Legacy Image at 03000000 ...
Image Name: Linux-4.4.0-xilinx-00025-g96ce8f
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3784080 Bytes = 3.6 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 02a00000
Booting using the fdt blob at 0x02a00000
Loading Kernel Image ... OK
OK
Loading Device Tree to 1fb4a000, end 1fb4f6ff ... OK
Starting kernel ...

Read-only ArchL inux Filesystem

In order to make the NFS Arch Linux filesystem read-only to the RCEs, execute this on the NFS host:

chmod -R a-w <arch_linux_root>

Note, command this may need to be performed with sudo privileges.

Once an RCE writes to the filesystem, the root user has ownership of any new files.

Adding Packages to the Arch Linux NFS Filesystem

In order to add packages using pacman, the NFS Arch Linux filesystem must have global read-write permissions.

On the NFS host, execute:

chmod -R a+w <arch_linux_root>

New packages are added using an RCE that is already running as a diskless node.

Package files must reside in a directory of <arch_linux_root> where RCEs have visibility.

Log into an RCE, and install the package(s) as follows:

pacman -U package_file.xz

Be sure to restore the filesystem to read-only permissions after package maintenance is complete.