==== Requirements ====
- - Serial / UART Access ( see [[debug_port|]] )
- - SD card dedicated partition with linux files
- - Time :)
==== Linux image creation ====
To be able to boot linux, we have to create a rootfs on a dedicated partition on sd card.
You need to have at least one or two ( or more ) EXT3/EXT4 partition.
To get enough space once you'll be jailed in your debian, its good to have at least 5/6 gb or more partition size.
As an example here is mine :
root@force:~# fdisk -l /dev/sda
Disk /dev/sda: 29.16 GiB, 31312576512 bytes, 61157376 sectors
Disk model: SD Card Reader
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x42706615
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 14682111 14680064 7G 83 Linux
/dev/sda2 14682112 31459327 16777216 8G 83 Linux
/dev/sda3 31459328 48236543 16777216 8G 83 Linux
/dev/sda4 48236544 60522495 12285952 5.9G 83 Linux
To create partition, you can do
# if /dev/sda is your sd card :
fdisk /dev/sda
# press m for help.
# look at fdisk usage/tutorial if needed.
Once partition is done, dont forget to format it with :
mkfs.ext4 on your partition device :
# eg : will format my /dev/sda3 with ext4 format.
mkfs.ext4 /dev/sda3 :
By default akai mount partition in /media/xxxx
If not you can mount your partition where you want:
eg :
mkdir /tmp/mount
mount /dev/sda4 /tmp/mount
=> now content of /dev/sda4 is accessible in /tmp/mount
#To unmount, do :
umount /dev/sda4, or umount /tmp/mount
Once we have our partition, we have to populate it with debian files content.
On this site , you can dowload rootfs file for various Soc :
[[https://sd-card-images.johang.se/boards/rock2.html]]
You can take this one :
{{http://dnttalo.cluster029.hosting.ovh.net/Pictures/Debian/Rock2BullsEye.JPG}}
Either you download it on your computer and after, upload it on force somewhere,
either you can download it from force with wget command :
(I dont remember if wget is avalaible in the busybox given by akai), on mine it works but i replaced akai busybox with a better version.
#somewhere where you have empty space :
wget https://dl.sd-card-images.johang.se/debians/2025-05-05/debian-bookworm-armhf-ojim4w.bin.gz
# As mentioned on the upper site, do the following command to make img file :
zcat debian-bookworm-armhf-ojim4w.bin.gz > sd-card.img
# Nb : (we dont need rock2 boot gz files)
Once done mount newly image created somewhere.
exemple on my side :
I have an SD card divided in four ext4 partitions.
/dev/sda1 is mounted on /media/61d5a0c0-984f-41ef-8d88-65dec8df748c
/dev/sda2 is mounted on /media/aed1ee6e-5105-4806-883c-ac36de6b7ca3
/dev/sda3 is mounted on /media/6256c493-45b8-4341-b4a4-77b1d5772b3d
etc ...
# I go to /media/61d5a0c0-984f-41ef-8d88-65dec8df748c ( /dev/sda1 )
# My debian bookworm img is debian-bookworm.img
# I create a mount point :
mkdir mountpoint
mount debian-bookworm.img mountpoint
# my /media/aed1ee6e-5105-4806-883c-ac36de6b7ca3 ( /dev/sda2) is empty or almost.
# I will copy everything from the debian img content onto /dev/sda2 :
# So i do :
cd /media/61d5a0c0-984f-41ef-8d88-65dec8df748c/mountpoint/
cp -a * /media/aed1ee6e-5105-4806-883c-ac36de6b7ca3/
# Once everything of the debian files has been copied, i chroot into it with :
chroot /media/aed1ee6e-5105-4806-883c-ac36de6b7ca3
# I'm now chrooted in my debian root.
# I go to root with su :
su
#then i change default root password with :
passwd
# type what you want.
# then leave chroot with dual exit ( one for exit root mode, one to exit chroot mode)
exit
exit
{{http://dnttalo.cluster029.hosting.ovh.net/Pictures/Debian/sda2_chroot.JPG}}
Now I have a debian rootfs on /dev/sda2, and i'm ready to boot on it via uboot.
----
==== Uboot / Boot ====
To install linux on your device (and boot it) a serial console access is required.
(you wont be able to boot another rootfs via ssh, because ssh server is deployed after linux boot).
If you dont have one look at my article on it there [[debug_port|]]
To access Uboot, press a key in your terminal before kernel load.
In Uboot we can see in Environment the following :
{{http://dnttalo.cluster029.hosting.ovh.net/Pictures/Debian/AKF_Uboot_extlinux.JPG}}
It means that we can use and extlinux.conf file as a boot menu in /boot/extlinux/
We can see the same things in a linux terminal with command
fw_printenv
So we can boot other things.
To make it works do the following :
# if you wanna write on /boot , remount / partition with rw access :
# otherwise you will not be able to write your changes.
mount remount / -o rw,exec,remount
cd /boot
# see if extlinux folder already exist with ls,
# if not create it with :
mkdir extlinux
# go inside the folder :
cd extlinux
# if something exist display the file with :
cat extlinux.conf
# otherwise create it with
vi extlinux.conf
Here is an exmple of extlinux i use :
DEFAULT /boot/syslinux/menu.c32
MENU TITLE PCLinuxOS
MENU BACKGROUND splash.png
MENU COLOR border 30;44 #40ffffff #a0000000 std
TIMEOUT 100
LABEL linux default
Kernel ../zImage
FDT ../rk3288-az01-ada2-c.dtb
APPEND root=/dev/mmcblk0p6 rw rootwait earlyprintk console=ttyS2,115200 vga=788 vga=788
LABEL linux sda2 BookwormLxde
Kernel ../zImage
FDT ../rk3288-az01-ada2-c.dtb
APPEND root=/dev/sda2 rw rootwait earlyprintk console=ttyS2,115200
LABEL linux sda3 AnotherBWlxde
Kernel /boot/zImage
FDT ../rk3288-az01-ada2-c.dtb
APPEND root=/dev/sda3 rw rootwait earlyprintk console=ttyS2,115200
LABEL linux sda4 DEbianBullsEye LXD
Kernel ../zImage
FDT ../rk3288-az01-ada2-c.dtb
APPEND root=/dev/sda4 rw rootwait earlyprintk console=ttyS2,115200
MENU TITLE,BACKGROUND,COLOR dont do anything. I think its used on x86 machines but there it does nothing.
Important things are :
- LABEL : it's the title of your entry , you can put what you cant its just a description (keep LABEL linux default for the first one)
- Kernel : relative to /boot/extlinux/ , but you can put /boot/zImage too, it works.
- FDT : here you specify your device tree, on my side i keep the one provided by akai.
- APPEND... : root=/dev/sda2 rw rootwait earlyprintk console=ttyS2,115200 : here you can choose the rootfs you want to boot.
On my side I have an SD card with and ext4 partition (/dev/sda2) , and on this partition i've put the debian12 files.
It's my debian12 rootfs.
rw is for read/write, rootwait ( idk ) , and console etc.. to print whats happen in the console tty.
**/!\ Important** : I recommend to keep DTB (FDT = device tree) provided by akai because it defines the hardware configuration of the device (GPIO, registers, drivers, peripherals etc ...). Change it with extreme caution or never change it.
**/!\ Important** : Keep akai primary as default:
LABEL linux default
Kernel ../zImage
FDT ../rk3288-az01-ada2-c.dtb
APPEND root=/dev/mmcblk0p6 rw rootwait earlyprintk console=ttyS2,115200 vga=788 vga=788
You can try other kernel, if it fails you'll have a kernel panic and you'll have to press the power button multiples seconds to get a poweroff/powerup again.
Then when i boot I have the following in my console :
{{http://dnttalo.cluster029.hosting.ovh.net/Pictures/Debian/AKF_BootMenu.JPG}}
If i do nothing, there is a timeout and the default boot starts with akai stuff.
==== Linux boot & Configuration ====
Restart your force and choose in uboot linux associated to your newly rootfs which has debian on it, eg /dev/sda2.
Update apt with :
apt-get update
Install these packages :
# i do it step by step but you can combine all of them on one line
apt-get install dialog
apt-get install vim
# install lxde minimal package :
apt-get install --no-install-recommends lxde-core
# install xinit/x11 deps
apt-get install xinit
# install ligthdm session manager :
apt-get install lightdm
Create new user :
# GID : 100 correspond to group users in /etc/group
# UID : 1100 new uid for myuser
# -m : create home directory
useradd -g 100 -u 1100 -m myuser
# change passwd for myuser :
passwd myuser
Adjust lightdm configuration for autologin:
# Edit /etc/lightdm/lightdm.conf
# Change in [Seat:*] section
user-session:LXDE
autologin-user=myuser
autologin-user-timeout=0
# Then you can start lightdm with
systemctl start lightdm
You'll see that display is not right
To change orientation create 2 files in /etc/X11/xorg.conf.d/
- 20-modesetting.conf => allow to adjust display / orientation
- 99-touchscreen-rotate.conf => touchscreen input rotation
cat 20-modesetting.conf
Section "Device"
Identifier "Rockchip Graphics"
Driver "modesetting"
# Option "AccelMethod" "exa"
Option "AccelMethod" "glamor"
Option "DRI" "2"
Option "FlipFB" "none"
Option "NoEDID" "true"
EndSection
Section "Screen"
Identifier "Default Screen"
Device "Rockchip Graphics"
Monitor "Default Monitor"
SubSection "Display"
Depth 24
Modes "1920x1080" "1280x1024" "1024x768" "800x600"
EndSubSection
EndSection
### Valid values for rotation are "normal", "left", "right"
Section "Monitor"
Identifier "DSI-1"
Option "PreferredMode" "1280x800"
Option "Rotate" "Left"
EndSection
cat 99-touchscreen-rotate.conf
Section "InputClass"
Identifier "Coordinate Transformation Matrix"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event1"
MatchDriver "libinput"
#Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"
Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"
Driver "libinput"
EndSection
Then restart lightdm
systemctl restart lightdm
=> tadaaa, orientation is changed and touchscren is working.
===== Useful software =====
==== Onboard ====
To have easier access you can install on screen keyboard onboard :
apt-get install onboard gsettings-desktop-schemas
(wow 130Mb for an osk, it's huge but it works well)
#second libs is required otherwise it wont work
==== VNC ====
To control from computer you can install vnc :
X11 vnc allows to take control of current X session.
apt-get install x11vnc
# maybe it can be possible to have it as a service, didnt have time yet to configure it.
run it within a session of your user ( myuser here) :
$ x11vnc
{{http://dnttalo.cluster029.hosting.ovh.net/Pictures/Debian/x11vnc.JPG}}
Then you can access your device with VNCViewer on ip_address:5900.
==== Terminal lxterminal ====
apt-get install lxterminal
==== Desktop Customization ====
To change icons size in menu :
cd /home/myuser
cp .gtkrc-2.0 .gtkrc-2.0.mine
# add entry : gtk-icon-sizes="gtk-menu=36,36" in .gtkrc-2.0.mine
# save & restart lightdm
systemctl restart lightdm
==== Kx studio Repository ====
Some synth like helm are not in default repositories.
You'll have to add it as specified on their site there [[https://kx.studio/Repositories|Kxstudio repo]]
To install it do as root :
# grab wget
apt-get update wget
wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_11.2.0_all.deb
dpkg -i kxstudio-repos_11.2.0_all.deb
apt-get update
Then when you'll look for synthesizer or helm in apt, you have more choices , and now you can try various apps like lmms, helm, carla, ardour or mixxx.
Have fun & enjoy.
==== Final result / Various Screen ====
{{http://dnttalo.cluster029.hosting.ovh.net/Pictures/Debian/IMG_20250507_115248_1.jpg}}
{{http://dnttalo.cluster029.hosting.ovh.net/Pictures/Debian/IMG_20250507_113745_1.jpg}}
{{http://dnttalo.cluster029.hosting.ovh.net/Pictures/Debian/IMG_20250507_113542_1.jpg}}
{{http://dnttalo.cluster029.hosting.ovh.net/Pictures/Debian/IMG_20250507_113458_1.jpg}}
=== Misc / Trouble ===
Sometimes display fails if you let it displaying , maybe an triggering hibernate mode...
Improvements could be gpu acceleration instead of using lvvmpipe.
I have to dig ....
In case of trouble you can always access to your / and linux with method described here [[uboot|]]
=== Other configuration / notes for myself ===
Instead of LXDE, it's possible to install LXQT
To have it :
apt-get install lxqt
(~ 2gig .. be patient )
lxqt use sddm by default
for autologin ( change PAM options )
https://wiki.archlinux.org/title/SDDM