diff --git a/LICENSE b/LICENSE-APACHE similarity index 100% rename from LICENSE rename to LICENSE-APACHE diff --git a/LICENSE-MIT b/LICENSE-MIT new file mode 100644 index 00000000..2286d30b --- /dev/null +++ b/LICENSE-MIT @@ -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. diff --git a/Makefile b/Makefile index 4ae12803..68bc9fe4 100644 --- a/Makefile +++ b/Makefile @@ -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"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# 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. +# Licensed under the Apache License, Version 2.0 or the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. arch ?= x86_64 target ?= $(arch)-unknown-linux-gnu diff --git a/README.md b/README.md index c433594e..b22dd09b 100644 --- a/README.md +++ b/README.md @@ -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) 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. diff --git a/src/arch/x86_64/boot.asm b/src/arch/x86_64/boot.asm index 8434dc87..dfa8bba7 100644 --- a/src/arch/x86_64/boot.asm +++ b/src/arch/x86_64/boot.asm @@ -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"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; 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. +; Licensed under the Apache License, Version 2.0 or the MIT license +; , at your +; option. This file may not be copied, modified, or distributed +; except according to those terms. global start extern long_mode_start diff --git a/src/arch/x86_64/grub.cfg b/src/arch/x86_64/grub.cfg index 9713ba02..957419e3 100644 --- a/src/arch/x86_64/grub.cfg +++ b/src/arch/x86_64/grub.cfg @@ -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") -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# 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. +# Licensed under the Apache License, Version 2.0 or the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. set timeout=0 set default=0 diff --git a/src/arch/x86_64/linker.ld b/src/arch/x86_64/linker.ld index 47be2d8f..5b1481dd 100644 --- a/src/arch/x86_64/linker.ld +++ b/src/arch/x86_64/linker.ld @@ -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") -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -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. +Licensed under the Apache License, Version 2.0 or the MIT license +, at your +option. This file may not be copied, modified, or distributed +except according to those terms. */ ENTRY(start) diff --git a/src/arch/x86_64/long_mode_init.asm b/src/arch/x86_64/long_mode_init.asm index bcf588a8..1fce994d 100644 --- a/src/arch/x86_64/long_mode_init.asm +++ b/src/arch/x86_64/long_mode_init.asm @@ -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"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; 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. +; Licensed under the Apache License, Version 2.0 or the MIT license +; , at your +; option. This file may not be copied, modified, or distributed +; except according to those terms. global long_mode_start extern rust_main diff --git a/src/arch/x86_64/multiboot_header.asm b/src/arch/x86_64/multiboot_header.asm index 40d0e0fe..2c9c47d2 100644 --- a/src/arch/x86_64/multiboot_header.asm +++ b/src/arch/x86_64/multiboot_header.asm @@ -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"); -; you may not use this file except in compliance with the License. -; You may obtain a copy of the License at -; -; http://www.apache.org/licenses/LICENSE-2.0 -; -; 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. +; Licensed under the Apache License, Version 2.0 or the MIT license +; , at your +; option. This file may not be copied, modified, or distributed +; except according to those terms. section .multiboot_header header_start: diff --git a/src/lib.rs b/src/lib.rs index d1584390..42153f6f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// 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. +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. #![feature(lang_items)] #![feature(const_fn, unique)] diff --git a/src/memory/area_frame_allocator.rs b/src/memory/area_frame_allocator.rs index 709a8892..c0162b66 100644 --- a/src/memory/area_frame_allocator.rs +++ b/src/memory/area_frame_allocator.rs @@ -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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + use memory::{Frame, FrameAllocator}; use multiboot2::{MemoryAreaIter, MemoryArea}; diff --git a/src/memory/mod.rs b/src/memory/mod.rs index ab420af7..ffd418e5 100644 --- a/src/memory/mod.rs +++ b/src/memory/mod.rs @@ -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 or the MIT license +// , 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::paging::test_paging; use self::paging::PhysicalAddress; diff --git a/src/memory/paging/entry.rs b/src/memory/paging/entry.rs index 071ee277..b223727a 100644 --- a/src/memory/paging/entry.rs +++ b/src/memory/paging/entry.rs @@ -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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + use memory::Frame; pub struct Entry(u64); diff --git a/src/memory/paging/mod.rs b/src/memory/paging/mod.rs index 439fc918..dc598c5e 100644 --- a/src/memory/paging/mod.rs +++ b/src/memory/paging/mod.rs @@ -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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + pub use self::entry::*; use memory::{PAGE_SIZE, Frame, FrameAllocator}; use self::table::{Table, Level4}; diff --git a/src/memory/paging/table.rs b/src/memory/paging/table.rs index a2cd7a09..e06c3db0 100644 --- a/src/memory/paging/table.rs +++ b/src/memory/paging/table.rs @@ -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 or the MIT license +// , 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_COUNT; use memory::FrameAllocator; diff --git a/src/vga_buffer.rs b/src/vga_buffer.rs index 65e5352a..2546fdd5 100644 --- a/src/vga_buffer.rs +++ b/src/vga_buffer.rs @@ -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"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// 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. +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. use core::ptr::Unique; use core::fmt;