head	1.11;
access;
symbols
	netbsd-11-0-RC4:1.11
	netbsd-11-0-RC3:1.11
	netbsd-11-0-RC2:1.11
	netbsd-11-0-RC1:1.11
	perseant-exfatfs-base-20250801:1.11
	netbsd-11:1.11.0.4
	netbsd-11-base:1.11
	netbsd-10-1-RELEASE:1.10
	perseant-exfatfs-base-20240630:1.11
	perseant-exfatfs:1.11.0.2
	perseant-exfatfs-base:1.11
	netbsd-9-4-RELEASE:1.8
	netbsd-10-0-RELEASE:1.10
	netbsd-10-0-RC6:1.10
	netbsd-10-0-RC5:1.10
	netbsd-10-0-RC4:1.10
	netbsd-10-0-RC3:1.10
	netbsd-10-0-RC2:1.10
	thorpej-ifq:1.10.0.24
	thorpej-ifq-base:1.10
	thorpej-altq-separation:1.10.0.22
	thorpej-altq-separation-base:1.10
	netbsd-10-0-RC1:1.10
	netbsd-10:1.10.0.20
	netbsd-10-base:1.10
	bouyer-sunxi-drm:1.10.0.18
	bouyer-sunxi-drm-base:1.10
	netbsd-9-3-RELEASE:1.8
	thorpej-i2c-spi-conf2:1.10.0.16
	thorpej-i2c-spi-conf2-base:1.10
	thorpej-futex2:1.10.0.14
	thorpej-futex2-base:1.10
	thorpej-cfargs2:1.10.0.12
	thorpej-cfargs2-base:1.10
	cjep_sun2x-base1:1.10
	cjep_sun2x:1.10.0.10
	cjep_sun2x-base:1.10
	cjep_staticlib_x-base1:1.10
	netbsd-9-2-RELEASE:1.8
	cjep_staticlib_x:1.10.0.8
	cjep_staticlib_x-base:1.10
	thorpej-i2c-spi-conf:1.10.0.6
	thorpej-i2c-spi-conf-base:1.10
	thorpej-cfargs:1.10.0.4
	thorpej-cfargs-base:1.10
	thorpej-futex:1.10.0.2
	thorpej-futex-base:1.10
	netbsd-9-1-RELEASE:1.8
	bouyer-xenpvh-base2:1.9
	phil-wifi-20200421:1.9
	bouyer-xenpvh-base1:1.9
	phil-wifi-20200411:1.9
	bouyer-xenpvh:1.9.0.6
	bouyer-xenpvh-base:1.9
	is-mlppp:1.9.0.4
	is-mlppp-base:1.9
	phil-wifi-20200406:1.9
	ad-namecache-base3:1.9
	netbsd-9-0-RELEASE:1.8
	netbsd-9-0-RC2:1.8
	ad-namecache-base2:1.9
	ad-namecache-base1:1.9
	ad-namecache:1.9.0.2
	ad-namecache-base:1.9
	netbsd-9-0-RC1:1.8
	phil-wifi-20191119:1.8
	netbsd-9:1.8.0.4
	netbsd-9-base:1.8
	phil-wifi-20190609:1.8
	isaki-audio2:1.8.0.2
	isaki-audio2-base:1.8
	pgoyette-compat-merge-20190127:1.1.2.4
	pgoyette-compat-20190127:1.5
	pgoyette-compat-20190118:1.5
	pgoyette-compat-1226:1.5
	pgoyette-compat-1126:1.5
	pgoyette-compat-1020:1.2
	pgoyette-compat-0930:1.1
	pgoyette-compat-0906:1.1
	pgoyette-compat-0728:1.1
	phil-wifi:1.1.0.4
	phil-wifi-base:1.1
	pgoyette-compat-0625:1.1
	pgoyette-compat-0521:1.1
	pgoyette-compat-0502:1.1
	pgoyette-compat-0422:1.1
	pgoyette-compat-0415:1.1
	pgoyette-compat:1.1.0.2
	pgoyette-compat-0407:1.1;
locks; strict;
comment	@# @;


1.11
date	2024.02.17.15.08.32;	author christos;	state Exp;
branches;
next	1.10;
commitid	VuyVDbsv2cvYxNYE;

