public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/catalyst:dilfridge/qcow2 commit in: targets/diskimage-stage1/, diskimage/fstar/, targets/diskimage-stage2/, ...
@ 2024-09-27 22:48 Andreas K. Hüttel
  0 siblings, 0 replies; only message in thread
From: Andreas K. Hüttel @ 2024-09-27 22:48 UTC (permalink / raw
  To: gentoo-commits

commit:     c78cce0587da9bd577ac5e0f27e3c6a8b752b840
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  8 12:39:15 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Fri Sep 27 22:47:49 2024 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=c78cce05

Start copying the livecd infrastructure for diskimage

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 diskimage/files/README.txt                         | 111 +++++++++++++++++++++
 diskimage/files/generic.motd.txt                   |   9 ++
 diskimage/files/livecd-bash_profile                |   4 +
 diskimage/files/livecd-bashrc                      |   1 +
 diskimage/files/livecd-local.start                 |  20 ++++
 diskimage/files/livecd.motd.txt                    |  11 ++
 diskimage/files/minimal.motd.txt                   |  11 ++
 .../fstar/aboot-1.0_pre20040408-r2-cdtar.tar.bz2   | Bin 0 -> 24602 bytes
 diskimage/fstar/arcload-0.43-r1.tbz2               | Bin 0 -> 24668 bytes
 .../fstar/isolinux-elilo-memtest86+-cdtar.tar.bz2  | Bin 0 -> 210434 bytes
 targets/diskimage-stage1/chroot.sh                 |   5 +
 targets/diskimage-stage1/controller.sh             |  16 +++
 targets/diskimage-stage1/preclean-chroot.sh        |   5 +
 targets/diskimage-stage2/controller.sh             | 105 +++++++++++++++++++
 14 files changed, 298 insertions(+)

diff --git a/diskimage/files/README.txt b/diskimage/files/README.txt
new file mode 100644
index 00000000..ebf67691
--- /dev/null
+++ b/diskimage/files/README.txt
@@ -0,0 +1,111 @@
+
+This lists the possible command line options that can be used to tweak the boot
+process of this CD.  This lists the Gentoo-specific options, along with a few
+options that are built-in to the kernel, but that have been proven very useful
+to our users.  Also, all options that start with "do" have a "no" inverse, that
+does the opposite.  For example, "doscsi" enables SCSI support in the initial
+ramdisk boot, while "noscsi" disables it.
+
+
+Hardware options:
+acpi=on         This loads support for ACPI and also causes the acpid daemon to
+                be started by the CD on boot.  This is only needed if your
+                system requires ACPI to function properly.  This is not
+                required for Hyperthreading support.
+acpi=off        Completely disables ACPI.  This is useful on some older systems
+                and is also a requirement for using APM.  This will disable any
+                Hyperthreading support of your processor.
+console=X       This sets up serial console access for the CD.  The first
+                option is the device, usually ttyS0 on x86, followed by any
+                connection options, which are comma separated.  The default
+                options are 9600,8,n,1.
+dmraid=X        This allows for passing options to the device-mapper RAID
+                subsystem.  Options should be encapsulated in quotes.
+doapm           This loads APM driver support.  This requires you to also use
+                acpi=off.
+dopcmcia        This loads support for PCMCIA and Cardbus hardware and also
+                causes the pcmcia cardmgr to be started by the CD on boot.
+                This is only required when booting from PCMCIA/Cardbus devices.
+doscsi          This loads support for most SCSI controllers.  This is also a
+                requirement for booting most USB devices, as they use the SCSI
+                subsystem of the kernel.
+hda=stroke      This allows you to partition the whole hard disk even when your
+                BIOS is unable to handle large disks.  This option is only used
+                on machines with an older BIOS.  Replace hda with the device
+                that is requiring this option.
+ide=nodma       This forces the disabling of DMA in the kernel and is required
+                by some IDE chipsets and also by some CDROM drives.  If your
+                system is having trouble reading from your IDE CDROM, try this
+                option.  This also disables the default hdparm settings from
+                being executed.
+noapic          This disables the Advanced Programmable Interrupt Controller
+                that is present on newer motherboards.  It has been known to
+                cause some problems on older hardware.
+nodetect        This disables all of the autodetection done by the CD,
+                including device autodetection and DHCP probing.  This is
+                useful for doing debugging of a failing CD or driver.
+nodhcp          This disables DHCP probing on detected network cards.  This is
+                useful on networks with only static addresses.
+nodmraid        Disables support for device-mapper RAID, such as that used for
+                on-board IDE/SATA RAID controllers.
+nofirewire      This disables the loading of Firewire modules.  This should
+                only be necessary if your Firewire hardware is causing
+                a problem with booting the CD.
+nogpm           This diables gpm console mouse support.
+nohotplug       This disables the loading of the hotplug and coldplug init
+                scripts at boot.  This is useful for doing debugging of a
+                failing CD or driver.
+nokeymap        This disables the keymap selection used to select non-US
+                keyboard layouts.
+nolapic         This disables the local APIC on Uniprocessor kernels.
+nosata          This disables the loading of Serial ATA modules.  This is used
+                if your system is having problems with the SATA subsystem.
+nosmp           This disables SMP, or Symmetric Multiprocessing, on SMP-enabled
+                kernels.  This is useful for debugging SMP-related issues with
+                certain drivers and motherboards.
+nosound         This disables sound support and volume setting.  This is useful
+                for systems where sound support causes problems.
+nousb           This disables the autoloading of USB modules.  This is useful
+                for debugging USB issues.
+slowusb         This adds some extra pauses into the boot process for slow
+                USB CDROMs, like in the IBM BladeCenter.
+Volume/Device Management:
+doevms          This enables support for IBM's pluggable EVMS, or Enterprise
+                Volume Management System.  This is not safe to use with lvm2.
+dolvm           This enables support for Linux's Logical Volume Management.
+                This is not safe to use with evms2.
+Screen reader access:
+speakup.synth=synth  starts speakup using a given synthesizer.
+                     supported synths are acntpc, acntsa, apollo, audptr, bns,
+                     decext, dectlk, dtlk, keypc, ltlk, spkout and txprt.
+                     Also, soft is supported for software speech and dummy is
+                     supported for testing.
+speakup.quiet=1      sets the synthesizer not to speak until a key is pressed.
+speakup_SYNTH.port=n sets the port for internal synthesizers.
+speakup_SYNTH.ser=n  sets the serial port for external synthesizers.
+Other options:
+debug           Enables debugging code.  This might get messy, as it displays
+                a lot of data to the screen.
+docache         This caches the entire runtime portion of the CD into RAM,
+                which allows you to umount /mnt/cdrom and mount another CDROM.
+                This option requires that you have at least twice as much
+                available RAM as the size of the CD.
+doload=X        This causes the initial ramdisk to load any module listed, as
+                well as dependencies.  Replace X with the module name.
+                Multiple modules can be specified by a comma-separated list.
+dosshd          Starts sshd on boot, which is useful for unattended installs.
+passwd=foo      Sets whatever follows the equals as the root password, which
+                is required for dosshd since we scramble the root password.
+noload=X        This causes the initial ramdisk to skip the loading of a
+                specific module that may be causing a problem.  Syntax matches
+                that of doload.
+nogui		This causes an X-enabled LiveCD to not automatically start X,
+		but rather, to drop to the command line instead.
+nonfs           Disables the starting of portmap/nfsmount on boot.
+scandelay       This causes the CD to pause for 10 seconds during certain
+                portions the boot process to allow for devices that are slow to
+                initialize to be ready for use.
+scandelay=X     This allows you to specify a given delay, in seconds, to be
+                added to certain portions of the boot process to allow for
+                devices that are slow to initialize to be ready for use.
+                Replace X with the number of seconds to pause.

diff --git a/diskimage/files/generic.motd.txt b/diskimage/files/generic.motd.txt
new file mode 100644
index 00000000..fb931d6c
--- /dev/null
+++ b/diskimage/files/generic.motd.txt
@@ -0,0 +1,9 @@
+##GREETING
+
+The root password on this system has been auto-scrambled for security.
+
+If any ethernet adapters were detected at boot, they should be auto-configured
+if DHCP is available on your network.  Type "net-setup eth0" to specify eth0 IP
+address settings by hand.
+
+Check /etc/kernels/kernel-config-* for kernel configuration(s).

diff --git a/diskimage/files/livecd-bash_profile b/diskimage/files/livecd-bash_profile
new file mode 100644
index 00000000..cebe8ca2
--- /dev/null
+++ b/diskimage/files/livecd-bash_profile
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+#This file is sourced by bash when you log in interactively.
+[[ -f ~/.bashrc ]] && source ~/.bashrc

diff --git a/diskimage/files/livecd-bashrc b/diskimage/files/livecd-bashrc
new file mode 100644
index 00000000..a9bf588e
--- /dev/null
+++ b/diskimage/files/livecd-bashrc
@@ -0,0 +1 @@
+#!/bin/bash

diff --git a/diskimage/files/livecd-local.start b/diskimage/files/livecd-local.start
new file mode 100644
index 00000000..a7bb2bef
--- /dev/null
+++ b/diskimage/files/livecd-local.start
@@ -0,0 +1,20 @@
+#!/bin/bash
+# /etc/conf.d/local.start
+
+# This is a good place to load any misc.
+# programs on startup ( 1>&2 )
+
+#if [ -d /usr/livecd/db ]
+#then
+#	ln -sf /usr/livecd/db /var/db
+#fi
+
+if [ -d /usr/livecd/profiles ]
+then
+	ln -sf /usr/livecd/profiles /var/db/repos/gentoo/profiles
+fi
+
+if [ -d /usr/livecd/eclass ]
+then
+	ln -sf /usr/livecd/eclass /var/db/repos/gentoo/eclass
+fi

diff --git a/diskimage/files/livecd.motd.txt b/diskimage/files/livecd.motd.txt
new file mode 100644
index 00000000..029c2f6e
--- /dev/null
+++ b/diskimage/files/livecd.motd.txt
@@ -0,0 +1,11 @@
+The latest version of the Handbook is always available from the Gentoo web
+site by typing "links https://wiki.gentoo.org/wiki/Handbook".
+
+To start an ssh server on this system, type "/etc/init.d/sshd start".  If you
+need to log in remotely as root, type "passwd root" to reset root's password
+to a known value.
+
+Please report any bugs you find to https://bugs.gentoo.org. Be sure to include
+detailed information about how to reproduce the bug you are reporting.
+
+Thank you for using Gentoo Linux!

diff --git a/diskimage/files/minimal.motd.txt b/diskimage/files/minimal.motd.txt
new file mode 100644
index 00000000..029c2f6e
--- /dev/null
+++ b/diskimage/files/minimal.motd.txt
@@ -0,0 +1,11 @@
+The latest version of the Handbook is always available from the Gentoo web
+site by typing "links https://wiki.gentoo.org/wiki/Handbook".
+
+To start an ssh server on this system, type "/etc/init.d/sshd start".  If you
+need to log in remotely as root, type "passwd root" to reset root's password
+to a known value.
+
+Please report any bugs you find to https://bugs.gentoo.org. Be sure to include
+detailed information about how to reproduce the bug you are reporting.
+
+Thank you for using Gentoo Linux!

diff --git a/diskimage/fstar/aboot-1.0_pre20040408-r2-cdtar.tar.bz2 b/diskimage/fstar/aboot-1.0_pre20040408-r2-cdtar.tar.bz2
new file mode 100644
index 00000000..58a46f40
Binary files /dev/null and b/diskimage/fstar/aboot-1.0_pre20040408-r2-cdtar.tar.bz2 differ

diff --git a/diskimage/fstar/arcload-0.43-r1.tbz2 b/diskimage/fstar/arcload-0.43-r1.tbz2
new file mode 100644
index 00000000..77ce2cb4
Binary files /dev/null and b/diskimage/fstar/arcload-0.43-r1.tbz2 differ

diff --git a/diskimage/fstar/isolinux-elilo-memtest86+-cdtar.tar.bz2 b/diskimage/fstar/isolinux-elilo-memtest86+-cdtar.tar.bz2
new file mode 100644
index 00000000..93e7dc88
Binary files /dev/null and b/diskimage/fstar/isolinux-elilo-memtest86+-cdtar.tar.bz2 differ

diff --git a/targets/diskimage-stage1/chroot.sh b/targets/diskimage-stage1/chroot.sh
new file mode 100755
index 00000000..d143927e
--- /dev/null
+++ b/targets/diskimage-stage1/chroot.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+source /tmp/chroot-functions.sh
+
+run_merge --update --deep --newuse "${clst_packages}"

diff --git a/targets/diskimage-stage1/controller.sh b/targets/diskimage-stage1/controller.sh
new file mode 100755
index 00000000..1e27237b
--- /dev/null
+++ b/targets/diskimage-stage1/controller.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+source ${clst_shdir}/support/functions.sh
+
+## START RUNSCRIPT
+
+case $1 in
+	build_packages)
+		shift
+		export clst_packages="$*"
+		mkdir -p ${clst_chroot_path}/tmp
+		exec_in_chroot \
+			${clst_shdir}/${clst_target}/chroot.sh
+		;;
+esac
+exit $?

