From 7e9b917b225771470408f49ad495653df7dbef29 Mon Sep 17 00:00:00 2001 From: subrad Date: Tue, 25 Feb 2025 09:07:05 -0500 Subject: [PATCH 01/35] add gain table load and enable api support to python binding version of libbladerf library --- .../python/bladerf/_bladerf.py | 20 +++++++++++++++++-- .../python/bladerf/_cdef.py | 4 ++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/host/libraries/libbladeRF_bindings/python/bladerf/_bladerf.py b/host/libraries/libbladeRF_bindings/python/bladerf/_bladerf.py index a3fa262c..10d97c18 100644 --- a/host/libraries/libbladeRF_bindings/python/bladerf/_bladerf.py +++ b/host/libraries/libbladeRF_bindings/python/bladerf/_bladerf.py @@ -608,7 +608,15 @@ class BladeRF: _check_error(ret) # Gain - + def set_gain_calibration(self, ch, path): + ret = libbladeRF.bladerf_load_gain_calibration(self.dev[0], ch, path.encode()) + _check_error(ret) + return ret + def enable_gain_calibration(self, ch, enable): + ret = libbladeRF.bladerf_enable_gain_calibration(self.dev[0], ch, enable) + _check_error(ret) + return ret + def set_gain(self, ch, gain): ret = libbladeRF.bladerf_set_gain(self.dev[0], ch, gain) _check_error(ret) @@ -1138,7 +1146,7 @@ class BladeRF: @gain.setter def gain(self, value): return self.dev.set_gain(self.channel, value) - + @property def gain_mode(self): """Gain mode""" @@ -1242,6 +1250,14 @@ class BladeRF: def set_enable(self, value): return self.dev.enable_module(self.channel, value) + def load_gain_table (self, csv_path): + return self.dev.set_gain_calibration(self.channel, csv_path) + + + def enable_gain_table(self, ch, en): + return self.dev.enable_gain_calibration((self.channel, en)) + + enable = property(fset=set_enable, doc="Enable/disable RF chain") def Channel(self, ch): diff --git a/host/libraries/libbladeRF_bindings/python/bladerf/_cdef.py b/host/libraries/libbladeRF_bindings/python/bladerf/_cdef.py index 1e92b79c..5ae18ff4 100644 --- a/host/libraries/libbladeRF_bindings/python/bladerf/_cdef.py +++ b/host/libraries/libbladeRF_bindings/python/bladerf/_cdef.py @@ -149,6 +149,10 @@ header = """ const char *stage, bladerf_gain gain); int bladerf_get_gain_stage(struct bladerf *dev, bladerf_channel ch, const char *stage, bladerf_gain *gain); + int bladerf_load_gain_calibration(struct bladerf *dev, bladerf_channel ch, + const char* cal_file_loc); + int bladerf_enable_gain_calibration(struct bladerf *dev, bladerf_channel ch, + bool en); int bladerf_get_gain_stage_range(struct bladerf *dev, bladerf_channel ch, const char *stage, const struct bladerf_range **range); int bladerf_get_gain_stages(struct bladerf *dev, bladerf_channel ch, From 561b62306d114f90a6ac20bd047ae5cd617e540b Mon Sep 17 00:00:00 2001 From: subrad Date: Wed, 5 Mar 2025 14:19:50 -0500 Subject: [PATCH 02/35] add method to see gain adjust to python binding --- .../libbladeRF_bindings/python/bladerf/_bladerf.py | 13 ++++++++++++- .../libbladeRF_bindings/python/bladerf/_cdef.py | 2 ++ host/libraries/libbladeRF_bindings/python/setup.py | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/host/libraries/libbladeRF_bindings/python/bladerf/_bladerf.py b/host/libraries/libbladeRF_bindings/python/bladerf/_bladerf.py index 10d97c18..a2f3f85a 100644 --- a/host/libraries/libbladeRF_bindings/python/bladerf/_bladerf.py +++ b/host/libraries/libbladeRF_bindings/python/bladerf/_bladerf.py @@ -617,6 +617,12 @@ class BladeRF: _check_error(ret) return ret + def get_gain_calibration(self, ch): + gain = ffi.new("int *") + ret = libbladeRF.bladerf_get_gain_target(self.dev[0], ch, gain) + _check_error(ret) + return gain[0] + def set_gain(self, ch, gain): ret = libbladeRF.bladerf_set_gain(self.dev[0], ch, gain) _check_error(ret) @@ -1142,7 +1148,12 @@ class BladeRF: def gain(self): """Gain, in dB""" return self.dev.get_gain(self.channel) - + + @property + def gain_target(self): + "Computes the gain target for a specified channel, incorporating calibration corrections." + return self.dev.get_gain_calibration(self.channel) + @gain.setter def gain(self, value): return self.dev.set_gain(self.channel, value) diff --git a/host/libraries/libbladeRF_bindings/python/bladerf/_cdef.py b/host/libraries/libbladeRF_bindings/python/bladerf/_cdef.py index 5ae18ff4..c2daa799 100644 --- a/host/libraries/libbladeRF_bindings/python/bladerf/_cdef.py +++ b/host/libraries/libbladeRF_bindings/python/bladerf/_cdef.py @@ -153,6 +153,8 @@ header = """ const char* cal_file_loc); int bladerf_enable_gain_calibration(struct bladerf *dev, bladerf_channel ch, bool en); + int bladerf_get_gain_target(struct bladerf *dev, bladerf_channel ch, + int *gain_target); int bladerf_get_gain_stage_range(struct bladerf *dev, bladerf_channel ch, const char *stage, const struct bladerf_range **range); int bladerf_get_gain_stages(struct bladerf *dev, bladerf_channel ch, diff --git a/host/libraries/libbladeRF_bindings/python/setup.py b/host/libraries/libbladeRF_bindings/python/setup.py index 08702441..76e306f7 100644 --- a/host/libraries/libbladeRF_bindings/python/setup.py +++ b/host/libraries/libbladeRF_bindings/python/setup.py @@ -19,7 +19,7 @@ with open(path.join(here, 'README.md'), encoding='utf-8') as f: setup( name='bladerf', - version='1.3.0', + version='1.3.1', description='CFFI-based Python 3 binding to libbladeRF', long_description=long_description, url='https://github.com/Nuand/bladeRF', From b90b540d0fe3c54ff91de864ec0dcaf0a4b1efcb Mon Sep 17 00:00:00 2001 From: subrad Date: Thu, 10 Apr 2025 09:45:04 -0400 Subject: [PATCH 03/35] only attempt to apply gain corr if dev in MGC mode This will help when in AGC sweep mode and it thinks every freq is clamping gain --- host/libraries/libbladeRF/src/bladerf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/host/libraries/libbladeRF/src/bladerf.c b/host/libraries/libbladeRF/src/bladerf.c index f19c3a68..a282444c 100644 --- a/host/libraries/libbladeRF/src/bladerf.c +++ b/host/libraries/libbladeRF/src/bladerf.c @@ -827,8 +827,11 @@ int bladerf_set_frequency(struct bladerf *dev, MUTEX_LOCK(&dev->lock); status = dev->board->set_frequency(dev, ch, frequency); + bladerf_gain_mode gain_mode; - if (dev->gain_tbls[ch].enabled && status == 0) { + dev->board->get_gain_mode(dev, ch, &gain_mode); + + if ((dev->gain_tbls[ch].enabled && status == 0) && (gain_mode == BLADERF_GAIN_MGC)) { status = apply_gain_correction(dev, ch, frequency); if (status != 0) { log_error("Failed to set gain correction\n"); From 55ef69658feb82d1c369841b2f02242e3eb98e9a Mon Sep 17 00:00:00 2001 From: bradley-DS Date: Fri, 25 Apr 2025 09:37:00 -0400 Subject: [PATCH 04/35] add python gain table support functions/ Add gain table loading to bladeRF-cli (#2) * add python command to print gain table values to steal from nuand * add gain table loading to bladeRF-cli util with load_gain command * fix command filename in cmake * add print function for gain tables to confirm loading * add doc saying limitation of new cmd to rx0/tx0 --- .../python/bladerf/_bladerf.py | 6 +- .../python/bladerf/_cdef.py | 2 + host/utilities/bladeRF-cli/CMakeLists.txt | 3 +- host/utilities/bladeRF-cli/src/cmd/cmd.c | 12 ++++ .../bladeRF-cli/src/cmd/doc/cmd_help.h.in | 7 +++ .../src/cmd/doc/interactive-help.md | 15 +++++ .../src/cmd/load_gain_calibration.c | 57 +++++++++++++++++++ host/utilities/bladeRF-cli/src/cmd/printset.c | 2 + host/utilities/bladeRF-cli/src/cmd/printset.h | 1 + .../bladeRF-cli/src/cmd/printset_impl.c | 34 +++++++++++ 10 files changed, 137 insertions(+), 2 deletions(-) create mode 100644 host/utilities/bladeRF-cli/src/cmd/load_gain_calibration.c diff --git a/host/libraries/libbladeRF_bindings/python/bladerf/_bladerf.py b/host/libraries/libbladeRF_bindings/python/bladerf/_bladerf.py index a2f3f85a..5bb10689 100644 --- a/host/libraries/libbladeRF_bindings/python/bladerf/_bladerf.py +++ b/host/libraries/libbladeRF_bindings/python/bladerf/_bladerf.py @@ -612,6 +612,7 @@ class BladeRF: ret = libbladeRF.bladerf_load_gain_calibration(self.dev[0], ch, path.encode()) _check_error(ret) return ret + def enable_gain_calibration(self, ch, enable): ret = libbladeRF.bladerf_enable_gain_calibration(self.dev[0], ch, enable) _check_error(ret) @@ -622,7 +623,10 @@ class BladeRF: ret = libbladeRF.bladerf_get_gain_target(self.dev[0], ch, gain) _check_error(ret) return gain[0] - + def print_gain_calibration(self, ch, with_entries): + ret = libbladeRF.bladerf_print_gain_calibration(self.dev[0], ch, with_entries) + _check_error(ret) + return ret def set_gain(self, ch, gain): ret = libbladeRF.bladerf_set_gain(self.dev[0], ch, gain) _check_error(ret) diff --git a/host/libraries/libbladeRF_bindings/python/bladerf/_cdef.py b/host/libraries/libbladeRF_bindings/python/bladerf/_cdef.py index c2daa799..380b80c9 100644 --- a/host/libraries/libbladeRF_bindings/python/bladerf/_cdef.py +++ b/host/libraries/libbladeRF_bindings/python/bladerf/_cdef.py @@ -153,6 +153,8 @@ header = """ const char* cal_file_loc); int bladerf_enable_gain_calibration(struct bladerf *dev, bladerf_channel ch, bool en); + int bladerf_print_gain_calibration(struct bladerf *dev, bladerf_channel ch, + bool with_entries); int bladerf_get_gain_target(struct bladerf *dev, bladerf_channel ch, int *gain_target); int bladerf_get_gain_stage_range(struct bladerf *dev, bladerf_channel diff --git a/host/utilities/bladeRF-cli/CMakeLists.txt b/host/utilities/bladeRF-cli/CMakeLists.txt index a08d058a..bd257a6c 100644 --- a/host/utilities/bladeRF-cli/CMakeLists.txt +++ b/host/utilities/bladeRF-cli/CMakeLists.txt @@ -6,7 +6,7 @@ project(bladeRF-cli C) ################################################################################ set(VERSION_INFO_MAJOR 1) -set(VERSION_INFO_MINOR 9) +set(VERSION_INFO_MINOR 10) set(VERSION_INFO_PATCH 0) if(NOT DEFINED VERSION_INFO_EXTRA) @@ -200,6 +200,7 @@ set(BLADERF_CLI_SOURCE src/cmd/info.c src/cmd/jump_boot.c src/cmd/lms_reg_info.c + src/cmd/load_gain_calibration.c src/cmd/load.c src/cmd/mimo.c src/cmd/open.c diff --git a/host/utilities/bladeRF-cli/src/cmd/cmd.c b/host/utilities/bladeRF-cli/src/cmd/cmd.c index 09f1c6b8..bdc25ceb 100644 --- a/host/utilities/bladeRF-cli/src/cmd/cmd.c +++ b/host/utilities/bladeRF-cli/src/cmd/cmd.c @@ -48,6 +48,7 @@ DECLARE_CMD(help, "help", "h", "?"); DECLARE_CMD(info, "info", "i"); DECLARE_CMD(jump_to_bootloader, "jump_to_boot", "j"); DECLARE_CMD(load, "load", "ld"); +DECLARE_CMD(load_gain_calibration,"load_gain","lg") DECLARE_CMD(mimo, "mimo"); DECLARE_CMD(open, "open", "op", "o"); DECLARE_CMD(peek, "peek", "pe"); @@ -209,6 +210,16 @@ static struct cmd const cmd_table[] = { FIELD_INIT(.requires_fpga, false), FIELD_INIT(.allow_while_streaming, false), }, + { + FIELD_INIT(.names, cmd_names_load_gain_calibration), + FIELD_INIT(.exec, cmd_load_gain_calibration), + FIELD_INIT(.desc, "Load gain calibration table to allow RX or TX to have exact pwr"), + FIELD_INIT(.help, CLI_CMD_HELPTEXT_load_gain_calibration), + FIELD_INIT(.requires_device, true), + FIELD_INIT(.requires_fpga, true), + FIELD_INIT(.allow_while_streaming, false), + }, + { FIELD_INIT(.names, cmd_names_mimo), FIELD_INIT(.exec, cmd_mimo), @@ -346,6 +357,7 @@ static struct cmd const cmd_table[] = { FIELD_INIT(.requires_fpga, true), FIELD_INIT(.allow_while_streaming, false), }, + /* Always terminate the command entry with a completely NULL entry */ { FIELD_INIT(.names, NULL), diff --git a/host/utilities/bladeRF-cli/src/cmd/doc/cmd_help.h.in b/host/utilities/bladeRF-cli/src/cmd/doc/cmd_help.h.in index bea22fae..d995ebb0 100644 --- a/host/utilities/bladeRF-cli/src/cmd/doc/cmd_help.h.in +++ b/host/utilities/bladeRF-cli/src/cmd/doc/cmd_help.h.in @@ -351,6 +351,13 @@ "\n" \ +#define CLI_CMD_HELPTEXT_load_gain_calibration \ +"Usage: load_gain \n" \ +"\n" \ +"Load a .tbl file for either RX or TX gain table calibration.\n" \ +"CURRENT LIMITATION OF ONLY RX0 or TX0 can be calibrated, didnt want to figure out ch sorting\n" \ +"\n" \ + #define CLI_CMD_HELPTEXT_xb \ "Usage: xb [parameters]\n" \ "\n" \ diff --git a/host/utilities/bladeRF-cli/src/cmd/doc/interactive-help.md b/host/utilities/bladeRF-cli/src/cmd/doc/interactive-help.md index d1ce8758..dace5198 100644 --- a/host/utilities/bladeRF-cli/src/cmd/doc/interactive-help.md +++ b/host/utilities/bladeRF-cli/src/cmd/doc/interactive-help.md @@ -358,6 +358,21 @@ Usage: `load ` Load an FPGA bitstream or program the FX3's SPI flash. +load_gain +---- + +Usage: `load_gain ` + +Load a .tbl file for either RX or TX gain table calibration. + + * `` + + Select which RF Path to use, only sets the first of each + + * `` + + Set filepath and filename to locate .tbl file + xb -- diff --git a/host/utilities/bladeRF-cli/src/cmd/load_gain_calibration.c b/host/utilities/bladeRF-cli/src/cmd/load_gain_calibration.c new file mode 100644 index 00000000..8ca0478a --- /dev/null +++ b/host/utilities/bladeRF-cli/src/cmd/load_gain_calibration.c @@ -0,0 +1,57 @@ +#include +#include +#include "cmd.h" +#include "input.h" + +int cmd_load_gain_calibration(struct cli_state *state, int argc, char **argv) +{ + /* Valid commands: + load_gain + */ + int rv = CLI_RET_OK; + + if ( argc == 3 ) { + int lib_status = 0; + struct bladerf *dev = state->dev; + char *expanded_path = input_expand_path(argv[2]); + + if (expanded_path == NULL) { + cli_err(state, NULL, + "Unable to expand file path: \"%s\"\n", argv[2]); + return CLI_RET_INVPARAM; + } + + if (!strcasecmp(argv[1], "rx")) { + + printf("\n Loading RX Gain table from %s...\n\n", expanded_path); + lib_status = bladerf_load_gain_calibration(dev, BLADERF_CHANNEL_RX(0), expanded_path); + if (lib_status == 0) { + printf(" RX load success!\n\n"); + } + + } else if (!strcasecmp(argv[1], "tx")) { + + printf("\n Loading TX Gain table from %s...\n\n", expanded_path); + lib_status = bladerf_load_gain_calibration(dev, BLADERF_CHANNEL_TX(0), expanded_path); + if (lib_status == 0) { + printf(" TX load success!\n\n"); + } + + } else { + cli_err(state, argv[0], " Invalid type: %s\n", argv[1]); + rv = CLI_RET_INVPARAM; + } + + free(expanded_path); + if (lib_status < 0) { + state->last_lib_error = lib_status; + rv = CLI_RET_LIBBLADERF; + } + + } else { + rv = CLI_RET_NARGS; + } + + return rv; +} + diff --git a/host/utilities/bladeRF-cli/src/cmd/printset.c b/host/utilities/bladeRF-cli/src/cmd/printset.c index 1ca16ed2..e6e50e5f 100644 --- a/host/utilities/bladeRF-cli/src/cmd/printset.c +++ b/host/utilities/bladeRF-cli/src/cmd/printset.c @@ -82,6 +82,7 @@ PRINTSET_DECL(clock_ref); PRINTSET_DECL(clock_sel); PRINTSET_DECL(filter); PRINTSET_DECL(frequency); +PRINTSET_DECL(gain_table); PRINTSET_DECL(gain); PRINTSET_DECL(gpio); PRINTSET_DECL(hardware); @@ -124,6 +125,7 @@ struct printset_entry printset_table[] = { PRINTSET_ENTRY(loopback, PRINTALL_OPTION_APPEND_NEWLINE, BOARD_ANY), PRINTSET_ENTRY(rx_mux, PRINTALL_OPTION_APPEND_NEWLINE, BOARD_ANY), PRINTSET_ENTRY(filter, PRINTALL_OPTION_APPEND_NEWLINE, BOARD_BLADERF2), + PRINTSET_ENTRY(gain_table, PRINTALL_OPTION_APPEND_NEWLINE, BOARD_BLADERF2), PRINTSET_ENTRY(gain, PRINTALL_OPTION_APPEND_NEWLINE, BOARD_ANY), PRINTSET_ENTRY(lnagain, PRINTALL_OPTION_SKIP, BOARD_BLADERF1), PRINTSET_ENTRY(rxvga1, PRINTALL_OPTION_SKIP, BOARD_BLADERF1), diff --git a/host/utilities/bladeRF-cli/src/cmd/printset.h b/host/utilities/bladeRF-cli/src/cmd/printset.h index d63a104a..5efac904 100644 --- a/host/utilities/bladeRF-cli/src/cmd/printset.h +++ b/host/utilities/bladeRF-cli/src/cmd/printset.h @@ -93,6 +93,7 @@ int print_filter(struct cli_state *state, int argc, char **argv); int set_filter(struct cli_state *state, int argc, char **argv); int print_frequency(struct cli_state *state, int argc, char **argv); int set_frequency(struct cli_state *state, int argc, char **argv); +int print_gain_table(struct cli_state *state, int argc, char **argv); int print_gain(struct cli_state *state, int argc, char **argv); int set_gain(struct cli_state *state, int argc, char **argv); int print_lnagain(struct cli_state *state, int argc, char **argv); diff --git a/host/utilities/bladeRF-cli/src/cmd/printset_impl.c b/host/utilities/bladeRF-cli/src/cmd/printset_impl.c index ae1d4013..16e89c3f 100644 --- a/host/utilities/bladeRF-cli/src/cmd/printset_impl.c +++ b/host/utilities/bladeRF-cli/src/cmd/printset_impl.c @@ -726,6 +726,40 @@ out: return rv; } +/* gain Table*/ +int print_gain_table(struct cli_state *state, int argc, char **argv) +{ + int rv = CLI_RET_OK; + int *err = &state->last_lib_error; + int status; + + status = bladerf_print_gain_calibration(state->dev,BLADERF_CHANNEL_RX(0),false ); + if (status < 0) { + *err = status; + rv = CLI_RET_LIBBLADERF; + goto out; + } + + status = bladerf_print_gain_calibration(state->dev,BLADERF_CHANNEL_TX(0),false ); + if (status < 0) { + *err = status; + rv = CLI_RET_LIBBLADERF; + goto out; + } + +out: + return rv; +} + +int set_gain_table(struct cli_state *state, int argc, char **argv) +{ + int rv = CLI_RET_OK; + .tbl + rv = print_gain_table(state, argc, argv); + + return rv; +} + int print_gain(struct cli_state *state, int argc, char **argv) { int rv = CLI_RET_OK; From e4686566bee9985e60e6d8ea976ceb9813598839 Mon Sep 17 00:00:00 2001 From: subrad Date: Fri, 25 Apr 2025 11:12:19 -0400 Subject: [PATCH 05/35] remove random text --- host/utilities/bladeRF-cli/src/cmd/printset_impl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/host/utilities/bladeRF-cli/src/cmd/printset_impl.c b/host/utilities/bladeRF-cli/src/cmd/printset_impl.c index 16e89c3f..c02e47e5 100644 --- a/host/utilities/bladeRF-cli/src/cmd/printset_impl.c +++ b/host/utilities/bladeRF-cli/src/cmd/printset_impl.c @@ -754,7 +754,6 @@ out: int set_gain_table(struct cli_state *state, int argc, char **argv) { int rv = CLI_RET_OK; - .tbl rv = print_gain_table(state, argc, argv); return rv; From 2b48f92e050adb079d829b4c6fb0da8f31d6606b Mon Sep 17 00:00:00 2001 From: subrad Date: Mon, 28 Apr 2025 16:52:09 -0400 Subject: [PATCH 06/35] add toggle for biastee TX to bladeRF-power --- host/utilities/bladeRF-power/include/init.h | 1 + host/utilities/bladeRF-power/src/helpers.c | 4 ++++ host/utilities/bladeRF-power/src/init.c | 1 + host/utilities/bladeRF-power/src/main.c | 8 +++++++- host/utilities/bladeRF-power/src/window.c | 3 ++- 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/host/utilities/bladeRF-power/include/init.h b/host/utilities/bladeRF-power/include/init.h index dade7d08..893c9874 100644 --- a/host/utilities/bladeRF-power/include/init.h +++ b/host/utilities/bladeRF-power/include/init.h @@ -48,6 +48,7 @@ struct test_params { bool gain_cal_enabled; char *gain_cal_file; bool show_messages; + bool bias_tee; char message_buffer[4096]; // Adjust size as needed }; diff --git a/host/utilities/bladeRF-power/src/helpers.c b/host/utilities/bladeRF-power/src/helpers.c index 77d4d2fd..19f0cb30 100644 --- a/host/utilities/bladeRF-power/src/helpers.c +++ b/host/utilities/bladeRF-power/src/helpers.c @@ -220,6 +220,10 @@ int start_streaming(struct bladerf *dev, struct test_params *test) { if (cmd == 'i') { show_calibration_info = !show_calibration_info; } + if (cmd == 'b'){ + bladerf_set_bias_tee(dev, ch, !test->bias_tee); + test->bias_tee = !test->bias_tee; + } if (BLADERF_CHANNEL_IS_TX(ch) == false) { CHECK(bladerf_get_gain_mode(dev, ch, &test->gain_mode)); diff --git a/host/utilities/bladeRF-power/src/init.c b/host/utilities/bladeRF-power/src/init.c index dbac8437..4ebfcf82 100644 --- a/host/utilities/bladeRF-power/src/init.c +++ b/host/utilities/bladeRF-power/src/init.c @@ -57,6 +57,7 @@ void init_params(struct test_params *test) { test->direction = DIRECTION_UNSET; test->rx_power = 0.0; + test->bias_tee = false; test->gain_cal_enabled = false; test->gain_cal_file = NULL; } diff --git a/host/utilities/bladeRF-power/src/main.c b/host/utilities/bladeRF-power/src/main.c index 58baba3f..fd01b1b4 100644 --- a/host/utilities/bladeRF-power/src/main.c +++ b/host/utilities/bladeRF-power/src/main.c @@ -91,7 +91,13 @@ int main(int argc, char *argv[]) NUM_FREQ_SUFFIXES, &ok); printf("Frequency: %" PRIu64 "\n", test.frequency); break; - + case 'b': + test.bias_tee = str2bool(optarg, &ok); + if (!ok) { + fprintf(stderr, "Invalid bias tee value: %s\n", optarg); + return -1; + } + break; case 't': case 'r': if (test.direction != DIRECTION_UNSET) { diff --git a/host/utilities/bladeRF-power/src/window.c b/host/utilities/bladeRF-power/src/window.c index b887dae1..d93b65a8 100644 --- a/host/utilities/bladeRF-power/src/window.c +++ b/host/utilities/bladeRF-power/src/window.c @@ -96,6 +96,7 @@ void update_window(WINDOW *win, struct test_params *test) { test->direction == BLADERF_TX ? "TX" : "RX", test->channel); mvwprintw(win, start_y++, 1, "Gain Calibration: %s\n", test->gain_cal_enabled ? "enabled" : "disabled"); mvwprintw(win, start_y++, 1, "Automatic Gain Control: %s\n", test->gain_mode == BLADERF_GAIN_MGC ? "disabled" : "enabled"); + mvwprintw(win, start_y++, 1, "Biastee Control: %s\n", test->bias_tee ? "enabled": "disabled"); mvwprintw(win, start_y++, 1, "Sample Rate: %7.3f %sHz\n", uint64_to_eng_double(test->samp_rate).value, uint64_to_eng_double(test->samp_rate).unit); @@ -138,7 +139,7 @@ void update_window(WINDOW *win, struct test_params *test) { } } - mvwprintw(win, maxy-2, 1, "Keys: [q] Quit, [h/l] Frequency, [j/k] Gain, [c] Toggle Calibration, [a] Toggle AGC, [i] Cal info, [m] Toggle messages\n"); + mvwprintw(win, maxy-2, 1, "Keys: [q] Quit, [h/l] Frequency, [j/k] Gain, [c] Toggle Calibration, [a] Toggle AGC, [b] Toggle Biastee, [i] Cal info, [m] Toggle messages\n"); box(win, 0, 0); if (maxy < MIN_LINES) { From 545f73c5f1c5b31293a0ae21123fa7cd821453b6 Mon Sep 17 00:00:00 2001 From: Robert Ghilduta Date: Tue, 13 May 2025 04:37:12 -0700 Subject: [PATCH 07/35] fx3_firmware: include major update in CHANGELOG --- fx3_firmware/CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/fx3_firmware/CHANGELOG b/fx3_firmware/CHANGELOG index 6783e83c..50699054 100644 --- a/fx3_firmware/CHANGELOG +++ b/fx3_firmware/CHANGELOG @@ -7,6 +7,7 @@ hosted on GitHub: https://github.com/nuand/bladeRF v2.6.0 (2025-05-06) -------------------------------- + * Increase GPIF buffer size for increase performance * Fixed missing break in BLADE_USB_CMD_QUERY_FPGA_SOURCE command handling * Improved FX3 SDK setup instructions in README From bbdfbe1760254381e45786a19a52a957a3a58f07 Mon Sep 17 00:00:00 2001 From: Robert Ghilduta Date: Wed, 14 May 2025 01:22:16 -0700 Subject: [PATCH 08/35] fsk: bump submodule to include build library fix --- host/utilities/bladeRF-fsk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/utilities/bladeRF-fsk b/host/utilities/bladeRF-fsk index b60b1213..43276ad2 160000 --- a/host/utilities/bladeRF-fsk +++ b/host/utilities/bladeRF-fsk @@ -1 +1 @@ -Subproject commit b60b121377a5632cd48a03647028a0a45cff7d45 +Subproject commit 43276ad2b641287018ab502a5eea1d315e8a9ac7 From a59d95fc803015894b675b2fb32f9156eed2b114 Mon Sep 17 00:00:00 2001 From: Ryan Thompson Date: Thu, 15 May 2025 14:52:12 -0500 Subject: [PATCH 09/35] host: fsk submodule init on make --- host/utilities/CMakeLists.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/host/utilities/CMakeLists.txt b/host/utilities/CMakeLists.txt index dec80c68..2bfc2804 100644 --- a/host/utilities/CMakeLists.txt +++ b/host/utilities/CMakeLists.txt @@ -1,5 +1,29 @@ cmake_minimum_required(VERSION 3.10...3.27) +if(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bladeRF-fsk/c) + message(STATUS "bladeRF-fsk: Attempting to initialize missing submodule") + + find_package(Git QUIET) + + if(Git_FOUND) + execute_process( + COMMAND ${Git_EXECUTABLE} submodule init + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + ) + execute_process( + COMMAND ${Git_EXECUTABLE} submodule update + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + ) + endif() +endif() + +if(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bladeRF-fsk/c) + message(FATAL_ERROR "Directory ${CMAKE_CURRENT_SOURCE_DIR}/bladeRF-fsk was not found. " + "It appears that this submodule has not been properly " + "initialized. Please run 'git submodule init' and " + "'git submodule update', and then re-run cmake.") +endif() + add_subdirectory(bladeRF-cli) add_subdirectory(bladeRF-update) if(NOT MSVC) From 8931d475f30b911b27308a668cb02408325c383b Mon Sep 17 00:00:00 2001 From: Ryan Thompson Date: Thu, 15 May 2025 21:12:43 -0500 Subject: [PATCH 10/35] host: add ifdef for array size macro --- host/common/include/host_config.h.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/host/common/include/host_config.h.in b/host/common/include/host_config.h.in index 844946dd..fc94a777 100644 --- a/host/common/include/host_config.h.in +++ b/host/common/include/host_config.h.in @@ -316,7 +316,9 @@ /******************************************************************************* * Miscellaneous utility macros ******************************************************************************/ +#ifndef ARRAY_SIZE #define ARRAY_SIZE(n) (sizeof(n) / sizeof(n[0])) +#endif /** * GCC 7+ warns on implicit fallthroughs in switch statements From cd29f93a587c0d9f32b26d41e09f1193d8ab89b3 Mon Sep 17 00:00:00 2001 From: Robert Ghilduta Date: Thu, 15 May 2025 02:15:54 -0700 Subject: [PATCH 11/35] libladeRF: LTO fix Fixes libbladeRF LTO compilation error cmake -DCMAKE_C_FLAGS="-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" -DCMAKE_BUILD_TYPE=Release .. --- fpga_common/include/ad936x.h | 751 +----------------- host/CMakeLists.txt | 1 + .../0001-0bba46e-nuand-modifications.patch | 9 + 3 files changed, 12 insertions(+), 749 deletions(-) diff --git a/fpga_common/include/ad936x.h b/fpga_common/include/ad936x.h index 5fd43e73..38d0ea9a 100644 --- a/fpga_common/include/ad936x.h +++ b/fpga_common/include/ad936x.h @@ -29,6 +29,8 @@ #include #include +#include + /** * The purpose of this header file is to allow the use of libad9361 without * including all of the unnecessary defines, etc, used during compilation. @@ -46,15 +48,6 @@ * From common.h ******************************************************************************/ -struct clk_onecell_data { - struct clk **clks; - uint32_t clk_num; -}; - -/****************************************************************************** - * From ad9361.h - ******************************************************************************/ - #define AD936X_REG_TX1_OUT_1_PHASE_CORR 0x08E #define AD936X_REG_TX1_OUT_1_GAIN_CORR 0x08F #define AD936X_REG_TX2_OUT_1_PHASE_CORR 0x090 @@ -98,681 +91,6 @@ struct clk_onecell_data { #define AD936X_CNT(x) ((((x)-1) & 0x7) << 12) #define AD936X_ADDR(x) ((x)&0x3FF) -enum dev_id { ID_AD9361, ID_AD9364, ID_AD9363A }; - -enum ad9361_clocks { - BB_REFCLK, - RX_REFCLK, - TX_REFCLK, - BBPLL_CLK, - ADC_CLK, - R2_CLK, - R1_CLK, - CLKRF_CLK, - RX_SAMPL_CLK, - DAC_CLK, - T2_CLK, - T1_CLK, - CLKTF_CLK, - TX_SAMPL_CLK, - RX_RFPLL_INT, - TX_RFPLL_INT, - RX_RFPLL_DUMMY, - TX_RFPLL_DUMMY, - RX_RFPLL, - TX_RFPLL, - NUM_AD9361_CLKS, - EXT_REF_CLK, -}; - -enum rx_gain_table_name { - TBL_200_1300_MHZ, - TBL_1300_4000_MHZ, - TBL_4000_6000_MHZ, - RXGAIN_TBLS_END, -}; - -enum rx_gain_table_type { - RXGAIN_FULL_TBL, - RXGAIN_SPLIT_TBL, -}; - -struct rx_gain_info { - enum rx_gain_table_type tbl_type; - int32_t starting_gain_db; - int32_t max_gain_db; - int32_t gain_step_db; - int32_t max_idx; - int32_t idx_step_offset; -}; - -enum ad9361_pdata_rx_freq { - BBPLL_FREQ, - ADC_FREQ, - R2_FREQ, - R1_FREQ, - CLKRF_FREQ, - RX_SAMPL_FREQ, - NUM_RX_CLOCKS, -}; - -enum ad9361_pdata_tx_freq { - IGNORE_FREQ, - DAC_FREQ, - T2_FREQ, - T1_FREQ, - CLKTF_FREQ, - TX_SAMPL_FREQ, - NUM_TX_CLOCKS, -}; - -struct ad9361_fastlock_entry { - //#define FASTLOOK_INIT 1 - uint8_t flags; - uint8_t alc_orig; - uint8_t alc_written; -}; - -struct ad9361_fastlock { - uint8_t save_profile; - uint8_t current_profile[2]; - struct ad9361_fastlock_entry entry[2][8]; -}; - -enum ad9361_bist_mode { - BIST_DISABLE, - BIST_INJ_TX, - BIST_INJ_RX, -}; - -enum ad9361_clkout { - CLKOUT_DISABLE, - BUFFERED_XTALN_DCXO, - ADC_CLK_DIV_2, - ADC_CLK_DIV_3, - ADC_CLK_DIV_4, - ADC_CLK_DIV_8, - ADC_CLK_DIV_16, -}; - -enum rf_gain_ctrl_mode { - RF_GAIN_MGC, - RF_GAIN_FASTATTACK_AGC, - RF_GAIN_SLOWATTACK_AGC, - RF_GAIN_HYBRID_AGC -}; - -enum f_agc_target_gain_index_type { - MAX_GAIN, - SET_GAIN, - OPTIMIZED_GAIN, - NO_GAIN_CHANGE, -}; - -enum rssi_restart_mode { - AGC_IN_FAST_ATTACK_MODE_LOCKS_THE_GAIN, - EN_AGC_PIN_IS_PULLED_HIGH, - ENTERS_RX_MODE, - GAIN_CHANGE_OCCURS, - SPI_WRITE_TO_REGISTER, - GAIN_CHANGE_OCCURS_OR_EN_AGC_PIN_PULLED_HIGH, -}; - -struct rssi_control { - enum rssi_restart_mode restart_mode; - bool rssi_unit_is_rx_samples; - uint32_t rssi_delay; - uint32_t rssi_wait; - uint32_t rssi_duration; -}; - -struct port_control { - uint8_t pp_conf[3]; - uint8_t rx_clk_data_delay; - uint8_t tx_clk_data_delay; - uint8_t digital_io_ctrl; - uint8_t lvds_bias_ctrl; - uint8_t lvds_invert[2]; - uint8_t clk_out_drive; - uint8_t dataclk_drive; - uint8_t data_port_drive; - uint8_t clk_out_slew; - uint8_t dataclk_slew; - uint8_t data_port_slew; -}; - -struct ctrl_outs_control { - uint8_t index; - uint8_t en_mask; -}; - -struct elna_control { - uint16_t gain_mdB; - uint16_t bypass_loss_mdB; - uint32_t settling_delay_ns; - bool elna_1_control_en; - bool elna_2_control_en; - bool elna_in_gaintable_all_index_en; -}; - -struct auxadc_control { - int8_t offset; - uint32_t temp_time_inteval_ms; - uint32_t temp_sensor_decimation; - bool periodic_temp_measuremnt; - uint32_t auxadc_clock_rate; - uint32_t auxadc_decimation; -}; - -struct auxdac_control { - uint16_t dac1_default_value; - uint16_t dac2_default_value; - bool auxdac_manual_mode_en; - bool dac1_in_rx_en; - bool dac1_in_tx_en; - bool dac1_in_alert_en; - bool dac2_in_rx_en; - bool dac2_in_tx_en; - bool dac2_in_alert_en; - uint8_t dac1_rx_delay_us; - uint8_t dac1_tx_delay_us; - uint8_t dac2_rx_delay_us; - uint8_t dac2_tx_delay_us; -}; - -struct gpo_control { - bool gpo0_inactive_state_high_en; - bool gpo1_inactive_state_high_en; - bool gpo2_inactive_state_high_en; - bool gpo3_inactive_state_high_en; - bool gpo0_slave_rx_en; - bool gpo0_slave_tx_en; - bool gpo1_slave_rx_en; - bool gpo1_slave_tx_en; - bool gpo2_slave_rx_en; - bool gpo2_slave_tx_en; - bool gpo3_slave_rx_en; - bool gpo3_slave_tx_en; - uint8_t gpo0_rx_delay_us; - uint8_t gpo0_tx_delay_us; - uint8_t gpo1_rx_delay_us; - uint8_t gpo1_tx_delay_us; - uint8_t gpo2_rx_delay_us; - uint8_t gpo2_tx_delay_us; - uint8_t gpo3_rx_delay_us; - uint8_t gpo3_tx_delay_us; -}; - -struct tx_monitor_control { - bool tx_mon_track_en; - bool one_shot_mode_en; - uint32_t low_high_gain_threshold_mdB; - uint8_t low_gain_dB; - uint8_t high_gain_dB; - uint16_t tx_mon_delay; - uint16_t tx_mon_duration; - uint8_t tx1_mon_front_end_gain; - uint8_t tx2_mon_front_end_gain; - uint8_t tx1_mon_lo_cm; - uint8_t tx2_mon_lo_cm; -}; - -struct gain_control { - enum rf_gain_ctrl_mode rx1_mode; - enum rf_gain_ctrl_mode rx2_mode; - uint8_t adc_ovr_sample_size; - uint8_t adc_small_overload_thresh; - uint8_t adc_large_overload_thresh; - uint16_t lmt_overload_high_thresh; - uint16_t lmt_overload_low_thresh; - uint16_t dec_pow_measuremnt_duration; - uint8_t low_power_thresh; - bool dig_gain_en; - uint8_t max_dig_gain; - bool mgc_rx1_ctrl_inp_en; - bool mgc_rx2_ctrl_inp_en; - uint8_t mgc_inc_gain_step; - uint8_t mgc_dec_gain_step; - uint8_t mgc_split_table_ctrl_inp_gain_mode; - uint8_t agc_attack_delay_extra_margin_us; - uint8_t agc_outer_thresh_high; - uint8_t agc_outer_thresh_high_dec_steps; - uint8_t agc_inner_thresh_high; - uint8_t agc_inner_thresh_high_dec_steps; - uint8_t agc_inner_thresh_low; - uint8_t agc_inner_thresh_low_inc_steps; - uint8_t agc_outer_thresh_low; - uint8_t agc_outer_thresh_low_inc_steps; - uint8_t adc_small_overload_exceed_counter; - uint8_t adc_large_overload_exceed_counter; - uint8_t adc_large_overload_inc_steps; - bool adc_lmt_small_overload_prevent_gain_inc; - uint8_t lmt_overload_large_exceed_counter; - uint8_t lmt_overload_small_exceed_counter; - uint8_t lmt_overload_large_inc_steps; - uint8_t dig_saturation_exceed_counter; - uint8_t dig_gain_step_size; - bool sync_for_gain_counter_en; - uint32_t gain_update_interval_us; - bool immed_gain_change_if_large_adc_overload; - bool immed_gain_change_if_large_lmt_overload; - uint32_t f_agc_dec_pow_measuremnt_duration; - uint32_t f_agc_state_wait_time_ns; - bool f_agc_allow_agc_gain_increase; - uint8_t f_agc_lp_thresh_increment_time; - uint8_t f_agc_lp_thresh_increment_steps; - uint8_t f_agc_lock_level; - bool f_agc_lock_level_lmt_gain_increase_en; - uint8_t f_agc_lock_level_gain_increase_upper_limit; - uint8_t f_agc_lpf_final_settling_steps; - uint8_t f_agc_lmt_final_settling_steps; - uint8_t f_agc_final_overrange_count; - bool f_agc_gain_increase_after_gain_lock_en; - enum f_agc_target_gain_index_type f_agc_gain_index_type_after_exit_rx_mode; - bool f_agc_use_last_lock_level_for_set_gain_en; - uint8_t f_agc_optimized_gain_offset; - bool f_agc_rst_gla_stronger_sig_thresh_exceeded_en; - uint8_t f_agc_rst_gla_stronger_sig_thresh_above_ll; - bool f_agc_rst_gla_engergy_lost_sig_thresh_exceeded_en; - bool f_agc_rst_gla_engergy_lost_goto_optim_gain_en; - uint8_t f_agc_rst_gla_engergy_lost_sig_thresh_below_ll; - uint8_t f_agc_energy_lost_stronger_sig_gain_lock_exit_cnt; - bool f_agc_rst_gla_large_adc_overload_en; - bool f_agc_rst_gla_large_lmt_overload_en; - bool f_agc_rst_gla_en_agc_pulled_high_en; - enum f_agc_target_gain_index_type f_agc_rst_gla_if_en_agc_pulled_high_mode; - uint8_t f_agc_power_measurement_duration_in_state5; -}; - -struct ad9361_phy_platform_data { - bool rx2tx2; - bool fdd; - bool fdd_independent_mode; - bool split_gt; - bool use_extclk; - bool ensm_pin_pulse_mode; - bool ensm_pin_ctrl; - bool debug_mode; - bool tdd_use_dual_synth; - bool tdd_skip_vco_cal; - bool use_ext_rx_lo; - bool use_ext_tx_lo; - bool rx1rx2_phase_inversion_en; - bool qec_tracking_slow_mode_en; - uint8_t dc_offset_update_events; - uint8_t dc_offset_attenuation_high; - uint8_t dc_offset_attenuation_low; - uint8_t rf_dc_offset_count_high; - uint8_t rf_dc_offset_count_low; - uint8_t dig_interface_tune_skipmode; - uint8_t dig_interface_tune_fir_disable; - uint32_t dcxo_coarse; - uint32_t dcxo_fine; - uint32_t rf_rx_input_sel; - uint32_t rf_tx_output_sel; - uint32_t rx1tx1_mode_use_rx_num; - uint32_t rx1tx1_mode_use_tx_num; - uint32_t rx_path_clks[NUM_RX_CLOCKS]; - uint32_t tx_path_clks[NUM_TX_CLOCKS]; - uint32_t trx_synth_max_fref; - uint64_t rx_synth_freq; - uint64_t tx_synth_freq; - uint32_t rf_rx_bandwidth_Hz; - uint32_t rf_tx_bandwidth_Hz; - int32_t tx_atten; - bool update_tx_gain_via_alert; - uint32_t rx_fastlock_delay_ns; - uint32_t tx_fastlock_delay_ns; - bool trx_fastlock_pinctrl_en[2]; - enum ad9361_clkout ad9361_clkout_mode; - struct gain_control gain_ctrl; - struct rssi_control rssi_ctrl; - struct port_control port_ctrl; - struct ctrl_outs_control ctrl_outs_ctrl; - struct elna_control elna_ctrl; - struct auxadc_control auxadc_ctrl; - struct auxdac_control auxdac_ctrl; - struct gpo_control gpo_ctrl; - struct tx_monitor_control txmon_ctrl; - int32_t gpio_resetb; - int32_t gpio_sync; - int32_t gpio_cal_sw1; - int32_t gpio_cal_sw2; -}; - -struct ad9361_rf_phy { - enum dev_id dev_sel; - uint8_t id_no; - struct spi_device *spi; - struct gpio_device *gpio; - struct clk *clk_refin; - struct clk *clks[NUM_AD9361_CLKS]; - struct refclk_scale *ref_clk_scale[NUM_AD9361_CLKS]; - struct clk_onecell_data clk_data; - uint32_t (*ad9361_rfpll_ext_recalc_rate)(struct refclk_scale *clk_priv); - int32_t (*ad9361_rfpll_ext_round_rate)(struct refclk_scale *clk_priv, - uint32_t rate); - int32_t (*ad9361_rfpll_ext_set_rate)(struct refclk_scale *clk_priv, - uint32_t rate); - struct ad9361_phy_platform_data *pdata; - uint8_t prev_ensm_state; - uint8_t curr_ensm_state; - uint8_t cached_rx_rfpll_div; - uint8_t cached_tx_rfpll_div; - struct rx_gain_info rx_gain[RXGAIN_TBLS_END]; - enum rx_gain_table_name current_table; - bool ensm_pin_ctl_en; - bool auto_cal_en; - uint64_t last_tx_quad_cal_freq; - uint32_t last_tx_quad_cal_phase; - uint64_t current_tx_lo_freq; - uint64_t current_rx_lo_freq; - bool current_tx_use_tdd_table; - bool current_rx_use_tdd_table; - uint32_t flags; - uint32_t cal_threshold_freq; - uint32_t current_rx_bw_Hz; - uint32_t current_tx_bw_Hz; - uint32_t rxbbf_div; - uint32_t rate_governor; - bool bypass_rx_fir; - bool bypass_tx_fir; - bool rx_eq_2tx; - bool filt_valid; - uint32_t filt_rx_path_clks[NUM_RX_CLOCKS]; - uint32_t filt_tx_path_clks[NUM_TX_CLOCKS]; - uint32_t filt_rx_bw_Hz; - uint32_t filt_tx_bw_Hz; - uint8_t tx_fir_int; - uint8_t tx_fir_ntaps; - uint8_t rx_fir_dec; - uint8_t rx_fir_ntaps; - uint8_t agc_mode[2]; - bool rfdc_track_en; - bool bbdc_track_en; - bool quad_track_en; - bool txmon_tdd_en; - uint16_t auxdac1_value; - uint16_t auxdac2_value; - uint32_t tx1_atten_cached; - uint32_t tx2_atten_cached; - struct ad9361_fastlock fastlock; - struct axiadc_converter *adc_conv; - struct axiadc_state *adc_state; - int32_t bist_loopback_mode; - enum ad9361_bist_mode bist_prbs_mode; - enum ad9361_bist_mode bist_tone_mode; - uint32_t bist_tone_freq_Hz; - uint32_t bist_tone_level_dB; - uint32_t bist_tone_mask; - bool bbpll_initialized; -}; - -struct rf_rx_gain { - uint32_t ant; - int32_t gain_db; - uint32_t fgt_lmt_index; - uint32_t lmt_gain; - uint32_t lpf_gain; - uint32_t digital_gain; - uint32_t lna_index; - uint32_t tia_index; - uint32_t mixer_index; -}; - -struct rf_rssi { - uint32_t ant; - uint32_t symbol; - uint32_t preamble; - int32_t multiplier; - uint8_t duration; -}; - -int32_t ad9361_get_rx_gain(struct ad9361_rf_phy *phy, - uint32_t rx_id, - struct rf_rx_gain *rx_gain); -int32_t ad9361_spi_read(struct spi_device *spi, uint32_t reg); -int32_t ad9361_spi_write(struct spi_device *spi, uint32_t reg, uint32_t val); -void ad9361_get_bist_loopback(struct ad9361_rf_phy *phy, int32_t *mode); -int32_t ad9361_bist_loopback(struct ad9361_rf_phy *phy, int32_t mode); - -/****************************************************************************** - * From ad9361_api.h - ******************************************************************************/ - -typedef struct { - enum dev_id dev_sel; - uint8_t id_no; - uint32_t reference_clk_rate; - uint8_t two_rx_two_tx_mode_enable; - uint8_t one_rx_one_tx_mode_use_rx_num; - uint8_t one_rx_one_tx_mode_use_tx_num; - uint8_t frequency_division_duplex_mode_enable; - uint8_t frequency_division_duplex_independent_mode_enable; - uint8_t tdd_use_dual_synth_mode_enable; - uint8_t tdd_skip_vco_cal_enable; - uint32_t tx_fastlock_delay_ns; - uint32_t rx_fastlock_delay_ns; - uint8_t rx_fastlock_pincontrol_enable; - uint8_t tx_fastlock_pincontrol_enable; - uint8_t external_rx_lo_enable; - uint8_t external_tx_lo_enable; - uint8_t dc_offset_tracking_update_event_mask; - uint8_t dc_offset_attenuation_high_range; - uint8_t dc_offset_attenuation_low_range; - uint8_t dc_offset_count_high_range; - uint8_t dc_offset_count_low_range; - uint8_t split_gain_table_mode_enable; - uint32_t trx_synthesizer_target_fref_overwrite_hz; - uint8_t qec_tracking_slow_mode_enable; - uint8_t ensm_enable_pin_pulse_mode_enable; - uint8_t ensm_enable_txnrx_control_enable; - uint64_t rx_synthesizer_frequency_hz; - uint64_t tx_synthesizer_frequency_hz; - uint32_t rx_path_clock_frequencies[6]; - uint32_t tx_path_clock_frequencies[6]; - uint32_t rf_rx_bandwidth_hz; - uint32_t rf_tx_bandwidth_hz; - uint32_t rx_rf_port_input_select; - uint32_t tx_rf_port_input_select; - int32_t tx_attenuation_mdB; - uint8_t update_tx_gain_in_alert_enable; - uint8_t xo_disable_use_ext_refclk_enable; - uint32_t dcxo_coarse_and_fine_tune[2]; - uint32_t clk_output_mode_select; - uint8_t gc_rx1_mode; - uint8_t gc_rx2_mode; - uint8_t gc_adc_large_overload_thresh; - uint8_t gc_adc_ovr_sample_size; - uint8_t gc_adc_small_overload_thresh; - uint16_t gc_dec_pow_measurement_duration; - uint8_t gc_dig_gain_enable; - uint16_t gc_lmt_overload_high_thresh; - uint16_t gc_lmt_overload_low_thresh; - uint8_t gc_low_power_thresh; - uint8_t gc_max_dig_gain; - uint8_t mgc_dec_gain_step; - uint8_t mgc_inc_gain_step; - uint8_t mgc_rx1_ctrl_inp_enable; - uint8_t mgc_rx2_ctrl_inp_enable; - uint8_t mgc_split_table_ctrl_inp_gain_mode; - uint8_t agc_adc_large_overload_exceed_counter; - uint8_t agc_adc_large_overload_inc_steps; - uint8_t agc_adc_lmt_small_overload_prevent_gain_inc_enable; - uint8_t agc_adc_small_overload_exceed_counter; - uint8_t agc_dig_gain_step_size; - uint8_t agc_dig_saturation_exceed_counter; - uint32_t agc_gain_update_interval_us; - uint8_t agc_immed_gain_change_if_large_adc_overload_enable; - uint8_t agc_immed_gain_change_if_large_lmt_overload_enable; - uint8_t agc_inner_thresh_high; - uint8_t agc_inner_thresh_high_dec_steps; - uint8_t agc_inner_thresh_low; - uint8_t agc_inner_thresh_low_inc_steps; - uint8_t agc_lmt_overload_large_exceed_counter; - uint8_t agc_lmt_overload_large_inc_steps; - uint8_t agc_lmt_overload_small_exceed_counter; - uint8_t agc_outer_thresh_high; - uint8_t agc_outer_thresh_high_dec_steps; - uint8_t agc_outer_thresh_low; - uint8_t agc_outer_thresh_low_inc_steps; - uint32_t agc_attack_delay_extra_margin_us; - uint8_t agc_sync_for_gain_counter_enable; - uint32_t fagc_dec_pow_measuremnt_duration; - uint32_t fagc_state_wait_time_ns; - uint8_t fagc_allow_agc_gain_increase; - uint32_t fagc_lp_thresh_increment_time; - uint32_t fagc_lp_thresh_increment_steps; - uint8_t fagc_lock_level_lmt_gain_increase_en; - uint32_t fagc_lock_level_gain_increase_upper_limit; - uint32_t fagc_lpf_final_settling_steps; - uint32_t fagc_lmt_final_settling_steps; - uint32_t fagc_final_overrange_count; - uint8_t fagc_gain_increase_after_gain_lock_en; - uint32_t fagc_gain_index_type_after_exit_rx_mode; - uint8_t fagc_use_last_lock_level_for_set_gain_en; - uint8_t fagc_rst_gla_stronger_sig_thresh_exceeded_en; - uint32_t fagc_optimized_gain_offset; - uint32_t fagc_rst_gla_stronger_sig_thresh_above_ll; - uint8_t fagc_rst_gla_engergy_lost_sig_thresh_exceeded_en; - uint8_t fagc_rst_gla_engergy_lost_goto_optim_gain_en; - uint32_t fagc_rst_gla_engergy_lost_sig_thresh_below_ll; - uint32_t fagc_energy_lost_stronger_sig_gain_lock_exit_cnt; - uint8_t fagc_rst_gla_large_adc_overload_en; - uint8_t fagc_rst_gla_large_lmt_overload_en; - uint8_t fagc_rst_gla_en_agc_pulled_high_en; - uint32_t fagc_rst_gla_if_en_agc_pulled_high_mode; - uint32_t fagc_power_measurement_duration_in_state5; - uint32_t rssi_delay; - uint32_t rssi_duration; - uint8_t rssi_restart_mode; - uint8_t rssi_unit_is_rx_samples_enable; - uint32_t rssi_wait; - uint32_t aux_adc_decimation; - uint32_t aux_adc_rate; - uint8_t aux_dac_manual_mode_enable; - uint32_t aux_dac1_default_value_mV; - uint8_t aux_dac1_active_in_rx_enable; - uint8_t aux_dac1_active_in_tx_enable; - uint8_t aux_dac1_active_in_alert_enable; - uint32_t aux_dac1_rx_delay_us; - uint32_t aux_dac1_tx_delay_us; - uint32_t aux_dac2_default_value_mV; - uint8_t aux_dac2_active_in_rx_enable; - uint8_t aux_dac2_active_in_tx_enable; - uint8_t aux_dac2_active_in_alert_enable; - uint32_t aux_dac2_rx_delay_us; - uint32_t aux_dac2_tx_delay_us; - uint32_t temp_sense_decimation; - uint16_t temp_sense_measurement_interval_ms; - int8_t temp_sense_offset_signed; - uint8_t temp_sense_periodic_measurement_enable; - uint8_t ctrl_outs_enable_mask; - uint8_t ctrl_outs_index; - uint32_t elna_settling_delay_ns; - uint32_t elna_gain_mdB; - uint32_t elna_bypass_loss_mdB; - uint8_t elna_rx1_gpo0_control_enable; - uint8_t elna_rx2_gpo1_control_enable; - uint8_t elna_gaintable_all_index_enable; - uint8_t digital_interface_tune_skip_mode; - uint8_t digital_interface_tune_fir_disable; - uint8_t pp_tx_swap_enable; - uint8_t pp_rx_swap_enable; - uint8_t tx_channel_swap_enable; - uint8_t rx_channel_swap_enable; - uint8_t rx_frame_pulse_mode_enable; - uint8_t two_t_two_r_timing_enable; - uint8_t invert_data_bus_enable; - uint8_t invert_data_clk_enable; - uint8_t fdd_alt_word_order_enable; - uint8_t invert_rx_frame_enable; - uint8_t fdd_rx_rate_2tx_enable; - uint8_t swap_ports_enable; - uint8_t single_data_rate_enable; - uint8_t lvds_mode_enable; - uint8_t half_duplex_mode_enable; - uint8_t single_port_mode_enable; - uint8_t full_port_enable; - uint8_t full_duplex_swap_bits_enable; - uint32_t delay_rx_data; - uint32_t rx_data_clock_delay; - uint32_t rx_data_delay; - uint32_t tx_fb_clock_delay; - uint32_t tx_data_delay; - uint32_t lvds_bias_mV; - uint8_t lvds_rx_onchip_termination_enable; - uint8_t rx1rx2_phase_inversion_en; - uint8_t lvds_invert1_control; - uint8_t lvds_invert2_control; - uint8_t clk_out_drive; - uint8_t dataclk_drive; - uint8_t data_port_drive; - uint8_t clk_out_slew; - uint8_t dataclk_slew; - uint8_t data_port_slew; - uint8_t gpo0_inactive_state_high_enable; - uint8_t gpo1_inactive_state_high_enable; - uint8_t gpo2_inactive_state_high_enable; - uint8_t gpo3_inactive_state_high_enable; - uint8_t gpo0_slave_rx_enable; - uint8_t gpo0_slave_tx_enable; - uint8_t gpo1_slave_rx_enable; - uint8_t gpo1_slave_tx_enable; - uint8_t gpo2_slave_rx_enable; - uint8_t gpo2_slave_tx_enable; - uint8_t gpo3_slave_rx_enable; - uint8_t gpo3_slave_tx_enable; - uint8_t gpo0_rx_delay_us; - uint8_t gpo0_tx_delay_us; - uint8_t gpo1_rx_delay_us; - uint8_t gpo1_tx_delay_us; - uint8_t gpo2_rx_delay_us; - uint8_t gpo2_tx_delay_us; - uint8_t gpo3_rx_delay_us; - uint8_t gpo3_tx_delay_us; - uint32_t low_high_gain_threshold_mdB; - uint32_t low_gain_dB; - uint32_t high_gain_dB; - uint8_t tx_mon_track_en; - uint8_t one_shot_mode_en; - uint32_t tx_mon_delay; - uint32_t tx_mon_duration; - uint32_t tx1_mon_front_end_gain; - uint32_t tx2_mon_front_end_gain; - uint32_t tx1_mon_lo_cm; - uint32_t tx2_mon_lo_cm; - int32_t gpio_resetb; - int32_t gpio_sync; - int32_t gpio_cal_sw1; - int32_t gpio_cal_sw2; - uint32_t (*ad9361_rfpll_ext_recalc_rate)(struct refclk_scale *clk_priv); - int32_t (*ad9361_rfpll_ext_round_rate)(struct refclk_scale *clk_priv, - uint32_t rate); - int32_t (*ad9361_rfpll_ext_set_rate)(struct refclk_scale *clk_priv, - uint32_t rate); -} AD9361_InitParam; - -typedef struct { - uint32_t rx; /* 1, 2, 3(both) */ - int32_t rx_gain; /* -12, -6, 0, 6 */ - uint32_t rx_dec; /* 1, 2, 4 */ - int16_t rx_coef[128]; - uint8_t rx_coef_size; - uint32_t rx_path_clks[6]; - uint32_t rx_bandwidth; -} AD9361_RXFIRConfig; - -typedef struct { - uint32_t tx; /* 1, 2, 3(both) */ - int32_t tx_gain; /* -6, 0 */ - uint32_t tx_int; /* 1, 2, 4 */ - int16_t tx_coef[128]; - uint8_t tx_coef_size; - uint32_t tx_path_clks[6]; - uint32_t tx_bandwidth; -} AD9361_TXFIRConfig; - #define AD936X_A_BALANCED 0 #define AD936X_B_BALANCED 1 #define AD936X_C_BALANCED 2 @@ -789,70 +107,5 @@ typedef struct { #define AD936X_TXA 0 #define AD936X_TXB 1 -int32_t ad9361_init(struct ad9361_rf_phy **ad9361_phy, - AD9361_InitParam *init_param, - void *userdata); -int32_t ad9361_deinit(struct ad9361_rf_phy *phy); -int32_t ad9361_set_rx_rf_gain(struct ad9361_rf_phy *phy, - uint8_t ch, - int32_t gain_db); -int32_t ad9361_set_rx_rf_bandwidth(struct ad9361_rf_phy *phy, - uint32_t bandwidth_hz); -int32_t ad9361_get_rx_rf_bandwidth(struct ad9361_rf_phy *phy, - uint32_t *bandwidth_hz); -int32_t ad9361_set_rx_sampling_freq(struct ad9361_rf_phy *phy, - uint32_t sampling_freq_hz); -int32_t ad9361_get_rx_sampling_freq(struct ad9361_rf_phy *phy, - uint32_t *sampling_freq_hz); -int32_t ad9361_set_rx_lo_freq(struct ad9361_rf_phy *phy, uint64_t lo_freq_hz); -int32_t ad9361_get_rx_lo_freq(struct ad9361_rf_phy *phy, uint64_t *lo_freq_hz); -int32_t ad9361_get_rx_rssi(struct ad9361_rf_phy *phy, - uint8_t ch, - struct rf_rssi *rssi); -int32_t ad9361_set_rx_gain_control_mode(struct ad9361_rf_phy *phy, - uint8_t ch, - uint8_t gc_mode); -int32_t ad9361_get_rx_gain_control_mode(struct ad9361_rf_phy *phy, - uint8_t ch, - uint8_t *gc_mode); -int32_t ad9361_set_rx_fir_config(struct ad9361_rf_phy *phy, - AD9361_RXFIRConfig fir_cfg); -int32_t ad9361_set_rx_fir_en_dis(struct ad9361_rf_phy *phy, uint8_t en_dis); -int32_t ad9361_set_rx_rf_port_input(struct ad9361_rf_phy *phy, uint32_t mode); -int32_t ad9361_get_rx_rf_port_input(struct ad9361_rf_phy *phy, uint32_t *mode); -int32_t ad9361_set_tx_attenuation(struct ad9361_rf_phy *phy, - uint8_t ch, - uint32_t attenuation_mdb); -int32_t ad9361_get_tx_attenuation(struct ad9361_rf_phy *phy, - uint8_t ch, - uint32_t *attenuation_mdb); -int32_t ad9361_set_tx_rf_bandwidth(struct ad9361_rf_phy *phy, - uint32_t bandwidth_hz); -int32_t ad9361_get_tx_rf_bandwidth(struct ad9361_rf_phy *phy, - uint32_t *bandwidth_hz); -int32_t ad9361_set_tx_sampling_freq(struct ad9361_rf_phy *phy, - uint32_t sampling_freq_hz); -int32_t ad9361_get_tx_sampling_freq(struct ad9361_rf_phy *phy, - uint32_t *sampling_freq_hz); -int32_t ad9361_set_tx_lo_freq(struct ad9361_rf_phy *phy, uint64_t lo_freq_hz); -int32_t ad9361_get_tx_lo_freq(struct ad9361_rf_phy *phy, uint64_t *lo_freq_hz); -int32_t ad9361_set_tx_fir_config(struct ad9361_rf_phy *phy, - AD9361_TXFIRConfig fir_cfg); -int32_t ad9361_set_tx_fir_en_dis(struct ad9361_rf_phy *phy, uint8_t en_dis); -int32_t ad9361_get_tx_rssi(struct ad9361_rf_phy *phy, - uint8_t ch, - uint32_t *rssi_db_x_1000); -int32_t ad9361_set_tx_rf_port_output(struct ad9361_rf_phy *phy, uint32_t mode); -int32_t ad9361_get_tx_rf_port_output(struct ad9361_rf_phy *phy, uint32_t *mode); -int32_t ad9361_get_temp(struct ad9361_rf_phy *phy); -int32_t ad9361_rx_fastlock_store(struct ad9361_rf_phy *phy, uint32_t profile); -int32_t ad9361_rx_fastlock_save(struct ad9361_rf_phy *phy, - uint32_t profile, - uint8_t *values); -int32_t ad9361_tx_fastlock_store(struct ad9361_rf_phy *phy, uint32_t profile); -int32_t ad9361_tx_fastlock_save(struct ad9361_rf_phy *phy, - uint32_t profile, - uint8_t *values); -int32_t ad9361_set_no_ch_mode(struct ad9361_rf_phy *phy, uint8_t no_ch_mode); #endif // AD936X_H_ diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt index f76cb32d..69aded1c 100644 --- a/host/CMakeLists.txt +++ b/host/CMakeLists.txt @@ -4,6 +4,7 @@ project(bladeRF C) ################################################################################ # Project configuration ################################################################################ +add_compile_definitions(NUAND_MODIFICATIONS=1) # All build output lands in this directory: set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/output) diff --git a/thirdparty/analogdevicesinc/no-OS_local/patches/0001-0bba46e-nuand-modifications.patch b/thirdparty/analogdevicesinc/no-OS_local/patches/0001-0bba46e-nuand-modifications.patch index 78ef06ee..bd81e2f5 100644 --- a/thirdparty/analogdevicesinc/no-OS_local/patches/0001-0bba46e-nuand-modifications.patch +++ b/thirdparty/analogdevicesinc/no-OS_local/patches/0001-0bba46e-nuand-modifications.patch @@ -492,6 +492,15 @@ index 77ffa44..ff5d7c5 100644 /* Set the Enable State Machine (ENSM) mode. */ int32_t ad9361_set_en_state_machine_mode (struct ad9361_rf_phy *phy, uint32_t mode); /* Get the Enable State Machine (ENSM) mode. */ +@@ -365,6 +381,8 @@ + int32_t ad9361_set_rx_rf_gain (struct ad9361_rf_phy *phy, uint8_t ch, int32_t gain_db); + /* Get current receive RF gain for the selected channel. */ + int32_t ad9361_get_rx_rf_gain (struct ad9361_rf_phy *phy, uint8_t ch, int32_t *gain_db); ++/* Get RFIC temperature */ ++int32_t ad9361_get_temp(struct ad9361_rf_phy *phy); + /* Set the RX RF bandwidth. */ + int32_t ad9361_set_rx_rf_bandwidth (struct ad9361_rf_phy *phy, uint32_t bandwidth_hz); + /* Get the RX RF bandwidth. */ diff --git a/ad9361/sw/ad9361_conv.c b/ad9361/sw/ad9361_conv.c index b20cb71..0491f91 100644 --- a/ad9361/sw/ad9361_conv.c From 85d8d4b22ba90ef30ed0043ca1b60f987e24485a Mon Sep 17 00:00:00 2001 From: Robert Ghilduta Date: Thu, 15 May 2025 02:53:01 -0700 Subject: [PATCH 12/35] hdl: add AD9361 and bladeRF 2.0 micro support headers to include path --- .../platforms/bladerf-micro/software/bladeRF_nios/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hdl/fpga/platforms/bladerf-micro/software/bladeRF_nios/Makefile b/hdl/fpga/platforms/bladerf-micro/software/bladeRF_nios/Makefile index ac99213a..bbfc42a9 100644 --- a/hdl/fpga/platforms/bladerf-micro/software/bladeRF_nios/Makefile +++ b/hdl/fpga/platforms/bladerf-micro/software/bladeRF_nios/Makefile @@ -36,7 +36,9 @@ LIBAD936X_DIR := ../../../../fpga/ip/analogdevicesinc/no_OS INC_DIRS += $(LIBAD936X_BUILDDIR) \ ../$(LIBAD936X_DIR)/include \ - ../../../../../../host/common/include + ../../../../../../host/common/include \ + ../../../../../../host/build/common/thirdparty/ad936x/ \ + ../../../../../../thirdparty/analogdevicesinc/no-OS_local/platform_bladerf2/ LIB_DIRS += $(LIBAD936X_BUILDDIR) LDDEPS += $(LIBAD936X_BUILDDIR)/libad936x.a From 611e9cbfb3b890b67e933e338f4b1afb4b3bf8fc Mon Sep 17 00:00:00 2001 From: Robert Ghilduta Date: Tue, 20 May 2025 00:19:40 -0700 Subject: [PATCH 13/35] debian: update RBFs and FX3 images --- debian/bladerf-firmware-fx3.postinst | 4 ++-- debian/bladerf-fpga-hostedx115.postinst | 4 ++-- debian/bladerf-fpga-hostedx40.postinst | 4 ++-- debian/bladerf-fpga-hostedxa4.postinst | 4 ++-- debian/bladerf-fpga-hostedxa5.postinst | 4 ++-- debian/bladerf-fpga-hostedxa9.postinst | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/debian/bladerf-firmware-fx3.postinst b/debian/bladerf-firmware-fx3.postinst index 26f2bf49..9a204660 100644 --- a/debian/bladerf-firmware-fx3.postinst +++ b/debian/bladerf-firmware-fx3.postinst @@ -1,7 +1,7 @@ #!/bin/sh -e -UPSTREAM='https://www.nuand.com/fx3/bladeRF_fw_v2.4.0.img' -CHECKSUM='337f570f2e3fdb26abde0f0765196d92' +UPSTREAM='https://www.nuand.com/fx3/bladeRF_fw_v2.6.0.img' +CHECKSUM='7cc51b4eedebf54dd01be83745d1c59f' DATAFILE='/usr/share/Nuand/bladeRF/bladeRF_fw.img' DESCRIPT='firmware' MYNAMEIS='bladerf-firmware-fx3' diff --git a/debian/bladerf-fpga-hostedx115.postinst b/debian/bladerf-fpga-hostedx115.postinst index 447c7e5f..9f473b9b 100644 --- a/debian/bladerf-fpga-hostedx115.postinst +++ b/debian/bladerf-fpga-hostedx115.postinst @@ -1,7 +1,7 @@ #!/bin/sh -e -UPSTREAM='https://www.nuand.com/fpga/v0.14.0/hostedx115.rbf' -CHECKSUM='94ee5c7f68abe5c3392202246789fedd' +UPSTREAM='https://www.nuand.com/fpga/v0.16.0/hostedx115.rbf' +CHECKSUM='a7f25be8abdab3835e734599eb846ea4' DATAFILE='/usr/share/Nuand/bladeRF/hostedx115.rbf' DESCRIPT='FPGA bitstream' MYNAMEIS='bladerf-fpga-hostedx115' diff --git a/debian/bladerf-fpga-hostedx40.postinst b/debian/bladerf-fpga-hostedx40.postinst index 1512dbda..d11baad6 100644 --- a/debian/bladerf-fpga-hostedx40.postinst +++ b/debian/bladerf-fpga-hostedx40.postinst @@ -1,7 +1,7 @@ #!/bin/sh -e -UPSTREAM='https://www.nuand.com/fpga/v0.14.0/hostedx40.rbf' -CHECKSUM='25f402b3734c9aa0d37db9531f93335c' +UPSTREAM='https://www.nuand.com/fpga/v0.16.0/hostedx40.rbf' +CHECKSUM='f3d0e55aa4cae485df6d3c20004b7742' DATAFILE='/usr/share/Nuand/bladeRF/hostedx40.rbf' DESCRIPT='FPGA bitstream' MYNAMEIS='bladerf-fpga-hostedx40' diff --git a/debian/bladerf-fpga-hostedxa4.postinst b/debian/bladerf-fpga-hostedxa4.postinst index 94a42bd2..46845c2f 100644 --- a/debian/bladerf-fpga-hostedxa4.postinst +++ b/debian/bladerf-fpga-hostedxa4.postinst @@ -1,7 +1,7 @@ #!/bin/sh -e -UPSTREAM='https://www.nuand.com/fpga/v0.14.0/hostedxA4.rbf' -CHECKSUM='c24af70cf56b13123295125a22d5e921' +UPSTREAM='https://www.nuand.com/fpga/v0.16.0/hostedxA4.rbf' +CHECKSUM='276a74b748d699a9fc348babd34af19c' DATAFILE='/usr/share/Nuand/bladeRF/hostedxA4.rbf' DESCRIPT='FPGA bitstream' MYNAMEIS='bladerf-fpga-hostedxa4' diff --git a/debian/bladerf-fpga-hostedxa5.postinst b/debian/bladerf-fpga-hostedxa5.postinst index 86e1b43b..1ad7a1cd 100644 --- a/debian/bladerf-fpga-hostedxa5.postinst +++ b/debian/bladerf-fpga-hostedxa5.postinst @@ -1,7 +1,7 @@ #!/bin/sh -e -UPSTREAM='https://www.nuand.com/fpga/v0.14.0/hostedxA5.rbf' -CHECKSUM='ae6391cc3fd467bbb07868450612ce17' +UPSTREAM='https://www.nuand.com/fpga/v0.16.0/hostedxA5.rbf' +CHECKSUM='be0909dc27b48a08c54db33675130f27' DATAFILE='/usr/share/Nuand/bladeRF/hostedxA5.rbf' DESCRIPT='FPGA bitstream' MYNAMEIS='bladerf-fpga-hostedxa5' diff --git a/debian/bladerf-fpga-hostedxa9.postinst b/debian/bladerf-fpga-hostedxa9.postinst index 25100b42..50938bb6 100644 --- a/debian/bladerf-fpga-hostedxa9.postinst +++ b/debian/bladerf-fpga-hostedxa9.postinst @@ -1,7 +1,7 @@ #!/bin/sh -e -UPSTREAM='https://www.nuand.com/fpga/v0.14.0/hostedxA9.rbf' -CHECKSUM='7dfe8c32f260d43a14b9583375a1a6eb' +UPSTREAM='https://www.nuand.com/fpga/v0.16.0/hostedxA9.rbf' +CHECKSUM='1ab3bc8bdcf16a5f0ddf3fcdbaa6556b' DATAFILE='/usr/share/Nuand/bladeRF/hostedxA9.rbf' DESCRIPT='FPGA bitstream' MYNAMEIS='bladerf-fpga-hostedxa9' From 6185546fa9810f03a88fb01cab2d7dd39fa811c1 Mon Sep 17 00:00:00 2001 From: Robert Ghilduta Date: Tue, 20 May 2025 00:30:19 -0700 Subject: [PATCH 14/35] debian: update control Add support for libedit and curl --- debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 75c93b81..fc13d01a 100644 --- a/debian/control +++ b/debian/control @@ -2,8 +2,8 @@ Source: bladerf Priority: optional Maintainer: Nuand LLC Build-Depends: debhelper (>=9), cmake (>= 2.8.5), pkg-config, doxygen, - libusb-1.0-0-dev (>= 1.0.12), libtecla-dev | libtecla1-dev, libncurses5-dev, - git, help2man, pandoc + libusb-1.0-0-dev (>= 1.0.12), libedit-dev, libncurses5-dev, + git, help2man, pandoc, libcurl4-openssl-dev Standards-Version: 4.1.4 Section: comm Homepage: https://www.nuand.com/bladeRF From 8f99003e3600315269529d655703423d12ff1b14 Mon Sep 17 00:00:00 2001 From: Robert Ghilduta Date: Tue, 20 May 2025 00:32:33 -0700 Subject: [PATCH 15/35] libbladeRF_test: update dependency --- .../libbladeRF_test/test_gain_compare/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/libraries/libbladeRF_test/test_gain_compare/requirements.txt b/host/libraries/libbladeRF_test/test_gain_compare/requirements.txt index 2cc080d4..9b8652a1 100644 --- a/host/libraries/libbladeRF_test/test_gain_compare/requirements.txt +++ b/host/libraries/libbladeRF_test/test_gain_compare/requirements.txt @@ -5,7 +5,7 @@ kiwisolver==1.4.5 matplotlib==3.8.0 numpy==1.26.0 packaging==23.2 -Pillow==10.0.1 +Pillow==11.2.1 pyparsing==3.1.1 python-dateutil==2.8.2 six==1.16.0 From 761f39e1d72dc4092ef3b4d464a9745409afcdf5 Mon Sep 17 00:00:00 2001 From: Robert Ghilduta Date: Tue, 20 May 2025 00:47:40 -0700 Subject: [PATCH 16/35] docker: update from yum to DNF --- host/misc/docker/centos-7.Dockerfile | 13 ++++++++----- host/misc/docker/fedora-latest.Dockerfile | 16 +++++++++------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/host/misc/docker/centos-7.Dockerfile b/host/misc/docker/centos-7.Dockerfile index 578bcd13..7b2ba3ec 100644 --- a/host/misc/docker/centos-7.Dockerfile +++ b/host/misc/docker/centos-7.Dockerfile @@ -24,14 +24,14 @@ FROM centos:7 LABEL maintainer="Nuand LLC " -LABEL version="0.0.3" +LABEL version="0.0.4" LABEL description="CI build environment for the bladeRF project" LABEL com.nuand.ci.distribution.name="CentOS" LABEL com.nuand.ci.distribution.version="7" # Install things -RUN yum groupinstall -y "Development Tools" \ - && yum install -y \ +RUN dnf install -y @development-tools \ + && dnf install -y \ clang \ cmake \ doxygen \ @@ -40,10 +40,13 @@ RUN yum groupinstall -y "Development Tools" \ libedit-devel \ libusbx \ libusbx-devel \ + ncurses-devel \ + curl-devel \ + awk \ pandoc \ wget \ - && yum clean all \ - && rm -rf /var/cache/yum \ + && dnf clean all \ + && rm -rf /var/cache/dnf \ && echo "/usr/local/lib" > /etc/ld.so.conf.d/locallib.conf \ && echo "/usr/local/lib64" >> /etc/ld.so.conf.d/locallib.conf diff --git a/host/misc/docker/fedora-latest.Dockerfile b/host/misc/docker/fedora-latest.Dockerfile index 9b00c988..9e0ac5c0 100644 --- a/host/misc/docker/fedora-latest.Dockerfile +++ b/host/misc/docker/fedora-latest.Dockerfile @@ -24,14 +24,14 @@ FROM fedora:latest LABEL maintainer="Nuand LLC " -LABEL version="0.0.3" +LABEL version="0.0.4" LABEL description="CI build environment for the bladeRF project" LABEL com.nuand.ci.distribution.name="Fedora" LABEL com.nuand.ci.distribution.version="latest" # Install things -RUN yum groupinstall -y "Development Tools" \ - && yum install -y \ +RUN dnf install -y @development-tools \ + && dnf install -y \ clang \ cmake \ doxygen \ @@ -41,10 +41,13 @@ RUN yum groupinstall -y "Development Tools" \ libedit-devel \ libusbx \ libusbx-devel \ + ncurses-devel \ + curl-devel \ + awk \ pandoc \ wget \ - && yum clean all \ - && rm -rf /var/cache/yum \ + && dnf clean all \ + && rm -rf /var/cache/dnf \ && echo "/usr/local/lib" > /etc/ld.so.conf.d/locallib.conf \ && echo "/usr/local/lib64" >> /etc/ld.so.conf.d/locallib.conf @@ -69,8 +72,7 @@ RUN cd /root/bladeRF/ \ -DCMAKE_BUILD_TYPE=${buildtype} \ -DENABLE_FX3_BUILD=OFF \ -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ + -DTAGGED_RELEASE=${taggedrelease} ../ \ && make -j${parallel} \ && make install \ && ldconfig From 2c1235245759306bf43564dbea596686770e109a Mon Sep 17 00:00:00 2001 From: Robert Ghilduta Date: Tue, 20 May 2025 00:59:47 -0700 Subject: [PATCH 17/35] docker: add Ubuntu distributions, update debian distro packages --- host/misc/docker/clang-scan.Dockerfile | 4 +- .../misc/docker/debian-jessie-i386.Dockerfile | 4 +- host/misc/docker/debian-jessie.Dockerfile | 4 +- .../docker/debian-stretch-i386.Dockerfile | 4 +- host/misc/docker/debian-stretch.Dockerfile | 4 +- .../misc/docker/ubuntu-bionic-i386.Dockerfile | 4 +- host/misc/docker/ubuntu-bionic.Dockerfile | 4 +- .../misc/docker/ubuntu-cosmic-i386.Dockerfile | 4 +- host/misc/docker/ubuntu-cosmic.Dockerfile | 4 +- host/misc/docker/ubuntu-disco-i386.Dockerfile | 4 +- host/misc/docker/ubuntu-disco.Dockerfile | 4 +- host/misc/docker/ubuntu-eoan-i386.Dockerfile | 4 +- host/misc/docker/ubuntu-eoan.Dockerfile | 4 +- host/misc/docker/ubuntu-focal-i386.Dockerfile | 4 +- host/misc/docker/ubuntu-focal.Dockerfile | 4 +- .../misc/docker/ubuntu-groovy-i386.Dockerfile | 76 +++++++++++++++++++ host/misc/docker/ubuntu-groovy.Dockerfile | 76 +++++++++++++++++++ .../docker/ubuntu-hirsute-i386.Dockerfile | 76 +++++++++++++++++++ host/misc/docker/ubuntu-hirsute.Dockerfile | 76 +++++++++++++++++++ .../misc/docker/ubuntu-impish-i386.Dockerfile | 76 +++++++++++++++++++ host/misc/docker/ubuntu-impish.Dockerfile | 76 +++++++++++++++++++ host/misc/docker/ubuntu-jammy-i386.Dockerfile | 76 +++++++++++++++++++ host/misc/docker/ubuntu-jammy.Dockerfile | 76 +++++++++++++++++++ .../docker/ubuntu-kinetic-i386.Dockerfile | 76 +++++++++++++++++++ host/misc/docker/ubuntu-kinetic.Dockerfile | 76 +++++++++++++++++++ .../misc/docker/ubuntu-latest-i386.Dockerfile | 76 +++++++++++++++++++ host/misc/docker/ubuntu-latest.Dockerfile | 76 +++++++++++++++++++ host/misc/docker/ubuntu-lunar-i386.Dockerfile | 76 +++++++++++++++++++ host/misc/docker/ubuntu-lunar.Dockerfile | 76 +++++++++++++++++++ .../misc/docker/ubuntu-mantic-i386.Dockerfile | 76 +++++++++++++++++++ host/misc/docker/ubuntu-mantic.Dockerfile | 76 +++++++++++++++++++ host/misc/docker/ubuntu-noble-i386.Dockerfile | 76 +++++++++++++++++++ host/misc/docker/ubuntu-noble.Dockerfile | 76 +++++++++++++++++++ .../misc/docker/ubuntu-trusty-i386.Dockerfile | 4 +- host/misc/docker/ubuntu-trusty.Dockerfile | 4 +- .../misc/docker/ubuntu-xenial-i386.Dockerfile | 4 +- host/misc/docker/ubuntu-xenial.Dockerfile | 4 +- 37 files changed, 1425 insertions(+), 19 deletions(-) create mode 100644 host/misc/docker/ubuntu-groovy-i386.Dockerfile create mode 100644 host/misc/docker/ubuntu-groovy.Dockerfile create mode 100644 host/misc/docker/ubuntu-hirsute-i386.Dockerfile create mode 100644 host/misc/docker/ubuntu-hirsute.Dockerfile create mode 100644 host/misc/docker/ubuntu-impish-i386.Dockerfile create mode 100644 host/misc/docker/ubuntu-impish.Dockerfile create mode 100644 host/misc/docker/ubuntu-jammy-i386.Dockerfile create mode 100644 host/misc/docker/ubuntu-jammy.Dockerfile create mode 100644 host/misc/docker/ubuntu-kinetic-i386.Dockerfile create mode 100644 host/misc/docker/ubuntu-kinetic.Dockerfile create mode 100644 host/misc/docker/ubuntu-latest-i386.Dockerfile create mode 100644 host/misc/docker/ubuntu-latest.Dockerfile create mode 100644 host/misc/docker/ubuntu-lunar-i386.Dockerfile create mode 100644 host/misc/docker/ubuntu-lunar.Dockerfile create mode 100644 host/misc/docker/ubuntu-mantic-i386.Dockerfile create mode 100644 host/misc/docker/ubuntu-mantic.Dockerfile create mode 100644 host/misc/docker/ubuntu-noble-i386.Dockerfile create mode 100644 host/misc/docker/ubuntu-noble.Dockerfile diff --git a/host/misc/docker/clang-scan.Dockerfile b/host/misc/docker/clang-scan.Dockerfile index d9dfd083..46948a56 100644 --- a/host/misc/docker/clang-scan.Dockerfile +++ b/host/misc/docker/clang-scan.Dockerfile @@ -39,7 +39,9 @@ RUN apt-get update \ doxygen \ git \ help2man \ - libtecla-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ diff --git a/host/misc/docker/debian-jessie-i386.Dockerfile b/host/misc/docker/debian-jessie-i386.Dockerfile index 39030a2b..77628e16 100644 --- a/host/misc/docker/debian-jessie-i386.Dockerfile +++ b/host/misc/docker/debian-jessie-i386.Dockerfile @@ -39,7 +39,9 @@ RUN apt-get update \ doxygen \ git \ help2man \ - libtecla-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ diff --git a/host/misc/docker/debian-jessie.Dockerfile b/host/misc/docker/debian-jessie.Dockerfile index d31914d1..a4f4a150 100644 --- a/host/misc/docker/debian-jessie.Dockerfile +++ b/host/misc/docker/debian-jessie.Dockerfile @@ -39,7 +39,9 @@ RUN apt-get update \ doxygen \ git \ help2man \ - libtecla-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ diff --git a/host/misc/docker/debian-stretch-i386.Dockerfile b/host/misc/docker/debian-stretch-i386.Dockerfile index 389220c7..b711f888 100644 --- a/host/misc/docker/debian-stretch-i386.Dockerfile +++ b/host/misc/docker/debian-stretch-i386.Dockerfile @@ -39,7 +39,9 @@ RUN apt-get update \ doxygen \ git \ help2man \ - libtecla-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ diff --git a/host/misc/docker/debian-stretch.Dockerfile b/host/misc/docker/debian-stretch.Dockerfile index 97007161..99b80161 100644 --- a/host/misc/docker/debian-stretch.Dockerfile +++ b/host/misc/docker/debian-stretch.Dockerfile @@ -39,7 +39,9 @@ RUN apt-get update \ doxygen \ git \ help2man \ - libtecla-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ diff --git a/host/misc/docker/ubuntu-bionic-i386.Dockerfile b/host/misc/docker/ubuntu-bionic-i386.Dockerfile index bd9cef91..fe418064 100644 --- a/host/misc/docker/ubuntu-bionic-i386.Dockerfile +++ b/host/misc/docker/ubuntu-bionic-i386.Dockerfile @@ -39,7 +39,9 @@ RUN apt-get update \ doxygen \ git \ help2man \ - libtecla-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ diff --git a/host/misc/docker/ubuntu-bionic.Dockerfile b/host/misc/docker/ubuntu-bionic.Dockerfile index 98959c31..58b30131 100644 --- a/host/misc/docker/ubuntu-bionic.Dockerfile +++ b/host/misc/docker/ubuntu-bionic.Dockerfile @@ -39,7 +39,9 @@ RUN apt-get update \ doxygen \ git \ help2man \ - libtecla-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ diff --git a/host/misc/docker/ubuntu-cosmic-i386.Dockerfile b/host/misc/docker/ubuntu-cosmic-i386.Dockerfile index a9ba599f..212584c3 100644 --- a/host/misc/docker/ubuntu-cosmic-i386.Dockerfile +++ b/host/misc/docker/ubuntu-cosmic-i386.Dockerfile @@ -39,7 +39,9 @@ RUN apt-get update \ doxygen \ git \ help2man \ - libtecla-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ diff --git a/host/misc/docker/ubuntu-cosmic.Dockerfile b/host/misc/docker/ubuntu-cosmic.Dockerfile index 9f4f3974..36f8ec2f 100644 --- a/host/misc/docker/ubuntu-cosmic.Dockerfile +++ b/host/misc/docker/ubuntu-cosmic.Dockerfile @@ -39,7 +39,9 @@ RUN apt-get update \ doxygen \ git \ help2man \ - libtecla-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ diff --git a/host/misc/docker/ubuntu-disco-i386.Dockerfile b/host/misc/docker/ubuntu-disco-i386.Dockerfile index c7aa8511..0b8e62a9 100644 --- a/host/misc/docker/ubuntu-disco-i386.Dockerfile +++ b/host/misc/docker/ubuntu-disco-i386.Dockerfile @@ -39,7 +39,9 @@ RUN apt-get update \ doxygen \ git \ help2man \ - libtecla-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ diff --git a/host/misc/docker/ubuntu-disco.Dockerfile b/host/misc/docker/ubuntu-disco.Dockerfile index c2507084..fdfb8871 100644 --- a/host/misc/docker/ubuntu-disco.Dockerfile +++ b/host/misc/docker/ubuntu-disco.Dockerfile @@ -39,7 +39,9 @@ RUN apt-get update \ doxygen \ git \ help2man \ - libtecla-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ diff --git a/host/misc/docker/ubuntu-eoan-i386.Dockerfile b/host/misc/docker/ubuntu-eoan-i386.Dockerfile index fdbd0489..10f01064 100644 --- a/host/misc/docker/ubuntu-eoan-i386.Dockerfile +++ b/host/misc/docker/ubuntu-eoan-i386.Dockerfile @@ -39,7 +39,9 @@ RUN apt-get update \ doxygen \ git \ help2man \ - libtecla-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ diff --git a/host/misc/docker/ubuntu-eoan.Dockerfile b/host/misc/docker/ubuntu-eoan.Dockerfile index eeb8ea85..40b6efe5 100644 --- a/host/misc/docker/ubuntu-eoan.Dockerfile +++ b/host/misc/docker/ubuntu-eoan.Dockerfile @@ -39,7 +39,9 @@ RUN apt-get update \ doxygen \ git \ help2man \ - libtecla-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ diff --git a/host/misc/docker/ubuntu-focal-i386.Dockerfile b/host/misc/docker/ubuntu-focal-i386.Dockerfile index ee00b17d..e5b3d018 100644 --- a/host/misc/docker/ubuntu-focal-i386.Dockerfile +++ b/host/misc/docker/ubuntu-focal-i386.Dockerfile @@ -39,7 +39,9 @@ RUN apt-get update \ doxygen \ git \ help2man \ - libtecla-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ diff --git a/host/misc/docker/ubuntu-focal.Dockerfile b/host/misc/docker/ubuntu-focal.Dockerfile index fba4d52f..78547b0f 100644 --- a/host/misc/docker/ubuntu-focal.Dockerfile +++ b/host/misc/docker/ubuntu-focal.Dockerfile @@ -39,7 +39,9 @@ RUN apt-get update \ doxygen \ git \ help2man \ - libtecla-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ diff --git a/host/misc/docker/ubuntu-groovy-i386.Dockerfile b/host/misc/docker/ubuntu-groovy-i386.Dockerfile new file mode 100644 index 00000000..9dfe0876 --- /dev/null +++ b/host/misc/docker/ubuntu-groovy-i386.Dockerfile @@ -0,0 +1,76 @@ +# This file is part of the bladeRF project: +# http://www.github.com/nuand/bladeRF +# +# Copyright (c) 2018-2025 Nuand LLC. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +FROM i386/ubuntu:groovy + +LABEL maintainer="Nuand LLC " +LABEL version="0.0.2" +LABEL description="CI build environment for the bladeRF project" +LABEL com.nuand.ci.distribution.name="Ubuntu" +LABEL com.nuand.ci.distribution.codename="groovy" +LABEL com.nuand.ci.distribution.version="20.10-i386" + +# Install things +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + clang \ + cmake \ + doxygen \ + git \ + help2man \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ + libusb-1.0-0-dev \ + pandoc \ + pkg-config \ + usbutils \ + && apt-get clean + +# Copy in our build context +COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF +COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config +WORKDIR /root/bladeRF + +# Build arguments +ARG compiler=gcc +ARG buildtype=Release +ARG taggedrelease=NO +ARG parallel=1 + +# Do the build! +RUN cd /root/bladeRF/ \ + && mkdir -p build \ + && cd build \ + && cmake \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_C_COMPILER=${compiler} \ + -DCMAKE_BUILD_TYPE=${buildtype} \ + -DENABLE_FX3_BUILD=OFF \ + -DENABLE_HOST_BUILD=ON \ + -DTAGGED_RELEASE=${taggedrelease} \ + ../ \ + && make -j${parallel} \ + && make install \ + && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-groovy.Dockerfile b/host/misc/docker/ubuntu-groovy.Dockerfile new file mode 100644 index 00000000..11ef6111 --- /dev/null +++ b/host/misc/docker/ubuntu-groovy.Dockerfile @@ -0,0 +1,76 @@ +# This file is part of the bladeRF project: +# http://www.github.com/nuand/bladeRF +# +# Copyright (c) 2018-2025 Nuand LLC. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +FROM ubuntu:groovy + +LABEL maintainer="Nuand LLC " +LABEL version="0.0.2" +LABEL description="CI build environment for the bladeRF project" +LABEL com.nuand.ci.distribution.name="Ubuntu" +LABEL com.nuand.ci.distribution.codename="groovy" +LABEL com.nuand.ci.distribution.version="20.10" + +# Install things +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + clang \ + cmake \ + doxygen \ + git \ + help2man \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ + libusb-1.0-0-dev \ + pandoc \ + pkg-config \ + usbutils \ + && apt-get clean + +# Copy in our build context +COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF +COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config +WORKDIR /root/bladeRF + +# Build arguments +ARG compiler=gcc +ARG buildtype=Release +ARG taggedrelease=NO +ARG parallel=1 + +# Do the build! +RUN cd /root/bladeRF/ \ + && mkdir -p build \ + && cd build \ + && cmake \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_C_COMPILER=${compiler} \ + -DCMAKE_BUILD_TYPE=${buildtype} \ + -DENABLE_FX3_BUILD=OFF \ + -DENABLE_HOST_BUILD=ON \ + -DTAGGED_RELEASE=${taggedrelease} \ + ../ \ + && make -j${parallel} \ + && make install \ + && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-hirsute-i386.Dockerfile b/host/misc/docker/ubuntu-hirsute-i386.Dockerfile new file mode 100644 index 00000000..fb16895a --- /dev/null +++ b/host/misc/docker/ubuntu-hirsute-i386.Dockerfile @@ -0,0 +1,76 @@ +# This file is part of the bladeRF project: +# http://www.github.com/nuand/bladeRF +# +# Copyright (c) 2018-2025 Nuand LLC. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +FROM i386/ubuntu:hirsute + +LABEL maintainer="Nuand LLC " +LABEL version="0.0.2" +LABEL description="CI build environment for the bladeRF project" +LABEL com.nuand.ci.distribution.name="Ubuntu" +LABEL com.nuand.ci.distribution.codename="hirsute" +LABEL com.nuand.ci.distribution.version="21.04-i386" + +# Install things +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + clang \ + cmake \ + doxygen \ + git \ + help2man \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ + libusb-1.0-0-dev \ + pandoc \ + pkg-config \ + usbutils \ + && apt-get clean + +# Copy in our build context +COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF +COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config +WORKDIR /root/bladeRF + +# Build arguments +ARG compiler=gcc +ARG buildtype=Release +ARG taggedrelease=NO +ARG parallel=1 + +# Do the build! +RUN cd /root/bladeRF/ \ + && mkdir -p build \ + && cd build \ + && cmake \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_C_COMPILER=${compiler} \ + -DCMAKE_BUILD_TYPE=${buildtype} \ + -DENABLE_FX3_BUILD=OFF \ + -DENABLE_HOST_BUILD=ON \ + -DTAGGED_RELEASE=${taggedrelease} \ + ../ \ + && make -j${parallel} \ + && make install \ + && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-hirsute.Dockerfile b/host/misc/docker/ubuntu-hirsute.Dockerfile new file mode 100644 index 00000000..f25ed766 --- /dev/null +++ b/host/misc/docker/ubuntu-hirsute.Dockerfile @@ -0,0 +1,76 @@ +# This file is part of the bladeRF project: +# http://www.github.com/nuand/bladeRF +# +# Copyright (c) 2018-2025 Nuand LLC. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +FROM ubuntu:hirsute + +LABEL maintainer="Nuand LLC " +LABEL version="0.0.2" +LABEL description="CI build environment for the bladeRF project" +LABEL com.nuand.ci.distribution.name="Ubuntu" +LABEL com.nuand.ci.distribution.codename="hirsute" +LABEL com.nuand.ci.distribution.version="21.04" + +# Install things +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + clang \ + cmake \ + doxygen \ + git \ + help2man \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ + libusb-1.0-0-dev \ + pandoc \ + pkg-config \ + usbutils \ + && apt-get clean + +# Copy in our build context +COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF +COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config +WORKDIR /root/bladeRF + +# Build arguments +ARG compiler=gcc +ARG buildtype=Release +ARG taggedrelease=NO +ARG parallel=1 + +# Do the build! +RUN cd /root/bladeRF/ \ + && mkdir -p build \ + && cd build \ + && cmake \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_C_COMPILER=${compiler} \ + -DCMAKE_BUILD_TYPE=${buildtype} \ + -DENABLE_FX3_BUILD=OFF \ + -DENABLE_HOST_BUILD=ON \ + -DTAGGED_RELEASE=${taggedrelease} \ + ../ \ + && make -j${parallel} \ + && make install \ + && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-impish-i386.Dockerfile b/host/misc/docker/ubuntu-impish-i386.Dockerfile new file mode 100644 index 00000000..b47d3eba --- /dev/null +++ b/host/misc/docker/ubuntu-impish-i386.Dockerfile @@ -0,0 +1,76 @@ +# This file is part of the bladeRF project: +# http://www.github.com/nuand/bladeRF +# +# Copyright (c) 2018-2025 Nuand LLC. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +FROM i386/ubuntu:impish + +LABEL maintainer="Nuand LLC " +LABEL version="0.0.2" +LABEL description="CI build environment for the bladeRF project" +LABEL com.nuand.ci.distribution.name="Ubuntu" +LABEL com.nuand.ci.distribution.codename="impish" +LABEL com.nuand.ci.distribution.version="21.10-i386" + +# Install things +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + clang \ + cmake \ + doxygen \ + git \ + help2man \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ + libusb-1.0-0-dev \ + pandoc \ + pkg-config \ + usbutils \ + && apt-get clean + +# Copy in our build context +COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF +COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config +WORKDIR /root/bladeRF + +# Build arguments +ARG compiler=gcc +ARG buildtype=Release +ARG taggedrelease=NO +ARG parallel=1 + +# Do the build! +RUN cd /root/bladeRF/ \ + && mkdir -p build \ + && cd build \ + && cmake \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_C_COMPILER=${compiler} \ + -DCMAKE_BUILD_TYPE=${buildtype} \ + -DENABLE_FX3_BUILD=OFF \ + -DENABLE_HOST_BUILD=ON \ + -DTAGGED_RELEASE=${taggedrelease} \ + ../ \ + && make -j${parallel} \ + && make install \ + && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-impish.Dockerfile b/host/misc/docker/ubuntu-impish.Dockerfile new file mode 100644 index 00000000..25077ceb --- /dev/null +++ b/host/misc/docker/ubuntu-impish.Dockerfile @@ -0,0 +1,76 @@ +# This file is part of the bladeRF project: +# http://www.github.com/nuand/bladeRF +# +# Copyright (c) 2018-2025 Nuand LLC. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +FROM ubuntu:impish + +LABEL maintainer="Nuand LLC " +LABEL version="0.0.2" +LABEL description="CI build environment for the bladeRF project" +LABEL com.nuand.ci.distribution.name="Ubuntu" +LABEL com.nuand.ci.distribution.codename="impish" +LABEL com.nuand.ci.distribution.version="21.10" + +# Install things +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + clang \ + cmake \ + doxygen \ + git \ + help2man \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ + libusb-1.0-0-dev \ + pandoc \ + pkg-config \ + usbutils \ + && apt-get clean + +# Copy in our build context +COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF +COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config +WORKDIR /root/bladeRF + +# Build arguments +ARG compiler=gcc +ARG buildtype=Release +ARG taggedrelease=NO +ARG parallel=1 + +# Do the build! +RUN cd /root/bladeRF/ \ + && mkdir -p build \ + && cd build \ + && cmake \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_C_COMPILER=${compiler} \ + -DCMAKE_BUILD_TYPE=${buildtype} \ + -DENABLE_FX3_BUILD=OFF \ + -DENABLE_HOST_BUILD=ON \ + -DTAGGED_RELEASE=${taggedrelease} \ + ../ \ + && make -j${parallel} \ + && make install \ + && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-jammy-i386.Dockerfile b/host/misc/docker/ubuntu-jammy-i386.Dockerfile new file mode 100644 index 00000000..1824f113 --- /dev/null +++ b/host/misc/docker/ubuntu-jammy-i386.Dockerfile @@ -0,0 +1,76 @@ +# This file is part of the bladeRF project: +# http://www.github.com/nuand/bladeRF +# +# Copyright (c) 2018-2025 Nuand LLC. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +FROM i386/ubuntu:jammy + +LABEL maintainer="Nuand LLC " +LABEL version="0.0.2" +LABEL description="CI build environment for the bladeRF project" +LABEL com.nuand.ci.distribution.name="Ubuntu" +LABEL com.nuand.ci.distribution.codename="jammy" +LABEL com.nuand.ci.distribution.version="22.04-i386" + +# Install things +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + clang \ + cmake \ + doxygen \ + git \ + help2man \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ + libusb-1.0-0-dev \ + pandoc \ + pkg-config \ + usbutils \ + && apt-get clean + +# Copy in our build context +COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF +COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config +WORKDIR /root/bladeRF + +# Build arguments +ARG compiler=gcc +ARG buildtype=Release +ARG taggedrelease=NO +ARG parallel=1 + +# Do the build! +RUN cd /root/bladeRF/ \ + && mkdir -p build \ + && cd build \ + && cmake \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_C_COMPILER=${compiler} \ + -DCMAKE_BUILD_TYPE=${buildtype} \ + -DENABLE_FX3_BUILD=OFF \ + -DENABLE_HOST_BUILD=ON \ + -DTAGGED_RELEASE=${taggedrelease} \ + ../ \ + && make -j${parallel} \ + && make install \ + && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-jammy.Dockerfile b/host/misc/docker/ubuntu-jammy.Dockerfile new file mode 100644 index 00000000..b587dc88 --- /dev/null +++ b/host/misc/docker/ubuntu-jammy.Dockerfile @@ -0,0 +1,76 @@ +# This file is part of the bladeRF project: +# http://www.github.com/nuand/bladeRF +# +# Copyright (c) 2018-2025 Nuand LLC. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +FROM ubuntu:jammy + +LABEL maintainer="Nuand LLC " +LABEL version="0.0.2" +LABEL description="CI build environment for the bladeRF project" +LABEL com.nuand.ci.distribution.name="Ubuntu" +LABEL com.nuand.ci.distribution.codename="jammy" +LABEL com.nuand.ci.distribution.version="22.04" + +# Install things +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + clang \ + cmake \ + doxygen \ + git \ + help2man \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ + libusb-1.0-0-dev \ + pandoc \ + pkg-config \ + usbutils \ + && apt-get clean + +# Copy in our build context +COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF +COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config +WORKDIR /root/bladeRF + +# Build arguments +ARG compiler=gcc +ARG buildtype=Release +ARG taggedrelease=NO +ARG parallel=1 + +# Do the build! +RUN cd /root/bladeRF/ \ + && mkdir -p build \ + && cd build \ + && cmake \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_C_COMPILER=${compiler} \ + -DCMAKE_BUILD_TYPE=${buildtype} \ + -DENABLE_FX3_BUILD=OFF \ + -DENABLE_HOST_BUILD=ON \ + -DTAGGED_RELEASE=${taggedrelease} \ + ../ \ + && make -j${parallel} \ + && make install \ + && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-kinetic-i386.Dockerfile b/host/misc/docker/ubuntu-kinetic-i386.Dockerfile new file mode 100644 index 00000000..a98a0be8 --- /dev/null +++ b/host/misc/docker/ubuntu-kinetic-i386.Dockerfile @@ -0,0 +1,76 @@ +# This file is part of the bladeRF project: +# http://www.github.com/nuand/bladeRF +# +# Copyright (c) 2018-2025 Nuand LLC. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +FROM i386/ubuntu:kinetic + +LABEL maintainer="Nuand LLC " +LABEL version="0.0.2" +LABEL description="CI build environment for the bladeRF project" +LABEL com.nuand.ci.distribution.name="Ubuntu" +LABEL com.nuand.ci.distribution.codename="kinetic" +LABEL com.nuand.ci.distribution.version="22.10-i386" + +# Install things +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + clang \ + cmake \ + doxygen \ + git \ + help2man \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ + libusb-1.0-0-dev \ + pandoc \ + pkg-config \ + usbutils \ + && apt-get clean + +# Copy in our build context +COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF +COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config +WORKDIR /root/bladeRF + +# Build arguments +ARG compiler=gcc +ARG buildtype=Release +ARG taggedrelease=NO +ARG parallel=1 + +# Do the build! +RUN cd /root/bladeRF/ \ + && mkdir -p build \ + && cd build \ + && cmake \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_C_COMPILER=${compiler} \ + -DCMAKE_BUILD_TYPE=${buildtype} \ + -DENABLE_FX3_BUILD=OFF \ + -DENABLE_HOST_BUILD=ON \ + -DTAGGED_RELEASE=${taggedrelease} \ + ../ \ + && make -j${parallel} \ + && make install \ + && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-kinetic.Dockerfile b/host/misc/docker/ubuntu-kinetic.Dockerfile new file mode 100644 index 00000000..8697a052 --- /dev/null +++ b/host/misc/docker/ubuntu-kinetic.Dockerfile @@ -0,0 +1,76 @@ +# This file is part of the bladeRF project: +# http://www.github.com/nuand/bladeRF +# +# Copyright (c) 2018-2025 Nuand LLC. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +FROM ubuntu:kinetic + +LABEL maintainer="Nuand LLC " +LABEL version="0.0.2" +LABEL description="CI build environment for the bladeRF project" +LABEL com.nuand.ci.distribution.name="Ubuntu" +LABEL com.nuand.ci.distribution.codename="kinetic" +LABEL com.nuand.ci.distribution.version="22.10" + +# Install things +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + clang \ + cmake \ + doxygen \ + git \ + help2man \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ + libusb-1.0-0-dev \ + pandoc \ + pkg-config \ + usbutils \ + && apt-get clean + +# Copy in our build context +COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF +COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config +WORKDIR /root/bladeRF + +# Build arguments +ARG compiler=gcc +ARG buildtype=Release +ARG taggedrelease=NO +ARG parallel=1 + +# Do the build! +RUN cd /root/bladeRF/ \ + && mkdir -p build \ + && cd build \ + && cmake \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_C_COMPILER=${compiler} \ + -DCMAKE_BUILD_TYPE=${buildtype} \ + -DENABLE_FX3_BUILD=OFF \ + -DENABLE_HOST_BUILD=ON \ + -DTAGGED_RELEASE=${taggedrelease} \ + ../ \ + && make -j${parallel} \ + && make install \ + && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-latest-i386.Dockerfile b/host/misc/docker/ubuntu-latest-i386.Dockerfile new file mode 100644 index 00000000..44024d95 --- /dev/null +++ b/host/misc/docker/ubuntu-latest-i386.Dockerfile @@ -0,0 +1,76 @@ +# This file is part of the bladeRF project: +# http://www.github.com/nuand/bladeRF +# +# Copyright (c) 2018-2025 Nuand LLC. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +FROM i386/ubuntu:latest + +LABEL maintainer="Nuand LLC " +LABEL version="0.0.2" +LABEL description="CI build environment for the bladeRF project" +LABEL com.nuand.ci.distribution.name="Ubuntu" +LABEL com.nuand.ci.distribution.codename="latest" +LABEL com.nuand.ci.distribution.version="latest-i386" + +# Install things +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + clang \ + cmake \ + doxygen \ + git \ + help2man \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ + libusb-1.0-0-dev \ + pandoc \ + pkg-config \ + usbutils \ + && apt-get clean + +# Copy in our build context +COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF +COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config +WORKDIR /root/bladeRF + +# Build arguments +ARG compiler=gcc +ARG buildtype=Release +ARG taggedrelease=NO +ARG parallel=1 + +# Do the build! +RUN cd /root/bladeRF/ \ + && mkdir -p build \ + && cd build \ + && cmake \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_C_COMPILER=${compiler} \ + -DCMAKE_BUILD_TYPE=${buildtype} \ + -DENABLE_FX3_BUILD=OFF \ + -DENABLE_HOST_BUILD=ON \ + -DTAGGED_RELEASE=${taggedrelease} \ + ../ \ + && make -j${parallel} \ + && make install \ + && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-latest.Dockerfile b/host/misc/docker/ubuntu-latest.Dockerfile new file mode 100644 index 00000000..b1e4d9e7 --- /dev/null +++ b/host/misc/docker/ubuntu-latest.Dockerfile @@ -0,0 +1,76 @@ +# This file is part of the bladeRF project: +# http://www.github.com/nuand/bladeRF +# +# Copyright (c) 2018-2025 Nuand LLC. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +FROM ubuntu:latest + +LABEL maintainer="Nuand LLC " +LABEL version="0.0.2" +LABEL description="CI build environment for the bladeRF project" +LABEL com.nuand.ci.distribution.name="Ubuntu" +LABEL com.nuand.ci.distribution.codename="latest" +LABEL com.nuand.ci.distribution.version="latest" + +# Install things +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + clang \ + cmake \ + doxygen \ + git \ + help2man \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ + libusb-1.0-0-dev \ + pandoc \ + pkg-config \ + usbutils \ + && apt-get clean + +# Copy in our build context +COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF +COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config +WORKDIR /root/bladeRF + +# Build arguments +ARG compiler=gcc +ARG buildtype=Release +ARG taggedrelease=NO +ARG parallel=1 + +# Do the build! +RUN cd /root/bladeRF/ \ + && mkdir -p build \ + && cd build \ + && cmake \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_C_COMPILER=${compiler} \ + -DCMAKE_BUILD_TYPE=${buildtype} \ + -DENABLE_FX3_BUILD=OFF \ + -DENABLE_HOST_BUILD=ON \ + -DTAGGED_RELEASE=${taggedrelease} \ + ../ \ + && make -j${parallel} \ + && make install \ + && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-lunar-i386.Dockerfile b/host/misc/docker/ubuntu-lunar-i386.Dockerfile new file mode 100644 index 00000000..27f0f7ea --- /dev/null +++ b/host/misc/docker/ubuntu-lunar-i386.Dockerfile @@ -0,0 +1,76 @@ +# This file is part of the bladeRF project: +# http://www.github.com/nuand/bladeRF +# +# Copyright (c) 2018-2025 Nuand LLC. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +FROM i386/ubuntu:lunar + +LABEL maintainer="Nuand LLC " +LABEL version="0.0.2" +LABEL description="CI build environment for the bladeRF project" +LABEL com.nuand.ci.distribution.name="Ubuntu" +LABEL com.nuand.ci.distribution.codename="lunar" +LABEL com.nuand.ci.distribution.version="23.04-i386" + +# Install things +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + clang \ + cmake \ + doxygen \ + git \ + help2man \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ + libusb-1.0-0-dev \ + pandoc \ + pkg-config \ + usbutils \ + && apt-get clean + +# Copy in our build context +COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF +COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config +WORKDIR /root/bladeRF + +# Build arguments +ARG compiler=gcc +ARG buildtype=Release +ARG taggedrelease=NO +ARG parallel=1 + +# Do the build! +RUN cd /root/bladeRF/ \ + && mkdir -p build \ + && cd build \ + && cmake \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_C_COMPILER=${compiler} \ + -DCMAKE_BUILD_TYPE=${buildtype} \ + -DENABLE_FX3_BUILD=OFF \ + -DENABLE_HOST_BUILD=ON \ + -DTAGGED_RELEASE=${taggedrelease} \ + ../ \ + && make -j${parallel} \ + && make install \ + && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-lunar.Dockerfile b/host/misc/docker/ubuntu-lunar.Dockerfile new file mode 100644 index 00000000..042f787d --- /dev/null +++ b/host/misc/docker/ubuntu-lunar.Dockerfile @@ -0,0 +1,76 @@ +# This file is part of the bladeRF project: +# http://www.github.com/nuand/bladeRF +# +# Copyright (c) 2018-2025 Nuand LLC. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +FROM ubuntu:lunar + +LABEL maintainer="Nuand LLC " +LABEL version="0.0.2" +LABEL description="CI build environment for the bladeRF project" +LABEL com.nuand.ci.distribution.name="Ubuntu" +LABEL com.nuand.ci.distribution.codename="lunar" +LABEL com.nuand.ci.distribution.version="23.04" + +# Install things +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + clang \ + cmake \ + doxygen \ + git \ + help2man \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ + libusb-1.0-0-dev \ + pandoc \ + pkg-config \ + usbutils \ + && apt-get clean + +# Copy in our build context +COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF +COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config +WORKDIR /root/bladeRF + +# Build arguments +ARG compiler=gcc +ARG buildtype=Release +ARG taggedrelease=NO +ARG parallel=1 + +# Do the build! +RUN cd /root/bladeRF/ \ + && mkdir -p build \ + && cd build \ + && cmake \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_C_COMPILER=${compiler} \ + -DCMAKE_BUILD_TYPE=${buildtype} \ + -DENABLE_FX3_BUILD=OFF \ + -DENABLE_HOST_BUILD=ON \ + -DTAGGED_RELEASE=${taggedrelease} \ + ../ \ + && make -j${parallel} \ + && make install \ + && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-mantic-i386.Dockerfile b/host/misc/docker/ubuntu-mantic-i386.Dockerfile new file mode 100644 index 00000000..12890378 --- /dev/null +++ b/host/misc/docker/ubuntu-mantic-i386.Dockerfile @@ -0,0 +1,76 @@ +# This file is part of the bladeRF project: +# http://www.github.com/nuand/bladeRF +# +# Copyright (c) 2018-2025 Nuand LLC. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +FROM i386/ubuntu:mantic + +LABEL maintainer="Nuand LLC " +LABEL version="0.0.2" +LABEL description="CI build environment for the bladeRF project" +LABEL com.nuand.ci.distribution.name="Ubuntu" +LABEL com.nuand.ci.distribution.codename="mantic" +LABEL com.nuand.ci.distribution.version="23.10-i386" + +# Install things +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + clang \ + cmake \ + doxygen \ + git \ + help2man \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ + libusb-1.0-0-dev \ + pandoc \ + pkg-config \ + usbutils \ + && apt-get clean + +# Copy in our build context +COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF +COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config +WORKDIR /root/bladeRF + +# Build arguments +ARG compiler=gcc +ARG buildtype=Release +ARG taggedrelease=NO +ARG parallel=1 + +# Do the build! +RUN cd /root/bladeRF/ \ + && mkdir -p build \ + && cd build \ + && cmake \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_C_COMPILER=${compiler} \ + -DCMAKE_BUILD_TYPE=${buildtype} \ + -DENABLE_FX3_BUILD=OFF \ + -DENABLE_HOST_BUILD=ON \ + -DTAGGED_RELEASE=${taggedrelease} \ + ../ \ + && make -j${parallel} \ + && make install \ + && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-mantic.Dockerfile b/host/misc/docker/ubuntu-mantic.Dockerfile new file mode 100644 index 00000000..ae9924d0 --- /dev/null +++ b/host/misc/docker/ubuntu-mantic.Dockerfile @@ -0,0 +1,76 @@ +# This file is part of the bladeRF project: +# http://www.github.com/nuand/bladeRF +# +# Copyright (c) 2018-2025 Nuand LLC. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +FROM ubuntu:mantic + +LABEL maintainer="Nuand LLC " +LABEL version="0.0.2" +LABEL description="CI build environment for the bladeRF project" +LABEL com.nuand.ci.distribution.name="Ubuntu" +LABEL com.nuand.ci.distribution.codename="mantic" +LABEL com.nuand.ci.distribution.version="23.10" + +# Install things +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + clang \ + cmake \ + doxygen \ + git \ + help2man \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ + libusb-1.0-0-dev \ + pandoc \ + pkg-config \ + usbutils \ + && apt-get clean + +# Copy in our build context +COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF +COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config +WORKDIR /root/bladeRF + +# Build arguments +ARG compiler=gcc +ARG buildtype=Release +ARG taggedrelease=NO +ARG parallel=1 + +# Do the build! +RUN cd /root/bladeRF/ \ + && mkdir -p build \ + && cd build \ + && cmake \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_C_COMPILER=${compiler} \ + -DCMAKE_BUILD_TYPE=${buildtype} \ + -DENABLE_FX3_BUILD=OFF \ + -DENABLE_HOST_BUILD=ON \ + -DTAGGED_RELEASE=${taggedrelease} \ + ../ \ + && make -j${parallel} \ + && make install \ + && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-noble-i386.Dockerfile b/host/misc/docker/ubuntu-noble-i386.Dockerfile new file mode 100644 index 00000000..034a307c --- /dev/null +++ b/host/misc/docker/ubuntu-noble-i386.Dockerfile @@ -0,0 +1,76 @@ +# This file is part of the bladeRF project: +# http://www.github.com/nuand/bladeRF +# +# Copyright (c) 2018-2025 Nuand LLC. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +FROM i386/ubuntu:noble + +LABEL maintainer="Nuand LLC " +LABEL version="0.0.2" +LABEL description="CI build environment for the bladeRF project" +LABEL com.nuand.ci.distribution.name="Ubuntu" +LABEL com.nuand.ci.distribution.codename="noble" +LABEL com.nuand.ci.distribution.version="24.04-i386" + +# Install things +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + clang \ + cmake \ + doxygen \ + git \ + help2man \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ + libusb-1.0-0-dev \ + pandoc \ + pkg-config \ + usbutils \ + && apt-get clean + +# Copy in our build context +COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF +COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config +WORKDIR /root/bladeRF + +# Build arguments +ARG compiler=gcc +ARG buildtype=Release +ARG taggedrelease=NO +ARG parallel=1 + +# Do the build! +RUN cd /root/bladeRF/ \ + && mkdir -p build \ + && cd build \ + && cmake \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_C_COMPILER=${compiler} \ + -DCMAKE_BUILD_TYPE=${buildtype} \ + -DENABLE_FX3_BUILD=OFF \ + -DENABLE_HOST_BUILD=ON \ + -DTAGGED_RELEASE=${taggedrelease} \ + ../ \ + && make -j${parallel} \ + && make install \ + && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-noble.Dockerfile b/host/misc/docker/ubuntu-noble.Dockerfile new file mode 100644 index 00000000..c3184c35 --- /dev/null +++ b/host/misc/docker/ubuntu-noble.Dockerfile @@ -0,0 +1,76 @@ +# This file is part of the bladeRF project: +# http://www.github.com/nuand/bladeRF +# +# Copyright (c) 2018-2025 Nuand LLC. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +FROM ubuntu:noble + +LABEL maintainer="Nuand LLC " +LABEL version="0.0.2" +LABEL description="CI build environment for the bladeRF project" +LABEL com.nuand.ci.distribution.name="Ubuntu" +LABEL com.nuand.ci.distribution.codename="noble" +LABEL com.nuand.ci.distribution.version="24.04" + +# Install things +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + clang \ + cmake \ + doxygen \ + git \ + help2man \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ + libusb-1.0-0-dev \ + pandoc \ + pkg-config \ + usbutils \ + && apt-get clean + +# Copy in our build context +COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF +COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config +WORKDIR /root/bladeRF + +# Build arguments +ARG compiler=gcc +ARG buildtype=Release +ARG taggedrelease=NO +ARG parallel=1 + +# Do the build! +RUN cd /root/bladeRF/ \ + && mkdir -p build \ + && cd build \ + && cmake \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_C_COMPILER=${compiler} \ + -DCMAKE_BUILD_TYPE=${buildtype} \ + -DENABLE_FX3_BUILD=OFF \ + -DENABLE_HOST_BUILD=ON \ + -DTAGGED_RELEASE=${taggedrelease} \ + ../ \ + && make -j${parallel} \ + && make install \ + && ldconfig diff --git a/host/misc/docker/ubuntu-trusty-i386.Dockerfile b/host/misc/docker/ubuntu-trusty-i386.Dockerfile index c739630a..08bdd649 100644 --- a/host/misc/docker/ubuntu-trusty-i386.Dockerfile +++ b/host/misc/docker/ubuntu-trusty-i386.Dockerfile @@ -39,7 +39,9 @@ RUN apt-get update \ doxygen \ git \ help2man \ - libtecla-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ diff --git a/host/misc/docker/ubuntu-trusty.Dockerfile b/host/misc/docker/ubuntu-trusty.Dockerfile index ac0d4d2f..ba8cdfde 100644 --- a/host/misc/docker/ubuntu-trusty.Dockerfile +++ b/host/misc/docker/ubuntu-trusty.Dockerfile @@ -39,7 +39,9 @@ RUN apt-get update \ doxygen \ git \ help2man \ - libtecla-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ diff --git a/host/misc/docker/ubuntu-xenial-i386.Dockerfile b/host/misc/docker/ubuntu-xenial-i386.Dockerfile index 60d2d940..951dbc76 100644 --- a/host/misc/docker/ubuntu-xenial-i386.Dockerfile +++ b/host/misc/docker/ubuntu-xenial-i386.Dockerfile @@ -39,7 +39,9 @@ RUN apt-get update \ doxygen \ git \ help2man \ - libtecla-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ diff --git a/host/misc/docker/ubuntu-xenial.Dockerfile b/host/misc/docker/ubuntu-xenial.Dockerfile index c0953b10..5019b3c9 100644 --- a/host/misc/docker/ubuntu-xenial.Dockerfile +++ b/host/misc/docker/ubuntu-xenial.Dockerfile @@ -39,7 +39,9 @@ RUN apt-get update \ doxygen \ git \ help2man \ - libtecla-dev \ + libcurl4-openssl-dev \ + libedit-dev \ + libncurses5-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ From d77b35c7c5d318be9d00016e3680a25c2917f8f1 Mon Sep 17 00:00:00 2001 From: Robert Ghilduta Date: Tue, 20 May 2025 01:10:49 -0700 Subject: [PATCH 18/35] bladeRF-fsk: unitialized value fixup --- host/utilities/bladeRF-fsk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/utilities/bladeRF-fsk b/host/utilities/bladeRF-fsk index 43276ad2..4e3e092a 160000 --- a/host/utilities/bladeRF-fsk +++ b/host/utilities/bladeRF-fsk @@ -1 +1 @@ -Subproject commit 43276ad2b641287018ab502a5eea1d315e8a9ac7 +Subproject commit 4e3e092a5ab392bf6c2b104bd823e0f26990b1dc From 8f490c0a67a77b3b3044d8226489c5a8d7f6194f Mon Sep 17 00:00:00 2001 From: Ryan Thompson Date: Fri, 16 May 2025 18:56:18 -0500 Subject: [PATCH 19/35] libbladeRF: fix max sample throughput warning for oversample feature --- host/libraries/libbladeRF/src/board/bladerf2/common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/host/libraries/libbladeRF/src/board/bladerf2/common.c b/host/libraries/libbladeRF/src/board/bladerf2/common.c index 60a02699..37bd86ba 100644 --- a/host/libraries/libbladeRF/src/board/bladerf2/common.c +++ b/host/libraries/libbladeRF/src/board/bladerf2/common.c @@ -312,7 +312,8 @@ bool check_total_sample_rate(struct bladerf *dev) bladerf_sample_rate rate_accum = 0; size_t active_channels = 0; - const bladerf_sample_rate MAX_SAMPLE_THROUGHPUT = 80000000; + const bladerf_sample_rate MAX_SAMPLE_THROUGHPUT = + (dev->feature == BLADERF_FEATURE_OVERSAMPLE) ? 160000000 : 80000000; /* Read RFFE control register */ status = dev->backend->rffe_control_read(dev, ®); From 5be9df53a8b86d6386f017b762d777d7237c6a5a Mon Sep 17 00:00:00 2001 From: Ryan Thompson Date: Fri, 16 May 2025 13:12:50 -0500 Subject: [PATCH 20/35] test: add libbladeRF oversample test --- host/libraries/libbladeRF_test/CMakeLists.txt | 1 + .../test_oversample/CMakeLists.txt | 20 ++++ .../test_oversample/src/main.c | 107 ++++++++++++++++++ 3 files changed, 128 insertions(+) create mode 100644 host/libraries/libbladeRF_test/test_oversample/CMakeLists.txt create mode 100644 host/libraries/libbladeRF_test/test_oversample/src/main.c diff --git a/host/libraries/libbladeRF_test/CMakeLists.txt b/host/libraries/libbladeRF_test/CMakeLists.txt index fc3d90e1..0121c424 100644 --- a/host/libraries/libbladeRF_test/CMakeLists.txt +++ b/host/libraries/libbladeRF_test/CMakeLists.txt @@ -10,6 +10,7 @@ add_subdirectory(test_ctrl) add_subdirectory(test_freq_hop) add_subdirectory(test_fw_check) add_subdirectory(test_open) +add_subdirectory(test_oversample) add_subdirectory(test_packet) add_subdirectory(test_parse) add_subdirectory(test_peripheral_timing) diff --git a/host/libraries/libbladeRF_test/test_oversample/CMakeLists.txt b/host/libraries/libbladeRF_test/test_oversample/CMakeLists.txt new file mode 100644 index 00000000..8253bdb0 --- /dev/null +++ b/host/libraries/libbladeRF_test/test_oversample/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.10...3.27) +project(libbladeRF_test_oversample C) + +set(INCLUDES + ${libbladeRF_SOURCE_DIR}/include + ${CMAKE_CURRENT_SOURCE_DIR}/../common/include + ${CMAKE_CURRENT_SOURCE_DIR}/../../../common/include +) +if(MSVC) + set(INCLUDES ${INCLUDES} ${MSVC_C99_INCLUDES}) +endif() + +include_directories(${INCLUDES}) +add_executable(${PROJECT_NAME} src/main.c ../common/src/test_common.c) +target_link_libraries(${PROJECT_NAME} + libbladerf_shared + m +) + +add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME}) diff --git a/host/libraries/libbladeRF_test/test_oversample/src/main.c b/host/libraries/libbladeRF_test/test_oversample/src/main.c new file mode 100644 index 00000000..9ddd4b29 --- /dev/null +++ b/host/libraries/libbladeRF_test/test_oversample/src/main.c @@ -0,0 +1,107 @@ +#include +#include +#include +#include +#include // for getopt +#include +#include +#include "log.h" +#include "test_common.h" +#include "libbladeRF.h" + +#define ANSI_COLOR_RED "\x1b[31m" +#define ANSI_COLOR_GREEN "\x1b[32m" +#define ANSI_COLOR_YELLOW "\x1b[33m" +#define ANSI_COLOR_BLUE "\x1b[34m" +#define ANSI_COLOR_MAGENTA "\x1b[35m" +#define ANSI_COLOR_RESET "\x1b[0m" + +void print_usage(const char *prog_name) +{ + printf("Usage: %s [-h] [-v]\n", prog_name); + printf(" -h Show this help message\n"); + printf(" -v Enable verbose logging\n"); +} + +int main(int argc, char *argv[]) +{ + int status = 0; + struct bladerf *dev = NULL; + int opt; + bladerf_log_set_verbosity(BLADERF_LOG_LEVEL_INFO); + + bladerf_frequency freq = 915e6; + bladerf_sample_rate samp_rate = 122.88e6; + + const unsigned int num_buffers = 64; + const unsigned int buffer_size = 16384; + const unsigned int num_transfers = 16; + const unsigned int timeout_ms = 1000; + + struct timespec start, end; + + while ((opt = getopt(argc, argv, "hv")) != -1) { + switch (opt) { + case 'h': + print_usage(argv[0]); + return EXIT_SUCCESS; + case 'v': + bladerf_log_set_verbosity(BLADERF_LOG_LEVEL_VERBOSE); + break; + default: + print_usage(argv[0]); + return EXIT_FAILURE; + } + } + + const unsigned int num_samples = 1*samp_rate; // 1s of samples + int8_t *samples = (int8_t *)malloc(num_samples * sizeof(int16_t)); + double power = 0; + + CHECK_STATUS(bladerf_open(&dev, NULL)); + CHECK_STATUS(bladerf_set_frequency(dev, BLADERF_CHANNEL_RX(0), freq)); + printf("Frequency: %.2f MHz\n", freq / 1e6); + CHECK_STATUS(bladerf_enable_feature(dev, BLADERF_FEATURE_OVERSAMPLE, true)); + CHECK_STATUS(bladerf_sync_config(dev, BLADERF_RX_X1, BLADERF_FORMAT_SC8_Q7, + num_buffers, buffer_size, num_transfers, timeout_ms)); + + // Not only sets the sample rate, but also applies the oversample register configuration + CHECK_STATUS(bladerf_set_sample_rate(dev, BLADERF_CHANNEL_RX(0), samp_rate, NULL)); + printf("Sample Rate: %.2f MHz\n", samp_rate / 1e6); + + // Collect samples + CHECK_STATUS(bladerf_enable_module(dev, BLADERF_MODULE_RX, true)); + CHECK_STATUS(clock_gettime(CLOCK_MONOTONIC_RAW, &start)); + CHECK_STATUS(bladerf_sync_rx(dev, samples, num_samples, NULL, 0)); + CHECK_STATUS(clock_gettime(CLOCK_MONOTONIC_RAW, &end)); + CHECK_STATUS(bladerf_enable_module(dev, BLADERF_MODULE_RX, false)); + + const double expected_sync_time = (double)num_samples / samp_rate; + double time_taken = (end.tv_sec - start.tv_sec) + (end.tv_nsec - start.tv_nsec) * 1e-9; + printf("Time taken: %f seconds\n", time_taken); + printf("Expected sync time: %f seconds\n", expected_sync_time); + printf("%% error: %f\n", (time_taken - expected_sync_time) / expected_sync_time * 100); + + // Throw error if sync time is outside 5% error margin + double error_percent = (time_taken - expected_sync_time) / expected_sync_time * 100; + double tolerance = 1.0; // 1% tolerance + if (error_percent > tolerance || error_percent < -tolerance) { + printf(ANSI_COLOR_RED "Sync time error: %f%%" ANSI_COLOR_RESET "\n", error_percent); + status = 1; + } + + // Calculate power + for (size_t i = 0; i < num_samples/2; i++) { + double i_sample = (double)samples[2*i]; + double q_sample = (double)samples[2*i+1]; + power += i_sample * i_sample + q_sample * q_sample; + } + double avg_power = power / num_samples; + const double MAX_POWER = (INT8_MAX * INT8_MAX) + (INT8_MAX * INT8_MAX); + double dBFS = 20 * log10(avg_power/MAX_POWER); + printf(ANSI_COLOR_GREEN "Avg Power: %fdBFS" ANSI_COLOR_RESET "\n" , dBFS); + +error: + if (dev) bladerf_close(dev); + return (status == 0) ? EXIT_SUCCESS : EXIT_FAILURE; +} From d65b160cd999a805ed5d1faa83419ff76e0c51d7 Mon Sep 17 00:00:00 2001 From: Ryan Thompson Date: Thu, 15 May 2025 12:39:32 -0500 Subject: [PATCH 21/35] hdl: parallel build terminates and cleans up if exit or failure occures --- hdl/quartus/build_bladerf.sh | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/hdl/quartus/build_bladerf.sh b/hdl/quartus/build_bladerf.sh index f6e7419e..b451235f 100755 --- a/hdl/quartus/build_bladerf.sh +++ b/hdl/quartus/build_bladerf.sh @@ -3,6 +3,23 @@ # Build a bladeRF fpga image ################################################################################ +cleanup() { + # Prevent recursive cleanup calls + trap '' INT TERM HUP + + echo "Cleaning up and terminating builds..." + if [ -n "${build_pids[*]}" ]; then + for pid in "${build_pids[@]}"; do + pkill -P $pid 2>/dev/null || true + done + fi + + exit 1 +} + +# Set up trap to catch Ctrl+C and other termination signals +trap cleanup INT TERM HUP + function print_boards() { echo "Supported boards:" for i in ../fpga/platforms/*/build/platform.conf ; do @@ -192,22 +209,31 @@ if [ "$build_hosted" == "1" ]; then mkdir -p build_logs build_pids=() + echo "Starting parallel builds for all hosted configurations..." for config in "bladeRF 40" "bladeRF 115" "bladeRF-micro A4" "bladeRF-micro A5" "bladeRF-micro A9"; do read -r board size <<< "$config" - echo "Starting build for $board hosted $size..." - $0 -b "$board" -r hosted -s "$size" > "build_logs/$board-hosted-$size.log" 2>&1 & + log_file="build_logs/$board-hosted-$size.log" + $0 -b "$board" -r hosted -s "$size" > "$log_file" 2>&1 & build_pids+=($!) + echo " → $board $size (PID: ${build_pids[-1]})" done - echo "Waiting for ${#build_pids[@]} hosted builds to complete..." + echo "Waiting for ${#build_pids[@]} builds to complete..." + # Monitor build processes + failed=0 for pid in "${build_pids[@]}"; do if ! wait "$pid"; then - echo "Build failed. Check build_logs directory for details." - exit 1 + failed=1 fi done + if [ "$failed" -ne 0 ]; then + echo "One or more builds failed. Check build_logs directory for details." + cleanup + exit 1 + fi + echo "All hosted builds completed successfully!" exit 0 fi From 918535854c6683beb30c581db2140f24bb7f8b12 Mon Sep 17 00:00:00 2001 From: Ben Morse Date: Tue, 20 May 2025 13:07:12 -0700 Subject: [PATCH 22/35] bladeRF-fsk: host: various errors and compiler warning fixes on multiple platforms --- hdl/quartus/build_bladerf.sh | 14 +++++++++++-- host/common/include/osx/clock_gettime.h | 2 ++ host/common/include/thread.h | 2 ++ host/common/include/windows/clock_gettime.h | 2 ++ .../doc/examples/freq_range_sweep.c | 7 ++++--- .../test_oversample/src/main.c | 20 +++++++++++++++++-- .../bladeRF-cli/src/input/editline.c | 4 ++++ host/utilities/bladeRF-fsk | 2 +- .../utilities/bladeRF-update/bladeRF-update.c | 14 +++++++++++-- 9 files changed, 57 insertions(+), 10 deletions(-) diff --git a/hdl/quartus/build_bladerf.sh b/hdl/quartus/build_bladerf.sh index b451235f..ebf9fb6f 100755 --- a/hdl/quartus/build_bladerf.sh +++ b/hdl/quartus/build_bladerf.sh @@ -62,6 +62,7 @@ function usage() echo " synth Synthesize the design" echo " full (default) Fit the design and create programming files" echo " -S Fitter seed setting (default: 1)" + echo " -D Output directory name won't contain the date" echo " -h Show this text" echo "" @@ -143,8 +144,9 @@ fi nios_rev="Tiny" flow="full" seed="1" +omit_date=false -while getopts ":cb:r:s:a:Hfn:l:S:h" opt; do +while getopts ":cb:r:s:a:fn:l:S:Dh" opt; do case $opt in c) clear_work_dir=1 @@ -188,6 +190,10 @@ while getopts ":cb:r:s:a:Hfn:l:S:h" opt; do seed=$OPTARG ;; + D) + omit_date=true + ;; + h) usage exit 0 @@ -501,7 +507,11 @@ if [[ ${flow} == "full" ]]; then BUILD_TIME_DONE=$(date -d"$BUILD_TIME_DONE" '+%F_%H.%M.%S') BUILD_NAME="$rev"x"$size" - BUILD_OUTPUT_DIR="$BUILD_NAME"-"$BUILD_TIME_DONE" + if [ "$omit_date" = false ]; then + BUILD_OUTPUT_DIR="$BUILD_NAME"-"$BUILD_TIME_DONE" + else + BUILD_OUTPUT_DIR="$BUILD_NAME" + fi RBF=$BUILD_NAME.rbf mkdir -p "$BUILD_OUTPUT_DIR" diff --git a/host/common/include/osx/clock_gettime.h b/host/common/include/osx/clock_gettime.h index f2ee0cea..db4a0094 100644 --- a/host/common/include/osx/clock_gettime.h +++ b/host/common/include/osx/clock_gettime.h @@ -39,7 +39,9 @@ extern "C" { #endif // __MACH__ typedef int clockid_t; +#ifndef CLOCK_REALTIME #define CLOCK_REALTIME 0 +#endif int clock_gettime(clockid_t clk_id, struct timespec *tp); diff --git a/host/common/include/thread.h b/host/common/include/thread.h index bc6f7d26..9f68ba6f 100644 --- a/host/common/include/thread.h +++ b/host/common/include/thread.h @@ -51,7 +51,9 @@ #include #include #include +#ifndef CLOCK_REALTIME #define CLOCK_REALTIME 0 +#endif #define THREAD pthread_t #define MUTEX pthread_mutex_t diff --git a/host/common/include/windows/clock_gettime.h b/host/common/include/windows/clock_gettime.h index f720a4db..d9ccd932 100644 --- a/host/common/include/windows/clock_gettime.h +++ b/host/common/include/windows/clock_gettime.h @@ -36,7 +36,9 @@ extern "C" { #endif typedef int clockid_t; +#ifndef CLOCK_REALTIME #define CLOCK_REALTIME 0 +#endif int clock_gettime(clockid_t clk_id, struct timespec *tp); diff --git a/host/libraries/libbladeRF/doc/examples/freq_range_sweep.c b/host/libraries/libbladeRF/doc/examples/freq_range_sweep.c index f969ce6f..5f4675d5 100644 --- a/host/libraries/libbladeRF/doc/examples/freq_range_sweep.c +++ b/host/libraries/libbladeRF/doc/examples/freq_range_sweep.c @@ -2,6 +2,7 @@ #include #include #include +#include #define FREQ_HOP_SPACING (bladerf_frequency)40e6 #define ITERATIONS 10000 @@ -78,16 +79,16 @@ int main(int argc, char *argv[]) for (i = 0; i < num_frequencies; i++) { status = bladerf_set_frequency(dev, ch, frequencies[i]); if (status != 0) { - fprintf(stderr, "Failed to set frequency to %lu Hz: %s\n", + fprintf(stderr, "Failed to set frequency to %" PRIu64 " Hz: %s\n", frequencies[i], bladerf_strerror(status)); return status; } bladerf_log_set_verbosity(BLADERF_LOG_LEVEL_VERBOSE); - printf("Frequency: %lu Hz\n", frequencies[i]); + printf("Frequency: %" PRIu64 " Hz\n", frequencies[i]); status = bladerf_get_quick_tune(dev, ch, &quick_tunes[i]); if (status != 0) { - fprintf(stderr, "Failed to get quick tune for %lu Hz: %s\n", + fprintf(stderr, "Failed to get quick tune for %" PRIu64 " Hz: %s\n", frequencies[i], bladerf_strerror(status)); return status; } diff --git a/host/libraries/libbladeRF_test/test_oversample/src/main.c b/host/libraries/libbladeRF_test/test_oversample/src/main.c index 9ddd4b29..34a7e73b 100644 --- a/host/libraries/libbladeRF_test/test_oversample/src/main.c +++ b/host/libraries/libbladeRF_test/test_oversample/src/main.c @@ -16,6 +16,22 @@ #define ANSI_COLOR_MAGENTA "\x1b[35m" #define ANSI_COLOR_RESET "\x1b[0m" +/* Use CLOCK_MONOTONIC as a portable alternative that works on FreeBSD and Linux */ +#ifndef CLOCK_MONOTONIC_PRECISE +#ifdef __FreeBSD__ +/* FreeBSD defines CLOCK_MONOTONIC_PRECISE for higher precision */ +#define TIMING_CLOCK CLOCK_MONOTONIC_PRECISE +#elif defined(CLOCK_MONOTONIC_RAW) && defined(__linux__) +/* Linux has CLOCK_MONOTONIC_RAW which is not affected by NTP adjustments */ +#define TIMING_CLOCK CLOCK_MONOTONIC_RAW +#else +/* Fallback to CLOCK_MONOTONIC which is POSIX standard */ +#define TIMING_CLOCK CLOCK_MONOTONIC +#endif +#else +#define TIMING_CLOCK CLOCK_MONOTONIC_PRECISE +#endif + void print_usage(const char *prog_name) { printf("Usage: %s [-h] [-v]\n", prog_name); @@ -71,9 +87,9 @@ int main(int argc, char *argv[]) // Collect samples CHECK_STATUS(bladerf_enable_module(dev, BLADERF_MODULE_RX, true)); - CHECK_STATUS(clock_gettime(CLOCK_MONOTONIC_RAW, &start)); + CHECK_STATUS(clock_gettime(TIMING_CLOCK, &start)); CHECK_STATUS(bladerf_sync_rx(dev, samples, num_samples, NULL, 0)); - CHECK_STATUS(clock_gettime(CLOCK_MONOTONIC_RAW, &end)); + CHECK_STATUS(clock_gettime(TIMING_CLOCK, &end)); CHECK_STATUS(bladerf_enable_module(dev, BLADERF_MODULE_RX, false)); const double expected_sync_time = (double)num_samples / samp_rate; diff --git a/host/utilities/bladeRF-cli/src/input/editline.c b/host/utilities/bladeRF-cli/src/input/editline.c index a832c45b..893bd83d 100644 --- a/host/utilities/bladeRF-cli/src/input/editline.c +++ b/host/utilities/bladeRF-cli/src/input/editline.c @@ -20,7 +20,11 @@ #include #include #include +#ifdef __FreeBSD__ +#include +#else #include +#endif #include #include #include "input_impl.h" diff --git a/host/utilities/bladeRF-fsk b/host/utilities/bladeRF-fsk index 4e3e092a..2bd65a3a 160000 --- a/host/utilities/bladeRF-fsk +++ b/host/utilities/bladeRF-fsk @@ -1 +1 @@ -Subproject commit 4e3e092a5ab392bf6c2b104bd823e0f26990b1dc +Subproject commit 2bd65a3a97b3ca0de275e96678b6372d1e7933d9 diff --git a/host/utilities/bladeRF-update/bladeRF-update.c b/host/utilities/bladeRF-update/bladeRF-update.c index efe77288..6d20a4e6 100644 --- a/host/utilities/bladeRF-update/bladeRF-update.c +++ b/host/utilities/bladeRF-update/bladeRF-update.c @@ -1130,7 +1130,12 @@ void update_rbf_files(const UpdateInfo* update_info) { if (file_exists(filepath)) { if (verify_file(filepath, latest_version->files[j].md5, latest_version->files[j].sha256, update_info)) { rbf_up_to_date = true; - strncpy(existing_rbf_path, filepath, MAX_PATH_LENGTH - 1); + size_t copy_len = strlen(filepath); + if (copy_len >= MAX_PATH_LENGTH) { + copy_len = MAX_PATH_LENGTH - 1; + } + memcpy(existing_rbf_path, filepath, copy_len); + existing_rbf_path[copy_len] = '\0'; printf("[+] Found up-to-date RBF at %s, skipping download\n", filepath); break; } @@ -1184,7 +1189,12 @@ void update_fw_files(const UpdateInfo* update_info) { if (file_exists(filepath)) { if (verify_file(filepath, update_info->firmware.md5, update_info->firmware.sha256, update_info)) { fw_up_to_date = true; - strncpy(existing_fw_path, filepath, MAX_PATH_LENGTH - 1); + size_t copy_len = strlen(filepath); + if (copy_len >= MAX_PATH_LENGTH) { + copy_len = MAX_PATH_LENGTH - 1; + } + memcpy(existing_fw_path, filepath, copy_len); + existing_fw_path[copy_len] = '\0'; printf("[+] Found up-to-date firmware at %s, skipping download\n", filepath); break; } From 6d61b4f86f9e09d66236eafd2f4545751d320cf4 Mon Sep 17 00:00:00 2001 From: Ben Morse Date: Tue, 20 May 2025 13:26:22 -0700 Subject: [PATCH 23/35] bladeRF-fsk: add cmake flag to build FSK project --- host/utilities/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/host/utilities/CMakeLists.txt b/host/utilities/CMakeLists.txt index 2bfc2804..00abd4c6 100644 --- a/host/utilities/CMakeLists.txt +++ b/host/utilities/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 3.10...3.27) +option(BUILD_BLADERF_FSK "Build bladeRF FSK" ON) + if(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bladeRF-fsk/c) message(STATUS "bladeRF-fsk: Attempting to initialize missing submodule") @@ -28,5 +30,7 @@ add_subdirectory(bladeRF-cli) add_subdirectory(bladeRF-update) if(NOT MSVC) add_subdirectory(bladeRF-power) - add_subdirectory(bladeRF-fsk/c) + if(BUILD_BLADERF_FSK) + add_subdirectory(bladeRF-fsk/c) + endif() endif() From 35ec3c657f325854448ad33d43a4595aa205c959 Mon Sep 17 00:00:00 2001 From: Robert Ghilduta Date: Sat, 7 Jun 2025 21:55:08 -0700 Subject: [PATCH 24/35] hdl: update libad936x build order --- .../platforms/bladerf-micro/software/bladeRF_nios/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hdl/fpga/platforms/bladerf-micro/software/bladeRF_nios/Makefile b/hdl/fpga/platforms/bladerf-micro/software/bladeRF_nios/Makefile index bbfc42a9..b25c273e 100644 --- a/hdl/fpga/platforms/bladerf-micro/software/bladeRF_nios/Makefile +++ b/hdl/fpga/platforms/bladerf-micro/software/bladeRF_nios/Makefile @@ -82,3 +82,6 @@ $(LIBAD936X_BUILDDIR)/Makefile: $(LIBAD936X_MAKE_DEP) $(LIBAD936X_BUILDDIR)/libad936x.a: $(LIBAD936X_BUILD_DEP) @$(ECHO) Info: Building libad936x @$(MAKE) --no-print-directory -C $(LIBAD936X_BUILDDIR) ad936x + +# Ensure libad936x is built before the application objects that depend on its headers +$(APP_OBJS): $(LIBAD936X_BUILDDIR)/libad936x.a From 09efbb40b8ede1d39f744c561db1eb24ea5a1a99 Mon Sep 17 00:00:00 2001 From: Robert Ghilduta Date: Sun, 8 Jun 2025 12:19:02 -0700 Subject: [PATCH 25/35] hdl: build_bladerf.sh fixups Add H optarg, and ensure submodules are initialized prior to synthesis --- hdl/quartus/build_bladerf.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/hdl/quartus/build_bladerf.sh b/hdl/quartus/build_bladerf.sh index ebf9fb6f..09d52ff4 100755 --- a/hdl/quartus/build_bladerf.sh +++ b/hdl/quartus/build_bladerf.sh @@ -3,6 +3,24 @@ # Build a bladeRF fpga image ################################################################################ +# Ensure we're in the right directory and submodules are initialized +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" + +# Initialize and update submodules if needed +echo "Checking and initializing submodules..." +cd "$PROJECT_ROOT" +if [ -f .gitmodules ]; then + # Initialize submodules if not already initialized + git submodule init + + # Update submodules to ensure they're checked out + git submodule update + + echo "Submodules initialized and updated." +fi +cd "$SCRIPT_DIR" + cleanup() { # Prevent recursive cleanup calls trap '' INT TERM HUP @@ -146,7 +164,7 @@ flow="full" seed="1" omit_date=false -while getopts ":cb:r:s:a:fn:l:S:Dh" opt; do +while getopts ":cb:r:s:a:fn:l:S:DhH" opt; do case $opt in c) clear_work_dir=1 From a93191ae39e9d51d094688fa034882bc36621cb9 Mon Sep 17 00:00:00 2001 From: Ben Morse Date: Fri, 13 Jun 2025 15:24:43 -0700 Subject: [PATCH 26/35] bladeRF-fsk: bump - fix compiler error - update windows threading --- host/utilities/bladeRF-fsk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/utilities/bladeRF-fsk b/host/utilities/bladeRF-fsk index 2bd65a3a..16387541 160000 --- a/host/utilities/bladeRF-fsk +++ b/host/utilities/bladeRF-fsk @@ -1 +1 @@ -Subproject commit 2bd65a3a97b3ca0de275e96678b6372d1e7933d9 +Subproject commit 16387541dd97ddd34d7e648fc58bfdd7fed56b9f From 86c5063425b068fbc25a3fa46d5e0d302a530179 Mon Sep 17 00:00:00 2001 From: Ben Morse Date: Thu, 22 May 2025 14:17:23 -0700 Subject: [PATCH 27/35] host: Fixes for Windows - Changes around getopt/getopt_long - CLOCK_MONOTONIC fix - link fix --- .../test_oversample/CMakeLists.txt | 27 +++++++++++++++---- .../test_oversample/src/main.c | 20 +++++++++++++- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/host/libraries/libbladeRF_test/test_oversample/CMakeLists.txt b/host/libraries/libbladeRF_test/test_oversample/CMakeLists.txt index 8253bdb0..8b9cf347 100644 --- a/host/libraries/libbladeRF_test/test_oversample/CMakeLists.txt +++ b/host/libraries/libbladeRF_test/test_oversample/CMakeLists.txt @@ -5,16 +5,33 @@ set(INCLUDES ${libbladeRF_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/../common/include ${CMAKE_CURRENT_SOURCE_DIR}/../../../common/include + ${CMAKE_CURRENT_SOURCE_DIR}/../../../common/include/windows ) if(MSVC) set(INCLUDES ${INCLUDES} ${MSVC_C99_INCLUDES}) endif() -include_directories(${INCLUDES}) -add_executable(${PROJECT_NAME} src/main.c ../common/src/test_common.c) -target_link_libraries(${PROJECT_NAME} - libbladerf_shared - m +set(SRC + src/main.c + ../common/src/test_common.c ) +if(MSVC OR WIN32) + set(SRC ${SRC} + ${CMAKE_CURRENT_SOURCE_DIR}/../../../common/src/windows/getopt_long.c + ${CMAKE_CURRENT_SOURCE_DIR}/../../../common/src/windows/clock_gettime.c + ) +endif() + +include_directories(${INCLUDES}) +add_executable(${PROJECT_NAME} ${SRC}) +target_link_libraries(${PROJECT_NAME} + libbladerf_shared +) + +# Only link with the math library on non-Windows platforms +if(NOT WIN32 AND NOT MSVC) + target_link_libraries(${PROJECT_NAME} m) +endif() + add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME}) diff --git a/host/libraries/libbladeRF_test/test_oversample/src/main.c b/host/libraries/libbladeRF_test/test_oversample/src/main.c index 34a7e73b..9d4fcba0 100644 --- a/host/libraries/libbladeRF_test/test_oversample/src/main.c +++ b/host/libraries/libbladeRF_test/test_oversample/src/main.c @@ -2,7 +2,13 @@ #include #include #include +#include +#if !defined(_WIN32) #include // for getopt +#else +#include +#include +#endif #include #include #include "log.h" @@ -17,6 +23,10 @@ #define ANSI_COLOR_RESET "\x1b[0m" /* Use CLOCK_MONOTONIC as a portable alternative that works on FreeBSD and Linux */ +#if defined(_WIN32) +/* On Windows, only CLOCK_REALTIME is supported by our implementation */ +#define TIMING_CLOCK CLOCK_REALTIME +#else #ifndef CLOCK_MONOTONIC_PRECISE #ifdef __FreeBSD__ /* FreeBSD defines CLOCK_MONOTONIC_PRECISE for higher precision */ @@ -31,6 +41,7 @@ #else #define TIMING_CLOCK CLOCK_MONOTONIC_PRECISE #endif +#endif void print_usage(const char *prog_name) { @@ -44,6 +55,7 @@ int main(int argc, char *argv[]) int status = 0; struct bladerf *dev = NULL; int opt; + int opt_ind = 0; bladerf_log_set_verbosity(BLADERF_LOG_LEVEL_INFO); bladerf_frequency freq = 915e6; @@ -56,7 +68,13 @@ int main(int argc, char *argv[]) struct timespec start, end; - while ((opt = getopt(argc, argv, "hv")) != -1) { + struct option longopts[] = { + {"help", no_argument, 0, 'h'}, + {"verbose", no_argument, 0, 'v'}, + {0, 0, 0, 0} + }; + + while ((opt = getopt_long(argc, argv, "hv", longopts, &opt_ind)) != -1) { switch (opt) { case 'h': print_usage(argv[0]); From b2f9503fce2683c1e1273ab6c1d4621aff4d6d94 Mon Sep 17 00:00:00 2001 From: Ryan Thompson Date: Wed, 4 Jun 2025 09:27:13 -0500 Subject: [PATCH 28/35] bladeRF-power: build: look for brew installed ncurses --- host/utilities/bladeRF-power/CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/host/utilities/bladeRF-power/CMakeLists.txt b/host/utilities/bladeRF-power/CMakeLists.txt index f2b25c58..0a6ba1cf 100644 --- a/host/utilities/bladeRF-power/CMakeLists.txt +++ b/host/utilities/bladeRF-power/CMakeLists.txt @@ -3,6 +3,17 @@ project(bladeRF-power LANGUAGES C) set (CURSES_NEED_NCURSES TRUE) set (CURSES_NEED_WIDE TRUE) + +if(APPLE) + if(EXISTS "/opt/homebrew/opt/ncurses") + list(APPEND CMAKE_PREFIX_PATH "/opt/homebrew/opt/ncurses") + elseif(EXISTS "/usr/local/opt/ncurses") + list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/ncurses") + else() + message(WARNING "Homebrew ncurses not found. Install it if the build is failing: brew install ncurses") + endif() +endif() + find_package(Curses REQUIRED) include_directories( From ddc83606ff05492a8e3ce2f6493ac18cb85cfd77 Mon Sep 17 00:00:00 2001 From: Ben Morse Date: Sat, 7 Jun 2025 21:38:44 +0000 Subject: [PATCH 29/35] host: fix test_txrx_hwloop - fix duty cycle error for subsequent iterations in the test --- .../test_timestamps/src/test_txrx_hwloop.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/host/libraries/libbladeRF_test/test_timestamps/src/test_txrx_hwloop.c b/host/libraries/libbladeRF_test/test_timestamps/src/test_txrx_hwloop.c index f37b9116..c140bf83 100644 --- a/host/libraries/libbladeRF_test/test_timestamps/src/test_txrx_hwloop.c +++ b/host/libraries/libbladeRF_test/test_timestamps/src/test_txrx_hwloop.c @@ -269,6 +269,18 @@ int main(int argc, char *argv[]) { buf += 2 * to_send; } + // Wait for this burst to complete before scheduling the next one + if (status == 0 && i < (test.iterations - 1)) { + uint64_t burst_end_timestamp = meta.timestamp + test.burst_len; + int wait_status = wait_for_timestamp(dev_tx, BLADERF_MODULE_TX, + burst_end_timestamp, 1000); + if (wait_status != 0) { + fprintf(stderr, "Failed to wait for burst %u to complete: %s\n", + (unsigned int)i, bladerf_strerror(wait_status)); + status = first_error(status, wait_status); + } + } + meta.timestamp += test.period; } From e55e12b8895954aa1ae2b3459fccb7a7874e500a Mon Sep 17 00:00:00 2001 From: Ben Morse Date: Fri, 23 May 2025 02:13:25 -0700 Subject: [PATCH 30/35] docker: fix all docker images - delete many dockers, the rest are fully functioning - build.bash returns with correct exit code - base moves to alpine - add rocky in place of centos - some platforms require a cmake compile to get modern cmake - add i686 build to existing i386 --- host/misc/docker/_base.Dockerfile | 7 +- host/misc/docker/archlinux.Dockerfile | 4 +- host/misc/docker/build.bash | 16 +++- host/misc/docker/centos-7.Dockerfile | 78 ------------------- host/misc/docker/clang-scan.Dockerfile | 12 +-- .../docker/debian-stretch-i386.Dockerfile | 76 ------------------ host/misc/docker/fedora-latest.Dockerfile | 1 + host/misc/docker/freshen.bash | 0 ...ie.Dockerfile => mageia-latest.Dockerfile} | 37 +++++---- host/misc/docker/opensuse-latest.Dockerfile | 5 +- host/misc/docker/parallel.bash | 0 ...sie-i386.Dockerfile => rocky-8.Dockerfile} | 32 ++++---- ...-stretch.Dockerfile => rocky-9.Dockerfile} | 33 ++++---- host/misc/docker/test.bash | 0 .../misc/docker/ubuntu-bionic-i386.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-bionic.Dockerfile | 76 ------------------ .../misc/docker/ubuntu-cosmic-i386.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-cosmic.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-disco-i386.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-disco.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-eoan-i386.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-eoan.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-focal-i386.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-focal.Dockerfile | 2 + .../misc/docker/ubuntu-groovy-i386.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-groovy.Dockerfile | 76 ------------------ .../docker/ubuntu-hirsute-i386.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-hirsute.Dockerfile | 76 ------------------ .../misc/docker/ubuntu-impish-i386.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-impish.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-jammy-i386.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-jammy.Dockerfile | 3 + .../docker/ubuntu-kinetic-i386.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-kinetic.Dockerfile | 76 ------------------ .../misc/docker/ubuntu-latest-i386.Dockerfile | 40 +++++++++- host/misc/docker/ubuntu-latest.Dockerfile | 3 + host/misc/docker/ubuntu-lunar-i386.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-lunar.Dockerfile | 76 ------------------ .../misc/docker/ubuntu-mantic-i386.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-mantic.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-noble-i386.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-noble.Dockerfile | 3 + .../misc/docker/ubuntu-trusty-i386.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-trusty.Dockerfile | 76 ------------------ .../misc/docker/ubuntu-xenial-i386.Dockerfile | 76 ------------------ host/misc/docker/ubuntu-xenial.Dockerfile | 23 +++++- host/utilities/bladeRF-power/src/main.c | 4 +- 47 files changed, 158 insertions(+), 2197 deletions(-) mode change 100644 => 100755 host/misc/docker/build.bash delete mode 100644 host/misc/docker/centos-7.Dockerfile delete mode 100644 host/misc/docker/debian-stretch-i386.Dockerfile mode change 100644 => 100755 host/misc/docker/freshen.bash rename host/misc/docker/{debian-jessie.Dockerfile => mageia-latest.Dockerfile} (74%) mode change 100644 => 100755 host/misc/docker/parallel.bash rename host/misc/docker/{debian-jessie-i386.Dockerfile => rocky-8.Dockerfile} (80%) rename host/misc/docker/{debian-stretch.Dockerfile => rocky-9.Dockerfile} (79%) mode change 100644 => 100755 host/misc/docker/test.bash delete mode 100644 host/misc/docker/ubuntu-bionic-i386.Dockerfile delete mode 100644 host/misc/docker/ubuntu-bionic.Dockerfile delete mode 100644 host/misc/docker/ubuntu-cosmic-i386.Dockerfile delete mode 100644 host/misc/docker/ubuntu-cosmic.Dockerfile delete mode 100644 host/misc/docker/ubuntu-disco-i386.Dockerfile delete mode 100644 host/misc/docker/ubuntu-disco.Dockerfile delete mode 100644 host/misc/docker/ubuntu-eoan-i386.Dockerfile delete mode 100644 host/misc/docker/ubuntu-eoan.Dockerfile delete mode 100644 host/misc/docker/ubuntu-focal-i386.Dockerfile delete mode 100644 host/misc/docker/ubuntu-groovy-i386.Dockerfile delete mode 100644 host/misc/docker/ubuntu-groovy.Dockerfile delete mode 100644 host/misc/docker/ubuntu-hirsute-i386.Dockerfile delete mode 100644 host/misc/docker/ubuntu-hirsute.Dockerfile delete mode 100644 host/misc/docker/ubuntu-impish-i386.Dockerfile delete mode 100644 host/misc/docker/ubuntu-impish.Dockerfile delete mode 100644 host/misc/docker/ubuntu-jammy-i386.Dockerfile delete mode 100644 host/misc/docker/ubuntu-kinetic-i386.Dockerfile delete mode 100644 host/misc/docker/ubuntu-kinetic.Dockerfile delete mode 100644 host/misc/docker/ubuntu-lunar-i386.Dockerfile delete mode 100644 host/misc/docker/ubuntu-lunar.Dockerfile delete mode 100644 host/misc/docker/ubuntu-mantic-i386.Dockerfile delete mode 100644 host/misc/docker/ubuntu-mantic.Dockerfile delete mode 100644 host/misc/docker/ubuntu-noble-i386.Dockerfile delete mode 100644 host/misc/docker/ubuntu-trusty-i386.Dockerfile delete mode 100644 host/misc/docker/ubuntu-trusty.Dockerfile delete mode 100644 host/misc/docker/ubuntu-xenial-i386.Dockerfile diff --git a/host/misc/docker/_base.Dockerfile b/host/misc/docker/_base.Dockerfile index c1b91f93..f6544118 100644 --- a/host/misc/docker/_base.Dockerfile +++ b/host/misc/docker/_base.Dockerfile @@ -23,14 +23,11 @@ # This image is a cleaned version of the current working directory. # It is used to speed up the copy/clean process for later builds. -FROM ubuntu AS first +FROM alpine AS first LABEL maintainer="Nuand LLC " -RUN apt-get update \ - && apt-get install -y \ - git \ - && apt-get clean +RUN apk add --no-cache git COPY . /root/bladeRF ENV work="/root/bladeRF/hdl/quartus/work" diff --git a/host/misc/docker/archlinux.Dockerfile b/host/misc/docker/archlinux.Dockerfile index c769763f..89651bf3 100644 --- a/host/misc/docker/archlinux.Dockerfile +++ b/host/misc/docker/archlinux.Dockerfile @@ -1,7 +1,7 @@ # This file is part of the bladeRF project: # http://www.github.com/nuand/bladeRF # -# Copyright (c) 2018 Nuand LLC. +# Copyright (c) 2025 Nuand LLC. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -21,7 +21,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -FROM archlinux/base +FROM archlinux:latest LABEL maintainer="Nuand LLC " LABEL version="0.0.2" diff --git a/host/misc/docker/build.bash b/host/misc/docker/build.bash old mode 100644 new mode 100755 index 056152eb..6c7fb545 --- a/host/misc/docker/build.bash +++ b/host/misc/docker/build.bash @@ -38,8 +38,12 @@ make_jobs_clangscan=4 # assuming the script is 3 levels down (host/misc/docker) dfdir=$(dirname "${0}") +dfdir=$(cd "${dfdir}" && pwd) # Convert to absolute path basedir=${dfdir}/../../.. +# Always cd to the root. This script is a lot more reliable when we do this +cd $basedir + # globals success="" failure="" @@ -171,18 +175,28 @@ main () { echo "RESULT:SUCCESS:${success}" echo "RESULT:FAILED:${failure}" - [ -n "${failure}" ] && exit 1 + # this if structure is important, script was exiting 1 when it should be passing. bad version: [ -n "${failure}" ] && exit 1 + if [ -n "${failure}" ]; then + exit 1 + fi } if [ $# -gt 0 ]; then # We have an argument, so just build those images... + base_only=true for rootname in "$*"; do if [ "${rootname}" == "_base" ]; then do_base continue fi rels="${rels} ${rootname}" + base_only=false done + + # If we only processed _base targets, exit successfully + if [ "$base_only" = true ] && [ -z "${rels}" ]; then + exit 0 + fi else # No argument, so build everything cd ${basedir} diff --git a/host/misc/docker/centos-7.Dockerfile b/host/misc/docker/centos-7.Dockerfile deleted file mode 100644 index 7b2ba3ec..00000000 --- a/host/misc/docker/centos-7.Dockerfile +++ /dev/null @@ -1,78 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM centos:7 - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.4" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="CentOS" -LABEL com.nuand.ci.distribution.version="7" - -# Install things -RUN dnf install -y @development-tools \ - && dnf install -y \ - clang \ - cmake \ - doxygen \ - help2man \ - libedit \ - libedit-devel \ - libusbx \ - libusbx-devel \ - ncurses-devel \ - curl-devel \ - awk \ - pandoc \ - wget \ - && dnf clean all \ - && rm -rf /var/cache/dnf \ - && echo "/usr/local/lib" > /etc/ld.so.conf.d/locallib.conf \ - && echo "/usr/local/lib64" >> /etc/ld.so.conf.d/locallib.conf - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig diff --git a/host/misc/docker/clang-scan.Dockerfile b/host/misc/docker/clang-scan.Dockerfile index 46948a56..2fbb554f 100644 --- a/host/misc/docker/clang-scan.Dockerfile +++ b/host/misc/docker/clang-scan.Dockerfile @@ -1,7 +1,7 @@ # This file is part of the bladeRF project: # http://www.github.com/nuand/bladeRF # -# Copyright (c) 2018 Nuand LLC. +# Copyright (c) 2025 Nuand LLC. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -21,14 +21,14 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -FROM ubuntu:bionic +FROM ubuntu:noble LABEL maintainer="Nuand LLC " LABEL version="0.0.2" LABEL description="CI build environment for the bladeRF project" LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="bionic" -LABEL com.nuand.ci.distribution.version="18.04" +LABEL com.nuand.ci.distribution.codename="noble" +LABEL com.nuand.ci.distribution.version="24.04" # Install things RUN apt-get update \ @@ -60,5 +60,5 @@ ARG parallel=1 RUN cd /root/bladeRF/host \ && mkdir -p build \ && cd build \ - && cmake -DBUILD_DOCUMENTATION=ON -DCMAKE_C_COMPILER=/usr/share/clang/scan-build-6.0/libexec/ccc-analyzer ../ \ - && /usr/share/clang/scan-build-6.0/bin/scan-build -analyze-headers -maxloop 100 -o ./report make -j${parallel} + && scan-build cmake -DBUILD_DOCUMENTATION=ON ../ \ + && scan-build -analyze-headers -maxloop 100 -o ./report make -j${parallel} diff --git a/host/misc/docker/debian-stretch-i386.Dockerfile b/host/misc/docker/debian-stretch-i386.Dockerfile deleted file mode 100644 index b711f888..00000000 --- a/host/misc/docker/debian-stretch-i386.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM i386/debian:stretch - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Debian" -LABEL com.nuand.ci.distribution.codename="stretch-i386" -LABEL com.nuand.ci.distribution.version="9" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig diff --git a/host/misc/docker/fedora-latest.Dockerfile b/host/misc/docker/fedora-latest.Dockerfile index 9e0ac5c0..35af359e 100644 --- a/host/misc/docker/fedora-latest.Dockerfile +++ b/host/misc/docker/fedora-latest.Dockerfile @@ -72,6 +72,7 @@ RUN cd /root/bladeRF/ \ -DCMAKE_BUILD_TYPE=${buildtype} \ -DENABLE_FX3_BUILD=OFF \ -DENABLE_HOST_BUILD=ON \ + -DTEST_REGRESSION=ON \ -DTAGGED_RELEASE=${taggedrelease} ../ \ && make -j${parallel} \ && make install \ diff --git a/host/misc/docker/freshen.bash b/host/misc/docker/freshen.bash old mode 100644 new mode 100755 diff --git a/host/misc/docker/debian-jessie.Dockerfile b/host/misc/docker/mageia-latest.Dockerfile similarity index 74% rename from host/misc/docker/debian-jessie.Dockerfile rename to host/misc/docker/mageia-latest.Dockerfile index a4f4a150..c9d1e81e 100644 --- a/host/misc/docker/debian-jessie.Dockerfile +++ b/host/misc/docker/mageia-latest.Dockerfile @@ -1,7 +1,7 @@ # This file is part of the bladeRF project: # http://www.github.com/nuand/bladeRF # -# Copyright (c) 2018 Nuand LLC. +# Copyright (c) 2025 Nuand LLC. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -21,32 +21,32 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -FROM debian:jessie +FROM mageia:latest LABEL maintainer="Nuand LLC " LABEL version="0.0.2" LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Debian" -LABEL com.nuand.ci.distribution.codename="jessie" -LABEL com.nuand.ci.distribution.version="8" +LABEL com.nuand.ci.distribution.name="Mageia Linux" -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ +# Install development tools and required packages using urpmi (Mageia's package manager) +RUN urpmi.update -a \ + && urpmi --auto \ + task-c-devel \ + task-c++-devel \ clang \ cmake \ doxygen \ git \ help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ + lib64curl-devel \ + lib64edit-devel \ + lib64ncurses-devel \ + lib64usb1.0-devel \ usbutils \ - && apt-get clean + make \ + gcc \ + gcc-c++ \ + && urpme --auto-orphans # Copy in our build context COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF @@ -69,8 +69,13 @@ RUN cd /root/bladeRF/ \ -DCMAKE_BUILD_TYPE=${buildtype} \ -DENABLE_FX3_BUILD=OFF \ -DENABLE_HOST_BUILD=ON \ + -DTEST_REGRESSION=ON \ -DTAGGED_RELEASE=${taggedrelease} \ + -DCURSES_INCLUDE_PATH=/usr/include \ + -DCURSES_CURSES_LIBRARY=/usr/lib64/libcurses.so \ + -DCURSES_NCURSES_LIBRARY=/usr/lib64/libncurses.so \ ../ \ && make -j${parallel} \ && make install \ + && echo "/usr/local/lib64" > /etc/ld.so.conf.d/bladerf.conf \ && ldconfig diff --git a/host/misc/docker/opensuse-latest.Dockerfile b/host/misc/docker/opensuse-latest.Dockerfile index dfdacf35..c0c67436 100644 --- a/host/misc/docker/opensuse-latest.Dockerfile +++ b/host/misc/docker/opensuse-latest.Dockerfile @@ -1,7 +1,7 @@ # This file is part of the bladeRF project: # http://www.github.com/nuand/bladeRF # -# Copyright (c) 2018 Nuand LLC. +# Copyright (c) 2025 Nuand LLC. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -35,12 +35,15 @@ RUN zypper --non-interactive install \ cmake \ doxygen \ gcc \ + gcc-c++ \ git \ help2man \ + libcurl-devel \ libedit \ libedit-devel \ libusb \ libusb-devel \ + ncurses-devel \ pandoc \ wget diff --git a/host/misc/docker/parallel.bash b/host/misc/docker/parallel.bash old mode 100644 new mode 100755 diff --git a/host/misc/docker/debian-jessie-i386.Dockerfile b/host/misc/docker/rocky-8.Dockerfile similarity index 80% rename from host/misc/docker/debian-jessie-i386.Dockerfile rename to host/misc/docker/rocky-8.Dockerfile index 77628e16..b599605d 100644 --- a/host/misc/docker/debian-jessie-i386.Dockerfile +++ b/host/misc/docker/rocky-8.Dockerfile @@ -1,7 +1,7 @@ # This file is part of the bladeRF project: # http://www.github.com/nuand/bladeRF # -# Copyright (c) 2018 Nuand LLC. +# Copyright (c) 2025 Nuand LLC. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -21,32 +21,34 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -FROM i386/debian:jessie +FROM rockylinux:8-minimal LABEL maintainer="Nuand LLC " LABEL version="0.0.2" LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Debian" -LABEL com.nuand.ci.distribution.codename="jessie-i386" +LABEL com.nuand.ci.distribution.name="Rocky Linux" +LABEL com.nuand.ci.distribution.codename="8" LABEL com.nuand.ci.distribution.version="8" -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ +# Install dnf first, then everything else +RUN microdnf install -y dnf \ + && dnf update -y \ + && dnf install -y epel-release \ + && dnf config-manager --set-enabled powertools \ + && dnf groupinstall -y "Development Tools" \ + && dnf install -y \ clang \ cmake \ doxygen \ git \ help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ + libcurl-devel \ + libedit-devel \ + ncurses-devel \ + libusb1-devel \ pandoc \ - pkg-config \ usbutils \ - && apt-get clean + && dnf clean all # Copy in our build context COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF @@ -73,4 +75,4 @@ RUN cd /root/bladeRF/ \ ../ \ && make -j${parallel} \ && make install \ - && ldconfig + && ldconfig \ No newline at end of file diff --git a/host/misc/docker/debian-stretch.Dockerfile b/host/misc/docker/rocky-9.Dockerfile similarity index 79% rename from host/misc/docker/debian-stretch.Dockerfile rename to host/misc/docker/rocky-9.Dockerfile index 99b80161..c8610a15 100644 --- a/host/misc/docker/debian-stretch.Dockerfile +++ b/host/misc/docker/rocky-9.Dockerfile @@ -1,7 +1,7 @@ # This file is part of the bladeRF project: # http://www.github.com/nuand/bladeRF # -# Copyright (c) 2018 Nuand LLC. +# Copyright (c) 2025 Nuand LLC. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -21,32 +21,34 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -FROM debian:stretch +FROM rockylinux:9-minimal LABEL maintainer="Nuand LLC " LABEL version="0.0.2" LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Debian" -LABEL com.nuand.ci.distribution.codename="stretch" +LABEL com.nuand.ci.distribution.name="Rocky Linux" +LABEL com.nuand.ci.distribution.codename="9" LABEL com.nuand.ci.distribution.version="9" -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ +# Install dnf first, then everything else +RUN microdnf install -y dnf \ + && dnf update -y \ + && dnf install -y epel-release \ + && dnf groupinstall -y "Development Tools" \ + && dnf config-manager --set-enabled crb \ + && dnf install -y \ clang \ cmake \ doxygen \ git \ help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ + libcurl-devel \ + libedit-devel \ + ncurses-devel \ + libusb1-devel \ pandoc \ - pkg-config \ usbutils \ - && apt-get clean + && dnf clean all # Copy in our build context COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF @@ -69,8 +71,9 @@ RUN cd /root/bladeRF/ \ -DCMAKE_BUILD_TYPE=${buildtype} \ -DENABLE_FX3_BUILD=OFF \ -DENABLE_HOST_BUILD=ON \ + -DTEST_REGRESSION=ON \ -DTAGGED_RELEASE=${taggedrelease} \ ../ \ && make -j${parallel} \ && make install \ - && ldconfig + && ldconfig \ No newline at end of file diff --git a/host/misc/docker/test.bash b/host/misc/docker/test.bash old mode 100644 new mode 100755 diff --git a/host/misc/docker/ubuntu-bionic-i386.Dockerfile b/host/misc/docker/ubuntu-bionic-i386.Dockerfile deleted file mode 100644 index fe418064..00000000 --- a/host/misc/docker/ubuntu-bionic-i386.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM i386/ubuntu:bionic - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="bionic-i386" -LABEL com.nuand.ci.distribution.version="18.04" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig diff --git a/host/misc/docker/ubuntu-bionic.Dockerfile b/host/misc/docker/ubuntu-bionic.Dockerfile deleted file mode 100644 index 58b30131..00000000 --- a/host/misc/docker/ubuntu-bionic.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM ubuntu:bionic - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="bionic" -LABEL com.nuand.ci.distribution.version="18.04" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig diff --git a/host/misc/docker/ubuntu-cosmic-i386.Dockerfile b/host/misc/docker/ubuntu-cosmic-i386.Dockerfile deleted file mode 100644 index 212584c3..00000000 --- a/host/misc/docker/ubuntu-cosmic-i386.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM i386/ubuntu:cosmic - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="cosmic-i386" -LABEL com.nuand.ci.distribution.version="18.10" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig diff --git a/host/misc/docker/ubuntu-cosmic.Dockerfile b/host/misc/docker/ubuntu-cosmic.Dockerfile deleted file mode 100644 index 36f8ec2f..00000000 --- a/host/misc/docker/ubuntu-cosmic.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM ubuntu:cosmic - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="cosmic" -LABEL com.nuand.ci.distribution.version="18.10" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig diff --git a/host/misc/docker/ubuntu-disco-i386.Dockerfile b/host/misc/docker/ubuntu-disco-i386.Dockerfile deleted file mode 100644 index 0b8e62a9..00000000 --- a/host/misc/docker/ubuntu-disco-i386.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2019 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM i386/ubuntu:disco - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="disco-i386" -LABEL com.nuand.ci.distribution.version="19.04" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig diff --git a/host/misc/docker/ubuntu-disco.Dockerfile b/host/misc/docker/ubuntu-disco.Dockerfile deleted file mode 100644 index fdfb8871..00000000 --- a/host/misc/docker/ubuntu-disco.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2019 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM ubuntu:disco - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="disco" -LABEL com.nuand.ci.distribution.version="19.04" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig diff --git a/host/misc/docker/ubuntu-eoan-i386.Dockerfile b/host/misc/docker/ubuntu-eoan-i386.Dockerfile deleted file mode 100644 index 10f01064..00000000 --- a/host/misc/docker/ubuntu-eoan-i386.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM i386/ubuntu:eoan - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="eoan" -LABEL com.nuand.ci.distribution.version="19.10-i386" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig diff --git a/host/misc/docker/ubuntu-eoan.Dockerfile b/host/misc/docker/ubuntu-eoan.Dockerfile deleted file mode 100644 index 40b6efe5..00000000 --- a/host/misc/docker/ubuntu-eoan.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM ubuntu:eoan - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="eoan" -LABEL com.nuand.ci.distribution.version="19.10" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig diff --git a/host/misc/docker/ubuntu-focal-i386.Dockerfile b/host/misc/docker/ubuntu-focal-i386.Dockerfile deleted file mode 100644 index e5b3d018..00000000 --- a/host/misc/docker/ubuntu-focal-i386.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM i386/ubuntu:focal - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="focal" -LABEL com.nuand.ci.distribution.version="20.10-i386" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig diff --git a/host/misc/docker/ubuntu-focal.Dockerfile b/host/misc/docker/ubuntu-focal.Dockerfile index 78547b0f..9c98409b 100644 --- a/host/misc/docker/ubuntu-focal.Dockerfile +++ b/host/misc/docker/ubuntu-focal.Dockerfile @@ -30,6 +30,8 @@ LABEL com.nuand.ci.distribution.name="Ubuntu" LABEL com.nuand.ci.distribution.codename="focal" LABEL com.nuand.ci.distribution.version="20.10" +ENV DEBIAN_FRONTEND=noninteractive + # Install things RUN apt-get update \ && apt-get install -y \ diff --git a/host/misc/docker/ubuntu-groovy-i386.Dockerfile b/host/misc/docker/ubuntu-groovy-i386.Dockerfile deleted file mode 100644 index 9dfe0876..00000000 --- a/host/misc/docker/ubuntu-groovy-i386.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018-2025 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM i386/ubuntu:groovy - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="groovy" -LABEL com.nuand.ci.distribution.version="20.10-i386" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-groovy.Dockerfile b/host/misc/docker/ubuntu-groovy.Dockerfile deleted file mode 100644 index 11ef6111..00000000 --- a/host/misc/docker/ubuntu-groovy.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018-2025 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM ubuntu:groovy - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="groovy" -LABEL com.nuand.ci.distribution.version="20.10" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-hirsute-i386.Dockerfile b/host/misc/docker/ubuntu-hirsute-i386.Dockerfile deleted file mode 100644 index fb16895a..00000000 --- a/host/misc/docker/ubuntu-hirsute-i386.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018-2025 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM i386/ubuntu:hirsute - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="hirsute" -LABEL com.nuand.ci.distribution.version="21.04-i386" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-hirsute.Dockerfile b/host/misc/docker/ubuntu-hirsute.Dockerfile deleted file mode 100644 index f25ed766..00000000 --- a/host/misc/docker/ubuntu-hirsute.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018-2025 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM ubuntu:hirsute - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="hirsute" -LABEL com.nuand.ci.distribution.version="21.04" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-impish-i386.Dockerfile b/host/misc/docker/ubuntu-impish-i386.Dockerfile deleted file mode 100644 index b47d3eba..00000000 --- a/host/misc/docker/ubuntu-impish-i386.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018-2025 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM i386/ubuntu:impish - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="impish" -LABEL com.nuand.ci.distribution.version="21.10-i386" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-impish.Dockerfile b/host/misc/docker/ubuntu-impish.Dockerfile deleted file mode 100644 index 25077ceb..00000000 --- a/host/misc/docker/ubuntu-impish.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018-2025 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM ubuntu:impish - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="impish" -LABEL com.nuand.ci.distribution.version="21.10" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-jammy-i386.Dockerfile b/host/misc/docker/ubuntu-jammy-i386.Dockerfile deleted file mode 100644 index 1824f113..00000000 --- a/host/misc/docker/ubuntu-jammy-i386.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018-2025 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM i386/ubuntu:jammy - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="jammy" -LABEL com.nuand.ci.distribution.version="22.04-i386" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-jammy.Dockerfile b/host/misc/docker/ubuntu-jammy.Dockerfile index b587dc88..883668d4 100644 --- a/host/misc/docker/ubuntu-jammy.Dockerfile +++ b/host/misc/docker/ubuntu-jammy.Dockerfile @@ -30,6 +30,8 @@ LABEL com.nuand.ci.distribution.name="Ubuntu" LABEL com.nuand.ci.distribution.codename="jammy" LABEL com.nuand.ci.distribution.version="22.04" +ENV DEBIAN_FRONTEND=noninteractive + # Install things RUN apt-get update \ && apt-get install -y \ @@ -69,6 +71,7 @@ RUN cd /root/bladeRF/ \ -DCMAKE_BUILD_TYPE=${buildtype} \ -DENABLE_FX3_BUILD=OFF \ -DENABLE_HOST_BUILD=ON \ + -DTEST_REGRESSION=ON \ -DTAGGED_RELEASE=${taggedrelease} \ ../ \ && make -j${parallel} \ diff --git a/host/misc/docker/ubuntu-kinetic-i386.Dockerfile b/host/misc/docker/ubuntu-kinetic-i386.Dockerfile deleted file mode 100644 index a98a0be8..00000000 --- a/host/misc/docker/ubuntu-kinetic-i386.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018-2025 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM i386/ubuntu:kinetic - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="kinetic" -LABEL com.nuand.ci.distribution.version="22.10-i386" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-kinetic.Dockerfile b/host/misc/docker/ubuntu-kinetic.Dockerfile deleted file mode 100644 index 8697a052..00000000 --- a/host/misc/docker/ubuntu-kinetic.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018-2025 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM ubuntu:kinetic - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="kinetic" -LABEL com.nuand.ci.distribution.version="22.10" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-latest-i386.Dockerfile b/host/misc/docker/ubuntu-latest-i386.Dockerfile index 44024d95..38bac0ea 100644 --- a/host/misc/docker/ubuntu-latest-i386.Dockerfile +++ b/host/misc/docker/ubuntu-latest-i386.Dockerfile @@ -1,7 +1,7 @@ # This file is part of the bladeRF project: # http://www.github.com/nuand/bladeRF # -# Copyright (c) 2018-2025 Nuand LLC. +# Copyright (c) 2025 Nuand LLC. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -35,19 +35,34 @@ RUN apt-get update \ && apt-get install -y \ build-essential \ clang \ - cmake \ doxygen \ git \ help2man \ libcurl4-openssl-dev \ libedit-dev \ libncurses5-dev \ + libncurses-dev \ + libncursesw5-dev \ + libssl-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ usbutils \ + wget \ && apt-get clean +# Custom compile cmake because the version provided in the i386 repos is too old for our cmake scripts +RUN version=3.28 \ + && build=1 \ + && mkdir ~/temp \ + && cd ~/temp \ + && wget -nv https://cmake.org/files/v$version/cmake-$version.$build.tar.gz \ + && tar -xzf cmake-$version.$build.tar.gz \ + && cd cmake-$version.$build/ \ + && ./bootstrap --parallel=$(nproc) --no-debugger \ + && make -j$(nproc) \ + && make install + # Copy in our build context COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config @@ -59,6 +74,8 @@ ARG buildtype=Release ARG taggedrelease=NO ARG parallel=1 +RUN ${compiler} --version + # Do the build! RUN cd /root/bladeRF/ \ && mkdir -p build \ @@ -73,4 +90,23 @@ RUN cd /root/bladeRF/ \ ../ \ && make -j${parallel} \ && make install \ + && ldconfig + +# Do an i686 build +RUN cd /root/bladeRF/ \ + && rm -rf build \ + && mkdir -p build \ + && cd build \ + && cmake \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_C_COMPILER=${compiler} \ + -DCMAKE_BUILD_TYPE=${buildtype} \ + -DCMAKE_C_FLAGS="-march=i686 -mtune=i686" \ + -DCMAKE_CXX_FLAGS="-march=i686 -mtune=i686" \ + -DENABLE_FX3_BUILD=OFF \ + -DENABLE_HOST_BUILD=ON \ + -DTAGGED_RELEASE=${taggedrelease} \ + ../ \ + && make -j${parallel} \ + && make install \ && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-latest.Dockerfile b/host/misc/docker/ubuntu-latest.Dockerfile index b1e4d9e7..1a191cbf 100644 --- a/host/misc/docker/ubuntu-latest.Dockerfile +++ b/host/misc/docker/ubuntu-latest.Dockerfile @@ -30,6 +30,8 @@ LABEL com.nuand.ci.distribution.name="Ubuntu" LABEL com.nuand.ci.distribution.codename="latest" LABEL com.nuand.ci.distribution.version="latest" +ENV DEBIAN_FRONTEND=noninteractive + # Install things RUN apt-get update \ && apt-get install -y \ @@ -69,6 +71,7 @@ RUN cd /root/bladeRF/ \ -DCMAKE_BUILD_TYPE=${buildtype} \ -DENABLE_FX3_BUILD=OFF \ -DENABLE_HOST_BUILD=ON \ + -DTEST_REGRESSION=ON \ -DTAGGED_RELEASE=${taggedrelease} \ ../ \ && make -j${parallel} \ diff --git a/host/misc/docker/ubuntu-lunar-i386.Dockerfile b/host/misc/docker/ubuntu-lunar-i386.Dockerfile deleted file mode 100644 index 27f0f7ea..00000000 --- a/host/misc/docker/ubuntu-lunar-i386.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018-2025 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM i386/ubuntu:lunar - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="lunar" -LABEL com.nuand.ci.distribution.version="23.04-i386" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-lunar.Dockerfile b/host/misc/docker/ubuntu-lunar.Dockerfile deleted file mode 100644 index 042f787d..00000000 --- a/host/misc/docker/ubuntu-lunar.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018-2025 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM ubuntu:lunar - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="lunar" -LABEL com.nuand.ci.distribution.version="23.04" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-mantic-i386.Dockerfile b/host/misc/docker/ubuntu-mantic-i386.Dockerfile deleted file mode 100644 index 12890378..00000000 --- a/host/misc/docker/ubuntu-mantic-i386.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018-2025 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM i386/ubuntu:mantic - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="mantic" -LABEL com.nuand.ci.distribution.version="23.10-i386" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-mantic.Dockerfile b/host/misc/docker/ubuntu-mantic.Dockerfile deleted file mode 100644 index ae9924d0..00000000 --- a/host/misc/docker/ubuntu-mantic.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018-2025 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM ubuntu:mantic - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="mantic" -LABEL com.nuand.ci.distribution.version="23.10" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-noble-i386.Dockerfile b/host/misc/docker/ubuntu-noble-i386.Dockerfile deleted file mode 100644 index 034a307c..00000000 --- a/host/misc/docker/ubuntu-noble-i386.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018-2025 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM i386/ubuntu:noble - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="noble" -LABEL com.nuand.ci.distribution.version="24.04-i386" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig \ No newline at end of file diff --git a/host/misc/docker/ubuntu-noble.Dockerfile b/host/misc/docker/ubuntu-noble.Dockerfile index c3184c35..8887d05e 100644 --- a/host/misc/docker/ubuntu-noble.Dockerfile +++ b/host/misc/docker/ubuntu-noble.Dockerfile @@ -30,6 +30,8 @@ LABEL com.nuand.ci.distribution.name="Ubuntu" LABEL com.nuand.ci.distribution.codename="noble" LABEL com.nuand.ci.distribution.version="24.04" +ENV DEBIAN_FRONTEND=noninteractive + # Install things RUN apt-get update \ && apt-get install -y \ @@ -69,6 +71,7 @@ RUN cd /root/bladeRF/ \ -DCMAKE_BUILD_TYPE=${buildtype} \ -DENABLE_FX3_BUILD=OFF \ -DENABLE_HOST_BUILD=ON \ + -DTEST_REGRESSION=ON \ -DTAGGED_RELEASE=${taggedrelease} \ ../ \ && make -j${parallel} \ diff --git a/host/misc/docker/ubuntu-trusty-i386.Dockerfile b/host/misc/docker/ubuntu-trusty-i386.Dockerfile deleted file mode 100644 index 08bdd649..00000000 --- a/host/misc/docker/ubuntu-trusty-i386.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM i386/ubuntu:trusty - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="trusty-i386" -LABEL com.nuand.ci.distribution.version="14.04" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig diff --git a/host/misc/docker/ubuntu-trusty.Dockerfile b/host/misc/docker/ubuntu-trusty.Dockerfile deleted file mode 100644 index ba8cdfde..00000000 --- a/host/misc/docker/ubuntu-trusty.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM ubuntu:trusty - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="trusty" -LABEL com.nuand.ci.distribution.version="14.04" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig diff --git a/host/misc/docker/ubuntu-xenial-i386.Dockerfile b/host/misc/docker/ubuntu-xenial-i386.Dockerfile deleted file mode 100644 index 951dbc76..00000000 --- a/host/misc/docker/ubuntu-xenial-i386.Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -# This file is part of the bladeRF project: -# http://www.github.com/nuand/bladeRF -# -# Copyright (c) 2018 Nuand LLC. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - -FROM i386/ubuntu:xenial - -LABEL maintainer="Nuand LLC " -LABEL version="0.0.2" -LABEL description="CI build environment for the bladeRF project" -LABEL com.nuand.ci.distribution.name="Ubuntu" -LABEL com.nuand.ci.distribution.codename="xenial-i386" -LABEL com.nuand.ci.distribution.version="16.04" - -# Install things -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - clang \ - cmake \ - doxygen \ - git \ - help2man \ - libcurl4-openssl-dev \ - libedit-dev \ - libncurses5-dev \ - libusb-1.0-0-dev \ - pandoc \ - pkg-config \ - usbutils \ - && apt-get clean - -# Copy in our build context -COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF -COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config -WORKDIR /root/bladeRF - -# Build arguments -ARG compiler=gcc -ARG buildtype=Release -ARG taggedrelease=NO -ARG parallel=1 - -# Do the build! -RUN cd /root/bladeRF/ \ - && mkdir -p build \ - && cd build \ - && cmake \ - -DBUILD_DOCUMENTATION=ON \ - -DCMAKE_C_COMPILER=${compiler} \ - -DCMAKE_BUILD_TYPE=${buildtype} \ - -DENABLE_FX3_BUILD=OFF \ - -DENABLE_HOST_BUILD=ON \ - -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ - && make -j${parallel} \ - && make install \ - && ldconfig diff --git a/host/misc/docker/ubuntu-xenial.Dockerfile b/host/misc/docker/ubuntu-xenial.Dockerfile index 5019b3c9..75f2844e 100644 --- a/host/misc/docker/ubuntu-xenial.Dockerfile +++ b/host/misc/docker/ubuntu-xenial.Dockerfile @@ -1,7 +1,7 @@ # This file is part of the bladeRF project: # http://www.github.com/nuand/bladeRF # -# Copyright (c) 2018 Nuand LLC. +# Copyright (c) 2025 Nuand LLC. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -42,12 +42,28 @@ RUN apt-get update \ libcurl4-openssl-dev \ libedit-dev \ libncurses5-dev \ + libncurses-dev \ + libncursesw5-dev \ + libssl-dev \ libusb-1.0-0-dev \ pandoc \ pkg-config \ usbutils \ + wget \ && apt-get clean +# Custom compile cmake because the version provided in the xenial repos is too old for our cmake scripts +RUN version=3.28 \ +&& build=1 \ +&& mkdir ~/temp \ +&& cd ~/temp \ +&& wget -nv https://cmake.org/files/v$version/cmake-$version.$build.tar.gz \ +&& tar -xzf cmake-$version.$build.tar.gz \ +&& cd cmake-$version.$build/ \ +&& ./bootstrap --parallel=$(nproc) --no-debugger \ +&& make -j$(nproc) \ +&& make install + # Copy in our build context COPY --from=nuand/bladerf-buildenv:base /root/bladeRF /root/bladeRF COPY --from=nuand/bladerf-buildenv:base /root/.config /root/.config @@ -59,6 +75,8 @@ ARG buildtype=Release ARG taggedrelease=NO ARG parallel=1 +RUN ${compiler} --version + # Do the build! RUN cd /root/bladeRF/ \ && mkdir -p build \ @@ -70,7 +88,8 @@ RUN cd /root/bladeRF/ \ -DENABLE_FX3_BUILD=OFF \ -DENABLE_HOST_BUILD=ON \ -DTAGGED_RELEASE=${taggedrelease} \ - ../ \ + ../ \ && make -j${parallel} \ && make install \ && ldconfig + \ No newline at end of file diff --git a/host/utilities/bladeRF-power/src/main.c b/host/utilities/bladeRF-power/src/main.c index 58baba3f..086ee14c 100644 --- a/host/utilities/bladeRF-power/src/main.c +++ b/host/utilities/bladeRF-power/src/main.c @@ -94,7 +94,7 @@ int main(int argc, char *argv[]) case 't': case 'r': - if (test.direction != DIRECTION_UNSET) { + if ((int)test.direction != DIRECTION_UNSET) { fprintf(stderr, "Only one direction may be specified.\n"); test.direction = ask_direction(); break; @@ -145,7 +145,7 @@ int main(int argc, char *argv[]) CHECK(bladerf_get_devinfo(dev, &devinfo)); printf("Device: %s\n", devinfo.serial); - if (test.direction == DIRECTION_UNSET) { + if ((int)test.direction == DIRECTION_UNSET) { test.direction = ask_direction(); } From a81b7ce4c5e8199eaad7e06bdbe0bbe090507ada Mon Sep 17 00:00:00 2001 From: Ben Morse Date: Wed, 11 Jun 2025 01:46:40 -0700 Subject: [PATCH 31/35] hdl: fix foxhunt build error --- hdl/fpga/platforms/bladerf-micro/software/foxhunt/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hdl/fpga/platforms/bladerf-micro/software/foxhunt/Makefile b/hdl/fpga/platforms/bladerf-micro/software/foxhunt/Makefile index cb8a9e85..4b39a35f 100644 --- a/hdl/fpga/platforms/bladerf-micro/software/foxhunt/Makefile +++ b/hdl/fpga/platforms/bladerf-micro/software/foxhunt/Makefile @@ -38,7 +38,8 @@ LIBAD936X_DIR := ../../../../fpga/ip/analogdevicesinc/no_OS INC_DIRS += $(LIBAD936X_BUILDDIR) \ ../$(LIBAD936X_DIR)/include \ - ../../../../../../host/common/include + ../../../../../../host/common/include \ + ../../../../../../thirdparty/analogdevicesinc/no-OS_local/platform_bladerf2/ LIB_DIRS += $(LIBAD936X_BUILDDIR) LDDEPS += $(LIBAD936X_BUILDDIR)/libad936x.a From 4494aa41abbc8d24d4b49dce7eb8eb474c123fe7 Mon Sep 17 00:00:00 2001 From: Ben Morse Date: Wed, 11 Jun 2025 01:48:08 -0700 Subject: [PATCH 32/35] host: test_regression can build every bitfile --- .../test_regression/CMakeLists.txt | 10 ++ .../test_regression/src/main.cxx | 165 ++++++++++++++++-- 2 files changed, 158 insertions(+), 17 deletions(-) diff --git a/host/libraries/libbladeRF_test/test_regression/CMakeLists.txt b/host/libraries/libbladeRF_test/test_regression/CMakeLists.txt index 78f09b88..5747d519 100644 --- a/host/libraries/libbladeRF_test/test_regression/CMakeLists.txt +++ b/host/libraries/libbladeRF_test/test_regression/CMakeLists.txt @@ -72,6 +72,16 @@ add_custom_target(test_synthesis DEPENDS ${PROJECT_NAME} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +add_custom_target(prep_ci + COMMAND ${PROJECT_NAME} --gtest_filter="dump_tests.disk" --gtest_output="json" + DEPENDS ${PROJECT_NAME} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) + +add_custom_target(bitfile_ci + COMMAND ${PROJECT_NAME} --gtest_filter="bitfile_ci/synth_ci*" --gtest_output="json":bitfile_ci.json + DEPENDS ${PROJECT_NAME} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) + target_link_libraries( ${PROJECT_NAME} libbladerf_shared diff --git a/host/libraries/libbladeRF_test/test_regression/src/main.cxx b/host/libraries/libbladeRF_test/test_regression/src/main.cxx index 3d95ba07..5813c603 100644 --- a/host/libraries/libbladeRF_test/test_regression/src/main.cxx +++ b/host/libraries/libbladeRF_test/test_regression/src/main.cxx @@ -36,9 +36,11 @@ #include #include #include +#include #define TEST_LIBBLADERF libbladeRF #define TEST_XB200 xb200 +#define BLADERF_QUARTUS_CI_DIR "bladeRF/hdl/quartus/" #define BLADERF_QUARTUS_DIR "../../hdl/quartus/" #define BLADERF_MODELSIM_DIR "../../hdl/fpga/platforms/bladerf-micro/modelsim/" #define NIOS2SHELL "~/intelFPGA_lite/20.1/nios2eds/nios2_command_shell.sh" @@ -474,6 +476,20 @@ const std::vector> fpga_images {"bladeRF-micro", "wlan", "A9"} }; +const std::vector> fpga_images_ci = { + {"bladeRF", "hosted", "40"}, + {"bladeRF", "hosted", "115"}, + {"bladeRF", "fsk_bridge", "40"}, + {"bladeRF", "fsk_bridge", "115"}, + {"bladeRF", "qpsk_tx", "40"}, + {"bladeRF", "qpsk_tx", "115"}, + {"bladeRF-micro", "hosted", "A4"}, + {"bladeRF-micro", "hosted", "A9"}, + {"bladeRF-micro", "foxhunt", "A4"}, + {"bladeRF-micro", "foxhunt", "A9"}, + {"bladeRF-micro", "wlan", "A9"} +}; + class synth: public ::testing::TestWithParam> { char build_dir[PATH_MAX]; void SetUp() override { @@ -506,6 +522,8 @@ class synth: public ::testing::TestWithParam(GetParam()); std::string revision = std::get<1>(GetParam()); @@ -521,27 +539,130 @@ TEST_P(synth, synthesis) { EXPECT_EQ(status, 0); } +TEST_P(synth_ci, synthesis) { + std::string board = std::get<0>(GetParam()); + std::string revision = std::get<1>(GetParam()); + std::string size = std::get<2>(GetParam()); + + std::string command = NIOS2SHELL; + command += " ./build_bladerf.sh "; + command += " -b " + board; + command += " -r " + revision; + command += " -s " + size; + command += " -D "; + + status = std::system(command.c_str()); + EXPECT_EQ(status, 0); +} + + +/** + * @brief Convert a tuple into a build output folder used by build_bladerf.sh + * This is only valid when -o is passed to build_bladerf.sh + * + * @param[in] row The tuple + * + * @return The output folder name + */ +std::string build_folder_name(const std::tuple& row) { + std::string name = absl::StrCat( + std::get<1>(row), "x", + std::get<2>(row)); + absl::c_replace_if(name, [](char c) { return !std::isalnum(c); }, '_'); + return name; +} + +/** + * @brief Convert a tuple into a test name. + * + * @param[in] row The tuple + * + * @return The name of the test + */ +std::string test_name(const std::tuple& row) { + std::string name = absl::StrCat( + std::get<0>(row), "_", + std::get<1>(row), "_", + std::get<2>(row)); + absl::c_replace_if(name, [](char c) { return !std::isalnum(c); }, '_'); + return name; +} + +/** + * @brief Convert a TestParamInfo into a test name. + * + * @param[in] row The TestParamInfo + * + * @return The name of the test + */ +std::string info_test_name(const testing::TestParamInfo& info) { + return test_name(info.param); +} + INSTANTIATE_TEST_SUITE_P(synthesize_defaults, synth, ::testing::ValuesIn(fpga_images_defaults), - [](const testing::TestParamInfo& info) { - std::string name = absl::StrCat( - std::get<0>(info.param), "_", - std::get<1>(info.param), "_", - std::get<2>(info.param)); - absl::c_replace_if(name, [](char c) { return !std::isalnum(c); }, '_'); - return name; - }); + info_test_name); INSTANTIATE_TEST_SUITE_P(DISABLED_synthesize_all, synth, ::testing::ValuesIn(fpga_images_all), - [](const testing::TestParamInfo& info) { - std::string name = absl::StrCat( - std::get<0>(info.param), "_", - std::get<1>(info.param), "_", - std::get<2>(info.param)); - absl::c_replace_if(name, [](char c) { return !std::isalnum(c); }, '_'); - return name; - }); + info_test_name); + +INSTANTIATE_TEST_SUITE_P(bitfile_ci, synth_ci, + ::testing::ValuesIn(fpga_images_ci), + info_test_name); + +/** + * @brief Not a test, writes out an artifacts file to disk so CI can pick it up. + * + */ +TEST(dump_tests, disk) { + std::vector out; + for(const auto& row : fpga_images_ci) { + out.push_back(test_name(row)); + out.push_back(std::string(BLADERF_QUARTUS_CI_DIR) + build_folder_name(row)); + } + + std::ofstream file("ci_artifacts.txt"); // Create an ofstream object and open "ci_artifacts.txt" for writing + + if (!file.is_open()) { + std::cerr << "Failed to open file." << std::endl; + FAIL(); + } + + file << "["; + + for(size_t i = 0; i < out.size(); ++i) { + file << "\"" << out[i] << "\""; + if (i < out.size() - 1) { + file << ", "; + } + } + + file << "]" << std::endl; + file.close(); +} + +/** + * @brief Convert argc/argv into a vector, and filter out gtest_ args + * + * @param[in] argc The number of arguments + * @param[in] argv The arguments + * + * @return A vector of arguments + */ +std::vector filter_gtest_args(int argc, char** argv) { + std::vector args; + for (int i = 0; i < argc; ++i) { + std::string arg(argv[i]); + + // skip all arguments that are for gtest + if (i == 0 || arg.find("--gtest_") != 0) { + std::cout << "adding " << arg << "\n"; + args.push_back(arg); + } + } + return args; +} #define OPTARG "v:h" static struct option long_options[] = { @@ -556,8 +677,17 @@ int main(int argc, char** argv) { int opt_ind = 0; bladerf_log_level log_level; + auto filtered = filter_gtest_args(argc, argv); + const int argc_filt = filtered.size(); + const char* argv_filt[argc_filt]; + + // copy back into a c-style array for getopt_long + for (size_t i = 0; i < filtered.size(); ++i) { + argv_filt[i] = filtered[i].c_str(); + } + while (opt != -1) { - opt = getopt_long(argc, argv, OPTARG, long_options, &opt_ind); + opt = getopt_long(argc_filt, const_cast(argv_filt), OPTARG, long_options, &opt_ind); switch (opt) { case 'v': @@ -579,6 +709,7 @@ int main(int argc, char** argv) { printf(" Example filters: \"libbladeRF*\", \"hdl*\", \"synthesis*\"\n"); printf(" --gtest_also_run_disabled_tests Run only the tests matching the filter.\n"); printf(" --gtest_output=\"json\" Generates JSON report of test run.\n"); + printf(" --gtest_help View gtest specific help menu.\n"); printf("\n"); return EXIT_SUCCESS; From b4a6ef38fa906adaba2f1a570bf04888a853bd58 Mon Sep 17 00:00:00 2001 From: subrad Date: Thu, 26 Jun 2025 10:19:28 -0400 Subject: [PATCH 33/35] fix naming of gain table loading since it over took gain setting functions --- host/utilities/bladeRF-cli/CMakeLists.txt | 2 +- host/utilities/bladeRF-cli/src/cmd/cmd.c | 8 ++++---- host/utilities/bladeRF-cli/src/cmd/doc/cmd_help.h.in | 12 ++++++------ ...ad_gain_calibration.c => gain_calibration_load.c} | 2 +- host/utilities/bladeRF-cli/src/cmd/printset.c | 4 ++-- host/utilities/bladeRF-cli/src/cmd/printset.h | 2 +- host/utilities/bladeRF-cli/src/cmd/printset_impl.c | 6 +++--- 7 files changed, 18 insertions(+), 18 deletions(-) rename host/utilities/bladeRF-cli/src/cmd/{load_gain_calibration.c => gain_calibration_load.c} (95%) diff --git a/host/utilities/bladeRF-cli/CMakeLists.txt b/host/utilities/bladeRF-cli/CMakeLists.txt index bd257a6c..fffcec26 100644 --- a/host/utilities/bladeRF-cli/CMakeLists.txt +++ b/host/utilities/bladeRF-cli/CMakeLists.txt @@ -196,11 +196,11 @@ set(BLADERF_CLI_SOURCE src/cmd/flash_init_cal.c src/cmd/flash_restore.c src/cmd/fw_log.c + src/cmd/gain_calibration_load.c src/cmd/generate.c src/cmd/info.c src/cmd/jump_boot.c src/cmd/lms_reg_info.c - src/cmd/load_gain_calibration.c src/cmd/load.c src/cmd/mimo.c src/cmd/open.c diff --git a/host/utilities/bladeRF-cli/src/cmd/cmd.c b/host/utilities/bladeRF-cli/src/cmd/cmd.c index bdc25ceb..232568ce 100644 --- a/host/utilities/bladeRF-cli/src/cmd/cmd.c +++ b/host/utilities/bladeRF-cli/src/cmd/cmd.c @@ -43,12 +43,12 @@ DECLARE_CMD(flash_image, "flash_image", "fi"); DECLARE_CMD(flash_init_cal, "flash_init_cal", "fic"); DECLARE_CMD(flash_restore, "flash_restore", "fr"); DECLARE_CMD(fw_log, "fw_log"); +DECLARE_CMD(gain_calibration_load,"load_gain","lg") DECLARE_CMD(generate, "generate"); DECLARE_CMD(help, "help", "h", "?"); DECLARE_CMD(info, "info", "i"); DECLARE_CMD(jump_to_bootloader, "jump_to_boot", "j"); DECLARE_CMD(load, "load", "ld"); -DECLARE_CMD(load_gain_calibration,"load_gain","lg") DECLARE_CMD(mimo, "mimo"); DECLARE_CMD(open, "open", "op", "o"); DECLARE_CMD(peek, "peek", "pe"); @@ -211,10 +211,10 @@ static struct cmd const cmd_table[] = { FIELD_INIT(.allow_while_streaming, false), }, { - FIELD_INIT(.names, cmd_names_load_gain_calibration), - FIELD_INIT(.exec, cmd_load_gain_calibration), + FIELD_INIT(.names, cmd_names_gain_calibration_load), + FIELD_INIT(.exec, cmd_gain_calibration_load), FIELD_INIT(.desc, "Load gain calibration table to allow RX or TX to have exact pwr"), - FIELD_INIT(.help, CLI_CMD_HELPTEXT_load_gain_calibration), + FIELD_INIT(.help, CLI_CMD_HELPTEXT_gain_calibration_load), FIELD_INIT(.requires_device, true), FIELD_INIT(.requires_fpga, true), FIELD_INIT(.allow_while_streaming, false), diff --git a/host/utilities/bladeRF-cli/src/cmd/doc/cmd_help.h.in b/host/utilities/bladeRF-cli/src/cmd/doc/cmd_help.h.in index d995ebb0..f7605d09 100644 --- a/host/utilities/bladeRF-cli/src/cmd/doc/cmd_help.h.in +++ b/host/utilities/bladeRF-cli/src/cmd/doc/cmd_help.h.in @@ -260,6 +260,12 @@ "written to stdout.\n" \ "\n" \ +#define CLI_CMD_HELPTEXT_gain_calibration_load \ +"Usage: load_gain \n" \ +"\n" \ +"Load a .tbl file for either RX or TX gain table calibration.\n" \ +"CURRENT LIMITATION OF ONLY RX0 or TX0 can be calibrated, didnt want to figure out ch sorting\n" \ +"\n" \ #define CLI_CMD_HELPTEXT_generate \ "Usage: generate [parameters] \n" \ @@ -351,12 +357,6 @@ "\n" \ -#define CLI_CMD_HELPTEXT_load_gain_calibration \ -"Usage: load_gain \n" \ -"\n" \ -"Load a .tbl file for either RX or TX gain table calibration.\n" \ -"CURRENT LIMITATION OF ONLY RX0 or TX0 can be calibrated, didnt want to figure out ch sorting\n" \ -"\n" \ #define CLI_CMD_HELPTEXT_xb \ "Usage: xb [parameters]\n" \ diff --git a/host/utilities/bladeRF-cli/src/cmd/load_gain_calibration.c b/host/utilities/bladeRF-cli/src/cmd/gain_calibration_load.c similarity index 95% rename from host/utilities/bladeRF-cli/src/cmd/load_gain_calibration.c rename to host/utilities/bladeRF-cli/src/cmd/gain_calibration_load.c index 8ca0478a..64224fed 100644 --- a/host/utilities/bladeRF-cli/src/cmd/load_gain_calibration.c +++ b/host/utilities/bladeRF-cli/src/cmd/gain_calibration_load.c @@ -3,7 +3,7 @@ #include "cmd.h" #include "input.h" -int cmd_load_gain_calibration(struct cli_state *state, int argc, char **argv) +int cmd_gain_calibration_load(struct cli_state *state, int argc, char **argv) { /* Valid commands: load_gain diff --git a/host/utilities/bladeRF-cli/src/cmd/printset.c b/host/utilities/bladeRF-cli/src/cmd/printset.c index e6e50e5f..806ddbcc 100644 --- a/host/utilities/bladeRF-cli/src/cmd/printset.c +++ b/host/utilities/bladeRF-cli/src/cmd/printset.c @@ -82,7 +82,7 @@ PRINTSET_DECL(clock_ref); PRINTSET_DECL(clock_sel); PRINTSET_DECL(filter); PRINTSET_DECL(frequency); -PRINTSET_DECL(gain_table); +PRINTSET_DECL(table_gain); PRINTSET_DECL(gain); PRINTSET_DECL(gpio); PRINTSET_DECL(hardware); @@ -125,7 +125,7 @@ struct printset_entry printset_table[] = { PRINTSET_ENTRY(loopback, PRINTALL_OPTION_APPEND_NEWLINE, BOARD_ANY), PRINTSET_ENTRY(rx_mux, PRINTALL_OPTION_APPEND_NEWLINE, BOARD_ANY), PRINTSET_ENTRY(filter, PRINTALL_OPTION_APPEND_NEWLINE, BOARD_BLADERF2), - PRINTSET_ENTRY(gain_table, PRINTALL_OPTION_APPEND_NEWLINE, BOARD_BLADERF2), + PRINTSET_ENTRY(table_gain, PRINTALL_OPTION_APPEND_NEWLINE, BOARD_BLADERF2), PRINTSET_ENTRY(gain, PRINTALL_OPTION_APPEND_NEWLINE, BOARD_ANY), PRINTSET_ENTRY(lnagain, PRINTALL_OPTION_SKIP, BOARD_BLADERF1), PRINTSET_ENTRY(rxvga1, PRINTALL_OPTION_SKIP, BOARD_BLADERF1), diff --git a/host/utilities/bladeRF-cli/src/cmd/printset.h b/host/utilities/bladeRF-cli/src/cmd/printset.h index 5efac904..b99f32fc 100644 --- a/host/utilities/bladeRF-cli/src/cmd/printset.h +++ b/host/utilities/bladeRF-cli/src/cmd/printset.h @@ -93,7 +93,7 @@ int print_filter(struct cli_state *state, int argc, char **argv); int set_filter(struct cli_state *state, int argc, char **argv); int print_frequency(struct cli_state *state, int argc, char **argv); int set_frequency(struct cli_state *state, int argc, char **argv); -int print_gain_table(struct cli_state *state, int argc, char **argv); +int print_table_gain(struct cli_state *state, int argc, char **argv); int print_gain(struct cli_state *state, int argc, char **argv); int set_gain(struct cli_state *state, int argc, char **argv); int print_lnagain(struct cli_state *state, int argc, char **argv); diff --git a/host/utilities/bladeRF-cli/src/cmd/printset_impl.c b/host/utilities/bladeRF-cli/src/cmd/printset_impl.c index c02e47e5..c525d73f 100644 --- a/host/utilities/bladeRF-cli/src/cmd/printset_impl.c +++ b/host/utilities/bladeRF-cli/src/cmd/printset_impl.c @@ -727,7 +727,7 @@ out: } /* gain Table*/ -int print_gain_table(struct cli_state *state, int argc, char **argv) +int print_table_gain(struct cli_state *state, int argc, char **argv) { int rv = CLI_RET_OK; int *err = &state->last_lib_error; @@ -751,10 +751,10 @@ out: return rv; } -int set_gain_table(struct cli_state *state, int argc, char **argv) +int set_table_gain(struct cli_state *state, int argc, char **argv) { int rv = CLI_RET_OK; - rv = print_gain_table(state, argc, argv); + rv = print_table_gain(state, argc, argv); return rv; } From fdaea8b36d52d0ae30a65f74fba882f0a5dff16b Mon Sep 17 00:00:00 2001 From: subrad Date: Fri, 25 Jul 2025 14:53:12 -0400 Subject: [PATCH 34/35] remove this, no idea what i was thinking --- host/libraries/libbladeRF/src/bladerf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/libraries/libbladeRF/src/bladerf.c b/host/libraries/libbladeRF/src/bladerf.c index 01d3a258..9b57f580 100644 --- a/host/libraries/libbladeRF/src/bladerf.c +++ b/host/libraries/libbladeRF/src/bladerf.c @@ -837,7 +837,7 @@ int bladerf_set_frequency(struct bladerf *dev, dev->board->get_gain_mode(dev, ch, &gain_mode); - if ((dev->gain_tbls[ch].enabled && status == 0) && (gain_mode == BLADERF_GAIN_MGC)) { + if (dev->gain_tbls[ch].enabled && status == 0) { status = apply_gain_correction(dev, ch, frequency); if (status != 0) { log_error("Failed to set gain correction\n"); From 524080f45e794aa6cccc7471c3e2f9f0cc120526 Mon Sep 17 00:00:00 2001 From: subrad Date: Fri, 25 Jul 2025 14:54:16 -0400 Subject: [PATCH 35/35] remove unused function call --- host/libraries/libbladeRF/src/bladerf.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/host/libraries/libbladeRF/src/bladerf.c b/host/libraries/libbladeRF/src/bladerf.c index 9b57f580..02df2b58 100644 --- a/host/libraries/libbladeRF/src/bladerf.c +++ b/host/libraries/libbladeRF/src/bladerf.c @@ -833,11 +833,8 @@ int bladerf_set_frequency(struct bladerf *dev, MUTEX_LOCK(&dev->lock); status = dev->board->set_frequency(dev, ch, frequency); - bladerf_gain_mode gain_mode; - dev->board->get_gain_mode(dev, ch, &gain_mode); - - if (dev->gain_tbls[ch].enabled && status == 0) { + if (dev->gain_tbls[ch].enabled && status == 0) { status = apply_gain_correction(dev, ch, frequency); if (status != 0) { log_error("Failed to set gain correction\n");