mirror of
https://github.com/clockworkpi/DevTerm.git
synced 2025-12-17 12:48:49 +01:00
Created Create DevTerm A06 OS image from scratch (markdown)
parent
b45f542ab7
commit
6c05106a0c
117
Create-DevTerm-A06-OS-image-from-scratch.md
Normal file
117
Create-DevTerm-A06-OS-image-from-scratch.md
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
# Intro
|
||||||
|
DevTerm A06 os image based on Armbian with current kernel branch, XFCE desktop
|
||||||
|
and it is better to run a Ubuntu 21.04 in a VirtualBox with a good bandwidth network to do all the jobs
|
||||||
|
If the condition of the network is not so well,
|
||||||
|
the Armbian build process will fail on some packages downloading or mirrors connecting
|
||||||
|
|
||||||
|
The entire operation requires a certain experience in linux
|
||||||
|
be careful
|
||||||
|
|
||||||
|
# Build armbian image for A06
|
||||||
|
```
|
||||||
|
cd ~
|
||||||
|
git clone https://github.com/armbian/build.git
|
||||||
|
git clone https://github.com/clockworkpi/DevTerm.git
|
||||||
|
|
||||||
|
cd build
|
||||||
|
git apply ~/DevTerm/Code/patch/armbian_build_a06/patch/armbian.patch
|
||||||
|
cp ~/DevTerm/Code/patch/armbian_build_a06/patch/kernel*.patch userpatches/kernel/rockchip64-current/
|
||||||
|
cp ~/DevTerm/Code/patch/armbian_build_a06/patch/uboot*.patch userpatches/u-boot/u-boot-rockchip64-mainline/
|
||||||
|
|
||||||
|
#Then exec ./compile.sh under armbian build
|
||||||
|
cd ~/build && ./compile.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
# Chroot image
|
||||||
|
```
|
||||||
|
sudo losetup -P /dev/loop0 Armbian_21.08.0-trunk_Clockworkpi-a06_focal_current_5.10.55_xfce_desktop.img
|
||||||
|
sudo mount /dev/loop0p1 /mnt/p1
|
||||||
|
|
||||||
|
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 .
|
||||||
|
```
|
||||||
|
|
||||||
|
## Inside Chroot
|
||||||
|
```
|
||||||
|
sudo apt install wget -y
|
||||||
|
|
||||||
|
wget -O - https://raw.githubusercontent.com/clockworkpi/apt/main/debian/KEY.gpg | sudo apt-key add -
|
||||||
|
echo "deb https://raw.githubusercontent.com/clockworkpi/apt/main/debian/ stable main" | sudo tee -a /etc/apt/sources.list.d/clockworkpi.list
|
||||||
|
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install devterm-fan-daemon-cpi-a06 devterm-thermal-printer devterm-thermal-printer-cups devterm-wiringpi-cpi
|
||||||
|
```
|
||||||
|
|
||||||
|
### /boot/ArmbianEnv.txt
|
||||||
|
```
|
||||||
|
bootlogo=false
|
||||||
|
extraargs=fbcon=rotate:1
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
### autologin
|
||||||
|
```
|
||||||
|
sudo bash -c 'cat <<EOF > /etc/lightdm/lightdm.conf.d/12-autologin.conf
|
||||||
|
|
||||||
|
[Seat:*]
|
||||||
|
autologin-user=cpi
|
||||||
|
autologin-user-timeout=0
|
||||||
|
EOF'
|
||||||
|
```
|
||||||
|
|
||||||
|
### config lightdm
|
||||||
|
```
|
||||||
|
sudo bash -c 'cat << EOF > /etc/lightdm/lightdm.conf.d/13-rotate-dsi.conf
|
||||||
|
[Seat:*]
|
||||||
|
greeter-setup-script=/etc/lightdm/setup.sh
|
||||||
|
EOF'
|
||||||
|
|
||||||
|
sudo bash -c 'cat <<EOF >/etc/lightdm/setup.sh
|
||||||
|
#!/bin/bash
|
||||||
|
xrandr --output DSI-1 --rotate right
|
||||||
|
exit 0
|
||||||
|
EOF'
|
||||||
|
|
||||||
|
sudo chmod +x /etc/lightdm/setup.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### config xrandr
|
||||||
|
```
|
||||||
|
sudo bash -c 'cat << EOF > /etc/X11/Xsession.d/100custom_xrandr
|
||||||
|
xrandr --output DSI-1 --rotate right
|
||||||
|
EOF'
|
||||||
|
```
|
||||||
|
|
||||||
|
### additional software
|
||||||
|
```
|
||||||
|
sudo apt remove celluloid mpv
|
||||||
|
sudo apt install -y arandr chromium-browser vlc cpupower-gui
|
||||||
|
```
|
||||||
|
### /etc/default/apport
|
||||||
|
`enable=0`
|
||||||
|
|
||||||
|
# Quit Chroot
|
||||||
|
```
|
||||||
|
exit
|
||||||
|
sudo mv etc/ld_so_preload etc/ld.so.preload
|
||||||
|
|
||||||
|
sudo umount /mnt/p1/dev/pts
|
||||||
|
sudo umount /mnt/p1/dev
|
||||||
|
sudo umount /mnt/p1/proc
|
||||||
|
sudo umount /mnt/p1/sys
|
||||||
|
##clear bash
|
||||||
|
sudo rm -rf root/.bash_history
|
||||||
|
sudo rm usr/bin/qemu-arm-static
|
||||||
|
|
||||||
|
cd -
|
||||||
|
sudo umount /mnt/p1
|
||||||
|
```
|
||||||
|
|
||||||
|
# Flash the image to SD card
|
||||||
|
* Linux
|
||||||
|
`sudo dd if=Armbian_21.08.0-trunk_Clockworkpi-a06_focal_current_5.10.55_xfce_desktop.img of=/dev/sdX bs=8M status=progress`
|
||||||
Loading…
x
Reference in New Issue
Block a user