head	1.5;
access;
symbols
	netbsd-11-0-RC5:1.4
	netbsd-11-0-RC4:1.4
	netbsd-11-0-RC3:1.4
	netbsd-11-0-RC2:1.4
	netbsd-11-0-RC1:1.4
	perseant-exfatfs-base-20250801:1.4
	netbsd-11:1.4.0.2
	netbsd-11-base:1.4
	netbsd-10-1-RELEASE:1.1.2.2
	perseant-exfatfs-base-20240630:1.1
	perseant-exfatfs:1.1.0.4
	perseant-exfatfs-base:1.1
	netbsd-10-0-RELEASE:1.1.2.2
	netbsd-10-0-RC6:1.1.2.2
	netbsd-10-0-RC5:1.1.2.2
	netbsd-10-0-RC4:1.1.2.2
	netbsd-10:1.1.0.2;
locks; strict;
comment	@# @;


1.5
date	2026.02.15.19.38.43;	author riastradh;	state Exp;
branches;
next	1.4;
commitid	OKwTBQhkDyJjAvuG;

1.4
date	2025.02.17.12.31.20;	author jmcneill;	state Exp;
branches;
next	1.3;
commitid	RExauWrvjUiBUOJF;

1.3
date	2024.12.29.09.46.44;	author jmmv;	state Exp;
branches;
next	1.2;
commitid	SMRsHmmHTKgOBnDF;

1.2
date	2024.12.27.19.02.19;	author christos;	state Exp;
branches;
next	1.1;
commitid	lUKdBalraoedKaDF;

1.1
date	2024.01.20.21.35.59;	author jmcneill;	state Exp;
branches
	1.1.2.1
	1.1.4.1;
next	;
commitid	5dWkrVi2Bg7eAeVE;

1.1.2.1
date	2024.01.20.21.35.59;	author martin;	state dead;
branches;
next	1.1.2.2;
commitid	ut73eiinJNBPSYWE;

1.1.2.2
date	2024.02.03.11.47.06;	author martin;	state Exp;
branches;
next	1.1.2.3;
commitid	ut73eiinJNBPSYWE;

1.1.2.3
date	2025.02.22.12.39.04;	author martin;	state Exp;
branches;
next	;
commitid	vYt7c0tdilfpNsKF;

1.1.4.1
date	2025.08.02.05.20.40;	author perseant;	state Exp;
branches;
next	;
commitid	23j6GFaDws3O875G;


desc
@@


1.5
log
@mkimage/conf/*.conf: Nix postfix minwrites customization.

This customization has been a no-op for a long time.

These config files previously had copied & pasted logic to replace
the `fifo' listener type (named pipes) by `unix' (local sockets)
/etc/postfix/master.cf, because notifying fifo listeners bumps mtime,
while notifying unix listeners does not, so changing from `fifo' to
`unix' would reduce disk writes.

But Postfix has had used `unix' for everything by default since 2.10,
released in 2012 and first shipped in NetBSD 7.0 in 2015.  So this
customization has been a no-op for over a decade.  Let's save readers
some pondering and just nix it.
@
text
@# $NetBSD: evbppc.conf,v 1.4 2025/02/17 12:31:20 jmcneill Exp $ */
# evbppc shared config
#
image=$HOME/${board}.img

MACHINE=evbppc

extra=48		# spare space
init=32
boot=$((192 - ${init}))
ffsoffset=$(( (${init} + ${boot}) / 2 ))m

size=0		# autocompute
msdosid=12

if $gpt; then
	partition_type="gpt"
else
	partition_type="disklabel"
fi

mkdir -p ${mnt}/boot

