From 1767a7f737cc910db8714e487b8f3fd4b90c058f Mon Sep 17 00:00:00 2001 From: Buzz Date: Fri, 28 Jul 2017 17:11:24 +1000 Subject: [PATCH] Initial commit, based on .tar.gz file as provided by 3DR , see SOURCE file. --- 3dr-yocto-bsp-base/README.md | 75 ++++++++ 3dr-yocto-bsp-base/SOURCE | 1 + 3dr-yocto-bsp-base/conf/bblayers.conf | 26 +++ 3dr-yocto-bsp-base/setup-environment | 244 ++++++++++++++++++++++++++ 4 files changed, 346 insertions(+) create mode 100644 3dr-yocto-bsp-base/README.md create mode 100644 3dr-yocto-bsp-base/SOURCE create mode 100644 3dr-yocto-bsp-base/conf/bblayers.conf create mode 100755 3dr-yocto-bsp-base/setup-environment diff --git a/3dr-yocto-bsp-base/README.md b/3dr-yocto-bsp-base/README.md new file mode 100644 index 0000000..890414b --- /dev/null +++ b/3dr-yocto-bsp-base/README.md @@ -0,0 +1,75 @@ +WARNING - WORK IN PROGRESS + +``` +This code is known to be broken and/or incomplete. IT DOES NOT WORK. + +We are actively working on fixing it, and we really, really do not recommend you download it just yet. + +We will remove this warning from the repository when it is no longer required. +``` + + +3DR Yocto BSP +=============================== + +This BSP supports the following +processors: + + * i.MX6 + + * 3DR i.MX6Solo HDTC product family + +Quick Start Guide +----------------- + +Once you have downloaded the source of all projects, you will have to +call: + +$: MACHINE=imx6solo-3dr-1080p EULA=1 DISTRO=3dr source ./setup-environment build + +After this step, you will be with everything need for build an image. + +Contributing +------------ + +To contribute to the development of this BSP and/or submit patches for +new boards please send the patches against the respective project as +informated bellow: + +The following layers are included on this release: + + * poky: base build system and metadata + Path: sources/poky + GIT: git://git.yoctoproject.org/poky + Mailing list: https://lists.yoctoproject.org/listinfo/yocto + + * meta-openembedded: extra packages and features + Path: sources/meta-openembedded + GIT: git://git.openembedded.org/meta-openembedded + Mailing list: http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel + Note: Use [meta-oe] in subject to easy the processing + + * meta-fsl-arm: support for Freescale's processors and board + Path: sources/meta-fsl-arm + Project: https://github.com/Freescale/meta-fsl-arm + GIT: git://github.com/Freescale/meta-fsl-arm.git + Mailing list: https://lists.yoctoproject.org/listinfo/meta-freescale + + * meta-fsl-arm-extra: support for boards using Freescale's processors + Path: sources/meta-fsl-arm-extra + Project: https://github.com/Freescale/meta-fsl-arm-extra + GIT: git://github.com/Freescale/meta-fsl-extra.git + Mailing list: https://lists.yoctoproject.org/listinfo/meta-freescale + Note: Use [meta-fsl-arm-extra] in subject to easy the processing + + * meta-fsl-demos: demo images and recipes + Path: sources/meta-fsl-demos + Project: https://github.com/Freescale/meta-fsl-demos + GIT: git://github.com/Freescale/meta-fsl-demos.git + Mailing list: https://lists.yoctoproject.org/listinfo/meta-freescale + Note: Use [meta-fsl-demos] in subject to easy the processing + + * meta-3dr: 3DR kernel and support recipes + Path: sources/meta-3dr + Project: https://github.com/3drobotics/meta-3dr + GIT: git@github.com:3drobotics/meta-3dr.git diff --git a/3dr-yocto-bsp-base/SOURCE b/3dr-yocto-bsp-base/SOURCE new file mode 100644 index 0000000..05b3062 --- /dev/null +++ b/3dr-yocto-bsp-base/SOURCE @@ -0,0 +1 @@ +This source code was released by 3DR in the file: 3dr-yocto-bsp-base_a79c6dba.tar.gz diff --git a/3dr-yocto-bsp-base/conf/bblayers.conf b/3dr-yocto-bsp-base/conf/bblayers.conf new file mode 100644 index 0000000..76ded9e --- /dev/null +++ b/3dr-yocto-bsp-base/conf/bblayers.conf @@ -0,0 +1,26 @@ +LCONF_VERSION = "6" + +BBPATH = "${TOPDIR}" +BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}" + +BBFILES ?= "" +BBLAYERS = " \ + ${BSPDIR}/sources/poky/meta \ + ${BSPDIR}/sources/poky/meta-yocto \ + \ + ${BSPDIR}/sources/meta-openembedded/meta-oe \ + ${BSPDIR}/sources/meta-openembedded/meta-networking \ + ${BSPDIR}/sources/meta-openembedded/meta-multimedia \ + \ + ${BSPDIR}/sources/meta-fsl-arm \ + ${BSPDIR}/sources/meta-fsl-arm-extra \ + ${BSPDIR}/sources/meta-fsl-demos \ + \ + ${BSPDIR}/sources/meta-3dr \ +" +##Freescale Yocto Release layer +BBLAYERS += " ${BSPDIR}/sources/meta-fsl-bsp-release/imx/meta-fsl-arm " +BBLAYERS += " ${BSPDIR}/sources/meta-fsl-bsp-release/imx/meta-fsl-demos " +BBLAYERS += " ${BSPDIR}/sources/meta-browser " +BBLAYERS += " ${BSPDIR}/sources/meta-openembedded/meta-gnome " +BBLAYERS += " ${BSPDIR}/sources/meta-openembedded/meta-networking " diff --git a/3dr-yocto-bsp-base/setup-environment b/3dr-yocto-bsp-base/setup-environment new file mode 100755 index 0000000..c1f0d5f --- /dev/null +++ b/3dr-yocto-bsp-base/setup-environment @@ -0,0 +1,244 @@ +#!/bin/sh +# -*- mode: shell-script; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +# +# Copyright (C) 2012, 2013 O.S. Systems Software LTDA. +# Authored-by: Otavio Salvador +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# 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, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Add options for the script +# Copyright (C) 2013 Freescale Semiconductor, Inc. + +NCPU=`grep -c processor /proc/cpuinfo` +CWD=`pwd` +PROGNAME="setup-environment" + +usage() +{ + echo -e "\nUsage: source $PROGNAME + : required option; specifies build directory location + +By default the script will setup MACHINE to be imx6solo-3dr-1080p. + +Supported machines: `ls sources/*/conf/machine/*.conf \ +| sed s/\.conf//g | sed -r 's/^.+\///' | xargs echo` + +To build for a machine listed above, run this script as: +MACHINE= source $PROGNAME + +The script sets PARALLEL_MAKE & BB_NUMBER_THREADS to $NCPU +" +} + +clean_up() +{ + unset EULA LIST_MACHINES VALID_MACHINE + unset NCPU CWD TEMPLATES SHORTOPTS LONGOPTS ARGS PROGNAME +} + +# get command line options +SHORTOPTS="h" +LONGOPTS="help" + +ARGS=$(getopt --options $SHORTOPTS \ + --longoptions $LONGOPTS --name $PROGNAME -- "$@" ) +# Print the usage menu if invalid options are specified +if [ $? != 0 -o $# -lt 1 ]; then + usage && clean_up + return 1 +fi + +eval set -- "$ARGS" +while true; +do + case $1 in + -h|--help) + usage + clean_up + return 0 + ;; + --) + shift + break + ;; + esac +done + +if [ "$(whoami)" = "root" ]; then + echo "ERROR: do not use the BSP as root. Exiting..." +fi + +if [ -z "$MACHINE" ]; then + MACHINE='imx6solo-3dr-1080p' +fi + +# Check the machine type specified +LIST_MACHINES=`ls -1 $CWD/sources/*/conf/machine` +VALID_MACHINE=`echo -e "$LIST_MACHINES" | grep ${MACHINE}.conf$ | wc -l` +if [ "x$MACHINE" = "x" ] || [ "$VALID_MACHINE" = "0" ]; then + echo -e "\nSPECIFIED AN INVALID MACHINE TYPE !" + usage && clean_up + return 1 +else + echo "Configuring for ${MACHINE}" +fi + +if [ -z "$SDKMACHINE" ]; then + SDKMACHINE='i686' +fi + +if [ -z "$DISTRO" ]; then + DISTRO='3dr' +fi + +OEROOT=sources/poky +if [ -e sources/oe-core ]; then + OEROOT=sources/oe-core +fi + +# Ensure all files in sources/base are kept in sync with project root +updated= +for f in $CWD/sources/base/*; do + file="$(basename $f)" + if [ "$file" = "conf" ] || echo $file | grep -q '~$'; then + continue + fi + + if ! cmp -s "$file" "$f"; then + updated="true" + [ -e $file ] && chmod u+w $file + cp $f $file + fi +done +if [ "$updated" = "true" ]; then + echo "The project root content has been updated. Please run $0 again." + return +fi + +cd $OEROOT + +. ./oe-init-build-env $CWD/$1 > /dev/null + +# Clean up PATH, because if it includes tokens to current directories somehow, +# wrong binaries can be used instead of the expected ones during task execution +export PATH="`echo $PATH | sed 's/\(:.\|:\)*:/:/g;s/^.\?://;s/:.\?$//'`" + +generated_config= +if [ ! -e conf/local.conf.sample ]; then + mv conf/local.conf conf/local.conf.sample + + # Generate the local.conf based on the Yocto defaults + TEMPLATES=$CWD/sources/base/conf + grep -v '^#\|^$' conf/local.conf.sample > conf/local.conf + cat >> conf/local.conf <' + +Common targets are: + core-image-minimal + meta-toolchain + meta-toolchain-sdk + adt-installer + meta-ide-support + +EOF + +if [ -n "$generated_config" ]; then + cat <