According to nxr.netbsd.org, nothing uses MEMORY_DISK_IMAGE. Retire it.
Premature design and its build rule bloats Makefile.kern.inc. There are other ways like MEMORY_DISK_DYNAMIC. (When kernel will be built as relocatable, embedding binary data will be much easier, and md(4), splash(4), and ksyms(4) will all benefit.)
This commit is contained in:
parent
c0c2ceb91f
commit
eee4f24ac6
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile.kern.inc,v 1.206 2015/08/29 15:37:18 uebayasi Exp $
|
||||
# $NetBSD: Makefile.kern.inc,v 1.207 2015/08/29 15:51:53 uebayasi Exp $
|
||||
#
|
||||
# This file contains common `MI' targets and definitions and it is included
|
||||
# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
|
||||
@ -349,19 +349,6 @@ vers.o: ${SYSTEM_OBJ} Makefile $S/conf/newvers.sh \
|
||||
init_main.o: splash_image.o
|
||||
.endif
|
||||
|
||||
.if defined(MEMORY_DISK_IMAGE)
|
||||
md_root_image.h: ${MEMORY_DISK_IMAGE}
|
||||
${_MKTARGET_CREATE}
|
||||
${TOOL_HEXDUMP} -v -e '"\t" 8/1 "0x%02x, " "\n"' ${.ALLSRC} > ${.TARGET}
|
||||
|
||||
# XXX This is only needed when building md_root.o
|
||||
CPPFLAGS+= -DMEMORY_DISK_IMAGE
|
||||
md_root.o: md_root_image.h
|
||||
.endif
|
||||
|
||||
# depend on MEMORY_DISK_IMAGE configuration
|
||||
md_root.o: Makefile
|
||||
|
||||
##
|
||||
## (7) misc targets: install, clean(dir), depend(all), lint, links, tags,
|
||||
## cscope, mkid
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: md_root.c,v 1.17 2009/04/16 14:46:33 tsutsui Exp $ */
|
||||
/* $NetBSD: md_root.c,v 1.18 2015/08/29 15:51:53 uebayasi Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: md_root.c,v 1.17 2009/04/16 14:46:33 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: md_root.c,v 1.18 2015/08/29 15:51:53 uebayasi Exp $");
|
||||
|
||||
#include "opt_md.h"
|
||||
|
||||
@ -41,23 +41,10 @@ __KERNEL_RCSID(0, "$NetBSD: md_root.c,v 1.17 2009/04/16 14:46:33 tsutsui Exp $")
|
||||
#include <dev/md.h>
|
||||
|
||||
#ifdef MEMORY_DISK_DYNAMIC
|
||||
#ifdef MEMORY_DISK_IMAGE
|
||||
#error MEMORY_DISK_DYNAMIC is not compatible with MEMORY_DISK_IMAGE
|
||||
#endif
|
||||
size_t md_root_size;
|
||||
char *md_root_image;
|
||||
#else /* MEMORY_DISK_DYNAMIC */
|
||||
|
||||
#ifdef MEMORY_DISK_IMAGE
|
||||
#ifdef MEMORY_DISK_ROOT_SIZE
|
||||
#error MEMORY_DISK_ROOT_SIZE is not compatible with MEMORY_DISK_IMAGE
|
||||
#endif
|
||||
char md_root_image[] = {
|
||||
#include "md_root_image.h"
|
||||
};
|
||||
uint32_t md_root_size = sizeof(md_root_image) & ~(DEV_BSIZE - 1);
|
||||
|
||||
#else /* MEMORY_DISK_IMAGE */
|
||||
|
||||
#ifndef MEMORY_DISK_ROOT_SIZE
|
||||
#define MEMORY_DISK_ROOT_SIZE 512
|
||||
@ -70,7 +57,6 @@ uint32_t md_root_size = sizeof(md_root_image) & ~(DEV_BSIZE - 1);
|
||||
*/
|
||||
uint32_t md_root_size = ROOTBYTES;
|
||||
char md_root_image[ROOTBYTES] = "|This is the root ramdisk!\n";
|
||||
#endif /* MEMORY_DISK_IMAGE */
|
||||
#endif /* MEMORY_DISK_DYNAMIC */
|
||||
|
||||
#ifndef MEMORY_DISK_RBFLAGS
|
||||
|
Loading…
Reference in New Issue
Block a user