make_label_evbppc() {
	# compute all sizes in terms of sectors
	local totalsize=$(( ${size} / 512 ))

	local bootsize=$(( ${boot} * 1024 ))

	local bootoffset=$(( ${init} * 1024 ))

	local asize=$(( ${totalsize} - ${bootsize} - ${bootoffset} ))
	local aoffset=$(( ${bootoffset} + ${bootsize} ))

	local bps=512
	local spt=32
	local tpc=64
	local spc=2048
	local cylinders=$(( ${totalsize} / ${spc} ))

	cat << EOF
type: SCSI
disk: STORAGE DEVICE
label: fictitious
flags: removable
bytes/sector: ${bps}
sectors/track: ${spt}
tracks/cylinder: ${tpc}
sectors/cylinder: ${spc}
cylinders: ${cylinders}
total sectors: ${totalsize}
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

8 partitions:
#     size         offset        fstype [fsize bsize cpg/sgs]
 a:   ${asize}     ${aoffset}    4.2BSD  ${fsize} ${bsize} 0  # 
 c:   ${totalsize} 0             unused      0     0          #
 e:   ${bootsize}  ${bootoffset} MSDOS                        #
EOF
}

make_fstab_evbppc() {
	make_fstab_default boot
}

customize_evbppc() {
	cp ${release}/etc/rc.conf ${mnt}/etc/rc.conf
	cat >> ${mnt}/etc/rc.conf << EOF
dev_exists() {
	if /sbin/drvctl -l \$1 >/dev/null 2>&1 ; then
		printf YES
	else
		printf NO
	fi
}

rc_configured=YES
hostname=${hostname:-${board}}
savecore=NO
sshd=YES
dhcpcd=YES
#ntpd=YES
#ntpd_flags="-g"
creds_msdos=YES
creds_msdos_partition=/boot
certctl_init=YES
EOF

	if ! ${swap:-false}; then
		cat >> ${mnt}/etc/rc.conf << EOF
no_swap=YES
EOF
	fi
	if $resize; then
		cat >> ${mnt}/etc/rc.conf << EOF
resize_${partition_type}=YES
resize_root=YES
resize_root_flags="-p"
resize_root_postcmd="/sbin/reboot -n"
EOF
	fi

	echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" \
	    >> "$tmp/selected_sets"

	mkdir ${mnt}/etc/rc.d
	for _f in resize_${partition_type} creds_msdos; do
		cp ${DIR}/files/${_f} ${mnt}/etc/rc.d/${_f}
		echo "./etc/rc.d/${_f} type=file uname=root gname=wheel mode=0555" \
		    >> "$tmp/selected_sets"
	done

	if [ ! -f ${release}/dev/MAKEDEV ]; then
		echo ${PROG}: Missing ${release}/dev/MAKEDEV 1>&2
		exit 1
	fi
	echo "${bar} running MAKEDEV ${bar}"
	${HOST_SH} ${release}/dev/MAKEDEV -s all | sed -e 's:^\./:\./dev/:' \
	    >> "$tmp/selected_sets"

	echo "${bar} fixing up permissions"
	echo "./boot type=dir uname=root gname=wheel mode=0755" \
	    >> "$tmp/selected_sets"
}
@


1.4
log
@wii: Disable ntpd by default.

It takes up a lot of memory.
@
text
@d1 1
a1 1
# $NetBSD: evbppc.conf,v 1.3 2024/12/29 09:46:44 jmmv Exp $ */
a72 7
	if $minwrites && $postfix; then
		mkdir ${mnt}/etc/postfix
		(umask 022
		sed -e 's/fifo/unix/' < ${release}/etc/postfix/master.cf > \
		    ${mnt}/etc/postfix/master.cf)
	fi
	
@


1.3
log
@Recognize MKPOSTFIX=no in mkimage
@
text
@d1 1
a1 1
# $NetBSD: evbppc.conf,v 1.2 2024/12/27 19:02:19 christos Exp $ */
d95 2
a96 2
ntpd=YES
ntpd_flags="-g"
@


1.2
log
@Remove duplicated code, handle minwrites in _normal the same way we handle
it in _gpt. Initial patch from jmmv@@.
@
text
@d1 1
a1 1
# $NetBSD: evbppc.conf,v 1.1 2024/01/20 21:35:59 jmcneill Exp $ */
d73 1
a73 1
	if $minwrites; then
@


