Merge pull request #96 from phil-opp/dual-license

Dual license the code
This commit is contained in:
Philipp Oppermann
2015-12-29 12:35:57 +01:00
16 changed files with 113 additions and 96 deletions

9
LICENSE-MIT Normal file
View File

@@ -0,0 +1,9 @@
The MIT License (MIT)
Copyright (c) 2015 Philipp Oppermann
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -1,16 +1,11 @@
# Copyright 2015 Philipp Oppermann # Copyright 2015 Philipp Oppermann. See the README.md
# file at the top-level directory of this distribution.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# you may not use this file except in compliance with the License. # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# You may obtain a copy of the License at # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# # option. This file may not be copied, modified, or distributed
# http://www.apache.org/licenses/LICENSE-2.0 # except according to those terms.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
arch ?= x86_64 arch ?= x86_64
target ?= $(arch)-unknown-linux-gnu target ?= $(arch)-unknown-linux-gnu

View File

@@ -2,3 +2,6 @@
[![Build Status](https://travis-ci.org/phil-opp/blog_os.svg?branch=master)](https://travis-ci.org/phil-opp/blog_os) [![Build Status](https://travis-ci.org/phil-opp/blog_os.svg?branch=master)](https://travis-ci.org/phil-opp/blog_os)
This repository contains the code for the “Writing an OS in Rust” series at [os.phil-opp.com](http://os.phil-opp.com). This repository contains the code for the “Writing an OS in Rust” series at [os.phil-opp.com](http://os.phil-opp.com).
# License
The source code is dual-licensed under MIT or the Apache License (Version 2.0). This excludes the `posts` and `pages` directories.

View File

@@ -1,16 +1,11 @@
; Copyright 2015 Philipp Oppermann ; Copyright 2015 Philipp Oppermann. See the README.md
; file at the top-level directory of this distribution.
; ;
; Licensed under the Apache License, Version 2.0 (the "License"); ; Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
; you may not use this file except in compliance with the License. ; http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
; You may obtain a copy of the License at ; <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
; ; option. This file may not be copied, modified, or distributed
; http://www.apache.org/licenses/LICENSE-2.0 ; except according to those terms.
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
global start global start
extern long_mode_start extern long_mode_start

View File

@@ -1,16 +1,11 @@
# Copyright 2015 Philipp Oppermann # Copyright 2015 Philipp Oppermann. See the README.md
# file at the top-level directory of this distribution.
# #
# Licensed under the Apache License, Version 2.0 (the "License") # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# you may not use this file except in compliance with the License. # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# You may obtain a copy of the License at # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
# # option. This file may not be copied, modified, or distributed
# http://www.apache.org/licenses/LICENSE-2.0 # except according to those terms.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set timeout=0 set timeout=0
set default=0 set default=0

View File

@@ -1,17 +1,12 @@
/* /*
Copyright 2015 Philipp Oppermann Copyright 2015 Philipp Oppermann. See the README.md
file at the top-level directory of this distribution.
Licensed under the Apache License, Version 2.0 (the "License") Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
you may not use this file except in compliance with the License. http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
You may obtain a copy of the License at <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
option. This file may not be copied, modified, or distributed
http://www.apache.org/licenses/LICENSE-2.0 except according to those terms.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/ */
ENTRY(start) ENTRY(start)

View File

@@ -1,16 +1,11 @@
; Copyright 2015 Philipp Oppermann ; Copyright 2015 Philipp Oppermann. See the README.md
; file at the top-level directory of this distribution.
; ;
; Licensed under the Apache License, Version 2.0 (the "License"); ; Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
; you may not use this file except in compliance with the License. ; http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
; You may obtain a copy of the License at ; <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
; ; option. This file may not be copied, modified, or distributed
; http://www.apache.org/licenses/LICENSE-2.0 ; except according to those terms.
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
global long_mode_start global long_mode_start
extern rust_main extern rust_main

View File

@@ -1,16 +1,11 @@
; Copyright 2015 Philipp Oppermann ; Copyright 2015 Philipp Oppermann. See the README.md
; file at the top-level directory of this distribution.
; ;
; Licensed under the Apache License, Version 2.0 (the "License"); ; Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
; you may not use this file except in compliance with the License. ; http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
; You may obtain a copy of the License at ; <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
; ; option. This file may not be copied, modified, or distributed
; http://www.apache.org/licenses/LICENSE-2.0 ; except according to those terms.
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
section .multiboot_header section .multiboot_header
header_start: header_start:

View File

@@ -1,16 +1,11 @@
// Copyright 2015 Philipp Oppermann // Copyright 2015 Philipp Oppermann. See the README.md
// file at the top-level directory of this distribution.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// you may not use this file except in compliance with the License. // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// You may obtain a copy of the License at // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// // option. This file may not be copied, modified, or distributed
// http://www.apache.org/licenses/LICENSE-2.0 // except according to those terms.
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#![feature(lang_items)] #![feature(lang_items)]
#![feature(const_fn, unique)] #![feature(const_fn, unique)]

View File

@@ -1,3 +1,12 @@
// Copyright 2015 Philipp Oppermann. See the README.md
// file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use memory::{Frame, FrameAllocator}; use memory::{Frame, FrameAllocator};
use multiboot2::{MemoryAreaIter, MemoryArea}; use multiboot2::{MemoryAreaIter, MemoryArea};

View File

@@ -1,3 +1,12 @@
// Copyright 2015 Philipp Oppermann. See the README.md
// file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
pub use self::area_frame_allocator::AreaFrameAllocator; pub use self::area_frame_allocator::AreaFrameAllocator;
pub use self::paging::test_paging; pub use self::paging::test_paging;
use self::paging::PhysicalAddress; use self::paging::PhysicalAddress;

View File

@@ -1,3 +1,12 @@
// Copyright 2015 Philipp Oppermann. See the README.md
// file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use memory::Frame; use memory::Frame;
pub struct Entry(u64); pub struct Entry(u64);

View File

@@ -1,3 +1,12 @@
// Copyright 2015 Philipp Oppermann. See the README.md
// file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
pub use self::entry::*; pub use self::entry::*;
use memory::{PAGE_SIZE, Frame, FrameAllocator}; use memory::{PAGE_SIZE, Frame, FrameAllocator};
use self::table::{Table, Level4}; use self::table::{Table, Level4};

View File

@@ -1,3 +1,12 @@
// Copyright 2015 Philipp Oppermann. See the README.md
// file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use memory::paging::entry::*; use memory::paging::entry::*;
use memory::paging::ENTRY_COUNT; use memory::paging::ENTRY_COUNT;
use memory::FrameAllocator; use memory::FrameAllocator;

View File

@@ -1,16 +1,11 @@
// Copyright 2015 Philipp Oppermann // Copyright 2015 Philipp Oppermann. See the README.md
// file at the top-level directory of this distribution.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// you may not use this file except in compliance with the License. // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// You may obtain a copy of the License at // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// // option. This file may not be copied, modified, or distributed
// http://www.apache.org/licenses/LICENSE-2.0 // except according to those terms.
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use core::ptr::Unique; use core::ptr::Unique;
use core::fmt; use core::fmt;