From 6324d303ab19382a91d5e8ca66bb7553a99acaba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 2 May 2017 18:11:26 +0200 Subject: Add bbb kernel --- sys-boot/uboot-bbb/files/uEnv.txt | 1 + sys-boot/uboot-bbb/uboot-bbb-2016.11.ebuild | 44 +++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 sys-boot/uboot-bbb/files/uEnv.txt create mode 100644 sys-boot/uboot-bbb/uboot-bbb-2016.11.ebuild (limited to 'sys-boot/uboot-bbb') diff --git a/sys-boot/uboot-bbb/files/uEnv.txt b/sys-boot/uboot-bbb/files/uEnv.txt new file mode 100644 index 0000000..f432efc --- /dev/null +++ b/sys-boot/uboot-bbb/files/uEnv.txt @@ -0,0 +1 @@ +optargs=coherent_pool=1M diff --git a/sys-boot/uboot-bbb/uboot-bbb-2016.11.ebuild b/sys-boot/uboot-bbb/uboot-bbb-2016.11.ebuild new file mode 100644 index 0000000..06ec917 --- /dev/null +++ b/sys-boot/uboot-bbb/uboot-bbb-2016.11.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils git-r3 + +DESCRIPTION="Simple serial terminal" +HOMEPAGE="http://www.denx.de/wiki/U-Boot" + +EGIT_REPO_URI="git://git.denx.de/u-boot.git" +EGIT_COMMIT="v${PV}" + +LICENSE="GPL-3.0+" +SLOT="0" +KEYWORDS="-* arm" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +src_configure() { + emake am335x_boneblack_config +} + +src_install() { + dodir /boot + insinto /boot + doins MLO + doins u-boot.img + doins "${FILESDIR}"/uEnv.txt +} + +pkg_postinst() { + ROOT="$(mount | awk '/ on \/ / { print $1; }')" + if [[ $ROOT =~ ^/dev/mmcblk.*$ ]]; then + ROOT=${ROOT:0:12} + elog "Flashing the new U-Boot to boot device." + dd if=/boot/MLO of=$ROOT count=1 seek=1 conv=notrunc bs=128k + dd if=/boot/u-boot.img of=$ROOT count=2 seek=1 conv=notrunc bs=384k + else + ewarn "Root not detected. Please flash new U-Boot version by hand." + fi +} -- cgit v1.2.3