Merge pull request 'Simplify, clarify build instructions' (#1) from mwojcik/assembly:simplify_build_instructions into master

Reviewed-on: #1
This commit is contained in:
Egor Savkin 2023-05-05 12:58:50 +08:00
commit 2667ce11bb
1 changed files with 16 additions and 17 deletions

View File

@ -9,26 +9,20 @@
3. Test hardware 3. Test hardware
4. Create a flash-drive with `device_db.py` file for customers (FAT32) 4. Create a flash-drive with `device_db.py` file for customers (FAT32)
### CLI commands ### CLI commands - build and flash
```shell ```shell
mkdir <variant> mkdir <variant>
cd <variant>/ cd <variant>/
git clone git@github.com:m-labs/artiq.git nix develop github:m-labs/artiq\?ref=release-7
cd artiq/ # master/standalone only
git checkout origin/release-7
nix develop
artiq_mkfs -s ip 192.168.1.75 kasli.config artiq_mkfs -s ip 192.168.1.75 kasli.config
artiq_flash storage -f kasli.config artiq_flash storage -f kasli.config
artiq_ddb_template -o device_db.py <variant>.json artiq_ddb_template -o device_db.py <variant>.json
python -m artiq.gateware.targets.kasli_generic <variant>.json python -m artiq.gateware.targets.kasli_generic <variant>.json
artiq_flash --srcbuild -d artiq_kasli/<variant>/ artiq_flash --srcbuild -d artiq_kasli/<variant>/
artiq_sinara_tester
``` ```
Follow `artiq_sinara_tester` instructions for testing the hardware. For more detailed information,
you can use this book's pages, or if there is no instruction for testing your hardware, please add them to this book.
## Kasli-SoC (zynq) ## Kasli-SoC (zynq)
### Checklist ### Checklist
@ -41,26 +35,31 @@ you can use this book's pages, or if there is no instruction for testing your ha
6. Test hardware 6. Test hardware
7. Create a flash-drive with `device_db.py` file for customers (FAT32) 7. Create a flash-drive with `device_db.py` file for customers (FAT32)
### CLI commands ### CLI commands - build and flash
```shell ```shell
mkdir <variant> mkdir <variant>
cd <variant>/ cd <variant>/
git clone gitea@git.m-labs.hk:M-Labs/artiq-zynq.git nix develop git+https://git.m-labs.hk/m-labs/artiq-zynq\?ref=release-7
cd artiq-zynq/
git checkout origin/release-7
nix develop
artiq_ddb_template -o device_db.py <variant>.json artiq_ddb_template -o device_db.py <variant>.json
nix build -L --impure --expr 'let fl = builtins.getFlake "git+file://<path to artiq_zynq repo>"; in (fl.makeArtiqZynqPackage {target="kasli_soc"; variant="[master, standalone, satellite]"; json=<path to the json description>;}).kasli_soc-[master, standalone, satellite]-sd' nix build -L --impure --expr 'let fl = builtins.getFlake "git+https://git.m-labs.hk/m-labs/artiq-zynq?ref=release-7"; in (fl.makeArtiqZynqPackage {target="kasli_soc"; variant="[master, standalone, satellite]"; json=<full path to the json description>;}).kasli_soc-[master, standalone, satellite]-sd'
# copy `results/boot.bin` to the SD card # copy `results/boot.bin` to the SD card
# insert SD card to the Kasli-SoC and boot # insert SD card to the Kasli-SoC and boot
artiq_coremgmt -D 192.168.1.56 config write -s ip 192.168.1.75 # or just place extra/CONFIG.TXT near the boot.bin on SD card artiq_coremgmt -D 192.168.1.56 config write -s ip 192.168.1.75 # or just place extra/CONFIG.TXT near the boot.bin on SD card
# update firmware # update firmware (alternative to copy to SD, if ARTIQ already running)
artiq_coremgmt config write -f boot result/boot.bin artiq_coremgmt config write -f boot result/boot.bin
# reboot via power supply # reboot via power supply
```
## Testing (common)
```
artiq_sinara_tester artiq_sinara_tester
``` ```
Follow `artiq_sinara_tester` instructions for testing the hardware. For more detailed information,
you can use this book's pages, or if there is no instruction for testing your hardware, please add them to this book.
### Known issues ### Known issues
* [artiq-zynq#197](https://git.m-labs.hk/M-Labs/artiq-zynq/issues/197) - some cards (Sampler, Mirny, Zotino and others) * [artiq-zynq#197](https://git.m-labs.hk/M-Labs/artiq-zynq/issues/197) - some cards (Sampler, Mirny, Zotino and others)
@ -71,7 +70,7 @@ artiq_sinara_tester
1. Change `base` in JSON to the respective `master` or `satellite`, add `"enable_sata_drtio": true` if needed to the master, 1. Change `base` in JSON to the respective `master` or `satellite`, add `"enable_sata_drtio": true` if needed to the master,
remove `core_addr` in satellites remove `core_addr` in satellites
2. Build and flash firmware for each crate with JSONs (see instructions above) 2. Build and flash firmware for each crate with JSONs (see instructions above)
3. Create composed `device_db.py`: `artiq_ddb_template -o device_db.py -s 1 <satellite1>.json -s 2 <satellite2>.json <master>.json` 3. Create composed `device_db.py`: e.g. `artiq_ddb_template -o device_db.py -s 1 <satellite1>.json -s 2 <satellite2>.json <master>.json`
4. Connect satellite crates to the master respective to their numbers via the fiber (see example picture) 4. Connect satellite crates to the master respective to their numbers via the fiber (see example picture)
![](img/master_sat_connection.jpg) ![](img/master_sat_connection.jpg)
5. Ethernet is needed only for master 5. Ethernet is needed only for master