Godot's buildroot soft-fork for generating toolchains to make portable Linux releases of Godot games.
Go to file
Rémi Verschelde 731b11dcc4 Update podman builders to recent versions
Fedora 36 for the Windows builder, and keeping CentOS 7 but applying
updates for the Linux one (needed to get newer ca-certificates).
2022-05-10 13:16:44 +02:00
arch arch/Config.in.s390x: drop redundant depends on BR2_s390x 2020-09-30 21:36:07 +02:00
board board/boundarydevices: promote buildroot-external-boundary project 2020-12-27 09:29:57 +01:00
boot boot/barebox: kconfig needs the toolchain 2021-01-05 16:10:43 +01:00
configs configs/nitrogen6x_defconfig: remove duplicate BR2_PACKAGE_HOST_UBOOT_TOOLS=y 2020-12-24 09:44:50 +01:00
docs docs/manual/pkg-cmake.txt: add _INSTALL_OPTS description 2021-01-19 15:55:56 +01:00
fs fs/jffs2: copy xattrs 2020-10-08 21:48:03 +02:00
linux {linux, linux-headers}: bump 4.19.x / 5.{4, 10}.x series 2021-01-30 16:35:46 +01:00
package package/isl: switch to new site 2022-05-10 11:57:43 +02:00
support Don't try to modify binary files 2021-02-06 00:46:42 +01:00
system system: support br2-external init systems 2020-10-14 22:48:42 +02:00
toolchain toolchain/toolchain-external/toolchain-external-bootlin: update PowerPC 440 FP toolchain 2021-01-18 22:12:27 +01:00
utils utils: fix flake8 warning 2021-01-28 17:43:56 +01:00
.defconfig arch: remove support for sh64 2016-09-08 22:15:15 +02:00
.flake8 .flake8: fix check for 80/132 columns 2019-04-10 12:31:33 +02:00
.gitignore Add linux toolchain for windows build 2021-02-09 00:50:07 +01:00
.gitlab-ci.yml gitlab-ci: update the image version 2020-08-15 09:47:00 +02:00
CHANGES Update for 2020.11.2 2021-01-31 21:34:30 +01:00
COPYING COPYING: add exception about patch licensing 2016-02-26 19:50:13 +01:00
Config.in Config.in: update BR2_OPTIMIZE_FAST prompt and help text 2020-07-18 16:05:01 +02:00
Config.in.legacy package/libupnp18: drop package 2021-01-28 20:24:04 +01:00
DEVELOPERS package/libupnp18: drop package 2021-01-28 20:24:04 +01:00
Dockerfile.linux-builder Update podman builders to recent versions 2022-05-10 13:16:44 +02:00
Dockerfile.windows-builder Update podman builders to recent versions 2022-05-10 13:16:44 +02:00
Makefile Update for 2020.11.2 2021-01-31 21:34:30 +01:00
Makefile.legacy Remove BR2_DEPRECATED 2016-10-15 23:14:45 +02:00
README.md Fix build-sdk.sh container name for Linux host 2022-05-10 11:57:08 +02:00
README.upstream Add Godot specific README 2021-02-03 01:52:03 +01:00
build-sdk.sh Fix build-sdk.sh container name for Linux host 2022-05-10 11:57:08 +02:00
build-windows.sh GCC and Binutils don't seem to like the symlinks 2021-02-11 15:50:49 +01:00
clean-linux-toolchain.sh Add the .br_real symlinks also 2021-02-11 14:56:28 +01:00
config-godot-armv7 Add scons to all SDKs 2021-02-06 03:06:16 +01:00
config-godot-i686 Add scons to all SDKs 2021-02-06 03:06:16 +01:00
config-godot-x86_64 Add scons to all SDKs 2021-02-06 03:06:16 +01:00
installer.nsis Add linux toolchain for windows build 2021-02-09 00:50:07 +01:00
pkg-config.bat Add linux toolchain for windows build 2021-02-09 00:50:07 +01:00

README.md

Godot buildroot

