From 7a2cd9ccd76fd608b6fbc460c6042603452e27b6 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sun, 25 Sep 2022 17:23:47 +1000 Subject: [PATCH 1/3] Set execute bits --- .gitignore | 1 + build.sh | 0 clear.sh | 0 download.sh | 0 uart_log.sh | 0 5 files changed, 1 insertion(+) mode change 100644 => 100755 build.sh mode change 100644 => 100755 clear.sh mode change 100644 => 100755 download.sh mode change 100644 => 100755 uart_log.sh diff --git a/.gitignore b/.gitignore index 1c99b0a..d372c7b 100644 --- a/.gitignore +++ b/.gitignore @@ -97,3 +97,4 @@ Release/ # configuration file # *.ini +log.txt diff --git a/build.sh b/build.sh old mode 100644 new mode 100755 diff --git a/clear.sh b/clear.sh old mode 100644 new mode 100755 diff --git a/download.sh b/download.sh old mode 100644 new mode 100755 diff --git a/uart_log.sh b/uart_log.sh old mode 100644 new mode 100755 From dca862b42a1465a9cbcae9bff5c661894aba3061 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sun, 25 Sep 2022 17:55:03 +1000 Subject: [PATCH 2/3] Add docker build env --- Dockerfile | 9 +++++++++ docker-compose.yml | 10 ++++++++++ start_dev.sh | 2 ++ 3 files changed, 21 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100755 start_dev.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2574c24 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM alpine:3.16 +LABEL maintainer="Ben V. Brown " + +RUN apk add --no-cache gcc-arm-none-eabi newlib-arm-none-eabi make git bash +WORKDIR /src +# Git trust +RUN git config --global --add safe.directory /src + +COPY . /src diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..971d7b9 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: "3" +services: + builder: + stdin_open: true + tty: true + build: + context: . + command: /bin/bash + volumes: + - ./:/src:Z diff --git a/start_dev.sh b/start_dev.sh new file mode 100755 index 0000000..ef95947 --- /dev/null +++ b/start_dev.sh @@ -0,0 +1,2 @@ +#!/bin/sh +docker-compose run --rm builder From 5298530c80d4aa5d84fa835c6a04639a5ed448aa Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sun, 25 Sep 2022 18:17:03 +1000 Subject: [PATCH 3/3] Add docker --- README.md | 3 +++ build.sh | 7 +++---- clear.sh | 3 ++- config/common.mk | 6 +++--- download.sh | 4 +--- 5 files changed, 12 insertions(+), 11 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..998063b --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# PineBuds Open Source SDK + +This is just the SDK from the wiki, with dockerfile setup to make building easier diff --git a/build.sh b/build.sh index e04af13..278a1d6 100755 --- a/build.sh +++ b/build.sh @@ -1,8 +1,7 @@ -#make -j T=2300_open_source DEBUG=1 > log.txt 2>&1 -make -j T=open_source DEBUG=1 > log.txt 2>&1 -#make -j T=best2300p_ibrt_anc DEBUG=1 > log.txt 2>&1 +#!/bin/bash +make -j T=open_source DEBUG=1 >log.txt 2>&1 -if [ $? -eq 0 ];then +if [ $? -eq 0 ]; then echo "build success" else echo "build failed and call log.txt" diff --git a/clear.sh b/clear.sh index d7f8a1b..21a648d 100755 --- a/clear.sh +++ b/clear.sh @@ -1 +1,2 @@ -make T=mic_back -j DEBUG=1 clean +#!/bin/bash +make T=open_source -j DEBUG=1 clean diff --git a/config/common.mk b/config/common.mk index 9a41b43..5fab6d4 100644 --- a/config/common.mk +++ b/config/common.mk @@ -2608,9 +2608,9 @@ else CPU_CFLAGS += -mfloat-abi=soft endif -ifneq ($(ALLOW_WARNING),1) -KBUILD_CPPFLAGS += -Werror -endif +# ifneq ($(ALLOW_WARNING),1) +# KBUILD_CPPFLAGS += -Werror +# endif ifeq ($(PIE),1) ifneq ($(TOOLCHAIN),armclang) diff --git a/download.sh b/download.sh index 9fdc17f..f439920 100755 --- a/download.sh +++ b/download.sh @@ -3,7 +3,5 @@ num=$(ls -l /dev/ttyUSB* | rev | cut -c 1) #num=3 echo com is:$num -#sudo -S dldtool -c $num -f out/2300_open_source/2300_open_source.bin -sudo -S dldtool -c $num -f out/mic_alg/mic_alg.bin +sudo -S dldtool -c $num -f out/open_source/open_source.bin sudo minicom port$num -