Skip to content

Commit

Permalink
5061 freebsd boot loader integration (loader project)
Browse files Browse the repository at this point in the history
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Cody Mello <melloc@joyent.com>
Approved by: Robert Mustacchi <rm@joyent.com>
  • Loading branch information
tsoome authored and rmustacc committed Sep 22, 2016
1 parent 0cc5983 commit 199767f
Show file tree
Hide file tree
Showing 1,273 changed files with 417,413 additions and 1 deletion.
1 change: 1 addition & 0 deletions exception_lists/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ exception_lists/closed-bins
exception_lists/copyright
exception_lists/cstyle
exception_lists/hdrchk
usr/src/boot/*
usr/src/cmd/cmd-inet/usr.bin/dns-sd/ClientCommon.c
usr/src/cmd/cmd-inet/usr.bin/dns-sd/ClientCommon.h
usr/src/cmd/cmd-inet/usr.bin/dns-sd/dns-sd.c
Expand Down
1 change: 1 addition & 0 deletions exception_lists/cstyle
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
usr/src/boot/*
usr/src/cmd/cmd-inet/usr.bin/dns-sd/ClientCommon.[ch]
usr/src/cmd/cmd-inet/usr.bin/dns-sd/dns-sd.c
usr/src/cmd/cmd-inet/usr.lib/mdnsd/CryptoAlg.[ch]
Expand Down
1 change: 1 addition & 0 deletions exception_lists/hdrchk
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
usr/src/boot/*
usr/src/cmd/cmd-inet/usr.bin/dns-sd/ClientCommon.h
usr/src/cmd/cmd-inet/usr.lib/mdnsd/CryptoAlg.h
usr/src/cmd/cmd-inet/usr.lib/mdnsd/DNSCommon.h
Expand Down
1 change: 1 addition & 0 deletions exception_lists/keywords
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#

syntax: glob
usr/src/boot/*
usr/src/cmd/cmd-inet/usr.bin/dns-sd/dns-sd.c
usr/src/cmd/boot/common/bblk_einfo.c
usr/src/cmd/localedef/data/zh_CN.UTF-8.src
Expand Down
14 changes: 14 additions & 0 deletions exception_lists/manlint
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
#
# Copyright 2016 Toomas Soome <tsoome@me.com>
#
usr/src/boot/*
2 changes: 2 additions & 0 deletions exception_lists/mapfilechk
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#

#
# Copyright 2016 Toomas Soome <tsoome@me.com>
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
#

Expand All @@ -36,6 +37,7 @@

syntax: glob
exception_lists/mapfilechk
usr/src/boot/*
usr/src/cmd/lp/filter/postscript/font/devpost/charlib/*
usr/src/cmd/mdb/common/kmdb/mapfile_skel
usr/src/cmd/sgs/libconv/common/map.msg
Expand Down
3 changes: 2 additions & 1 deletion usr/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
# Copyright (c) 2012 by Delphix. All rights reserved.
# Copyright 2014 Garrett D'Amore <garrett@damore.org>
# Copyright 2015 OmniTI Computer Consulting, Inc. All rights reserved.
# Copyright 2016 Toomas Soome <tsoome@me.com>
#

#
Expand All @@ -38,7 +39,7 @@ include Targetdirs

COMMON_SUBDIRS= uts lib cmd ucblib ucbcmd psm man test
sparc_SUBDIRS= stand
i386_SUBDIRS= grub
i386_SUBDIRS= grub boot

#
# sparc needs to build stand before psm
Expand Down
126 changes: 126 additions & 0 deletions usr/src/boot/COPYRIGHT
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# $FreeBSD$
# @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94

The compilation of software known as FreeBSD is distributed under the
following terms:

Copyright (c) 1992-2015 The FreeBSD Project. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

The 4.4BSD and 4.4BSD-Lite software is distributed under the following
terms:

All of the documentation and software included in the 4.4BSD and 4.4BSD-Lite
Releases is copyrighted by The Regents of the University of California.

Copyright 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

The Institute of Electrical and Electronics Engineers and the American
National Standards Committee X3, on Information Processing Systems have
given us permission to reprint portions of their documentation.

In the following statement, the phrase ``this text'' refers to portions
of the system documentation.

Portions of this text are reprinted and reproduced in electronic form in
the second BSD Networking Software Release, from IEEE Std 1003.1-1988, IEEE
Standard Portable Operating System Interface for Computer Environments
(POSIX), copyright C 1988 by the Institute of Electrical and Electronics
Engineers, Inc. In the event of any discrepancy between these versions
and the original IEEE Standard, the original IEEE Standard is the referee
document.

In the following statement, the phrase ``This material'' refers to portions
of the system documentation.

This material is reproduced with permission from American National
Standards Committee X3, on Information Processing Systems. Computer and
Business Equipment Manufacturers Association (CBEMA), 311 First St., NW,
Suite 500, Washington, DC 20001-2178. The developmental work of
Programming Language C was completed by the X3J11 Technical Committee.

The views and conclusions contained in the software and documentation are
those of the authors and should not be interpreted as representing official
policies, either expressed or implied, of the Regents of the University
of California.


NOTE: The copyright of UC Berkeley's Berkeley Software Distribution ("BSD")
source has been updated. The copyright addendum may be found at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change and is
included below.

July 22, 1999

To All Licensees, Distributors of Any Version of BSD:

As you know, certain of the Berkeley Software Distribution ("BSD") source
code files require that further distributions of products containing all or
portions of the software, acknowledge within their advertising materials
that such products contain software developed by UC Berkeley and its
contributors.

Specifically, the provision reads:

" * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors."

Effective immediately, licensees and distributors are no longer required to
include the acknowledgement within advertising materials. Accordingly, the
foregoing paragraph of those BSD Unix files containing it is hereby deleted
in its entirety.

William Hoskins
Director, Office of Technology Licensing
University of California, Berkeley
1 change: 1 addition & 0 deletions usr/src/boot/COPYRIGHT.descrip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$FreeBSD$
32 changes: 32 additions & 0 deletions usr/src/boot/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# Copyright 2015 Toomas Soome <tsoome@me.com>
#

.KEEP_STATE:

include ../Makefile.master

SUBDIRS = sys/boot

all := TARGET = all
install := TARGET = install
clean := TARGET = clean
clobber := TARGET = clobber

all install clean clobber: $(SUBDIRS)

$(SUBDIRS): FRC
@cd $@; pwd; $(MAKE) $(MFLAGS) $(TARGET)

FRC:
60 changes: 60 additions & 0 deletions usr/src/boot/Readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# Copyright 2016 Toomas Soome <tsoome@me.com>
#
# Please update the svn revision number on source refresh.

Current snapshot from freebsd revision 296191.

This is source tree snapshot of loader and related parts from
freebsd source.

Directory tree layout:

usr/src/boot is the root directory of the imported snapshot,
containing Makefile and licence notes for build and packaging.

Directories from freebsd userland (freebsd /usr/src tree):
contrib
include
lib

Directories from freebsd kernel tree, including boot loader itself
are located in sys subdirectory (freebsd /usr/src/sys tree):

platform specific include files:

sys/amd64
sys/i386
sys/x86

sys and ufs include files:
sys/sys
sys/ufs

zfs boot module import in freebsd:
sys/cddl

acpica module import in freebsd:
sys/contrib

boot loader sources are in:
sys/boot

Note, some of the directories are not 1:1 mapping in this source import,
because of differences of build systems used in illumos and freebsd.
Also some differences are due to fact, we do not need all the variants of
stage1/stage2 boot blocks which are built in freebsd due to the historical
or technical reasons.

Mar, 2016
Loading

0 comments on commit 199767f

Please sign in to comment.