1.1
log
@evbppc: Add initial support for the Nintendo Wii
@
text
@d1 1
a1 1
# $NetBSD$ */
a67 46
make_fstab_evbppc_gpt() {
	cat > ${mnt}/etc/fstab << EOF
# NetBSD /etc/fstab
# See /usr/share/examples/fstab/ for more examples.
NAME=${gpt_label_ffs:-netbsd-root}	/		ffs	rw,noatime	1 1
NAME=${gpt_label_boot:-boot}		/boot		msdos	rw	1 1
ptyfs		/dev/pts	ptyfs	rw
procfs		/proc		procfs	rw
tmpfs		/var/shm	tmpfs	rw,-m1777,-sram%25
EOF
}

make_fstab_evbppc_normal() {
	cat > ${mnt}/etc/fstab << EOF
# NetBSD /etc/fstab
# See /usr/share/examples/fstab/ for more examples.
ROOT.a		/		ffs	rw,noatime	1 1
ROOT.e		/boot		msdos	rw	1 1
ptyfs		/dev/pts	ptyfs	rw
procfs		/proc		procfs	rw
tmpfs		/var/shm	tmpfs	rw,-m1777,-sram%25
EOF
}

# From Richard Neswold's:
# http://rich-tbp.blogspot.com/2013/03/netbsd-on-rpi-minimizing-disk-writes.html
# Also for the postfix stuff below
make_fstab_evbppc_minwrites() {
	cat > ${mnt}/etc/fstab << EOF
# NetBSD /etc/fstab
# See /usr/share/examples/fstab/ for more examples.
ROOT.a		/			ffs	rw,log,noatime,nodevmtime 1 1
ROOT.e		/boot			msdos	rw			  1 1
ptyfs		/dev/pts		ptyfs	rw
procfs		/proc			procfs	rw
tmpfs		/tmp			tmpfs	rw,-s32M
tmpfs		/var/log		tmpfs	rw,union,-s32M
tmpfs		/var/run		tmpfs	rw,union,-s1M
tmpfs		/var/mail		tmpfs	rw,union,-s10M
tmpfs		/var/spool/postfix	tmpfs	rw,union,-s20M
tmpfs		/var/db/postfix		tmpfs	rw,union,-s1M
tmpfs		/var/chroot		tmpfs	rw,union,-s10M
tmpfs		/var/shm		tmpfs	rw,-m1777,-sram%25
EOF
}

d69 1
a69 13
	if $gpt; then
		make_fstab_evbppc_gpt
	elif $minwrites; then
		make_fstab_evbppc_minwrites
	else
		make_fstab_evbppc_normal
	fi
	echo "./etc/fstab type=file uname=root gname=wheel mode=0644" \
	    >> "$tmp/selected_sets"

	# Missing mount points from fstab
	echo "./proc type=dir uname=root gname=wheel mode=0755" \
	    >> "$tmp/selected_sets"
@


1.1.4.1
log
@Sync with HEAD
@
text
@d1 1
a1 1
# $NetBSD: evbppc.conf,v 1.4 2025/02/17 12:31:20 jmcneill Exp $ */
d68 46
d115 13
a127 1
	make_fstab_default boot
d131 1
a131 1
	if $minwrites && $postfix; then
d153 2
a154 2
#ntpd=YES
#ntpd_flags="-g"
@


1.1.2.1
log
@file evbppc.conf was added on branch netbsd-10 on 2024-02-03 11:47:06 +0000
@
text
@d1 195
@


