This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to libdragon toolchain generation. (#17)
- Loading branch information
1 parent
c4a85bd
commit 22b7aad
Showing
12 changed files
with
402 additions
and
1,009 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Copyright (c) NetworkFusion 2023 | ||
# See LICENSE file in the project root for full license information. | ||
|
||
name: Build Docker Container | ||
|
||
env: | ||
GCR_FILE: Dockerfile | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- '**Dockerfile' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
# username: ${{ github.repository_owner }} | ||
# password: ${{ secrets.CONTAINER_BUILD_TOKEN }} | ||
|
||
- name: Build and Push Docker Image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
file: ${{ env.GCR_FILE }} | ||
push: true # Will only build if this is not here | ||
tags: | | ||
# ${{ env.GCR_IMAGE }}:${{ env.GCR_VERSION }} | ||
${{ env.GCR_IMAGE }}:latest |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,9 @@ | ||
# Prerequisites | ||
*.d | ||
|
||
# Object files | ||
*.o | ||
*.ko | ||
# Generated debug files | ||
*.zip | ||
*.bin | ||
*.obj | ||
*.elf | ||
|
||
# Linker output | ||
*.ilk | ||
*.map | ||
*.exp | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Libraries | ||
*.lib | ||
*.a | ||
*.la | ||
*.lo | ||
|
||
# Shared objects (inc. Windows DLLs) | ||
*.dll | ||
*.so | ||
*.so.* | ||
*.dylib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
*.i*86 | ||
*.x86_64 | ||
*.hex | ||
|
||
# Debug files | ||
*.dSYM/ | ||
*.su | ||
*.idb | ||
*.pdb | ||
|
||
# Kernel Module Compile Results | ||
*.mod* | ||
*.cmd | ||
.tmp_versions/ | ||
modules.order | ||
Module.symvers | ||
Mkfile.old | ||
dkms.conf | ||
*.tar.* | ||
*.deb | ||
*.rpm | ||
|
||
.vs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# syntax=docker/dockerfile:1 | ||
# V0 - Use this comment to force a re-build without changing the contents | ||
|
||
# Stage 1 - Build the toolchain | ||
FROM debian:stable-slim AS toolchain-builder | ||
# Avoid warnings by switching to noninteractive | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Install required dependencies | ||
RUN apt-get update \ | ||
&& apt-get -y install --no-install-recommends apt-utils \ | ||
&& apt-get install -y \ | ||
curl \ | ||
bzip2 \ | ||
make \ | ||
file \ | ||
libmpfr-dev \ | ||
libmpc-dev \ | ||
zlib1g-dev \ | ||
texinfo \ | ||
git \ | ||
gcc \ | ||
g++ | ||
|
||
ARG N64_INST=/n64_toolchain | ||
ENV N64_INST=${N64_INST} | ||
|
||
# Build | ||
ADD https://raw.githubusercontent.com/DragonMinded/libdragon/trunk/tools/build-toolchain.sh /tmp/tools/build-toolchain.sh | ||
WORKDIR /tmp/tools | ||
RUN chmod 755 "./build-toolchain.sh" && ./build-toolchain.sh | ||
|
||
# Remove locale strings which are not so important in our use case | ||
RUN rm -rf ${N64_INST}/share/locale/* | ||
|
||
# Stage 2 - Prepare minimal image | ||
FROM debian:stable-slim | ||
# Avoid warnings by switching to noninteractive | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
# Setup paths for the libgragon toolchain | ||
ARG N64_INST=/n64_toolchain | ||
ENV N64_INST=${N64_INST} | ||
ENV PATH="${N64_INST}/bin:$PATH" | ||
|
||
# Install dependencies for building libdragon tools and ROMS (using makefiles and CMake) | ||
# and (commented out) ability to use it as a vs-code devcontainer. | ||
RUN apt-get update && \ | ||
apt-get -y install --no-install-recommends apt-utils dialog icu-devtools 2>&1 &&\ | ||
apt-get install -yq \ | ||
gcc \ | ||
g++ \ | ||
make \ | ||
libpng-dev \ | ||
git \ | ||
curl \ | ||
cmake \ | ||
ninja-build | ||
|
||
COPY --from=toolchain-builder ${N64_INST} ${N64_INST} | ||
|
||
# Clean up downloaded files | ||
RUN apt-get autoremove -y \ | ||
&& apt-get clean -y \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Switch back to dialog for any ad-hoc use of apt-get | ||
ENV DEBIAN_FRONTEND=dialog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Installing packages | ||
|
||
## Operating System | ||
|
||
|
||
### Debian | ||
Download and install the debian (.deb) package: | ||
`$ sudo dpkg -i <packagename>.deb` | ||
|
||
### RPM | ||
Download and install the RPM (.rpm) package. | ||
`rpm -i <packagename>.rpm` | ||
|
||
### Windows | ||
Download the .zip file and extract it. | ||
Move the folder. | ||
Add the file path to an environment variable | ||
Enjoy! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,14 @@ | ||
NOTE: This repo will be updated or deprecated in the near future as the libDragon toolchain now supports the ability to do the same thing using: | ||
``` | ||
sudo apt-get install -y mingw-w64 | ||
cd ./tools/ | ||
sudo N64_INST=/usr/local/n64/ HOST=x86_64-w64-mingw32 ./build-toolchain.sh | ||
``` | ||
**NOTE:** This repo uses the [official libDragon](dragonminded/libdragon) toolchain build script to generate its artifacts. However, it may also include features or abilities that have not yet been added. | ||
|
||
# Windows mips64-gcc-toolchain for the N64 | ||
# mips64-gcc-toolchain for the N64 | ||
|
||
This repo automatically generates the MIPS64 GCC toolchain to allow cross compilation for the N64. | ||
The binaries can be downloaded and used as part of other build scripts/components which saves time (at least 30 minutes) when setting up a developer environment in order to build N64 libraries such as libdragon in a `Windows` environment. | ||
|
||
[![Azure Pipeline CI](https://dev.azure.com/n64-tools/N64-Tools/_apis/build/status/N64-tools.mips64-gcc-toolchain)](https://dev.azure.com/n64-tools/N64-Tools/_build/latest?definitionId=1) | ||
The binaries can be downloaded (from releases) and used as part of other build scripts/components which saves time (at least 30 minutes) when setting up a developer environment in order to build N64 libraries such as libdragon in a `Windows` environment (without using docker). | ||
|
||
[![Github Action CI](https://github.com/n64-tools/mips64-gcc-toolchain/actions/workflows/build-toolchain.yml/badge.svg)](https://github.com/n64-tools/mips64-gcc-toolchain/actions/workflows/build-toolchain.yml) | ||
|
||
Architecture | Download Links | ||
--- | --- | ||
Windows x64 | [Latest](https://github.com/n64-tools/mips64-gcc-toolchain/releases/latest/download/gcc-toolchain-mips64-win64.zip) | ||
Windows i386 | none currently available! | ||
Windows x86_x64 | [Latest](https://github.com/n64-tools/mips64-gcc-toolchain/releases/latest/download/gcc-toolchain-mips64-win64.zip) | ||
Debian | [Latest](https://github.com/n64-tools/mips64-gcc-toolchain/releases/latest/download/gcc-toolchain-mips64-linux64.deb) | ||
Redhat | [Latest](https://github.com/n64-tools/mips64-gcc-toolchain/releases/latest/download/gcc-toolchain-mips64-linux64.rpm) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.