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


1.1
date	2023.05.07.12.41.46;	author skrll;	state Exp;
branches;
next	;
commitid	W1X4g8g57obtV1oE;


desc
@@


1.1
log
@RISC-V support that works on QEMU with a single hart.

Thanks for Simon Burge for plic(4).
@
text
@# $NetBSD$
# RISCV64 customization script used by mkimage
#
board=riscv64
console=fb
resize=true
gpt=true
#gpt_hybrid=true
gpt_create_flags="-p 16"
gpt_label_boot="EFI"
gpt_label_ffs="netbsd-root"

. ${DIR}/conf/riscv.conf

kernel_GENERIC="GENERIC64"

make_label() {
	make_label_riscv
}

make_fstab() {
	make_fstab_riscv
}

customize() {
	customize_riscv
	cat >> "${mnt}/etc/rc.conf" << EOF
mdnsd=YES
devpubd=YES
wscons=\$(dev_exists wsdisplay0)
dhcpcd_flags="\$dhcpcd_flags -b"
EOF
}

populate_common() {
	# Install EFI bootloader
	mkdir -p "${mnt}/boot/EFI/BOOT"
	cp "${release}/usr/mdec/bootriscv64.efi" "${mnt}/boot/EFI/BOOT/bootriscv64.efi"

	# Install kernel to root of the FFS partition
	${GZIP_CMD} -dc ${kernel}/netbsd-${kernel_GENERIC}.gz > "${mnt}/netbsd"
	echo "./netbsd type=file uname=root gname=wheel mode=0755" \
	    >> "$tmp/selected_sets"
}


populate() {

	# common configuration
	populate_common
}
@
