Compare commits
No commits in common. "toolchain" and "master" have entirely different histories.
@ -1,23 +0,0 @@
|
|||||||
name: 'CI'
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- toolchain
|
|
||||||
|
|
||||||
# Jobs
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container: node:lts-bullseye # Minimum Supported OS
|
|
||||||
steps:
|
|
||||||
- name: Checkout Repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Setup
|
|
||||||
run: ./prepare.sh
|
|
||||||
- name: Build
|
|
||||||
run: su -c ./build.sh node
|
|
||||||
- name: Upload
|
|
||||||
run: ./upload.sh
|
|
||||||
env:
|
|
||||||
TOKEN: ${{ secrets.TOKEN }}
|
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,4 +0,0 @@
|
|||||||
/workspace
|
|
||||||
/out
|
|
||||||
/archives
|
|
||||||
/src/.config*
|
|
2
README.md
Normal file
2
README.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Archives
|
||||||
|
This repository contains extra dependencies for MCPI-Reborn.
|
BIN
arm-toolchain-aarch64.tar.xz
Normal file
BIN
arm-toolchain-aarch64.tar.xz
Normal file
Binary file not shown.
BIN
arm-toolchain-x86_64.tar.xz
Normal file
BIN
arm-toolchain-x86_64.tar.xz
Normal file
Binary file not shown.
21
build.sh
21
build.sh
@ -1,21 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Store Output
|
|
||||||
OUT="$(pwd)/out"
|
|
||||||
find "${OUT}" -type f -delete
|
|
||||||
|
|
||||||
# Build
|
|
||||||
cd workspace/build
|
|
||||||
for type in *; do
|
|
||||||
cd "${type}"
|
|
||||||
../../crosstool-ng/ct-ng build
|
|
||||||
# Compress
|
|
||||||
NAME="arm-toolchain-${type}"
|
|
||||||
mv out "${NAME}"
|
|
||||||
tar -cJf "${OUT}/${NAME}.tar.xz" "${NAME}"
|
|
||||||
# Clean Up
|
|
||||||
rm -rf "${NAME}"
|
|
||||||
cd ../
|
|
||||||
done
|
|
78
prepare.sh
78
prepare.sh
@ -1,78 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Check
|
|
||||||
if [ "$(uname -m)" != 'x86_64' ]; then
|
|
||||||
echo 'Unsupported Build System!' > /dev/stderr
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install Dependencies
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y \
|
|
||||||
build-essential \
|
|
||||||
g++-aarch64-linux-gnu \
|
|
||||||
flex \
|
|
||||||
texinfo \
|
|
||||||
help2man \
|
|
||||||
gawk \
|
|
||||||
libtool-bin \
|
|
||||||
bison
|
|
||||||
|
|
||||||
# Versions
|
|
||||||
CT_NAME='crosstool-ng'
|
|
||||||
CT_VERSION='1.27.0'
|
|
||||||
CT="${CT_NAME}-${CT_VERSION}"
|
|
||||||
|
|
||||||
# Directories
|
|
||||||
SRC="$(pwd)/src"
|
|
||||||
WORKSPACE="$(pwd)/workspace"
|
|
||||||
OUT="$(pwd)/out"
|
|
||||||
|
|
||||||
# Create Workspace
|
|
||||||
dir() {
|
|
||||||
rm -rf "$1"
|
|
||||||
mkdir "$1"
|
|
||||||
cd "$1"
|
|
||||||
}
|
|
||||||
dir "${WORKSPACE}"
|
|
||||||
|
|
||||||
# Build crosstools-ng
|
|
||||||
dir "${CT_NAME}"
|
|
||||||
wget "https://github.com/${CT_NAME}/${CT_NAME}/releases/download/${CT}/${CT}.tar.xz"
|
|
||||||
tar -xJf "${CT}.tar.xz" --strip-components=1
|
|
||||||
./configure \
|
|
||||||
--enable-local \
|
|
||||||
--enable-silent-rules \
|
|
||||||
--quiet
|
|
||||||
make -j$(nproc)
|
|
||||||
|
|
||||||
# Add Patch
|
|
||||||
cd packages/binutils
|
|
||||||
patch() {
|
|
||||||
for version in */; do
|
|
||||||
cp "${SRC}/$1" "${version}"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
patch 9999-change-page-size.patch
|
|
||||||
|
|
||||||
# Configure Toolchain
|
|
||||||
cd "${WORKSPACE}"
|
|
||||||
export PATH="$(pwd)/${CT_NAME}:${PATH}"
|
|
||||||
dir build
|
|
||||||
prepare() {
|
|
||||||
dir "$1"
|
|
||||||
cp "${SRC}/defconfig" .
|
|
||||||
printf "$2" >> defconfig
|
|
||||||
ct-ng defconfig
|
|
||||||
ct-ng show-config
|
|
||||||
chmod -R o+rw .
|
|
||||||
cd ../
|
|
||||||
}
|
|
||||||
prepare x86_64 ''
|
|
||||||
prepare aarch64 'CT_CANADIAN=y\nCT_HOST="aarch64-linux-gnu"\n'
|
|
||||||
|
|
||||||
# Setup Output Directory
|
|
||||||
dir "${OUT}"
|
|
||||||
chmod -R o+rw .
|
|
@ -1,11 +0,0 @@
|
|||||||
--- a/bfd/elf32-arm.c
|
|
||||||
+++ b/bfd/elf32-arm.c
|
|
||||||
@@ -20353,7 +20353,7 @@ elf32_arm_backend_symbol_processing (bfd *abfd, asymbol *sym)
|
|
||||||
#define ELF_ARCH bfd_arch_arm
|
|
||||||
#define ELF_TARGET_ID ARM_ELF_DATA
|
|
||||||
#define ELF_MACHINE_CODE EM_ARM
|
|
||||||
-#define ELF_MAXPAGESIZE 0x1000
|
|
||||||
+#define ELF_MAXPAGESIZE 0x10000
|
|
||||||
#define ELF_COMMONPAGESIZE 0x1000
|
|
||||||
|
|
||||||
#define bfd_elf32_mkobject elf32_arm_mkobject
|
|
@ -1,14 +0,0 @@
|
|||||||
CT_CONFIG_VERSION="4"
|
|
||||||
CT_LOCAL_TARBALLS_DIR=""
|
|
||||||
CT_PREFIX_DIR="${CT_TOP_DIR}/out"
|
|
||||||
# CT_PREFIX_DIR_RO is not set
|
|
||||||
# CT_LOG_PROGRESS_BAR is not set
|
|
||||||
CT_ARCH_ARM=y
|
|
||||||
CT_ARCH_CPU="cortex-a7"
|
|
||||||
CT_OMIT_TARGET_VENDOR=y
|
|
||||||
# CT_DEMULTILIB is not set
|
|
||||||
CT_ARCH_FPU="neon-vfpv4"
|
|
||||||
CT_ARCH_FLOAT_HW=y
|
|
||||||
CT_KERNEL_LINUX=y
|
|
||||||
CT_LINUX_V_4_19=y
|
|
||||||
CT_CC_LANG_CXX=y
|
|
20
upload.sh
20
upload.sh
@ -1,20 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Setup Git
|
|
||||||
COMMIT="$(git rev-parse --short HEAD)"
|
|
||||||
git config --global user.name 'gitea-actions'
|
|
||||||
git config --global user.email 'teabot@gitea.io'
|
|
||||||
|
|
||||||
# Clone Repository
|
|
||||||
git clone --depth 1 "https://${TOKEN}@gitea.thebrokenrail.com/minecraft-pi-reborn/archives.git" -b master
|
|
||||||
cd archives
|
|
||||||
|
|
||||||
# Copy
|
|
||||||
cp ../out/* .
|
|
||||||
git add .
|
|
||||||
|
|
||||||
# Commit
|
|
||||||
git commit -m "Update Toolchain (${COMMIT})"
|
|
||||||
git push
|
|
Loading…
x
Reference in New Issue
Block a user