1.1.2.2
log
@Pull up following revision(s) (requested by jmcneill in ticket #561):

	etc/etc.evbppc/Makefile.inc: revision 1.15
	sys/arch/evbppc/wii/dev/wiifb.c: revision 1.1
	sys/arch/evbppc/wii/dev/wiifb.c: revision 1.2
	sys/arch/evbppc/wii/dev/bwdsp.c: revision 1.1
	sys/arch/evbppc/wii/dev/wiifb.c: revision 1.3
	sys/arch/evbppc/wii/dev/bwdsp.c: revision 1.2
	distrib/utils/embedded/files/evbppc_wii_icon.png: revision 1.1
	usr.sbin/sysinst/arch/evbppc/md.h: revision 1.4
	sys/arch/evbppc/wii/dev/wiifb.c: revision 1.4
	sys/arch/evbppc/wii/dev/viio.h: revision 1.1
	sys/arch/evbppc/wii/dev/wiifb.c: revision 1.5
	sys/arch/evbppc/wii/dev/mainbus.h: revision 1.1
	distrib/utils/embedded/conf/wii.conf: revision 1.1
	distrib/utils/embedded/conf/wii.conf: revision 1.2
	distrib/utils/embedded/conf/wii.conf: revision 1.3
	sys/dev/sdmmc/sdhcvar.h: revision 1.34
	sys/dev/sdmmc/sdhc.c: revision 1.118
	sys/arch/evbppc/wii/dev/resetbtn.c: revision 1.1
	distrib/utils/embedded/conf/evbppc.conf: revision 1.1
	sys/dev/wsfb/genfb.c: revision 1.91
	sys/arch/evbppc/wii/dev/resetbtn.c: revision 1.2
	sys/dev/wscons/wsconsio.h: revision 1.127
	sys/arch/powerpc/oea/oea_machdep.c: revision 1.85
	sys/arch/evbppc/wii/dev/hollywood.h: revision 1.1
	sys/arch/evbppc/conf/std.wii: revision 1.1
	sys/arch/evbppc/wii/dev/hollywood.h: revision 1.2
	sys/arch/evbppc/wii/dev/hollywood.c: revision 1.1
	sys/arch/evbppc/conf/std.wii: revision 1.2
	sys/arch/evbppc/wii/dev/hollywood.c: revision 1.2
	sys/arch/evbppc/conf/std.wii: revision 1.3
	sys/arch/powerpc/oea/cpu_subr.c: revision 1.109
	sys/arch/evbppc/wii/wii_mmuinit.S: revision 1.1
	sys/dev/usb/usb.h: revision 1.124
	sys/arch/evbppc/wii/machdep.c: revision 1.1
	sys/arch/evbppc/wii/dev/rtcsram.c: revision 1.1
	sys/arch/powerpc/include/oea/hid.h: revision 1.14
	sys/arch/evbppc/wii/mainbus.c: revision 1.1
	sys/arch/evbppc/wii/machdep.c: revision 1.2
	sys/arch/evbppc/wii/dev/ehci_hollywood.c: revision 1.1
	sys/arch/evbppc/wii/mainbus.c: revision 1.2
	sys/arch/evbppc/wii/machdep.c: revision 1.3
	sys/arch/evbppc/wii/dev/ehci_hollywood.c: revision 1.2
	sys/arch/evbppc/wii/mainbus.c: revision 1.3
	sys/arch/evbppc/wii/machdep.c: revision 1.4
	sys/arch/evbppc/wii/dev/hwgpio.c: revision 1.1
	sys/arch/evbppc/wii/dev/sdhc_hollywood.c: revision 1.1
	sys/arch/evbppc/wii/dev/sdhc_hollywood.c: revision 1.2
	sys/arch/evbppc/wii/wii_locore.S: revision 1.1
	sys/arch/evbppc/conf/files.wii: revision 1.1
	sys/arch/evbppc/wii/wii_locore.S: revision 1.2
	sys/arch/evbppc/include/wii.h: revision 1.1
	sys/arch/evbppc/conf/files.wii: revision 1.2
	sys/arch/evbppc/wii/dev/exi.c: revision 1.1
	sys/arch/evbppc/include/wii.h: revision 1.2
	sys/arch/evbppc/conf/files.wii: revision 1.3
	sys/arch/powerpc/powerpc/clock.c: revision 1.18
	sys/arch/evbppc/include/wii.h: revision 1.3
	sys/arch/evbppc/conf/files.wii: revision 1.4
	sys/arch/evbppc/include/wii.h: revision 1.4
	sys/arch/evbppc/wii/dev/exi.h: revision 1.1
	sys/arch/evbppc/wii/dev/avenc.c: revision 1.1
	sys/arch/evbppc/include/wii.h: revision 1.5
	sys/arch/evbppc/include/wii.h: revision 1.6
	sys/arch/evbppc/include/wii.h: revision 1.7
	sys/arch/evbppc/wii/dev/avenc.h: revision 1.1
	distrib/utils/embedded/mkimage: revision 1.79
	sys/arch/evbppc/conf/WII: revision 1.1
	sys/arch/evbppc/conf/INSTALL_WII: revision 1.1
	distrib/utils/embedded/files/evbppc_wii_meta.xml: revision 1.1
	sys/arch/evbppc/wii/dev/vireg.h: revision 1.1
	sys/arch/evbppc/conf/WII: revision 1.2
	distrib/utils/embedded/files/evbppc_wii_meta.xml: revision 1.2
	sys/arch/evbppc/wii/dev/vireg.h: revision 1.2
	sys/arch/evbppc/conf/WII: revision 1.3
	sys/arch/evbppc/conf/WII: revision 1.4
	usr.sbin/sysinst/arch/evbppc/md.c: revision 1.11
	sys/arch/evbppc/wii/dev/ohci_hollywood.c: revision 1.1
	sys/dev/usb/ehcivar.h: revision 1.52
	sys/arch/evbppc/wii/pic_pi.c: revision 1.1
	sys/arch/evbppc/wii/dev/ohci_hollywood.c: revision 1.2
	etc/etc.evbppc/ttys: revision 1.8
	sys/arch/evbppc/wii/dev/bwai.c: revision 1.1
	sys/arch/evbppc/wii/dev/bwai.c: revision 1.2
	sys/arch/evbppc/wii/dev/bwai.c: revision 1.3
	sys/arch/evbppc/wii/autoconf.c: revision 1.1
	sys/arch/evbppc/conf/Makefile.wii.inc: revision 1.1
	sys/arch/evbppc/wii/dev/bwai.h: revision 1.1
	sys/arch/evbppc/wii/autoconf.c: revision 1.2
	sys/arch/evbppc/conf/Makefile.wii.inc: revision 1.2

powerpc: oea: Fix prefetchable mappings
Prefetchable mappings need PMAP_NOCACHE to get write-combine semantics.
powerpc: oea: Decode IBM750CL L2 cache information.
sdmmc: add support for optional delay after register write
wscons: Add HOLLYWOOD display and YUY2 pixel format types
wsfb: add support for optional "devcmap" property
A hardware driver can supply a pointer to a 16x 32-bit array to override
the default rasops device colour map in the "devcmap" property.
ehci: add EHCIF_32BIT_ACCESS flag to force 32-bit MMIO
fix comments: HID0 ICFI/DCFI are "flash invalidate", not "flush invalidate"
powerpc: fix delay for large (> ~5sec) values
When calculating the target timebase, promote '1000' on the RHS to ULL
to force 64-bit calculation, otherwise 'n * 1000' will overflow.
usb: increase USB_PORT_RESET_RECOVERY from 10ms to 20ms
I changed this from 250ms to 10ms back in 2021 based on a similar FreeBSD
change, but it seems to be a bit too aggressive for some platforms.
evbppc: Add initial support for the Nintendo Wii
wii: support RB_POWERDOWN
build fix: use dd with count=1 for compat with NetBSD dd(1)
wii: Add NTSC 480p support.
In addition to this, add VIIO_{GET,SET}REGS ioctl support to allow for
poking at video interface registers from userland. This is helpful for
debugging display issues.
wii: Add 128x48 icon to SD card image
wii: Fix a comment
wii: Add drivers for Broadway DSP and Audio interface.
0: [*] audio0 @@ bwdsp0: Broadway DSP
       playback: 16, 2ch, 48000Hz
       record:   unavailable
       (P-) slinear_be 16/16, 2ch, { 48000 }
wii: Add screenblank support.
wii: Use screen dimming register for screen blanking.
wii: Add GPIO, I2C, and basic A/V encoder driver.
wii: Use A/V encoder volume controls instead of using a software filter.
wii: Simply DSP driver - no interrupt handler required.
wii: provide device names to intr_establish
wii$ intrctl list
interrupt id      CPU0  device name(s)
pi irq 14        64769* hollywood0
hollywood irq 36  5872* ehci0
hollywood irq 39 58907* sdhc0
hollywood irq 40     4* sdhc1
hollywood irq 49     0* resetbtn0
pi irq 5             0* bwai0
wii: Add support for passing boot options to the kernel.
wii: Add External interface bus and RTC support
wii: Remove objcopy after kernel build.
HBC will do the right thing.
Add wsvt25 entries (off by default) for ttyE0-ttyE3.
Add support for "PAL" (576i) mode on Wii.
@
text
@a0 195
# $NetBSD: evbppc.conf,v 1.1 2024/01/20 21:35:59 jmcneill Exp $ */
# evbppc shared config
#
image=$HOME/${board}.img

MACHINE=evbppc

extra=48		# spare space
init=32
boot=$((192 - ${init}))
ffsoffset=$(( (${init} + ${boot}) / 2 ))m

size=0		# autocompute
msdosid=12

if $gpt; then
	partition_type="gpt"
else
	partition_type="disklabel"
fi

mkdir -p ${mnt}/boot

make_label_evbppc() {
	# compute all sizes in terms of sectors
	local totalsize=$(( ${size} / 512 ))

	local bootsize=$(( ${boot} * 1024 ))

	local bootoffset=$(( ${init} * 1024 ))

	local asize=$(( ${totalsize} - ${bootsize} - ${bootoffset} ))
	local aoffset=$(( ${bootoffset} + ${bootsize} ))

	local bps=512
	local spt=32
	local tpc=64
	local spc=2048
	local cylinders=$(( ${totalsize} / ${spc} ))

	cat << EOF
type: SCSI
disk: STORAGE DEVICE
label: fictitious
flags: removable
bytes/sector: ${bps}
sectors/track: ${spt}
tracks/cylinder: ${tpc}
sectors/cylinder: ${spc}
cylinders: ${cylinders}
total sectors: ${totalsize}
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

8 partitions:
#     size         offset        fstype [fsize bsize cpg/sgs]
 a:   ${asize}     ${aoffset}    4.2BSD  ${fsize} ${bsize} 0  # 
 c:   ${totalsize} 0             unused      0     0          #
 e:   ${bootsize}  ${bootoffset} MSDOS                        #
EOF
}

make_fstab_evbppc_gpt() {
	cat > ${mnt}/etc/fstab << EOF
# NetBSD /etc/fstab
# See /usr/share/examples/fstab/ for more examples.
NAME=${gpt_label_ffs:-netbsd-root}	/		ffs	rw,noatime	1 1
NAME=${gpt_label_boot:-boot}		/boot		msdos	rw	1 1
ptyfs		/dev/pts	ptyfs	rw
procfs		/proc		procfs	rw
tmpfs		/var/shm	tmpfs	rw,-m1777,-sram%25
EOF
}

make_fstab_evbppc_normal() {
	cat > ${mnt}/etc/fstab << EOF
# NetBSD /etc/fstab
# See /usr/share/examples/fstab/ for more examples.
ROOT.a		/		ffs	rw,noatime	1 1
ROOT.e		/boot		msdos	rw	1 1
ptyfs		/dev/pts	ptyfs	rw
procfs		/proc		procfs	rw
tmpfs		/var/shm	tmpfs	rw,-m1777,-sram%25
EOF
}

# From Richard Neswold's:
# http://rich-tbp.blogspot.com/2013/03/netbsd-on-rpi-minimizing-disk-writes.html
# Also for the postfix stuff below
make_fstab_evbppc_minwrites() {
	cat > ${mnt}/etc/fstab << EOF
# NetBSD /etc/fstab
# See /usr/share/examples/fstab/ for more examples.
ROOT.a		/			ffs	rw,log,noatime,nodevmtime 1 1
ROOT.e		/boot			msdos	rw			  1 1
ptyfs		/dev/pts		ptyfs	rw
procfs		/proc			procfs	rw
tmpfs		/tmp			tmpfs	rw,-s32M
tmpfs		/var/log		tmpfs	rw,union,-s32M
tmpfs		/var/run		tmpfs	rw,union,-s1M
tmpfs		/var/mail		tmpfs	rw,union,-s10M
tmpfs		/var/spool/postfix	tmpfs	rw,union,-s20M
tmpfs		/var/db/postfix		tmpfs	rw,union,-s1M
tmpfs		/var/chroot		tmpfs	rw,union,-s10M
tmpfs		/var/shm		tmpfs	rw,-m1777,-sram%25
EOF
}

make_fstab_evbppc() {
	if $gpt; then
		make_fstab_evbppc_gpt
	elif $minwrites; then
		make_fstab_evbppc_minwrites
	else
		make_fstab_evbppc_normal
	fi
	echo "./etc/fstab type=file uname=root gname=wheel mode=0644" \
	    >> "$tmp/selected_sets"

	# Missing mount points from fstab
	echo "./proc type=dir uname=root gname=wheel mode=0755" \
	    >> "$tmp/selected_sets"
}

customize_evbppc() {
	if $minwrites; then
		mkdir ${mnt}/etc/postfix
		(umask 022
		sed -e 's/fifo/unix/' < ${release}/etc/postfix/master.cf > \
		    ${mnt}/etc/postfix/master.cf)
	fi
	
	cp ${release}/etc/rc.conf ${mnt}/etc/rc.conf
	cat >> ${mnt}/etc/rc.conf << EOF
dev_exists() {
	if /sbin/drvctl -l \$1 >/dev/null 2>&1 ; then
		printf YES
	else
		printf NO
	fi
}

rc_configured=YES
hostname=${hostname:-${board}}
savecore=NO
sshd=YES
dhcpcd=YES
ntpd=YES
ntpd_flags="-g"
creds_msdos=YES
creds_msdos_partition=/boot
certctl_init=YES
EOF

	if ! ${swap:-false}; then
		cat >> ${mnt}/etc/rc.conf << EOF
no_swap=YES
EOF
	fi
	if $resize; then
		cat >> ${mnt}/etc/rc.conf << EOF
resize_${partition_type}=YES
resize_root=YES
resize_root_flags="-p"
resize_root_postcmd="/sbin/reboot -n"
EOF
	fi

	echo "./etc/rc.conf type=file uname=root gname=wheel mode=0644" \
	    >> "$tmp/selected_sets"

	mkdir ${mnt}/etc/rc.d
	for _f in resize_${partition_type} creds_msdos; do
		cp ${DIR}/files/${_f} ${mnt}/etc/rc.d/${_f}
		echo "./etc/rc.d/${_f} type=file uname=root gname=wheel mode=0555" \
		    >> "$tmp/selected_sets"
	done

	if [ ! -f ${release}/dev/MAKEDEV ]; then
		echo ${PROG}: Missing ${release}/dev/MAKEDEV 1>&2
		exit 1
	fi
	echo "${bar} running MAKEDEV ${bar}"
	${HOST_SH} ${release}/dev/MAKEDEV -s all | sed -e 's:^\./:\./dev/:' \
	    >> "$tmp/selected_sets"

	echo "${bar} fixing up permissions"
	echo "./boot type=dir uname=root gname=wheel mode=0755" \
	    >> "$tmp/selected_sets"
}
@


1.1.2.3
log
@Pull up following revision(s) (requested by jmcneill in ticket #1057):

	distrib/utils/embedded/conf/evbppc.conf: revision 1.4
	sys/arch/powerpc/oea/cpu_subr.c: revision 1.111
	sys/arch/evbppc/wii/pic_pi.c: revision 1.2
	sys/arch/evbppc/conf/WII: revision 1.9
	sys/arch/evbppc/wii/dev/bwai.c: revision 1.4

wii: Simplify Processor Interface pic code.

wii: Audio playback improvements.
Instead of resetting the byte counter for every block (which is racy),
increment the interrupt timing register by the exact byte count for
each block. Should do better at keeping things in sync.

powerpc: Identify Broadway CPU.
Use hex to report Broadway revision and ignore TAU as it does not exist
on this processor.

wii: Remove some options to save memory.

wii: Disable ntpd by default.
It takes up a lot of memory.
@
text
@d1 1
a1 1
# $NetBSD: evbppc.conf,v 1.1.2.2 2024/02/03 11:47:06 martin Exp $ */
d153 2
a154 2
#ntpd=YES
#ntpd_flags="-g"
@


