aboutsummaryrefslogtreecommitdiff
path: root/projects/crossgcc
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2016-12-23 14:20:24 +0100
committerLeah Rowe <info@minifree.org>2017-01-15 14:24:45 +0000
commit112003a55671ffa5285145280988dc1248b26b08 (patch)
treee103e0f21ac52c28056db6211758217a41b0b3fd /projects/crossgcc
parent3d08effb91acf985bae9c4eb4386937ce7ed92a9 (diff)
downloadlibrebootfr-112003a55671ffa5285145280988dc1248b26b08.tar.gz
librebootfr-112003a55671ffa5285145280988dc1248b26b08.zip
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 <contact@paulk.fr>
Diffstat (limited to 'projects/crossgcc')
l---------projects/crossgcc/configs/blobs1
l---------projects/crossgcc/configs/blobs-ignore1
l---------projects/crossgcc/configs/blobs-ignore-notes.txt1
-rw-r--r--projects/crossgcc/configs/install1
l---------projects/crossgcc/configs/revision1
-rw-r--r--projects/crossgcc/configs/targets1
-rwxr-xr-xprojects/crossgcc/crossgcc209
-rwxr-xr-xprojects/crossgcc/crossgcc-helper53
l---------projects/crossgcc/patches/0001-Avoid-using-git-submodules-for-3rdparty.patch1
9 files changed, 269 insertions, 0 deletions
diff --git a/projects/crossgcc/configs/blobs b/projects/crossgcc/configs/blobs
new file mode 120000
index 00000000..8574352d
--- /dev/null
+++ b/projects/crossgcc/configs/blobs
@@ -0,0 +1 @@
+../../coreboot/configs/blobs \ No newline at end of file
diff --git a/projects/crossgcc/configs/blobs-ignore b/projects/crossgcc/configs/blobs-ignore
new file mode 120000
index 00000000..04d6519e
--- /dev/null
+++ b/projects/crossgcc/configs/blobs-ignore
@@ -0,0 +1 @@
+../../coreboot/configs/blobs-ignore \ No newline at end of file
diff --git a/projects/crossgcc/configs/blobs-ignore-notes.txt b/projects/crossgcc/configs/blobs-ignore-notes.txt
new file mode 120000
index 00000000..3f05ba9b
--- /dev/null
+++ b/projects/crossgcc/configs/blobs-ignore-notes.txt
@@ -0,0 +1 @@
+../../coreboot/configs/blobs-ignore-notes.txt \ No newline at end of file
diff --git a/projects/crossgcc/configs/install b/projects/crossgcc/configs/install
new file mode 100644
index 00000000..8f4e2632
--- /dev/null
+++ b/projects/crossgcc/configs/install
@@ -0,0 +1 @@
+*:.
diff --git a/projects/crossgcc/configs/revision b/projects/crossgcc/configs/revision
new file mode 120000
index 00000000..006c3a7a
--- /dev/null
+++ b/projects/crossgcc/configs/revision
@@ -0,0 +1 @@
+../../coreboot/configs/revision \ No newline at end of file
diff --git a/projects/crossgcc/configs/targets b/projects/crossgcc/configs/targets
new file mode 100644
index 00000000..fb05f39d
--- /dev/null
+++ b/projects/crossgcc/configs/targets
@@ -0,0 +1 @@
+arm
diff --git a/projects/crossgcc/crossgcc b/projects/crossgcc/crossgcc
new file mode 100755
index 00000000..aa930213
--- /dev/null
+++ b/projects/crossgcc/crossgcc
@@ -0,0 +1,209 @@
+#!/bin/bash
+
+# Copyright (C) 2016 Paul Kocialkowski <contact@paulk.fr>
+#
+# 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 <http://www.gnu.org/licenses/>.
+
+arguments() {
+ project_arguments_targets "$project" "$@"
+}
+
+usage() {
+ project_usage_actions "$project" "prefix"
+ project_usage_arguments "$project" "$@"
+}
+
+download() {
+ local repository="coreboot"
+
+ git_project_prepare "$project" "$repository" "$@"
+}
+
+download_check() {
+ local repository="coreboot"
+
+ git_project_prepare_check "$project" "$repository" "$@"
+}
+
+extract() {
+ local arguments=$@
+
+ local repository="coreboot"
+ local tarball
+
+ project_extract "$project" "$@"
+
+ crossgcc_tarballs "$@" | while read tarball
+ do
+ local tarball_sources_path=$( crossgcc_tarball_sources_path "$tarball" )
+ local tarball_install_path=$( crossgcc_tarball_install_path "$tarball" "$@" )
+ local tarball_install_directory_path=$( dirname "$tarball_install_path" )
+
+ if [ -f "$tarball_sources_path" ] && ! [ -f "$tarball_install_path" ]
+ then
+ printf "Copying source archive $tarball for $project (with ${arguments:-no argument})\n"
+
+ mkdir -p "$tarball_install_directory_path"
+
+ file_verification_check "$tarball_sources_path"
+ cp "$tarball_sources_path" "$tarball_install_path"
+ fi
+ done
+}
+
+extract_check() {
+ local repository="coreboot"
+ local tarball
+
+ project_extract_check "$project" "$@"
+
+ crossgcc_tarballs "$@" | while read tarball
+ do
+ local tarball_install_path=$( crossgcc_tarball_install_path "$tarball" "$@" )
+
+ test ! -f "$tarball_install_path"
+ done
+}
+
+update() {
+ local arguments=$@
+
+ local repository="coreboot"
+ local tarball
+
+ project_update_git $project $repository $arguments
+
+ crossgcc_tarballs "$@" | while read tarball
+ do
+ local tarball_sources_path=$( crossgcc_tarball_sources_path "$tarball" )
+ local tarball_install_path=$( crossgcc_tarball_install_path "$tarball" "$@" )
+ local tarball_install_directory_path=$( dirname "$tarball_install_path" )
+
+ if [ -f $tarball_sources_path ]
+ then
+ printf "Copying source archive $tarball for $project (with ${arguments:-no argument})\n"
+
+ mkdir -p "$tarball_install_directory_path"
+
+ file_verification_check "$tarball_sources_path"
+ cp "$tarball_sources_path" "$tarball_install_path"
+ fi
+ done
+}
+
+update_check() {
+ local repository="coreboot"
+ local tarball
+
+ project_update_check_git "$project" "$repository" "$@"
+
+ crossgcc_tarballs "$@" | while read tarball
+ do
+ local tarball_sources_path=$( crossgcc_tarball_sources_path "$tarball" "$@" )
+
+ test ! -f "$tarball_sources_path"
+ done
+}
+
+prefix() {
+ local arch=$1
+
+ local build_path=$( project_build_path "$project" "$@" )
+
+ case $arch in
+ "arm")
+ echo "$build_path/bin/arm-eabi-"
+ ;;
+ esac
+}
+
+build() {
+ local arch=$1
+
+ local repository="coreboot"
+
+ project_sources_directory_missing_empty_error "$project" "$repository" "$@"
+
+ local sources_path=$( project_sources_path "$project" "$repository" "$@" )
+ local build_path=$( project_build_path "$project" "$@" )
+
+ if git_project_check "$repository"
+ then
+ git_project_checkout "$project" "$repository" "$@"
+ fi
+
+ mkdir -p "$build_path"
+
+ make -C "$sources_path" CPUS="$TASKS" DEST="$build_path" "crossgcc-$arch"
+}
+
+build_check() {
+ project_build_check "$project" "$@"
+}
+
+install() {
+ project_install "$project" "$@"
+}
+
+install_check() {
+ project_install_check "$project" "$@"
+}
+
+release() {
+ local arguments=$@
+
+ local repository="coreboot"
+ local tarball
+
+ project_release_install_archive "$project" "$TOOLS" "$@"
+
+ project_release_sources_git "$project" "$repository" "$@"
+
+ crossgcc_tarballs "$@" | while read tarball
+ do
+ local tarball_install_path=$( crossgcc_tarball_install_path "$tarball" "$@" )
+ local tarball_release_path=$( crossgcc_tarball_release_path "$tarball" "$@" )
+ local release_path=$( project_release_path "$project" "$SOURCES" "$@" )
+
+ mkdir -p "$release_path"
+
+ if [ -f "$tarball_install_path" ] && ! [ -f "$tarball_release_path" ]
+ then
+ printf "Releasing source archive $tarball for $project (with ${arguments:-no argument})\n"
+
+ cp "$tarball_install_path" "$tarball_release_path"
+ file_verification_create "$tarball_release_path"
+ fi
+ done
+}
+
+release_check() {
+ local repository="coreboot"
+ local tarball
+
+ project_release_install_archive_check "$project" "$TOOLS" "$@"
+
+ project_release_check_sources_git "$project" "$repository" "$@"
+
+ crossgcc_tarballs "$@" | while read tarball
+ do
+ local tarball_release_path=$( crossgcc_tarball_release_path "$tarball" "$@" )
+
+ test -f "$tarball_release_path"
+ done
+}
+
+clean() {
+ project_clean "$project" "$@"
+}
diff --git a/projects/crossgcc/crossgcc-helper b/projects/crossgcc/crossgcc-helper
new file mode 100755
index 00000000..b4979f89
--- /dev/null
+++ b/projects/crossgcc/crossgcc-helper
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+# Copyright (C) 2016 Paul Kocialkowski <contact@paulk.fr>
+#
+# 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 <http://www.gnu.org/licenses/>.
+
+crossgcc_tarballs() {
+ local sources_path=$( project_sources_path "$project" "$repository" "$@" )
+ local install_path="$sources_path/util/crossgcc/tarballs/"
+ local tarballs=$( ls "$sources_path/util/crossgcc/sum" | sed "s/.cksum$//" )
+
+ echo "$tarballs"
+}
+
+crossgcc_tarball_sources_path() {
+ local tarball=$1
+
+ local tarball_sources_path="$root/$SOURCES/$tarball"
+
+ echo "$tarball_sources_path"
+}
+
+crossgcc_tarball_install_path() {
+ local tarball=$1
+ shift
+
+ local sources_path=$( project_sources_path "$project" "$repository" "$@" )
+ local install_path="$sources_path/util/crossgcc/tarballs/"
+ local tarball_install_path="$install_path/$tarball"
+
+ echo "$tarball_install_path"
+}
+
+crossgcc_tarball_release_path() {
+ local tarball=$1
+ shift
+
+ local release_path=$( project_release_path "$project" "$SOURCES" "$@" )
+ local tarball_release_path="$release_path/$tarball"
+
+ echo "$tarball_release_path"
+}
diff --git a/projects/crossgcc/patches/0001-Avoid-using-git-submodules-for-3rdparty.patch b/projects/crossgcc/patches/0001-Avoid-using-git-submodules-for-3rdparty.patch
new file mode 120000
index 00000000..627443a5
--- /dev/null
+++ b/projects/crossgcc/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