xref: /netbsd-src/sys/arch/evbarm/conf/mk.mv2120 (revision 25d856e749f08c7867213aa69d4734f8318bef47)
1#	$NetBSD: mk.mv2120,v 1.3 2024/02/17 15:08:32 christos Exp $
2
3SYSTEM_FIRST_OBJ=	marvell_start.o
4SYSTEM_FIRST_SFILE=	${THISARM}/marvell/marvell_start.S
5
6_OSRELEASE!=		${HOST_SH} $S/conf/osrelease.sh
7
8#
9# MV2120 U-Boot is 1.1.4.
10#
11# This version cannot uncompress (or relocate?) images larger than 4Mbyte.
12# It also requires the entry point to be byte-swapped (or maybe just in
13# network byte order, this is a LE machine).
14#
15# U-Boot is already consuming the first 4MiB of memory, our image header
16# is 0x40 bytes.  Hence we load the image at 0x400000 and enter at 0x400040.
17#
18
19UIMAGE_BASE_PHYS=0x00400000
20KERNEL_BASE_PHYS=0x00400040
21KERNEL_BASE_VIRT=0xc0400040
22
23MKUBOOTIMAGEARGS=	-A arm -T kernel
24MKUBOOTIMAGEARGS+=	-a ${UIMAGE_BASE_PHYS} -E ${KERNEL_BASE_PHYS}
25MKUBOOTIMAGEARGS+=	-n "NetBSD/$(BOARDTYPE) ${_OSRELEASE}"
26.if ${MKREPRO_TIMESTAMP:Uno} != "no"
27MKUBOOTIMAGEARGS+=	-t "${MKREPRO_TIMESTAMP}"
28.endif
29MKUBOOTIMAGEARGS_NONE=	${MKUBOOTIMAGEARGS} -C none
30
31SYSTEM_LD_TAIL_EXTRA+=; \
32	${OBJCOPY} -S -O binary $@ $@.bin; \
33	${TOOL_MKUBOOTIMAGE} ${MKUBOOTIMAGEARGS_NONE} $@.bin $@.ub;
34
35EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.bin@}
36EXTRA_KERNELS+= ${KERNELS:@.KERNEL.@${.KERNEL.}.ub@}
37