1 # $NetBSD: Makefile.inc,v 1.6 2025/01/11 14:33:31 jmmv Exp $ 2 # 3 # etc.riscv/Makefile.inc -- riscv-specific etc Makefile targets 4 # 5 6 .if ${MACHINE_ARCH} == "riscv64" 7 KERNEL_SETS= GENERIC64 8 .else 9 KERNEL_SETS= GENERIC 10 .endif 11 12 # Support for mkimage 13 MKIMAGE= ${NETBSDSRCDIR}/distrib/utils/embedded/mkimage 14 IMAGE.rel= ${RELEASEDIR}/${RELEASEMACHINEDIR} 15 IMAGE.dir= ${IMAGE.rel}/binary/gzimg 16 IMAGE.kern= ${IMAGE.rel}/binary/kernel 17 18 # TOOL_MKUBOOTIMAGE=${TOOL_MKUBOOTIMAGE} \ 19 20 __mkimage: .USE 21 TOOL_MAKE=${MAKE} \ 22 TOOL_MAKEFS=${TOOL_MAKEFS} \ 23 TOOL_DISKLABEL=${TOOL_DISKLABEL} \ 24 TOOL_FDISK=${TOOL_FDISK} \ 25 TOOL_GPT=${TOOL_GPT} \ 26 TOOL_GZIP=${TOOL_GZIP} \ 27 TOOL_MKNOD=${TOOL_MKNOD} \ 28 TOOL_PAX=${TOOL_PAX} \ 29 TOOL_MTREE=${TOOL_MTREE} \ 30 TOOL_SED=${TOOL_SED} \ 31 TOOL_PWD_MKDB=${TOOL_PWD_MKDB} \ 32 HOST_SH=${HOST_SH} \ 33 KERNOBJDIR=${KERNOBJDIR} \ 34 MACHINE=${MACHINE} \ 35 MKDTB=${MKDTB} \ 36 MKPOSTFIX=${MKPOSTFIX} \ 37 ${HOST_SH} ${MKIMAGE} -h ${.TARGET:S/smp_//} -D ${DESTDIR} \ 38 -S ${NETBSDSRCDIR} ${MKI_OPTS.${.TARGET}} \ 39 ${IMAGE.dir}/${.TARGET:S/smp_//}.img.gz 40 41 42 .if ${MACHINE_ARCH} == "riscv64" 43 .if ${HAVE_UEFI} == "yes" 44 smp_efibootriscv64: 45 cd ${KERNSRCDIR}/stand/efiboot/bootriscv64 && ${MAKE} release 46 ${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc '*.efi' 47 SNAP_MD_POST_DEPS+= smp_efibootriscv64 48 INSTALLATION_DIRS+= installation/misc 49 .endif 50 51 smp_riscv64: __mkimage 52 MKI_OPTS.smp_riscv64= -K ${IMAGE.kern} 53 SNAP_MD_POST_DEPS+= smp_riscv64 54 .endif 55 56 57 .if ${MACHINE_ARCH} == "riscv32" 58 smp_riscv32: __mkimage 59 MKI_OPTS.smp_riscv32= -K ${IMAGE.kern} 60 SNAP_MD_POST_DEPS+= smp_riscv32 61 .endif 62 63 snap_md_post: check_DESTDIR check_RELEASEDIR snap_post .WAIT ${SNAP_MD_POST_DEPS} 64 65 INSTALLATION_DIRS+= binary/gzimg \ 66 installation/instkernel 67