diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..b172c502 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +./outputs diff --git a/.github/workflows/build_image.yml b/.github/workflows/build_image.yml index 9f6bf127..c7dd91c3 100644 --- a/.github/workflows/build_image.yml +++ b/.github/workflows/build_image.yml @@ -37,7 +37,7 @@ jobs: # This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels. - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v5.5.1 + uses: docker/metadata-action@v5.6.1 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} @@ -54,7 +54,7 @@ jobs: # It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository. # It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step. - name: Build and push Docker image - uses: docker/build-push-action@v6.9.0 + uses: docker/build-push-action@v6.10.0 with: context: . push: true diff --git a/Dockerfile b/Dockerfile index a2a559c7..3297d93b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,7 @@ RUN apt-get update && apt-get install -y \ # add all buildroot files there WORKDIR /home/odysseus/build -RUN git clone https://gitlab.com/buildroot.org/buildroot.git && cd ./buildroot && git checkout 2024.08 +RUN git clone https://gitlab.com/buildroot.org/buildroot.git && cd ./buildroot && git checkout 2024.11.1 WORKDIR /home/odysseus/outputs/ diff --git a/README.md b/README.md index a1f2eca2..0332378b 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Siren is our [pub/sub](https://www.stackpath.com/edge-academy/what-is-pub-sub-me For information about MQTT, check out [this confluence page](https://nerdocs.atlassian.net/wiki/spaces/NER/pages/173113345/Delving+into+MQTT). ### Running with Docker -Custom image coming soon. For now, you can run with the instructions in the `extra/mosquitto_base` folder, and to achieve in-car configuration use the image but substitute the configurations with those found in the buildroot rootfs overlay for the TPU. +Custom image coming soon. For now, you can run with the instructions in the `extra/mosquitto_base` folder, and to achieve in-car configuration use the image but substitute the configurations with those found in the buildroot rootfs overlay for the TPU. More developer side Siren usage is found in the Argos repository. ### Local Setup Docker is easiest, commands are in `extra/mosquitto_base`. If you would like to install locally, visit the mosquitto website to learn more. @@ -52,32 +52,35 @@ All defconfigs come with (in addition to busybox and util_linux utilities): - iperf3, iw, iputils, and other network configuration utilities ## Quick start -Download and install to PATH git and docker. Docker desktop is recommended for macOS and Windows. +Download and install to PATH git and docker. Docker desktop is required for macOS and Windows. Windows users must use WSL, and have WSL integration enabled in Docker Desktop --> Settings --> Resources --> WSL Integration --> Ubuntu (or other). +Then follow these steps in the terminal (WSL users must not be in the mnt/c directory!). +All platforms: ``` -git clone https://github.com/Northeastern-Electric-Racing/Oydsseus.git +git clone https://github.com/Northeastern-Electric-Racing/Odysseus.git # or use SSH if configured cd ./Odysseus git submodule update --init --recursive ``` -For linux (current support includes all build defconfigs): +Now launch the docker command line for Odysseus: + +For Linux and WSL: ``` docker compose run --rm odysseus ``` -For mac and windows: (current support includes all _debug defconfigs, on x86_64 host normal defconfigs can work (experimental)): +For mac: (experimental, limited): ``` docker compose -f "compose-compat.yml" run --rm --build odysseus # Future launches can omit `--build` for time savings and space savings, but it should be used if the Dockerfile or docker_out_of_tree.sh files change. ``` - -Now you are in the docker container. To build cd into the defconfig directory (either ap, or tpu), then run the make command alias: +Now you are in the docker container. To build cd into the defconfig directory (ap, tpu, etc), then run the make command alias: ``` cd ./ make-current ``` -**Note: If failure occurs on mac or windows very early in the process, run `make nanomq-source` and try again before reporting the error.** +**Note: If failure occurs very early in the process, run `make nanomq-source` and try again before reporting the error.** You can view the `output.log` for more info. ### More on docker configuration @@ -93,7 +96,7 @@ The container has a directory structure as so: ### Extra docker tips All paths relative to Siren root. -#### Note for Windows/macOS users +#### Note for macOS users The outputs are stored in a docker volume on these platforms to ensure rsync compatability. Therefore fetching the files requires first running the image, then use `docker cp` to get them to the userspace. Alternatively, docker desktop has a file explorer for docker volumes that may come in handy. #### Writing the sd card diff --git a/odysseus_tree/configs/raspberrypi4_64_ap_defconfig b/odysseus_tree/configs/raspberrypi4_64_ap_defconfig index 7b2af039..30c233f7 100644 --- a/odysseus_tree/configs/raspberrypi4_64_ap_defconfig +++ b/odysseus_tree/configs/raspberrypi4_64_ap_defconfig @@ -66,6 +66,7 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="2G" # BR2_TARGET_ROOTFS_TAR is not set BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_GO_BIN=y BR2_PACKAGE_HOST_KMOD_XZ=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_NRC7292=y diff --git a/odysseus_tree/configs/raspberrypi4_64_tpu_defconfig b/odysseus_tree/configs/raspberrypi4_64_tpu_defconfig index 583918a0..43e9977c 100644 --- a/odysseus_tree/configs/raspberrypi4_64_tpu_defconfig +++ b/odysseus_tree/configs/raspberrypi4_64_tpu_defconfig @@ -101,6 +101,7 @@ BR2_TARGET_ROOTFS_EXT2_SIZE="4G" # BR2_TARGET_ROOTFS_TAR is not set BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_GO_BIN=y BR2_PACKAGE_HOST_KMOD_XZ=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_PYTHON3=y diff --git a/odysseus_tree/package/nermosquitto/Config.in b/odysseus_tree/package/nermosquitto/Config.in index 5277dc0e..9c81e71b 100644 --- a/odysseus_tree/package/nermosquitto/Config.in +++ b/odysseus_tree/package/nermosquitto/Config.in @@ -30,6 +30,16 @@ config BR2_PACKAGE_NERMOSQUITTO_BROKER # *** help Build and install the mosquitto broker onto target. +config BR2_PACKAGE_NERMOSQUITTO_BROKER_DYNAMIC_SECURITY_PLUGIN + bool "dynamic security plugin" + depends on BR2_PACKAGE_NERMOSQUITTO_BROKER + select BR2_PACKAGE_CJSON + select BR2_PACKAGE_OPENSSL + help + Build and install the dynamic security plugin for + mosquitto broker onto target. + + config BR2_PACKAGE_NERMOSQUITTO_PLUGIN_LIST string "list of plugins" help diff --git a/odysseus_tree/package/nermosquitto/nermosquitto.mk b/odysseus_tree/package/nermosquitto/nermosquitto.mk index ce685bb3..1c305a8e 100644 --- a/odysseus_tree/package/nermosquitto/nermosquitto.mk +++ b/odysseus_tree/package/nermosquitto/nermosquitto.mk @@ -5,7 +5,7 @@ # all olther changes suffixed with # *** ################################################################################ -NERMOSQUITTO_VERSION = 2.0.18 +NERMOSQUITTO_VERSION = 2.0.20 NERMOSQUITTO_SITE = https://mosquitto.org/files/source NERMOSQUITTO_SOURCE = mosquitto-$(NERMOSQUITTO_VERSION).tar.gz # *** NERMOSQUITTO_LICENSE = EPL-2.0 or EDLv1.0 @@ -96,6 +96,10 @@ ifeq ($(BR2_PACKAGE_NERMOSQUITTO_BROKER),y) NERMOSQUITTO_MAKE_DIRS += src endif +ifeq ($(BR2_PACKAGE_MOSQUITTO_BROKER_DYNAMIC_SECURITY_PLUGIN),y) +MOSQUITTO_MAKE_DIRS += plugins/dynamic-security +endif + define NERMOSQUITTO_BUILD_CMDS $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) DIRS="$(NERMOSQUITTO_MAKE_DIRS)" \ $(NERMOSQUITTO_MAKE_OPTS)