While working on creating an image for batocera for the gameshell, I ended up with an image/SDcard that didn’t boot, so to try to debug and understand what was going on I though I could use a serial port / UART access to see an error message since at that point the screen turned on but was dark.
So I found the provided cable that plugs in to the GPIO/debug port :
I plug it in to the gameshell taken out of it’s case :
I then went through the forum and blog posts (would be nice to have some kind of central documentation, but hey, I’ll do with what exists) :
- UART by steward-fu and GameShell UART for Debug thanks @steward-fu
- https://www.clockworkpi.com/post/expansion-wire-color-code
- GameShell GPIOs + Kernel Building | p3dt.net thanks @p3dt
- HowTo: GPIO access, I2C, Kernel Building - #2 by p3dt again @p3dt
- GPIO - Clockwork GameShell wow a wiki with centralised docs ! thanks to @henryhu (should we copy some of the information there?)
- U-Boot - linux-sunxi.org
I end up with a setup that looks like this :
On my 3 SDcards (clockworkOS, clockworkpi-debian from @Joao_Manoel, batocera image) I didn’t get any output on the serial port.
I ended up find how to enable the serial port in u-boot on the clockwork-debian image by changing the boot.cmd
(add console=ttyS0,115200
) used to generate the boot.scr
that I then copied at the root of the mounted SDCard.
setenv bootargs earlyprintk no_console_suspend fsck.repair=yes console=ttyS0,115200 root=/dev/mmcblk0p1 rootfstype=ext4 rootwait init=/lib/systemd/systemd noinitrd panic=10 cma=256M ${extra}
setenv bootdelay 3
The bootdelay
addition adds the posibility to interupt u-boot and tweaks options or change commands from the serial port.
The patch for the boot.cmd
that generates the boot.scr
: [boot.cmd] add serial port for debugging and access to u-boot by arthurlutz · Pull Request #11 · wolfallein/clockworkpi-debian · GitHub
Any chance of getting this to work on the ClockworkOS official image ?! Lets document all this !? If anyone wants to help me debug the batocera image, what would be your tips ? cc @r043v for how you did this on the Arch image ?