aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Arnold <nerdboy@gentoo.org>2017-12-31 18:49:42 -0800
committerSteve Arnold <nerdboy@gentoo.org>2017-12-31 18:49:42 -0800
commit7d4bd82812070c3e7fbfefe73286293751bd1fc0 (patch)
tree57f4a419fd91958706c8b684d305ae38a11d70dc
parentsys-devel/binutils,gcc: remove stale ebuilds and patches (diff)
downloadarm-7d4bd82812070c3e7fbfefe73286293751bd1fc0.tar.gz
arm-7d4bd82812070c3e7fbfefe73286293751bd1fc0.tar.bz2
arm-7d4bd82812070c3e7fbfefe73286293751bd1fc0.zip
sys-kernel/chromeos-sources: add latest upstream version for Tegra K1
* uses kali config and .its file from steev * also needs older gcc for working kernel (4.9.4 verified to work) * steps in kali acer build script to make signed kernel Signed-off-by: Steve Arnold <nerdboy@gentoo.org>
-rw-r--r--sys-kernel/chromeos-sources/Manifest3
-rw-r--r--sys-kernel/chromeos-sources/chromeos-sources-3.10.18.ebuild103
-rw-r--r--sys-kernel/chromeos-sources/files/kernel-nyan.its133
3 files changed, 239 insertions, 0 deletions
diff --git a/sys-kernel/chromeos-sources/Manifest b/sys-kernel/chromeos-sources/Manifest
new file mode 100644
index 0000000..740957d
--- /dev/null
+++ b/sys-kernel/chromeos-sources/Manifest
@@ -0,0 +1,3 @@
+DIST chromebook-3.10.config 95810 SHA256 a1a90a92c74c0a7055dd7e56310fe75014572a225ab01b15ce577af7dfae5bb1 SHA512 ecf40a7be4c9af9303910d2768c07b709e837b4955265a7173ce9604cbaaa0b44cc26f492ac33fbfe816b227ecb638759d56b00faaee0beaff628d7caa077c48 WHIRLPOOL d7d07b0302d42db9ad924dfcab5bc14e718eb577abe4745dc633529bc133421e4195fdb6f1ada6b3365ee46211e21fdc6ede664648bb7bd7e50e33af4a47c086
+DIST chromeos-sources-3.10.18.tar.gz 119884336 SHA256 dbe5c1fbd97fb3cee30ba632f3f29f53230a0c8d51d955034a0800a241796f0f SHA512 190c4edd202699ccfff4ad3a108db388e4d4b464cb486ac4921f9566339f2e161ee3f9e93b4dc615cc4a8e1b6ef0dc139e7c5f25fcd5192f6b48942019687518 WHIRLPOOL 0215a8b0c718b3461010676f5cd66a38a1b256ce116259a129c09890e0d0856fbe42fa8e86837cee17d9042270187606853494a2322953a47650b145792a1a1d
+DIST tegra-patches-20171229.tar.gz 27954 SHA256 f187ed93d3cd3845bd49d2ba69ccc3a0dcd92245738778b43137f84bf32b7b42 SHA512 e81e89dac650ffa01f1c8eb53d6c26d06531324439c556f78017d20acf78b2c87c89bbc25824a18bcfaaef870699d8b1114c61ea84cc0ed5d0edb9eaf66eecc9 WHIRLPOOL 5d08e1fc426dafbf089f172880267d64c771dd7d7b8f045c1af3adf2107653b1ddedd4f22dd524f4c55d54d2527452595c8f603aa502514c153cbaa65a1a1871
diff --git a/sys-kernel/chromeos-sources/chromeos-sources-3.10.18.ebuild b/sys-kernel/chromeos-sources/chromeos-sources-3.10.18.ebuild
new file mode 100644
index 0000000..53f2ed9
--- /dev/null
+++ b/sys-kernel/chromeos-sources/chromeos-sources-3.10.18.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="6"
+
+ETYPE="sources"
+K_NOUSENAME="1"
+#K_NOSETEXTRAVERSION="yes"
+K_SECURITY_UNSUPPORTED="1"
+K_DEBLOB_AVAILABLE="0"
+
+K_DEFCONFIG="nyan-big_defconfig"
+K_NOUSEPR="1"
+OKV="${PV}"
+MY_P=linux-chromeos-${PV}
+EXTRAVERSION="-${PN}/-*"
+
+inherit kernel-2 versionator
+NV_PV="20171229"
+NV_PATCHES="tegra-patches-${NV_PV}.tar.gz"
+NV_URI="mirror://gentoo/${NV_PATCHES}"
+CONF_URI="https://raw.githubusercontent.com/offensive-security/kali-arm-build-scripts/master/kernel-configs/chromebook-3.10.config"
+
+if [[ ${PV} = *9999* ]]; then
+ EGIT_REPO_URI="https://chromium.googlesource.com/chromiumos/third_party/kernel.git"
+ EGIT_BRANCH="chromeos-3.10"
+ EGIT_PROJECT="chromeos-linux.git"
+ SRC_URI="${CONF_URI}"
+ inherit git-2
+ KEYWORDS=""
+else
+ GIT_COMMIT="3a080eaf27b2094ae104f392b4cefbbe9382b8ee"
+ GIT_URI="https://chromium.googlesource.com/chromiumos/third_party/kernel/+archive/${GIT_COMMIT}.tar.gz -> ${PN}-${PV}.tar.gz"
+ SRC_URI="${GIT_URI} ${NV_URI} ${CONF_URI}"
+ #KERNEL_URI="${SRC_URI}"
+ KEYWORDS="~arm"
+fi
+
+UNIPATCH_LIST="${NV_URI}"
+
+DESCRIPTION="Linux kernel source for the Tegra K1 Chromebook"
+HOMEPAGE="https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-3.10"
+
+IUSE="firmware"
+
+K_EXTRAELOG="This is the google-y kernel for Tegra K1 chromebooks plus some
+Arch Linux patches to make a little more modern. A copy of the latest kali
+config has been installed as ${K_DEFCONFIG}. To be google-y compliant with
+current firmware you also need the packages listed below."
+
+RDEPEND="firmware? ( >=sys-kernel/linux-firmware-99999999 )"
+DEPEND="${RDEPEND}
+ >=sys-devel/patch-2.7.4"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ detect_version
+ detect_arch
+
+ if [[ ${PV} == *9999* ]] ; then
+ git-2_src_unpack
+ else
+ cd "${WORKDIR}"
+ mkdir -p "${WORKDIR}"/${MY_P}
+ pushd "${WORKDIR}"/${MY_P} > /dev/null
+ unpack ${P}.tar.gz
+ popd > /dev/null
+ unpack "${NV_PATCHES}"
+ fi
+}
+
+src_prepare() {
+ eapply "${WORKDIR}"/patches
+ update_config
+ unpack_fix_install_path
+
+ default
+}
+
+pkg_postinst() {
+ einfo "if you want to get the default kernel config just run:"
+ einfo "./chromeos/scripts/prepareconfig chromeos-tegra"
+}
+
+update_config() {
+ cp -f "${DISTDIR}"/chromebook-3.10.config \
+ "${S}"/arch/arm/configs/${K_DEFCONFIG} \
+ || die "failed to install custom config!"
+
+ cp -f "${FILESDIR}"/kernel-nyan.its \
+ "${S}"/arch/arm/boot/ \
+ || die "failed to install kernel-nyan.its!"
+
+ if [[ ${PV} == *9999* ]] ; then
+ cd "${S}"
+ git config user.email "arm@gentoo.org"
+ git config user.name "Portage git-2"
+ git add .
+ git commit -n -m"removing -dirty flag"
+ fi
+}
diff --git a/sys-kernel/chromeos-sources/files/kernel-nyan.its b/sys-kernel/chromeos-sources/files/kernel-nyan.its
new file mode 100644
index 0000000..e98a26c
--- /dev/null
+++ b/sys-kernel/chromeos-sources/files/kernel-nyan.its
@@ -0,0 +1,133 @@
+/dts-v1/;
+
+/ {
+ description = "Chrome OS kernel image with one or more FDT blobs";
+ #address-cells = <1>;
+ images {
+ kernel@1{
+ description = "kernel";
+ data = /incbin/("zImage");
+ type = "kernel_noload";
+ arch = "arm";
+ os = "linux";
+ compression = "none";
+ load = <0>;
+ entry = <0>;
+ };
+ fdt@1{
+ description = "tegra124-nyan-big-rev0_2.dtb";
+ data = /incbin/("dts/tegra124-nyan-big-rev0_2.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1{
+ algo = "sha1";
+ };
+ };
+ fdt@2{
+ description = "tegra124-nyan-big-rev3_7.dtb";
+ data = /incbin/("dts/tegra124-nyan-big-rev3_7.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1{
+ algo = "sha1";
+ };
+ };
+ fdt@3{
+ description = "tegra124-nyan-big-rev8_9.dtb";
+ data = /incbin/("dts/tegra124-nyan-big-rev8_9.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1{
+ algo = "sha1";
+ };
+ };
+ fdt@4{
+ description = "tegra124-nyan-blaze.dtb";
+ data = /incbin/("dts/tegra124-nyan-blaze.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1{
+ algo = "sha1";
+ };
+ };
+ fdt@5{
+ description = "tegra124-nyan-rev0.dtb";
+ data = /incbin/("dts/tegra124-nyan-rev0.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1{
+ algo = "sha1";
+ };
+ };
+ fdt@6{
+ description = "tegra124-nyan-rev1.dtb";
+ data = /incbin/("dts/tegra124-nyan-rev1.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1{
+ algo = "sha1";
+ };
+ };
+ fdt@7{
+ description = "tegra124-nyan-kitty-rev0_3.dtb";
+ data = /incbin/("dts/tegra124-nyan-kitty-rev0_3.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1{
+ algo = "sha1";
+ };
+ };
+ fdt@8{
+ description = "tegra124-nyan-kitty-rev8.dtb";
+ data = /incbin/("dts/tegra124-nyan-kitty-rev8.dtb");
+ type = "flat_dt";
+ arch = "arm";
+ compression = "none";
+ hash@1{
+ algo = "sha1";
+ };
+ };
+ };
+ configurations {
+ default = "conf@1";
+ conf@1{
+ kernel = "kernel@1";
+ fdt = "fdt@1";
+ };
+ conf@2{
+ kernel = "kernel@1";
+ fdt = "fdt@2";
+ };
+ conf@3{
+ kernel = "kernel@1";
+ fdt = "fdt@3";
+ };
+ conf@4{
+ kernel = "kernel@1";
+ fdt = "fdt@4";
+ };
+ conf@5{
+ kernel = "kernel@1";
+ fdt = "fdt@5";
+ };
+ conf@6{
+ kernel = "kernel@1";
+ fdt = "fdt@6";
+ };
+ conf@7{
+ kernel = "kernel@1";
+ fdt = "fdt@7";
+ };
+ conf@8{
+ kernel = "kernel@1";
+ fdt = "fdt@8";
+ };
+ };
+};