Compare commits

...

3 Commits

4 changed files with 32 additions and 53 deletions

View File

@ -67,6 +67,7 @@ ADD ${REPOS_PATH}/gnulib /opt/adtools/gnulib/repo
ADD build-gcc.sh /opt/adtools
ADD ${REPOS_PATH}/execsg_private_sdk /tmp/execsg_private_sdk
ADD ${REPOS_PATH}/newlib-53.77 /tmp/newlib
WORKDIR /opt/adtools

View File

@ -4,8 +4,9 @@ TAG ?= adtools-build
WORKSPACE ?= -w /opt/adtools
NAME ?= adtools-build
VOLUMES ?= -v "${PWD}/native-gcc":/gcc
GCC ?= 8
.PHONY: help build buildnc shell gcc6 gcc8 gcc10 gcc11 clonerepos pullrepos clean
.PHONY: help build buildnc shell compile clonerepos pullrepos clean
default: help
@ -14,22 +15,17 @@ help:
@echo "where adtools can get build."
@echo "The available parameters can be seen below:"
@echo ""
@echo "build - Build the Docker image"
@echo "buildnc - Pull the latest repos' code and build the Docker image without"
@echo " using caching"
@echo "shell - Create a container with the latest Docker image and get into it."
@echo " Not suitable to compile adtools"
@echo "gcc6 - Create a container with the latest Docker image and get into it"
@echo " to compile adtools with GCC 6."
@echo "gcc8 - Create a container with the latest Docker image and get into it"
@echo " to compile adtools with GCC 8."
@echo "gcc10 - Create a container with the latest Docker image and get into it"
@echo " to compile adtools with GCC 10."
@echo "gcc11 - Create a container with the latest Docker image and get into it"
@echo " to compile adtools with GCC 11."
@echo "clonerepos - Clone the necessary repositories under repos folder."
@echo "pullrepos - Pull the latest code for the projects under repos folder."
@echo "clean - Remove the docker container, if this still exists."
@echo "build - Build the Docker image"
@echo "buildnc - Pull the latest repos' code and build the Docker image"
@echo " without using caching"
@echo "shell - Create a container with the latest Docker image and get"
@echo " into it. Not suitable to compile adtools"
@echo "compile [GCC=x] - Create a container with the latest Docker image and get"
@echo " into it to compile adtools with GCC 8 (default) or the"
@echo " defined one by GCC argument. Possible values 6/8/9/10/11."
@echo "clonerepos - Clone the necessary repositories under repos folder."
@echo "pullrepos - Pull the latest code for the projects under repos folder."
@echo "clean - Remove the docker container, if this still exists."
@echo ""
@echo "Since the SDK 53.34 is used, there is a need of the latest ExecSG private SDK"
@echo "which should be placed manually under repos folder. So the path should be:"
@ -47,33 +43,12 @@ buildnc: pullrepos
shell:
docker run -it --rm --name $(NAME) $(WORKSPACE) $(VOLUMES) $(REPO):$(TAG) /bin/bash
gcc6:
docker run -it --rm --name $(NAME)-6 $(WORKSPACE) \
-v "${PWD}/native-gcc/6":/gcc \
compile:
docker run -it --rm --name $(NAME)-$(GCC) $(WORKSPACE) \
-v "${PWD}/native-gcc/$(GCC)":/gcc \
-v "${PWD}/files/native-build/makefile-SDK53.34":/opt/adtools/native-build/makefile \
-v "${PWD}/files/gcc-build":/opt/adtools/gcc-build \
--env-file .env6 $(REPO):$(TAG) /bin/bash
gcc8:
docker run -it --rm --name $(NAME)-8 $(WORKSPACE) \
-v "${PWD}/native-gcc/8":/gcc \
-v "${PWD}/files/native-build/makefile-SDK53.34":/opt/adtools/native-build/makefile \
-v "${PWD}/files/gcc-build":/opt/adtools/gcc-build \
--env-file .env8 $(REPO):$(TAG) /bin/bash
gcc10:
docker run -it --rm --name $(NAME)-10 $(WORKSPACE) \
-v "${PWD}/native-gcc/10":/gcc \
-v "${PWD}/files/native-build/makefile-SDK53.34":/opt/adtools/native-build/makefile \
-v "${PWD}/files/gcc-build":/opt/adtools/gcc-build \
--env-file .env10 $(REPO):$(TAG) /bin/bash
gcc11:
docker run -it --rm --name $(NAME)-11 $(WORKSPACE) \
-v "${PWD}/native-gcc/11":/gcc \
-v "${PWD}/files/native-build/makefile-SDK53.34":/opt/adtools/native-build/makefile \
-v "${PWD}/files/gcc-build":/opt/adtools/gcc-build \
--env-file .env11 $(REPO):$(TAG) /bin/bash
--env-file .env$(GCC) $(REPO):$(TAG) /bin/bash
clonerepos:
git clone https://github.com/sba1/adtools $(REPOSPATH)/adtools

