mirror of
https://github.com/clockworkpi/uConsole.git
synced 2025-12-12 18:18:50 +01:00
Compare commits
13 Commits
5550fef84b
...
21e0dd4524
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21e0dd4524 | ||
|
|
830af9ce5d | ||
|
|
84fce552fe | ||
|
|
9f49f6deb8 | ||
|
|
b94258b142 | ||
|
|
790ce71478 | ||
|
|
ad88734be0 | ||
|
|
d009ef7c36 | ||
|
|
ebdadc959f | ||
|
|
fc0d2d8ead | ||
|
|
7a508945c1 | ||
|
|
fae0221bfe | ||
|
|
02aa517180 |
0
.gitmodules
vendored
Normal file
0
.gitmodules
vendored
Normal file
52
wiki/Home.md
52
wiki/Home.md
@ -1,5 +1,51 @@
|
||||
Welcome to the uConsole wiki!
|
||||
# Welcome to the uConsole Wiki!
|
||||
|
||||
If you want to edit the wiki, just clone https://github.com/clockworkpi/uConsole, and add markdown files to the **wiki** folder
|
||||
uConsole, developed by ClockworkPi, is a powerful, modular, and portable device designed for developers, makers, and tech enthusiasts. This Wiki serves as a comprehensive documentation resource, providing guides for hardware extensions, OS image creation, and various functionalities. Whether you're new to uConsole or looking to explore its advanced features, this Wiki is your go-to resource.
|
||||
|
||||
|
||||
## Quick Navigation
|
||||
Below is the list of available Wiki pages. Click on the links to explore detailed guides and information:
|
||||
|
||||
* [Compile RetroArch for CM4](https://github.com/clockworkpi/uConsole/wiki/Compile-retroarch-for-cm4)
|
||||
Learn how to compile and run the RetroArch emulator on the CM4 module of uConsole.
|
||||
|
||||
* [How to Make Phone Calls and Send SMS with the 4G Extension](https://github.com/clockworkpi/uConsole/wiki/How-to-make-phone-call---send-sms-with-4G-extension)
|
||||
A guide on how to use the 4G extension module for making phone calls and sending SMS.
|
||||
|
||||
* [How to Upgrade 4G Extension Firmware](https://github.com/clockworkpi/uConsole/wiki/How-to-upgrade-4G-extension-firmware)
|
||||
Learn how to update the firmware of the 4G extension module to access the latest features and fixes.
|
||||
|
||||
* [How to Use the Keyboard UART Port to Flash Firmware](https://github.com/clockworkpi/uConsole/wiki/How-to-use-keyboard-UART-port-to-flash-firmware)
|
||||
Detailed instructions on how to flash firmware using the keyboard's UART port.
|
||||
|
||||
* [How to Use the 4G Extension ](https://github.com/clockworkpi/uConsole/wiki/How-to-use-the-4G-extension)
|
||||
A guide to help you operate and configure the 4G extension module.
|
||||
|
||||
* [How the uConsole A06 OS Image Is Made](https://github.com/clockworkpi/uConsole/wiki/How-uConsole-A06-OS-image-made)
|
||||
Learn how to create a custom OS image for the A06 module of uConsole.
|
||||
|
||||
* [How the uConsole CM4 OS Image Is Made](https://github.com/clockworkpi/uConsole/wiki/How-uConsole-CM4-OS-image-made)
|
||||
Instructions for generating OS images for the CM4 module of uConsole.
|
||||
|
||||
* [Kali Linux Image for uConsole CM4](https://github.com/clockworkpi/uConsole/wiki/Kali-linux-image-for-uConsole-cm4)
|
||||
Information on running Kali Linux on the CM4 module of uConsole.
|
||||
|
||||
* [Simple uConsole keyboard flashing tool](https://github.com/clockworkpi/uConsole/wiki/Simple-uConsole-keyboard-flashing-tool)
|
||||
An automated script to flash the firmware of the uConsole keyboard whether it is plugged in to a uConsole or a linux PC
|
||||
|
||||
|
||||
## Edit
|
||||
|
||||
### Directly on the GitHub Website
|
||||
|
||||
If you have the necessary permissions, go to the Wiki page of the target repository.
|
||||
Click the "Edit" button (or the pencil icon on the page).
|
||||
Edit the content of the Wiki page directly in the web interface using Markdown format.
|
||||
Once you’re done, click the "Save Page" button to save your changes.
|
||||
|
||||
### Pull Request
|
||||
|
||||
Just clone https://github.com/clockworkpi/uConsole, and add markdown files to the **wiki** folder
|
||||
|
||||
Then Send Pull Request , once got merged, github workflow will make wiki sync to https://github.com/clockworkpi/uConsole/wiki
|
||||
|
||||
Then Send Pull Request , once got merged, wiki will be shown at https://github.com/clockworkpi/uConsole/wiki
|
||||
|
||||
@ -1,3 +1,16 @@
|
||||
# Precautions
|
||||
The following-mentioned flashing operation requires your familiarity with Linux and firmware flashing.
|
||||
**Please do not attempt to try it without sufficient experience!**
|
||||
**Please do not attempt to try it without sufficient experience!**
|
||||
**Please do not attempt to try it without sufficient experience!**
|
||||
|
||||
as we will not be held responsible for any consequences. Thank you for your understanding.
|
||||
|
||||
once you flashed the new firmware, there is no going back
|
||||
even if you switch id from 9011 to 9001 ,mmcli may not able to see the 4G modem any more.
|
||||
|
||||
Therefore, there are risks involved in flashing the 4g ext, and it is necessary for you to have a certain understanding of these background information. During the testing process, it is also not possible for me to test whether all SIM cards worldwide can easily connect to the internet through **usb0**.
|
||||
|
||||
# Purpose
|
||||
|
||||
A more convenient way to use 4G ext on the uConsole,no setup, no nmcli ,just insert 4G card and power on 4G ext, that's it
|
||||
@ -179,14 +192,6 @@ PING 8.8.8.8 (8.8.8.8) from ***.***.***.** usb0: 56(84) bytes of data.
|
||||
64 bytes from 8.8.8.8: icmp_seq=4 ttl=109 time=89.0 ms
|
||||
```
|
||||
|
||||
# Precautions
|
||||
The above-mentioned flashing operation requires your familiarity with Linux and firmware flashing. Please do not attempt it without sufficient experience, as we will not be held responsible for any consequences. Thank you for your understanding.
|
||||
|
||||
once you flashed the new firmware, there is no going back
|
||||
even if you switch id from 9011 to 9001 ,mmcli may not able to see the 4G modem any more.
|
||||
|
||||
Therefore, there are risks involved in flashing the 4g ext, and it is necessary for you to have a certain understanding of these background information. During the testing process, it is also not possible for me to test whether all SIM cards worldwide can easily connect to the internet through **usb0**.
|
||||
|
||||
# Access Point Name (APN)
|
||||
Generally, **usb0** will automatically connect, but for configuring the Access Point Name (APN),
|
||||
see:
|
||||
|
||||
@ -1,12 +1,16 @@
|
||||
On uConsole keyboard back,there is a **UART** port which can be used with `stm32flash` to flash keyboard firmware
|
||||
**All operations are under desktop linux**
|
||||
|
||||
Especially at when your keyboard met problem
|
||||
|
||||
On uConsole keyboard back,there is a **UART** port which can be used with `stm32flash` to flash keyboard stock firmware
|
||||
|
||||
Especially when your keyboard met problem
|
||||
|
||||
here is the process:
|
||||
|
||||
* put the switch 1 ON
|
||||
* connect uart with a **fpc 6p connector 0.5mm** to a serial-usb converter
|
||||
* use stm32flash to flash bin file
|
||||
* put the switch 1 OFF
|
||||
|
||||
## Whole connection view
|
||||

|
||||
@ -26,6 +30,8 @@ here is the process:
|
||||
```
|
||||
$ sudo stm32flash -w uconsole.kbd.0.4_48mhz.bin -v -S 0x08000000 /dev/ttyUSB0
|
||||
```
|
||||
You can get uconsole.kbd.0.4_48mhz.bin from https://github.com/clockworkpi/uConsole/tree/master/Bin
|
||||
|
||||
## Normal flashing output
|
||||
```
|
||||
stm32flash 0.5
|
||||
|
||||
@ -1,24 +1,38 @@
|
||||
Based on 4d990ec702d0b6383f6e43bbeb3e3274 http://dl.clockworkpi.com/DevTerm_CM4_v0.1a_64bit.img.bz2
|
||||
# How uConsole CM4 OS Image Is Made
|
||||
|
||||
Since the uConsole and devterm are using the same main board
|
||||
This guide explains how to create an OS image for the uConsole CM4 module. Since the uConsole and DevTerm share the same mainboard, the process involves adapting the DevTerm CM4 OS image with updates specific to the uConsole, such as a new kernel for its LCD screen.
|
||||
|
||||
Just need to update a new kernel for the uConsole LCD screen
|
||||
---
|
||||
|
||||
original create os image from scratch is here:
|
||||
## **Base OS Image**
|
||||
|
||||
https://github.com/clockworkpi/DevTerm/wiki/Create-DevTerm-CM4-OS-image-from-scratch
|
||||
The base OS image used is the DevTerm CM4 image:
|
||||
|
||||
## Kernel
|
||||
- Download the base image:
|
||||
[DevTerm_CM4_v0.1a_64bit.img.bz2](http://dl.clockworkpi.com/DevTerm_CM4_v0.1a_64bit.img.bz2)
|
||||
md5sum: 4d990ec702d0b6383f6e43bbeb3e3274
|
||||
|
||||
https://github.com/clockworkpi/uConsole/tree/master/Code/patch/cm4/20230630
|
||||
For detailed instructions on creating the base image from scratch, refer to:
|
||||
[Create DevTerm CM4 OS Image from Scratch](https://github.com/clockworkpi/DevTerm/wiki/Create-DevTerm-CM4-OS-image-from-scratch).
|
||||
|
||||
Create a deb file of uconsole_kernel_cm4-rpi based on kernel compiled output files
|
||||
---
|
||||
|
||||
Another important thing to note is the correct configuration file, "config.txt".
|
||||
## **Kernel Update**
|
||||
|
||||
```
|
||||
To update the kernel for the uConsole CM4:
|
||||
|
||||
1. Use the kernel files located here:
|
||||
[uConsole Kernel for CM4](https://github.com/clockworkpi/uConsole/tree/master/Code/patch/cm4/20230630)
|
||||
|
||||
2. Create a `.deb` package for the kernel:
|
||||
`uconsole_kernel_cm4-rpi` is built from the compiled output files.
|
||||
|
||||
3. Ensure the correct configuration in the `config.txt` file. Below is an example configuration:
|
||||
|
||||
```text
|
||||
disable_overscan=1
|
||||
dtparam=audio=on
|
||||
|
||||
[pi4]
|
||||
max_framebuffers=2
|
||||
|
||||
@ -34,78 +48,119 @@ dtoverlay=audremap,pins_12_13
|
||||
dtparam=spi=on
|
||||
gpio=10=ip,np
|
||||
```
|
||||
especially the line **dtoverlay=devterm-panel-uc**
|
||||
|
||||
## Chroot
|
||||
Chroot into DevTerm_CM4_v0.1a_64bit.img
|
||||
by
|
||||
```
|
||||
**Key line:**
|
||||
`dtoverlay=devterm-panel-uc` (This sets the panel configuration specific to the uConsole.)
|
||||
|
||||
---
|
||||
|
||||
## **Chroot Environment**
|
||||
|
||||
To modify the image in a chroot environment:
|
||||
|
||||
1. Mount the image:
|
||||
|
||||
```bash
|
||||
sudo mkdir -p /mnt/p1
|
||||
sudo losetup --show -f -P DevTerm_CM4_v0.1a_64bit.img #assume loop0
|
||||
sudo losetup --show -f -P DevTerm_CM4_v0.1a_64bit.img # Assume loop0
|
||||
sudo mount /dev/loop0p2 /mnt/p1
|
||||
sudo mount /dev/loop0p1 /mnt/p1/boot
|
||||
```
|
||||
|
||||
2. Set up the chroot environment:
|
||||
|
||||
```bash
|
||||
cd /mnt/p1
|
||||
sudo mount --bind /dev dev/
|
||||
sudo mount --bind /sys sys/
|
||||
sudo mount --bind /proc proc/
|
||||
sudo mount --bind /dev/pts dev/pts
|
||||
#sudo mv etc/ld.so.preload etc/ld_so_preload
|
||||
sudo chroot .
|
||||
```
|
||||
|
||||
## In chroot
|
||||
3. Inside the chroot environment:
|
||||
|
||||
```
|
||||
- Update the system and kernel:
|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
#update kernel
|
||||
sudo apt install -y uconsole-kernel-cm4-rpi
|
||||
#install additional games/emulators
|
||||
sudo apt install -y devterm-tic80-cpi uconsole-love2d retroarch dosbox devterm-cavestory-cpi-cm4 uconsole-liko12 uconsole-lowresnx uconsole-dosbox-staging pppoe uconsole-4g-util-cm4
|
||||
```
|
||||
|
||||
#for 4G extension
|
||||
- Install additional software (games, emulators, and utilities):
|
||||
|
||||
```bash
|
||||
sudo apt install -y devterm-tic80-cpi uconsole-love2d retroarch dosbox \
|
||||
devterm-cavestory-cpi-cm4 uconsole-liko12 uconsole-lowresnx \
|
||||
uconsole-dosbox-staging pppoe uconsole-4g-util-cm4
|
||||
```
|
||||
|
||||
- Configure the 4G extension module (optional):
|
||||
|
||||
```bash
|
||||
sudo bash -c 'cat << EOF > /etc/modprobe.d/blacklist-qmi.conf
|
||||
blacklist qmi_wwan
|
||||
blacklist cdc_wdm
|
||||
EOF'
|
||||
```
|
||||
|
||||
# uconsole does not have thermal printer
|
||||
sudo apt remove devterm-thermal-printer devterm-thermal-printer-cm4 # uconsole does not have thermal printer
|
||||
- Remove unnecessary software (e.g., thermal printer utilities, as uConsole does not include a thermal printer):
|
||||
|
||||
#pre configs
|
||||
```bash
|
||||
sudo apt remove devterm-thermal-printer devterm-thermal-printer-cm4
|
||||
```
|
||||
|
||||
- Perform pre-configurations:
|
||||
|
||||
```bash
|
||||
cd /usr/local/bin/
|
||||
git clone -b uconsole-cm4 https://github.com/cuu/skel.git
|
||||
cp -rf skel/etc/xdg/autostart/first-touch.desktop /etc/xdg/autostart/
|
||||
cp -rf skel/usr/local/bin/chgpas.sh /usr/local/bin/
|
||||
```
|
||||
|
||||
#remove old configs for screen rotation,since new uconsole cm4 kernel did screen rotation
|
||||
- Clean up old screen rotation settings (the new kernel already handles screen rotation):
|
||||
|
||||
nano /boot/cmdline.txt ,remove "fbcon=rotate:1"
|
||||
```bash
|
||||
nano /boot/cmdline.txt # Remove "fbcon=rotate:1"
|
||||
rm -rf /etc/X11/Xsession.d/90custom_xrandr
|
||||
rm -rf /etc/lightdm/setup.sh
|
||||
edit /etc/lightdm/lightdm.conf
|
||||
comment out or delete line :
|
||||
"greeter-setup-script=/etc/lightdm/setup.sh"
|
||||
|
||||
exit #quit chroot
|
||||
nano /etc/lightdm/lightdm.conf # Comment out or delete the line:
|
||||
# greeter-setup-script=/etc/lightdm/setup.sh
|
||||
```
|
||||
|
||||
## Clean chroot
|
||||
|
||||
do it everytime when you are done with chroot enviroment
|
||||
4. Exit the chroot environment:
|
||||
|
||||
```bash
|
||||
exit
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## **Clean Chroot Environment**
|
||||
|
||||
After finishing work in the chroot environment, clean up:
|
||||
|
||||
```bash
|
||||
cd -
|
||||
sudo umount /mnt/p1/dev/pts
|
||||
sudo umount /mnt/p1/dev
|
||||
sudo umount /mnt/p1/proc
|
||||
sudo umount /mnt/p1/sys
|
||||
##clear bash
|
||||
|
||||
# Clear bash history
|
||||
sudo rm -rf /mnt/p1/root/.bash_history
|
||||
|
||||
sudo umount /mnt/p1/boot
|
||||
sudo umount /mnt/p1
|
||||
sudo losetup -D /dev/loop0
|
||||
```
|
||||
All the uConsole image can be found at : https://github.com/clockworkpi/uConsole/tree/master/images
|
||||
|
||||
That's it , happy hacking
|
||||
---
|
||||
|
||||
## **Final Notes**
|
||||
|
||||
- All official uConsole OS images can be found here:
|
||||
[uConsole Images Repository](https://github.com/clockworkpi/uConsole/tree/master/images)
|
||||
|
||||
- Happy hacking!
|
||||
21
wiki/Simple-uConsole-keyboard-flashing-tool.md
Normal file
21
wiki/Simple-uConsole-keyboard-flashing-tool.md
Normal file
@ -0,0 +1,21 @@
|
||||
# Simple uConsole keyboard flashing tool
|
||||
|
||||
[uconsole_keyboard_flash.tar.gz](https://github.com/clockworkpi/uConsole/blob/master/Bin/uconsole_keyboard_flash.tar.gz "uconsole_keyboard_flash.tar.gz")
|
||||
|
||||
This tar.gz contains a auto flash tool for quick flashing Arduino IDE compiled bin file to the uConsole keyboard while the keyboard is plugged in the PC or uConsole and uConsole is running some linux system.
|
||||
|
||||
***DO NOT*** confused the bin file in the tar.gz with other uconsole.kbd.***.bin files, they are not the same thing.
|
||||
|
||||
So do not use uconsole.kbd.***.bin with this flashing tool.
|
||||
|
||||
Here's how you can flash the firmware on uConsole(A06 or CM4) or a PC running Ubuntu 22.04+:
|
||||
|
||||
1. Download the [uconsole_keyboard_flash.tar.gz](https://github.com/clockworkpi/uConsole/blob/master/Bin/uconsole_keyboard_flash.tar.gz "uconsole_keyboard_flash.tar.gz") file.
|
||||
2. Extract the contents of the archive: `tar zxvf uconsole_keyboard_flash.tar.gz`.
|
||||
3. Install the required package using the following command: `sudo apt install -y dfu-util`.
|
||||
4. Navigate to the extracted directory: `cd uconsole_keyboard_flash`.
|
||||
5. Execute the flash script with root privileges: `sudo ./flash.sh`.
|
||||
6. If everything goes well, you will see a progress bar indicating the flashing process.
|
||||
7. If any issues occur or the keyboard loses control (which is unlikely), simply reboot uConsole to resolve it.
|
||||
8. Rest assured that this flash program will not brick your keyboard.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user