Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| compile_batocera.linux [2024/09/04 15:54] – [Install prerequisites] Updated about the disk requirements with recent builds lbrpdx | compile_batocera.linux [2026/04/03 02:04] (current) – dmanlfc | ||
|---|---|---|---|
| Line 8: | Line 8: | ||
| ===== Install prerequisites ===== | ===== Install prerequisites ===== | ||
| - | |||
| - | Choose either [[# | ||
| Make sure you have a reasonably fast CPU, and at least **8GB of RAM** (even **12GB+** if you need to compile MAME). If you have a CPU with 8 cores/16 threads or more (lucky you!), you might need more than 16 GB RAM to compile batocera.linux with all threads in parallel. You also need **between 80GB and 250GB of free disk space** for each platform you intend to compile for in order to download and compile the final Batocera image. | Make sure you have a reasonably fast CPU, and at least **8GB of RAM** (even **12GB+** if you need to compile MAME). If you have a CPU with 8 cores/16 threads or more (lucky you!), you might need more than 16 GB RAM to compile batocera.linux with all threads in parallel. You also need **between 80GB and 250GB of free disk space** for each platform you intend to compile for in order to download and compile the final Batocera image. | ||
| Line 19: | Line 17: | ||
| * **bcm2711** (rpi4): 103GB for Batocera 41 | * **bcm2711** (rpi4): 103GB for Batocera 41 | ||
| * **bcm2837** (rpi3): 80 GB | * **bcm2837** (rpi3): 80 GB | ||
| - | * **bcm2836** (rpi2): | + | * **bcm2836** (rpi2): |
| * **rk3326**: 74GB for Batocera 40 | * **rk3326**: 74GB for Batocera 40 | ||
| * **rk3399**: 45GB for Batocera 40 | * **rk3399**: 45GB for Batocera 40 | ||
| Line 36: | Line 34: | ||
| * To install the basic dev tools: '' | * To install the basic dev tools: '' | ||
| * Fedora: | * Fedora: | ||
| - | * o check the packages that will be installed with the group, run: '' | + | * To check the packages that will be installed with the group, run: '' |
| * To install them: '' | * To install them: '' | ||
| * Arch: | * Arch: | ||
| Line 49: | Line 47: | ||
| Each OS and Linux distribution has a particular way to install Docker. | Each OS and Linux distribution has a particular way to install Docker. | ||
| - | //Please note that most developers use Ubuntu Linux to compile batocera.linux. In January 2022, Docker on Windows was not stable enough to compile Batocera.// | + | //Please note that most developers use Docket on Ubuntu Linux to compile batocera.linux. In January 2022, Docker on Windows was not stable enough to compile Batocera.// |
| In March 2020, with the Docker container running as non-root (regular user), you can compile Batocera on MacOS Mojave 10.14 (Darwin 18.0.0). | In March 2020, with the Docker container running as non-root (regular user), you can compile Batocera on MacOS Mojave 10.14 (Darwin 18.0.0). | ||
| * Linux Ubuntu/ | * Linux Ubuntu/ | ||
| - | * Installing from the Distribution packages is not recommended. Refer to the official documentation instead: [[https:// | + | * Installing |
| * To be able to run docker without root privileges don't forget to add your user to the //docker// group: | * To be able to run docker without root privileges don't forget to add your user to the //docker// group: | ||
| * Fedora: | * Fedora: | ||
| - | * Installing from the snap/ | + | * Installing |
| * To be able to run Docker without root privileges and at boot, don't forget to add your user to the //docker// group. Fedora' | * To be able to run Docker without root privileges and at boot, don't forget to add your user to the //docker// group. Fedora' | ||
| sudo gpasswd -a ${USER} docker | sudo gpasswd -a ${USER} docker | ||
| Line 67: | Line 65: | ||
| * (for reference) MacOS: see [[https:// | * (for reference) MacOS: see [[https:// | ||
| * (for reference) Windows: see [[https:// | * (for reference) Windows: see [[https:// | ||
| - | |||
| - | ==== Direct Compilation ==== | ||
| - | |||
| - | The way to install the necessary packages vary for each Linux distribution. You can find the necessary packages for Ubuntu below. | ||
| - | |||
| - | === Ubuntu 18.04 === | ||
| - | |||
| - | May also work with Ubuntu 16.04. | ||
| - | |||
| - | < | ||
| - | sudo apt-get install build-essential git libncurses5-dev libssl-dev mercurial texinfo zip default-jre imagemagick subversion hgsubversion autoconf automake bison scons libglib2.0-dev bc mtools u-boot-tools flex wget cpio dosfstools libtool | ||
| - | sudo dpkg --add-architecture i386 | ||
| - | sudo apt-get update | ||
| - | sudo apt-get install libc6:i386 libncurses5: | ||
| - | </ | ||
| - | |||
| - | === Ubuntu 20.04 === | ||
| - | |||
| - | Includes requirements for some experimental packages. | ||
| - | |||
| - | < | ||
| - | sudo apt-get install build-essential git libncurses5-dev libssl-dev mercurial texinfo zip default-jre imagemagick subversion autoconf automake bison scons libglib2.0-dev bc mtools u-boot-tools flex wget cpio dosfstools libtool gcc-multilib g++-multilib python3-pip | ||
| - | sudo dpkg --add-architecture i386 | ||
| - | sudo apt-get update | ||
| - | sudo apt-get install libc6:i386 libncurses5: | ||
| - | pip3 install conan | ||
| - | </ | ||
| ===== Preparations ===== | ===== Preparations ===== | ||
| Line 162: | Line 133: | ||
| <code bash> | <code bash> | ||
| - | make batocera-docker-image | + | make build-docker-image |
| </ | </ | ||
| Line 208: | Line 179: | ||
| <code bash> | <code bash> | ||
| make x86_64-build | make x86_64-build | ||
| + | </ | ||
| + | |||
| + | If you have a lot of cores/ | ||
| + | |||
| + | <code bash> | ||
| + | PARALLEL_BUILD=1 make x86_64-build | ||
| </ | </ | ||
| Line 304: | Line 281: | ||
| Of course '' | Of course '' | ||
| - | |||
| - | ==== Traditional compilation method ==== | ||
| - | |||
| - | Of course you can still use out of tree builds to compile Batocera. So, for x86_64, you can do the following: | ||
| - | |||
| - | <code bash> | ||
| - | make O=$PWD/ | ||
| - | cd output/ | ||
| - | make | ||
| - | </ | ||
| - | |||
| - | Source tree will stay pristine and we be reused for other builds following the same procedure with a different output directory. For example: | ||
| - | |||
| - | <code bash> | ||
| - | make O=$PWD/ | ||
| - | cd output/rpi3 | ||
| - | make | ||
| - | </ | ||
| - | |||
| - | Then, you can take some time for a coffee (or two, or two hundreds actually). Depending on how powerful your CPU is, how much RAM you have, and how fast your SSD/HDD is, compiling a whole Batocera system can take many hours. Don't forget, it's the full OS with all the emulators that we are compiling here, it's not a small task. | ||
| - | |||
| - | Please also mind that the process will take a significant amount of space, **so ensure to have between 50GB (RPi) and 150+GB (x86_64) of free space on that partition**. | ||
| ===== Locating the image ===== | ===== Locating the image ===== | ||
- compile_batocera.linux.1725465294.txt.gz
- Last modified: 20 months ago
- by lbrpdx