NetBSD/usr.sbin/sysinst
hannken 050294fac1 Increase length of set description to 40 characters so recent additions fit.
Ok: martin@

Fixes PR install/58188 "sysinst fails to display status of base32 set"
2024-04-25 11:25:08 +00:00
..
arch Add new sets: base32, debug32, manhtml 2024-04-09 15:17:21 +00:00
Makefile First crack at virt68k sysinst support, more-or-less cloned from mvme68k 2024-01-06 07:38:13 +00:00
Makefile.inc Move MIPS N64 compat out of {base,debug}32 into {base,debug}64 2024-04-22 14:41:24 +00:00
README.md_defs Provide a disklabel specific MD hook MD_DISKLABEL_PART_INDEX_CHECK 2023-01-06 15:05:52 +00:00
SPELLING.en
TODO
aout2elf.c
bsddisklabel.c When matching real partitions to "wanted" install descriptions, skip 2023-01-06 18:19:27 +00:00
checkrc.c sysinst: remove trailing whitespace from *.c *.h 2021-01-31 22:45:46 +00:00
configmenu.c PR 58062: fix a bug I introduced with the https support: update 2024-03-24 16:06:37 +00:00
defs.h Move MIPS N64 compat out of {base,debug}32 into {base,debug}64 2024-04-22 14:41:24 +00:00
defsizes.h
disklabel.c fix misplaced or missing "e" in words with "ment" ending (argument, implement, 2024-02-08 20:51:24 +00:00
disks.c Fix typo in comment. 2023-06-24 05:18:12 +00:00
disks_lfs.c
endian.h
factor.c sysinst: warp factor.c to the 21st century 2021-01-31 20:51:04 +00:00
geom.c sysinst: remove trailing whitespace from *.c *.h 2021-01-31 22:45:46 +00:00
gpt.c PR 58061: fix bug in the GPT backend: when inserting a partition 2024-03-24 17:29:58 +00:00
gpt_uuid.c
install.c cosmetics: fix indentation 2023-01-06 18:13:40 +00:00
label.c PR 57927: when comparing old and new partition state during renumbering, 2024-02-14 13:52:11 +00:00
main.c Defer deletion of any color menu options untill the final menu (in the 2024-02-21 20:31:57 +00:00
mbr.c fix typo in method name: part_attr_fornat_str -> part_attr_format_str. 2024-04-11 06:42:18 +00:00
mbr.h
menus.entropy Add a https transfer method (sharing all host details with the http 2023-12-17 18:46:42 +00:00
menus.mi Add a https transfer method (sharing all host details with the http 2023-12-17 18:46:42 +00:00
menus.pm
msg.entropy.de Make default installations a bit more secure: 2022-04-21 17:30:15 +00:00
msg.entropy.en Make default installations a bit more secure: 2022-04-21 17:30:15 +00:00
msg.entropy.es Make default installations a bit more secure: 2022-04-21 17:30:15 +00:00
msg.entropy.fr Make default installations a bit more secure: 2022-04-21 17:30:15 +00:00
msg.entropy.pl Make default installations a bit more secure: 2022-04-21 17:30:15 +00:00
msg.mbr.de
msg.mbr.en
msg.mbr.es
msg.mbr.fr
msg.mbr.pl
msg.mi.de Increase length of set description to 40 characters so recent additions fit. 2024-04-25 11:25:08 +00:00
msg.mi.en Increase length of set description to 40 characters so recent additions fit. 2024-04-25 11:25:08 +00:00
msg.mi.es Increase length of set description to 40 characters so recent additions fit. 2024-04-25 11:25:08 +00:00
msg.mi.fr Move MIPS N64 compat out of {base,debug}32 into {base,debug}64 2024-04-22 14:41:24 +00:00
msg.mi.pl Increase length of set description to 40 characters so recent additions fit. 2024-04-25 11:25:08 +00:00
msg.pm.de Add (experimental) entropy input support: 2020-11-04 14:29:40 +00:00
msg.pm.en Remove an unused message (accidently placed inconsistently in 2020-11-05 11:10:11 +00:00
msg.pm.es Remove an unused message (accidently placed inconsistently in 2020-11-05 11:10:11 +00:00
msg.pm.fr Remove an unused message (accidently placed inconsistently in 2020-11-05 11:10:11 +00:00
msg.pm.pl Remove an unused message (accidently placed inconsistently in 2020-11-05 11:10:11 +00:00
msg_cmp.sh
msg_xlat.sh sysinst: fix typo in comment 2021-10-11 18:46:34 +00:00
net.c Add a https transfer method (sharing all host details with the http 2023-12-17 18:46:42 +00:00
part_edit.c sysinst: Center the select_part_scheme menu horizontally 2022-05-15 15:06:59 +00:00
partitions.c Add missing double p and d for stopped and overriden accordingly. 2021-09-11 20:28:03 +00:00
partitions.h When matching real partitions to "wanted" install descriptions, skip 2023-01-06 18:19:27 +00:00
partman.c PR 57698: avoid a few potential sysinst crashes in environments where 2023-11-25 19:43:26 +00:00
run.c Make default installations a bit more secure: 2022-04-21 17:30:15 +00:00
sizemultname.c
sysinst.8 Sort options and their descriptions. 2022-01-28 19:36:00 +00:00
target.c x86: fix previous: in the UEFI case copy the bootloaders from install 2022-02-10 16:11:41 +00:00
txtwalk.c sysinst: remove trailing whitespace from *.c *.h 2021-01-31 22:45:46 +00:00
txtwalk.h
unif.awk
upgrade.c Use proper ANSI function declarations. 2022-06-24 22:05:24 +00:00
util.c Increase length of set description to 40 characters so recent additions fit. 2024-04-25 11:25:08 +00:00
wskbd.c sysinst: remove trailing whitespace from *.c *.h 2021-01-31 22:45:46 +00:00

README.md_defs

/* $NetBSD: README.md_defs,v 1.8 2023/01/06 15:05:52 martin Exp $ */

The following is trying to document the most important machine dependent
defines used in the sysinst code.


If HAVE_GPT is true, the MD code may limit the space used for the
GPT at the beginning of the disk to allow e.g. a bootloader
being added after it (see evbarm on allwinner SoCs, u-boot is
copied at 8k into the image).

/* Size limit for the initial GPT part, in bytes */
#define	MD_GPT_INITIAL_SIZE		(8*1024)


The default installation description is created as a static array using
lots of conditionals. It may be overridden / replaced in the MD code
(see below), an example for that is arch/i386/md.c when we have been
booted from UEFI firmware.

Name		Value / example		Description
PART_BOOT	(8*MEG) (undefined)	if defined, a boot partition
					of this size (in bytes, rounded)
					will be part of the default partition
					suggestions. Must be compile time
					const! Use MD_PART_DEFAULTS if
					runtime adjustment is needed.
PART_BOOT_MOUNT	"/boot" (undefined)	Add boot partition to fstab for
					this mount point
PART_BOOT_TYPE	FS_BSDFS		Kind of filesystem used
PART_BOOT_SUBT	MBR_PTYPE_FAT12		File system specific sub type


The boot partition is always inserted at the front of the suggested default
partitions, to cope with firmwares that may not be able to load from the
whole disk.

If multiple boot partitions are required (see ofppc, where various schemes
are supported, depending on exact model), the variables above can all be
repeated with _BOOT1_ or _BOOT2_ name instead of _BOOT_.


ATTENTION:
	PART_BOOT	is in BYTE (not MB), while most other sizes
			(DEFROOTSIZE, DEFSWAP, ...) are in MB!


The following macros provide optional MD hooks:

MD_PART_DEFAULTS	may be undefined

used like:

	void MD_PART_DEFAULTS(struct pm_dev*, struct part_usage_info*,
	    size_t num_usage_infos),

Called before any of the partition usage defaults is ever used, can be used
to adjust e.g. partition sizes to actual system requirements (align boot
partition with cylindersize), or (since it is a macro and all params are
by references) to completely swap the defaults (e.g. EFI vs. biosboot).
If swapping, make sure allocation and num_usage_infos stays consistent,
old allocation is done by calloc(3), use free(3) to release.


MD_NEED_BOOTBLOCK	may be undefined

used like:

	bool MD_NEED_BOOTBLOCK(struct install_partition_desc *install)

returns true if this setup needs boot blocks. Used for example on x86
when UEFI installs do not need any bootblocks, but BIOS ones do.

MD_MAY_SWAP_TO		may be undefined

used  like:

	bool MD_MAY_SWAP_TO(const char *disk_name)

returns true if the disk is usable as a swap device. Typical implementation
in utils.c:may_swap_if_not_sdmmc.

MD_SET_EXTRACT_FINALIZE	may be undefined

used like:

	int MD_SET_EXTRACT_FINALIZE(int update)

extracts any additional parts of the distribution. Returns an error code
if something fails.


HAVE_PLAIN_DISKLABEL_BOOT	may be undefined, only used on architectures
				that have MBR as primary with disklabel as
				secondary partitioning scheme (RAW_PART == 3)

used like:

	bool HAVE_PLAIN_DISKLABEL_BOOT(const char *disk)

returns true if the disk could be made bootable with only a disklabel
(and no MBR).


DISKLABEL_NO_ONDISK_VERIFY	usually undefined

If defined, do not verify the presence of on-disk disklabels before
offering the disklabel partitioning scheme. This allows ports to use
kernel translation for the disklabel ioctls (e.g. x68k uses Human68k
partitions this way).


HAVE_GPT_BOOT			defined if the architecture can boot from GPT

HAVE_EFI_BOOT			defined if the architecture may be able
				to boot from an EFI partition

NO_DISKLABEL_BOOT		defined if the architecture can NOT boot
				from a disklabel partitioned disk

MD_DISKLABEL_PART_INDEX_CHECK	usually undefined

				if defined evaluates to a boolean attribute
				which is passed a struct disklabel, an integer
				index and a const struct disk_part_info*.
				The result qualifies the given new partition
				to take the disklabel l_partition entry
				with the given index. Used for example
				in luna68k to move the FFSv1 boot partition
				(which would otherwise end up as partition 'a')
				to a partition past RAW_PART (so 'd' on luna68k)