Compare commits
No commits in common. "master" and "04eb9f8a18f44cb4ee89eaa3ca521f441c35ebad" have entirely different histories.
master
...
04eb9f8a18
23
.gitea/workflows/build.yml
Normal file
23
.gitea/workflows/build.yml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
name: 'CI'
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- toolchain
|
||||||
|
|
||||||
|
# Jobs
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: buildpack-deps:bullseye # Minimum Supported OS
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Setup
|
||||||
|
run: ./prepare.sh
|
||||||
|
- name: Build
|
||||||
|
run: ./build.sh
|
||||||
|
- name: Upload
|
||||||
|
run: ./upload.sh
|
||||||
|
env:
|
||||||
|
TOKEN: ${{ secrets.TOKEN }}
|
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/workspace
|
||||||
|
/out
|
||||||
|
/archives
|
@ -1,2 +0,0 @@
|
|||||||
# Archives
|
|
||||||
This repository contains extra dependencies for MCPI-Reborn.
|
|
Binary file not shown.
Binary file not shown.
23
build.sh
Executable file
23
build.sh
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Store Output
|
||||||
|
OUT="$(pwd)/out"
|
||||||
|
rm -rf "${OUT}"
|
||||||
|
mkdir "${OUT}"
|
||||||
|
|
||||||
|
# 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
|
||||||
|
chmod -R u+rw "${NAME}"
|
||||||
|
rm -rf "${NAME}"
|
||||||
|
cd ../
|
||||||
|
done
|
73
prepare.sh
Executable file
73
prepare.sh
Executable file
@ -0,0 +1,73 @@
|
|||||||
|
#!/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}"
|
||||||
|
|
||||||
|
# Source Files
|
||||||
|
SRC="$(pwd)/src"
|
||||||
|
|
||||||
|
# Create Workspace
|
||||||
|
dir() {
|
||||||
|
rm -rf "$1"
|
||||||
|
mkdir "$1"
|
||||||
|
cd "$1"
|
||||||
|
}
|
||||||
|
dir workspace
|
||||||
|
WORKSPACE="$(pwd)"
|
||||||
|
|
||||||
|
# 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'
|
11
src/9999-change-page-size.patch
Normal file
11
src/9999-change-page-size.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- 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
|
11
src/defconfig
Normal file
11
src/defconfig
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
CT_CONFIG_VERSION="4"
|
||||||
|
CT_LOCAL_TARBALLS_DIR=""
|
||||||
|
CT_PREFIX_DIR="${CT_TOP_DIR}/out"
|
||||||
|
CT_ARCH_ARM=y
|
||||||
|
CT_ARCH_CPU="cortex-a7"
|
||||||
|
CT_OMIT_TARGET_VENDOR=y
|
||||||
|
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
|
19
upload.sh
Executable file
19
upload.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Setup Git
|
||||||
|
git config --global user.name 'gitea-actions'
|
||||||
|
git config --global user.email 'teabot@gitea.io'
|
||||||
|
|
||||||
|
# Clone Repository
|
||||||
|
USER='TheBrokenRail'
|
||||||
|
git clone --depth 1 "https://${USER}:${TOKEN}@gitea.thebrokenrail.com/minecraft-pi-reborn/archives.git" -b master
|
||||||
|
cd archives
|
||||||
|
|
||||||
|
# Copy
|
||||||
|
cp ../out/* .
|
||||||
|
|
||||||
|
# Commit
|
||||||
|
git commit -m 'Update Toolchain'
|
||||||
|
git push
|
Loading…
x
Reference in New Issue
Block a user