1.10
date	2020.08.29.19.06.18;	author jakllsch;	state Exp;
branches;
next	1.9;
commitid	p3DOxGPFiB7EyZlC;

1.9
date	2019.12.16.11.00.30;	author skrll;	state Exp;
branches;
next	1.8;
commitid	qoYUrKI4yyo38VOB;

1.8
date	2019.04.14.07.57.51;	author skrll;	state Exp;
branches;
next	1.7;
commitid	jV7GqiKz025Z2ijB;

1.7
date	2019.03.30.17.40.34;	author jmcneill;	state Exp;
branches;
next	1.6;
commitid	CmxQ41jn1L4xLphB;

1.6
date	2019.03.14.10.22.43;	author jmcneill;	state Exp;
branches;
next	1.5;
commitid	upBYOxSsrn0ZQjfB;

1.5
date	2018.10.30.09.06.07;	author martin;	state Exp;
branches;
next	1.4;
commitid	MNsoYO2IaqOTLXXA;

1.4
date	2018.10.30.08.59.09;	author skrll;	state Exp;
branches;
next	1.3;
commitid	ItOGfDQDRJtyJXXA;

1.3
date	2018.10.29.13.53.23;	author martin;	state Exp;
branches;
next	1.2;
commitid	tizfnpsFobenoRXA;

1.2
date	2018.10.18.09.01.54;	author skrll;	state Exp;
branches;
next	1.1;
commitid	0r6pPkie0NRL4qWA;

1.1
date	2018.04.01.04.35.04;	author ryo;	state Exp;
branches
	1.1.2.1
	1.1.4.1;
next	;
commitid	Rbo0y8tEIcKr5HwA;

1.1.2.1
date	2018.04.01.04.35.04;	author pgoyette;	state dead;
branches;
next	1.1.2.2;
commitid	ZMkKSYuBapz7LsxA;

1.1.2.2
date	2018.04.07.04.12.12;	author pgoyette;	state Exp;
branches;
next	1.1.2.3;
commitid	ZMkKSYuBapz7LsxA;

1.1.2.3
date	2018.10.20.06.58.27;	author pgoyette;	state Exp;
branches;
next	1.1.2.4;
commitid	mTSoqZEZ4arHnFWA;

1.1.2.4
date	2018.11.26.01.52.21;	author pgoyette;	state Exp;
branches;
next	;
commitid	Zj4q5SspGdKXto1B;

1.1.4.1
date	2019.06.10.22.06.05;	author christos;	state Exp;
branches;
next	1.1.4.2;
commitid	jtc8rnCzWiEEHGqB;

1.1.4.2
date	2020.04.08.14.07.34;	author martin;	state Exp;
branches;
next	;
commitid	Qli2aW9E74UFuA3C;


desc
@@


1.11
log
@Fix MKREPRO build (Jan-Benedict Glaw)
@
text
@#	$NetBSD: mk.generic,v 1.10 2020/08/29 19:06:18 jakllsch Exp $

.if !empty(MACHINE_ARCH:M*eb)
EXTRA_LINKFLAGS+=	--be8
.endif

ENTRYPOINT=		generic_start

SYSTEM_FIRST_OBJ=	armv6_start.o
SYSTEM_FIRST_SFILE=	${ARM}/arm/armv6_start.S

_OSRELEASE!=		${HOST_SH} $S/conf/osrelease.sh

MKUBOOTIMAGEARGS=	-A arm -T kernel_noload -O linux -C none
MKUBOOTIMAGEARGS+=	-e 0
MKUBOOTIMAGEARGS+=	-n "NetBSD/${BOARDTYPE:U${MACHINE_ARCH}} ${_OSRELEASE}"
.if ${MKREPRO_TIMESTAMP:Uno} != "no"
MKUBOOTIMAGEARGS+=	-t "${MKREPRO_TIMESTAMP}"
.endif

SYSTEM_LD_TAIL_EXTRA+=; \
	echo ${OBJCOPY} -S -O binary $@@ $@@.img; \
	${OBJCOPY} -S -O binary $@@ $@@.img; \
	echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@@.img $@@.ub; \
	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@@.img $@@.ub

