Create GCC in podman
This commit is contained in:
parent
d0a60373ec
commit
09cb984f56
|
@ -10,7 +10,7 @@ PLATFORM ?= PSX
|
|||
#Build profile, possible values: release, debug, profile, coverage
|
||||
BUILD_DIR ?= bin/$(PSX_TV_FORMAT)
|
||||
BUILD_PROFILE ?= debug
|
||||
PSX_TV_FORMAT ?= PAL
|
||||
PSX_TV_FORMAT ?= PAL
|
||||
|
||||
CONFIG_NAME ?= $(PLATFORM)-$(BUILD_PROFILE)
|
||||
OUTPUT_DIR = $(BUILD_DIR)/$(CONFIG_NAME)
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
FROM "ubuntu:24.04"
|
||||
ADD ["scripts/install_pop-fe.sh", "scripts/install_rust.sh", "scripts/make_gcc.sh", "scripts/prerequisites.sh", "/usr/scripts"]
|
||||
RUN apt update && cd /usr/scripts && ./prerequisites.sh && ./install_rust.sh && cd /usr && ./scripts/make_gcc.sh
|
||||
|
||||
|
||||
|
||||
#RUN apt update && apt install -y nginx
|
||||
|
||||
#RUN mkdir /app
|
||||
#WORKDIR /app
|
||||
|
||||
#VOLUME my_vol (Do not use)
|
||||
|
||||
#ADD install_pop-fe.sh install_pop-fe.sh
|
||||
#CMD ["cp", "install_pop-fe.sh", "/my_vol"]
|
||||
# TODO: Make a script that builds the image and then registers alias like `jaby-make` for the docker command
|
|
@ -0,0 +1 @@
|
|||
podman build -t jaby_engine .
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
echo "<<< Install Rust >>>"
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
. "$HOME/.cargo/env"
|
||||
cargo install cargo-edit --locked
|
|
@ -1,55 +1,64 @@
|
|||
#!/bin/bash
|
||||
GCC_VERSION=13.1.0
|
||||
|
||||
echo "<<< Build GCC >>>"
|
||||
mkdir -p psx-gcc
|
||||
cd psx-gcc
|
||||
|
||||
echo "clone binutils"
|
||||
echo "<<< clone binutils >>>"
|
||||
git clone git://sourceware.org/git/binutils-gdb.git
|
||||
cd binutils-gdb
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
|
||||
echo "Configure binutils"
|
||||
echo "<<< Configure binutils >>>"
|
||||
../configure --target=mipsel-linux-gnu --with-sysroot --disable-nls --disable-werror
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
echo "Make binutils"
|
||||
echo "<<< Make binutils >>>"
|
||||
make
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
echo "Install binutils"
|
||||
sudo make install
|
||||
echo "<<< Install binutils >>>"
|
||||
make install
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ../..
|
||||
|
||||
echo "clone gcc"
|
||||
echo "<<< clone gcc >>>"
|
||||
git clone --recurse-submodules git://gcc.gnu.org/git/gcc.git
|
||||
cd gcc
|
||||
|
||||
echo "checkout gcc 13.1.0"
|
||||
git checkout releases/gcc-13.1.0
|
||||
echo "<<< checkout gcc $GCC_VERSION >>>"
|
||||
git checkout releases/$GCC_VERSION
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
echo "configure gcc"
|
||||
echo "<<< configure gcc >>>"
|
||||
../configure --target=mipsel-linux-gnu --disable-nls --enable-languages=c,c++ --without-headers
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Make gcc"
|
||||
echo "<<< Make gcc >>>"
|
||||
make all-gcc
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Install gcc"
|
||||
sudo make install-gcc
|
||||
echo "<<< Install gcc >>>"
|
||||
make install-gcc
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "<<< Delete GCC folder >>>"
|
||||
cd /usr
|
||||
rm -fr psx-gcc
|
||||
|
||||
# TODO: Remove gcc files after everything
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
echo "<<< Install prerequisites >>>"
|
||||
apt install -y curl make texinfo g++ gcc git libgmp3-dev libmpfr-dev libmpc-dev flex install-info info bison
|
10
readme.md
10
readme.md
|
@ -1,5 +1,6 @@
|
|||
- [JabyEngine](#jabyengine)
|
||||
- [About](#about)
|
||||
- [Podman](#podman)
|
||||
- [How to build](#how-to-build)
|
||||
- [Building `JabyEngine` (without VSCode)](#building-jabyengine-without-vscode)
|
||||
- [Building support library (without VSCode)](#building-support-library-without-vscode)
|
||||
|
@ -14,6 +15,15 @@
|
|||
## About
|
||||
JabyEngine is my personal attempt to eventually make my own PS1 game from "ground up". Originally I didn't indented to release this code publicly but recently I decided to give it a try. If you read this, thank you!
|
||||
|
||||
## Podman
|
||||
* `sudo apt install podman`
|
||||
* `podman build -t jaby_engine <Folder of Dockerfile>`
|
||||
* `podman images`: lists all images
|
||||
* `podman image rm <COMMIT ID>`: removes an image
|
||||
* `podman run -it <COMMIT ID> /bin/bash`: runs bash and interactive
|
||||
* `podman run --rm <-v <local_folder>:<absolute docker_folder> <-e ENV_VAR=VALUE> jaby_engine`: clean up after run
|
||||
* `podman image tree <TAG/ID>`: lists usefull information
|
||||
|
||||
## How to build
|
||||
JabyEngine relies on linux to be build. For Windows users it uses `wsl` instead but support for it might get dropped during further development.
|
||||
|
||||
|
|
|
@ -31,5 +31,4 @@ define cargo_unix_default
|
|||
)
|
||||
endef
|
||||
|
||||
# Run `cargo install cargo-edit --locked`to support upgrade
|
||||
# Windows build requires "rustup target add x86_64-pc-windows-gnu" and "sudo apt-get install mingw-w64"
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/bash
|
||||
sudo curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
sudo apt update
|
||||
sudo apt install make texinfo g++ gcc libgmp3-dev libmpfr-dev libmpc-dev flex install-info info bison
|
Loading…
Reference in New Issue