binkernel.c revision 1.1
11.1Stsutsui/*	$NetBSD: binkernel.c,v 1.1 2005/12/29 15:20:09 tsutsui Exp $	*/
21.1Stsutsui
31.1Stsutsui/*-
41.1Stsutsui * Copyright (c) 2004, 2005 The NetBSD Foundation, Inc.
51.1Stsutsui * All rights reserved.
61.1Stsutsui *
71.1Stsutsui * This code is derived from software contributed to The NetBSD Foundation
81.1Stsutsui * by UCHIYAMA Yasushi.
91.1Stsutsui *
101.1Stsutsui * Redistribution and use in source and binary forms, with or without
111.1Stsutsui * modification, are permitted provided that the following conditions
121.1Stsutsui * are met:
131.1Stsutsui * 1. Redistributions of source code must retain the above copyright
141.1Stsutsui *    notice, this list of conditions and the following disclaimer.
151.1Stsutsui * 2. Redistributions in binary form must reproduce the above copyright
161.1Stsutsui *    notice, this list of conditions and the following disclaimer in the
171.1Stsutsui *    documentation and/or other materials provided with the distribution.
181.1Stsutsui * 3. All advertising materials mentioning features or use of this software
191.1Stsutsui *    must display the following acknowledgement:
201.1Stsutsui *        This product includes software developed by the NetBSD
211.1Stsutsui *        Foundation, Inc. and its contributors.
221.1Stsutsui * 4. Neither the name of The NetBSD Foundation nor the names of its
231.1Stsutsui *    contributors may be used to endorse or promote products derived
241.1Stsutsui *    from this software without specific prior written permission.
251.1Stsutsui *
261.1Stsutsui * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
271.1Stsutsui * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
281.1Stsutsui * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
291.1Stsutsui * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
301.1Stsutsui * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
311.1Stsutsui * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
321.1Stsutsui * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
331.1Stsutsui * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
341.1Stsutsui * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
351.1Stsutsui * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
361.1Stsutsui * POSSIBILITY OF SUCH DAMAGE.
371.1Stsutsui */
381.1Stsutsui
391.1Stsutsui#include <lib/libsa/stand.h>
401.1Stsutsui#include <lib/libkern/libkern.h>
411.1Stsutsui#include "local.h"
421.1Stsutsui
431.1Stsutsui#ifndef KERNEL_SIZE
441.1Stsutsui#define KERNEL_SIZE	0
451.1Stsutsui#endif
461.1Stsutsui
471.1Stsutsui#if KERNEL_SIZE < 32
481.1Stsutsuiuint8_t kernel_binary[0];
491.1Stsutsuiint kernel_binary_size = 0;
501.1Stsutsui#else
511.1Stsutsuiuint8_t kernel_binary[KERNEL_SIZE] = "kernel binary will be here.   ";
521.1Stsutsuiint kernel_binary_size = KERNEL_SIZE;
531.1Stsutsui#endif
54