Matchstiq-Z1 Getting Started Guide
ANGRYVIPER Team
6
Hardware Setup
6.1
Establish a Serial Connection
By default, the USB to Serial adapter connects as read-only, which requires sudo privileges for establishing a serial
connection. OpenCPI recognizes that sudo may not be available and has provided an alternative for configuring
the device thereby allowing all users access to the device. Specifically, this is accomplished by adding
udev
rules to
instruct the device connection to have read and write permissions for all users.
• If OpenCPI was installed via RPMs, the
udev
rules are automatically setup for the user.
• If OpenCPI was installed from source, then the user must manually add the
udev
rules by copying the file from
the host machine’s installation directory to the host machine’s
/etc/udev/rules.d/
. The following command
can be used as a guide:
$ cd /etc/udev/rules.d/
$ sudo ln -s /<install-path>/opencpi/cdk/matchstiq_z1/host-udev-rules/97-matchstiq_z1.rules \
97-matchstiq_z1.rules
• Whether installed via RPMs or source (and manually creating the symbolic link), the USB to Serial adapter
will be connected as
/dev/matchstiq_z1_0
with read and write permissions for all users.
Once the Matchstiq-Z1 is powered on, use the following command to connect to the serial port:
$ screen /dev/matchstiq_z1_0 115200
6.2
Update U-boot Variables
1. Remove power from the Matchstiq-Z1 unit.
2. Insert the SD card into the front panel SD card slot.
3. Connect a terminal to the rear micro-USB connector of the Matchstiq-Z1 with a baud rate of 115200.
• per the previous section, “
screen /dev/matchstiq_z1_0 115200
” can be used to connect to the serial
port.
4. Apply power to the Matchstiq-Z1 with the terminal still connected and stop the boot process by hitting any
key to enter the U-Boot terminal.
5. Run the following commands to setup the environment variables:
•
setenv bootcmd 'ivmmc; run ocpiboot'
•
setenv ocpiboot 'setenv bootargs console=ttyPS0,115200n8 root=/dev/ram rw earlyprintk;
setenv fdt_high ffffffff; setenv initrd_high 0x1000000; fatload mmc ${iv_mmc} ${dtbaddr}
${dtbfile}; fatload mmc ${iv_mmc} ${loadaddr} ${bootfile}; fatload mmc ${iv_mmc}
0x2000000 uramdisk.image.gz; bootm ${loadaddr} 0x2000000 ${dtbaddr}'
*Note: This should be a one-line command. Make sure there are no newlines.
•
saveenv
6. These U-Boot environment variables are now saved to the second partition of the SD card
Verify that the changes are correct by running the command “
env p
” and comparing to:
baudrate=115200
bootcmd=ivmmc;run ocpiboot
bootdelay=3
bootfile=uImage
defargs=setenv bootargs console=ttyPS0,115200n8 mem=240M iv_mb=${iv_mb} iv_io=${iv_io}
iv_bp=${iv_bp} iv_mmc=${iv_mmc} ${otherargs}
dtbaddr=0x02a00000
12