Building/rebuilding stuff
board-ready
build everythinglinux-rebuild
{tlcdml,think2d}-build
nfsroot
sdcard
Board manipulation (over serial):
device-{reload,reset}
minicom
xmd-shell
show-xmd-commands
To bootstrap the sw stack for a zynq board you first need to build everything with
make board-ready
This one pulls linux and uboot and other stuff and builds a ramdisk etc so make some coffee, it is going to take a while.
Note: You will need root at some point to set uid to 0 for some files in the ramdisk.
To load everything you built on your board, connect your board to
your computer (make sure you have xmd
though) and use the
load-linux.sh
script.
For example:
./load-linux.sh
To just load everything through xmd
and then fire up a serial
connection via minicom.
Use --help
for other options.
In the special case that you are working on a mounted filesystem
and the absolute paths of your machine match the absolute paths in
an ssh accessible faster machine you can use the REMOTE_SERVER
variable. For example:
make board-ready REMOTE_SERVER=192.168.1.27
or even
make board-ready REMOTE_SERVER=me@fastserver
To compile directfb with 4 threads do.
make MAKETHREADS=4 dfb-all
This converts all calls to make
into make -j4
.
For archives you can run for exaple:
make libpng-clean-archive
To remove all traces of libpng (except from the filesystem)
To build everything run
make dfb-all
You need to setup the NFS server on the host side yourself. Usually you can do that by installing the nfs server and then fixing up \/etc\/exports to have a line similar to this.
/srv/nfs *(rw,no_subtree_check,no_root_squash,insecure)
if you change the /srv/nfs path you will have to also set the
NFS_ROOT
variable.
Then set up the boot arguments of linux to something like this
console=ttyPS0,115200n8 root=/dev/nfs rw nfsroot=192.168.1.22:/srv/nfs rw earlyprintk ip=:::::eth0:dhcp
You can do this by editing the dts you are using (DTS_TREE
variable) or by passing the --bootargs <bootargs>
to
load-linux.sh.
You may run debug.sh <program-in-bin>
to debug something running
on the board’s gdbserver.
From the board look for dbi.sh <program to debug>
if you cant
bother to look into gdb server.
The problem when a makefile compiles a couple of other projects is
that ./configure
will always run and may take quite some time
when phony targets are being run. So each target
target-name-build
has an enquivalent target-name-lazy
which
will run target-name-build
if there is not token file in lazy/
and then create such a file. This way we can avoid configuring
things like libjpeg
again and again.
For example:
make linux-lazy
will run make linux-build
and then it will create a file. If we
try to run again make linux-lazy
it will just skip it.
make linux-clean-lazy
cleans the created files by lazy
make all-clean-lazy
clears all laziness.
If you are sure you have run linux-build
or for any reason you
want to prevent a lazy from actually doing anything you can run.
make linux-shallow-lazy
to create the lazy file without building (again)
To use the sd card loaded stuff the switches must be:
1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|
Down | Down | Up | Up | Down |
To load linux from the jtag you must have all switches down
1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|
Down | Down | Down | Down | Down |
For ZC702 you also need to setup SW10
JTAG Mode | Switch 0 | Switch 1 |
---|---|---|
Invalid | off | off |
Digilent USB JTAG | off | on |
Xilinx Platform Cable | on | off |
20-pin Header | off | off |
To interact with a board you should use the load-linux.sh script. It is becoming more and more sophisticated and can cover more than a couple of cases. I can’t hope to have documentation up to date with it as it grows and changes very very fast. Check the swtch case at the end of the file to see what you can do.
MODULEDIR is absolute for host.