From 112003a55671ffa5285145280988dc1248b26b08 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Fri, 23 Dec 2016 14:20:24 +0100 Subject: Paper build system initial import into Libreboot This is the initial import of the Paper build system into Libreboot. It was written as a flexible and painless replacement for the Libreboot build system, allowing to support many different configurations. It currently only supports the following CrOS devices: * Chromebook 13 CB5-311 (nyan big) * Chromebook 14 (nyan blaze) * Chromebook 11 (HiSense) (veyron jerry) * Chromebit CS10 (veyron mickey) * Chromebook Flip C100PA (veyron minnie) * Chromebook C201PA (veyron speedy) The build system also supports building various tools and provides various scripts to ease the installation on CrOS devices. Signed-off-by: Paul Kocialkowski --- projects/cbfstool/cbfstool | 108 +++++++++++++++++++++ projects/cbfstool/configs/blobs | 1 + projects/cbfstool/configs/blobs-ignore | 1 + projects/cbfstool/configs/blobs-ignore-notes.txt | 1 + projects/cbfstool/configs/install | 2 + projects/cbfstool/configs/revision | 1 + ...1-Avoid-using-git-submodules-for-3rdparty.patch | 1 + 7 files changed, 115 insertions(+) create mode 100755 projects/cbfstool/cbfstool create mode 120000 projects/cbfstool/configs/blobs create mode 120000 projects/cbfstool/configs/blobs-ignore create mode 120000 projects/cbfstool/configs/blobs-ignore-notes.txt create mode 100644 projects/cbfstool/configs/install create mode 120000 projects/cbfstool/configs/revision create mode 120000 projects/cbfstool/patches/0001-Avoid-using-git-submodules-for-3rdparty.patch (limited to 'projects/cbfstool') diff --git a/projects/cbfstool/cbfstool b/projects/cbfstool/cbfstool new file mode 100755 index 00000000..aa866027 --- /dev/null +++ b/projects/cbfstool/cbfstool @@ -0,0 +1,108 @@ +#!/bin/bash + +# Copyright (C) 2016 Paul Kocialkowski +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +download() { + local repository="coreboot" + + git_project_prepare "$project" "$repository" "$@" +} + +download_check() { + local repository="coreboot" + + git_project_prepare_check "$project" "$repository" "$@" +} + +extract() { + local repository="coreboot" + + project_extract "$project" "$@" +} + +extract_check() { + local repository="coreboot" + + project_extract_check "$project" "$@" +} + +update() { + local repository="coreboot" + + project_update_git "$project" "$repository" "$@" +} + +update_check() { + local repository="coreboot" + + project_update_check_git "$project" "$repository" "$@" +} + +build() { + local repository="coreboot" + + project_sources_directory_missing_empty_error "$project" "$repository" "$@" + + local coreboot_sources_path=$( project_sources_path "$project" "$repository" "$@" ) + local sources_path="$coreboot_sources_path/util/cbfstool/" + local build_path=$( project_build_path "$project" "$@" ) + local build_util_path=$( dirname "$build_path" ) + + local vboot_sources_path=$( project_sources_path "vboot" "vboot" "devices" ) + + if git_project_check "$repository" + then + git_project_checkout "$project" "$repository" "$@" + fi + + project_action "checkout" "vboot" "devices" + + mkdir -p "$build_path" + + make -C "$sources_path" objutil="$build_util_path" VBOOT_SOURCE="$vboot_sources_path" -j$TASKS +} + +build_check() { + project_build_check "$project" "$@" +} + +install() { + project_install "$project" "$@" +} + +install_check() { + project_install_check "$project" "$@" +} + +release() { + local repository="coreboot" + + project_release_install_archive "$project" "$TOOLS" "$@" + + project_release_sources_git "$project" "$repository" "$@" +} + +release_check() { + local repository="coreboot" + + project_release_install_archive_check "$project" "$TOOLS" "$@" + + project_release_check_sources_git "$project" "$repository" "$@" +} + +clean() { + project_clean "$project" "$@" +} diff --git a/projects/cbfstool/configs/blobs b/projects/cbfstool/configs/blobs new file mode 120000 index 00000000..8574352d --- /dev/null +++ b/projects/cbfstool/configs/blobs @@ -0,0 +1 @@ +../../coreboot/configs/blobs \ No newline at end of file diff --git a/projects/cbfstool/configs/blobs-ignore b/projects/cbfstool/configs/blobs-ignore new file mode 120000 index 00000000..04d6519e --- /dev/null +++ b/projects/cbfstool/configs/blobs-ignore @@ -0,0 +1 @@ +../../coreboot/configs/blobs-ignore \ No newline at end of file diff --git a/projects/cbfstool/configs/blobs-ignore-notes.txt b/projects/cbfstool/configs/blobs-ignore-notes.txt new file mode 120000 index 00000000..3f05ba9b --- /dev/null +++ b/projects/cbfstool/configs/blobs-ignore-notes.txt @@ -0,0 +1 @@ +../../coreboot/configs/blobs-ignore-notes.txt \ No newline at end of file diff --git a/projects/cbfstool/configs/install b/projects/cbfstool/configs/install new file mode 100644 index 00000000..6157184f --- /dev/null +++ b/projects/cbfstool/configs/install @@ -0,0 +1,2 @@ +cbfstool:cbfstool +fmaptool:fmaptool diff --git a/projects/cbfstool/configs/revision b/projects/cbfstool/configs/revision new file mode 120000 index 00000000..006c3a7a --- /dev/null +++ b/projects/cbfstool/configs/revision @@ -0,0 +1 @@ +../../coreboot/configs/revision \ No newline at end of file diff --git a/projects/cbfstool/patches/0001-Avoid-using-git-submodules-for-3rdparty.patch b/projects/cbfstool/patches/0001-Avoid-using-git-submodules-for-3rdparty.patch new file mode 120000 index 00000000..627443a5 --- /dev/null +++ b/projects/cbfstool/patches/0001-Avoid-using-git-submodules-for-3rdparty.patch @@ -0,0 +1 @@ +../../coreboot/patches/0001-Avoid-using-git-submodules-for-3rdparty.patch \ No newline at end of file -- cgit v1.2.3-70-g09d2