1. Raspbian Setup

Debian 11 Bullseye based Raspbian (for ARM 64bit)

 - 64 bit OS is highly recommended (mkxp-z checks the architecture and optimize to it)

 - RaspberryPi 3B model with 1 GB RAM can run the Pokémon  Another Red
 - To build mkxp-z, some swap memory may be needed

 

2. mkxp-z install

mkxp-z is a open-source cross-platform player for (some) RPG Maker XP / VX / VX Ace games.

 - Gamepads may work

sudo apt update
sudo apt install git build-essential cmake meson autoconf automake libtool pkg-config ruby bison zlib1g-dev libbz2-dev xorg-dev libgl1-mesa-dev libasound2-dev libpluse-dev 

git clone https://github.com/mkxp-z/mkxp-z.git
cd mkxp-z/linux
make
source vars.sh
cd ..; meson setup build
cd build; ninja

# copy mkxp-z.aarch64 binary to the game folder

 

3. Pokémon Another Red download

Pokémon  Another Red is a fan-made Pokémon game (https://cafe.naver.com/1209sung/12376)

Download from the google drive link (https://drive.google.com/drive/folders/1c7510OZVr5VlbHWHUOpXGDiTo4HTgFVj)

# copy downloaded Pokemon
cd ~/Pokemon
# copy mkxp-z binary to the game folder
cp ~/mkxp-z/build/mkxp-z.aarch64 .

vi /home/pi/launch_pokemon.sh

 

/home/pi/launch_pokemon.sh

cd ~/Pokemon
./mkxp-z.aarch64

 

4. Run script setting

mkdir -p ~/.config/autostart

vi ~/.config/autostart/pokemon-autostart.desktop

 

~/.config/autostart/pokemon-autostart.desktop

[Desktop Entry]
Type=Application
Name=Pokemon Autostart
Comment=Auto starts Pokemon on login
Exec=/home/pi/launch_pokemon.sh

 

Reboot & Enjoyyyy

'Programming > RaspberryPi' 카테고리의 다른 글

RaspberryPi Clustering Setup part2  (0) 2025.08.12
RaspberryPi Clustering Setup part1  (0) 2025.08.12
Install chrome-driver for RaspberryPI  (0) 2025.02.14
Install Nextcloud on RaspberryPi  (0) 2023.03.15
Install Owncloud on RaspberryPi  (0) 2023.03.15

Ssh Configuration

For controller (raspberypi)

## ssh key generation for ssh without login
$ ssh-keygen

## copy key to workers
$ ssh-copy-id root@192.168.1.51
$ ssh-copy-id root@192.168.1.52
$ ssh-copy-id root@192.168.1.53
$ ssh-copy-id root@192.168.1.54

## pssh (parallel-ssh) install
$ sudo apt update
$ sudo apt install pssh

## make hosts.txt file
$ echo "192.168.1.51" | tee -a hosts.txt
$ echo "192.168.1.52" | tee -a hosts.txt
$ echo "192.168.1.53" | tee -a hosts.txt
$ echo "192.168.1.54" | tee -a hosts.txt

## parallel ssh to all workers
$ parallel-ssh -h hosts.txt -i -l root 'echo "hello"'

 

NFS Configuration

For controller (raspberypi; nfs-server)

## mount SSD
$ echo "UUID=xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx /mnt/SSD ext4 defaults,nofail 0 2" | sudo tee -a /etc/fstab
$ mount -a

## install nfs server
$ sudo apt update
$ sudo apt install nfs-kernel-server

## nfs configuration @ /etc/exports
$ echo "/mnt/SSD 192.168.1.0/24(rw,sync,no_subtree_check)" | sudo tee -a /etc/exports

## restart nfs server
$ sudo systemctl restart nfs-kernel-server

For worker (Odroid 1,2,3,4; nfs-client)

## install nfs client
$ sudo apt update
$ sudo apt install nfs-common

## mount nfs
$ sudo mkdir -p /mnt/SSD
$ echo "192.168.1.1:/mnt/SSD /mnt/SSD nfs defaults,noatime,x-systemd.automount 0 0" | sudo tee -a /etc/fstab
$ mount -a

Kubernates Configuration

k0s installation

For controller (raspberrypi)

## install k0s
$ curl -sSLf https://get.k0s.sh | sudo sh

## check dependencies
$ sudo k0s sysinfo

 

In case of dependency check failure, modify boot command (/boot/firmware/cmdline.txt for raspberrypi4)

console=serial0,115200 console=tty1 ... cgroup_enable=memory

 

## make configuration
$ sudo k0s config create | sudo tee /etc/k0s/k0s.yaml

## if needed modify the configuration

## install controller
$ sudo k0s install controller -c /etc/k0s/k0s.yaml
$ sudo k0s start

## create token for workers
$ sudo k0s token create --role=worker | sudo tee /mnt/SSD/k0s_worker_token

 

For worker (Odroid 1,2,3,4)

## install k0s
$ curl -sSLf https://get.k0s.sh | sudo sh

## check dependencies
$ sudo k0s sysinfo

 

In case of dependency check failure, modify boot command (/media/boot/boot.ini for Odroid c4)

setenv bootargs "root=UUID=... systemd.unified_cgroup_hierarchy=0"

 

## install worker with token
$ sudo k0s install worker --token-file /mnt/SSD/k0s_worker_token
$ sudo k0s start

## check
$ sudo systemctl status k0sworker

 

 

k0s kubernates control

## get nodes
$ sudo k0s kubectl get nodes

System Configuration

Controller : 1 x Raspberry pi 4 / Quad Cortex-A72 @ 1.8GHz / LPDDR4-3200 4GB / Debian 12 (bookworm) based Raspbian / 1GbE + USB Ethernet Adaptor / 256 GB SSD (via USB 3.0 for NFS)

Worker : 4 x Odroid c4 / Quad Cortex-A55 @ 2GHz / DDR4-2640 4GB / Ubuntu 22.04 / 1GbE

Network Configuration

dhcp server @ raspberrypi

## eth0 (for internet; Wired connection 1), eth1 (Wired connection 2) static ip setup
$ sudo nmcli connection modify "Wired connection 1" ipv4.method manual ipv4.addresses 192.168.0.100/24 ipv4.gateway 192.168.0.1 ipv4.dns 8.8.8.8
$ sudo nmcli connection down "Wired connection 1"
$ sudo nmcli connection up "Wired connection 1"
$ sudo nmcli connection modify "Wired connection 2" ipv4.method manual ipv4.addresses 192.168.1.1/24 ipv4.gateway 192.168.1.1 ipv4.dns 8.8.8.8
$ sudo nmcli connection down "Wired connection 2"
$ sudo nmcli connection up "Wired connection 2"

## dnsmasq (dhcp server) setup
$ sudo apt update
$ sudo apt install dnsmasq
$ sudo vi /etc/dnsmasq.conf

 

/etc/dnsmasq.conf

#interface=interface_name
interface=eth1

#dhcp-range=start_ip,end_ip,subnet_mask,lease_time
dhcp-range=192.168.1.50,192.168.1.100,255.255.255.0,12h

#dhcp-host=MAC_address,ip
dhcp-host=xx:xx:xx:xx:xx:x1,192.168.1.51
dhcp-host=xx:xx:xx:xx:xx:x2,192.168.1.52
dhcp-host=xx:xx:xx:xx:xx:x3,192.168.1.53
dhcp-host=xx:xx:xx:xx:xx:x4,192.168.1.54

#dhcp-option=3,gateway
dhcp-option=3,192.168.1.1

#dhcp-option=6,dns-server
dhcp-option=6,8.8.8.8,8.8.4.4

 

## restart dhcp-server
$ sudo systemctl restart dnsmasq

## NAT setup
$ sudo vi /etc/sysctl.conf

 

/etc/sysctl.conf

net.ipv4.ip_forward=1

 

## apply
$ sudo sysctl -p

## iptables NAT rule setup
## type NAT out to eth0
$ sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQERADE

## save iptables
$ sudo apt install iptables-persistent
$ sudo sh -c 'iptables-save > /etc/iptables/rules.v4'

It is very easy to install chrome-driver for RaspberryPI

sudo apt-get install chromium-chromedriver

 

'Programming > RaspberryPi' 카테고리의 다른 글

RaspberryPi Clustering Setup part2  (0) 2025.08.12
RaspberryPi Clustering Setup part1  (0) 2025.08.12
Install Nextcloud on RaspberryPi  (0) 2023.03.15
Install Owncloud on RaspberryPi  (0) 2023.03.15
Rasbian qbittorrent-nox installation  (0) 2019.11.19

Nextcloud is very similar to Owncloud, but it has better apps.

 

 

1. Download server packages

wget https://download.nextcloud.com/server/releases/nextcloud-23.0.12.tar.bz2

※ Nextcloud 23 is the last version supporting php7.3

 

2. Install prerequisites

sudo apt install -y apache2 libapache2-mod-php mariadb-server openssl redis-server wget php-imagick php-common php-curl php-gd php-gmp php-bcmath php-imap php-intl php-json php-mbstring php-mysql php-ssh2 php-xml php-zip php-apcu php-redis php-ldap php-phpseclib

 

3. Unzip the downloaded server package

tar -jxvf nextcloud-23.0.12.tar.bz2 -C /var/www/html/
cd /var/www/html
sudo chown www-data:www-data nextcloud -R

4. Access the URL and finish to install

URL: http://<YOUR_IP>/nextcloud

Admin account

 - Username

 - Password

Storage & database

 - Data folder

 - Configure the database

    ★MySQL/MariaDB★

    Database user

    Database password

    Database name = nextcloud

    localhost

 

5. Modify memory cache config

When finished installation, you can check the config file( /var/www/html/nextcloud/config/config.php ).

Add the followings into CONFIG for higher performance.

'memcache.local' => '\OC\Memcache\APCu',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => [
	'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
],

 

'Programming > RaspberryPi' 카테고리의 다른 글

RaspberryPi Clustering Setup part1  (0) 2025.08.12
Install chrome-driver for RaspberryPI  (0) 2025.02.14
Install Owncloud on RaspberryPi  (0) 2023.03.15
Rasbian qbittorrent-nox installation  (0) 2019.11.19
SD card image backup  (0) 2018.10.12

1. Download server packages

wget https://download.owncloud.com/server/stable/owncloud-10.11.0.tar.bz2

2. Install prerequisites

sudo apt install -y apache2 libapache2-mod-php mariadb-server openssl redis-server wget php-imagick php-common php-curl php-gd php-gmp php-bcmath php-imap php-intl php-json php-mbstring php-mysql php-ssh2 php-xml php-zip php-apcu php-redis php-ldap php-phpseclib

3. Unzip the downloaded server package

sudo tar -jxvf owncloud-10.11.0.tar.bz2 -C /var/www/html/
cd /var/www/html
sudo chown www-data:www-data owncloud -R

4. Access the URL and finish to install

URL: http://<YOUR_IP>/owncloud

Admin account

 - Username

 - Password

Storage & database

 - Data folder

 - Configure the database

    ★MySQL/MariaDB★

    Database user

    Database password

    Database name = owncloud

    localhost

 

5. Modify memory cache config

When finished installation, you can check the config file( /var/www/html/owncloud/config/config.php ).

Add the followings into CONFIG for higher performance.

'memcache.local' => '\OC\Memcache\APCu',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => [
	'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
],

 

'Programming > RaspberryPi' 카테고리의 다른 글

Install chrome-driver for RaspberryPI  (0) 2025.02.14
Install Nextcloud on RaspberryPi  (0) 2023.03.15
Rasbian qbittorrent-nox installation  (0) 2019.11.19
SD card image backup  (0) 2018.10.12
SDcard Partition Resize  (0) 2018.08.21

1. Install pakages

sudo apt-get install network-manager-strongswan

2. Settings - Network - VPN - (Add VPN) - IPsec/IKEv2(strongswan)

Gateway

Address: <HOST IP>

Certificate: <certificate for the host>

Client

Authentication: EAP

Username: <username>

Password: <passwd>

Options

Request an inner IP address

 

참조 https://docs.netgate.com/pfsense/en/latest/recipes/ipsec-mobile-ikev2-client-ubuntu.html

 

'Programming > Linux' 카테고리의 다른 글

Ubuntu 한글 입력  (0) 2022.12.31
PCI device rescan  (0) 2022.09.25
Piping ls to cp  (0) 2020.12.02
How to use GDB  (0) 2020.03.12
PhantomJS Installation on Ubuntu from source  (0) 2018.12.10

Ubuntu 한글 입력

 

1. Settings - Region & Language - Input Sources - (Add an input source) - Korean - Korean

2. Settings - Region & Language - Manage Installed Languages - Install

3. Reboot

4. Settings - Region & Language - Input Sources - (Add an input source) - Korean - Korean(Hangul)

5. Settings - Region & Language - Input Sources - Korean(Hangul) - - Hangul Toggle Key - Hangul - OK

6. Terminal

sudo vi /usr/share/X11/xkb/symbols/altwin
...
key <RALT> { type[Group1] = "TWO_LEVEL",
			symbols[Group1] = [Hangul] };
...

7. Reboot

 

참조 https://shanepark.tistory.com/231

'Programming > Linux' 카테고리의 다른 글

Ubuntu IKEV2 VPN 설정  (0) 2022.12.31
PCI device rescan  (0) 2022.09.25
Piping ls to cp  (0) 2020.12.02
How to use GDB  (0) 2020.03.12
PhantomJS Installation on Ubuntu from source  (0) 2018.12.10

1. Write back / write through / write evict

These policies determine how to handle a write hit.

Hit means that the requested cache block exists at the current level cache.

 

Write back just handles the request at the current level cache only. Later, when this block would be evicted to the lower level, the modified data would be applied. In other words, the updated data would exist at the current level only.

 

Write through handles the request not only at the current level cache but to lower levels. In other words, the updated data would be exist at current level and lower levels.

 

Write evict passes the request to lower level and invalidates the cache block at the current level. In other words, the updated data would exist at the lower level only. 

 

2. Write allocation / no write allocation

These policies determine how to handle a write miss.

Miss means that the requested cache block does not exist at the current level cache.

 

No write allocation just passes the request to the lower level. 

 

Write allocation handles the request at the current level. In this case, the cache block would be fetched ahead or not, regarding to the following fetch policies.

 

3. Fetch on write / lazy fetch on read

Fetch on write: When a write miss is handled with write allocation policy, the cache block would be fetched ahead.

 

Lazy fetch on read: When a write miss is handled with write allocation policy, the cache block would not be fetched, and the data just written to the current level cache. In this case, the modified sectors must be marked, and when the cache block would be fetched for read hit, the modified sectors would be applied.

 

'Programming > Computer Architecture' 카테고리의 다른 글

Basic of the DRAM Subsystem  (0) 2019.04.19
echo 1 | sudo tee /sys/bus/pci/devices/<port>/remove
echo 1 | sudo tee /sys/bus/pci/rescan

 

'Programming > Linux' 카테고리의 다른 글

Ubuntu IKEV2 VPN 설정  (0) 2022.12.31
Ubuntu 한글 입력  (0) 2022.12.31
Piping ls to cp  (0) 2020.12.02
How to use GDB  (0) 2020.03.12
PhantomJS Installation on Ubuntu from source  (0) 2018.12.10

+ Recent posts