This repository contains the Godot buildroot to generate toolchains for building the Godot engine in a portable way for Linux. Using these toolchains is the best way to distribute Linux builds of your custom-compiled Godot game.

You will only need this if you built the engine manually. If you use official templates you will not need this

The toolchain current contains the following:

  • gcc-10.2.0
  • glibc-2.19
  • pulseaudio
  • alsa
  • X client libraries
  • udev
  • libGL

Using the SDKs

This section is first because there's a lot of stuff below and this is likely what you came here for. Don't forget to check out the Obtaining an SDK section below!

The first part of an SDK filename referes to the architecture that this SDK will generate binaries for. If you want to ship your game to both 32bit and 64bit Intel/AMD users you will need both x86_64-godot-linux-gnu_sdk-buildroot.tar.gz and i686-godot-linux-gnu_sdk-buildroot.tar.gz.

Unpack the toolchain anywhere you like and run the relocate-sdk.sh script within. This needs to happen every time you move the toolchain to a different directory, but only needs to happen once after installation.

After this you can build the engine more-or-less like normal. For instance for x86_64:

PATH=/home/hp/tmp/x86_64-godot-linux-gnu_sdk-buildroot/bin:$PATH scons p=x11 target=release_debug -j64 use_static_cpp=yes

For 32-bit Intel:

PATH=/home/hp/tmp/i686-godot-linux-gnu_sdk-buildroot/bin/:$PATH scons p=x11 target=release_debug -j64 use_static_cpp=yes bits=32 Note the bits=32 at the end!

And for 32bit ARM:

PATH=/home/hp/tmp/arm-godot-linux-gnueabihf_sdk-buildroot/bin/:$PATH scons p=x11 target=release_debug -j64 use_static_cpp=yes CCFLAGS="-mtune=cortex-a72 -mcpu=cortex-a72 -mfloat-abi=hard -mlittle-endian -munaligned-access -mfpu=neon-fp-armv8" module_denoise_enabled=no module_raycast_enabled=no module_webm_enabled=no

For other build-time options please see https://docs.godotengine.org/en/stable/development/compiling/compiling_for_x11.html

Obtaining an SDK

Downloading a pre-built SDK

Pre-built toolchains are available on https://download.tuxfamily.org/godotengine/toolchains/linux.

Using buildroot to generate SDKs

Building a toolchain for local use

Using this method will create a toolchain you yourself can use to create Godot releases that will work on any Linux system currently in use. However the toolchain you generate will not be portable to older Linuxes. If you plan to distribute the toolchain itself use the podman method below

The basic steps for building a toolchain are:

  • copy config-godot-<arch> to .config
  • run make olddefconfig
  • run make clean sdk

Afterwards the SDK will be in output/images/<arch>-godot-linux-gnu_sdk-buildroot.tar.gz.

NOTE: that make clean sdk will delete old builds. Move them out of the way first!

Building a toolchain for distribution

This method uses a CentOS7 container to make the buildroot itself portable so it can be distributed to other users. This is also the way the downloads above are generated.

  • run ./build-sdk.sh <host> <arch> for instance ./build-sdk.sh linux-x86_64 x86_64

Run ./build-sdk.sh without arguments to get a list of valid hosts and arches. The toolchain will appear in the godot-toolchains directory.

Modifying the toolchain

For detailed information please see https://buildroot.org however a short version is here:

NOTE: re-running the build-sdk.sh script will overwrite your changes by default. Take care

  • Copy the architecture you would like to change to .config for instance cp config-godot-x86_64 .config
  • Run make menuconfig
  • Make your changes

At this point your changes exist in .config. Make a backup. If you're building for local use just run make clean sdk, if you're using the container approach copy your .config file to the arch config like config-godot-x64_64

Making Pull Requests for this repository

First of all: Thanks for wanting to help! Second of all: Since we support multiple architectures make sure that you make the same changes to all architectures and PR them together. If you specifically want to make a change to one architecture please note that clearly in the PR message.

Thanks!