Priklady http://gitlab.fjfi.cvut.cz/culikzde/peri
====== Literatura ======
Interfacing the PC: Using Interrupts
http://wearcam.org/seatsale/programs/www.beyondlogic.org/interrupts/interupt.htm
The PC's keyboard
http://wearcam.org/seatsale/programs/www.beyondlogic.org/keyboard/keybrd.htm
Parallel Port
http://wearcam.org/seatsale/programs/www.beyondlogic.org/spp/parallel.htm
Serial RS232 Port
http://wearcam.org/seatsale/programs/www.beyondlogic.org/serial/serial.htm
http://download-mirror.savannah.gnu.org/releases/pgubook/ProgrammingGroundUp-1-0-lettersize.pdf
Assembly Language (video)
https://www.youtube.com/watch?v=rxsBghsrvpI&list=PLKK11Ligqitg9MOX3-0tFT1Rmh3uJp7kA \\
https://www.youtube.com/watch?v=Dh7GQ_joeE4
Cuda (video)
https://www.youtube.com/watch?v=kzXjRFL-gjo&list=PLKK11Ligqititws0ZOoGk3SW-TZCar4dK
Write your own Operating System
https://www.youtube.com/playlist?list=PLHh55M_Kq4OApWScZyPl5HhgsTJS9MZ6M \\
https://github.com/AlgorithMan-de/wyoos
======Raspberry======
http://github.com/bztsrc/raspi3-tutorial
https://github.com/isometimes/rpi4-osdev
http://s-matyukevich.github.io/raspberry-pi-os
http://s-matyukevich.github.io/raspberry-pi-os/docs/lesson06/rpi-os.html
Ultibo https://ultibo.org/
======NVidia======
OpenCL Tutorial https://cnugteren.github.io/tutorial/pages/page2.html
Gdev: Open-Source GPGPU Runtime and Driver http://github.com/shinpei0208/gdev
NVidia driver https://download.nvidia.com/XFree86/Linux-x86_64/515.43.04/README/supportedchips.html
NVidia PCI https://pci-ids.ucw.cz/read/PC/10de
http://jlk.fjfi.cvut.cz
======Realtek 8125======
/etc/default/grub
GRUB_DISABLE_OS_PROBER=true
/etc/apt/sources.list
deb [allow-insecure=yes] file:///mnt/other/debian/ buster main contrib
/etc/apt/apt.conf.d/...
Acquire::AllowInsecureRepositories "true";
https://packages.debian.org/bookworm/r8125-dkms
https://packages.debian.org/bookworm/all/r8125-dkms/download
======QEMU======
https://wiki.qemu.org/Documentation/9psetup
https://sebastienbourdelin.com/2021/06/16/writing-a-custom-device-for-qemu/
https://www.ashling.com/wp-content/uploads/QEMU_CUSTOM_INST_WP.pdf
https://courses.grainger.illinois.edu/cs423/sp2010/MPs/mp3.htm
https://embeddedinn.com/articles/tutorial/Adding-a-custom-peripheral-to-QEMU/
=====Debian Arm64=====
qemu-system-aarch64 \
-M virt \
-cpu cortex-a72 \
-m 1G \
-kernel kernel \
-initrd initrd \
-device virtio-blk-device,drive=hd \
-drive file=image.qcow2,if=none,id=hd \
-append "root=LABEL=rootfs" \
-device virtio-net-device,netdev=net \
-netdev user,id=net,hostfwd=tcp::2223-:22 \
-device virtio-vga \
-device virtio-keyboard \
-device virtio-mouse
https://people.debian.org/~gio/dqib/
=====Debian RISC-V=====
qemu-system-riscv64 \
-M virt \
-cpu rv64 \
-m 1G \
-kernel kernel \
-initrd initrd \
-device virtio-blk-device,drive=hd \
-drive file=image.qcow2,if=none,id=hd \
-append "root=LABEL=rootfs" \
-device virtio-net-device,netdev=net \
-netdev user,id=net,hostfwd=tcp::2222-:22 \
-device virtio-vga \
-device virtio-keyboard \
-device virtio-mouse
http://colatkinson.site/linux/riscv/2021/01/27/riscv-qemu/
https://people.debian.org/~gio/dqib/
=====Fedora Arm64=====
qemu-system-aarch64 \
-M virt \
-cpu cortex-a72 \
-smp 4 \
-m 4G \
-device virtio-vga \
-kernel vmlinuz \
-initrd initrd.img \
-append "console=ttyAMA root=live:CDLABEL=Fedora-WS-Live-35-1-2" \
-cdrom Fedora-Workstation-Live-aarch64-35-1.2.iso \
-boot d \
-device virtio-keyboard \
-device virtio-mouse \
-netdev user,id=net0,hostfwd=tcp::5022-:22 \
-device virtio-net-device,netdev=net0 \
-no-reboot
http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/34/Everything/aarch64/iso/
=====HaikuOS RISC-V=====
qemu-system-riscv64 \
-M virt \
-m 1G \
-device ati-vga \
-kernel u-boot.bin \
-drive file=haiku-master-hrev55697-riscv64-mmc.image,format=raw,if=virtio \
-usb -device usb-ehci,id=echi \
-device usb-kbd \
-device usb-tablet
http://www.haiku-os.org/blog/kallisti5/2021-11-07_booting_our_risc-v_images/
http://discuss.haiku-os.org/t/my-haiku-risc-v-port-progress
vgabios-ati.bin from debian package seabios_1.14.0-2_all.deb
=====Raspbian Arm32=====
qemu-system-arm \
-M raspi2 \
-cpu arm1176 \
-smp 4 \
-m 1G \
-append "rw earlyprintk loglevel=8 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2" \
-dtb bcm2709-rpi-2-b.dtb \
-sd 2016-05-27-raspbian-jessie.img \
-kernel kernel7.img
https://downloads.raspberrypi.org/raspbian/images/
(Rasbian 7 Wheezy nestartuje, je nezbytne pouzit kernel specielne urceny pro qemu)
=====RaspiOS Arm64=====
IMG=2021-10-30-raspios-bullseye-arm64.img
CMD="console=ttyAMA0 root=/dev/mmcblk0p2 rw rootwait rootfstype=ext4"
qemu-system-aarch64 \
-M raspi3 \
-m 1024 \
-kernel kernel8.img \
-dtb bcm2710-rpi-3-b.dtb \
-drive file=$IMG,format=raw,if=sd \
-append "$CMD"
http://downloads.raspberrypi.org/raspios_arm64/images/
qemu-img resize image_file 4G
fdisk -l image_file
mount -r image_file directory -o offset=`echo 8192*512 | bc`
--------
======Build======
=====Buildroot=====
2009 https://mirror.egtvedt.no/buildroot/
https://stackoverflow.com/questions/30732707/buildroot-custom-kernel-under-1mb
https://unix.stackexchange.com/questions/729103/set-linux-image-size-buildroot
BR2_TARGET_ROOTFS_EXT2_SIZE
https://unix.stackexchange.com/questions/729103/set-linux-image-size-buildroot
=== on Fedora 34 ===
dnf install perl-ExtUtils-MakeMaker
# Fedora34, 10 minutes
# http://buildroot.net/downloads/buildroot-2021.08.tar.gz
# cp configs/qemu_x86_64_defconfig config
make defconfig BR2_DEFCONFIG=config
make
# check BR2_PACKAGE_QT5WIDGETS .config
# check FONFIG_FB in output/build/linux-.....config
# make mc-show-depends
# make clang-show-depends
# make qt5base-show-depends
=== with Podman ===
# buildroot-2018.02, Ubuntu 18.04
# Architecture
BR2_x86_64=y
# System
BR2_SYSTEM_DHCP="eth0"
BR2_TARGET_GENERIC_GETTY_PORT="tty1"
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
# BR2_TARGET_ROOTFS_TAR is not set
# Linux headers same as kernel, a 4.15 series
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_15=y
# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86_64/linux-4.15.config"
# host-qemu for gitlab testing
# BR2_PACKAGE_HOST_QEMU=y
# BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
BR2_PACKAGE_MC=y
# BR2_PACKAGE_CLANG=y
# BR2_TAR_OPTIONS="--no-same-owner"
=== Qemu ===
dnf install qemu-system-arm qemu-system-aarch64 qemu-system-riscv qemu-system-x86
cd output/images
qemu-system-i386 \
-M pc \
-kernel bzImage \
-drive file=rootfs.ext2,if=virtio,format=raw \
-append "rootwait root=/dev/vda console=tty1 console=ttyS0" \
-serial stdio \
-net nic,model=virtio \
-net user
qemu-system-x86_64 \
-kernel bzImage \
-hda rootfs.ext2 \
-append "root=/dev/sda console=ttyS0" \
-net user,hostfwd=tcp:127.0.0.1:3333-:22 \
-net nic,model=virtio
# Qemu Menu / View / serial0
dnf install tigervnc
output/host/bin/qemu-system-x86
vncviewer ::5900
make linux-menuconfig
# Device drivers->Graphics support->Support for frame buffer devices enable Cirrus Logic support
=== Podman storage ===
DIR=`pwd`
test -d $DIR/storage || mkdir $DIR/storage
cat > storage.conf << EOF
[storage]
driver = "overlay"
runroot = "$DIR/storage"
graphroot = "$DIR/storage"
rootless_storage_path = "$DIR/storage"
EOF
export CONTAINERS_STORAGE_CONF=$DIR/storage.conf
# /etc/containers/storage.conf
# ~/.config/containers/storage.conf
# cp storage.conf ~/.config/containers/storage.conf
podman build -t entry1 -f Dockerfile
podman run -it --name entry2 entry1
podman attach entry2
podman exec -it entry2 bash
=== Podman Dockerfile (Ubuntu 18.04)===
http://github.com/AdvancedClimateSystems/docker-buildroot/blob/master/Dockerfile
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y \
mc \
libelf-dev \
build-essential \
bash \
bc \
binutils \
build-essential \
bzip2 \
cpio \
g++ \
gcc \
git \
gzip \
locales \
libncurses5-dev \
libdevmapper-dev \
libsystemd-dev \
make \
mercurial \
whois \
patch \
perl \
python \
rsync \
sed \
tar \
vim \
unzip \
wget \
bison \
flex \
libssl-dev \
libfdt-dev
RUN locale-gen en_US.utf8
RUN git clone git://git.buildroot.net/buildroot
RUN cd buildroot && git checkout 2018.02
# WORKDIR /buildroot
# ENV O=/buildroot_output
# VOLUME /buildroot/dl
# VOLUME /buildroot_output
RUN ["/bin/bash"]
=== Dockerfile (Ubuntu 16.04)===
FROM ubuntu:16.04
RUN apt-get update && \
apt-get install -y \
mc \
libelf-dev \
build-essential \
bash \
bc \
binutils \
build-essential \
bzip2 \
cpio \
g++ \
gcc \
git \
gzip \
locales \
libncurses5-dev \
libdevmapper-dev \
libsystemd-dev \
make \
mercurial \
whois \
patch \
perl \
python \
rsync \
sed \
tar \
vim \
unzip \
wget \
bison \
flex \
libssl-dev \
libfdt-dev
RUN locale-gen en_US.utf8
# VOLUME /buildroot
# RUN git clone git://git.buildroot.net/buildroot
WORKDIR /buildroot
# RUN git checkout 2017.02
# RUN make defconfig BR2_DEFCONFIG=config
# RUN make -j8
RUN ["/bin/bash"]
=== Dockerfile (Debian Squeeze) ===
FROM debian:squeeze
RUN echo "deb http://archive.debian.org/debian squeeze main" > /etc/apt/sources.list
RUN echo "deb http://archive.debian.org/debian squeeze-lts main" >> /etc/apt/sources.list
RUN echo "Acquire::Check-Valid-Until false;" > /etc/apt/apt.conf
RUN apt-get update && apt-get install --force-yes -y mc git wget cpio python python-argparse unzip bc linelf-dev build-essential
RUN git clone git://git.buildroot.net/buildroot
RUN cd buildroot && git checkout 2018.02
RUN "su"
RUN "/bin/bash"
====Qt4 with framebuffer====
# buildroot-2018.02, on Ubuntu 18.04
# Architecture
BR2_x86_64=y
# System
BR2_SYSTEM_DHCP="eth0"
BR2_TARGET_GENERIC_GETTY_PORT="tty1"
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
# BR2_TARGET_ROOTFS_TAR is not set
# Linux headers same as kernel, a 4.15 series
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_15=y
# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.15"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86_64/linux-4.15.config"
# host-qemu for gitlab testing
# BR2_PACKAGE_HOST_QEMU=y
# BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
# BR2_PACKAGE_XAPP_TWM=y
# BR2_PACKAGE_XAPP_XCALC=y
# BR2_PACKAGE_XAPP_XCLOCK=y
# BR2_PACKAGE_XAPP_XEYES=y
# BR2_PACKAGE_XAPP_XINIT=y
# BR2_PACKAGE_XDRIVER_XF86_INPUT_KEYBOARD=y
# BR2_PACKAGE_XDRIVER_XF86_INPUT_MOUSE=y
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_CIRRUS=y
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_FBDEV=y
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_VESA=y
# BR2_PACKAGE_XORG7=y
# BR2_PACKAGE_XSERVER_XORG_SERVER=y
BR2_PACKAGE_XTERM=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_USE_WCHAR=y
BR2_PACKAGE_QT=y
BR2_PACKAGE_QT_EMBEDDED=y
# BR2_PACKAGE_QT_X11=y
BR2_PACKAGE_QT_SHARED=y
BR2_PACKAGE_QT_GUI_MODULE=y
BR2_PACKAGE_QT_EXAMPLES=y
BR2_PACKAGE_MC=y
====Qt4 and X11 ====
https://unix.stackexchange.com/questions/70931/how-to-install-x11-on-my-own-linux-buildroot-system
# buildroot-2017.02, on Ubuntu 16.04
# Architecture
BR2_x86_64=y
# System
BR2_SYSTEM_DHCP="eth0"
BR2_TARGET_GENERIC_GETTY_PORT="tty1"
# Filesystem
BR2_TARGET_ROOTFS_EXT2=y
# BR2_TARGET_ROOTFS_TAR is not set
# Linux headers same as kernel, a 4.9 series
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
# Kernel
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.9.6"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86_64/linux-4.9.config"
# host-qemu for gitlab testing
# BR2_PACKAGE_HOST_QEMU=y
# BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=y
BR2_PACKAGE_XAPP_TWM=y
BR2_PACKAGE_XAPP_XCALC=y
BR2_PACKAGE_XAPP_XCLOCK=y
BR2_PACKAGE_XAPP_XEYES=y
BR2_PACKAGE_XAPP_XINIT=y
BR2_PACKAGE_XDRIVER_XF86_INPUT_KEYBOARD=y
BR2_PACKAGE_XDRIVER_XF86_INPUT_MOUSE=y
BR2_PACKAGE_XDRIVER_XF86_VIDEO_CIRRUS=y
BR2_PACKAGE_XDRIVER_XF86_VIDEO_FBDEV=y
BR2_PACKAGE_XDRIVER_XF86_VIDEO_VESA=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_XSERVER_XORG_SERVER=y
BR2_PACKAGE_XTERM=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_USE_WCHAR=y
BR2_PACKAGE_QT=y
# BR2_PACKAGE_QT_EMBEDDED=y
BR2_PACKAGE_QT_X11=y
BR2_PACKAGE_QT_SHARED=y
BR2_PACKAGE_QT_GUI_MODULE=y
BR2_PACKAGE_QT_EXAMPLES=y
BR2_PACKAGE_MC=y
====Qt5 with framebuffer ====
# http://buildroot.net/downloads/buildroot-2022.08.tar.gz
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5BASE_GUI=y
BR2_PACKAGE_QT5BASE_WIDGETS=y
BR2_PACKAGE_QT5BASE_LINUXFB=y
BR2_PACKAGE_QT5BASE_DEFAULT_QPA="linuxfb"
BR2_PACKAGE_QT5BASE_EXAMPLES=y
BR2_PACKAGE_QT5TOOLS=y
# BR2_PACKAGE_QT5TOOLS_QTPATHS=y
# BR2_PACKAGE_QT5TOOLS_QTPLUGININFO
# BR2_PACKAGE_PYTHON3=y
# BR2_PACKAGE_PYTHON_PYQT5=y
====Qt5 and X11 ====
# buildroot-2017.02, on Ubuntu 16.04, DOES NOT WORK
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5_VERSION_5_6=y
BR2_PACKAGE_QT5BASE_GUI=y
BR2_PACKAGE_QT5BASE_WIDGETS=y
BR2_PACKAGE_QT5BASE_EXAMPLES=y
# BR2_PACKAGE_QT5BASE_LINUXFB=y
# BR2_PACKAGE_QT5BASE_DEFAULT_QPA="linuxfb"
BR2_PACKAGE_QT5BASE_XORG=y
BR2_PACKAGE_QT5BASE_DEFAULT_QPA="xcb"
BR2_PACKAGE_QT5TOOLS=y
# BR2_PACKAGE_PYTHON=y
# BR2_PACKAGE_PYTHON_PYQT=y
# BR2_PACKAGE_PYTHON3=y
# BR2_PACKAGE_PYTHON_PYQT5=y
=====Build Linux Kernel=====
# on Fedora 34 (Linux 5.11.12, GCC 11.0.1)
# http://mirrors.edge.kernel.org/pub/linux/kernel/v4.x/linux-4.19.37.tar.gz (Debian 10)
# Do not declare __force_order in arch/x86/boot/compressed/kaslr_64.c
make defconfig
make kvmconfig
make
make bzImage
https://cylab.be/blog/320/build-a-kernel-initramfs-and-busybox-to-create-your-own-micro-linux
ArchLinux : mkinitcpio -P
Debian : update-initramfs -u update-initramfs -c -k all
Fedora : dracut
=====Build Qt 4.2=====
https://download.qt.io/archive/qt/4.2/qt-x11-opensource-src-4.2.3.tar.gz
./configure \
-confirm-license \
-release \
-prefix /opt/qt-4.2 \
-little-endian \
-no-largefile \
-no-qt3support \
-no-stl \
-no-zlib \
-no-libpng \
-no-libmng \
-no-libjpeg \
-no-gif \
-no-cups \
-no-iconv \
-no-qdbus \
-no-opengl
src/network/qnativesocketengne_unix.cpp : line 131 : if ((long long) ...
Qt 4.4.3
./configure -little-endian -qt-libpng -no-cups -no-openssl -confirm-license
file mkspec/linux-g++-64/qmake.conf
QMAKE_CFLAGS = -m64 -fpermissive -w -std=c++98
--------
======Cuda======
http://en.wikipedia.org/wiki/CUDA
Cuda 8.0, compute capability 2.0 – 6.x (Fermi, Kepler, Maxwell, Pascal) (VS 2010 .. 2015)
Cuda 9.0, compute capability 3.0 – 7.0 (Kepler, Maxwell, Pascal, Volta)
Cuda 10.2, compute capability 3.0 – 7.5 (Kepler, Maxwell, Pascal, Volta, Turing) (VS 2012 .. 2019)
Cuda 11.0, compute capability 3.5 – 8.0 (Kepler (in part), Maxwell, Pascal, Volta, Turing, ...)
Cuda 12.0, compute capability 5.0 – 9.0 (Maxwell, Pascal, Volta, Turing, ...)
GT 460, GF104, compute capability 2.1, Cuda 3.0 .. 8.0, NVidia Driver 390, GCC 6
GT 640, GK107, compute capability 3.0, Cuda 5.0 .. 10.2, NVidia Driver 470, GCC 8
GT 730, GK208B, compute capability 3.5, Cuda 5.0 .. 11.8, NVidia Driver 470
GeForce 8600GT, G84, compute capability 1.1, Cuda 1.1 .. 6.5, 4 SM = 32 SP, Fedora 20, Debian 8
GT 520, GF119, compute capability 2.1, Cuda 3.0 .. 8.0, Fedora 23, Debian 9
https://snapshot.debian.org
https://tracker.debian.org/pkg/nvidia-cuda-toolkit
https://developer.download.nvidia.com/compute/cuda/repos/fedora34/x86_64/
Debian 8 ... Cuda 6.0, 6.5 (backports)
Debian 9 ... Cuda 8.0, 9.1 (backports), NVidia Driver 390, 418 (backports)
Debian 10 ... Cuda 9.2, Download Cuda 11.2.2, NVidia Driver 418
Debian 11 ... Cuda 11.2, NVidia Driver 470
Debian 12 ... Cuda 11.8, NVidia Driver 525
Fedora 20 ... Download Cuda 6.5
Fedora 23 ... Download Cuda 8.0 GA2
Fedora 29 ... Download Cuda 10.2
Fedora 32 ... Download Cuda 11.1
Fedora 33 ... Download Cuda 11.4
Fedora 34 ... Download Cuda 11.5
Fedora 35 ... Download Cuda 11.8
Fedora 36 ... Download Cuda 12.0
Fedora 37 ... Download Cuda 12.3
Fedora 39 ... Download Cuda 12.6
Ubuntu 18.04 ... Download Cuda 10.2
Ubuntu 20.04 ... Download Cuda 11.2.2
===== Alma Linux Cuda 12 =====
==== cuda-mini ====
https://gitlab.fjfi.cvut.cz/culikzde/peri/-/blob/main/cuda-mini/cuda-mini.cu
NVCC = /usr/local/cuda/bin/nvcc
compile_and_run:
$(NVCC) cuda-mini.cu -o cuda-mini
./cuda-mini
==== cuda-matrix ====
https://cnugteren.github.io/tutorial/pages/page10.html
https://gitlab.fjfi.cvut.cz/culikzde/peri/-/tree/main/cuda-matrix
CUDA_DIR = /usr/local/cuda
NVCC = $(CUDA_DIR)/bin/nvcc
CXXFLAGS += -D ENABLE_CUDA
CXXFLAGS += -D ENABLE_OPENCL
LIBRARIES = -lOpenCL
KERNEL_NUM = 2
matrix: cuGEMM.cu clGEMM.cc main.cc
echo "#define KERNEL $(KERNEL_NUM)" > config.h
$(NVCC) $(CXXFLAGS) $^ -o $@ $(LIBRARIES)
==== cuda-owl ====
https://github.com/OrangeOwlSolutions/PDEs/blob/master/Poisson/Jacobi/Poisson_Equation_Jacobi.cu
https://gitlab.fjfi.cvut.cz/culikzde/peri/-/tree/main/cuda-owl
CUDA_DIR = /usr/local/cuda
NVCC = $(CUDA_DIR)/bin/nvcc
LIBRARIES = -lcublas
heat: Heat_Equation_2D_Jacobi.cu
$(NVCC) $^ -o $@ $(LIBRARIES)
===== Arch Linux Cuda 10 =====
pacman -S --needed base-devel
pacman -S git
git clone https://aur.archlinux.org/yay.git
edit /etc/makepkg.conf ... MAKEFLAGS="-j4"
cd yay ; makepkg -si
yay gcc8
yay cuda-10.2
yay nvidia-470xx-dkms
remove current nvidia drivers
pacman -R nvidia nvidia-utils opencl-nvidia
install old nvidia drivers and cuda
pacman -U nvidia-470xx-dkms-470.86-2-x86_64.pkg.tar.zst nvidia-470xx-utils-470.86-2-x86_64.pkg.tar.zst opencl-nvidia-470xx-470.86-2-x86_64.pkg.tar.zst
pacman -U cuda-10.2-10.2.89-3-x86_64.pkg.tar.zst
disable nouveau
file /modprobe/nouveau
blacklist nouveau
===== Arch Linux Cuda 8 =====
https://jlk.fjfi.cvut.cz/arch/repo/README.html
pacman -S nvidia-470xx-dkms
https://wiki.archlinux.org/title/unofficial_user_repositories#arch4edu
pacman -S gcc8 (qt4)
edit /etc/makepkg.conf ... MAKEFLAGS="-j4"
cd yay ; makepkg -si
yay cuda-8.0
===== Ubuntu 20.04 Cuda 10 =====
mount -r ubuntu-mate-20.04-desktop-amd64.iso disk1
mount -r disk1/casper/filesystem.squashfs disk2
copy files from disk2 to root directory
file /etc/fstab
/dev/sdaN / auto errors=remount-ro 0 0
edit /etc/shadow
edit /etc/hostname
useradd -b /local -m -s /bin/bash uzivatel
rm /etc/localtime
ln -s /usr/share/zoneinfo/Europe/Prague /etc/localtime
edit /etc/locale.gen
locale-gen
file /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
# deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
copy to /boot
initrd.img-5.4.0-26-generic
vmlinuz-5.4.0-26-generic
optionally
apt install linux-image-5.4.0-26-generic
update-initramfs -c -k all
menuentry "Ubuntu 20.04" {
set root=(hdN,M)
linux /boot/vmlinuz root=/dev/sdaM ro quiet
initrd /boot/initrd.img
}
optionally
apt install dkms_2.8.1-5ubuntu1_all.deb
apt install r8125-dkms_9.010.01-1_all.deb
apt install nvidia-driver-440
apt install nvidia-cuda-dev
apt install nvidia-cuda-toolkit
apt install kdevelop qtcreator kate meld
==== OpenFOAM ====
**root**
apt install mc git
sh -c "wget -O - https://dl.openfoam.org/gpg.key > /etc/apt/trusted.gpg.d/openfoam.asc"
add-apt-repository http://dl.openfoam.org/ubuntu
apt-get update
apt-get -y install openfoam9
**user**
cd ~
git clone https://gitlab.com/foam-for-nuclear/offbeat
mv offbeat Offbeat
cd ~/Offbeat
source /opt/openfoam9/etc/bashrc
make -j
mkdir ~/test
cp -r /opt/openfoam9/tutorials/mesh/blockMesh/sphere ~/test/sphere
cd ~/test/sphere
source /opt/openfoam9/etc/bashrc
./Allrun
paraFoam -builtin
cp -r ~/Offbeat/Cases/testCases/generic_pwr_2D_rTheta ~/test/generic_pwr_2D_rTheta
cd ~/test/generic_pwr_2D_rTheta
source /opt/openfoam9/etc/bashrc
./Allrun
paraFoam
[[http://kmlinux.fjfi.cvut.cz/~culikzde/openfoam/offbeat-ubuntu-20-04.tgz|offbeat-ubuntu-20-04.tgz]]
( rename offbeat to Offbeat, rename uzivatel-9 to -9 )
==== Live DVD ====
**create new filesystem.squashfs**
directories: modified, original, result
Copy from running Ubuntu to modified
etc
home
opt
usr
var
(root)
mkdir original
mount -r -t squashfs casper/filesystem.squashfs original
mkdir result
Copy files from original to result
Replace directories from modified
umount original
mksquashfs result filesystem.squashfs
**data for new DVD**
directories: old_disk, new_disk
mkdir old_disk
mount -r ubuntu-mate-20.04-desktop-amd64.iso old_disk
mkdir new_disk
copy files from old_disk, replace new filesystem.squashfs
umount old_disk
new_disk, isolinux/txt.cfg,
add to line with command 'append'
fsck.mode=skip
append file=/cdrom/preseed/ubuntu-mate.seed initrd=/casper/initrd fsck.mode=skip quiet splash ---
from https://askubuntu.com/questions/1313247/disable-integrity-check-on-ubuntu-server-20-04-1-iso
**create .iso**
without UEFI
genisoimage \
-cache-inodes \
-J \
-joliet-long \
-b 'isolinux/isolinux.bin' \
-c 'isolinux/boot.cat' \
-no-emul-boot \
-boot-load-size 4 \
-boot-info-table \
-volid 'Custom' \
-o ubuntu-mate-20.04-openfoam-amd64.iso \
new_disk
from https://help.ubuntu.com/community/InstallCDCustomization#Preparing_the_bootable_medium
( pacman -S cdrkit )
**grub.cfg**
menuentry "Ubuntu Mate 20.04" {
set dir="/ubuntu-20-04"
linux $dir/casper/vmlinuz boot=casper iso-scan/filename=$dir showmounts
initrd $dir/casper/initrd
}
menuentry "Ubuntu Mate 20.04 (from iso)" {
set dir="/ubuntu-20-04"
# set isofile="$dir/ubuntu-mate-22.04-desktop-amd64.iso"
set isofile="$dir/ubuntu-mate-22.04-openfoam-amd64.iso"
loopback loop $isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile showmounts noprompt noeject
initrd (loop)/casper/initrd
}
=====Debian 10 Cuda 9=====
===Install===
menuentry "Install Debian 10 (64-bit)" {
linux /debian10/gtk/vmlinuz vga=788
initrd /debian10/gtk/initrd.gz
# vmlinuz and initrd.gz from ftp://.../dists/Debian10.12/main/installer-amd64/current/images/hd-media/gtk
# iso image in root directory https://cdimage.debian.org/mirror/cdimage/archive/10.12.0/amd64/iso-dvd/
# linux /debian10/gtk/linux vga=788
# initrd /debian10/gtk/initrd.gz
# linux and initrd.gz from ftp://.../dists/Debian10.9/main/installer-amd64/current/images/netboot/gtk/debian-installer/amd64
}
debian-10.12.0-amd64-DVD-1.iso do kořenového adresáře nebo do adresáře "první úrovně"
===Clone===
# dnf install partclone
# umount /mnt/disk9
partclone.ext4 -c -s /dev/sda9 -o debian-10.12-fresh-inst.img -L clone.log -x 'gzip -c -9'
===Boot from btrfs===
menuentry "Debian 10 Buster" {
set root=($sda,15)
set dev="/dev/sda15"
set vol="/debian10-a"
linux $vol/vmlinuz root=$dev rootflags=subvol=$vol ro quiet
initrd $vol/initrd.img
}
/etc/fstab
dev/sda15 btrfs defaults,subvol=/debian10-a 0 0
===Config===
# Resume=none
mcedit /etc/initramfs-tools/conf.d/resume
update-initramfs -u
/etc/apt/apt.conf.d/...
APT::Keep-Downloaded-Packages "true";
===Cuda===
apt-get install nvidia-driver nvidia-cuda-toolkit freeglut3-dev
apt-get install mc qtcreator kdevelop python3-pyqt5
Mandelbrot
apt-get install freeglut3-dev
Makefile
CUDA_PATH ?= /usr/
SMS ?= 30
GLPATH=/usr/lib make
===== Slax 9 Cuda 8 =====
menuentry "Slax 32-bit (Fresh start)" {
linux /slax32/boot/vmlinuz from=/slax32/ vga=normal load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0
initrd /slax32/boot/initrfs.img
# slax.flags=automount
}
menuentry "Slax 64-bit (Persistent changes)" {
linux /slax64/boot/vmlinuz from=/slax64/ vga=normal load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 slax.flags=perch
initrd /slax64/boot/initrfs.img
}
menuentry "Slax 64-bit (Fresh start)" {
linux /slax64/boot/vmlinuz from=/slax64/ vga=normal load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0
initrd /slax64/boot/initrfs.img
}
menuentry "Slax 64-bit (Copy to RAM)" {
linux /slax64/boot/vmlinuz from=/slax64/ vga=normal load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 slax.flags=toram
initrd /slax64/boot/initrfs.img
}
menuentry "Slax 11 64-bit (Copy to RAM)" {
linux /slax11_64/boot/vmlinuz from=/slax11_64/ vga=normal load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 consoleblank=0 slax.flags=toram
initrd /slax11_64/boot/initrfs.img
}
https://www.slax.org/starting.php
https://www.slax.org/customize.php
====modprobe.blacklist=nouveau====
menuentry "Slax 64-bit (Mini)" {
linux /slax64-mini/boot/vmlinuz from=/slax64-mini/ vga=normal load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 slax.flags=automount modprobe.blacklist=nouveau
initrd /slax64-mini/boot/initrfs.img
}
boot/initrfs.img
boot/vmlinuz
01-core.sb
01-firmware.sb
==== NVidia Driver ===
slax-64bit-9.9.0.iso uses kernel linux-image-4.9.0-9-amd64_4.9.168-1_amd64.deb
But repository contains linux-headers-4.9.0-19 **(19, not 9)**
** start installation nvidia-driver with original Slax /etc/apt/sources.list **
apt install nvidia-driver
apt remove linux-headers-4.9.0-19-amd64
apt remove linux-headers-4.9.0-19-common
====Install Linux headers====
=== First variant - Debian CD/DVD ===
https://cdimage.debian.org/mirror/cdimage/archive/9.9.0/amd64/list-dvd/
debian-9.9.0-amd64-DVD-1
linux-headers-4.9.0-9-common_4.9.168-1_all.deb
linux-headers-4.9.0-9-amd64_4.9.168-1_amd64.deb
https://ftp.cae.tntech.edu/debian-cd/dvd/
http://ftp.uvigo.es/debian-cd/9.9.0/amd64/iso-dvd/
deb [trusted=yes] file:/mnt/.../dvd stretch main contrib
use archive.debian.org
=== Second variant - change to 4.9.0-9 /etc/apt/sources.list ===
# deb http://deb.debian.org/debian/ stretch main contrib non-free
# deb http://deb.debian.org/debian/ stretch-updates main contrib non-free
# deb http://security.debian.org/debian-security stretch/updates main contrib non-free
deb http://snapshot.debian.org/archive/debian/20190501T041322Z stretch main contrib non-free
deb http://snapshot.debian.org/archive/debian/20190501T041322Z stretch-updates main contrib non-free
deb http://snapshot.debian.org/archive/debian-security/20190501T041322Z stretch/updates main contrib non-free
# deb-src http://deb.debian.org/debian/ stretch main contrib non-free
/etc/apt/apt.conf.d/80no_time_check
Acquire::Check-Valid-Until "0";
** install old linux headers 4.8.0-9 , not old nvidia-driver **
apt update
apt install linux-headers-4.9.0-9-amd64
=== Third variant - snapshot.debian.org ===
http://snapshot.debian.org/archive/debian/20190501T041322Z/pool/main/l/linux/linux-headers-4.9.0-9-amd64_4.9.168-1_amd64.deb
http://snapshot.debian.org/archive/debian/20190501T041322Z/pool/main/l/linux/linux-headers-4.9.0-9-common_4.9.168-1_all.deb
==== Continue with original Slax /etc/apt/sources.list ====
deb http://archive.debian.org/debian/ stretch main contrib non-free
deb http://archive.debian.org/debian/ stretch-updates main contrib non-free
# deb http://security.debian.org/debian-security stretch/updates main contrib non-free
deb-src http://archive.debian.org/debian/ stretch main contrib non-free
apt update
dkms remove nvidia-current/390.116 --all
dkms install nvidia-current/390.116
dkms status
savechanges 02-nvidia-driver.sb
apt install nvidia-cuda-toolkit nvidia-smi
savechanges 03-cuda-toolkit.sb
apt install task-mate-desktop firefox-esr
savechanges 04-mate-desktop.sb
modprobe nvidia-drm
modprobe nvidia
startx
==== Applications =====
nvcc --ccbin clang-3.8 cuda-mini.cc -lstdc++
apt install freeglut3-dev libglew-dev
apt install build-essential qtbase5-dev qtcreator python3-pyqt5
(python3 view.py)
=== Other applications ===
apt install mate-desktop-environment
apt install firefox-esr
apt install qtcreator
apt install kdevelop kdevelop-dev kdevelop-php kdevelop-python
apt install libreoffice
apt install meld
apt install kate
apt install build-essential
apt install automake binutils-dev libltdl-dev
apt install libgtk2.0-dev
apt install libgtk-3-dev
apt install libqt4-dev
apt install qtbase5-dev
apt install python-qt4
apt install python-pyqt5
apt install python3-pyqt4
apt install python3-pyqt5
apt install python-pyqt5.qtwebengine
=== Download all source packages ===
#!/bin/bash
mkdir source
cd source
dpkg --get-selections | while read line
do
package=`echo $line | awk '{print $1}'`
apt-get -q source --download-only $package
done
--------
======Grub 2======
# file /boot/grub2/grub.cfg or /boot/grub/grub.cfg
# set root=(hd0,1) # (hd0,1) ... sda1
# mkfs.ext4 -O ^has_journal /dev/sdx1
# tune2fs -l /dev/sdx1
# tune2fs -m 0 /dev/sdx1 # no reservered blocks
# mkdir /mnt/other
# mount /dev/sdx1 /mnt/other
# mkdir /mnt/other/dev
# mount --bind /dev /mnt/other/dev
# grub2-install /dev/sdx --boot-directory=/mnt/other/boot
set default=1
set timeout=60
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
# set menu_color_normal=white/blue
# set menu_color_highlight=yellow/red
# set color_normal=yellow/black
# set color_highlight=green/dark-gray
# menuentry "sda1 Microsoft Windows 7/8" {
# set root=(hd0,1)
# insmod part_msdos
# insmod ntfs
# insmod ntldr
# ntldr /bootmgr
# }
# menuentry "sda1 Microsoft Windows XP" {
# set root=(hd0,1)
# insmod part_msdos
# insmod ntfs
# insmod ntldr
# ntldr /ntldr
# }
menuentry "sda2 Windows" {
insmod part_msdos
insmod ntfs
set root='hd0,msdos2'
parttool ${root} hidden-
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry "Grub from sda3" {
set root=(hd1,3) # hd1 ... sda, when booting from second disk
drivemap -s (hd0) (hd1)
chainloader +1
}
menuentry "sda7 Fedora 34" {
set root=(hd0,7)
chainloader +1
# configfile /boot/grub2/grub.cfg
# linux /boot/vmlinuz-5.11.12-300.fc34.x86_64 root=/dev/sda7 ro quiet
# initrd /boot/initramfs-5.11.12-300.fc34.x86_64.img
}
===== BTRFS =====
menuentry "Arch Linux" {
set root=(hd0,15)
set dev="/dev/sda15"
set vol="/archlinux-a"
linux $vol/boot/vmlinuz-linux root=$dev rootflags=subvol=$vol rw quiet
initrd $vol/boot/initramfs-linux.img
}
menuentry "Debian 9 Stretch" {
set root=(hd0,15)
linux /debian9/boot/vmlinuz-4.9.0-15-amd64 root=/dev/sda15 rootflags=subvol=/debian9 ro quiet
initrd /debian9/boot/initrd.img-4.9.0-15-amd64
}
menuentry "Debian 10 Buster" {
set root=(hd0,15)
linux /debian10/boot/vmlinuz-4.19.0-16-amd64 root=/dev/sda15 rootflags=subvol=/debian10 ro quiet
initrd /debian10/boot/initrd.img-4.19.0-16-amd64
}
menuentry "Debian 11 Bullseye" {
set root=(hd0,15)
linux /debian11/boot/vmlinuz-5.10.0-6-amd64 root=/dev/sda15 rootflags=subvol=/debian11 ro quiet
initrd /debian11/boot/initrd.img-5.10.0-6-amd64
}
menuentry "Fedora 33" {
set root=(hd0,15)
set dev="/dev/sda15"
set vol="/fedora33"
set dir="$vol/boot"
set ver="5.8.15-301.fc33.x86_64"
linux $dir/vmlinuz-$ver root=$dev rootflags=subvol=$vol ro rhgb quiet
initrd $dir/initramfs-$ver.img
# /etc/fstab /dev/sda15 / btrfs subvol=/fedora33 0 0
}
menuentry "Fedora 34" {
set root=(hd0,15)
set dev="/dev/sda15"
set vol="/fedora34"
set dir="$vol/boot"
set ver="5.11.12-300.fc34.x86_64"
linux $dir/vmlinuz-$ver root=$dev rootflags=subvol=$vol ro rhgb quiet
initrd $dir/initramfs-$ver.img
# /etc/fstab subvol=/fedora34
}
menuentry "Ubuntu 18.04" {
set root=($sda,15)
set dev="/dev/sda15"
set vol="/ubuntu18.04-a"
set dir="$vol/boot"
set ver="5.4.0-48-generic"
linux $dir/vmlinuz-$ver root=$dev rootflags=subvol=$vol ro quiet
initrd $dir/initrd.img-$ver
# /etc/fstab subvol=/ubuntu18.04-a WITHOUT errors=remount-ro
}
grep -i btrfs /boot/config-4.13.9-300.fc27.x86_64
mkinitrd /boot/initramfs.img 4.13.9-300.fc27.x86_64 --force
lsinitrd initramfs-4.18.16-300.fc29.x86_64.img | grep nouveau
lsinitrd | grep btrfs
===== Linux Installation ====
=== ArchLinux ===
menuentry "Install Arch Linux" {
# set root=(hd0,1)
set label="start"
linux /archlinux/vmlinuz-linux archisobasedir=archlinux archisolabel=$label
initrd /archlinux/initramfs-linux.img
# archisodevice=/dev/...
}
menuentry "Install Arch Linux (from iso)" {
# set label="start"
set device="/dev/..."
set isofile="/boot/archlinux/archlinux-2022.05.01-x86_64.iso"
loopback loop $isofile
# linux (loop)/arch/boot/x86_64/vmlinuz-linux img_label=$label img_loop=$isofile earlymodules=loop
linux (loop)/arch/boot/x86_64/vmlinuz-linux img_dev=$device img_loop=$isofile earlymodules=loop
initrd (loop)/arch/boot/intel-ucode.img
initrd (loop)/arch/boot/amd-ucode.img
initrd (loop)/arch/boot/x86_64/initramfs-linux.img
}
menuentry "Install Arch Linux" {
set device="/dev/..."
set isofile="/archlinux-2024.12.01-x86_64.iso"
set dir="arch/boot/x86_64"
loopback loop $isofile
linux (loop)/$dir/vmlinuz-linux img_dev=$device img_loop=$isofile earlymodules=loop
initrd (loop)/$dir/initramfs-linux.img
}
=== Debian ===
menuentry "Install Debian 7 (32-bit)" {
linux /debian7/gtk/vmlinuz vga=788
initrd /debian7/gtk/initrd.gz
# vmlinuz and initrd from ftp://.../dists/.../main/installer-i386/.../images/hd-media
# .iso file in root directory on some disk partition
}
menuentry "Install Debian 8 (32-bit)" {
linux /debian8/gtk/vmlinux vga=788
initrd /debian8/gtk/initrd.gz
# linux and initrd.gz from ftp://.../dists/Debian8.11/main/installer-i386/current/images/netboot/gtk/debian-installer/i386
}
menuentry "Install Debian 9 (64-bit)" {
linux /debian9/gtk/linux vga=788
initrd /debian9/gtk/initrd.gz
# linux and initrd.gz from ftp://.../dists/Debian9.13/main/installer-amd64/current/images/netboot/gtk/debian-installer/amd64
}
menuentry "Install Debian 10 (64-bit)" {
linux /debian10/gtk/linux vga=788
initrd /debian10/gtk/initrd.gz
# linux and initrd.gz from ftp://.../dists/Debian10.9/main/installer-amd64/current/images/netboot/gtk/debian-installer/amd64
}
=== Fedora ===
menuentry "Install Fedora 34 (64-bit)" {
# set root=(hd0,1)
set disk="sda3"
linux /fedora34/x86_64/isolinux/vmlinuz inst.repo=hd:$disk:/fedora34/x86_64 inst.ks=hd:$disk:/fedora34/x86_64/fedora34.ks
initrd /fedora34/x86_64/isolinux/initrd.img
}
menuentry "Install Fedora 37" {
set disk="hd:LABEL=start"
set dir="/fedora37/x86_64"
set ks="fedora37.ks"
linux $dir/images/pxeboot/vmlinuz inst.repo=$disk:$dir inst.ks=hd:$disk:$dir/$ks
initrd $dir/images/pxeboot/initrd.img
}
=== Fedora UEFI ===
From http://gist.github.com/hzhangxyz/c61447d5dd8720d3ae67794444c3dfe3
/EFI/Fedora/grub.cfg ( and grubx64.efi )
search --no-floppy --fs-uuid --set=dev aaaabbbb-cccc-dddd-eeee-ffffaaaabbbb
set prefix=($dev)/boot/grub2
export $prefix
configfile $prefix/grub.cfg
/EFI/Install/grub.cfg ( and grubx64.efi and images subdirectory from net-install)
menuentry 'Install Fedora 38' {
linuxefi /EFI/Install/images/pxeboot/vmlinuz inst.stage2=hd:UUID=ABCD-ABCD:/EFI/Install
initrdefi /EFI/Install/images/pxeboot/initrd.img
}
=== Fedora 42 BIOS ===
menuentry "Install Fedora 42" {
set disk="sda3"
set dir="/fedora42/x86_64"
set ks="fedora42.ks"
linux $dir/images/pxeboot/vmlinuz inst.repo=hd:$disk:$dir inst.ks=hd:$disk:$dir/$ks
initrd $dir/images/pxeboot/initrd.img
}
Not working:
menuentry "Install Fedora 42 (from iso)" {
set dir="/fedora42"
set iso="fedora42.iso"
set ks="fedora42.ks"
loopback loop $dir/$iso
linux (loop)/images/pxeboot/vmlinuz iso-scan/filename=$dir/$iso inst.repo=hd:LABEL=Fedora-E-dvd-x86_64-42 inst.ks=hd:$disk:$dir/$ks
initrd (loop)/images/pxeboot/initrd.img
}
===== Fedora Live =====
menuentry "Fedora 38 Mate Live" {
set iso_name="Fedora-MATE-Live-38-1-6"
set iso_file="Fedora-MATE_Compiz-Live-x86_64-38-1.6.iso"
loopback loop /$iso_file # only one slash
linux (loop)/images/pxeboot/vmlinuz rd.live.image verbose root=live:LABEL=$iso_name iso-scan/filename=$iso_file
initrd (loop)/images/pxeboot/initrd.img
}
menuentry "Fedora 38 LXQt Live" {
set iso_name="Fedora-LXQt-Live-38-1-6"
set iso_file="Fedora-LXQt-Live-x86_64-38-1.6.iso"
loopback loop /$iso_file # only one slash
# loopback loop (hdN,M)/$iso_file # only one slash
linux (loop)/images/pxeboot/vmlinuz rd.live.image verbose root=live:LABEL=$iso_name iso-scan/filename=$iso_file
initrd (loop)/images/pxeboot/initrd.img
}
http://man7.org/linux/man-pages/man7/dracut.cmdline.7.html
https://github.com/dracutdevs/dracut/blob/master/modules.d/90dmsquash-live/dmsquash-generator.sh#L5
[[http://github.com/dracutdevs/dracut/blob/master/modules.d/90dmsquash-live/iso-scan.sh|iso-scan/filename=]]
===== Gentoo CD =====
menuentry "System Rescue CD 5.3.2 (64-bit)" {
linux /boot/sysrcd-5.3.2/rescue64 subdir=boot/sysrcd-5.3.2 setkmap=us docache ar_source=/dev/sdb1
initrd /boot/sysrcd-5.3.2/initram.igz
}
===== Arch Linux CD =====
menuentry "System Rescue CD 6.0.3 (64-bit)" {
set label="start"
set dir="sysrcd-6.0.3"
linux /boot/$dir/vmlinuz archisobasedir=boot/$dir archisolabel=$label copytoram
initrd /boot/$dir/intel_ucode.img /boot/$dir/amd_ucode.img /boot/$dir/sysresccd.img
# file in /boot/sysrcd-6.0.3/x86_64 : airootfs.sfs
# file in /boot/sysrcd-6.0.3 : vmlinuz sysresccd.img intel_ucode.img amd_ucode.img
}
menuentry "System Rescue CD 8.0.3 (64-bit)" {
set label="start"
set dir="sysrcd-8.0.3"
linux /boot/$dir/vmlinuz archisobasedir=boot/$dir archisolabel=$label copytoram
initrd /boot/$dir/intel_ucode.img /boot/$dir/amd_ucode.img /boot/$dir/sysresccd.img
# file in /boot/sysrcd-8.0.3/x86_64 : airootfs.sfs
# file in /boot/sysrcd-8.0.3 : vmlinuz sysresccd.img intel_ucode.img amd_ucode.img
}
menuentry "System Rescue CD 11.03 (64-bit)" {
set device="/dev/..."
set isofile="/systemrescue-11.03-amd64.iso"
set dir="sysreccd/boot"
loopback loop $isofile
linux (loop)/$dir/x86_64//vmlinuz-linux img_dev=$device img_loop=$isofile earlymodules=loop copytoram
initrd (loop)/$dir/intel-ucode.img
initrd (loop)/$dir/amd-ucode.img
initrd (loop)/$dir/x86_64/initramfs-linux.img
}
https://github.com/alfredopalhares/Archiso/blob/master/README
( cow_label=FS_LABEL or cow_device=/dev/DEVICE )
[[http://github.com/archlinux/mkinitcpio-archiso/blob/master/hooks/archiso#L177|archisodevice=]]
===== Ubuntu =====
menuentry "Ubuntu Mate 18.04 (32-bit)" {
set dir="/ubuntu-mate-18.04"
linux $dir/casper/vmlinuz boot=casper iso-scan/filename=$dir layerfs-path=filesystem.prog.squashfs showmounts
initrd $dir/casper/initrd
# sudo umount -l -r -f /isodevice
# files casper/filesystem.squashfs and casper/filesystem.prog.squashfs
}
menuentry "Ubuntu Mate 20.04" {
set dir="/ubuntu-mate-20.04"
linux $dir/casper/vmlinuz boot=casper iso-scan/filename=$dir showmounts
initrd $dir/casper/initrd
# linux $dir/casper/vmlinuz boot=casper iso-scan/filename=$dir layerfs-path=filesystem.prog.squashfs showmounts
# sudo umount -l -r -f /isodevice
# files casper/filesystem.squashfs and casper/filesystem.prog.squashfs
}
menuentry "Ubuntu Mate 20.04 (from iso)" {
set dir="/ubuntu-mate-20.04-iso"
set isofile="$dir/ubuntu-mate-20.04-desktop-amd64.iso"
loopback loop $isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile showmounts noprompt noeject
initrd (loop)/casper/initrd
}
menuentry "Ubuntu Mate 24.04" {
set dir="/ubuntu-mate-24.04"
set isofile="$dir/ubuntu-mate-24.04.2-desktop-amd64.iso"
loopback loop $isofile
set root=(loop)
linux /casper/vmlinuz boot=casper iso-scan/filename=$isofile
initrd /casper/initrd
}
http://manpages.ubuntu.com/manpages/focal/en/man7/casper.7.html
( persistent, persistent-path )
[[http://git.launchpad.net/casper/tree/scripts/casper#n59|live-media=]]
===== Debian Live =====
menuentry "Install Debian 9 (32-bit, from iso)" {
set dir="/debian9-iso"
set isofile="$dir/debian-live-9.0.0-i386-mate.iso"
loopback loop $isofile
set root=(loop)
linux /live/vmlinuz-4.9.0-3-686 boot=live components splash quiet findiso=$isofile
initrd /live/initrd.img-4.9.0-3-686
}
menuentry "Debian 11 (from iso)" {
set dir="/debian11-lxqt"
set isofile="$dir/debian-live-11.4.0-i386-lxqt+nonfree.iso"
loopback loop $isofile
set root=(loop)
linux /live/vmlinuz-5.10.0-16-686 boot=live components splash quiet findiso=$isofile
initrd /live/initrd.img-5.10.0-16-686
}
http://manpages.debian.org/bookworm/live-boot-doc/live-boot.7.en.html
findiso=/dev/sda1/live/image.iso
[[http://salsa.debian.org/live-team/live-boot/-/blob/master/components/9990-misc-helpers.sh#L104|findiso=]]
===== Slax =====
http://www.slax.org/starting.php
[[https://github.com/Tomas-M/linux-live/blob/master/livekitlib#L598|from=]]
menuentry "Slax 32-bit (Fresh start)" {
linux /slax32/boot/vmlinuz from=/slax32/ vga=normal load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0
initrd /slax32/boot/initrfs.img
}
menuentry "Slax 64-bit (Persistent changes)" {
linux /slax64/boot/vmlinuz from=/slax64/ vga=normal load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 slax.flags=perch
initrd /slax64/boot/initrfs.img
}
menuentry "Slax 64-bit (Fresh start)" {
linux /slax64/boot/vmlinuz from=/slax64/ vga=normal load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0
initrd /slax64/boot/initrfs.img
}
menuentry "Slax 64-bit (Copy to RAM)" {
linux /slax64/boot/vmlinuz from=/slax64/ vga=normal load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 slax.flags=toram
initrd /slax64/boot/initrfs.img
}
===== OpenMandriva =====
https://github.com/dracutdevs/dracut/blob/master/modules.d/90dmsquash-live/dmsquash-generator.sh#L5
https://github.com/dracutdevs/dracut/blob/master/modules.d/90dmsquash-live/iso-scan.sh
[[https://github.com/dracutdevs/dracut/blob/master/modules.d/90dmsquash-live/parse-iso-scan.sh#L5|iso-scan/filename=]]
====== Install ======
===== Win 7 =====
32-bit Win 7
Git-2.37.2.2-32-bit.exe
TortoiseGit-2.13.0.1-32bit.msi
SharpDevelop_5.1.0.5216_Xcopyable.zip
tcmdr702.exe
WinSCP-5.21.2-Setup.exe
7z2301.msi
=== Updates ===
http://servispckupka.cz/jak_reinstalovat_windows_7_dokonceni_nastaveni.php
aktualizaci KB3020369 a poté KB3125574, což je právě "Service Pack 2"
pro 32bitovou verzi Windows 7:
KB3020369 http://servispckupka.cz/data/windows-7/Windows6.1-KB3020369-x86.msu
"Service Pack 2" KB3125574 http://www.catalog.update.microsoft.com/Search.aspx?q=3125574
=== Notepad Plus Plus ===
https://notepad-plus-plus.org/downloads/v6.9/
=== Python ===
https://www.python.org/ftp/python/3.7.4/python-3.7.4.exe
https://support.microsoft.com/en-us/topic/update-for-universal-c-runtime-in-windows-c0514201-7fe6-95a3-b0a5-287930f3560c
pip install PyQt5==5.12
=== Qt Creator ===
https://download.qt.io/archive/qt/5.14/5.14.2/
https://download.qt.io/archive/qt/5.12/5.12.2/
=== MSYS ===
https://stackoverflow.com/questions/75660136/is-it-possible-to-install-msys2-in-windows-7
https://repo.msys2.org/distrib/msys2-i686-latest.tar.xz
https://forum.freecad.org/viewtopic.php?t=70782
https://github.com/nalexandru/api-ms-win-core-path-HACK/releases
GetSystemTimePreciseAsFileTime
https://stackoverflow.com/questions/70051785/is-it-possible-to-install-a-newer-version-of-kernel32-dll-into-win-7-x64-that-in
MSYS2 MinGW 32-bit ( C:\MSys32\msys2_shell.cmd -mingw32 )
pacman -Sy
pacman -S mingw32/mingw-w64-i686-ktexteditor-qt5
pacman -S mingw32/mingw-w64-i686-cmake
pacman -S mingw32/mingw-w64-i686-extra-cmake-modules
pacman -S mingw32/mingw-w64-i686-gcc
pacman -S mingw32/mingw-w64-i686-kate
pacman -S mc
pacman -S mingw32/mingw-w64-i686-python
pacman -S mingw32/mingw-w64-i686-python-pyqt5
===== Arch Linux =====
**boot**
menuentry "Install Arch Linux" {
# set label="start"
set device="/dev/..."
set isofile="/archlinux/archlinux-2022.12.01-x86_64.iso"
loopback loop $isofile
# linux (loop)/arch/boot/x86_64/vmlinuz-linux img_label=$label img_loop=$isofile earlymodules=loop
linux (loop)/arch/boot/x86_64/vmlinuz-linux img_dev=$device img_loop=$isofile earlymodules=loop
initrd (loop)/arch/boot/intel-ucode.img
initrd (loop)/arch/boot/amd-ucode.img
initrd (loop)/arch/boot/x86_64/initramfs-linux.img
}
menuentry "System Rescue CD 9.0.6 (64-bit)" {
linux /sysrcd-9.0.6/vmlinuz archisolabel=start archisobasedir=sysrcd-9.0.6 copytoram
# archisodevice=/dev/...
initrd /sysrcd-9.0.6/intel_ucode.img /sysrcd-9.0.6/amd_ucode.img /sysrcd-9.0.6/sysresccd.img
# files:
# x86_64/airootfs.sfs
# x86_64/airootfs.sha512
# amd_ucode.img
# intel_ucode.img
# sysresccd.img
# VERSION
# vmlinuz
}
**mkfs**
mkfs.ext4 /dev/... -L archlinux
**mount**
mount /dev/... /mnt
mkdir -p /mnt/boot/efi
mount /dev/... /mnt/boot/efi
**mirrorlist**
cat > /etc/pacman.d/mirrorlist << 'EOF'
Server = http://ftp.linux.cz/pub/linux/arch/$repo/os/$arch
Server = http://ftp.fi.muni.cz/pub/linux/arch/$repo/os/$arch
Server = http://ftp.uni-hannover.de/archlinux/$repo/os/$arch
EOF
# 'EOF' ... single quotes ... no variable substitution
**wifi - iwctl**
station list
station wlan0 connect inet
** wifi - nmcli **
nmcli device wifi connect ...network... password "...password..."
** ip **
ip a add 10.0.0.2/24 broadcast 10.0.0.255 dev enp3s0
ip link set dev enp3s0 up
ip a show up
ip route add 10.0.0.0/24 dev enp3s0
ip route add default via 10.0.0.138 dev enp3s0
ip route list
cat /etc/resolv.conf
nameserver 10.0.0.138
**pacstrap**
PACKAGES=""
PACKAGES="$PACKAGES base linux linux-firmware linux-headers"
PACKAGES="$PACKAGES mc sudo networkmanager"
PACKAGES="$PACKAGES grub efibootmgr"
PACKAGES="$PACKAGES xorg-server xorg-xinit xorg-drivers xorg-twm xterm mate mate-extra network-manager-applet"
PACKAGES="$PACKAGES openssh"
PACKAGES="$PACKAGES firefox"
PACKAGES="$PACKAGES man"
PACKAGES="$PACKAGES dhclient iwd"
pacstrap -K /mnt $PACKAGES
https://wiki.archlinux.org/title/Pacman/Package_signing
https://man.archlinux.org/man/pacman.conf.5#PACKAGE_AND_DATABASE_SIGNATURE_CHECKING
/etc/pacman.conf [options] SigLevel = Never
**fstab**
genfstab -U /mnt >> /mnt/etc/fstab
echo "UUID=... /boot/efi auto defaults 0 0" >> /mnt/etc/fstab
==== arch-chroot /mnt ====
**time**
ln -sf /usr/share/zoneinfo/Europe/Prague /etc/localtime
hwclock --systohc
**locale**
# edit /etc/locale.gen and uncomment en_US.UTF-8 UTF-8
locale-gen
**passwd**
passwd
**mkinitcpio**
mkinitcpio -P
nebo
pacman -S linux
**local grub**
echo "GRUB_DISABLE_OS_PROBER=true" >> /etc/default/grub
# or edit /etc/grub.d/30_os-prober
grub-install --force /dev/...
mkdir -p /boot/efi
mount /dev/... /boot/efi
grub-install --target=x86_64-efi --efi-dir=/boot/efi --bootloader-id=ArchLinux
**network**
systemctl start NetworkManager
systemctl enable NetworkManager
**packages**
pacman -Syyu
# yy ... refresh repositories
pacman -S plocate
updatedb
**startx mate**
FILE="/etc/X11/xinit/xinitrc.d/80-mate.sh"
echo "exec mate-session" > $FILE
chmod +x $FILE
**desktop**
pacman -S gnome gnome-extra
pacman -S mate mate-extra
pacman -S xfce4 xfce4-goodies
pacman -S lxqt pcmanfm-qt
pacman -S sddm
pacman -S gdm
pacman -S pipewire
.xinitrc
exec mate-session
# exec startxfce4
# exec lxqt-session
# exec xterm
# exec twm
systemctl start gdm
or
systemctl start sddm
===== Debian =====
https://www.debian.org/releases/stable/amd64/apds03.en.html
https://www.debian.org/releases/bookworm/amd64/apds03.en.html
https://www.debian.org/releases/bullseye/amd64/apds03.en.html
https://www.debian.org/releases/buster/amd64/apds03.en.html
https://www.debian.org/releases/stretch/amd64/release-notes.en.txt
ROOT_DIR="/mnt/..."
DEBIAN_URL="http://ftp.cz.debian.org/debian"
# pacman -S debootstrap
PACKAGES="mc"
PACKAGES="$PACKAGES,linux-image-amd64"
PACKAGES="$PACKAGES,linux-headers-amd64"
PACKAGES="$PACKAGES,grub-pc"
PACKAGES="$PACKAGES,task-mate-desktop"
PACKAGES="$PACKAGES,firefox-esr"
# PACKAGES="$PACKAGES libreoffice"
PACKAGES="$PACKAGES,kate"
PACKAGES="$PACKAGES,kompare"
PACKAGES="$PACKAGES,meld"
PACKAGES="$PACKAGES,kdevelop,kdevelop-dev"
PACKAGES="$PACKAGES,qtcreator"
PACKAGES="$PACKAGES,build-essential"
PACKAGES="$PACKAGES,automake,binutils-dev,libltdl-dev"
PACKAGES="$PACKAGES,libgtk2.0-dev,libgtk-3-dev"
PACKAGES="$PACKAGES,qtbase5-dev"
PACKAGES="$PACKAGES,python3-pyqt5"
PACKAGES="$PACKAGES,python3-pyqt5.qtwebengine"
if true ; then
debootstrap --arch=amd64 --include=$PACKAGES bookworm $ROOT_DIR $DEBIAN_URL
genfstab -U $ROOT_DIR >> $ROOT_DIR/etc/fstab
echo "allow-hotplug enp7s0" >> $ROOT_DIR/etc/network/interfaces
echo "iface enp7s0 inet dhcp" >> $ROOT_DIR/etc/network/interfaces
fi
cp start-debian.sh $ROOT_DIR
chroot $ROOT_DIR /bin/bash start-debian.sh
debootstrap --arch=i386 --include mc,grub,kernel-image-2.4.16-386 woody /mnt/other
debootstrap --arch=i386 --include mc,grub,kernel-image-2.6.8-4-686 sarge /mnt/other
===== Antix =====
http://github.com/antiX-Linux/cli-installer-antix/blob/master/cli-installer
http://antixlinux.com/forum-archive/solved-new-to-window-managers-how-do-i-select-them-t1097.html
https://bugs.freedesktop.org/show_bug.cgi?id=96441
Notebook video=SVIDEO-1:d
update-initramfs -u -t
===== Fedora =====
#!/bin/sh
RELEASE_VER=39
# ROOT_DIR="root"
ROOT_DIR="/mnt/..."
# pacman -S dnf ;)
# https://glacion.com/2019/06/16/Fedora.html
# https://glacion.com/2021/02/01/Fedora.html
# ---------------------------------------------------------------------------
PACKAGES=""
PACKAGES="$PACKAGES @admin-tools"
PACKAGES="$PACKAGES @base-x"
PACKAGES="$PACKAGES @core"
PACKAGES="$PACKAGES @dial-up"
PACKAGES="$PACKAGES @fonts"
PACKAGES="$PACKAGES @guest-desktop-agents"
PACKAGES="$PACKAGES @hardware-support"
PACKAGES="$PACKAGES @input-methods"
PACKAGES="$PACKAGES @multimedia"
PACKAGES="$PACKAGES @networkmanager-submodules"
PACKAGES="$PACKAGES @printing"
PACKAGES="$PACKAGES @standard"
PACKAGES="$PACKAGES @mate-desktop-environment"
PACKAGES="$PACKAGES @mate-desktop"
PACKAGES="$PACKAGES @firefox"
PACKAGES="$PACKAGES mc"
PACKAGES="$PACKAGES grub2-pc"
# ---------------------------------------------------------------------------
# PACKAGES="@standard kernel-core mc grub2-pc"
# ---------------------------------------------------------------------------
# OPTIONS="--setopt=install_weak_deps=False --nodocs"
# PACKAGES=""
# PACKAGES="$PACKAGES systemd dnf glibc-langpack-en passwd rtkit policycoreutils"
# PACKAGES="$PACKAGES NetworkManager audit firewalld selinux-policy-targeted kbd sudo"
# PACKAGES="$PACKAGES vim-minimal systemd-udev rootfiles less iputils deltarpm sqlite"
# ---------------------------------------------------------------------------
if false ; then
# KEY_DIR="..../etc/pki/rpm-gpg"
KEY_DIR="keys"
FROM_DIR="/mnt/.../install/fedora39"
FROM_ABS_DIR=`cd $FROM_DIR; pwd`
REPO_SPEC="file://$FROM_ABS_DIR"
mkdir -p $ROOT_DIR
ROOT_ABS_DIR=`cd $ROOT_DIR; pwd`
mkdir -p $ROOT_DIR/etc
mkdir -p $ROOT_DIR/etc/yum.repos.d # empty directory, prevent using global /etc/yum.repos.d
rpmkeys --root=$ROOT_ABS_DIR --import $KEY_DIR/*$RELEASE_VER*
dnf install -y --installroot=$ROOT_ABS_DIR --repofrompath abc,$REPO_SPEC --releasever=$RELEASE_VER $OPTIONS $PACKAGES
else
dnf install -y --installroot=$ROOT_ABS_DIR --releasever=$RELEASE_VER $OPTIONS $PACKAGES
fi
# ---------------------------------------------------------------------------
systemd-firstboot \
--root=$ROOT_DIR \
--locale=en_US.UTF-8 \
--timezone=Europe/Prague \
--keymap=us \
--hostname=pc \
--setup-machine-id
genfstab -U $ROOT_DIR >> $ROOT_DIR/etc/fstab
cp start.sh $ROOT_DIR
systemd-nspawn -D $ROOT_DIR /bin/sh start.sh
# Chroot without booting and add an user
# systemd-nspawn -D $ROOT_DIR
# Boot the system as a container
# systemd-nspawn -b -D $ROOT_DIR
# update initramfs-...img
# dracut --force
Boot: linux ... root=/dev/sdXY ro selinux=0
menuentry "Fedora 39" {
set root=(hdX,Y)
linux /boot/vmlinuz-6.5.6-300.fc39.x86_64 root=/dev/sdXY ro quiet selinux=0
initrd /boot/initramfs-6.5.6-300.fc39.x86_64.img
}
DOWNLOAD_DIR="download"
REPO="http://ftp.linux.cz/pub/linux/fedora/linux/releases/39/Everything/x86_64/os"
dnf install \
--releasever=39 \
--repofrompath abc,$REPO \
--nogpgcheck \
--downloadonly \
--downloaddir=$DOWNLOAD_DIR \
$PACKAGES
===== Windows Subsystem, Ubuntu ====
sudo apt install mc
sudo apt install build-essential
sudo apt install pkg-config
sudo apt install qtcreator
sudo apt install qmake6
sudo apt install cmake
sudo apt install ccache
sudo apt install qt6-base-dev
sudo apt install qt6-tools-dev
apt install g++ make pkg-config ccache
apt install qtbase5-dev
apt install qtbase5-dev-tools
apt install qttools5-dev
apt install qttools5-dev-tools
apt install qt5-qmake
apt install clang llvm libclang-dev libclang-cpp-dev llvm-dev liblldb-dev
apt install python-is-python3
apt install python3-pyqt5 python3-clang
----
====== Alma Linux Applications ======
==== Apptainer ====
apptainer build fedora:latest fedora.def
( na KMLinuxu v adresari /tmp )
xhost +si:localuser:root
apptainer shell fedora
apptainer build --sandbox fedora:latest fedora.def
( na KMLinuxu v adresari /tmp , nelze kopirovat jinam )
apptainer shell -w fedora:latest
( na lokalnim stroji lze ... sudo apptainer shell -w fedora:latest )
File fedora.def ( /opt/containers na kmlinuxu )
BootStrap: yum
OSVersion: 40
MirrorURL: http://dfw.mirror.rackspace.com/fedora/releases/%{OSVERSION}/Everything/x86_64/os/
Include: fedora-release-container dnf
Setopt: install_weak_deps=False
%runscript
echo "This is what happens when you run the container..."
%post
echo "Hello from inside the container"
dnf -y install mc
dnf -y install @base-x xterm xeyes xclock
dnf -y install qt-creator kate meld clang llvm lldb clang-devel llvm-devel lldb-devel python3-clang python3-pybind11 python3-devel python3-qt5 python3-qscintilla-qt5 libffi-devel
echo "Installation finished"
=== apptainer with AlmaLinux ===
https://apptainer.org/docs/user/main/definition_files.html
File alma.def
Bootstrap: yum
OSVersion: 9
MirrorURL: http://repo.almalinux.org/almalinux/%{OSVERSION}/BaseOS/x86_64/os
Include: dnf
%post
dnf install -y dnf-plugins-core
dnf config-manager --set-enabled crb
dnf install -y epel-release
dnf -y install mc qt-creator Coin4-devel qt5-qtbase-devel libXi-devel
rpm -Uvh /tmp/appl/SoQt-1.6.0-15.el9.x86_64.rpm
rpm -Uvh /tmp/appl/SoQt-devel-1.6.0-15.el9.x86_64.rpm
echo "O.K."
sudo apptainer build alma.sif alma.def
# sudo apptainer overlay create --sparse --size 1024 overlay.img
# sudo apptainer shell --overlay overlay.img alma.sif
# sudo apptainer shell -w alma
# sudo apptainer shell --bind /etc --bind /bin --bind /usr --bind /var --overlay overlay.img alma.sif
=== empty apptainer ===
https://apptainer.org/docs/user/main/appendix.html
File empty.def
Bootstrap: scratch
%setup
# Runs on host - fetch static busybox binary
curl -o /tmp/busybox https://www.busybox.net/downloads/binaries/1.31.0-i686-uclibc/busybox
# It needs to be executable
chmod +x /tmp/busybox
%files
# Copy from host into empty container
/tmp/busybox /bin/sh
%runscript
/bin/sh
sudo apptainer build --sandbox empty empty.def
sudo apptainer shell -w empty
==== Podman ====
Dockerfile
FROM fedora:latest
RUN dnf -y install mc
RUN dnf -y install qt-creator
RUN dnf -y install kdevelop
RUN dnf -y install xterm xeyes xclock
RUN echo "O.K."
FROM almalinux:latest
RUN dnf -y install mc
RUN dnf install -y dnf-plugins-core
RUN dnf config-manager --set-enabled crb
RUN dnf install -y epel-release
RUN dnf -y install qt-creator
RUN dnf -y install Coin4-devel
RUN dnf -y install qt5-qtbase-devel
RUN dnf -y install libXi-devel
RUN dnf -y install git
RUN curl -O http://kmlinux.fjfi.cvut.cz/~culikzde/alma-soqt/SoQt-1.6.0-15.el9.x86_64.rpm
RUN curl -O http://kmlinux.fjfi.cvut.cz/~culikzde/alma-soqt/SoQt-devel-1.6.0-15.el9.x86_64.rpm
RUN rpm -Uvh SoQt-1.6.0-15.el9.x86_64.rpm
RUN rpm -Uvh SoQt-devel-1.6.0-15.el9.x86_64.rpm
# RUN dnf -y install kdevelop
RUN dnf -y install xterm xclock
RUN echo "O.K."
podman build -f Dockerfile -t fedora
podman run -it --net=host -e DISPLAY fedora
podman run -it --net=host -e DISPLAY -v ~/.Xauthority:/root/.Xauthority fedora
xhost +si:localuser:root
/*
podman pull registry.fedoraproject.org/fedora:latest
podman images
podman run -it fedora:latest
podman volume create fedora-volume
run -it -v /tmp/fedora-podman/volumes/fedora-volume fedora:latest
podman run -it -v /var/lib/containers/storage/volumes/fedora-volume fedora:latest
volume mi nikde nefunguje
*/
grep HOME /etc/containers/storage.conf
file ~/.config/containers/storage.conf
[storage]
graphroot = "/tmp/fedora-podman"
https://superuser.com/questions/1407370/how-to-run-an-x11-application-xclock-on-podman
https://devtodevops.com/podman-clear-cache/
podman container prune -f
podman image prune -a -f
podman volume prune -f
podman network prune -f
https://docs.oracle.com/en/operating-systems/oracle-linux/podman/podman-ConfiguringStorageforPodman.html#podman-install-storage
==== Virtual Box ====
dnf install kernel-devel
dnf install kernel-headers
dnf install kernel-devel-5.14.0-427.33.1.el9_4.x86_64
dnf install dkms
dnf config-manager --add-repo=https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
dnf install VirtualBox-7.1
/sbin/vboxconfig
==== cvmfs ====
https://medium.com/@saurvs/setting-up-a-local-cernvm-fs-repository-9218afd4a710
https://cernvm-forum.cern.ch/t/cvmfs-to-distribute-software-to-laptops-of-organization/396
https://github.com/cvmfs/cvm19-tutorial
https://cvmfs-contrib.github.io/cvmfs-tutorial-2021/02_stratum0_client/
https://github.com/qcif/cvmfs-setup-example
----
====== Open Inventor ======
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = qt-inventor.bin
HEADERS += qt-inventor.h
SOURCES += qt-inventor.cc
FORMS += qt-inventor.ui
# Menu Edit / Prefferences / Kits / Qt Version
# Qt5 from MSys ... C:\Appl\MSys64\mingw64\qmake.exe
# Menu Edit / Prefferences / Kits / Kit
# MinGW 11 C, MinGW 11 C++, Qt Version = Qt5 from MSys
DEFINES += COIN_DLL SOQT_DLL
LIBS += -lCoin-80 -lSoQt
# LIBS += -L C:\Appl\MSys64\mingw64\bin -lCoin-80 -lSoQt
# INCLUDEPATH += C:\Appl\Qt\add\include
# DEFINES += COIN_DLL SOQT_DLL
# LIBS += -L C:\Appl\Qt\add\bin -lCoin-80 -lSoQt
# https://packages.msys2.org/packages/mingw-w64-x86_64-coin
# https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-coin-4.0.3-2-any.pkg.tar.zst
# https://packages.msys2.org/packages/mingw-w64-x86_64-soqt-qt5
# https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-soqt-qt5-1.6.3-1-any.pkg.tar.zst
# https://packages.msys2.org/packages/mingw-w64-x86_64-expat
# https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-expat-2.6.3-1-any.pkg.tar.zst
# Source https://mirror.msys2.org/mingw/sources/mingw-w64-coin-4.0.3-2.src.tar.zst
====Windows Subsytem, Ubuntu====
instalace Ubuntu, v PowerShellu
wsl --install
sudo apt install mc
sudo apt install build-essential
sudo apt install libsoqt520-dev
sudo apt install qtcreator clang
File qt-inventor.pro
QT += core gui widgets
TARGET = qt-inventor.bin
HEADERS += qt-inventor.h
SOURCES += qt-inventor.cc
FORMS += qt-inventor.ui
LIBS += -lCoin -lSoQt
git clone https://gitlab.fjfi.cvut.cz/culikzde/peri
cd peri/QtInventor
mkdir build
cd build
qmake ../qt-inventor.pro
make
./qt-inventor.bin
==== Windows Subsystem, Fedora Remix ====
https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL/releases
wsl -d fedoraremix -u root
dnf install mc qt-creator SoCoin4-devel SoQt-devel
git clone https://gitlab.fjfi.cvut.cz/culikzde/uop
cd uop/QtInventor
qmake-qt5 inventor.pro
====Hyper-V, Fedora 41====
dnf install mc
dnf install qt-creator
# dnf install freeglut-devel glfw-devel glui-devel
dnf install Coin4-devel SoQt-devel
QT += core gui widgets
TARGET = qt-inventor.bin
HEADERS += qt-inventor.h
SOURCES += qt-inventor.cc
FORMS += qt-inventor.ui
INCLUDEPATH += -I /usr/include/Coin4
LIBS += -lCoin -lSoQt
==== MSys ====
Qt Creator, menu Edit / Preferences
tab Kits / Qt Versions :
ADD C:/Programs/MSys64/mingw64/bin/qmake.exe
Tab Kits / Kits :
ADD "Qt5 from MSys"
SET compiler C, C++, Qt Version
doplnit do .pro
DEFINES += COIN_DLL SOQT_DLL
LIBS += -L C:/Programs/MSys64/mingw64/bin -lCoin-80 -lSoQt
==== AlmaLinux ====
nainstalovat Coin4 a Coin4-devel
pridat SoQt a SoQt-devel
dnf install rpm-build doxygen Coin4-devel
rpmbuild --rebuild SoQt-1.6.0-15.fc40.src.rpm
dnf install SoQt-1.6.0-15.el9.x86_64.rpm
dnf install SoQt-devel-1.6.0-15.el9.x86_64.rpm
zdrojovy balicek
https://archives.fedoraproject.org/pub/fedora/linux/releases/40/Everything/source/tree/Packages/s/SoQt-1.6.0-15.fc40.src.rpm
vytvorene balicky
http://kmlinux.fjfi.cvut.cz/~culikzde/alma-soqt/
rozbalit SoQt SoQt-devel do /tmp/appl (napr. pomoci mc)
( nebo pouzit SoQt a SoQt-devel z Fedory 34 )
doplnit do .pro souboru
INCLUDEPATH += -I /usr/include/Coin4 -I /tmp/appl/usr/include/Coin4
LIBS += -L /tmp/appl/usr/lib64 -lCoin -lSoQt
LIBS += -Wl,-rpath -Wl,/tmp/appl/usr/lib64
# nebo na radce LD_LIBRARY_PATH=/tmp/appl/usr/lib64 ./qt-inventor.bin
**environment variables, file setup.sh**
export PKG_CONFIG_PATH=/tmp/appl/usr/lib64/pkgconfig
export CPLUS_INCLUDE_PATH=/tmp/appl/usr/include/Coin4
export LIBRARY_PATH=/tmp/appl/usr/lib64
export LD_LIBRARY_PATH=/tmp/appl/usr/lib64
**problem with Qt 6**
Qt6 omylem linkovane s SoQt pro Qt5 ohlasi chybu
QObject::installEventFilter(): Cannot filter events for objects in a different thread
je treba pouzit Qt5
qmake-qt5 inventor.pro
--------
======Numerika======
===OpenFoam===
[[../openfoam]]
http://kmlinux.fjfi.cvut.cz/~culik/openfoam-pictures
===FreeFEM===
https://freefem.org/
https://modules.freefem.org/modules/elasticity/
https://modules.freefem.org/modules/stokes/
https://modules.freefem.org/modules/poisson/
https://doc.freefem.org/tutorials/poisson.html
https://doc.freefem.org/documentation/mesh-generation.html
fish shape https://github.com/FreeFem/FreeFem-sources/blob/master/examples/3d/Poisson.edp
https://doc.freefem.org/examples/misc.html#poisson-s-equation-3d
https://github.com/zenotech/MeshAid/blob/master/gmsh/cylinder.geo
===MFem===
https://mfem.org/examples/
https://mfem.org/serial-tutorial/
https://www.sciencedirect.com/science/article/pii/S0898122120302583
===Orange Owl===
https://github.com/OrangeOwlSolutions/PDEs
https://github.com/OrangeOwlSolutions/General-CUDA-programming
https://github.com/OrangeOwlSolutions/Linear-Algebra
https://github.com/OrangeOwlSolutions/cuSPARSE
===Other===
https://people.math.sc.edu/burkardt/cpp_src/fem3d_pack/fem3d_pack.html
https://github.com/Elias-Gu/FEM
https://libmesh.github.io/
https://wiki.freecad.org/FEM_Mesh
https://glvis.org/
https://libocca.org
https://github.com/LLNL/RAJA
http://nkl.cc.u-tokyo.ac.jp/13e/02-FEM/FEM3D-C.pdf
https://xsdk-project.github.io/MathPackagesTraining2021/lessons/mfem_convergence/
https://github.com/smiret/3d_python_fem/blob/master/pythonfem.py
jiz neni https://edoras.sdsu.edu/~mthomas/f17.705/topics/iter_solv/TeraGrid09-3DparHeatEqtnTutorial.pdf
https://firedynamics.github.io/LectureFireSimulation/content/modelling/06_heat_transfer/04_ht3d_example.html#
Comsol https://cecs.wright.edu/~sthomas/htchapter02.pdf
--------
======Mini OS======
http://www.minix3.org/pkgsrc/packages/3.4.0/i386/All/
https://genode.org
https://nuttx.apache.org/
https://github.com/managarm/managarm
https://github.com/ghaiklor/ghaiklor-os-gcc
https://github.com/torokernel/ToroOS
https://github.com/torokernel/torokernel
Pascal https://wiki.freepascal.org/Operating_Systems_written_in_FPC
Ultibo https://ultibo.org/
Real Time OS https://github.com/weston-embedded/uC-OS3
https://github.com/FreeRTOS/FreeRTOS
https://www.menuetos.net/
https://en.wikipedia.org/wiki/Contiki
https://cs.wikipedia.org/wiki/KolibriOS
https://serenityos.org/
=====Zephyr Project=====
https://www.zephyrproject.org/
https://docs.zephyrproject.org/latest/develop/getting_started/index.html
=====Toaru OS=====
https://github.com/klange/toaruos/releases
bootable PDF/ISO https://klange.dev/resume/
build https://github.com/klange/toaruos
packages https://toaruos.org/packages/
dnf install docker
systemctl start docker
git clone https://github.com/klange/toaruos
cd toaruos
git submodule update --init kuroko
docker pull toaruos/build-tools:1.99.x
docker run -v `pwd`:/root/misaka -w /root/misaka -e LANG=C.UTF-8 \
-t toaruos/build-tools:1.99.x util/build-in-docker.sh
make shell
dnf install qemu-system-x86
make run
https://github.com/klange/toaru-build-tools
git checkout v1.2.2
make toolchain
TARGET=x86_64-linux-gnu
include build/${ARCH}.mk
kernel: misaka-kernel
libc: base/lib/libc.so
# copy-lib:
# cp /usr/lib64/libgcc_s.so.1 $(BASE)/usr/lib/libgcc_s.so.1
# cp /usr/lib64/libgcc_s.so.1 $(BASE)/usr/lib/libgcc_s.so
run-kernel: kernel
qemu-system-x86_64 -kernel misaka-kernel.64
KERNEL_CFLAGS += -DKERNEL_GIT_TAG=2.2.0
KERNEL_CFLAGS += -I${PWD}/include-fixed
KERNEL_CFLAGS += -I${PWD}/base/usr/include
LIBC_CFLAGS += -I${PWD}/include-fixed
LIBC_CFLAGS += -I${PWD}/base/usr/include
LIBC_LDFLAGS += -B${PWD}/base/lib
# LIBC_LDFLAGS += -L${PWD}/base/lib
# LIBC_LDFLAGS += -Wl,-rlink -Wl,${PWD}/base/lib
# LIBC_LDFLAGS += -Wl,-rpath -Wl,${PWD}/base/lib
.make/%.lmak: lib/%.c util/auto-dep.py | dirs $(CRTS)
python util/auto-dep.py --makelib $< > $@
.make/%.mak: apps/%.c util/auto-dep.py | dirs $(CRTS)
python util/auto-dep.py --make $< > $@
.make/%.kmak: lib/kuroko/%.c util/auto-dep.py | dirs
python util/auto-dep.krk --makekurokomod $< > $@
( cd ramdisk ; tar czf ../ramdisk.tgz * )
qemu-system-x86_64 -enable-kvm -smp 4 -m 3G -kernel misaka-kernel -initrd ramdisk.igz -append "root=/dev/ram0"
=====Periferie, Boot, ...=====
https://wiki.osdev.org/VESA_Video_Modes
PS/2 mouse http://forum.osdev.org/viewtopic.php?t=24277
FatFs http://elm-chan.org/fsw/ff/
SeaBIOS https://github.com/coreboot/seabios
FNet https://fnet.sourceforge.io/
CherryUSB https://github.com/cherry-embedded/CherryUSB
https://github.com/cherry-embedded/CherryPHY
https://github.com/cherry-embedded/CherrySH
https://github.com/hathach/tinyusb
TCP/IP https://github.com/russdill/lwip
https://github.com/cozis/microtcp/tree/main
https://github.com/tass-belgium/picotcp
SSL/SSH https://github.com/wolfSSL/wolfssl
code generation https://github.com/cozis/Noja/blob/main/src/lib/compiler/codegen.c
https://github.com/hi631/FPGA_DOS
https://www.abclinuxu.cz/zpravicky/kurz-assembleru-od-vyvojaru-ffmpeg
Multiboot https://www.gnu.org/software/grub/manual/multiboot/multiboot.html
Multiboot2 https://www.gnu.org/software/grub/manual/multiboot2/multiboot.html
https://github.com/microkernel2018/barebones
https://github.com/aar10n/osdev
https://softwarecrisis.miraheze.org/wiki/Linecount
=====Emulátory=====
http://bellard.org/jslinux/
http://bellard.org/tinyemu/
jor1k: OpenRISC OR1K Javascript Emulator https://s-macke.github.io/jor1k
http://riscemu.readthedocs.io
https://github.com/bucaps/marss-riscv
https://nitish2112.github.io/post/adding-instruction-riscv/
=====Debugger=====
https://sourceware.org/gdb/current/onlinedocs/gdb.html/File-Transfer.html
https://sourceware.org/gdb/current/onlinedocs/gdb.html/Basic-Python.html
https://stackoverflow.com/questions/4792483/how-to-import-gdb-in-python
https://github.com/bminor/binutils-gdb/blob/master/gdb/python/python.c#L2589
https://sourceware.org/gdb/wiki/PythonGdbTutorial
gdbserver host:2345 executable
gdb
target remote host:2345
remote get remote_file local_file
remote put local_file remote_file
https://lldb.llvm.org/use/remote.html get-file put-file
https://lldb.llvm.org/cpp_reference/classCommandObjectPlatformPutFile.html
https://lldb.llvm.org/python_api/lldb.SBPlatform.html
https://lldb.llvm.org/python_api/lldb.SBPlatformShellCommand.html
https://www.sourceware.org/gdb/current/onlinedocs/gdb.html/File-Transfer.html
Gede https://gede.dexar.se/
Seer https://github.com/epasveer/seer
AsmJit https://asmjit.com/
https://x64dbg.com/ for Windows
asm https://github.com/zyantific/zasm
encoder and disassembler https://github.com/zyantific/zydis
C++, OpenGL, ImGui https://github.com/zmeadows/lldbg
( ImGui on SDL2 https://github.com/ocornut/imgui/tree/master/examples/example_sdl2_sdlrenderer2 )
( https://terminalroot.com/learn-to-use-dear-imgui-with-sdl2/ )
( https://martin-fieber.de/blog/gui-development-with-cpp-sdl2-and-dear-imgui/ )
https://willus.com/ccomp.shtml
===== RISC-V =====
https://mth.st/blog/riscv-qemu/
https://popovicu.com/posts/bare-metal-programming-risc-v/
https://popovicu.com/posts/making-a-micro-linux-distro/
https://risc-v-getting-started-guide.readthedocs.io/en/latest/zephyr-qemu.html
https://docs.zephyrproject.org/latest/boards/qemu/riscv64/doc/index.html
https://github.com/YosysHQ/nerv
https://github.com/LvNA-system/labeled-RISC-V
https://github.com/YosysHQ/nerv
https://www.cnx-software.com/2024/08/31/using-risc-v-cores-on-the-raspberry-pi-pico-2-board-and-rp2350-mcu-from-blinking-an-led-to-building-linux/ Raspberry Pi Pico 2
https://github.com/Wren6991/Hazard3
--------
======FPGA======
Fpga4Student https://www.fpga4student.com/2017/04/verilog-code-for-16-bit-risc-processor.html
Fomu - ICE40 FPGA Development Board https://www.adafruit.com/product/4332 https://github.com/skordal/potato/tree/master/src
FemtoRV - https://github.com/BrunoLevy/learn-fpga/blob/master/FemtoRV/TUTORIALS/FROM_BLINKER_TO_RISCV/README.md
Quark - https://github.com/BrunoLevy/learn-fpga/blob/master/FemtoRV/RTL/PROCESSOR/femtorv32_quark.v
Float Add, Mul - https://github.com/BrunoLevy/learn-fpga/blob/master/FemtoRV/RTL/PROCESSOR/petitbateau.v#L397
Nanland RISC-V https://github.com/Mecrisp/Nandland-RISC-V
FleaFPGA Ohm - Next186, NextZ80 - https://github.com/Basman74/Next186/blob/master/Next186_SoC_Diamond_Project.zip
GHDL - https://ghdl.github.io/ghdl/
GHDL interfaces and extensions http://ygdes.com/GHDL/
Verilator - https://www.veripool.org/verilator/
RISC-V Verilator model - https://github.com/aignacio/riscv_verilator_model
RPU - Basic RISC-V CPU implementation in VHDL - https://github.com/Domipheus/RPU
Designing a CPU in VHDL - https://domipheus.com/blog/rpu-series-quick-links
Fpga4Fun - Ethernet - https://www.fpga4fun.com/10BASE-T0.html https://www.fpga4fun.com/10BASE-T1.html ( RaspberiPi https://github.com/osnr/rpi-bitbang-ethernet/blob/master/README.md )
USB https://xess.com/projects/fpga-usb-v2-project/
Fomu, ValentyUSB https://github.com/im-tomu/valentyusb
Qomu https://workshop.fomu.im/en/latest/renode-verilator.html
QtRvSim VHDL https://gitlab.fel.cvut.cz/b4m35pap/rvapo-vhdl/-/tree/main/rvapo/core/logic
RudoIV, RiscV implementation https://github.com/bobbl/rudolv
BiRISC-V, RiscV implementation https://github.com/ultraembedded/biriscv
Niklaus Wirth: Risc5 https://people.inf.ethz.ch/wirth/Lola/index.html
=====FPGA DE10-standard=====
PIO ports https://johnloomis.org/digitallab/
PIO ports https://schaumont.dyn.wpi.edu/ece4530f19/
https://johnloomis.org
NiosII CPU Development https://johnloomis.org/srisc/
https://johnloomis.org/digitallab/
lectures https://schaumont.dyn.wpi.edu/ece4530f19/
custom instructions https://schaumont.dyn.wpi.edu/ece4530f19/lectures/lecture13-notes.html
custom instruction example https://github.com/vt-ece4530-f19/example-nios-ci
custom instructions http://cse.unl.edu/~witty/class/embedded/document/altera/nios2_custom_instruction.pdf
http://de10-standard.terasic.com/cd
download https://download.terasic.com/downloads/cd-rom/de10-standard/
DE10 Standard Frame Buffer
https://github.com/Insper/DE10-Standard-v.1.3.0-SystemCD/tree/master/Demonstration/SoC_FPGA/DE10_Standard_FB
DE10 Standard Computer https://github.com/Thewbi/DE10_Standard
VGA https://sites.ualberta.ca/~delliott/cmpe490/appnotes/2014w/G3_VGA/G3_VGA_AppNote_V2.pdf
NIOS VGA https://people.ece.cornell.edu/land/courses/ece5760/NiosII_doc/Video_q11.pdf
NIOS https://people.ece.cornell.edu/land/courses/ece5760/NiosII_doc/
https://ftp.intel.com/Public/Pub/fpgaup/pub/Intel_Material/Boards/DE10-Standard/DE10_Standard_User_Manual.pdf
https://ftp.intel.com/Public/Pub/fpgaup/pub/Intel_Material/17.0/Tutorials/Linux_On_DE_Series_Boards.pdf
https://www.rocketboards.org/foswiki/pub/Documentation/DE10Standard/DE10-Standard_OpenCV.pdf
https://fpgacademy.org/Downloads/DE10-Standard_Computer_NiosII.pdf
https://www.adiuvoengineering.com/post/creating-a-nios-ii-processor
https://www.adiuvoengineering.com/post/creating-the-nios-ii-sw-application
https://dcenet.fel.cvut.cz/edu/fpga/doc/n2cpu_nii5v1.pdf
http://people.ece.cornell.edu/land/courses/ece5760/
float add https://github.com/prashal/fp_adder/blob/master/fp_adder.vhd
float https://github.com/xesscorp/Floating_Point_Library-JHU/blob/master/FloatPt.vhd
https://github.com/freecores/openfpu64/blob/master/fpu_add.vhd
vga https://github.com/xesscorp/VHDL_Lib/blob/master/Vga.vhd
vga https://dspace.cvut.cz/handle/10467/76078
de10-lite http://de10-lite.terasic.com/cd
de10-nano https://github.com/zangman/de10-nano
https://github.com/thinkoco/de10-nano-riscv
https://github.com/markus-k/mini-risc
https://github.com/thinkoco/de10-nano-riscv
https://cpulator.01xz.net
https://github.com/samarqureshii/243
( https://github.com/yangh122/CPULator )
===== VexRiscv =====
VexRiscv https://github.com/SpinalHDL/VexRiscv
NaxRisc https://github.com/SpinalHDL/NaxRiscv#running-verilator-simulation
https://github.com/litex-hub/zephyr-on-litex-vexriscv
https://github.com/litex-hub/linux-on-litex-vexriscv
https://github.com/enjoy-digital/litex/wiki/Installation (Verilator)
sbt https://repo.scala-sbt.org/scalasbt/rpm
https://www.controlpaths.com/2022/03/28/running-linux-on-a-litex-soc/
https://antmicro.com/blog/2020/05/multicore-vex-in-litex
https://www.luffca.com/tag/vexriscv
https://github.com/SpinalHDL/NaxRiscv
https://github.com/enjoy-digital/litex/wiki/Installation
dnf install dtc libevent-devel json-c-devel zlib-devel
dnf install verilator gcc-c++-riscv64-linux-gnu scala
https://github.com/litex-hub/linux-on-litex-vexriscv/files/8331338/linux_2022_03_23.zip
mkdir litex
cd litex
wget https://raw.githubusercontent.com/enjoy-digital/litex/master/litex_setup.py
chmod +x litex_setup.py
./litex_setup.py --init --install --user
cd ..
curl -L https://www.scala-sbt.org/sbt-rpm.repo > sbt-rpm.repo
sudo mv sbt-rpm.repo /etc/yum.repos.d/
sudo yum install sbt
git clone https://github.com/litex-hub/linux-on-litex-vexriscv
cd linux-on-litex-vexriscv
# unpack linux_2022_03_23.zip to images (Image, rootfs.cpio, opensbi.bin)
./sim.py
https://builds.renode.io/renode-latest.linux-portable-dotnet.tar.gz
# unpack
cd renode
sudo dnf install mono-complete
sudo pip install -r /big/zephyr/renode/tests/requirements.txt
# robotframework, robotframework-retryfailed, psutil, pyyaml
./renode
strt @scripts/single-node/leon3-zephyr.resc
start @scripts/single-node/litex_vexriscv_zephyr.resc
start @scripts/single-node/litex_vexriscv_linux.resc
./renode -e 'start @scripts/single-node/i386.resc'
===== Priklad =====
dnf install gcc-c++-riscv64-linux
dnf install verilator
dnf install gcc-gnat
wget https://raw.githubusercontent.com/enjoy-digital/litex/master/litex_setup.py
chmod +x litex_setup.py
./litex_setup.py --init --install --user
litex_sim
=====FPGA Poznámky=====
CPU 0 LLVM http://jonathan2251.github.io/lbd/TutorialLLVMBackendCpu0.pdf
https://github.com/Jonathan2251/lbd
AES 256 FPGA https://cryptography.gmu.edu/athena/sources/Cryptographic_Engineering_Chapter_10.pdf
Elliptic Curve FPGA https://www.esat.kuleuven.be/cosic/publications/article-2661.pdf
https://www.mikekohn.net/micro/riscv_fpga.php
https://github.com/piotr-go/Lichee-Tang/tree/master/VGA/src
https://github.com/piotr-go/Lichee-Tang/tree/master/NES/src/nes
https://github.com/UofT-HPRC/fake_fpga
ULX3S https://ulx3s.github.io/
https://github.com/LEAP-FPGA/leap-documentation/wiki
https://ghdl.github.io/ghdl-cosim/vhpidirect/notebook/howtouseghdlfromc.html
https://github.com/antonblanchard/microwatt
https://vivonomicon.com/2020/06/13/lets-write-a-minimal-risc-v-cpu-in-nmigen/
https://learn.lushaylabs.com/tang-nano-9k-first-processor/
https://github.com/calint/tang-nano-9k--riscv
=====VHDL Poznámky=====
ModelSim: save, compile, restart, run
function to_string (v: std_logic_vector) return string is
variable txt : string (1 to v'length);
begin
for i in 1 to v'length loop
if v(v'length - i) = '0' then
txt(i) := '0';
else
txt(i) := '1';
end if;
end loop;
return txt;
end function to_string;
function to_string (v: std_logic) return string is
variable txt : string (1 to 1);
begin
if v = '0' then
txt := "0";
else
txt := "1";
end if;
return txt;
end function to_string;
function to_string (v: signed) return string is
variable txt : string (1 to v'length);
begin
for i in 1 to v'length loop
if v(v'length - i) = '0' then
txt(i) := '0';
else
txt(i) := '1';
end if;
end loop;
return txt;
end function to_string;
function to_string (v: unsigned) return string is
variable txt : string (1 to v'length);
begin
for i in 1 to v'length loop
if v(v'length - i) = '0' then
txt(i) := '0';
else
txt(i) := '1';
end if;
end loop;
return txt;
end function to_string;
function to_string (v: fp32) return string is
begin
return "sign=" & to_string (v.sign) &
" exponent=" & to_string (v.exponent) &
" mantissa=" & to_string (v.mantissa);
end function to_string;
report "a is " & to_string(a);
function fp32_mul (first, second: in fp32) return fp32 is
variable result : fp32 := fp32_ZERO;
variable buf : unsigned(47 downto 0) := (others => '0');
variable start : integer := 46;
begin
result.sign := first.sign xor second.sign;
result.exponent := first.exponent + second.exponent - fp32_EXPONENT_OFFSET;
buf := unsigned('1' & first.mantissa) * unsigned('1' & second.mantissa);
-- normalize
for i in 47 downto 46 loop
if buf(i) = '1' then
start := i - 1;
exit;
end if;
end loop;
result.exponent := to_signed(to_integer(result.exponent) + start - 45, 8);
result.mantissa := buf(start downto start-22);
return result;
end function fp32_mul;
Fedora 34: dnf install ghdl
ghdl -a --std=08 tb_float32.vhd
ghdl -c --std=08 tb_float32.vhd
ghdl -e --std=08 tb_float32
ghdl -r --std=08 tb_float32
--------
======Disky======
http://www.ibiblio.org/pub/Linux/docs/HOWTO/Large-Disk-HOWTO
IDE disks over 137 GB: make sure your kernel is 2.4.19/2.5.3 or later.
http://www.linux-ata.org/
Serial ATA ~ Linux 2.6.19
======Poznámky======
http://www.codeproject.com/Articles/45788/The-Real-Protected-Long-mode-assembly-tutorial-for
http://czak.pl/2020/04/09/three-levels-of-qemu-graphics.html
Wirth ... http://github.com/rochus-keller/LeanQt
https://badrpc.net/20230728-grub-does-not-recognise-ext4/
Zephyr LVGL OpenGL https://docs.lvgl.io/master/integration/driver/opengles.html
https://docs.lvgl.io/master/details/integration/os/zephyr.html
Emulator https://ripes.me/Ripes/
QEmu https://fgoehler.com/blog/adding-a-new-architecture-to-qemu-01/
https://fgoehler.com/blog/adding-a-new-architecture-to-qemu-02/
https://github.com/flogosec/qemu-avr32
https://github.com/mortbopet/VelonaCore
https://github.com/mortbopet/VSRTL
https://github.com/Jonathan2251/lbd
https://github.com/giorby/cosim
https://github.com/RSPwFPGAs/qemu-hdl-cosim
https://github.com/noteed/riscv-hello-c/tree/master
https://theintobooks.wordpress.com/2019/12/28/hello-world-on-risc-v-with-qemu/
https://mth.st/blog/riscv-qemu/
https://github.com/texane/vpcie/blob/master/README
https://popovicu.com/posts/789-kb-linux-without-mmu-riscv/
https://tomverbeure.github.io/2020/08/08/CXXRTL-the-New-Yosys-Simulation-Backend.html
https://sourcesup.renater.fr/www/mic-sec-2022/labs/getting-started-with-litex.html
https://github.com/litex-hub/linux-on-litex-rocket
https://github.com/fedora-cloud/docker-brew-fedora
https://www.ashling.com/wp-content/uploads/QEMU_CUSTOM_INST_WP.pdf
https://github.com/JuliaHubOSS/llvm-cbe
https://github.com/staticafi/llvm2c
https://github.com/avast/retdec
https://github.com/lifting-bits/rellic
https://github.com/riscv/sail-riscv
https://github.com/riscv/sail-riscv
https://github.com/Bananymous/banan-os
https://mras2an.webnode.fr/projects/beagleboard/qt-project/
https://forum.qt.io/topic/23331/qt-embedded-linux-with-framebuffer/6
https://www.reddit.com/r/firefox/comments/11by5gk/how_do_i_disable_the_highlight_middle_mouse/
https://www.redhat.com/en/blog/mount-namespaces
https://github.com/neri/riscv-vga-sample
https://github.com/neri/maystorm
https://philippegroarke.com/posts/2018/c++_ui_solutions/
https://github.com/dirtycold/qt-minimal-build/tree/master/archive
https://github.com/pbouda/buildroot-qt-dev/tree/master?tab=readme-ov-file#buildroot-configuration
https://github.com/marmolak/gray486linux
https://qtlite.com/
https://pcotret.gitlab.io/riscv-custom/sw_toolchain.html
fbdev https://wiki.archlinux.org/title/Hyper-V
https://wiki.archlinux.org/title/Install_Arch_Linux_on_WSL
https://wiki.gentoo.org/wiki/Gentoo_in_WSL
https://github.com/microsoft/wslg/wiki/GPU-selection-in-WSLg
https://wiki.gentoo.org/wiki/Hyper-V#Graphics
TangMega-138K : GW5AST FPGA, RISC-V AE350
https://linuxgizmos.com/tang-console-compact-fpga-platform-for-development-and-retro-gaming/
https://github.com/sipeed/TangMega-138KPro-example
https://rain-1.github.io/bootstrapping/os.html
https://wiki.musl-libc.org/alternatives
https://www.fefe.de/dietlibc/
https://wiki.osdev.org/C_Library
https://www.alpinelinux.org/
https://www.elvoris.cz/opencms/export/sites/ucsimply2_cz/articles/2013/091601-machxo2-tri-led/index.html
https://github.com/deniskropp/DirectFB
https://github.com/amaranth-lang
https://archive.fosdem.org/2020/schedule/event/fbdev/attachments/slides/3595/export/events/attachments/fbdev/slides/3595/fosdem_2020_nicolas_caramelli_linux_framebuffer.pdf
https://github.com/caramelli/higfxback/blob/master/Linux-Framebuffer.md
https://github.com/caramelli/higfxback/wiki/Wayland
https://github.com/ghaerr/microwindows
https://github.com/ghaerr/elks
Nano-X http://embedded.centurysoftware.com/docs/nx/index.html
https://stackoverflow.com/questions/30732707/buildroot-custom-kernel-under-1mb
https://github.com/lpsantil/rt0/
https://github.com/koenw/x86-kernel
https://os.phil-opp.com/
xv6 64-bit https://github.com/swetland/xv6
https://github.com/swetland/compiler
https://github.com/PSR0001/bare-minimal-linux-system
https://fevtyp.com/naive/
https://github.com/ghaerr/ncc