NameDateSize

..Today173

aout2elf.cH A D12-Jun-201911.1 KiB

arch/HToday46

bsddisklabel.cH A D07-Jan-202354 KiB

checkrc.cH A D01-Feb-20213.2 KiB

configmenu.cH A D25-Mar-202412.9 KiB

defs.hH A D23-Apr-202432.8 KiB

defsizes.hH A D12-Jun-20192.3 KiB

disklabel.cH A D10-Feb-202436.7 KiB

disks.cH A D29-Jun-202365.4 KiB

disks_lfs.cH A D26-Jul-20141.6 KiB

endian.hH A D26-Jul-2014116

factor.cH A D01-Feb-20213.7 KiB

geom.cH A D01-Feb-20213.3 KiB

gpt.cH A D25-Mar-202448 KiB

gpt_uuid.cH A D12-Jun-2019117

install.cH A D07-Jan-20236.2 KiB

label.cH A D14-Feb-202463.8 KiB

main.cH A D22-Feb-202416.7 KiB

MakefileH A D07-Jan-20241.5 KiB

Makefile.incH A D23-Apr-20247.7 KiB

mbr.cH A D12-Apr-202481.8 KiB

mbr.hH A D13-Oct-20204.5 KiB

menus.entropyH A D19-Dec-20235.6 KiB

menus.miH A D19-Dec-202323.8 KiB

menus.pmH A D10-Jan-20206.3 KiB

msg.entropy.deH A D22-Apr-20224.6 KiB

msg.entropy.enH A D22-Apr-20224.4 KiB

msg.entropy.esH A D22-Apr-20224.4 KiB

msg.entropy.frH A D22-Apr-20224.4 KiB

msg.entropy.plH A D22-Apr-20224.4 KiB

msg.mbr.deH A D12-Jun-20194.5 KiB

msg.mbr.enH A D12-Jun-20194.2 KiB

msg.mbr.esH A D12-Jun-20194.3 KiB

msg.mbr.frH A D12-Jun-20194.3 KiB

msg.mbr.plH A D12-Jun-20194.2 KiB

msg.mi.deH A D25-Apr-202445.6 KiB

msg.mi.enH A D25-Apr-202440.7 KiB

msg.mi.esH A D25-Apr-202444.7 KiB

msg.mi.frH A D23-Apr-202444.5 KiB

msg.mi.plH A D25-Apr-202441.5 KiB

msg.pm.deH A D05-Nov-20206.9 KiB

msg.pm.enH A D05-Nov-20206.7 KiB

msg.pm.esH A D05-Nov-20206.9 KiB

msg.pm.frH A D05-Nov-20207 KiB

msg.pm.plH A D05-Nov-20206.8 KiB

msg_cmp.shH A D11-Jun-20193 KiB

msg_xlat.shH A D17-Oct-20215.3 KiB

net.cH A D19-Dec-202334.1 KiB

part_edit.cH A D16-May-202236.6 KiB

partitions.cH A D12-Sep-20216.4 KiB

partitions.hH A D07-Jan-202321.9 KiB

partman.cH A D27-Nov-202386.2 KiB

README.md_defsH A D07-Jan-20234.2 KiB

run.cH A D22-Apr-202216.3 KiB

sizemultname.cH A D28-Jan-20202.5 KiB

SPELLING.enH A D26-Jul-2014402

sysinst.8H A D29-Jan-20224.7 KiB

target.cH A D11-Feb-202217.6 KiB

TODOH A D26-Jul-20144.3 KiB

txtwalk.cH A D01-Feb-20216.3 KiB

txtwalk.hH A D15-Aug-20192.8 KiB

unif.awkH A D26-Jul-20142.3 KiB

upgrade.cH A D25-Jun-20225.8 KiB

util.cH A D25-Apr-202460.8 KiB

wskbd.cH A D01-Feb-20214.4 KiB

README.md_defs