EXTRA_KERNELS+= ${KERNELS:@@.KERNEL.@@${.KERNEL.}.img@@}
EXTRA_KERNELS+= ${KERNELS:@@.KERNEL.@@${.KERNEL.}.ub@@}
@


1.10
log
@tegra_xusb: fix xusb static firmware build

To work around objcopy and ld now being unable to create a EABI5 object
from a binary, use the assembler directive .incbin in inline assembly
to pull in the firmware blob.

This also probably makes TEGRA210_XUSB_BIN_STATIC actually work.
@
text
@d1 1
a1 1
#	$NetBSD: mk.generic,v 1.9 2019/12/16 11:00:30 skrll Exp $
d17 3
@


1.9
log
@Update to new RaspberryPi firware

commit 0c01dbefba45a08c47f8538d5a071a0fba6b7e83
Author: popcornmix <popcornmix@@gmail.com>
Date:   Wed Dec 11 15:30:08 2019 +0000

and include firmware for RPI4

Firmware has bee updated to support mainline linux kernels as described in
https://github.com/raspberrypi/linux/issues/3237
@
text
@d1 1
a1 3
#	$NetBSD: mk.generic,v 1.8 2019/04/14 07:57:51 skrll Exp $

.include "$S/arch/arm/nvidia/tegra_xusb-fw.mk"
@


1.8
log
@Create a RPI compatible image which cn be used with

kernel_address=0x10000040

in config.txt.

XXX alignment requirement needs fixing
@
text
@d1 1
a1 1
#	$NetBSD: mk.generic,v 1.7 2019/03/30 17:40:34 jmcneill Exp $
a19 2
MKKNLIMG=		${THISARM}/compile/rpi-mkknlimg.sh

d21 4
a24 6
	echo ${OBJCOPY} -S -O binary $@@ $@@.bin; \
	${OBJCOPY} -S -O binary $@@ $@@.bin; \
	echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@@.bin $@@.ub; \
	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@@.bin $@@.ub; \
	echo ${MKKNLIMG} $@@.bin $@@.img; \
	${HOST_SH} ${MKKNLIMG} $@@.bin $@@.img;
d26 1
a26 1
EXTRA_KERNELS+= ${KERNELS:@@.KERNEL.@@${.KERNEL.}.bin@@}
a27 1
EXTRA_KERNELS+= ${KERNELS:@@.KERNEL.@@${.KERNEL.}.img@@}
@


1.7
log
@Set entry point to generic_start instead of the default
@
text
@d1 1
a1 1
#	$NetBSD: mk.generic,v 1.6 2019/03/14 10:22:43 jmcneill Exp $
d20 2
d26 3
a28 1
	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@@.bin $@@.ub;
d32 1
@


1.6
log
@U-Boot fails to boot a compressed kernel_noload image, so stop emitting
them.
@
text
@d1 1
a1 1
#	$NetBSD: mk.generic,v 1.5 2018/10/30 09:06:07 martin Exp $
d9 2
@


1.5
log
@When BOARDTYPE is not set, use MACHINE_ARCH for the image name.
@
text
@d1 1
a1 1
#	$NetBSD: mk.generic,v 1.4 2018/10/30 08:59:09 skrll Exp $
d14 1
a14 1
MKUBOOTIMAGEARGS=	-A arm -T kernel_noload -O linux
a16 2
MKUBOOTIMAGEARGS_NONE=	${MKUBOOTIMAGEARGS} -C none
MKUBOOTIMAGEARGS_GZ=	${MKUBOOTIMAGEARGS} -C gz
d21 2
a22 6
	echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} $@@.bin $@@.ub; \
	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} $@@.bin $@@.ub; \
	echo ${TOOL_GZIP} -c $@@.bin > $@@.bin.gz; \
	${TOOL_GZIP} -c $@@.bin > $@@.bin.gz; \
	echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_GZ} $@@.bin.gz $@@.gz.ub; \
	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_GZ} $@@.bin.gz $@@.gz.ub
a25 2
EXTRA_KERNELS+= ${KERNELS:@@.KERNEL.@@${.KERNEL.}.bin.gz@@}
EXTRA_KERNELS+= ${KERNELS:@@.KERNEL.@@${.KERNEL.}.gz.ub@@}
@


