Stop building a.out kernels so that mkldscript.sh is no longer necessary.

Tested "build.sh release", and the default ELF GENERIC kernel loaded by
the native bootloader just works on LUNA-II.
This commit is contained in:
tsutsui 2014-11-13 16:18:38 +00:00
parent cb8dda3c0e
commit 30bc235eca
5 changed files with 5 additions and 73 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.1 2011/07/16 15:52:21 tsutsui Exp $
# $NetBSD: Makefile,v 1.2 2014/11/13 16:18:38 tsutsui Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@ -9,9 +9,6 @@ RAMDISK= ${RAMDISKDIR}/ramdisk.fs
MDSETTARGETS= INSTALL ${RAMDISK} -
MDSET_RELEASEDIR= binary/kernel
MDSET_SUFFIXES.-= aout create-aout
create-aout= ${ELF2AOUT} ${.TARGET:R} ${.TARGET}
.include "${DISTRIBDIR}/common/Makefile.mdset"
.include <bsd.prog.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.6 2011/10/17 14:42:42 tsutsui Exp $
# $NetBSD: Makefile.inc,v 1.7 2014/11/13 16:18:38 tsutsui Exp $
#
# etc.luna68k/Makefile.inc -- luna68k-specific etc Makefile targets
#
@ -7,7 +7,6 @@
# to update the release documentation in distrib/notes/common/contents
KERNEL_SETS= GENERIC
KERNEL_SUFFIXES= aout
BUILD_KERNELS= INSTALL

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.luna68k,v 1.25 2014/11/13 15:03:06 uebayasi Exp $
# $NetBSD: Makefile.luna68k,v 1.26 2014/11/13 16:18:38 tsutsui Exp $
# Makefile for NetBSD
#
@ -60,23 +60,8 @@ locore.o: ${LUNA68K}/luna68k/locore.s assym.h
##
## (5) link settings
##
LINKFORMAT= -N -T ldscript
.if (${OBJECT_FMT} == "ELF")
# Need to convert the kernel from ELF to a.out so that PROM can load it.
SYSTEM_LD_HEAD_EXTRA+=; \
( cat ${LUNA68K}/conf/kern.ldscript.head ; \
OBJDUMP=${OBJDUMP} ${HOST_SH} $S/conf/mkldscript.sh \
${SYSTEM_OBJ} ; \
cat ${LUNA68K}/conf/kern.ldscript.tail ) > ldscript
SYSTEM_DEP+= ${LUNA68K}/conf/kern.ldscript.head \
$S/conf/mkldscript.sh \
${LUNA68K}/conf/kern.ldscript.tail
SYSTEM_LD_TAIL_EXTRA+=; \
echo "${ELF2AOUT} $@ $@.aout" ; \
${ELF2AOUT} $@ $@.aout
.endif
LINKFORMAT= -N
TEXTADDR?= 0xc000
##
## (6) port specific target dependencies

View File

@ -1,15 +0,0 @@
/* $NetBSD: kern.ldscript.head,v 1.1 2011/07/16 15:52:21 tsutsui Exp $ */
OUTPUT_FORMAT("elf32-m68k")
OUTPUT_ARCH(m68k)
ENTRY(start)
SECTIONS
{
. = 0x0000c000;
/* Read-only sections, merged into text segment: */
.text :
{
*(.text)
*(.text.*)
*(.rodata) *(.rodata.*)

View File

@ -1,34 +0,0 @@
/* $NetBSD: kern.ldscript.tail,v 1.1 2011/07/16 15:52:21 tsutsui Exp $ */
} =0
PROVIDE (__etext = .);
PROVIDE (_etext = .);
PROVIDE (etext = .);
.data :
{
__data_start = . ;
*(.data)
*(.data.*)
*(.sdata)
*(.sdata.*)
}
_edata = .;
PROVIDE (edata = .);
__bss_start = .;
__bss_start__ = .;
.bss :
{
*(.dynbss)
*(.bss)
*(.bss.*)
*(COMMON)
/* Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections. */
/* . = ALIGN(32 / 8); */
}
/* . = ALIGN(32 / 8);*/
_end = .;
_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
PROVIDE (end = .);
}