diff --git a/.gitignore b/.gitignore index 4cf63c7..91f9dc7 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ config/includes.chroot/opt/custom/CustomBG.png config/includes.chroot/etc/NetworkManager/system-connections config/bootloaders/isolinux/splash.png config/bootloaders/grub-pc/splash.png +config/includes.chroot/BuildInfo diff --git a/Makefile b/Makefile index 1d0e70f..f707577 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,9 @@ #!/usr/bin/make Customization?=Default .DEFAULT_GOAL := list +#Buildinfo default vars +CI?=false +RelType?=Testing list: #Shows this list @echo The following options are available @@ -9,6 +12,7 @@ list: #Shows this list prep_buildenv: #Preperation for build (setting file permissons, etc) cp -rf customization/${Customization}/* config chmod 600 config/includes.chroot/etc/NetworkManager/system-connections/*.nmconnection + @printf "== Build info == \nImageType: WipeStation \nCustomization: ${Customization} \nReleaseType: ${RelType}\nBuildDate: ${shell date '+%d-%m-%Y @ %H:%M'} \nBuildHost: ${shell hostname} \nUsingJeninkins: ${CI}" > config/includes.chroot/BuildInfo install_buildenv: # Install packages required to build the image sudo apt -y install live-build make build-essential wget git unzip colordiff apt-transport-https rename ovmf rsync python3-venv gnupg apt-utils cpio @@ -19,6 +23,7 @@ download_extra: #For downloading extra's for iso (not needed/tested) #Current dkms drivers: Broadcom-STA enable_DKMS: #Add customizations to enable dkms drivers cp -r config_DKMS/* config + @\nprintf "Config_DKMS: true" >> config/includes.chroot/BuildInfo #Add 'download_extra' to build without third party software/dotfiles (not needed/tested) build: prep_buildenv install_buildenv build_amd64 build_i386 clean_env #Runs build for all architectures diff --git a/auto/config b/auto/config index 7733dc6..aa0792f 100755 --- a/auto/config +++ b/auto/config @@ -25,7 +25,7 @@ lb config noauto \ --firmware-chroot true \ --initramfs live-boot \ --iso-publisher brammp \ ---iso-volume CLI-minimal-testing \ +--iso-volume Kiosk-Testing \ --linux-packages "linux-image" \ --bootappend-live "boot=live config" \ --memtest none \ diff --git a/config/bootloaders/grub-pc/grub.cfg b/config/bootloaders/grub-pc/grub.cfg index 66c30ea..a9a743c 100644 --- a/config/bootloaders/grub-pc/grub.cfg +++ b/config/bootloaders/grub-pc/grub.cfg @@ -1,5 +1,6 @@ set default=defaultboot -set timeout=5 +set timeout=0 +set timeout_style=countdown loadfont $prefix/dejavu-bold-16.pf2 loadfont $prefix/dejavu-bold-14.pf2 @@ -8,9 +9,11 @@ set gfxmode=auto insmod all_video insmod gfxterm insmod png +terminal_output gfxterm +background_image /boot/grub/splash.png -set color_normal=light-gray/black -set color_highlight=white/black +set color_normal=white/black +set color_highlight=black/white if [ -e /isolinux/splash.png ]; then # binary_syslinux modifies the theme file to point to the correct @@ -23,31 +26,32 @@ else set menu_color_highlight=white/blue fi -terminal_output gfxterm - -insmod play -play 960 440 1 0 4 440 1 - - menuentry "Live system " { - echo "Loading ${1}... Please wait...". - linux KERNEL_LIVE APPEND_LIVE locales=en_US.UTF-8 - initrd INITRD_LIVE + #echo "Please wait...". + linux /live/vmlinuz-5.18.0-0.deb11.4-amd64 boot=live config findiso=${iso_path} locales=en_US.UTF-8 quiet splash + initrd /live/initrd.img-5.18.0-0.deb11.4-amd64 } menuentry "Live system (ToRam)" --id defaultboot { - echo "Loading ${1}... Please wait...". - linux KERNEL_LIVE APPEND_LIVE toram locales=en_US.UTF-8 - initrd INITRD_LIVE + #echo "Please wait...". + linux /live/vmlinuz-5.18.0-0.deb11.4-amd64 boot=live config findiso=${iso_path} toram locales=en_US.UTF-8 quiet splash + initrd /live/initrd.img-5.18.0-0.deb11.4-amd64 } submenu 'Advanced options...' { # More installer entries (if any) -LINUX_LIVE -LINUX_ADVANCED_INSTALL +menuentry "Live system" --hotkey=l { + linux /live/vmlinuz-5.18.0-0.deb11.4-amd64 boot=live config findiso=${iso_path} + initrd /live/initrd.img-5.18.0-0.deb11.4-amd64 +} +menuentry "Live system (fail-safe mode)" { + linux /live/vmlinuz-5.18.0-0.deb11.4-amd64 boot=live components memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=788 + initrd /live/initrd.img-5.18.0-0.deb11.4-amd64 +} +source /boot/grub/install.cfg # Memtest (if any) -MEMTEST + } \ No newline at end of file diff --git a/config/bootloaders/grub-pc/live-theme/theme.txt b/config/bootloaders/grub-pc/live-theme/theme.txt index 6c1d4a2..fea3ab3 100644 --- a/config/bootloaders/grub-pc/live-theme/theme.txt +++ b/config/bootloaders/grub-pc/live-theme/theme.txt @@ -1,7 +1,7 @@ desktop-image: "../splash.png" title-color: "#ffffff" title-font: "DejaVu Sans Bold 16" -title-text: "CLI-Testing" +title-text: "Kiosk-Testing" message-font: "Unifont Regular 16" terminal-font: "Unifont Regular 16" diff --git a/config/bootloaders/isolinux/menu.cfg b/config/bootloaders/isolinux/menu.cfg index eb890d0..f9f5b1a 100644 --- a/config/bootloaders/isolinux/menu.cfg +++ b/config/bootloaders/isolinux/menu.cfg @@ -1,36 +1,19 @@ -timeout 100 -menu hshift 0 -menu width 82 - -menu title CLI-Testing +timeout 1 +prompt 0 +DEFAULT live-ram +menu title Kiosk-Testing include stdmenu.cfg - +MENU HIDDEN label live menu label ^Live system linux /live/vmlinuz initrd /live/initrd.img - append boot=live config locales=en_US.UTF-8 + append boot=live config locales=en_US.UTF-8 quiet splash label live-ram menu label ^Live system (ToRam) - menu default linux /live/vmlinuz initrd /live/initrd.img - append boot=live config toram locales=en_US.UTF-8 - -menu begin advanced - menu title Advanced options - include stdmenu.cfg - - label live-failsafe - menu label ^Live (amd64 failsafe) - linux /live/vmlinuz - initrd /live/initrd.img - append boot=live components memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=788 - - label mainmenu - menu label ^Back.. - menu exit - + append boot=live config toram locales=en_US.UTF-8 quiet splash menu clear diff --git a/config/hooks/normal/0090-remove-unwanted-packages.hook.chroot b/config/hooks/normal/0090-remove-unwanted-packages.hook.chroot index 56eb28f..1402af6 100755 --- a/config/hooks/normal/0090-remove-unwanted-packages.hook.chroot +++ b/config/hooks/normal/0090-remove-unwanted-packages.hook.chroot @@ -1,6 +1,6 @@ #!/bin/bash echo "I: running $0" -apt -y purge exim4-base nfs-common rpcbind firmware-netronome grub* +apt -y purge exim4-base nfs-common rpcbind firmware-netronome grub* nvidia* glx* update-glx if [ -f "/usr/bin/x86_64" ] ; then apt purge $(apt list --installed |grep linux-image |grep -v bpo| sed 's#/.*##') -y diff --git a/config/hooks/normal/0092-remove-liveconf-startx.hook.chroot b/config/hooks/normal/0092-remove-liveconf-startx.hook.chroot new file mode 100644 index 0000000..d083067 --- /dev/null +++ b/config/hooks/normal/0092-remove-liveconf-startx.hook.chroot @@ -0,0 +1,3 @@ +#!/bin/bash +#Remove start trigger generator for automaticaly starting X +rm -f /lib/live/config/0140-xinit \ No newline at end of file diff --git a/config/includes.chroot/etc/chromium/policies/managed/policies.json b/config/includes.chroot/etc/chromium/policies/managed/policies.json new file mode 100644 index 0000000..fd5fad7 --- /dev/null +++ b/config/includes.chroot/etc/chromium/policies/managed/policies.json @@ -0,0 +1,6 @@ +{ + "TranslateEnabled":false, + "PasswordManagerEnabled":false, + "VideoCaptureAllowed":true, + "VideoCaptureAllowedUrls":["http://[*.]","https://[*.]"] +} \ No newline at end of file diff --git a/config/includes.chroot/etc/plymouth/plymouthd.conf b/config/includes.chroot/etc/plymouth/plymouthd.conf new file mode 100644 index 0000000..b84ddef --- /dev/null +++ b/config/includes.chroot/etc/plymouth/plymouthd.conf @@ -0,0 +1,2 @@ +[Daemon] +Theme=tribar \ No newline at end of file diff --git a/config/includes.chroot/etc/skel/.bashrc b/config/includes.chroot/etc/skel/.bashrc new file mode 100644 index 0000000..49a5ee1 --- /dev/null +++ b/config/includes.chroot/etc/skel/.bashrc @@ -0,0 +1,39 @@ +#Clear screen on startup +clear +#Functions +NetCheck(){ + unset counter + while [[ $counter -lt 3 && "$Net" = "false" ]] + do + sleep 5 + ping -q -c1 ictmaatwerk.com &>/dev/null && Net=true || Net=false + counter=$(( $counter + 1 )) + done +} + +#Check for network +echo "Waiting for network" +ping -q -c1 google.com &>/dev/null && Net=true || Net=false +#If no network enter wait loop +NetCheck + +#Check for manual retry for netwerk +while [[ "$Net" = "false" ]]; do + read -p "Network could not be initialized, Try again (y/n) " yn + case $yn in + [yY]* ) + NetCheck + break;; + [Nn]* ) break;; + * ) echo invalid response;; + esac +done + +#Check if video and network are ok, else error out +if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]] && [[ "$Net" = "true" ]]; then + echo "Loading, please wait..." + exec startx >/dev/null 2>&1 +else + echo "System could not be initialized, exited" + sleep 10000 +fi \ No newline at end of file diff --git a/config/includes.chroot/etc/skel/.hushlogin b/config/includes.chroot/etc/skel/.hushlogin new file mode 100644 index 0000000..e69de29 diff --git a/config/includes.chroot/etc/skel/.nanorc b/config/includes.chroot/etc/skel/.nanorc deleted file mode 100644 index ad64ca9..0000000 --- a/config/includes.chroot/etc/skel/.nanorc +++ /dev/null @@ -1,3 +0,0 @@ -#set tabstospaces -set tabsize 4 -# include ~/.nano/*.nanorc diff --git a/config/includes.chroot/etc/skel/.xinitrc b/config/includes.chroot/etc/skel/.xinitrc new file mode 100644 index 0000000..9dd6f7c --- /dev/null +++ b/config/includes.chroot/etc/skel/.xinitrc @@ -0,0 +1,12 @@ +#Disable dpms to prevent screen from blanking +xset -dpms; xset s off + +#Configure displays (man xrandr for more options) +xrandr --output DP1 --prefered +xrandr --output HDMI1 --prefered + +#Start matchbox wm (man matchbox-window-manager for more options) +exec matchbox-window-manager -use_titlebar no -use_cursor no & + +#Open browser +exec chromium --kiosk --no-first-run --disable --disable-infobars --disable-suggestions-service --app="https://wm.ictmaatwerk.com/test" \ No newline at end of file diff --git a/config/includes.chroot/etc/systemd/logind.conf b/config/includes.chroot/etc/systemd/logind.conf new file mode 100644 index 0000000..1f64d11 --- /dev/null +++ b/config/includes.chroot/etc/systemd/logind.conf @@ -0,0 +1,3 @@ +[Login] +NAutoVTs=1 +ReserveVT=1 \ No newline at end of file diff --git a/config/includes.chroot/etc/systemd/system/default.target b/config/includes.chroot/etc/systemd/system/default.target new file mode 120000 index 0000000..08ace2a --- /dev/null +++ b/config/includes.chroot/etc/systemd/system/default.target @@ -0,0 +1 @@ +/lib/systemd/system/multi-user.target \ No newline at end of file diff --git a/config/package-lists/development.list.chroot b/config/package-lists/development.list.chroot index 9e39a10..359850e 100644 --- a/config/package-lists/development.list.chroot +++ b/config/package-lists/development.list.chroot @@ -1,14 +1,10 @@ #Section: Shell & basic utilities bash autojump -bash-completion pv -sed util-linux util-linux-locales -whiptail moreutils -less #Section: Packaging checkinstall debconf-utils diff --git a/config/package-lists/kiosk.list.chroot b/config/package-lists/kiosk.list.chroot new file mode 100644 index 0000000..1f84552 --- /dev/null +++ b/config/package-lists/kiosk.list.chroot @@ -0,0 +1,10 @@ +matchbox-window-manager +x11-xserver-utils +xinit +xserver-xorg-core +xserver-xorg-input-all +chromium +discover +discover-data +alsa-utils +plymouth \ No newline at end of file diff --git a/config/package-lists/network.list.chroot b/config/package-lists/network.list.chroot index bb27b5e..99dd388 100644 --- a/config/package-lists/network.list.chroot +++ b/config/package-lists/network.list.chroot @@ -1,6 +1,6 @@ #Section: Downloaders/web crawlers -curl -wget +#curl +#wget #Section: Network management network-manager diff --git a/config/package-lists/system.list.chroot b/config/package-lists/system.list.chroot index 531deb9..afc8459 100644 --- a/config/package-lists/system.list.chroot +++ b/config/package-lists/system.list.chroot @@ -10,27 +10,11 @@ debsecan debsums vrms -#Section: Task management/monitoring -htop -iotop -lm-sensors -hddtemp -inxi -lsof -strace -#memtest86+ - #Section: Disk management -dfc -smartmontools -mtools -hdparm -sdparm kpartx xorriso #Section: Scheduling -at #Section: Security & sandboxing apparmor @@ -51,9 +35,7 @@ chrony #Section: Kernel/boot/init systemd -#os-prober initramfs-tools -#console-setup user-setup libpam-systemd diff --git a/config/package-lists/utility.list.chroot b/config/package-lists/utility.list.chroot index 3bb505c..98c2a82 100644 --- a/config/package-lists/utility.list.chroot +++ b/config/package-lists/utility.list.chroot @@ -3,10 +3,6 @@ #Section: Archive management squashfs-tools -#Section: Text editors -#Description: nano -nano - #Section: Desktop configuration utilities dconf-cli @@ -15,11 +11,7 @@ vbetool usbutils acpi acpi-support-base -#laptop-mode-tools -#fancontrol rfkill -#cpufrequtils -#pm-utils #Section: Other sudo