Name Date Size #Lines LOC

..07-Jun-2022-

arch/H08-May-2022-34,09423,806

MakefileH A D08-May-20221.4 KiB6849

Makefile.incH A D04-Jun-20237.2 KiB263197

README.md_defsH A D11-Jan-20234.2 KiB13286

SPELLING.enH A D08-May-2022405 1613

TODOH A D08-May-20224.3 KiB13094

aout2elf.cH A D08-May-202211.1 KiB448284

bsddisklabel.cH A D11-Jan-202354 KiB2,0401,634

checkrc.cH A D08-May-20223.2 KiB11866

configmenu.cH A D21-May-202212.6 KiB533422

defs.hH A D15-Mar-202332.4 KiB1,031627

defsizes.hH A D08-May-20222.3 KiB7130

disklabel.cH A D11-Jan-202336.7 KiB1,3631,111

disks.cH A D24-Jun-202365.4 KiB2,7682,137

disks_lfs.cH A D08-May-20221.7 KiB4511

endian.hH A D08-May-2022121 52

factor.cH A D08-May-20223.7 KiB14469

geom.cH A D08-May-20223.3 KiB12372

gpt.cH A D16-Dec-202247.9 KiB1,9391,521

gpt_uuid.cH A D08-May-2022117 52

install.cH A D11-Jan-20236.2 KiB251167

label.cH A D11-Jan-202363.7 KiB2,4361,964

main.cH A D11-Jun-202316.5 KiB686497

mbr.cH A D11-Jul-202281.8 KiB3,2082,531

mbr.hH A D08-May-20224.5 KiB14055

menus.entropyH A D08-May-20225.6 KiB132119

menus.miH A D13-Feb-202323.7 KiB674611

menus.pmH A D08-May-20226.3 KiB183170

msg.entropy.deH A D08-May-20224.6 KiB131102

msg.entropy.enH A D08-May-20224.4 KiB130101

msg.entropy.esH A D08-May-20224.4 KiB130101

msg.entropy.frH A D08-May-20224.4 KiB130101

msg.entropy.plH A D08-May-20224.4 KiB130101

msg.mbr.deH A D08-May-20224.5 KiB143115

msg.mbr.enH A D08-May-20224.2 KiB141113

msg.mbr.esH A D08-May-20224.3 KiB141113

msg.mbr.frH A D08-May-20224.3 KiB140113

msg.mbr.plH A D08-May-20224.2 KiB140114

msg.mi.deH A D16-Dec-202245.3 KiB1,5751,258

msg.mi.enH A D16-Dec-202240.4 KiB1,5121,203

msg.mi.esH A D16-Dec-202244.4 KiB1,5601,251

msg.mi.frH A D16-Dec-202244.2 KiB1,5911,288

msg.mi.plH A D16-Dec-202241.2 KiB1,4971,195

msg.pm.deH A D08-May-20226.9 KiB168158

msg.pm.enH A D08-May-20226.7 KiB168159

msg.pm.esH A D08-May-20226.9 KiB167158

msg.pm.frH A D08-May-20227 KiB167158

msg.pm.plH A D08-May-20226.8 KiB167158

msg_cmp.shH A D08-May-20223 KiB10148

msg_xlat.shH A D08-May-20225.3 KiB217144

net.cH A D04-Jan-202334 KiB1,337942

part_edit.cH A D16-May-202236.6 KiB1,4791,196

partitions.cH A D08-May-20226.4 KiB234145

partitions.hH A D11-Jan-202321.9 KiB648186

partman.cH A D11-Jul-202286 KiB3,4333,004

run.cH A D08-May-202216.3 KiB742573

sizemultname.cH A D08-May-20222.5 KiB8439

sysinst.8H A D08-May-20224.7 KiB136135

target.cH A D08-May-202217.6 KiB716420

txtwalk.cH A D08-May-20226.3 KiB277197

txtwalk.hH A D08-May-20222.8 KiB8519

unif.awkH A D08-May-20222.3 KiB9949

upgrade.cH A D25-Jun-20225.8 KiB239136

util.cH A D24-Jun-202360.3 KiB2,6682,031

wskbd.cH A D08-May-20224.4 KiB15495

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