summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Müller-Klieser <s.mueller-klieser@phytec.de>2015-01-15 13:21:03 (GMT)
committerStefan Müller-Klieser <s.mueller-klieser@phytec.de>2015-01-15 13:31:10 (GMT)
commit72863b8a051898b770af36634f54bb616a4ddd3a (patch)
tree177fc8d9bd521a21bdf83bc5533b9c6b2c80a26f
parentf610dc376292bb8d3d95f9d91a6e861bc90d7090 (diff)
downloadmeta-phytec-72863b8a051898b770af36634f54bb616a4ddd3a.zip
meta-phytec-72863b8a051898b770af36634f54bb616a4ddd3a.tar.bz2
beagleboneblack-1: add machine
Because current barebox version is broken for bbb, we need to fall back onto 2014.07 barebox. Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
-rw-r--r--conf/machine/beagleboneblack-1.conf14
-rw-r--r--recipes-bsp/barebox/2014.07.0/remove-default-environment.patch40
-rw-r--r--recipes-bsp/barebox/barebox-ipl_2014.07.0.bbappend1
-rw-r--r--recipes-bsp/barebox/barebox_2014.07.0.bbappend27
4 files changed, 82 insertions, 0 deletions
diff --git a/conf/machine/beagleboneblack-1.conf b/conf/machine/beagleboneblack-1.conf
new file mode 100644
index 0000000..4c277e6
--- /dev/null
+++ b/conf/machine/beagleboneblack-1.conf
@@ -0,0 +1,14 @@
+#@TYPE: Machine
+#@NAME: beagleboneblack-1
+#@DESCRIPTION: Hardware Revision A5C 2GiB eMMC
+
+require conf/machine/include/phyam335x.inc
+
+# Kernel
+KERNEL_DEVICETREE = "am335x-boneblack.dtb"
+
+# Barebox
+PREFERRED_VERSION_barebox = "2014.07.0"
+PREFERRED_VERSION_barebox-ipl = "2014.07.0"
+BAREBOX_BIN = "images/barebox-am33xx-beaglebone.img"
+BAREBOX_IPL_BIN = "images/barebox-am33xx-beaglebone-mlo.img"
diff --git a/recipes-bsp/barebox/2014.07.0/remove-default-environment.patch b/recipes-bsp/barebox/2014.07.0/remove-default-environment.patch
new file mode 100644
index 0000000..56d0f39
--- /dev/null
+++ b/recipes-bsp/barebox/2014.07.0/remove-default-environment.patch
@@ -0,0 +1,40 @@
+Index: barebox-2014.07.0/arch/arm/boards/beaglebone/defaultenv-beaglebone/boot/sd
+===================================================================
+--- barebox-2014.07.0.orig/arch/arm/boards/beaglebone/defaultenv-beaglebone/boot/sd 2014-07-04 16:58:13.000000000 +0200
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,11 +0,0 @@
+-#!/bin/sh
+-
+-if [ "$1" = menu ]; then
+- boot-menu-add-entry "$0" "kernel & rootfs on SD card"
+- exit
+-fi
+-
+-global.bootm.image=/boot/uImage
+-global.bootm.oftree=/boot/oftree
+-#global.bootm.initrd=<path to initrd>
+-global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
+Index: barebox-2014.07.0/arch/arm/boards/beaglebone/defaultenv-beaglebone/config
+===================================================================
+--- barebox-2014.07.0.orig/arch/arm/boards/beaglebone/defaultenv-beaglebone/config 2014-07-04 16:58:13.000000000 +0200
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,19 +0,0 @@
+-#!/bin/sh
+-
+-# change network settings in /env/network/eth0
+-# change mtd partition settings and automountpoints in /env/init/*
+-
+-# set to false if you do not want to have colors
+-global.allow_color=true
+-
+-# user (used for network filenames)
+-global.user=none
+-
+-# timeout in seconds before the default boot entry is started
+-global.autoboot_timeout=3
+-
+-# default boot entry (one of /env/boot/*)
+-global.boot.default=sd
+-
+-# base bootargs
+-global.linux.bootargs.base="console=ttyO0,115200n8"
diff --git a/recipes-bsp/barebox/barebox-ipl_2014.07.0.bbappend b/recipes-bsp/barebox/barebox-ipl_2014.07.0.bbappend
new file mode 100644
index 0000000..51621ee
--- /dev/null
+++ b/recipes-bsp/barebox/barebox-ipl_2014.07.0.bbappend
@@ -0,0 +1 @@
+COMPATIBLE_MACHINE = "beagleboneblack-1"
diff --git a/recipes-bsp/barebox/barebox_2014.07.0.bbappend b/recipes-bsp/barebox/barebox_2014.07.0.bbappend
new file mode 100644
index 0000000..82ac11d
--- /dev/null
+++ b/recipes-bsp/barebox/barebox_2014.07.0.bbappend
@@ -0,0 +1,27 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:${THISDIR}/${PV}:${THISDIR}/${PN}/features:"
+
+SRC_URI += " \
+ file://commonenv \
+ file://environment \
+ file://ext4.cfg \
+ file://remove-default-environment.patch \
+"
+
+COMPATIBLE_MACHINE = "beagleboneblack-1"
+
+do_appendbootconfig_to_configboard () {
+ bbnote "config-board: append bootconfig"
+ cat >> ${S}/.commonenv/config-board <<EOF
+if [ \$bootsource = mmc ]; then
+ global.boot.default="mmc nand spi net"
+elif [ \$bootsource = nand ]; then
+ global.boot.default="nand spi mmc net"
+elif [ \$bootsource = spi ]; then
+ global.boot.default="spi nand mmc net"
+elif [ \$bootsource = net ]; then
+ global.boot.default="net nand spi mmc"
+fi
+EOF
+}
+addtask appendbootconfig_to_configboard after do_create_config_board before do_configure
+