binkernel.c revision 1.2
11.2Smartin/*	$NetBSD: binkernel.c,v 1.2 2008/04/28 20:23:18 martin 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 *
191.1Stsutsui * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
201.1Stsutsui * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
211.1Stsutsui * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
221.1Stsutsui * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
231.1Stsutsui * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
241.1Stsutsui * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
251.1Stsutsui * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
261.1Stsutsui * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
271.1Stsutsui * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
281.1Stsutsui * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
291.1Stsutsui * POSSIBILITY OF SUCH DAMAGE.
301.1Stsutsui */
311.1Stsutsui
321.1Stsutsui#include <lib/libsa/stand.h>
331.1Stsutsui#include <lib/libkern/libkern.h>
341.1Stsutsui#include "local.h"
351.1Stsutsui
361.1Stsutsui#ifndef KERNEL_SIZE
371.1Stsutsui#define KERNEL_SIZE	0
381.1Stsutsui#endif
391.1Stsutsui
401.1Stsutsui#if KERNEL_SIZE < 32
411.1Stsutsuiuint8_t kernel_binary[0];
421.1Stsutsuiint kernel_binary_size = 0;
431.1Stsutsui#else
441.1Stsutsuiuint8_t kernel_binary[KERNEL_SIZE] = "kernel binary will be here.   ";
451.1Stsutsuiint kernel_binary_size = KERNEL_SIZE;
461.1Stsutsui#endif
47