Last active
February 3, 2021 17:00
-
-
Save XargonWan/6f4b3115ab316ffa33537783d8580903 to your computer and use it in GitHub Desktop.
351ELEC Toolchain - VMPREP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is the VMPrep based on Ubuntu | |
# Just grab your favorite Vm (I used VirtualBox), install any ubuntu (I used lubuntu) and follow these instructions | |
# This is written as a script but I am not sure if it's working as an automated script: it should, but I haven't tested it yet. | |
touch ~/Desktop/351minal.sh | |
echo '#!/bin/bash' >> ~/Desktop/351minal.sh | |
echo 'sudo lxc-start 351elec' >> ~/Desktop/351minal.sh | |
echo 'sudo lxc-attach 351elec' >> ~/Desktop/351minal.sh | |
chmod +x ~/Desktop/351minal.sh | |
touch ~/Desktop/overlay.sh | |
echo '#!/bin/bash' >> ~/Desktop/overlay.sh | |
echo -e 'sudo lxc-attach -n 351elec -- mknod /dev/fuse c 10 229\nsudo lxc-attach -n 351elec -- mergerfs -o allow_other,use_ino /:/overlay /chroot\nsudo lxc-attach -n 351elec -- chroot /chroot' >> ~/Desktop/overlay.sh | |
chmod +x ~/Desktop/overlay.sh | |
sudo -s | |
apt -y install qemu binfmt-support qemu-user-static filezilla lxc openssh-server | |
echo "Choose ubuntu, bionic, arm64" | |
lxc-create -t download -n 351elec | |
#enable fuse on lxc | |
echo -e '# Fuse configuration\nlxc.autodev = 1\nlxc.cgroup.devices.allow = c 10:229 rwm' >> /var/lib/lxc/351elec/config | |
lxc-start 351elec | |
lxc-attach 351elec | |
#LXC Section | |
lxc-attach -n 351elec -- echo 'nameserver 1.1.1.1' >> /etc/resolv.conf | |
lxc-attach -n 351elec -- printf 'dhclient\nclear' >> ~/.bashrc | |
lxc-attach -n 351elec -- apt -y install build-essential git wget libdrm-dev python3 python3-pip python3-setuptools python3-wheel ninja-build libopenal-dev premake4 autoconf libevdev-dev ffmpeg libsnappy-dev libboost-tools-dev magics++ libboost-thread-dev libboost-all-dev pkg-config zlib1g-dev libpng-dev libsdl2-dev clang cmake cmake-data libarchive13 libcurl4 libfreetype6-dev libjsoncpp1 librhash0 libuv1 mercurial mercurial-common libgbm-dev git mergerfs cmake-curses-gui | |
lxc-attach -n 351elec -- mkdir /overlay | |
lxc-attach -n 351elec -- mkdir /chroot | |
# to graphically browse the rootfs: | |
# sudo pcmanfm-qt /var/lib/lxc/351elec/rootfs | |
# to copy something from the 351minal outside open the normal terminal (not the 351minal) and: | |
# sudo cp -r /var/lib/lxc/351elec/rootfs/storage/roms/ports DESTINATION | |
# OVERLAY SECTION -- NOT WORKING ATM | |
# overlay contains the program files | |
# chroot conteins everything related to the overlay | |
# execute the cmake and make from the 351minal and then the makeinstall from the overlay | |
# sudo lxc-attach -n 351elec -- mknod /dev/fuse c 10 229 | |
# sudo lxc-attach -n 351elec -- mergerfs -o allow_other,use_ino /:/overlay /chroot | |
# sudo lxc-attach -n 351elec -- chroot /chroot | |
# NOTES | |
# xargs -I "{}" -- rm -- '{}' < install_manifest.txt | |
# rm -R /usr/local/share/games/supertux2/ | |
# cmake .. -DCMAKE_INSTALL_PREFIX=/storage/roms/ports/supertux/ | |
# sudo cp -r /var/lib/lxc/351elec/rootfs/storage/roms/ports /mnt/shared | |
# in the console packages ere in: /storage/.config/packages | |
# to test it locally: /storage/.config/packages.cfg | |
# Installer script is in: /storage/.config/emuelec/scripts/batocera | |
# to submit a package: https://github.com/fewtarius/351ELEC/blob/main/metadata/packages.cfg | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Whenever I will figure out how to make the overlay work correctly I will re-enable it.