diff --git a/src/.config b/src/.config index b22f8ffe8..65729dcdd 100644 --- a/src/.config +++ b/src/.config @@ -116,5 +116,10 @@ COPY_SOURCE_ISO=true # requires more than 1MB free space. The solution is to use folder overlay or to # edit the script 'xx_generate_iso.sh' and set it to create sparse image file # with bigger size. -BUILD_OVERLAY_SOFTWARE=true +BUILD_OVERLAY_SOFTWARE=false + +# This property enables the standard penguin boot logo in the upper left corner +# of the screen. The property is used in 'xx_build_kernel.sh'. The default value +# is 'true' for demonstration purposes. +USE_BOOT_LOGO=true diff --git a/src/02_build_kernel.sh b/src/02_build_kernel.sh index 6762ab5b8..ec10013b3 100755 --- a/src/02_build_kernel.sh +++ b/src/02_build_kernel.sh @@ -42,10 +42,19 @@ else # Step 2 - enable the 'xz' compression option. sed -i "s/.*CONFIG_KERNEL_XZ.*/CONFIG_KERNEL_XZ=y/" .config - #sed -i "s/.*CONFIG_DRM_CIRRUS_QEMU.*/CONFIG_DRM_CIRRUS_QEMU=y/" .config - #sed -i "s/.*CONFIG_DRM_BOCHS.*/CONFIG_DRM_BOCHS=y/" .config - #sed -i "s/.*CONFIG_FB_CIRRUS.*/CONFIG_FB_CIRRUS=y/" .config + # Enable the VESA framebuffer for graphics support. sed -i "s/.*CONFIG_FB_VESA.*/CONFIG_FB_VESA=y/" .config + + # Read the 'USE_BOOT_LOGO' property from '.config' + USE_BOOT_LOGO="$(grep -i USE_BOOT_LOGO $SRC_DIR/.config | cut -f2 -d'=')" + + if [ "$USE_BOOT_LOGO" = "true" ] ; then + sed -i "s/.*CONFIG_LOGO_LINUX_CLUT224.*/CONFIG_LOGO_LINUX_CLUT224=y/" .config + echo "Boot logo is enabled." + else + sed -i "s/.*CONFIG_LOGO_LINUX_CLUT224.*/\\# CONFIG_LOGO_LINUX_CLUT224 is not set/" .config + echo "Boot logo is disabled." + fi fi # Compile the kernel with optimization for 'parallel jobs' = 'number of processors'. diff --git a/src/minimal_rootfs/etc/03_init.sh b/src/minimal_rootfs/etc/03_init.sh index 1a1e3c647..b518bd7e0 100755 --- a/src/minimal_rootfs/etc/03_init.sh +++ b/src/minimal_rootfs/etc/03_init.sh @@ -37,15 +37,21 @@ # # exec /sbin/init +# Set cyan color. +echo -en "\\e[36m" + # Print message on screen. cat << CEOF - Press empty key (ESC, TAB, SPACE, ENTER) or wait 5 seconds to continue with - the system initialization process. Press any other key for PID 1 rescue shell + Press empty key (TAB, SPACE, ENTER) or wait 5 seconds to continue with the + system initialization process. Press any other key for PID 1 rescue shell outside of the initramfs area. CEOF +# Unset all attributes. +echo -en "\\e[0m" + # Wait 5 second or until any keybord key is pressed. read -t 5 -n1 -s key diff --git a/src/minimal_rootfs/etc/04_bootscript.sh b/src/minimal_rootfs/etc/04_bootscript.sh index 73ba48ceb..eca525462 100755 --- a/src/minimal_rootfs/etc/04_bootscript.sh +++ b/src/minimal_rootfs/etc/04_bootscript.sh @@ -26,7 +26,7 @@ # | # +--(2) /bin/sh (Alt + F4) -echo "Welcome to \"Minimal Linux Live\" (/sbin/init)" +echo -e "\\e[32mWelcome to \"Minimal Linux Live\" \\e[35m(/sbin/init)\\e[0m" for DEVICE in /sys/class/net/* ; do echo "Found network device ${DEVICE##*/}" diff --git a/src/minimal_rootfs/etc/inittab b/src/minimal_rootfs/etc/inittab index 60d007217..940d8370f 100644 --- a/src/minimal_rootfs/etc/inittab +++ b/src/minimal_rootfs/etc/inittab @@ -1,11 +1,13 @@ ::sysinit:/etc/04_bootscript.sh ::restart:/sbin/init -::shutdown:echo "Sync file buffers..." +::shutdown:echo -e "\n\\e[35mSync all file buffers...\\e[0m" ::shutdown:sync -::shutdown:echo "Unmount all filesystems..." +::shutdown:echo -e "\\e[35mUnmount all filesystems...\\e[0m" ::shutdown:umount -a -r +::shutdown:echo -e "\n\\e[32mSee you soon! :)\\e[0m\n" +::shutdown:sleep 1 ::ctrlaltdel:/sbin/reboot -::once:cat /etc/welcome.txt +::once:/etc/welcome.sh 32 ::respawn:/bin/cttyhack /bin/sh tty2::once:cat /etc/welcome.txt tty2::respawn:/bin/sh diff --git a/src/minimal_rootfs/etc/welcome.sh b/src/minimal_rootfs/etc/welcome.sh new file mode 100755 index 000000000..e76ac044c --- /dev/null +++ b/src/minimal_rootfs/etc/welcome.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Set cyan color. +echo -en "\\e[$1m" + +cat /etc/welcome.txt + +# Unset all attributes. +echo -en "\\e[0m" + diff --git a/src/minimal_rootfs/init b/src/minimal_rootfs/init index b494fdd26..67ce764e9 100755 --- a/src/minimal_rootfs/init +++ b/src/minimal_rootfs/init @@ -26,20 +26,27 @@ # | # +--(2) /bin/sh (Alt + F4) -echo "Welcome to \"Minimal Linux Live\" (/init)" +echo -e "\\e[32mWelcome to \"Minimal Linux Live\" \\e[35m(/init)\\e[0m" # Let's mount all core file systems. /etc/01_prepare.sh +# Set cyan color. +echo -en "\\e[36m" + # Print message on screen. cat << CEOF - Press empty key (ESC, TAB, SPACE, ENTER) or wait 5 seconds to continue with - the overlay initialization process. Press any other key for PID 1 rescue shell + Press empty key (TAB, SPACE, ENTER) or wait 5 seconds to continue with the + overlay initialization process. Press any other key for PID 1 rescue shell inside the initramfs area. CEOF +# Unset all attributes. +echo -en "\\e[0m" + + # Wait 5 second or until any keybord key is pressed. read -t 5 -n1 -s key diff --git a/src/qemu32.sh b/src/qemu32.sh index 30dc938c8..ab047f451 100755 --- a/src/qemu32.sh +++ b/src/qemu32.sh @@ -9,7 +9,7 @@ if [ "$1" = "-hdd" -o "$1" = "-h" ] ; then echo "Starting QEMU with attached ISO image and hard disk." - qemu-system-i386 -m 64M -cdrom minimal_linux_live.iso -hda hdd.img -boot d + qemu-system-i386 -m 64M -cdrom minimal_linux_live.iso -hda hdd.img -boot d -vga std else echo "Starting QEMU with attached ISO image and no hard disk." qemu-system-i386 -m 64M -cdrom minimal_linux_live.iso -boot d -vga std diff --git a/src/qemu64.sh b/src/qemu64.sh index bdc575174..c261e0046 100755 --- a/src/qemu64.sh +++ b/src/qemu64.sh @@ -9,9 +9,9 @@ if [ "$1" = "-hdd" -o "$1" = "-h" ] ; then echo "Starting QEMU with attached ISO image and hard disk." - qemu-system-x86_64 -m 64M -cdrom minimal_linux_live.iso -hda hdd.img -boot d + qemu-system-x86_64 -m 64M -cdrom minimal_linux_live.iso -hda hdd.img -boot d -vga std else echo "Starting QEMU with attached ISO image." - qemu-system-x86_64 -m 64M -cdrom minimal_linux_live.iso -boot d + qemu-system-x86_64 -m 64M -cdrom minimal_linux_live.iso -boot d -vga std fi