Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| batocera.linux_buildroot_modifications [2022/06/13 05:10] – updated for v35 atari | batocera.linux_buildroot_modifications [2022/09/28 07:14] (current) – specifics atari | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| You may know me from former titles such as " | You may know me from former titles such as " | ||
| + | |||
| + | <WRAP center round info> | ||
| + | RPi3, the "per platform" | ||
| + | </ | ||
| <WRAP center round tip> | <WRAP center round tip> | ||
| Line 25: | Line 29: | ||
| - download the package in the dl directory according to information from '' | - download the package in the dl directory according to information from '' | ||
| - extract the package in '' | - extract the package in '' | ||
| - | - patch the package from '' | + | - patch the package from '' |
| - configure the package according to the '' | - configure the package according to the '' | ||
| - build the package according to the '' | - build the package according to the '' | ||
| - | - install in the '' | + | - install in the '' |
| - | - install in the '' | + | - install in the '' |
| - | For each step, Buildroot creates an empty flag file. For example: '' | + | For each step, Buildroot creates an empty flag file. For example: '' |
| In case a step failed, just run '' | In case a step failed, just run '' | ||
| - | To completely rebuild a package: | + | To completely rebuild a package |
| - | rm -rf output/rpi3/ | + | rm -rf output/bcm2837/ |
| make package-name | make package-name | ||
| For example, to build EmulationStation again from the latest '' | For example, to build EmulationStation again from the latest '' | ||
| - | rm -rf output/rpi3/ | + | rm -rf output/bcm2837/ |
| make batocera-emulationstation | make batocera-emulationstation | ||
| | | ||
| Line 74: | Line 78: | ||
| My '' | My '' | ||
| - | |||
| - | ===== Working on packages ===== | ||
| - | |||
| - | Let's say you want to work on the package " | ||
| - | |||
| - | First, compile a version of Batocera for the architecture you will test. | ||
| - | |||
| - | Once this is done, you don't need to build it for your tests again. Just run the following commands: | ||
| - | |||
| - | mv output/ | ||
| - | cd output/ | ||
| - | git init | ||
| - | git add <the file(s) you want to modify> | ||
| - | # edit the file(s) | ||
| - | git diff > ../ | ||
| - | cd ../../.. | ||
| - | rm -rf ouput/ | ||
| - | make retroarch-patch # to confirm the patch is applied | ||
| - | make retroarch # to finish other steps | ||
| - | |||
| - | At this step, output/ | ||
| - | |||
| - | rsync -av output/ | ||
| - | |||
| - | Remember, Batocera system modification are done on the Linux overlay, i.e. in RAM. Rebooting Batocera without saving your overlay acts as if you hadn't changed it -- in other words, it's a nice way to make tests while your system is not modified, but those changes are not persistent. If you want to permanently save the modification and keep them upon reboot, you need to use [[modify_the_system_while_it_s_running|batocera-save-overlay]] from the machine itself. | ||
| ===== Working on EmulationStation ===== | ===== Working on EmulationStation ===== | ||
| Line 188: | Line 167: | ||
| - Configure the default emulator (if you've added a whole new system) with https:// | - Configure the default emulator (if you've added a whole new system) with https:// | ||
| - Configure the default settings for particular architectures (such as if your emulator requires certain settings to function on a particular architecture) at https:// | - Configure the default settings for particular architectures (such as if your emulator requires certain settings to function on a particular architecture) at https:// | ||
| + | - Add the system' | ||
| - (Optional) If you need to add an explanation for the emulator' | - (Optional) If you need to add an explanation for the emulator' | ||
| If you'd like an example of a recent pull request that adds a whole new emulator: https:// | If you'd like an example of a recent pull request that adds a whole new emulator: https:// | ||
| + | |||
| + | ===== Patching a package ===== | ||
| + | |||
| + | Buildroot features the ability to patch the source code of a package before compiling it, read [[https:// | ||
| + | |||
| + | Let's say you want to work on the package " | ||
| + | |||
| + | First, compile a complete version of Batocera for the architecture you will test. In this example, we will do so for RPi3. | ||
| + | |||
| + | <code bash> | ||
| + | cd batocera.linux | ||
| + | make bcm2837-build | ||
| + | </ | ||
| + | |||
| + | Once this is done, you don't need to build the entirety of it again for your tests. You can just rename/ | ||
| + | |||
| + | <code bash> | ||
| + | mv output/ | ||
| + | </ | ||
| + | |||
| + | Now for our patch. First change the working directory to that of the //build// folder for the respective package: | ||
| + | |||
| + | <code bash> | ||
| + | cd output/ | ||
| + | </ | ||
| + | | ||
| + | Establish the package state using '' | ||
| + | |||
| + | <code bash> | ||
| + | git init | ||
| + | </ | ||
| + | |||
| + | Then add the file(s) you want to modify to the current commit: | ||
| + | |||
| + | <code bash> | ||
| + | git add <the file(s) you modified> | ||
| + | </ | ||
| + | |||
| + | <WRAP center round tip> | ||
| + | Add all files with '' | ||
| + | </ | ||
| + | |||
| + | Make the modifications to the files you want now. | ||
| + | |||
| + | Then compare the differences and save them to a " | ||
| + | |||
| + | <code bash> | ||
| + | git diff > ../ | ||
| + | </ | ||
| + | |||
| + | Now clear out the package' | ||
| + | |||
| + | <code bash> | ||
| + | cd ../../.. | ||
| + | rm -rf ouput/ | ||
| + | </ | ||
| + | |||
| + | Then build the package (replacing '' | ||
| + | |||
| + | <code bash> | ||
| + | make retroarch-patch # to confirm the patch is applied | ||
| + | make retroarch # to finish other steps | ||
| + | </ | ||
| + | |||
| + | ===== Testing a package without compiling the entirety of Batocera ===== | ||
| + | |||
| + | It's possible to compile //just// the package you've modified and then transfer it over to your live Batocera installation using '' | ||
| + | |||
| + | <code bash> | ||
| + | rsync -av output/ | ||
| + | </ | ||
| + | |||
| + | This will sync up the contents of the target directory on your build machine with the Batocera machine. Feel free to immediately test your changes. If the changes are bad and you need to restore, simply reboot and the changes will not persist. To have them persist instead, run [[modify_the_system_while_it_s_running|batocera-save-overlay]] from the machine itself. | ||
- batocera.linux_buildroot_modifications.1655097015.txt.gz
- Last modified: 4 years ago
- by atari