From c26e2cf4b0ce520ebf47cb7ee115fe61d245083e Mon Sep 17 00:00:00 2001 From: hilschernetpi Date: Thu, 9 Apr 2020 08:22:45 +0200 Subject: [PATCH] lowering hci uart speed --- Dockerfile | 15 ++------------- README.md | 7 ------- hooks/post_push | 13 +++++++++++++ hooks/pre_build | 6 ++++++ init.d/entrypoint.sh | 2 +- 5 files changed, 22 insertions(+), 21 deletions(-) create mode 100644 hooks/post_push create mode 100644 hooks/pre_build diff --git a/Dockerfile b/Dockerfile index 19904cc..081c0ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,8 @@ #use armv7hf compatible base image FROM balenalib/armv7hf-debian:buster-20191223 as builder -#enable cross compiling (comment out next line if built on Raspberry Pi) -RUN [ "cross-build-start" ] - #environment variables -ENV BLUEZ_VERSION 5.52 +ENV BLUEZ_VERSION 5.54 RUN apt-get update && apt-get install -y \ build-essential wget \ @@ -28,9 +25,6 @@ RUN wget -P /tmp/ https://www.kernel.org/pub/linux/bluetooth/bluez-${BLUEZ_VERSI && make \ #install bluez tools && make install -#disable cross compiling (comment out next line if built on Raspberry Pi) -RUN [ "cross-build-end" ] - #STEP 2 of multistage build ----Create the final image----- @@ -46,11 +40,8 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ org.label-schema.vcs-url="https://github.com/HilscherAutomation/netPI-bluetooth" \ org.label-schema.vcs-ref=$VCS_REF -#enable cross compiling (comment out next line if built on Raspberry Pi) -RUN [ "cross-build-start" ] - #version -ENV HILSCHERNETPI_BLUEZ_VERSION 1.3.3 +ENV HILSCHERNETPI_BLUEZ_VERSION 1.3.4 #labeling LABEL maintainer="netpi@hilscher.com" \ @@ -117,5 +108,3 @@ ENTRYPOINT ["/etc/init.d/entrypoint.sh"] #set STOPSGINAL STOPSIGNAL SIGTERM -#disable cross compiling (comment out next line if built on Raspberry Pi) -RUN [ "cross-build-end" ] diff --git a/README.md b/README.md index a72e1f8..789fa4e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ ## Bluetooth -[![](https://images.microbadger.com/badges/image/hilschernetpi/netpi-bluetooth.svg)](https://microbadger.com/images/hilschernetpi/netpi-bluetooth "Bluetooth") [![](https://images.microbadger.com/badges/commit/hilschernetpi/netpi-bluetooth.svg)](https://microbadger.com/images/hilschernetpi//netpi-bluetooth "Bluetooth") [![Docker Registry](https://img.shields.io/docker/pulls/hilschernetpi/netpi-bluetooth.svg)](https://registry.hub.docker.com/r/hilschernetpi/netpi-bluetooth/)  [![Image last updated](https://img.shields.io/badge/dynamic/json.svg?url=https://api.microbadger.com/v1/images/hilschernetpi/netpi-bluetooth&label=Image%20last%20updated&query=$.LastUpdated&colorB=007ec6)](http://microbadger.com/images/hilschernetpi/netpi-bluetooth "Image last updated")  @@ -72,12 +71,6 @@ Use bluez tools such as bluetoothctl, hciconfig, hcitool as usual. For a simple For additional help or information visit the Hilscher Forum at https://forum.hilscher.com/ -### Container Automated build - -The project complies with the scripting based [Dockerfile](https://docs.docker.com/engine/reference/builder/) method to build the image output file. Using this method is a precondition for an [automated](https://docs.docker.com/docker-hub/builds/) web based build process on DockerHub platform. - -DockerHub web platform is x86 CPU based, but an ARM CPU coded output file is needed for Raspberry Pi systems. This is why the Dockerfile includes the [balena](https://balena.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/) steps. - ### License View the license information for the software in the project. As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained). diff --git a/hooks/post_push b/hooks/post_push new file mode 100644 index 0000000..8c5a0b1 --- /dev/null +++ b/hooks/post_push @@ -0,0 +1,13 @@ +#!/bin/bash + +# Use manifest-tool to create the manifest, given the experimental +# "docker manifest" command isn't available yet on Docker Hub. + +curl -Lo manifest-tool https://github.com/estesp/manifest-tool/releases/download/v0.9.0/manifest-tool-linux-amd64 +chmod +x manifest-tool + +./manifest-tool push from-args \ + --platforms linux/arm \ + --template "$IMAGE_NAME" \ + --target "$IMAGE_NAME" + diff --git a/hooks/pre_build b/hooks/pre_build new file mode 100644 index 0000000..0a69288 --- /dev/null +++ b/hooks/pre_build @@ -0,0 +1,6 @@ +#!/bin/bash + +# Register qemu-*-static for all supported processors except the +# current one, but also remove all registered binfmt_misc before +docker run --rm --privileged multiarch/qemu-user-static:register --reset + diff --git a/init.d/entrypoint.sh b/init.d/entrypoint.sh index e0c45ca..eae570e 100755 --- a/init.d/entrypoint.sh +++ b/init.d/entrypoint.sh @@ -58,7 +58,7 @@ sleep 1 sleep 1 #load firmware to BCM chip and attach to hci0 -hciattach /dev/ttyAMA0 bcm43xx 921600 noflow +hciattach /dev/ttyAMA0 bcm43xx 115200 noflow #create hci0 device hciconfig hci0 up