# \[OS\] RetroArch - Debian OS image based on the minimal Debian (u-boot, kernel, and Debian from scratch) \[v0.3\]

**URL:** <https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707>\
**Category:** Firmware and Apps\
**Tags:** os\
**Created:** [May 29, 2020, 4:14pm UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707 "2020-05-29T16:14:10Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![omgmog](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/omgmog/32/3553_2.png) [@omgmog](https://forum.clockworkpi.com/u/omgmog)\
**Post date:** [June 11, 2020, 9:58pm UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/21 "2020-06-11T21:58:33Z")

</div>

I’ve just setup a new clean Ubuntu 20.04 VM to work out which packages are needed for a full build, and here’s what you need:

General:

```
sudo apt install git build-essential

```

For u-boot build:

```
sudo apt install gcc-arm-linux-gnueabihf \
    bison flex swig python3-distutils python3-dev

```

For Linux Kernel 5.7:

```
sudo apt install libssl-dev u-boot-tools

```

For generating Debian rootfs:

```
sudo apt install multistrap qemu-user-static

```

As an aside, I can’t seem to get the Gameshell to auto connect to Wifi even with the wpa\_supplicant.conf configured correctly. Any idea?

---

<div class="post-metadata">

**Author:** ![Joao\_Manoel](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@Joao\_Manoel](https://forum.clockworkpi.com/u/Joao_Manoel)\
**Post date:** [June 11, 2020, 11:15pm UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/22 "2020-06-11T23:15:12Z")

</div>

Thanks a lot for your contribution! I’ll add it to the README.md 😃

Regarding wifi, I have some issues with the driver not being detected/loaded at boot time in some cases. This happens even with the official gameshell image, and It seems to be related to the power regulator. Sometimes I fix it with power off, waiting a few seconds, and powering on again. Since it is intermittent it is hard to find the real cause of this issue.

You can check if this is your problem by seeing if the `wlan0` is available when you run `ip a`. So, try to run:

`# ip a`

and check if `wlan0` is a valid connection. If `wlan0` is present, your problem is just a configuration, if not the wifi module is not being detected (the problem I mentioned earlier) or the firmware is not being loaded at boot time.

If the problem is with driver/firmware try to check the kernel messages with:

`# dmesg | grep brcm`

and post here what you found.

Remember that our wifi module doesn’t work with 5 GHz network, so try to use the same network you had working with the official image.

---

<div class="post-metadata">

**Author:** ![omgmog](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/omgmog/32/3553_2.png) [@omgmog](https://forum.clockworkpi.com/u/omgmog)\
**Post date:** [June 12, 2020, 9:44am UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/23 "2020-06-12T09:44:07Z")

</div>

Yeah I keep a 2.4Ghz Wifi network for such devices, and connected (somewhat intermittently!) to it with the Clockwork OS previously.

Here’s the output I’m seeing while ssh’d to the Gameshell over USB:

```
root@clockworkpi :~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 4a:50:d0:7c:ea:fc brd ff:ff:ff:ff:ff:ff
    inet 192.168.11.1/24 brd 192.168.11.255 scope global usb0
       valid_lft forever preferred_lft forever

root@clockworkpi :~# dmesg | grep brcm
[2.894298] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[2.904695] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.bin failed with error -2
[3.916917] brcmfmac: brcmf_sdio_htclk: HT Avail timeout (1000000): clkctl 0x50

root@clockworkpi :~# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf 
Successfully initialized wpa_supplicant
Could not read interface wlan0 flags: No such device
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Could not read interface wlan0 flags: No such device
wlan0: Failed to initialize driver interface

```

Here’s another output from a subsequent boot:

```
root@clockworkpi :~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether ea:a6:f2:89:58:9c brd ff:ff:ff:ff:ff:ff
    inet 192.168.11.1/24 brd 192.168.11.255 scope global usb0
       valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether 6c:21:a2:44:ae:0a brd ff:ff:ff:ff:ff:ff

root@clockworkpi :~# dmesg | grep brcm
[2.848166] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[2.890745] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.clockwork,clockworkpi-cpi3.txt failed with error -2
[3.016294] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[3.032725] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[3.046520] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Nov 25 2016 15:06:56 version 7.46.57.5.apsta.r4.o12 (Station/Softap) FWID 01-64fb9fe8 es6.c5.n4.a3
[304.243093] ieee80211 phy0: brcmf_cfg80211_add_iface: iface validation failed: err=-16

```

So yes, the firmware loading seems to be intermittent. With the latter example, though the interface exists and wpa\_supplicant.conf is configured correctly, it doesn’t want to connect.

```
root@clockworkpi :~# ifdown wlan0
Killed old client process
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/6c:21:a2:44:ae:0a
Sending on LPF/wlan0/6c:21:a2:44:ae:0a
Sending on Socket/fallback

root@clockworkpi :~# ifup wlan0
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/wlan0/6c:21:a2:44:ae:0a
Sending on LPF/wlan0/6c:21:a2:44:ae:0a
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
```

---

<div class="post-metadata">

**Author:** ![r043v](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/r043v/32/672_2.png) [@r043v](https://forum.clockworkpi.com/u/r043v)\
**Post date:** [June 12, 2020, 11:15am UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/24 "2020-06-12T11:15:38Z")

</div>

in arch kernel i was need put wifi driver as a module to made it work

---

<div class="post-metadata">

**Author:** ![whoisalanjacobs](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/whoisalanjacobs/32/3827_2.png) [@whoisalanjacobs](https://forum.clockworkpi.com/u/whoisalanjacobs)\
**Post date:** [June 12, 2020, 2:03pm UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/25 "2020-06-12T14:03:45Z")

</div>

@Joao_Manoel this is great! totally looking forward to giving this a try!

I’ve downloaded the OS link, and loaded with “balenaEtcher” to format my card, but getting the following error:

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/5/5496209dbb2e71abb9b8d8b4ec99730928ea3857.png)

Is there a way around this? #lazy

---

<div class="post-metadata">

**Author:** ![Joao\_Manoel](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@Joao\_Manoel](https://forum.clockworkpi.com/u/Joao_Manoel)\
**Post date:** [June 12, 2020, 6:20pm UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/26 "2020-06-12T18:20:01Z")

</div>

> [@omgmog](#):
>
> So yes, the firmware loading seems to be intermittent. With the latter example, though the interface exists and wpa\_supplicant.conf is configured correctly, it doesn’t want to connect.

Good to know that I’m not the only one having these issues with intermittent wifi. Let’s fix it.  
Ok, so we have to understand why it cannot connect with your configuration.  
Is it possible for you to use `wpa_cli` to help you to configure the network? Try to use it to scan your wifi signal, and configure it from there. I used to use `connmanctl` to configure wifi networks but in later versions, they removed the ability to scan wifi network…

> [@r043v](#):
>
> in arch kernel i was need put wifi driver as a module to made it work

That is good to know, I will try it. Maybe the kernel tries to configure the wifi before the power regulator stabilizes the voltage. Making it as a module will give some time before it tries to load the firmware. Thank you!

> [@whoisalanjacobs](#):
>
> I’ve downloaded the OS link, and loaded with “balenaEtcher” to format my card, but getting the following error:

You probably need to extract the file before using BalenaEtcher. I think `Winrar` can extract it. I thought that in the last version they added support for `.tar.gz` files, are you using the last version?

---

<div class="post-metadata">

**Author:** ![Joao\_Manoel](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@Joao\_Manoel](https://forum.clockworkpi.com/u/Joao_Manoel)\
**Post date:** [June 13, 2020, 6:26pm UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/27 "2020-06-13T18:26:43Z")

</div>

# Version 0.2

## Changelog:

1. This image is based on Debian Bullseye/Unstable built on 13-June-2020.
2. Kernel is 5.7 with power optimization and suspend (freezing) enabled.
3. 1.4 GHz max frequency, and governor is set to `ondemand` by default. You can change it in userspace.
4. The image is smaller now. It can be written in a 1GB SD card, and the OS only uses 733MB of it. (Now you can use the 10 years old SD card you have in your drawer and still have space for a ton of roms!!!).
5. Changed image compression to zip for better compatibility with Windows, and flash image writer like balenaEtcher.
6. HDMI driver support added.
  - HDMI with hotplug detection.
  - The controller can read the screen information to use the best resolution available (up to 720p).
  - The HDMI is part of the kernel and can be manipulated with DRM.

7. U-boot chooses the dtb file for HDMI at boot time. Just plug the HDMI cable before booting to have HDMI out.
8. LED fixed and it is now in userspace.
  - The charging LED (orange) in the userspace at (`/sys/class/leds/axp20x\:chgled/`). You can control it manually (to use it for what you want like a normal led), or automatic (controlled by the charger).
  - Enabled status LED (green) to monitor CPU activity. You can change it in the userspace.

9. wifi driver is a kernel module now. We had issues with intermittent firmware loading. I hope it is fixed now.

## Issues:

1. The HDMI sound output doesn’t work, the sound is routed to the Gameshell speaker.

There is no password for root!

## Download:

[https://github.com/wolfallein/clockworkpi-debian/releases/download/v0.2-alpha/clockworkpi-debian-v0.2.zip](https://github.com/wolfallein/clockworkpi-debian/releases/download/v0.2-alpha/clockworkpi-debian-v0.2.zip)

---

<div class="post-metadata">

**Author:** ![Joao\_Manoel](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@Joao\_Manoel](https://forum.clockworkpi.com/u/Joao_Manoel)\
**Post date:** [June 13, 2020, 6:46pm UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/28 "2020-06-13T18:46:25Z")

</div>

> [@planetehack](#):
>
> If not do you have step by step instructions? I’d be up for trying to create an automated process for building images.

Now fully automated process! Instead of using the physical SD card, I am using an image file to fully create the OS.

> [@whoisalanjacobs](#):
>
> @Joao_Manoel this is great! totally looking forward to giving this a try!
> 
> I’ve downloaded the OS link, and loaded with “balenaEtcher” to format my card, but getting the following error:

Can you try with the new release [v0.2]? I changed the download file to zip. BalenaEtcher should be able to handle it.

---

<div class="post-metadata">

**Author:** ![whoisalanjacobs](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/whoisalanjacobs/32/3827_2.png) [@whoisalanjacobs](https://forum.clockworkpi.com/u/whoisalanjacobs)\
**Post date:** [June 14, 2020, 9:02am UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/29 "2020-06-14T09:02:52Z")

</div>

Just updated to the new version - realised I should have checked that 1st.

Going to try v0.2 shortly 😃  
Thanks @Joao_Manoel

---

<div class="post-metadata">

**Author:** ![whoisalanjacobs](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/whoisalanjacobs/32/3827_2.png) [@whoisalanjacobs](https://forum.clockworkpi.com/u/whoisalanjacobs)\
**Post date:** [June 14, 2020, 9:19am UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/30 "2020-06-14T09:19:56Z")

</div>

@Joao_Manoel That worked, loaded the image perfectly!

---

<div class="post-metadata">

**Author:** ![i4s33u](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/i4s33u/32/4004_2.png) [@i4s33u](https://forum.clockworkpi.com/u/i4s33u)\
**Post date:** [June 15, 2020, 4:46am UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/31 "2020-06-15T04:46:16Z")

</div>

great, I’m on your 0.2 image and trying to:

- Expanding storage to full of my 16GB sdcard
- Compiling latest RetroArch following [RetroArch Megathread](https://forum.clockworkpi.com/t/retroarch-megathread/716)

🤕 i’m kinda noob but I really miss the battery indicator in retroarch menu

---

<div class="post-metadata">

**Author:** ![Petrakis](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/petrakis/32/256_2.png) [@Petrakis](https://forum.clockworkpi.com/u/Petrakis)\
**Post date:** [June 15, 2020, 5:42am UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/32 "2020-06-15T05:42:22Z")

</div>

> [@i4s33u](#):
>
> I really miss the battery indicator in retroarch menu

Have you heard about BatMon?

> [@BatMon - Battery Status on emulators](https://forum.clockworkpi.com/t/batmon-battery-status-on-emulators/3461):
>
> BatMon is a Clockwork Pi app that creates an overlay with the battery percentage on top of emulators or games, because you can only see that information in the main menu, this is my attempt on solving that issue. [splash] Changelog: 2020-01-16T23:00:00Z (UTC) Ported to Qt5. Even less steps to install. Optimization and improvements (Less CPU Cycles). Code cleaning and refactoring. Apr 23, '19 3:59 PM Now supports OS v0.3. Now it only runs once and stays alive, previosly a script called an…

---

<div class="post-metadata">

**Author:** ![Joao\_Manoel](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@Joao\_Manoel](https://forum.clockworkpi.com/u/Joao_Manoel)\
**Post date:** [June 15, 2020, 8:46am UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/33 "2020-06-15T08:46:22Z")

</div>

Hi @i4s33u, thanks for trying.

> [@i4s33u](#):
>
> Expanding storage to full of my 16GB sdcard

Just yesterday I committed a new code for auto expand. I could have added to the version 0.2 but I missed the opportunity ☹ This will be out when I have enough new things to explain a new version. Maybe in 2 weeks…

what you need first is to install `fdisk`. If you have the internet configured, you can use:

```auto
apt update
apt install fdisk

```

and then you can run (If you didn’t change the partitions, it should work):

```auto
echo -e "d\n2\nn\np\n2\n94208\n\nN\nw\n" | fdisk /dev/mmcblk0
resize2fs /dev/mmcblk0p2

```

and reboot with:

```auto
systemctl reboot

```

> [@i4s33u](#):
>
> Compiling latest RetroArch following [RetroArch Megathread](https://forum.clockworkpi.com/t/retroarch-megathread/716)

You need to install some dependencies tor that. Can you be more specific? Where the compiation is stopping?

> [@i4s33u](#):
>
> 🤕 i’m kinda noob but I really miss the battery indicator in retroarch menu

I am working in a RetroArch Lakka version for the GameShell. It has battery monitoring, screen brightness, and other small things. If you are interested I can send it to you before making a proper release. It still need to polish some things and enable the wifi configuration.

To be honest, this minimal Debian is to be the base of small projects like the Lakka. Today, I’m probably the person who worked more on it. On the version 0.3 I will think more on the user experience, and ship the customized RetroArch I’m developing.

Here are some screenshots (not well focused ☹ ):

You can see the battery information at the top right of the picture:

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/3/3c757eb7438bc7e93284a7885e1b85c54d0eb3a1.jpeg)  
 ![image](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/8/85a196a7faed2cec3c1d7a2a174dd860342f0aff.jpeg)  
 ![image](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/2X/f/fb53621acba69680da801a3eb96a9fa381606d02.jpeg)

---

<div class="post-metadata">

**Author:** ![Joao\_Manoel](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@Joao\_Manoel](https://forum.clockworkpi.com/u/Joao_Manoel)\
**Post date:** [June 15, 2020, 8:49am UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/34 "2020-06-15T08:49:05Z")

</div>

Hi @Petrakis,

very nice project! I saw that it needs Qt for running. This Debian version doesn’t have X11 installed, I don’t know if Qt can run without X…

---

<div class="post-metadata">

**Author:** ![i4s33u](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/i4s33u/32/4004_2.png) [@i4s33u](https://forum.clockworkpi.com/u/i4s33u)\
**Post date:** [June 15, 2020, 8:50am UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/35 "2020-06-15T08:50:29Z")

</div>

thanks you, lakka build is very aprriciated 😃  
I’ve just tried compiled RetroArch 1.8.8 myself but finally messed up with Lima driver, I guess ☹  
It launched fine but whenever pressing Enter, screen got freezed with error:  
lima 1c40000.gpu: gp error irq state=4 status=2b

---

<div class="post-metadata">

**Author:** ![Petrakis](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/petrakis/32/256_2.png) [@Petrakis](https://forum.clockworkpi.com/u/Petrakis)\
**Post date:** [June 15, 2020, 9:56am UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/36 "2020-06-15T09:56:08Z")

</div>

What does it have? wayland? Qt works on wayland too.

It can also work without X11 nor Wayland [https://doc.qt.io/qt-5/embedded-linux.html](https://doc.qt.io/qt-5/embedded-linux.html)

---

<div class="post-metadata">

**Author:** ![javelinface](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/javelinface/32/3079_2.png) [@javelinface](https://forum.clockworkpi.com/u/javelinface)\
**Post date:** [June 15, 2020, 9:56am UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/37 "2020-06-15T09:56:34Z")

</div>

Oh my goodness this is amazing!! I am super keen on this. This is probably as close to an official Lakka pure gaming device experience as we’re going to get!  
I am going to download this right away.  
This is the kind of image that I’d be happy to hand to someone as a gift, as a person who purely wants to play games on their gameshell.  
I’ve been a huge fan of your work. Can’t wait to see more updates to it! 😃

As for the auto expand, the one I’m currently using on my images is the one from @guu

> [@Custom D.E.O.T. V1.0+/Clockwork OS v0.4 image - With Updated Kernel 5.3.6, Latest Lima Drivers, RA1.8.1, Mupen64+ and much more! (Current version: 191122)](https://forum.clockworkpi.com/t/custom-d-e-o-t-v1-0-clockwork-os-v0-4-image-with-updated-kernel-5-3-6-latest-lima-drivers-ra1-8-1-mupen64-and-much-more-current-version-191122/4742/45):
>
> ok take the deot\_v1+ 191111.img as example First use [https://github.com/Drewsif/PiShrink](https://github.com/Drewsif/PiShrink) to do a simple shrink sudo pishrink.sh -s deot\_v1+\ 191111.img that will shrink your image to be like 6.8G ,don’t forget the -s , without -s, it will add raspberrypi’s auto\_expand into the /etc/rc.local then follow the instructions [https://gist.github.com/cuu/b11109f2197cd482fe8d2c61b8d409c6](https://gist.github.com/cuu/b11109f2197cd482fe8d2c61b8d409c6) to add the expander into the img sudo mount -o loop,offset=48234496 deot\_v1+\ 191111.img /media/sdb2/ cd /me…

There was also one that I got from @hpcodecraft that automatically downloads all the tools required to expand, expands, then removes the tools.

```auto
#!/bin/bash

GREEN='\033[1;32m'
NC='\033[0m'

printf "${GREEN}Installing dependencies...${NC}\n"

# Install growpart util
export DEBIAN_FRONTEND=noninteractive
sudo apt-get -y install cloud-guest-utils

printf "${GREEN}Growing partition...${NC}\n"

# Grow root partition
sudo growpart /dev/mmcblk0 2

printf "${GREEN}Resizing file system...${NC}\n"

# Resize file system
sudo resize2fs /dev/mmcblk0p2

printf "${GREEN}Cleaning up...${NC}\n"

# Uninstall growpart package again
sudo apt-get -y remove cloud-guest-utils

printf "\n${GREEN}Done! Reload UI and Check Settings->Storage 😊 ${NC}\n\n"
```

Also, on another note, given the simplicity of the OS, this could work as a great base to use something like Emulation Station as a front end. It would be a lot more visually appealing, and about as close to having a RetroPie like experience in a handheld console. There was some talk of it here:

> [@Emulationstation on Gameshell](https://forum.clockworkpi.com/t/emulationstation-on-gameshell/3026):
>
> This weekend I tried to compile emulationstation on Gameshell since I messed up with Retropie. I see the solution “emulationstation only” as a complement to what the OS already allows. It works very well! The configuration of ES is quite simple and so we have the opportunity to have themes more sympathetic than the simple list of roms offered by the OS. I’m thinking of creating an optimized theme for 320x240 resolution. Are you interested in a tutorial?

That would at least make using standalone emulators that don’t depend on Retroarch easy to access.

---

<div class="post-metadata">

**Author:** ![i4s33u](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/i4s33u/32/4004_2.png) [@i4s33u](https://forum.clockworkpi.com/u/i4s33u)\
**Post date:** [June 15, 2020, 11:02am UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/38 "2020-06-15T11:02:58Z")

</div>

OMG, I re-compiled and it worked now.  
First time I uninstalled retroarch before compiling  
Now I just compile without remove RetroArch 1.7.3  
😃

---

<div class="post-metadata">

**Author:** ![Joao\_Manoel](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@Joao\_Manoel](https://forum.clockworkpi.com/u/Joao_Manoel)\
**Post date:** [June 15, 2020, 4:57pm UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/39 "2020-06-15T16:57:53Z")

</div>

> [@Petrakis](#):
>
> What does it have? wayland? Qt works on wayland too.
> 
> It can also work without X11 nor Wayland [Qt for Embedded Linux | Qt 5.15](https://doc.qt.io/qt-5/embedded-linux.html)

Nothing, jusk KMS. No window system or window manager. RetroArch can work without it and have direct access to the GPU. I find this a bit faster than using X11 protocol, consumes less memory, and load faster. Very good that Qt also doesn’t need. I’ll check it 🙂

> [@i4s33u](#):
>
> OMG, I re-compiled and it worked now.  
> First time I uninstalled retroarch before compiling  
> Now I just compile without remove RetroArch 1.7.3

Very good 😃 You probably removed some dependencies when you removed RetroArch.

> [@javelinface](#):
>
> Oh my goodness this is amazing!! I am super keen on this. This is probably as close to an official Lakka pure gaming device experience as we’re going to get!  
> I am going to download this right away.  
> This is the kind of image that I’d be happy to hand to someone as a gift, as a person who purely wants to play games on their gameshell.  
> I’ve been a huge fan of your work. Can’t wait to see more updates to it! 😃

Thanks a lot for your kind words, I’m very happy if I can contribute a bit 😃 Maybe one day we can put your efforts on the DEOT image and transfer your work to this image.

The main reason for this image was to have a clean minimal setup that we all understand what was installed and how it was made from the ground so anybody can use it and build something on top \*for gamming or developer). On the official image, we have a lot of binaries/libraries that a normal user doesn’t need. I understand that this was necessary when lima was getting support, but now we have everything from Debian working out of the box.

For the expand I like very much these 2 lines:

```auto
echo -e "d\n2\nn\np\n2\n94208\n\nN\nw\n" | fdisk /dev/mmcblk0
resize2fs /dev/mmcblk0p2

```

It deletes the partition and creates another one starting from the same start point than the older. Everything with a pipeline `|` to `fdisk`.

---

<div class="post-metadata">

**Author:** ![wotofock](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/wotofock/32/4242_2.png) [@wotofock](https://forum.clockworkpi.com/u/wotofock)\
**Post date:** [June 21, 2020, 3:15pm UTC](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707/40 "2020-06-21T15:15:36Z")

</div>

Hey @Joao_Manoel I will be very interested by your version with battery info and brightness control ! 🙂

[Previous page](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707.md?page=1)

[Next page](https://forum.clockworkpi.com/t/os-retroarch-debian-os-image-based-on-the-minimal-debian-u-boot-kernel-and-debian-from-scratch-v0-3/5707.md?page=3)