diff --git a/targets/diskimage-stage1/preclean-chroot.sh b/targets/diskimage-stage1/preclean-chroot.sh
new file mode 100755
index 00000000..5353f67d
--- /dev/null
+++ b/targets/diskimage-stage1/preclean-chroot.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+source /tmp/chroot-functions.sh
+
+cleanup_stages

diff --git a/targets/diskimage-stage2/controller.sh b/targets/diskimage-stage2/controller.sh
new file mode 100755
index 00000000..210cc767
--- /dev/null
+++ b/targets/diskimage-stage2/controller.sh
@@ -0,0 +1,105 @@
+#!/bin/bash
+
+source ${clst_shdir}/support/functions.sh
+
+case $1 in
+	pre-kmerge)
+		# Sets up the build environment before any kernels are compiled
+		exec_in_chroot ${clst_shdir}/support/pre-kmerge.sh
+		;;
+
+	kernel)
+		shift
+		export kname="$1"
+
+		[ -n "${clst_linuxrc}" ] && \
+			copy_to_chroot ${clst_linuxrc} /tmp/linuxrc
+		exec_in_chroot ${clst_shdir}/support/kmerge.sh
+		delete_from_chroot /tmp/linuxrc
+
+		extract_modules ${clst_chroot_path} ${kname}
+		;;
+
+	pre-distkmerge)
+		# Install dracut
+		exec_in_chroot ${clst_shdir}/support/pre-distkmerge.sh
+		;;
+
+	preclean)
+		# move over the environment
+		cp -f ${clst_sharedir}/livecd/files/livecd-bashrc \
+			${clst_chroot_path}/root/.bashrc
+		cp -f ${clst_sharedir}/livecd/files/livecd-bash_profile \
+			${clst_chroot_path}/root/.bash_profile
+		cp -f ${clst_sharedir}/livecd/files/livecd-local.start \
+			${clst_chroot_path}/etc/conf.d/local.start
+		;;
+
+	livecd-update)
+		# Now, finalize and tweak the livecd fs (inside of the chroot)
+		exec_in_chroot ${clst_shdir}/support/livecdfs-update.sh
+		;;
+
+	rc-update)
+		exec_in_chroot ${clst_shdir}/support/rc-update.sh
+		;;
+
+	fsscript)
+		exec_in_chroot ${clst_fsscript}
+		;;
+
+	clean)
+		if [ "${clst_diskimage_type}" = "gentoo-release-minimal" ]
+		then
+			# Clean out man, info and doc files
+			rm -rf ${clst_chroot_path}/usr/share/{man,doc,info}/*
+		fi
+		;;
+
+	bootloader)
+		shift
+		# Here is where we poke in our identifier
+		touch $1/livecd
+
+		# We create a firmware directory, if necessary
+		if [ -e ${clst_chroot_path}/lib/firmware.tar.bz2 ]
+		then
+			echo "Creating firmware directory in $1"
+			mkdir -p $1/firmware
+			# TODO: Unpack firmware into $1/firmware and remove it from the
+			# chroot so newer livecd-tools/genkernel can find it and unpack it.
+		fi
+
+		# Move over the readme (if applicable)
+		if [ -n "${clst_diskimage_readme}" ]
+		then
+			cp -f ${clst_diskimage_readme} $1/README.txt
+		else
+			cp -f ${clst_sharedir}/livecd/files/README.txt $1
+		fi
+
+		if [ -e ${clst_chroot_path}/boot/memtest86plus/ ]; then
+			cp -rv ${clst_chroot_path}/boot/memtest86plus/* $1
+		fi
+
+		${clst_shdir}/support/bootloader-setup.sh $1
+		;;
+
+	unmerge)
+		[ "${clst_diskimage_depclean}" != "no" ] && exec_in_chroot ${clst_shdir}/support/depclean.sh
+		shift
+        	export clst_packages="$*"
+		exec_in_chroot ${clst_shdir}/support/unmerge.sh
+	;;
+
+	target_image_setup)
+		shift
+		${clst_shdir}/support/target_image_setup.sh $1
+		;;
+
+	qcow2)
+		shift
+		${clst_shdir}/support/create-qcow2.sh $1
+		;;
+esac
+exit $?


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-09-27 22:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-27 22:48 [gentoo-commits] proj/catalyst:dilfridge/qcow2 commit in: targets/diskimage-stage1/, diskimage/fstar/, targets/diskimage-stage2/, Andreas K. Hüttel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox