Merge pull request 'Support for podman' (#9) from feature/jb/potman into main

Reviewed-on: #9
Reviewed-by: cody <william@werl.me>
This commit is contained in:
jaby 2025-01-08 21:22:17 +00:00
commit 26cd74d449
30 changed files with 234 additions and 239 deletions

1
.gitattributes vendored
View File

@ -2,3 +2,4 @@
*.wav filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.mp3 filter=lfs diff=lfs merge=lfs -text
*.TMD filter=lfs diff=lfs merge=lfs -text

View File

@ -1,6 +0,0 @@
#!/bin/bash
#Made possible by Cody the white tiger
# $1 => Input file
# $2 => Output file
ffmpeg -i $1 -sample_fmt s16 -ar 44100 $2

BIN
bin/extern/32BIT.TMD (Stored with Git LFS) vendored Normal file

Binary file not shown.

View File

@ -1,9 +0,0 @@
#!/bin/bash
#Made possible by Cody the white tiger
BASEDIR=$(dirname "$0")
cd $BASEDIR
source extern/py3venv/bin/activate
cd extern/pop-fe/
./pop-fe.py --title=$1 --ps1-newemu --cover=$2/Icon.png --pic0=$2/Title.png --pic1=$2/Background.png --ps3-pkg="${3%.*}.pkg" $3

6
docs/Bugs/known_bugs.md Normal file
View File

@ -0,0 +1,6 @@
# Known bugs
- [Known bugs](#known-bugs)
- [`psxreadmap` is not functional under Linux](#psxreadmap-is-not-functional-under-linux)
## `psxreadmap` is not functional under Linux
Key input seems not work under any version under Linux...

View File

@ -2,7 +2,7 @@
- [JabyEngine Documentation](#jabyengine-documentation)
- [Features](#features)
- [Known limitations](#known-limitations)
- [Observed bugs](#observed-bugs)
- [Bugs](#bugs)
## Features
- [Auto LBAs](./Features/auto_lba.md)
@ -10,5 +10,6 @@
## Known limitations
- Insufficient documentation
## Observed bugs
### Bugs
- [Known bugs](./Bugs/known_bugs.md)
- [Observed bugs](./Bugs/observed_bugs.md)

View File

@ -11,32 +11,17 @@
{
"label": "build",
"type": "shell",
"windows": { // v re-export for WSL v re-export for WSL
"command": "wsl make ${input:project}_${input:target} BUILD_PROFILE=${input:build profile} REGION=${input:region} CUSTOM_CONFIG=${input:custom config} PSX_LICENSE_PATH=$(wslpath ${env:PSX_LICENSE_PATH}) JABY_ENGINE_DIR=$(wslpath ${env:JABY_ENGINE_PATH})",
},
"linux": {
"command": "make ${input:project}_${input:target} BUILD_PROFILE=${input:build profile} REGION=${input:region} CUSTOM_CONFIG=${input:custom config}",
},
"command": "${env:JABY_ENGINE_PATH}/scripts/podman_jaby_engine.sh ${workspaceFolder}:. make ${input:project}_${input:target} BUILD_PROFILE=${input:build profile} REGION=${input:region} CUSTOM_CONFIG=${input:custom config}",
"group": {
"kind": "build",
"isDefault": true
},
"options": {
"env": {
"PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}"
}
}
},
{
"label": "read memory map",
"type": "shell",
"command": "psxreadmap.exe ${input:output memory map} application/bin/${input:tv format}/PSX-${input:build profile}/PoolBox.elf",
"command": "${env:JABY_ENGINE_PATH}/bin/psxreadmap ${input:output memory map} application/bin/${input:tv format}/PSX-${input:build profile}/PoolBox.elf",
"problemMatcher": [],
"options": {
"env": {
"PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}"
}
}
}
],
"inputs": [
@ -73,7 +58,7 @@
"type": "command",
"command": "shellCommand.execute",
"args": {
"command": "echo ^|^<Default^> && dir /b /a:d",
"command": "echo \"|<Default>\" && ls -d */",
"cwd": "${env:JABY_ENGINE_PATH}/config",
"fieldSeparator": "|"
}

View File

@ -8,7 +8,7 @@ $(CD_OUTPUT): always
$(PKG_OUTPUT): always
@mkdir -p $(REGION)
@echo "!!PKG generation is experimentel!!"
run_pop_fe.sh $(ARTIFACT) $(PWD)/assets/pkg $(PWD)/iso/$(REGION)/$(ARTIFACT).cue
run_pop_fe.sh $(ARTIFACT) $(shell pwd)/../assets/pkg $(shell pwd)/$(REGION)/$(ARTIFACT).cue
all: $(CD_OUTPUT)
clean: pkg_clean

19
podman/Dockerfile Normal file
View File

@ -0,0 +1,19 @@
FROM "ubuntu:22.04"
WORKDIR /usr/scripts
ADD ["scripts/make_gcc.sh", "/usr/scripts"]
WORKDIR /tmp
RUN apt update && /usr/scripts/make_gcc.sh
WORKDIR /usr/scripts
ADD ["scripts/install_rust.sh", "/usr/scripts"]
RUN apt update && ./install_rust.sh
ADD ["scripts/install_pop-fe.sh", "scripts/run_pop_fe.sh", "/usr/scripts"]
WORKDIR /usr/jaby_engine/bin/extern
RUN apt update && /usr/scripts/install_pop-fe.sh
WORKDIR /project
ENV PATH="/jaby_engine/bin:/root/.cargo/bin:${PATH}"
ENV JABY_ENGINE_PATH=/jaby_engine
ENV JABY_ENGINE_DIR=/jaby_engine
ENV PSX_LICENSE_PATH=/psx_license

17
podman/install.sh Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env bash
podman build -t jaby_engine .
if [[ -z "${JABY_ENGINE_PATH}" ]]; then
echo "Setting JABY_ENGINE_PATH to parent folder"
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"
export JABY_ENGINE_PATH="$(dirname "$SCRIPT_DIR")"
if cat /etc/passwd | grep $USER | grep bash > /dev/null; then
# Bash found
echo "export JABY_ENGINE_PATH="$JABY_ENGINE_PATH"" >> ~/.bashrc
else
# No bash found
echo "Please add export JABY_ENGINE_PATH="$JABY_ENGINE_PATH" to your shell profile"
fi
fi

View File

@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Made possible by Cody the white tiger
echo "<<< Install pop-fe >>>"
apt-get install -y cmake python-is-python3 python3 python3-pip python3-venv pkg-config libiso9660-dev libsndfile1-dev swig libsndfile-dev ffmpeg mame-tools cmake wget unzip
git clone --recursive https://github.com/sahlberg/pop-fe
pip3 install pytubefix PyPDF2 requests pycdlib ecdsa tkinterdnd2 opencv-contrib-python rarfile scikit-learn scipy
make -C pop-fe/PSL1GHT/tools/ps3py/
cmake -B pop-fe/atracdenc/src/ -S pop-fe/atracdenc/src/
make -C pop-fe/atracdenc/src/
cd pop-fe
./pop-fe.py --install
echo "<<< Register pop-fe >>>"
ln -s /usr/scripts/run_pop_fe.sh /usr/local/bin/run_pop_fe.sh

9
podman/scripts/install_rust.sh Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
echo "<<< Install Rust prerequisites >>>"
apt install -y curl
RUST_VERSION=1.78.0
echo "<<< Install Rust $RUST_VERSION >>>"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain=$RUST_VERSION -y
. "$HOME/.cargo/env"
cargo install cargo-edit --locked

65
podman/scripts/make_gcc.sh Executable file
View File

@ -0,0 +1,65 @@
#!/usr/bin/env bash
echo "<<< Install GCC prerequisites >>>"
apt install -y make texinfo g++ gcc git libgmp3-dev libmpfr-dev libmpc-dev flex install-info info bison
GCC_VERSION=13.1.0
echo "<<< Build GCC >>>"
mkdir -p psx-gcc
cd psx-gcc
echo "<<< clone binutils >>>"
git clone git://sourceware.org/git/binutils-gdb.git
cd binutils-gdb
mkdir -p build
cd build
echo "<<< Configure binutils >>>"
../configure --target=mipsel-linux-gnu --with-sysroot --disable-nls --disable-werror
if [ $? -ne 0 ]; then
exit 1
fi
echo "<<< Make binutils >>>"
make -j$(nproc)
if [ $? -ne 0 ]; then
exit 1
fi
echo "<<< Install binutils >>>"
make -j$(nproc) install
if [ $? -ne 0 ]; then
exit 1
fi
cd ../..
echo "<<< clone gcc >>>"
git clone --recurse-submodules git://gcc.gnu.org/git/gcc.git
cd gcc
echo "<<< checkout gcc $GCC_VERSION >>>"
git checkout "releases/gcc-$GCC_VERSION"
mkdir -p build
cd build
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 >>>"
make -j$(nproc) all-gcc
if [ $? -ne 0 ]; then
exit 1
fi
echo "<<< Install gcc >>>"
make -j$(nproc) install-gcc
if [ $? -ne 0 ]; then
exit 1
fi
echo "<<< Delete GCC folder >>>"
cd /tmp
rm -fr psx-gcc

5
podman/scripts/run_pop_fe.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Made possible by Cody the white tiger
cd /usr/jaby_engine/bin/extern/pop-fe
./pop-fe.py --title=$1 --ps1-newemu --cover=$2/Icon.png --pic0=$2/Title.png --pic1=$2/Background.png --ps3-pkg="${3%.*}.pkg" $3

View File

@ -1,8 +1,9 @@
- [JabyEngine](#jabyengine)
- [About](#about)
- [How to build](#how-to-build)
- [Building `JabyEngine` (without VSCode)](#building-jabyengine-without-vscode)
- [Building support library (without VSCode)](#building-support-library-without-vscode)
- [Building `Tools` (without VS Code)](#building-tools-without-vs-code)
- [Building `JabyEngine` (without VS Code)](#building-jabyengine-without-vs-code)
- [Building support library (without VS Code)](#building-support-library-without-vs-code)
- [`FontWriter` (without VSCode)](#fontwriter-without-vscode)
- [Building `PoolBox` (without VSCode)](#building-poolbox-without-vscode)
- [Media creators](#media-creators)
@ -15,12 +16,29 @@
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!
## 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.
JabyEngine can be build with a docker image using `podman`. Simply run the `install.sh` script from the `podman` folder and you should be good to go.
`podman_jaby_engine.sh` allows you to easily run the docker image for builds:
`podman_jaby_engine.sh <project mounting folder>:<working directory relative to project mounting folder> <Command to run> <Arg1> <Args2> <...>`
The following environment variables should be set:
* `JABY_ENGINE_PATH`: The path to the root folder of this repo
* `JABY_ENGINE_PATH`: The path to the root folder of this repo. If you used the `install.sh` script and the environment variable was not set, the script will have set it to the folder. Restarting the shell or VS Code might be required.
* `PSX_LICENSE_PATH`: The path to a folder containing the PS1 licenses for generating a CD.
Additionally you can also specify the following optional environment variables:
* `JABY_ENGINE_NO_DOCKER`: Turns off the usage of `podman` for builds. This is only recommended for specific development.
VS Code has build targets set for all the projects which should be build in this order:
* `src/Tools/Tools.code-workspace`: Build all tools
* `src/Library/Library.code-workspace`: Build JabyEngine for the configurations you need
* `support/src/SupportLibrary.code-workspace` (optional): Build for using support code
* `examples/PoolBox/PoolBox.code-workspace`(optional): Build for an example "game"
### Building `Tools` (without VS Code)
`make` requires the following values to be passed:
* `CARGO_CMD`: `build`
* `BUILD_PROFILE`: `debug`/`release`
### Building `JabyEngine` (without VS Code)
`make` requires the following values to be passed:
* `BUILD_PROFILE`: `debug`/`release`
@ -45,8 +63,9 @@ These projects shall eventually turn into useful extensions for the engine. So f
# Media creators
## JabyEngine
| Art | Author |
|-----------------------------------------------------------------|--------|
|-----------------------------------------------------------------|------------------------------------------------------------|
| `ressources\Splash_ntsc.png` <br/> `ressources\Splash_ntsc.png` | Niuka |
| `bin/extern/32BIT.TMD` | http://psx.arthus.net/homebrew/assets/boot_logos/32BIT.TMD |
## PoolBox
| Art | Author |

25
scripts/podman_jaby_engine.sh Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
JABY_ENGINE_DOT_FOLDER="$HOME/.jaby_engine"
JABY_ENGINE_CARGO_FOLDER="$JABY_ENGINE_DOT_FOLDER/cargo/registry"
if [[ -n "${PSX_LICENSE_PATH}" ]]; then
LICENSE_MOUNT="-v ${PSX_LICENSE_PATH}:/psx_license"
else
LICENSE_MOUNT=
fi
PROJECT_PATH_ARR=(${1//:/ })
PROJECT_PATH=${PROJECT_PATH_ARR[0]}
PROJECT_WORK_DIR=${PROJECT_PATH_ARR[1]}
shift
if [[ -z "${JABY_ENGINE_NO_DOCKER}" ]]; then
mkdir -p $JABY_ENGINE_CARGO_FOLDER
podman run --rm -it -v $JABY_ENGINE_CARGO_FOLDER:/root/.cargo/registry -v ${JABY_ENGINE_PATH}:/jaby_engine -v ${PROJECT_PATH}:/project $LICENSE_MOUNT -w /project/$PROJECT_WORK_DIR jaby_engine $@
else
echo "WARNING! You are not running in podman"
export JABY_ENGINE_DIR=$JABY_ENGINE_PATH
export PATH="$JABY_ENGINE_PATH/bin:${PATH}"
cd $PROJECT_PATH/$PROJECT_WORK_DIR
$@
fi

View File

@ -19,23 +19,13 @@
{
"label": "make",
"type": "shell",
"windows": {
"command": "wsl make ${input:target} BUILD_PROFILE=${input:build cfg} PSX_TV_FORMAT=${input:tv format} CUSTOM_CONFIG=${input:config options}",
},
"linux": {
"command": "make ${input:target} BUILD_PROFILE=${input:build cfg} PSX_TV_FORMAT=${input:tv format} CUSTOM_CONFIG=${input:config options}",
},
"command": "../../scripts/podman_jaby_engine.sh ../../:src/Library make ${input:target} BUILD_PROFILE=${input:build cfg} PSX_TV_FORMAT=${input:tv format} CUSTOM_CONFIG=${input:config options}",
"group": "build"
},
{
"label": "make_all",
"type": "shell",
"windows": {
"command": "wsl make -f MakeAll.mk ${input:target prefix}_${input:target} BUILD_PROFILE=${input:build cfg} CUSTOM_CONFIG=${input:config options}",
},
"linux": {
"command": "make -f MakeAll.mk ${input:target} BUILD_PROFILE=${input:build cfg}",
},
"command": "../../scripts/podman_jaby_engine.sh ../../:src/Library make -f MakeAll.mk ${input:target prefix}_${input:target} BUILD_PROFILE=${input:build cfg} CUSTOM_CONFIG=${input:config options}",
"group": "build"
}
],
@ -59,7 +49,7 @@
"type": "command",
"command": "shellCommand.execute",
"args": {
"command": "echo ^|^<Default^> && dir /b /a:d",
"command": "echo \"|<Default>\" && ls -d */",
"cwd": "${workspaceFolder}/../../config",
"fieldSeparator": "|"
}
@ -81,7 +71,7 @@
]
},
"extensions": {
"recommendations": ["augustocdias.tasks-shell-input"]
"recommendations": ["augustocdias.tasks-shell-input", "cantonios.project-templates"]
},
"settings": {
"cmake.configureOnOpen": false,

View File

@ -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"

View File

@ -6,23 +6,14 @@
],
"settings": {
"cargo_task": [
"./ all!Unix: All",
"cpp_out all!Unix: cpp_out",
"mkoverlay all!Unix: mkoverlay",
"psxcdgen_ex all!Unix: psxcdgen_ex",
"psxcdread all!Unix: psxcdread",
"psxfileconv all!Unix: psxfileconv",
"psxreadmap all!Unix: psxreadmap",
"wslpath all!Unix: wslpath",
"./ all-windows!Windows: All",
"cpp_out all-windows!Windows: cpp_out",
"mkoverlay all-windows!Windows: mkoverlay",
"psxcdgen_ex all-windows!Windows: psxcdgen_ex",
"psxcdread all-windows!Windows: psxcdread",
"psxfileconv all-windows!Windows: psxfileconv",
"psxreadmap all-windows!Windows: psxreadmap",
"wslpath all-windows!Windows: wslpath"
"./ all!All",
"cpp_out all!cpp_out",
"mkoverlay all!mkoverlay",
"psxcdgen_ex all!psxcdgen_ex",
"psxcdread all!psxcdread",
"psxfileconv all!psxfileconv",
"psxreadmap all!psxreadmap",
"wslpath all!wslpath",
]
},
"tasks": {
@ -34,26 +25,11 @@
"group": {
"kind": "build"
},
"windows": {
"command": "wsl --shell-type login make -C ${input:windows_cargo_task} CARGO_CMD=${input:cargo cmd} BUILD_PROFILE=${input:build cfg}"
},
"linux": {
"command": "make -C ${input:linux_cargo_task} BUILD_PROFILE=${input:build cfg}"
},
"command": "../../scripts/podman_jaby_engine.sh ../../:src/Tools make -C ${input:linux_cargo_task} CARGO_CMD=${input:cargo cmd} BUILD_PROFILE=${input:build cfg}",
"problemMatcher": []
}
],
"inputs": [
{
"id": "windows_cargo_task",
"type": "command",
"command": "shellCommand.execute",
"args": {
"command": "powershell",
"commandArgs": ["-command", "'${config:cargo_task}'.Replace(',',\"`n\")"],
"fieldSeparator": "!"
}
},
{
"id": "linux_cargo_task",
"type": "command",
@ -73,7 +49,7 @@
{
"id": "cargo cmd",
"type":"pickString",
"options": ["build", "check", "update", "upgrade", "clean", "run", "tree"],
"options": ["build", "check", "upgrade", "clean", "run", "tree"],
"default": "build",
"description": "cargo command to run"
}

View File

@ -1,4 +1,3 @@
JABY_ENGINE_DIR = ../../..
include $(JABY_ENGINE_DIR)/mkfile/common/RebuildTarget.mk
ARTIFACT = libFontWriter

View File

@ -1,6 +1,6 @@
FontWriter: always
.PHONY: FontWriter
FontWriter:
$(MAKE) -C $(JABY_ENGINE_DIR)/support/src/FontWriter $(MAKECMDGOALS)
all: FontWriter
always: ;

View File

@ -19,15 +19,7 @@
{
"label": "make",
"type": "shell",
"windows": {
"command": "wsl make ${input:target} BUILD_PROFILE=${input:build cfg}",
},
"linux": {
"command": "make ${input:target} BUILD_PROFILE=${input:build cfg}",
},
"options": {
"cwd": "${workspaceFolder}/FontWriter"
},
"command": "../../scripts/podman_jaby_engine.sh ${workspaceFolder}/..:src/FontWriter make ${input:target} BUILD_PROFILE=${input:build cfg}",
"group": "build"
}
],

View File

@ -11,32 +11,17 @@
{
"label": "build",
"type": "shell",
"windows": { // v re-export for WSL v re-export for WSL
"command": "wsl make ${input:project}_${input:target} BUILD_PROFILE=${input:build profile} REGION=${input:region} CUSTOM_CONFIG=${input:custom config} PSX_LICENSE_PATH=$(wslpath ${env:PSX_LICENSE_PATH}) JABY_ENGINE_DIR=$(wslpath ${env:JABY_ENGINE_PATH})",
},
"linux": {
"command": "make ${input:project}_${input:target} BUILD_PROFILE=${input:build profile} REGION=${input:region} CUSTOM_CONFIG=${input:custom config}",
},
"command": "${env:JABY_ENGINE_PATH}/scripts/podman_jaby_engine.sh ${workspaceFolder}:. make ${input:project}_${input:target} BUILD_PROFILE=${input:build profile} REGION=${input:region} CUSTOM_CONFIG=${input:custom config}",
"group": {
"kind": "build",
"isDefault": true
},
"options": {
"env": {
"PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}"
}
}
},
{
"label": "read memory map",
"type": "shell",
"command": "psxreadmap.exe ${input:output memory map} application/bin/${input:tv format}/PSX-${input:build profile}/#{ProjectName}.elf",
"command": "${env:JABY_ENGINE_PATH}/bin/psxreadmap ${input:output memory map} application/bin/${input:tv format}/PSX-${input:build profile}/#{ProjectName}.elf",
"problemMatcher": [],
"options": {
"env": {
"PATH": "${env:JABY_ENGINE_PATH}/bin;${env:PATH}"
}
}
}
],
"inputs": [
@ -73,7 +58,7 @@
"type": "command",
"command": "shellCommand.execute",
"args": {
"command": "echo ^|^<Default^> && dir /b /a:d",
"command": "echo \"|<Default>\" && ls -d */",
"cwd": "${env:JABY_ENGINE_PATH}/config",
"fieldSeparator": "|"
}

View File

@ -1,6 +0,0 @@
echo off
set dst_name=JabyEngine-PSX_Game
set dst="%APPDATA%\Code\User\ProjectTemplates\%dst_name%"
mkdir %dst%
xcopy /s %dst_name% %dst%

5
template/install.sh Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
dst="$HOME/.config/Code/User/ProjectTemplates"
mkdir -p $dst
cp -r "JabyEngine-PSX_Game" "$dst"

View File

@ -1,42 +0,0 @@
#!/bin/bash
#Made possible by Cody the white tiger
BASEDIR=$(dirname "$0")
mkdir -p $BASEDIR/../bin/extern/
cd $BASEDIR/../bin/extern
sudo apt install -y python3 python3-pip python3-venv pkg-config libiso9660-dev libsndfile1-dev swig
if ! test -d py3venv; then
python3 -m venv py3venv
fi
source py3venv/bin/activate
pip3 install ecdsa wheel pillow rarfile PyPDF2 requests opencv-contrib-python pycryptodome pycdio pycdlib
if ! test -d pop-fe; then
git clone https://github.com/sahlberg/pop-fe
fi
if ! test -d Cue2cu2; then
git clone https://github.com/NRGDEAD/Cue2cu2
cp Cue2cu2/cue2cu2.py pop-fe
fi
cd pop-fe
if ! test -d atracdenc; then
git clone https://github.com/dcherednik/atracdenc.git
cd atracdenc/src/
cmake .
make
cd ../..
fi
if ! test -d PSL1GHT; then
git clone https://github.com/sahlberg/PSL1GHT
cd PSL1GHT/tools/ps3py
git checkout origin/use-python3
make
fi
#if ! test -f /usr/local/bin/python; then
# sudo ln -s $(which python3) /usr/local/bin/python
#fi

View File

@ -1,2 +0,0 @@
#!/bin/bash
sudo curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

View File

@ -1,55 +0,0 @@
#!/bin/bash
mkdir -p psx-gcc
cd psx-gcc
echo "clone binutils"
git clone git://sourceware.org/git/binutils-gdb.git
cd binutils-gdb
mkdir -p build
cd build
echo "Configure binutils"
../configure --target=mipsel-linux-gnu --with-sysroot --disable-nls --disable-werror
if [ $? -ne 0 ]; then
exit 1
fi
echo "Make binutils"
make
if [ $? -ne 0 ]; then
exit 1
fi
echo "Install binutils"
sudo make install
if [ $? -ne 0 ]; then
exit 1
fi
cd ../..
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
mkdir -p build
cd build
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"
make all-gcc
if [ $? -ne 0 ]; then
exit 1
fi
echo "Install gcc"
sudo make install-gcc
if [ $? -ne 0 ]; then
exit 1
fi

View File

@ -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