View File

@ -1,10 +1,10 @@
# adtoolsBuilder
This is docker images that can be used to build native adtools for AmigaOS 4 on every operating system that supports Docker.
This is a docker image that can be used to build native adtools for AmigaOS 4 on any operating system that supports Docker.
## Setup
To prepare the environment you need to do the following:
To prepare the development environment you need to do the following:
1. Clone the necessary repos under the `repos` folder
```bash
@ -22,24 +22,25 @@ To prepare the environment you need to do the following:
```bash
make build
```
This will create the walkero/adtoolsbuilder:adtools-build Docker image, with size around 1.88GB. So make sure you have this available space at your hard disk.
This will create the walkero/adtoolsbuilder:adtools-build Docker image, with the size of around 1.88GB. So make sure you have this available space on your hard disk.
After this steps you are ready to compile the adtools on your machine.
After these steps, you are ready to compile the adtools on your machine.
## Compile adtools
To compile adtools you first need to create a Docker container based on which GCC version you want to build. Available versions are 6, 8, 10, 11. To do that you just need to run the following:
To compile adtools you first need to create a Docker container based on which GCC version you want to build. Available versions are 6, 8, 9, 10, 11. To do that you just need to run the following:
```bash
make gcc8
make compile GCC=8
```
Change the number based on which version you would like to compile.
Change the number based on which version you would like to compile. By default, if GCC argument is missing, is set to compile GCC 8.
Then you can execute the `build-gcc.sh` script to run all the steps, or do them by hand.
**CAUTION:** Because of a bug, the `make native-install` command might fail the first time you run it, but it will succeed if you run it a second time. That's why it is recommended to execute the commands by hand, until this bug is fixed.
**CAUTION:** Because of a bug, the `make native-install` command might fail the first time you run it, but it will succeed if you run it a second time. That's why it is recommended to execute the commands by hand until this bug is fixed.
## Useful information
1. When you start a container to compile adtools in there, a new folder will be created named `native-gcc`. In there new folders will be created with the gcc files and the distribution lha packages for adtools and clib. This way you can get those files from the host machine.
2. By default, the adtools is compiled using the latest AmigaOS 4 SDK v53.34. If you would like to compile them using the previous v53.30, then open the `Makefile` and change the `makefile-SDK53.34` to `makefile-SDK53.30`. By doing that the latest ExecSG private SDK is not used, and you can have an empty folder under `repos` directory.
3. If you don't have the latest ExecSG private SDK, then check the above line on what to do.
4. If you want to update the cloned repos and rebuild the Docker image, just run `make buildnc`. This will pull the latest code for the necessary repos and will re-create the Docker image. The files `native-build/Makefile`, `gcc-build/features.mk` and `gcc-build/Makefile` are not updated though, because custom ones are used. If there are updates at the adtools repo, these need to be applied manually, with caution. The custom files can be found under `files/` folder.
4. If you want to update the cloned repos and rebuild the Docker image, just run `make buildnc`. This will pull the latest code for the necessary repos and will re-create the Docker image. The files `native-build/Makefile`, `gcc-build/features.mk` and `gcc-build/Makefile` are not updated though, because custom ones are used. If there are updates at the adtools repo, these need to be applied manually, with caution. The custom files can be found under `files/` folder.
5. To get a list of the available parameters of make script, you can run `make help` or just `make`.

View File

@ -118,10 +118,12 @@ includes-done: downloads-done
cd downloads && lha x SDK_$(SDK_VERSION).lha
# We built clib2 inplace
# cd downloads/SDK_Install && lha xf clib2*.lha
cd downloads/SDK_Install && lha xf newlib*.lha
# cd downloads/SDK_Install && lha xf newlib*.lha
cd downloads/SDK_Install && lha xf base.lha
cd downloads/SDK_Install && rm -Rf *.lha
cd downloads/SDK_Install && mv newlib* $(CROSS_PREFIX)/ppc-amigaos/SDK
# Disabled Newlib from the SDK archive so to use the latest beta version
# cd downloads/SDK_Install && mv newlib* $(CROSS_PREFIX)/ppc-amigaos/SDK
cp -r /tmp/newlib/SDK/* $(CROSS_PREFIX)/ppc-amigaos/SDK
# cd downloads/SDK_Install && mv clib2* $(CROSS_PREFIX)/ppc-amigaos/SDK
cd downloads/SDK_Install && mv Include/* $(CROSS_PREFIX)/ppc-amigaos/SDK/include
# Copying the latest execsg private sdk header files