1.4
log
@Don't forget EXTRA_LINKFLAGS+= --be8 for BE kernels
@
text
@d1 1
a1 1
#	$NetBSD: mk.generic,v 1.3 2018/10/29 13:53:23 martin Exp $
d16 1
a16 1
MKUBOOTIMAGEARGS+=	-n "NetBSD/${BOARDTYPE?${BOARDTYPE} :}${_OSRELEASE}"
@


1.3
log
@If no BOARDTYPE is defined, avoid the space to separate it from the OS
release.
@
text
@d1 1
a1 1
#	$NetBSD: mk.generic,v 1.2 2018/10/18 09:01:54 skrll Exp $
d5 4
@


1.2
log
@Provide generic start code that assumes the MMU is off and caches are
disabled as per the linux booting protocol for ARMv6 and ARMv7 boards.
u-boot image type should be changed to 'linux' for correct behaviour.

The new start code builds a minimal "bootstrap" L1PT with cached access
disabled and uses the same table for all processors.  AP startup is
performed in less steps and more code is written in C.

The bootstrap tables and stack are placed into an (orphaned) section
"_init_memory" which is given to uvm when it is no longer used.

Various kernels have been converted to use this code and tested.  Some
boards were provided by TNF. Thanks!

The GENERIC kernel now boots on boards using the TEGRA, SUNXI and EXYNOS
kernels. The GENERIC kernel will also work on RPI2 using u-boot.

Thanks to martin@@ and aymeric@@ for testing on parallella and nanosoc
respectively
@
text
@d1 1
a1 1
#	$NetBSD: mk.generic,v 1.1 2018/04/01 04:35:04 ryo Exp $
d12 1
a12 1
MKUBOOTIMAGEARGS+=	-n "NetBSD/$(BOARDTYPE) ${_OSRELEASE}"
@


1.1
log
@Add initial support for ARMv8 (AARCH64) (by nisimura@@ and ryo@@)

- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@@, jmcneill@@)
@
text
@d1 1
a1 2
#	$NetBSD$
CPPFLAGS+=		-mcpu=cortex-a15 -mfpu=neon
d5 2
a6 4
SYSTEM_FIRST_OBJ=	tegra_start.o
SYSTEM_FIRST_SFILE=	${THISARM}/tegra/tegra_start.S

GENASSYM_EXTRAS+=	${THISARM}/tegra/genassym.cf
d10 2
a11 2
MKUBOOTIMAGEARGS=	-A arm -T kernel -O linux
MKUBOOTIMAGEARGS+=	-a $(KERNEL_BASE_PHYS) -e $(KERNEL_BASE_PHYS)
@


1.1.4.1
log
@Sync with HEAD
@
text
@d1 2
a2 1
#	$NetBSD: mk.generic,v 1.8 2019/04/14 07:57:51 skrll Exp $
d6 2
a7 3
.if !empty(MACHINE_ARCH:M*eb)
EXTRA_LINKFLAGS+=	--be8
.endif
d9 1
a9 4
ENTRYPOINT=		generic_start

SYSTEM_FIRST_OBJ=	armv6_start.o
SYSTEM_FIRST_SFILE=	${ARM}/arm/armv6_start.S
d13 5
a17 5
MKUBOOTIMAGEARGS=	-A arm -T kernel_noload -O linux -C none
MKUBOOTIMAGEARGS+=	-e 0
MKUBOOTIMAGEARGS+=	-n "NetBSD/${BOARDTYPE:U${MACHINE_ARCH}} ${_OSRELEASE}"

MKKNLIMG=		${THISARM}/compile/rpi-mkknlimg.sh
d22 6
a27 4
	echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@@.bin $@@.ub; \
	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@@.bin $@@.ub; \
	echo ${MKKNLIMG} $@@.bin $@@.img; \
	${HOST_SH} ${MKKNLIMG} $@@.bin $@@.img;
d31 2
a32 1
EXTRA_KERNELS+= ${KERNELS:@@.KERNEL.@@${.KERNEL.}.img@@}
@


