Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Stop building a.out kernels so that mkldscript.sh is no long...



details:   https://anonhg.NetBSD.org/src/rev/c6ae4cdc83b1
branches:  trunk
changeset: 333678:c6ae4cdc83b1
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Thu Nov 13 16:18:38 2014 +0000

description:
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.

diffstat:

 distrib/luna68k/instkernel/Makefile      |   5 +---
 etc/etc.luna68k/Makefile.inc             |   3 +-
 sys/arch/luna68k/conf/Makefile.luna68k   |  21 ++----------------
 sys/arch/luna68k/conf/kern.ldscript.head |  15 --------------
 sys/arch/luna68k/conf/kern.ldscript.tail |  34 --------------------------------
 5 files changed, 5 insertions(+), 73 deletions(-)

diffs (128 lines):

diff -r 92356b1f1eb9 -r c6ae4cdc83b1 distrib/luna68k/instkernel/Makefile
--- a/distrib/luna68k/instkernel/Makefile       Thu Nov 13 16:11:18 2014 +0000
+++ b/distrib/luna68k/instkernel/Makefile       Thu Nov 13 16:18:38 2014 +0000
@@ -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 @@
 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>
diff -r 92356b1f1eb9 -r c6ae4cdc83b1 etc/etc.luna68k/Makefile.inc
--- a/etc/etc.luna68k/Makefile.inc      Thu Nov 13 16:11:18 2014 +0000
+++ b/etc/etc.luna68k/Makefile.inc      Thu Nov 13 16:18:38 2014 +0000
@@ -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
 
diff -r 92356b1f1eb9 -r c6ae4cdc83b1 sys/arch/luna68k/conf/Makefile.luna68k
--- a/sys/arch/luna68k/conf/Makefile.luna68k    Thu Nov 13 16:11:18 2014 +0000
+++ b/sys/arch/luna68k/conf/Makefile.luna68k    Thu Nov 13 16:18:38 2014 +0000
@@ -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 @@
 ##
 ## (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
diff -r 92356b1f1eb9 -r c6ae4cdc83b1 sys/arch/luna68k/conf/kern.ldscript.head
--- a/sys/arch/luna68k/conf/kern.ldscript.head  Thu Nov 13 16:11:18 2014 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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.*)
diff -r 92356b1f1eb9 -r c6ae4cdc83b1 sys/arch/luna68k/conf/kern.ldscript.tail
--- a/sys/arch/luna68k/conf/kern.ldscript.tail  Thu Nov 13 16:11:18 2014 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -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 = .);
-}



Home | Main Index | Thread Index | Old Index