Initial commit
This commit is contained in:
commit
3967e73347
196 files changed
+17768
No files matched your search
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
# set -o xtrace
|
||||
|
||||
find /buildroot/ -maxdepth 1 -mindepth 1 -exec rm -rf -- {} +
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
# set -o xtrace
|
||||
|
||||
find /rootfs/ -maxdepth 1 -mindepth 1 -exec rm -rf -- {} +
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
# set -o xtrace
|
||||
|
||||
tar xf /buildroot/output/images/rootfs.tar -C /rootfs/
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
# set -o xtrace
|
||||
|
||||
git clone https://gitlab.com/buildroot.org/buildroot.git /buildroot
|
||||
|
||||
cd /buildroot
|
||||
git checkout -b csel 2022.08.3
|
||||
|
||||
rsync -a /workspace/config/board/ /buildroot/board/
|
||||
rsync -a /workspace/config/configs/ /buildroot/configs/
|
||||
|
||||
make csel_defconfig
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
# set -o xtrace
|
||||
|
||||
GO_VERSION=1.24.1
|
||||
|
||||
remove_go() {
|
||||
rm -rf /usr/local/go
|
||||
rm -f /etc/profile.d/go.sh
|
||||
}
|
||||
|
||||
install_go() {
|
||||
remove_go
|
||||
ARCH=$(uname -m)
|
||||
|
||||
if [ "$ARCH" = "x86_64" ]; then
|
||||
ARCH="amd64"
|
||||
elif [ "$ARCH" = "aarch64" ]; then
|
||||
ARCH="arm64"
|
||||
else
|
||||
echo "Unsupported architecture: ${ARCH}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Installing Go ${GO_VERSION} for ${ARCH}"
|
||||
curl -sSfL https://go.dev/dl/go${GO_VERSION}.linux-${ARCH}.tar.gz | tar -C /usr/local -xz
|
||||
echo "Go ${GO_VERSION} installed successfully"
|
||||
echo "export PATH=\$PATH:/usr/local/go/bin" >> /etc/profile.d/go.sh
|
||||
}
|
||||
|
||||
install_go
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
# set -o xtrace
|
||||
|
||||
ZIG_VERSION=0.14.0
|
||||
|
||||
remove_zig() {
|
||||
rm -rf /usr/local/bin/zio
|
||||
rm -rf /usr/local/lib/zig
|
||||
rm -rf /usr/local/share/zig
|
||||
}
|
||||
|
||||
install_zig() {
|
||||
remove_zig
|
||||
ARCH=$(uname -m)
|
||||
TMP=$(mktemp -d)
|
||||
echo "Installing Zig ${ZIG_VERSION} for ${ARCH}"
|
||||
echo "Downloading files to ${TMP}"
|
||||
curl -sSfL https://ziglang.org/download/${ZIG_VERSION}/zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz | tar -xJ -C $TMP
|
||||
cp -a $TMP/zig-linux-${ARCH}-${ZIG_VERSION}/zig /usr/local/bin/zig
|
||||
cp -a $TMP/zig-linux-${ARCH}-${ZIG_VERSION}/lib /usr/local/lib/zig
|
||||
mkdir -p /usr/local/share/zig
|
||||
cp -a $TMP/zig-linux-${ARCH}-${ZIG_VERSION}/doc /usr/local/share/zig
|
||||
cp -a $TMP/zig-linux-${ARCH}-${ZIG_VERSION}/README.md /usr/local/share/zig
|
||||
cp -a $TMP/zig-linux-${ARCH}-${ZIG_VERSION}/LICENSE /usr/local/share/zig
|
||||
# rm -rf $TMP
|
||||
}
|
||||
|
||||
install_zig
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
# set -o xtrace
|
||||
|
||||
rsync -rlt --progress --delete /buildroot/output/images/ /workspace/buildroot-images
|
||||
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
# set -o xtrace
|
||||
|
||||
SRC=/buildroot/output/target/
|
||||
DST=/rootfs/
|
||||
RSYNC_IGNORE=/workspace/rsyncignore
|
||||
|
||||
# Copy all non-existing files from SRC to DST
|
||||
rsync -rlpgoD --itemize-changes \
|
||||
--ignore-existing \
|
||||
--exclude=THIS_IS_NOT_YOUR_ROOT_FILESYSTEM \
|
||||
$SRC $DST
|
||||
|
||||
RSYNC_OPT=""
|
||||
if [[ -f $RSYNC_IGNORE ]]; then
|
||||
RSYNC_OPT="--exclude-from=$RSYNC_IGNORE"
|
||||
echo "Using rsyncignore"
|
||||
fi
|
||||
|
||||
# Update all existing files in DST from SRC
|
||||
rsync -crlpgoD --itemize-changes \
|
||||
--exclude=/etc/ssh/** \
|
||||
--exclude=/etc/hostname \
|
||||
--exclude=/etc/group \
|
||||
--exclude=/etc/passwd \
|
||||
--exclude=/etc/shadow \
|
||||
--exclude=/etc/fstab \
|
||||
--exclude=/run/lock \
|
||||
--exclude=THIS_IS_NOT_YOUR_ROOT_FILESYSTEM \
|
||||
$RSYNC_OPT $SRC $DST
|
||||
Reference in new issue
Block a user