1.1.4.2
log
@Merge changes from current as of 20200406
@
text
@d1 1
a1 1
#	$NetBSD$
d20 2
d23 6
a28 4
	echo ${OBJCOPY} -S -O binary $@@ $@@.img; \
	${OBJCOPY} -S -O binary $@@ $@@.img; \
	echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@@.img $@@.ub; \
	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS} $@@.img $@@.ub
d30 2
a32 1
EXTRA_KERNELS+= ${KERNELS:@@.KERNEL.@@${.KERNEL.}.ub@@}
@


1.1.2.1
log
@file mk.generic was added on branch pgoyette-compat on 2018-04-07 04:12:12 +0000
@
text
@d1 32
@


1.1.2.2
log
@Sync with HEAD.  77 conflicts resolved - all of them $NetBSD$
@
text
@a0 32
#	$NetBSD: mk.generic,v 1.1 2018/04/01 04:35:04 ryo Exp $
CPPFLAGS+=		-mcpu=cortex-a15 -mfpu=neon

.include "$S/arch/arm/nvidia/tegra_xusb-fw.mk"

SYSTEM_FIRST_OBJ=	tegra_start.o
SYSTEM_FIRST_SFILE=	${THISARM}/tegra/tegra_start.S

GENASSYM_EXTRAS+=	${THISARM}/tegra/genassym.cf

_OSRELEASE!=		${HOST_SH} $S/conf/osrelease.sh

MKUBOOTIMAGEARGS=	-A arm -T kernel -O linux
MKUBOOTIMAGEARGS+=	-a $(KERNEL_BASE_PHYS) -e $(KERNEL_BASE_PHYS)
MKUBOOTIMAGEARGS+=	-n "NetBSD/$(BOARDTYPE) ${_OSRELEASE}"
MKUBOOTIMAGEARGS_NONE=	${MKUBOOTIMAGEARGS} -C none
MKUBOOTIMAGEARGS_GZ=	${MKUBOOTIMAGEARGS} -C gz

SYSTEM_LD_TAIL_EXTRA+=; \
	echo ${OBJCOPY} -S -O binary $@@ $@@.bin; \
	${OBJCOPY} -S -O binary $@@ $@@.bin; \
	echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} $@@.bin $@@.ub; \
	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} $@@.bin $@@.ub; \
	echo ${TOOL_GZIP} -c $@@.bin > $@@.bin.gz; \
	${TOOL_GZIP} -c $@@.bin > $@@.bin.gz; \
	echo ${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_GZ} $@@.bin.gz $@@.gz.ub; \
	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_GZ} $@@.bin.gz $@@.gz.ub

EXTRA_KERNELS+= ${KERNELS:@@.KERNEL.@@${.KERNEL.}.bin@@}
EXTRA_KERNELS+= ${KERNELS:@@.KERNEL.@@${.KERNEL.}.ub@@}
EXTRA_KERNELS+= ${KERNELS:@@.KERNEL.@@${.KERNEL.}.bin.gz@@}
EXTRA_KERNELS+= ${KERNELS:@@.KERNEL.@@${.KERNEL.}.gz.ub@@}
@


1.1.2.3
log
@Sync with head
@
text
@d1 2
a2 1
#	$NetBSD: mk.generic,v 1.2 2018/10/18 09:01:54 skrll Exp $
d6 4
a9 2
SYSTEM_FIRST_OBJ=	armv6_start.o
SYSTEM_FIRST_SFILE=	${ARM}/arm/armv6_start.S
d13 2
a14 2
MKUBOOTIMAGEARGS=	-A arm -T kernel_noload -O linux
MKUBOOTIMAGEARGS+=	-e 0
@


1.1.2.4
log
@Sync with HEAD, resolve a couple of conflicts
@
text
@d1 1
a1 1
#	$NetBSD: mk.generic,v 1.5 2018/10/30 09:06:07 martin Exp $
a4 4
.if !empty(MACHINE_ARCH:M*eb)
EXTRA_LINKFLAGS+=	--be8
.endif

d12 1
a12 1
MKUBOOTIMAGEARGS+=	-n "NetBSD/${BOARDTYPE:U${MACHINE_ARCH}} ${_OSRELEASE}"
@


