Use git submodule for buildroot (#1445)

* Drop buildroot from git repository

Manage buildroot in a separate git repository and use a git submodule
to include it into the HAOS source tree.

This makes it easier to manage changes to buildroot since it can be
managed by git. A buildroot fork repository is being maintained with
the changes we currently have. It makes the buildroot-patches unnecessary
and should make it easier to rebase and upstream changes to buildroot.

* Remove buildroot-patches

Now that buildroot changes are managed in the buildroot fork repository
there is no need to manage patches in a separate directory.

* Initialize git submodule if necessary

* Move build directory to root

This avoids conflict/local modification issues with the buildroot
git submodule.
This commit is contained in:
Stefan Agner
2021-07-08 16:19:37 +02:00
committed by GitHub
parent 166537bf00
commit 6c79ce0f98
12407 changed files with 20 additions and 521978 deletions

View File

@@ -11,6 +11,11 @@ sudo mkdir -p "${CACHE_DIR}"
sudo chown -R "${BUILDER_UID}:${BUILDER_GID}" "${CACHE_DIR}"
sudo docker build -t hassos:local .
if [ ! -f buildroot/Makefile ]; then
# Initialize git submodule
git submodule update --init
fi
# Make sure loop devices are present before starting the container
sudo losetup -f > /dev/null

View File

@@ -1,26 +0,0 @@
#!/bin/bash
set -e
if [ -z "$1" ]; then
echo "Need a buildroot version!"
exit 1
fi
rm -rf /tmp/buildroot-new
mkdir -p /tmp/buildroot-new
echo "Download new buildroot"
curl -L "https://buildroot.org/downloads/buildroot-${1}.tar.bz2" \
| tar xvpjf - --strip 1 -C /tmp/buildroot-new
echo "Install patches"
for patch_file in buildroot-patches/*; do
echo "Patch: ${patch_file}"
patch -d /tmp/buildroot-new -p 1 < "${patch_file}";
done
rm -rf buildroot
mv /tmp/buildroot-new buildroot
git add buildroot
git commit -sam "Update buildroot to ${1}"