You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per the reddit thread, I am writing about the project here.
Thanks for it in the first place.
I would like to fiddle with the project but I am not much into embedded computing.
Would it be possible to kindly provide a quick howto about how to actually build an image with buildroot and retroarch?
I personally have some experience building the Linux kernel and with "make menuconfig" for what it's worth.
My objective would be to build this for the raspberry pi 4 (that thing you wrote on reddit about lowering the boot time down to 2 seconds is so sexy 😉) and for an odd board using an Allwinner A13 SoC.
Hey! Sorry about the late reply! I've been incredibly busy with a new job.
I decided to change how everything is built by using docker containers. Check out the develop branch, which should have a much better readme.md file on how to get going.
Thank you very much for your reply, I'll look into that.
No worries! I actually did a ton of work this weekend to get Dracut whipped into shape!
I also updated Buildroot to the latest version along with retroarch. Today I am going to do some testing with the RPI4 as well!
No worries! I also just pushed a new init system for docker. I need to add a readme for the env.json file, but now you can specify fragments to apply to the config before building.
I just pushed a massive update that does the following:
- New build system using make
- Updated retroarch to 1.20.0
- Updated retroarch assets to 1.19.0
- Updated readme.md
- Uses Docker for building
- Updated README.md
- X86 KMS uses kernel 6.12
- Updated buildroot to 2024.02.9
- Removed Dracut and Plymouth
TLDR: run make build and see if that works now. I have only tested building in Linux, so I'm not sure if WSL2 will work! I hope so!
@aduskett thanks for still supporting this project!
I made a build manually which seems to spit out an sdcard-image for the pi3.
My problem now is that I'm trying to make it for the pi zero 2w which seem to require a custom config.
I saw that the original buildroot project have a config if that helps?
Take a look at the rpi3.json file in the top-level docker/ directory for an example of how to apply new configs.
You will need to make a rpi2w.json file and copy a base-level defconfig to retroroot/configs to get everything to start building!
@aduskett I've put together what I think is the correct config for building against a raspberry pi zero 2w, if I get it to work I could make a pull request.
From a clean pull inside WSL2 of the repo I'm faced with this error, maybe it doesn't work on WSL2 and docker-compose-v2.
(people suggest /r line endings, but I didn't pull the repo from windows git)
username:/mnt/c/Users/NIJ/Code/retroroot$ sudo make build
APPLY_CONFIGS=false \
VERBOSE=false \
ENV_FILES="x86_64.json" \
EXIT_AFTER_BUILD=true \
NO_BUILD=false \
CLEAN_AFTER_BUILD=false \
docker compose up --abort-on-container-exit
[+] Running 1/0
✔ Container buildroot-retroroot Created 0.0s
Attaching to buildroot-retroroot
buildroot-retroroot | /usr/bin/env: 'bash\r': No such file or directory
buildroot-retroroot | /usr/bin/env: use -[v]S to pass options in shebang lines
buildroot-retroroot exited with code 127
Aborting on container exit...
[+] Stopping 1/0
✔ Container buildroot-retroroot Stopped 0.0s
make: *** [Makefile:40: build] Error 127
EDIT: I'm currently making a manual docker container build (with "docker compose" v1 instead of "docker-compose" v2) from the latest branch using the instructions from the develop branch. I'll make an update post when tested.
@aduskett Now it boots from the pi zero 2w, but stops at the login screen after the rainbow splash. Login in as root I can't find any packages for retroarch so I guess it skipped some packages. The config.txt and cmdline.txt didn't seem to have got included from the rpi3 board config I copied over either for some reason.
By manually adding the parameters from rpi3 config and cmdline I now have a 3s boot to login screen without any rainbow or text, which is cool. I'll make an ubuntu boot drive to see if I can re-build it as per your instructions.
I noticed a few other options missing. I'll push in a few minutes after I confirm everything builds. Again, no guarantee on actual booting, as I don't have a Z2W to test with :\
Don't worry, we had it booting before with my configs (I have still them stashed to compare with), it just lacked all the good stuff :) I really appreciate your time btw!
You may have to remove the retroroot/output/raspberrypizero2w/ directory (rm -rf retroroot/output/raspberrypizero2w/) and rebuild from scratch. Fortunately, subsequent rebuilds are much faster thanks to ccache.
@aduskett
The automatic build did not experience any errors of what I could see from the logout, when testing it the pi did not show any signs of life (blinking leds) which tells me the boot partition is not read correctly.
So I checked the SD-card in windows first to see what the boot partition looked like but it never shows, weirdly windows tells me that I has a "signature collision" (this also happens for the x86_64 auto build), this doesn't happen if I build it manually inside the docker container:
(Note: I've removed the other partitions in this example)
So I looked in gparted from my ubuntu-install:
The boot partition is there, but maybe gets corrupt in the automatic build process?
The data-partition is containing an empty RetroArch folder structure, not sure if that is meant to be manually updated later?
My next test would be to merge my changes on-top of your rpiz2w branch to see if it makes any difference.
no worries on the multiple posts. I don't think it's the gpt partition scheme, but probably the uboot setup instead of a standard setup. I need to get a RPI3 to test (as that would ensure that the rpi3 and zwl2 both work) but man, 50 euros is tough to swallow!
@aduskett I don't think you should buy a board just for this, you put in enough work as it is :)
If you ever feel like making something for me to test later on just let me know, otherwise you could probably close this issue.
@Roet-Ivar No worries! On a side-note, I am waiting for a debug cable for the RPI5 which should arrive sometime next week. Then I can get that booting at least!
@aduskett Cool I wonder how fast that could boot!
Mainly I'm looking for a replacement or a substitute for my TangNano-20K, it has almost instant boot and runs a nesTang core. Downsides, no save states and no filters, no native bluetooth.
I've read that a rapsberry pi 3 or similar could boot into something like emulationstation/RetroArch in 3 seconds.
@Roet-Ivar I'll let you know how fast the RPI5 boots when I get the cable next week. Probably around 5 seconds or so. First boot will take longer as the data/ partition will expand automatically on first boot, but otherwise it should be pretty quick.
@aduskett hi again. I just wanted to check something with you that I don't understand:
genimage.cfg describing two partitions rootfsa rootfsb built on the same image with the same uuid, is this by design?
(This would explain why windows is confused by the partitions)
The uuid itself is calculated from the rootfs.ext4 file found in the retroroot/output/raspberrypizero2w/images/ directory.
The reason for two identical rootfs partitions is A/B updating with the mender program!
Hi! Do I understand you correctly that both rootfsa and rootfsb should be changed to use uuid
b921b045-1df0-41c3-af44-4c6f280d3fae? I've testing out recalbox and batocera these last weeks, while they're nice it takes way too long to boot, 😊
Activity
aduskett commentedon Feb 21, 2021
Hey! Sorry about the late reply! I've been incredibly busy with a new job.
I decided to change how everything is built by using docker containers. Check out the develop branch, which should have a much better readme.md file on how to get going.
I can test with an RPI4 a bit later as well!
febs commentedon Feb 22, 2021
Thank you very much for your reply, I'll look into that.
aduskett commentedon Feb 22, 2021
No worries! I actually did a ton of work this weekend to get Dracut whipped into shape!
I also updated Buildroot to the latest version along with retroarch. Today I am going to do some testing with the RPI4 as well!
aduskett commentedon Feb 28, 2021
For what it's worth, the develop branch now has a raspberrypi4 and raspberrypi3 config
febs commentedon Mar 2, 2021
Thank you!
aduskett commentedon Mar 2, 2021
No worries! I also just pushed a new init system for docker. I need to add a readme for the env.json file, but now you can specify fragments to apply to the config before building.
Roet-Ivar commentedon Jan 6, 2025
Hi @aduskett ! Is there a way to know if the build is making any progress, mine seems to be stuck here forever? (I'm using WSL2)

aduskett commentedon Jan 7, 2025
Hi @Roet-Ivar !
I just pushed a massive update that does the following:
TLDR: run
make buildand see if that works now. I have only tested building in Linux, so I'm not sure if WSL2 will work! I hope so!Thanks!
Adam
aduskett commentedon Jan 7, 2025
Hi @Roet-Ivar
I am bad at reading! Sorry about that!
Can you provide your .json file perchance?
Thanks!
Adam
Roet-Ivar commentedon Jan 7, 2025
@aduskett thanks for still supporting this project!
I made a build manually which seems to spit out an sdcard-image for the pi3.
My problem now is that I'm trying to make it for the pi zero 2w which seem to require a custom config.
I saw that the original buildroot project have a config if that helps?
aduskett commentedon Jan 7, 2025
@Roet-Ivar No worries at all!
Take a look at the rpi3.json file in the top-level docker/ directory for an example of how to apply new configs.
You will need to make a rpi2w.json file and copy a base-level defconfig to retroroot/configs to get everything to start building!
Roet-Ivar commentedon Jan 8, 2025
@aduskett I've put together what I think is the correct config for building against a raspberry pi zero 2w, if I get it to work I could make a pull request.
From a clean pull inside WSL2 of the repo I'm faced with this error, maybe it doesn't work on WSL2 and docker-compose-v2.
(people suggest /r line endings, but I didn't pull the repo from windows git)
EDIT: I'm currently making a manual docker container build (with "docker compose" v1 instead of "docker-compose" v2) from the latest branch using the instructions from the develop branch. I'll make an update post when tested.
Roet-Ivar commentedon Jan 8, 2025
@aduskett Now it boots from the pi zero 2w, but stops at the login screen after the rainbow splash. Login in as root I can't find any packages for retroarch so I guess it skipped some packages. The config.txt and cmdline.txt didn't seem to have got included from the rpi3 board config I copied over either for some reason.
By manually adding the parameters from rpi3 config and cmdline I now have a 3s boot to login screen without any rainbow or text, which is cool. I'll make an ubuntu boot drive to see if I can re-build it as per your instructions.
Any ideas?
9 remaining items
Roet-Ivar commentedon Jan 9, 2025
Don't worry, we had it booting before with my configs (I have still them stashed to compare with), it just lacked all the good stuff :) I really appreciate your time btw!
aduskett commentedon Jan 9, 2025
@Roet-Ivar No worries. I pushed another fix. There were several missing config options. I also cleaned up some post-build and post-image scripts.
aduskett commentedon Jan 9, 2025
You may have to remove the retroroot/output/raspberrypizero2w/ directory (rm -rf retroroot/output/raspberrypizero2w/) and rebuild from scratch. Fortunately, subsequent rebuilds are much faster thanks to ccache.
Roet-Ivar commentedon Jan 9, 2025
@aduskett
The automatic build did not experience any errors of what I could see from the logout, when testing it the pi did not show any signs of life (blinking leds) which tells me the boot partition is not read correctly.
So I checked the SD-card in windows first to see what the boot partition looked like but it never shows, weirdly windows tells me that I has a "signature collision" (this also happens for the x86_64 auto build), this doesn't happen if I build it manually inside the docker container:

(Note: I've removed the other partitions in this example)
So I looked in gparted from my ubuntu-install:

The boot partition is there, but maybe gets corrupt in the automatic build process?
The data-partition is containing an empty RetroArch folder structure, not sure if that is meant to be manually updated later?

My next test would be to merge my changes on-top of your rpiz2w branch to see if it makes any difference.
Roet-Ivar commentedon Jan 11, 2025
@aduskett
it seems like my changes didn't matter much since the first partition with the config.txt and cmdline.txt doesn't work after the autobuild.
However, in order to get a working boot partition building manually inside docker works:
Retrieve and burn sdcard.img from buildroot/output folder inside docker, doing this seem to give me a small ~150mb image that boots.
Roet-Ivar commentedon Jan 12, 2025
@aduskett Sorry for my monologues!
I finally found that the issue
TLDR GPT instead of MBR (which the pi wants).
The non-booting "auto-builder" gives us a GPT partition table with the boot partition which is flagged as ESP:

When building manually as described earlier we end up with msdos aka MBR partition table instead, boot flagged LBA

Any chance to easily change partition table type to MBR instead of GPT for raspberry pi in the builder?
aduskett commentedon Jan 13, 2025
no worries on the multiple posts. I don't think it's the gpt partition scheme, but probably the uboot setup instead of a standard setup. I need to get a RPI3 to test (as that would ensure that the rpi3 and zwl2 both work) but man, 50 euros is tough to swallow!
aduskett commentedon Jan 13, 2025
@Roet-Ivar I guess I could buy a RPIZ2W, but finding one for 15 euros is going to be tough!
Roet-Ivar commentedon Jan 13, 2025
@aduskett I don't think you should buy a board just for this, you put in enough work as it is :)
If you ever feel like making something for me to test later on just let me know, otherwise you could probably close this issue.
Thank you very much for you patience! ❤️
aduskett commentedon Jan 13, 2025
@Roet-Ivar No worries! On a side-note, I am waiting for a debug cable for the RPI5 which should arrive sometime next week. Then I can get that booting at least!
Roet-Ivar commentedon Jan 13, 2025
@aduskett Cool I wonder how fast that could boot!
Mainly I'm looking for a replacement or a substitute for my TangNano-20K, it has almost instant boot and runs a nesTang core. Downsides, no save states and no filters, no native bluetooth.
I've read that a rapsberry pi 3 or similar could boot into something like emulationstation/RetroArch in 3 seconds.
aduskett commentedon Jan 13, 2025
@Roet-Ivar I'll let you know how fast the RPI5 boots when I get the cable next week. Probably around 5 seconds or so. First boot will take longer as the data/ partition will expand automatically on first boot, but otherwise it should be pretty quick.
Roet-Ivar commentedon Jan 15, 2025
@aduskett hi again. I just wanted to check something with you that I don't understand:

genimage.cfg describing two partitions rootfsa rootfsb built on the same image with the same uuid, is this by design?
(This would explain why windows is confused by the partitions)
aduskett commentedon Jan 20, 2025
@Roet-Ivar Hey! Sorry! I took a long weekend. The partition type UUID is from https://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/ which after looking at this further, should be b921b045-1df0-41c3-af44-4c6f280d3fae !
The uuid itself is calculated from the rootfs.ext4 file found in the retroroot/output/raspberrypizero2w/images/ directory.
The reason for two identical rootfs partitions is A/B updating with the mender program!
Roet-Ivar commentedon Feb 4, 2025
Hi! Do I understand you correctly that both rootfsa and rootfsb should be changed to use uuid
b921b045-1df0-41c3-af44-4c6f280d3fae? I've testing out recalbox and batocera these last weeks, while they're nice it takes way too long to boot, 😊