-
Notifications
You must be signed in to change notification settings - Fork 1
Wombat OS Automatic Library Build
Follow the instructions below to build a Wombat-OS image from scratch. Steps will be marked Host Machine or Wombat to indicate where they should be performed
- Download latest raspberry pi imager and open
https://www.raspberrypi.com/software/
- Choose Raspberry Pi Device
- RASPBERRY PI 3
- Choose operating system and storage for SD
- OS - RASPBERRY PI OS (LEGACY, 64-BIT)
- Storage - SD Card (will fit on 8 GB or larger)
- Click Next
- OS Customisation
- Choose "EDIT SETTINGS"
- Set local host to
wombat.local
- Enable SSH
- Set username
kipr
and passwordbotball
- Configure wireless LAN if desired
- Wireless LAN: US
- Set local settings
- Write
- Plug into pi and give it ~5 minutes to do first boot steps
Make sure to have your SD card plugged in to your host machine with a reader or other device.
sudo apt install git bc bison flex libssl-dev make libc6-dev libncurses5-dev docker-buildx -y
sudo apt install crossbuild-essential-arm64 -y
The Raspberry Pi Linux repository is fairly large and may take some time to download
git clone --depth=1 https://github.com/raspberrypi/linux
git clone https://github.com/kipr/wombat-os
cd linux
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bcm2711_defconfig
sed -i 's/# CONFIG_TOUCHSCREEN_TSC2007 is not set/CONFIG_TOUCHSCREEN_TSC2007=m/' .config
sudo cp ~/wombat-os/configFiles/tsc2007-overlay.dts ~/linux/arch/arm64/boot/dts/overlays/tsc2007-overlay.dts
sudo cp ~/wombat-os/configFiles/Makefile ~/linux/arch/arm64/boot/dts/overlays/Makefile
Make sure your mount directories are actually sda and not something else
lsblk
mkdir mnt && mkdir mnt/boot && mkdir mnt/root
sudo mount /dev/sda1 mnt/boot
sudo mount /dev/sda2 mnt/root
Give permissions to mnt directory
sudo chmod 777 mnt
sudo cp ~/wombat-os/splash.png ~/linux/mnt/root/usr/share/plymouth/themes/pix/splash.png
sudo cp ~/wombat-os/wombat.jpg ~/linux/mnt/root/usr/share/rpd-wallpaper
sudo scp -r ~/wombat-os/Backup ~/linux/mnt/root/home/kipr
sudo cp ~/wombat-os/configFiles/config.txt ~/linux/mnt/boot/config.txt
sudo chmod 777 mnt/root/etc/modules
sudo echo 'tsc2007' >> mnt/root/etc/modules
Note: Depending on your machine, you may want to up this to higher than j8 for this build
KERNEL=kernel8
sudo make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image modules dtbs
sudo env PATH=$PATH make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_MOD_PATH=mnt/root modules_install
sudo cp mnt/boot/$KERNEL.img mnt/boot/$KERNEL-backup.img
sudo cp arch/arm64/boot/Image mnt/boot/$KERNEL.img
sudo cp arch/arm64/boot/dts/broadcom/*.dtb mnt/boot/
sudo cp arch/arm64/boot/dts/overlays/*.dtb* mnt/boot/overlays/
sudo cp arch/arm/boot/dts/overlays/README mnt/boot/overlays/
Unmount boot and root then unplug micro SD card.
sudo umount mnt/boot
sudo umount mnt/root
- Plug linux SD into the Raspberry Pi and turn on
- Enter Username and Password if needed
- Username:
kipr
, Password:botball
- Username:
- Get IP address under for
wlan0
ifconfig
- Remote ssh into Raspberry Pi from HOST MACHINE
ssh kipr@<RPI IP address>
sudo apt-get update -y && sudo apt-get full-upgrade -y
sudo apt install xinit git
sudo reboot
Wait for Raspberry Pi to reboot
sudo apt-get install libboost-all-dev libudev-dev libinput-dev libts-dev libmtdev-dev libjpeg-dev libfontconfig1-dev libssl-dev libdbus-1-dev libglib2.0-dev libxkbcommon-dev libegl1-mesa-dev libgbm-dev libgles2-mesa-dev mesa-common-dev libasound2-dev libpulse-dev gstreamer1.0-omx libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-alsa libvpx-dev libsrtp2-dev libsnappy-dev libnss3-dev "^libxcb.*" flex bison libxslt-dev ruby gperf libbz2-dev libcups2-dev libatkmm-1.6-dev libxi6 libxcomposite1 libfreetype6-dev libicu-dev libsqlite3-dev libxslt1-dev xinput-calibrator stm32flash -y
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libx11-dev freetds-dev libsqlite3-dev libpq-dev libiodbc2-dev firebird-dev libgst-dev libxext-dev libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-icccm4 libxcb-icccm4-dev libxcb-sync1 libxcb-sync-dev libxcb-render-util0 libxcb-render-util0-dev libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-glx0-dev libxi-dev libdrm-dev libxcb-xinerama0 libxcb-xinerama0-dev libatspi2.0-dev libxcursor-dev libxcomposite-dev libxdamage-dev libxss-dev libxtst-dev libpci-dev libcap-dev libxrandr-dev libdirectfb-dev libaudio-dev libxkbcommon-x11-dev -y
git clone https://github.com/kipr/wombat-os
sudo mkdir ~/Documents/KISS
sudo mkdir /usr/local/qt6
sudo chown -R kipr:kipr /usr/local/qt6
Move Stm32flash
sudo scp /usr/bin/stm32flash ~/wombat-os/flashFiles/stm32flash
- Enable Serial Ports
-
sudo raspi-config
-> Interface Options -> Serial Port - login shell accessible over serial? -> NO
- serial port hardware to be enabled? -> YES
-
- Finish
- Reboot now? -> YES
- Enable Network Manager through raspi-config
-
sudo raspi-config
-> Advanced Options -> Network Config -> Network Manager - Finish
- Reboot now? -> YES
-
SSH into your Wombat in one terminal
ssh kipr@<RPI IP address>
Clone into KIPR's cross-building repository in a separate terminal
git clone https://github.com/kipr/qt6pi3b --branch autoLibraryBuild
cd qt6pi3b
Copy Raspberry Pi's sysroot to computer; Raspberry Pi's password will need to be entered 3 times
sudo ./prepareSysroot.sh kipr <RPI IP address>
Clone into arm64 Docker repository
git clone https://github.com/kipr/arm64_docker
cd arm64_docker
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
sudo python3 build.py --dockerfile Dockerfile.aarch64 --tag local/arm64
sudo docker run -it --rm local/arm64
apt-get update
apt-get install build-essential openssh-client libzbar-dev libssl-dev
Clone into KIPR's Create 3 repository inside arm64_docker container
git clone -c http.sslVerify=false https://github.com/kipr/create3.git
cd create3
cmake -Bbuild -Dserver=OFF
cd build
make -j16
cmake --install . --prefix prefix
cpack
scp create3-0.1.0-Linux.deb kipr@$WOMBAT_IP:~/create3-0.1.0-Linux.deb
Open a new terminal within arm64_docker repository, not container. Record arm64 container name
sudo docker ps -a
Move arm64_docker include and lib folders to qt6pi3b directory
sudo docker cp <arm64_docker name>:/create3/build/prefix/lib ~/qt6pi3b/
sudo docker cp <arm64_docker name>:/create3/build/prefix/include ~/qt6pi3b/
Generate docker image in qt6pi3b directory; this takes a long time and depending on your machine you may want to set a higher PARALLELIZATION
cd ~/qt6pi3b
sudo docker build --tag qtpi/qtpi:1.0 .
If build continues to crash, reduce parallelization from 12 by modifying line 21 of Dockerfile
:
ARG PARALLELIZATION=12
Run docker container
sudo docker run -it -e PI_PASSWORD=botball -e WOMBAT_IP_ADDRESS=<your_raspberry_pi_IP> qtpi/qtpi:1.0
The terminal will prompt your for your Wombat password. Enter here.
ssh kipr@<your_raspberry_pi_IP>
ls *.deb | sudo xargs dpkg -i
If this terminates with error: paste was killed by signal (Broken Pipe)
, run instead as:
ls *.deb | sudo xargs dpkg -i --force-overwrite
git clone https://github.com/kipr/harrogate
sudo apt-get install npm gulp -y
cd harrogate
npm install browserfy
npm install
sudo npm install -g gulp@4 gulp-cli
sudo mkdir /var/local/KIPR\ Software\ Suite
sudo chmod 777 /var/local/KIPR\ Software\ Suite
gulp
Running gulp
sets up the IDE server, you can hit Ctrl + c
to terminate process
In case of a crash, add an icon to restart UI
cd ~/wombat-os/configFiles
sudo scp botuiIcon.desktop /home/kipr/.local/share/applications
sed -i '62 r taskBarIcon.txt' ~/.config/lxpanel/LXDE-pi/panels/panel
sudo sed -i '195i <Filename>botuiIcon.desktop</Filename>' /etc/xdg/menus/lxde-pi-applications.menu
Right click on task bar at the top -> Add/Remove Panel Items...
Click Application Launch Bar -> Preferences
Under Installed Applications on the right -> Other -> Double click Botui
sudo chmod 777 /etc/ld.so.conf
sudo echo '/usr/local/qt6/lib' >> /etc/ld.so.conf
sudo ldconfig
cd ~/wombat-os/configFiles
sudo chmod +x wombat_launcher.sh
sudo chmod +x firstTimeScreen.sh
sudo chmod +x screen_settings/find.sh
sudo cp wombat_launcher.sh /home/kipr
sudo cp botui.desktop /etc/xdg/autostart/
sudo cp screen_settings/Default/99-calibration.conf /etc/X11/xorg.conf.d
sudo apt-get update
sudo apt-get install xserver-xorg-input-evdev
sudo cp -rf /usr/share/X11/xorg.conf.d/10-evdev.conf /usr/share/X11/xorg.conf.d/45-evdev.conf
sudo cp wombat-os/configFiles/screen_settings/Default/99-calibration.conf /etc/X11/xorg.conf.d/99-calibration.conf
sudo chmod +x wombat-os/configFiles/screen_settings/find.sh
sudo reboot
You can run Botui through the Wombat's terminal
/usr/local/bin/botui
If you get something similiar to the following error:
botui: error while loading shared libraries: libQt6QuickWidgets.so.6: cannot open shared object file: No such file or directory
You can add the following export
export LD_LIBRARY_PATH=/usr/local/qt6/lib:/usr/local/lib
Then run
/usr/local/bin/botui
- For Users to show under Programs, you must edit /var/local/KIPR Software Suite/users.json and change the workspace path to /home/kipr/Documents/KISS