Skip to content

Commit

Permalink
modify Makefile to cross-compile OpenBLAS
Browse files Browse the repository at this point in the history
This is needed for the DDC branch of maia-sdr, which uses pm-remez.

Signed-off-by: Daniel Estévez <daniel@destevez.net>
  • Loading branch information
daniestevez committed Apr 27, 2024
1 parent 790fb89 commit c751a0b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ VIVADO_VERSION ?= 2022.2
CROSS_COMPILE = arm-linux-gnueabihf-
TOOLS_PATH = PATH="$(CURDIR)/buildroot/output/host/bin:$(CURDIR)/buildroot/output/host/sbin:$(PATH)"
TOOLCHAIN = $(CURDIR)/buildroot/output/host/bin/$(CROSS_COMPILE)gcc
TOOLCHAIN_FORTRAN = $(CURDIR)/buildroot/output/host/bin/$(CROSS_COMPILE)gfortran

NCORES = $(shell grep -c ^processor /proc/cpuinfo)
VIVADO_SETTINGS ?= /opt/Xilinx/Vivado/$(VIVADO_VERSION)/settings64.sh
Expand Down Expand Up @@ -123,8 +124,10 @@ buildroot/board/$(TARGET)/maia-sdr.ko: maia-sdr/maia-kmod/maia-sdr.ko | build
# maia-httpd.
maia-sdr/maia-httpd/target/armv7-unknown-linux-gnueabihf/release/maia-httpd: TOOLCHAIN
cd maia-sdr/maia-httpd && \
$(TOOLS_PATH) cargo build --release --target armv7-unknown-linux-gnueabihf \
--config target.armv7-unknown-linux-gnueabihf.linker=\"arm-linux-gnueabihf-gcc\"
OPENBLAS_TARGET=armv7 OPENBLAS_HOSTCC=gcc \
OPENBLAS_CC=$(TOOLCHAIN) OPENBLAS_FC=$(TOOLCHAIN_FORTRAN) \
cargo build --release --target armv7-unknown-linux-gnueabihf \
--config target.armv7-unknown-linux-gnueabihf.linker=\"$(TOOLCHAIN)\"

.PHONY: maia-sdr/maia-httpd/target/armv7-unknown-linux-gnueabihf/release/maia-httpd

Expand Down
2 changes: 1 addition & 1 deletion maia-sdr
Submodule maia-sdr updated 73 files
+3 −3 .github/workflows/maia-hdl.yml
+19 −29 .github/workflows/maia-httpd.yml
+1 −1 .github/workflows/maia-json.yml
+2 −2 .github/workflows/maia-wasm.yml
+1 −1 .github/workflows/publish.yml
+1 −1 .github/workflows/waterfall-example.yaml
+14 −9 maia-hdl/README.md
+6 −0 maia-hdl/generate_maia_sdr_svd.py
+75 −0 maia-hdl/maia_hdl/buffer.py
+173 −66 maia-hdl/maia_hdl/cmult.py
+218 −0 maia-hdl/maia_hdl/ddc.py
+13 −12 maia-hdl/maia_hdl/fft.py
+992 −0 maia-hdl/maia_hdl/fir.py
+434 −0 maia-hdl/maia_hdl/floating_point.py
+174 −21 maia-hdl/maia_hdl/maia_sdr.py
+173 −0 maia-hdl/maia_hdl/mixer.py
+41 −1 maia-hdl/maia_hdl/packer.py
+58 −29 maia-hdl/maia_hdl/recorder.py
+29 −17 maia-hdl/maia_hdl/spectrometer.py
+163 −103 maia-hdl/maia_hdl/spectrum_integrator.py
+3 −0 maia-hdl/projects/pluto/system_project.tcl
+3 −0 maia-hdl/projects/plutoplus/system_project.tcl
+29 −26 maia-hdl/test/test_cmult.py
+352 −0 maia-hdl/test/test_fir.py
+112 −0 maia-hdl/test/test_floating_point.py
+57 −0 maia-hdl/test/test_mixer.py
+44 −2 maia-hdl/test/test_packer.py
+24 −12 maia-hdl/test/test_spectrum_integrator.py
+13 −3 maia-hdl/test_cocotb/cmult3x/tb.v
+24 −3 maia-hdl/test_cocotb/cmult3x/test_cmult3x.py
+11 −4 maia-hdl/test_cocotb/cmult3x/verilog.py
+1 −0 maia-hdl/test_cocotb/noise_input/Makefile
+13 −3 maia-hdl/test_cocotb/noise_input/test_noise_input.py
+4 −2 maia-hdl/test_cocotb/noise_input/verilog.py
+5 −5 maia-hdl/test_cocotb/recorder/tb.v
+31 −11 maia-hdl/test_cocotb/recorder/test_recorder.py
+3 −3 maia-hdl/test_cocotb/recorder/verilog.py
+704 −195 maia-httpd/Cargo.lock
+7 −1 maia-httpd/Cargo.toml
+2 −0 maia-httpd/Cross.toml
+203 −3 maia-httpd/maia-json/src/lib.rs
+212 −19 maia-httpd/maia-pac/src/lib.rs
+153 −11 maia-httpd/maia-pac/svd/maia-sdr.svd
+77 −24 maia-httpd/src/app.rs
+515 −0 maia-httpd/src/ddc.rs
+33 −0 maia-httpd/src/ddc/constants.rs
+485 −42 maia-httpd/src/fpga.rs
+70 −59 maia-httpd/src/httpd.rs
+41 −20 maia-httpd/src/httpd/ad9361.rs
+32 −46 maia-httpd/src/httpd/api.rs
+95 −0 maia-httpd/src/httpd/ddc.rs
+142 −113 maia-httpd/src/httpd/recording.rs
+24 −26 maia-httpd/src/httpd/recording/iqengine.rs
+35 −36 maia-httpd/src/httpd/spectrometer.rs
+62 −0 maia-httpd/src/httpd/version.rs
+1 −0 maia-httpd/src/lib.rs
+1 −1 maia-httpd/src/sigmf.rs
+34 −25 maia-httpd/src/spectrometer.rs
+55 −34 maia-wasm/Cargo.lock
+5 −0 maia-wasm/Cargo.toml
+83 −30 maia-wasm/assets/index.html
+102 −35 maia-wasm/assets/style.css
+1 −0 maia-wasm/src/lib.rs
+55 −22 maia-wasm/src/pointer.rs
+470 −170 maia-wasm/src/ui.rs
+79 −5 maia-wasm/src/ui/input.rs
+110 −22 maia-wasm/src/ui/macros.rs
+33 −1 maia-wasm/src/ui/preferences.rs
+16 −12 maia-wasm/src/ui/request.rs
+15 −0 maia-wasm/src/version.rs
+142 −1 maia-wasm/src/waterfall.rs
+92 −17 maia-wasm/src/waterfall_interaction.rs
+22 −1 maia-wasm/waterfall-example/Cargo.lock

0 comments on commit c751a0b

Please sign in to comment.