diff --git a/README.md b/README.md index 6423473..9a6405b 100644 --- a/README.md +++ b/README.md @@ -1,186 +1 @@ -======= -Packages: sudo pacman -S archiso git squashfs-tools --needed -======= - -An archiso profile consists of several configuration files and a directory for files to be added to the resulting image. - -.. code:: plaintext - - profile/ - ├── airootfs/ - ├── efiboot/ - ├── syslinux/ - ├── grub/ - ├── bootstrap_packages.arch - ├── packages.arch - ├── pacman.conf - └── profiledef.sh - -The required files and directories are explained in the following sections. - -profiledef.sh -============= - -This file describes several attributes of the resulting image and is a place for customization to the general behavior -of the image. - -The image file is constructed from some of the variables in ``profiledef.sh``: ``--.iso`` -(e.g. ``archlinux-202010-x86_64.iso``). - -* ``iso_name``: The first part of the name of the resulting image (defaults to ``mkarchiso``) -* ``iso_label``: The ISO's volume label (defaults to ``MKARCHISO``) -* ``iso_publisher``: A free-form string that states the publisher of the resulting image (defaults to ``mkarchiso``) -* ``iso_application``: A free-form string that states the application (i.e. its use-case) of the resulting image (defaults - to ``mkarchiso iso``) -* ``iso_version``: A string that states the version of the resulting image (defaults to ``""``) -* ``install_dir``: A string (maximum eight characters long, which **must** consist of ``[a-z0-9]``) that states the - directory on the resulting image into which all files will be installed (defaults to ``mkarchiso``) -* ``buildmodes``: An optional list of strings, that state the build modes that the profile uses. Only the following are - understood: - - - ``bootstrap``: Build a compressed file containing a minimal system to bootstrap from - - ``iso``: Build a bootable ISO image (implicit default, if no ``buildmodes`` are set) - - ``netboot``: Build artifacts required for netboot using iPXE -* ``bootmodes``: A list of strings, that state the supported boot modes of the resulting image. Only the following are - understood: - - - ``bios.syslinux``: Syslinux for x86 BIOS booting - - ``uefi.grub``: GRUB for UEFI booting. For the x86_64 architecture, in addition to x64 UEFI, support for mixed-mode - booting (IA32 UEFI) will also be added. - - ``uefi.systemd-boot``: systemd-boot for UEFI booting. For the x86_64 architecture, in addition to x64 UEFI, support - for mixed-mode booting (IA32 UEFI) will also be added. -* ``arch``: The architecture (e.g. ``x86_64``) to build the image for (defaults to the value returned by ``uname -m``). - This is also used to resolve the name of the packages file (e.g. ``packages.x86_64``) -* ``packages``: File path to a text file containing a list of packages to install into the environment in ``iso`` and - ``netboot`` build modes (defaults to ``packages.${arch}``). -* ``bootstrap_packages``: File path to a text file containing a list of packages to install into the environment in the - ``bootstrap`` build mode (defaults to ``bootstrap_packages.${arch}``). -* ``pacman_conf``: The ``pacman.conf`` to use to install packages to the work directory when creating the image (defaults to - the host's ``/etc/pacman.conf``) -* ``airootfs_image_type``: The image type to create. The following options are understood (defaults to ``squashfs``): - - - ``squashfs``: Create a squashfs image directly from the airootfs work directory - - ``ext4+squashfs``: Create an ext4 partition, copy the airootfs work directory to it and create a squashfs image from it - - ``erofs``: Create an EROFS image for the airootfs work directory -* ``airootfs_image_tool_options``: An array of options to pass to the tool to create the airootfs image. ``mksquashfs`` and - ``mkfs.erofs`` are supported. See ``mksquashfs --help`` or ``mkfs.erofs --help`` for all possible options -* ``bootstrap_tarball_compression``: An array containing the compression program and arguments passed to it for - compressing the bootstrap tarball (defaults to ``cat``). For example: ``bootstrap_tarball_compression=(zstd -c -T0 --long -19)``. -* ``file_permissions``: An associative array that lists files and/or directories who need specific ownership or - permissions. The array's keys contain the path and the value is a colon separated list of owner UID, owner GID and - access mode. E.g. ``file_permissions=(["/etc/shadow"]="0:0:400")``. When directories are listed with a trailing backslash (``/``) **all** files and directories contained within the listed directory will have the same owner UID, owner GID, and access mode applied recursively. - -bootstrap_packages.arch -======================= - -All packages to be installed into the environment of a bootstrap image have to be listed in a file specified by the -``bootstrap_packages`` variable. If the variable is not specified, the architecture specific -``bootstrap_packages.${arch}`` file (e.g. ``bootstrap_packages.x86_64``) or the ``bootstrap_packages`` file which reside -top-level in the profile will be used instead. - -Packages have to be listed one per line. Lines starting with a ``#`` and blank lines are ignored. - -This file is required when generating bootstrap images using the ``bootstrap`` build mode. - -packages.arch -============= - -All packages to be installed into the environment of an ISO image have to be listed in a file specified by the -``packages`` variable. If the variable is not specified, the architecture specific ``packages.${arch}`` file (e.g. -``packages.x86_64``) or the ``packages`` file which reside top-level in the profile will be used instead. - -Packages have to be listed one per line. Lines starting with a ``#`` and blank lines are ignored. - - .. note:: - - The **mkinitcpio** and **mkinitcpio-archiso** packages are mandatory (see `#30 - `_). - -This file is required when generating ISO images using the ``iso`` or ``netboot`` build modes. - -pacman.conf -=========== - -A configuration for pacman is required per profile. - -Some configuration options will not be used or will be modified: - -* ``CacheDir``: the profile's option is **only** used if it is not the default (i.e. ``/var/cache/pacman/pkg``) and if it is - not the same as the system's option. In all other cases the system's pacman cache is used. -* ``HookDir``: it is **always** set to the ``/etc/pacman.d/hooks`` directory in the work directory's airootfs to allow - modification via the profile and ensure interoparability with hosts using dracut (see `#73 - `_) -* ``RootDir``: it is **always** removed, as setting it explicitely otherwise refers to the host's root filesystem (see - ``man 8 pacman`` for further information on the ``-r`` option used by ``pacstrap``) -* ``LogFile``: it is **always** removed, as setting it explicitely otherwise refers to the host's pacman log file (see - ``man 8 pacman`` for further information on the ``-r`` option used by ``pacstrap``) -* ``DBPath``: it is **always** removed, as setting it explicitely otherwise refers to the host's pacman database (see - ``man 8 pacman`` for further information on the ``-r`` option used by ``pacstrap``) - -airootfs -======== - -This optional directory may contain files and directories that will be copied to the work directory of the resulting -image's root filesystem. -The files are copied before packages are being installed to work directory location. -Ownership and permissions of files and directories from the profile's ``airootfs`` directory are not preserved. The mode -will be ``644`` for files and ``755`` for directories, all of them will be owned by root. To set custom ownership and/or -permissions, use ``file_permissions`` in ``profiledef.sh``. - -With this overlay structure it is possible to e.g. create users and set passwords for them, by providing -``airootfs/etc/passwd``, ``airootfs/etc/shadow``, ``airootfs/etc/gshadow`` (see ``man 5 passwd``, ``man 5 shadow`` and ``man 5 gshadow`` respectively). -If user home directories exist in the profile's ``airootfs``, their ownership and (and top-level) permissions will be -altered according to the provided information in the password file. - -Boot loader configuration -========================= - -A profile may contain configuration for several boot loaders. These reside in specific top-level directories, which are -explained in the following subsections. - -The following *custom template identifiers* are understood and will be replaced according to the assignments of the -respective variables in ``profiledef.sh``: - -* ``%ARCHISO_LABEL%``: Set this using the ``iso_label`` variable in ``profiledef.sh``. -* ``%INSTALL_DIR%``: Set this using the ``install_dir`` variable in ``profiledef.sh``. -* ``%ARCH%``: Set this using the ``arch`` variable in ``profiledef.sh``. - -Additionally there are also *custom template identifiers* have harcoded values set by ``mkarchiso`` that cannot be -overridden: - -* ``%ARCHISO_UUID%``: the ISO 9660 modification date in UTC, i.e. its "UUID", -* ``%ARCHISO_SEARCH_FILENAME%``: file path on ISO 9660 that can be used by GRUB to find the ISO volume - (**for GRUB ``.cfg`` files only**). - -efiboot -------- - -This directory is mandatory when the ``uefi.systemd-boot`` bootmode is selected in ``profiledef.sh``. -It contains configuration for `systemd-boot -`_. - - .. note:: - - The directory is a top-level representation of the systemd-boot configuration directories and files found in the - root of an EFI system partition. - -The *custom template identifiers* are **only** understood in the boot loader entry `.conf` files (i.e. **not** in -``loader.conf``). Boot entries for foreign UEFI architectures will be skipped with the exception of IA32 boot entries -when building for the x86_64 architecture. - -syslinux --------- - -This directory is mandatory when the ``bios.syslinux`` bootmode is selected in ``profiledef.sh``. -It contains configuration files for `syslinux `_ or `isolinux -`_ , or `pxelinux -`_ used in the resulting image. - -The *custom template identifiers* are understood in all `.cfg` files in this directory. - -grub ----- - -This directory is mandatory when the ``uefi.grub`` bootmode is selected in ``profiledef.sh``. -It contains configuration files for `GRUB `_ -used in the resulting image. +## (Coming soon!) diff --git a/airootfs/etc/mkinitcpio.conf.d/archiso-nvidia.conf b/airootfs/etc/mkinitcpio.conf.d/archiso-nvidia.conf new file mode 100644 index 0000000..c0b37d8 --- /dev/null +++ b/airootfs/etc/mkinitcpio.conf.d/archiso-nvidia.conf @@ -0,0 +1,6 @@ +MODULES=(lz4 lz4_compress nvidia nvidia_modeset nvidia_uvm nvidia_drm) +BINARIES=() +FILES=() +HOOKS=(base udev microcode modconf kms memdisk archiso archiso_loop_mnt block filesystems keyboard) +COMPRESSION="lz4" +COMPRESSION_OPTIONS=() diff --git a/airootfs/etc/mkinitcpio.d/linux-stratix-pulse-nvidia.preset b/airootfs/etc/mkinitcpio.d/linux-stratix-pulse-nvidia.preset new file mode 100644 index 0000000..17e21db --- /dev/null +++ b/airootfs/etc/mkinitcpio.d/linux-stratix-pulse-nvidia.preset @@ -0,0 +1,8 @@ +# Yes, we love Nvidia xD + +PRESETS=('nvidia') + +ALL_kver='/boot/vmlinuz-linux-stratix-pulse' + +nvidia_config='/etc/mkinitcpio.conf.d/archiso-nvidia.conf' +nvidia_image="/boot/initramfs-linux-stratix-pulse-nvidia.img" diff --git a/build_iso b/build_iso index 2f2a28a..8aa6c1d 100755 --- a/build_iso +++ b/build_iso @@ -13,7 +13,7 @@ mkdir -p $path_to_temp_dir echo "Adding ROS-Helper-Scripts into source..." mkdir -p $path_to_temp_dir/ROS-Helper-Scripts -git clone --depth 1 https://github.com/RengeOS/ROS-Helper-Scripts $path_to_temp_dir/ROS-Helper-Scripts +git clone --branch support-nvidia --depth 1 https://github.com/RengeOS/ROS-Helper-Scripts $path_to_temp_dir/ROS-Helper-Scripts cd $path_to_temp_dir/ROS-Helper-Scripts makepkg -s cd ../../ @@ -42,12 +42,12 @@ mv $path_to_temp_dir/PKGBUILD/bcachefs-fixes/*.pkg.tar.zst $path_to_local_repo echo "Adding birany linux lts kernel(linux-stratix-pulse-lts) into source..." mkdir -p $path_to_temp_dir/Binary-Linux-Kernel-1 mkdir -p $path_to_temp_dir/Binary-Linux-Kernel-2 -wget -P $path_to_temp_dir/Binary-Linux-Kernel-1 https://sourceforge.net/projects/rengeos/files/RengeOS-Binary-Kernel/linux-stratix-pulse-lts/linux-stratix-pulse-lts-6.12.71-1-x86_64.pkg.tar.zst -wget -P $path_to_temp_dir/Binary-Linux-Kernel-1 https://sourceforge.net/projects/rengeos/files/RengeOS-Binary-Kernel/linux-stratix-pulse-lts/linux-stratix-pulse-lts-headers-6.12.71-1-x86_64.pkg.tar.zst +wget -P $path_to_temp_dir/Binary-Linux-Kernel-1 https://sourceforge.net/projects/rengeos/files/RengeOS-Binary-Kernel/linux-stratix-pulse-lts/linux-stratix-pulse-lts-6.12.76-1-x86_64.pkg.tar.zst +wget -P $path_to_temp_dir/Binary-Linux-Kernel-1 https://sourceforge.net/projects/rengeos/files/RengeOS-Binary-Kernel/linux-stratix-pulse-lts/linux-stratix-pulse-lts-headers-6.12.76-1-x86_64.pkg.tar.zst echo "Adding binary linux lastest kernel(linux-stratix-pulse) into source..." -wget -P $path_to_temp_dir/Binary-Linux-Kernel-2 https://sourceforge.net/projects/rengeos/files/RengeOS-Binary-Kernel/linux-stratix-pulse/linux-stratix-pulse-6.19-1-x86_64.pkg.tar.zst -wget -P $path_to_temp_dir/Binary-Linux-Kernel-2 https://sourceforge.net/projects/rengeos/files/RengeOS-Binary-Kernel/linux-stratix-pulse/linux-stratix-pulse-headers-6.19-1-x86_64.pkg.tar.zst +wget -P $path_to_temp_dir/Binary-Linux-Kernel-2 https://sourceforge.net/projects/rengeos/files/RengeOS-Binary-Kernel/linux-stratix-pulse/linux-stratix-pulse-6.19.6-1-x86_64.pkg.tar.zst +wget -P $path_to_temp_dir/Binary-Linux-Kernel-2 https://sourceforge.net/projects/rengeos/files/RengeOS-Binary-Kernel/linux-stratix-pulse/linux-stratix-pulse-headers-6.19.6-1-x86_64.pkg.tar.zst mv $path_to_temp_dir/Binary-Linux-Kernel-1/* $path_to_local_repo mv $path_to_temp_dir/Binary-Linux-Kernel-2/* $path_to_local_repo diff --git a/grub/grub.cfg b/grub/grub.cfg index 63c78ef..5e6112c 100644 --- a/grub/grub.cfg +++ b/grub/grub.cfg @@ -56,6 +56,12 @@ menuentry "RengeOS Live With The LTS Linux Kernel" --class arch --class gnu-linu initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-stratix-pulse-lts.img } +menuentry "RengeOS Live With The Latest Linux Kernel (For Nvidia Graphics Cards)" --class arch --class gnu-linux --class gnu --class os --id 'rengeos' { + set gfxpayload=keep + linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-stratix-pulse archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% cow_spacesize=5G copytoram=unset nvme_load=yes nvidia nvidia-drm.modeset=1 nouveau.modeset=0 module_blacklist=nouveau radeon.modeset=1 i915.modeset=1 + initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-stratix-pulse-nvidia.img +} + menuentry "RengeOS Live Fallback With The LTS Linux Kernel (Nomodeset)" --hotkey f --class arch --class gnu-linux --class gnu --class os --id 'rengeos' { set gfxpayload=keep linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-stratix-pulse-lts archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% cow_spacesize=5G copytoram=unset nvme_load=yes nomodeset diff --git a/grub/loopback.cfg b/grub/loopback.cfg index 45d97a3..19499d2 100644 --- a/grub/loopback.cfg +++ b/grub/loopback.cfg @@ -33,6 +33,12 @@ menuentry "RengeOS Live With The LTS Linux Kernel" --class arch --class gnu-linu initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-stratix-pulse-lts.img } +menuentry "RengeOS Live With The Latest Linux Kernel (For Nvidia Graphics Cards)" --class arch --class gnu-linux --class gnu --class os --id 'rengeos' { + set gfxpayload=keep + linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-stratix-pulse archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" cow_spacesize=5G copytoram=unset nvme_load=yes nvidia nvidia-drm.modeset=1 nouveau.modeset=0 module_blacklist=nouveau radeon.modeset=1 i915.modeset=1 + initrd /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-stratix-pulse-nvidia.img +} + menuentry "RengeOS Live Fallback With The LTS Linux Kernel (Nomodeset)" --hotkey f --class arch --class gnu-linux --class gnu --class os --id 'rengeos' { set gfxpayload=keep linux /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-stratix-pulse-lts archisobasedir=%INSTALL_DIR% img_dev=UUID=${archiso_img_dev_uuid} img_loop="${iso_path}" cow_spacesize=5G copytoram=unset nvme_load=yes nomodeset diff --git a/packages.x86_64 b/packages.x86_64 index d1195cf..196d7b9 100644 --- a/packages.x86_64 +++ b/packages.x86_64 @@ -55,6 +55,12 @@ gptfdisk dosfstools e2fsprogs +# Nvidia +nvidia-utils +nvidia-open-dkms +libglvnd +xf86-video-nouveau + # Zram zram-generator diff --git a/syslinux/archiso_sys-linux.cfg b/syslinux/archiso_sys-linux.cfg index fc3655c..fc80439 100644 --- a/syslinux/archiso_sys-linux.cfg +++ b/syslinux/archiso_sys-linux.cfg @@ -18,6 +18,16 @@ LINUX /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-stratix-pulse-lts INITRD /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-stratix-pulse-lts.img APPEND archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% cow_spacesize=5G copytoram=unset nvme_load=yes +LABEL arch +TEXT HELP +Boot the RengeOS on BIOS Legacy Mode With Linux Latest (For Nvidia Graphics Cards). +Run Live RengeOS. +ENDTEXT +MENU LABEL RengeOS Live With The Latest Linux Kernel (For Nvidia Graphics Cards) +LINUX /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux-stratix-pulse +INITRD /%INSTALL_DIR%/boot/%ARCH%/initramfs-linux-stratix-pulse-nvidia.img +APPEND archisobasedir=%INSTALL_DIR% archisosearchuuid=%ARCHISO_UUID% cow_spacesize=5G copytoram=unset nvme_load=yes nvidia nvidia-drm.modeset=1 nouveau.modeset=0 module_blacklist=nouveau radeon.modeset=1 i915.modeset=1 + # Fallback boot option LABEL arch64fallback TEXT HELP