From: Lawrence S. <ljs...@us...> - 2020-09-22 21:06:17
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 168b67940c9111179a51c3ce7deb33d9afbf971d (commit) via 4d0b220186d5a84954276b69462663a928fbb095 (commit) via d62f4d92845b3f7028e1cbb21c65a761f2dd94db (commit) via 7b41c90d5b5ae7b11ac4d54d3fcc8cb2d1d13aa2 (commit) from 76f197a96250ad7b52cf543817b56536bddf368a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 168b67940c9111179a51c3ce7deb33d9afbf971d Merge: 76f197a 4d0b220 Author: Lawrence Sebald <ljs...@us...> Date: Tue Sep 22 17:05:41 2020 -0400 Merge pull request #49 from sizious/dc-chain-config-mk-update dc-chain: Provide multiple example configuration files for the build. commit 4d0b220186d5a84954276b69462663a928fbb095 Author: SiZiOUS <si...@gm...> Date: Tue Sep 22 22:24:51 2020 +0200 Wording: Renaming 'edge' to 'testing' commit d62f4d92845b3f7028e1cbb21c65a761f2dd94db Author: SiZiOUS <si...@gm...> Date: Tue Sep 22 22:11:06 2020 +0200 Improvements on the 'config.mk' handling. - The 'config.mk' file should be created by the user, like the 'environ.sh.sample' file for KOS. - 2 templates are provided, an 'edge' supplying GCC 9.3.0 and a 'stable' supplying GCC 4.7.4. - Dockerfiles were updated. - Documentation was updated to reflect this change. - Several fail-safes has been put in place for checking the 'config.mk' file presence. commit 7b41c90d5b5ae7b11ac4d54d3fcc8cb2d1d13aa2 Merge: ce33885 76f197a Author: SiZiOUS <si...@gm...> Date: Tue Sep 22 21:06:52 2020 +0200 Merge pull request #1 from KallistiOS/master Update Sync 20200922 ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/.gitignore | 1 + utils/dc-chain/Makefile | 9 +++- utils/dc-chain/README.md | 48 ++++++++++++++-------- .../{config.mk => config.mk.stable.sample} | 26 ++++++------ .../{config.mk => config.mk.testing.sample} | 0 utils/dc-chain/doc/bsd/README.md | 7 +--- utils/dc-chain/doc/cygwin/README.md | 7 +--- utils/dc-chain/doc/linux/alpine.md | 7 +--- utils/dc-chain/doc/linux/debian.md | 7 +--- utils/dc-chain/doc/macos/README.md | 7 +--- utils/dc-chain/doc/mingw/mingw-w64.md | 7 +--- utils/dc-chain/doc/mingw/mingw.md | 7 +--- utils/dc-chain/docker/README.md | 4 +- utils/dc-chain/docker/stable/Dockerfile | 6 ++- .../dc-chain/docker/{stable => testing}/Dockerfile | 6 ++- utils/dc-chain/scripts/common.sh | 6 +++ 16 files changed, 81 insertions(+), 74 deletions(-) copy utils/dc-chain/{config.mk => config.mk.stable.sample} (95%) rename utils/dc-chain/{config.mk => config.mk.testing.sample} (100%) copy utils/dc-chain/docker/{stable => testing}/Dockerfile (79%) diff --git a/utils/dc-chain/.gitignore b/utils/dc-chain/.gitignore index 01041b6..835f45d 100644 --- a/utils/dc-chain/.gitignore +++ b/utils/dc-chain/.gitignore @@ -8,3 +8,4 @@ insight-* build-* *.stamp config.guess +config.mk diff --git a/utils/dc-chain/Makefile b/utils/dc-chain/Makefile index 09c1ac5..75e8c0d 100644 --- a/utils/dc-chain/Makefile +++ b/utils/dc-chain/Makefile @@ -5,7 +5,7 @@ # Initially adapted from Stalin's build script version 0.3. # -# Please edit 'config.mk' to customize your 'dc-chain' setup. +# Please create/edit 'config.mk' to customize your 'dc-chain' setup. # # Display startup banner @@ -13,7 +13,12 @@ include scripts/banner-variables.mk include scripts/banner.mk # User configuration -include config.mk +config_file=config.mk +ifneq ("$(wildcard $(config_file))","") + include $(config_file) +else + $(error The required $(config_file) file is missing) +endif # Detect host machine include scripts/host-detect.mk diff --git a/utils/dc-chain/README.md b/utils/dc-chain/README.md index 269fb01..619ba8e 100644 --- a/utils/dc-chain/README.md +++ b/utils/dc-chain/README.md @@ -63,14 +63,18 @@ If you need help on this step, everything is described in the `./doc` directory. ## Configuration -The recommended settings are already set but if you want to tweak your setup, -feel free to open the `config.mk` file in your favorite editor. +In order to allow `dc-chain` to work, you'll need to provide a `config.mk` file. +This file will contain the settings used for making the toolchains. -Please find below every parameter available in the `config.mk` file. +You may create this `config.mk` file from scratch or use a provided template +as base. + +Please find below every parameter available in the `config.mk` file and more +information about `config.mk` templates. ### Toolchains components -All component's version of the toolchains are declared in the `config.mk` file. +All component's versions of the toolchains are declared in the `config.mk` file. For the `sh-elf` toolchain, they are: @@ -86,19 +90,27 @@ For the `arm-eabi` toolchain, they are: - `arm_gcc_ver` Speaking about the best versions of the components to use for the Dreamcast -development, they are already set in the `config.mk` file. This is particularly -true for **GCC** and **Newlib** as these components are patched to compile with -**KallistiOS**. For **Binutils** or **GDB**, you may in theory use the latest -available versions without problems. +development, this is a very critical point. Indeed, **GCC** and **Newlib** +versions are core components; they are patched to compile with **KallistiOS**. +For **Binutils** or **GDB**, you may in theory use the latest available versions +without problems. -Well tested **GCC** and **Newlib** version combinations are: +Working **GCC** and **Newlib** version combinations are: - GCC `9.3.0` with Newlib `3.3.0` for `sh-elf` and GCC `8.4.0` for `arm-eabi` - (edge; default values in `config.mk`); -- GCC `4.7.4` with Newlib `2.0.0` for `sh-elf` and `arm-eabi` (stable; the most - well tested combination, [some issues may happen in C++](https://dcemulation.org/phpBB/viewtopic.php?f=29&t=104724)); -- GCC `4.7.3` with Newlib `2.0.0` for `sh-elf` and `arm-eabi` (stable; previous - version, [some issues may happen in C++](https://dcemulation.org/phpBB/viewtopic.php?f=29&t=104724)). + (**testing**; the most modern combination); +- GCC `4.7.4` with Newlib `2.0.0` for `sh-elf` and `arm-eabi` (**stable**; the + most well tested combination, [some issues may happen in C++](https://dcemulation.org/phpBB/viewtopic.php?f=29&t=104724)); +- GCC `4.7.3` with Newlib `2.0.0` for `sh-elf` and `arm-eabi` (**old-stable**; + previous version, [some issues may happen in C++](https://dcemulation.org/phpBB/viewtopic.php?f=29&t=104724)). + +To help you on this, 2 `config.mk` templates are provided with `dc-chain`: + +- `config.mk.testing.sample` (testing); +- `config.mk.stable.sample` (stable). + +Just copy the relevant `config.mk` sample file to `config.mk` and you are good +to go. **Note:** The GCC's maximum version number possible for the `arm-eabi` toolchain is `8.4.0`. Support of the **ARM7** chip is dropped after that GCC version. So @@ -116,7 +128,7 @@ extensions you want to download too; this may be useful if a package changes its extension on the servers. For example, for GCC `4.7.4`, there is no `xz` tarball file, so you may change this to `gz`. -**Note:** All download url are computed in the `scripts/common.sh` file, but +**Note:** All download URL are computed in the `scripts/common.sh` file, but you shouldn't update/change this. ### Toolchains base @@ -153,7 +165,7 @@ inside the `config.mk` to set the number of jobs for the building phases. Set the `makejobs` variable in the `config.mk` to whatever you would normally feel the need to use on the command line, and it will do the right thing. -In the old times, this option may breaks things, so, if you run into trouble, +In the old times, this option may break things, so, if you run into trouble, you should clear this variable and try again with just one job running (i.e. `makejobs=`). @@ -267,8 +279,8 @@ This will save a lot of space by removing all unnecessary files. ## Final note Please see the comments at the top of the `config.mk` file for more build -options. For example if something goes wrong, you may restart the compilation -of the bogus step only rather than running the whole process again. +options. For example, if something goes wrong, you may restart the compilation +of the problematic step only rather than running the whole process again. Interesting targets (you can `make` any of these): diff --git a/utils/dc-chain/config.mk b/utils/dc-chain/config.mk.stable.sample similarity index 95% copy from utils/dc-chain/config.mk copy to utils/dc-chain/config.mk.stable.sample index d79bbf5..0b34d65 100644 --- a/utils/dc-chain/config.mk +++ b/utils/dc-chain/config.mk.stable.sample @@ -19,14 +19,14 @@ # Toolchain versions for SH sh_binutils_ver=2.34 -sh_gcc_ver=9.3.0 -newlib_ver=3.3.0 +sh_gcc_ver=4.7.4 +newlib_ver=2.0.0 gdb_ver=9.2 insight_ver=6.8-1 # Tarball extensions to download for SH sh_binutils_tarball_type=xz -sh_gcc_tarball_type=xz +sh_gcc_tarball_type=bz2 newlib_tarball_type=gz gdb_tarball_type=xz insight_tarball_type=bz2 @@ -35,11 +35,11 @@ insight_tarball_type=bz2 # The ARM version of binutils/gcc is separated out as the particular CPU # versions we need may not be available in newer versions of GCC. arm_binutils_ver=2.34 -arm_gcc_ver=8.4.0 +arm_gcc_ver=4.7.4 # Tarball extensions to download for ARM arm_binutils_tarball_type=xz -arm_gcc_tarball_type=xz +arm_gcc_tarball_type=bz2 # GCC custom dependencies # Specify here if you want to use custom GMP, MPFR and MPC libraries as they are @@ -55,10 +55,10 @@ arm_gcc_tarball_type=xz # only if the 'use_custom_dependencies' flag is set to '1'. # GCC dependencies for SH -sh_gmp_ver=6.1.0 -sh_mpfr_ver=3.1.4 -sh_mpc_ver=1.0.3 -sh_isl_ver=0.18 +sh_gmp_ver=4.3.2 +sh_mpfr_ver=2.4.2 +sh_mpc_ver=0.8.1 +#sh_isl_ver=0.18 # Tarball extensions to download for GCC dependencies for SH sh_gmp_tarball_type=bz2 @@ -67,10 +67,10 @@ sh_mpc_tarball_type=gz sh_isl_tarball_type=bz2 # GCC dependencies for ARM -arm_gmp_ver=6.1.0 -arm_mpfr_ver=3.1.4 -arm_mpc_ver=1.0.3 -arm_isl_ver=0.18 +arm_gmp_ver=4.3.2 +arm_mpfr_ver=2.4.2 +arm_mpc_ver=0.8.1 +#arm_isl_ver=0.18 # Tarball extensions to download for GCC dependencies for ARM arm_gmp_tarball_type=bz2 diff --git a/utils/dc-chain/config.mk b/utils/dc-chain/config.mk.testing.sample similarity index 100% rename from utils/dc-chain/config.mk rename to utils/dc-chain/config.mk.testing.sample diff --git a/utils/dc-chain/doc/bsd/README.md b/utils/dc-chain/doc/bsd/README.md index 1bd2bf9..877e717 100644 --- a/utils/dc-chain/doc/bsd/README.md +++ b/utils/dc-chain/doc/bsd/README.md @@ -78,11 +78,8 @@ Everything is ready, now it's time to make the toolchains. toolchains from source codes: **dc-chain**. The **dc-chain** system is mainly composed by a `Makefile` doing all the -necessary. Open the `config.mk` file with a text editor (e.g. `nano`). -You can tweak some parameters, but usually everything is ready to work -out-of-the-box. For example, it isn't recommended to change the toolchains -program versions. The highest versions confirmed to work with the **Dreamcast** -are always already set in that `config.mk`. +necessary. In order to work, you'll need to provide a `config.mk` file. Read +the main `README.md` file at the root for more information. ### Making the toolchains ### diff --git a/utils/dc-chain/doc/cygwin/README.md b/utils/dc-chain/doc/cygwin/README.md index 36d2c7a..082ce54 100644 --- a/utils/dc-chain/doc/cygwin/README.md +++ b/utils/dc-chain/doc/cygwin/README.md @@ -95,11 +95,8 @@ Everything is ready, now it's time to make the toolchains. toolchains from source codes: **dc-chain**. The **dc-chain** system is mainly composed by a `Makefile` doing all the -necessary. Open the `config.mk` file with a text editor (e.g. `nano`). -You can tweak some parameters, but usually everything is ready to work -out-of-the-box. For example, it isn't recommended to change the toolchains -program versions. The highest versions confirmed to work with the **Dreamcast** -are always already set in that `config.mk`. +necessary. In order to work, you'll need to provide a `config.mk` file. Read +the main `README.md` file at the root for more information. ### Making the toolchains ### diff --git a/utils/dc-chain/doc/linux/alpine.md b/utils/dc-chain/doc/linux/alpine.md index 1adc67f..003e200 100644 --- a/utils/dc-chain/doc/linux/alpine.md +++ b/utils/dc-chain/doc/linux/alpine.md @@ -68,11 +68,8 @@ Everything is ready, now it's time to make the toolchains. toolchains from source codes: **dc-chain**. The **dc-chain** system is mainly composed by a `Makefile` doing all the -necessary. Open the `config.mk` file with a text editor (e.g. `nano`). -You can tweak some parameters, but usually everything is ready to work -out-of-the-box. For example, it isn't recommended to change the toolchains -program versions. The highest versions confirmed to work with the **Dreamcast** -are always already set in that `config.mk`. +necessary. In order to work, you'll need to provide a `config.mk` file. Read +the main `README.md` file at the root for more information. ### Making the toolchains ### diff --git a/utils/dc-chain/doc/linux/debian.md b/utils/dc-chain/doc/linux/debian.md index 346d36a..b341609 100644 --- a/utils/dc-chain/doc/linux/debian.md +++ b/utils/dc-chain/doc/linux/debian.md @@ -68,11 +68,8 @@ Everything is ready, now it's time to make the toolchains. toolchains from source codes: **dc-chain**. The **dc-chain** system is mainly composed by a `Makefile` doing all the -necessary. Open the `config.mk` file with a text editor (e.g. `nano`). -You can tweak some parameters, but usually everything is ready to work -out-of-the-box. For example, it isn't recommended to change the toolchains -program versions. The highest versions confirmed to work with the **Dreamcast** -are always already set in that `config.mk`. +necessary. In order to work, you'll need to provide a `config.mk` file. Read +the main `README.md` file at the root for more information. ### Making the toolchains ### diff --git a/utils/dc-chain/doc/macos/README.md b/utils/dc-chain/doc/macos/README.md index adeb276..5783923 100644 --- a/utils/dc-chain/doc/macos/README.md +++ b/utils/dc-chain/doc/macos/README.md @@ -96,11 +96,8 @@ Everything is ready, now it's time to make the toolchains. toolchains from source codes: **dc-chain**. The **dc-chain** system is mainly composed by a `Makefile` doing all the -necessary. Open the `config.mk` file with a text editor (e.g. `nano`). -You can tweak some parameters, but usually everything is ready to work -out-of-the-box. For example, it isn't recommended to change the toolchains -program versions. The highest versions confirmed to work with the **Dreamcast** -are always already set in that `config.mk`. +necessary. In order to work, you'll need to provide a `config.mk` file. Read +the main `README.md` file at the root for more information. ### Making the toolchains ### diff --git a/utils/dc-chain/doc/mingw/mingw-w64.md b/utils/dc-chain/doc/mingw/mingw-w64.md index bcef7da..d7deeb0 100644 --- a/utils/dc-chain/doc/mingw/mingw-w64.md +++ b/utils/dc-chain/doc/mingw/mingw-w64.md @@ -106,11 +106,8 @@ Everything is ready, now it's time to make the toolchains. toolchains from source codes: **dc-chain**. The **dc-chain** system is mainly composed by a `Makefile` doing all the -necessary. Open the `config.mk` file with a text editor (e.g. `nano`). -You can tweak some parameters, but usually everything is ready to work -out-of-the-box. For example, it isn't recommended to change the toolchains -program versions. The highest versions confirmed to work with the **Dreamcast** -are always already set in that `config.mk`. +necessary. In order to work, you'll need to provide a `config.mk` file. Read +the main `README.md` file at the root for more information. ### Making the toolchains ### diff --git a/utils/dc-chain/doc/mingw/mingw.md b/utils/dc-chain/doc/mingw/mingw.md index d8b0e58..7dd0882 100644 --- a/utils/dc-chain/doc/mingw/mingw.md +++ b/utils/dc-chain/doc/mingw/mingw.md @@ -171,11 +171,8 @@ Basically, if you just plan to use the **MinGW/MSYS** environment through the toolchains from source codes: **dc-chain**. The **dc-chain** system is mainly composed by a `Makefile` doing all the -necessary. Open the `config.mk` file with a text editor (e.g. `nano`). -You can tweak some parameters, but usually everything is ready to work -out-of-the-box. For example, it isn't recommended to change the toolchains -program versions. The highest versions confirmed to work with the **Dreamcast** -are always already set in that `config.mk`. +necessary. In order to work, you'll need to provide a `config.mk` file. Read +the main `README.md` file at the root for more information. ### Making the toolchains ### diff --git a/utils/dc-chain/docker/README.md b/utils/dc-chain/docker/README.md index 23cbe90..ed14587 100644 --- a/utils/dc-chain/docker/README.md +++ b/utils/dc-chain/docker/README.md @@ -24,5 +24,5 @@ building them can take hours and don't change often. Of course, the Docker image produced here can be used for CI/CD pipelines! Don't hesitate to have multiple `config.mk` files; this may be useful for -building customized toolchains (e.g. a `stable` Docker image with `gcc-9.3.0` -and a `legacy` one with `gcc-4.7.4`...). +building customized toolchains (e.g. a `testing` Docker image with `gcc-9.3.0` +and a `stable` one with `gcc-4.7.4`...). diff --git a/utils/dc-chain/docker/stable/Dockerfile b/utils/dc-chain/docker/stable/Dockerfile index 51cd19f..87ccdb1 100644 --- a/utils/dc-chain/docker/stable/Dockerfile +++ b/utils/dc-chain/docker/stable/Dockerfile @@ -1,5 +1,5 @@ # -# Dockerfile for Sega Dreamcast Toolchains Maker (dc-chain) +# Dockerfile for Sega Dreamcast Toolchains Maker (dc-chain): Stable # # Stage 1 @@ -27,7 +27,9 @@ RUN apk --update add --no-cache \ # You may adapt the KallistiOS repository URL if needed RUN mkdir -p /opt/toolchains/dc \ && git clone https://git.code.sf.net/p/cadcdev/kallistios /opt/toolchains/dc/kos \ - && cd /opt/toolchains/dc/kos/utils/dc-chain && ./download.sh && ./unpack.sh && make && make gdb \ + && cd /opt/toolchains/dc/kos/utils/dc-chain + && cp config.mk.stable.sample config.mk + && ./download.sh && ./unpack.sh && make && make gdb \ && rm -rf /opt/toolchains/dc/kos # Stage 2 diff --git a/utils/dc-chain/docker/stable/Dockerfile b/utils/dc-chain/docker/testing/Dockerfile similarity index 79% copy from utils/dc-chain/docker/stable/Dockerfile copy to utils/dc-chain/docker/testing/Dockerfile index 51cd19f..a6469b7 100644 --- a/utils/dc-chain/docker/stable/Dockerfile +++ b/utils/dc-chain/docker/testing/Dockerfile @@ -1,5 +1,5 @@ # -# Dockerfile for Sega Dreamcast Toolchains Maker (dc-chain) +# Dockerfile for Sega Dreamcast Toolchains Maker (dc-chain): Testing # # Stage 1 @@ -27,7 +27,9 @@ RUN apk --update add --no-cache \ # You may adapt the KallistiOS repository URL if needed RUN mkdir -p /opt/toolchains/dc \ && git clone https://git.code.sf.net/p/cadcdev/kallistios /opt/toolchains/dc/kos \ - && cd /opt/toolchains/dc/kos/utils/dc-chain && ./download.sh && ./unpack.sh && make && make gdb \ + && cd /opt/toolchains/dc/kos/utils/dc-chain + && cp config.mk.testing.sample config.mk + && ./download.sh && ./unpack.sh && make && make gdb \ && rm -rf /opt/toolchains/dc/kos # Stage 2 diff --git a/utils/dc-chain/scripts/common.sh b/utils/dc-chain/scripts/common.sh index e1b119f..68f2256 100755 --- a/utils/dc-chain/scripts/common.sh +++ b/utils/dc-chain/scripts/common.sh @@ -34,6 +34,12 @@ function print_banner() printf "*** ${var} Utility for ${banner_text} ***\n\n" } +# Check for config.mk +if [ ! -f "config.mk" ]; then + echo >&2 "The required config.mk file was not found!" + exit 1 +fi + export CONFIG_GUESS="config.guess" export SH_BINUTILS_VER=`get_make_var sh_binutils_ver` hooks/post-receive -- A pseudo Operating System for the Dreamcast. |