From 9541a7e67ebaa0d59c5b01586a824919e615196a Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 7 Mar 2018 22:24:16 +0100 Subject: [PATCH] Add submodule --- .gitmodules | 3 +++ Dockerfile | 12 ++---------- README.md | 6 ++---- buildroot | 1 + enter.sh | 2 +- getconfig.sh | 3 --- getimage.sh | 4 ++-- 7 files changed, 11 insertions(+), 20 deletions(-) create mode 100644 .gitmodules create mode 160000 buildroot delete mode 100755 getconfig.sh diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..b9ab2a000 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "buildroot"] + path = buildroot + url = https://github.com/buildroot/buildroot diff --git a/Dockerfile b/Dockerfile index 5aa92f052..405903be2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,14 +3,6 @@ FROM ubuntu:16.04 RUN apt-get update && apt-get install -y \ wget patch cpio python unzip rsync bc bzip2 ncurses-dev git make g++ python-matplotlib python-numpy graphviz -ARG BUILDROOT_VERSION=2017.11.2 -ARG BUILDROOT_BOARD=vm - # Get buildroot -WORKDIR /buildroot -RUN wget https://buildroot.org/downloads/buildroot-${BUILDROOT_VERSION}.tar.gz \ - && tar xvzf buildroot-${BUILDROOT_VERSION}.tar.gz - -# Download all the required files -WORKDIR /buildroot/buildroot-$BUILDROOT_VERSION -COPY buildroot-external /buildroot/hassio +WORKDIR /build +COPY . /build diff --git a/README.md b/README.md index fc66e6dd7..84cf9e62e 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,6 @@ Hass.io OS based on buildroot # building Running sudo `./enter.sh` will get you into the build docker container. -`cd /buildroot/buildroot-2017.11.1` -`make` +`make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external` -From outside the docker container, while it is still running you can use `sudo ./getimage.sh` to get the output image, -and `sudo ./getconfig` to backup the config changes to buildroot you made. +From outside the docker container, while it is still running you can use `./getimage.sh` to get the output image. diff --git a/buildroot b/buildroot new file mode 160000 index 000000000..8a94ff12d --- /dev/null +++ b/buildroot @@ -0,0 +1 @@ +Subproject commit 8a94ff12d232ada68cff5957089a78a1f0b8f192 diff --git a/enter.sh b/enter.sh index 824f96853..4462960cd 100755 --- a/enter.sh +++ b/enter.sh @@ -1,3 +1,3 @@ #!/bin/bash docker build -t hassbuildroot . -docker run -it --rm hassbuildroot /bin/bash +docker run -it --rm -v "$(pwd)/buildroot-external":/build/buildroot-external hassbuildroot /bin/bash diff --git a/getconfig.sh b/getconfig.sh deleted file mode 100755 index 7f502b246..000000000 --- a/getconfig.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -DID=$(docker ps | grep "hassbuildroot" | awk '{ print $1 }') -docker cp -yr $DID:/buildroot/buildroot-external buildroot-external diff --git a/getimage.sh b/getimage.sh index a25c90df5..880917584 100755 --- a/getimage.sh +++ b/getimage.sh @@ -1,5 +1,5 @@ #!/bin/bash mkdir -p output DID=$(docker ps | grep "hassbuildroot" | awk '{ print $1 }') -docker cp $DID:/buildroot/buildroot-2017.11.2/output/images/rootfs.iso9660 output/rootfs.iso -docker cp $DID:/buildroot/buildroot-2017.11.2/output/graphs output/graphs +docker cp $DID:/build/buildroot/output/images/rootfs.iso9660 output/rootfs.iso +docker cp $DID:/build/buildroot/output/graphs output/graphs