1/* $NetBSD: README.md_defs,v 1.8 2023/01/06 15:05:52 martin Exp $ */
2
3The following is trying to document the most important machine dependent
4defines used in the sysinst code.
5
6
7If HAVE_GPT is true, the MD code may limit the space used for the
8GPT at the beginning of the disk to allow e.g. a bootloader
9being added after it (see evbarm on allwinner SoCs, u-boot is
10copied at 8k into the image).
11
12/* Size limit for the initial GPT part, in bytes */
13#define	MD_GPT_INITIAL_SIZE		(8*1024)
14
15
16The default installation description is created as a static array using
17lots of conditionals. It may be overridden / replaced in the MD code
18(see below), an example for that is arch/i386/md.c when we have been
19booted from UEFI firmware.
20
21Name		Value / example		Description
22PART_BOOT	(8*MEG) (undefined)	if defined, a boot partition
23					of this size (in bytes, rounded)
24					will be part of the default partition
25					suggestions. Must be compile time
26					const! Use MD_PART_DEFAULTS if
27					runtime adjustment is needed.
28PART_BOOT_MOUNT	"/boot" (undefined)	Add boot partition to fstab for
29					this mount point
30PART_BOOT_TYPE	FS_BSDFS		Kind of filesystem used
31PART_BOOT_SUBT	MBR_PTYPE_FAT12		File system specific sub type
32
33
34The boot partition is always inserted at the front of the suggested default
35partitions, to cope with firmwares that may not be able to load from the
36whole disk.
37
38If multiple boot partitions are required (see ofppc, where various schemes
39are supported, depending on exact model), the variables above can all be
40repeated with _BOOT1_ or _BOOT2_ name instead of _BOOT_.
41
42
43ATTENTION:
44	PART_BOOT	is in BYTE (not MB), while most other sizes
45			(DEFROOTSIZE, DEFSWAP, ...) are in MB!
46
47
48The following macros provide optional MD hooks:
49
50MD_PART_DEFAULTS	may be undefined
51
52used like:
53
54	void MD_PART_DEFAULTS(struct pm_dev*, struct part_usage_info*,
55	    size_t num_usage_infos),
56
57Called before any of the partition usage defaults is ever used, can be used
58to adjust e.g. partition sizes to actual system requirements (align boot
59partition with cylindersize), or (since it is a macro and all params are
60by references) to completely swap the defaults (e.g. EFI vs. biosboot).
61If swapping, make sure allocation and num_usage_infos stays consistent,
62old allocation is done by calloc(3), use free(3) to release.
63
64
65MD_NEED_BOOTBLOCK	may be undefined
66
67used like:
68
69	bool MD_NEED_BOOTBLOCK(struct install_partition_desc *install)
70
71returns true if this setup needs boot blocks. Used for example on x86
72when UEFI installs do not need any bootblocks, but BIOS ones do.
73
74MD_MAY_SWAP_TO		may be undefined
75
76used  like:
77
78	bool MD_MAY_SWAP_TO(const char *disk_name)
79
80returns true if the disk is usable as a swap device. Typical implementation
81in utils.c:may_swap_if_not_sdmmc.
82
83MD_SET_EXTRACT_FINALIZE	may be undefined
84
85used like:
86
87	int MD_SET_EXTRACT_FINALIZE(int update)
88
89extracts any additional parts of the distribution. Returns an error code
90if something fails.
91
92
93HAVE_PLAIN_DISKLABEL_BOOT	may be undefined, only used on architectures
94				that have MBR as primary with disklabel as
95				secondary partitioning scheme (RAW_PART == 3)
96
97used like:
98
99	bool HAVE_PLAIN_DISKLABEL_BOOT(const char *disk)
100
101returns true if the disk could be made bootable with only a disklabel
102(and no MBR).
103
104
105DISKLABEL_NO_ONDISK_VERIFY	usually undefined
106
107If defined, do not verify the presence of on-disk disklabels before
108offering the disklabel partitioning scheme. This allows ports to use
109kernel translation for the disklabel ioctls (e.g. x68k uses Human68k
110partitions this way).
111
112
113HAVE_GPT_BOOT			defined if the architecture can boot from GPT
114
115HAVE_EFI_BOOT			defined if the architecture may be able
116				to boot from an EFI partition
117
118NO_DISKLABEL_BOOT		defined if the architecture can NOT boot
119				from a disklabel partitioned disk
120
121MD_DISKLABEL_PART_INDEX_CHECK	usually undefined
122
123				if defined evaluates to a boolean attribute
124				which is passed a struct disklabel, an integer
125				index and a const struct disk_part_info*.
126				The result qualifies the given new partition
127				to take the disklabel l_partition entry
128				with the given index. Used for example
129				in luna68k to move the FFSv1 boot partition
130				(which would otherwise end up as partition 'a')
131				to a partition past RAW_PART (so 'd' on luna68k)
132