Merge submodule contents for 3dr-yocto-bsp-base/master

This commit is contained in:
Matt 2019-01-05 11:57:14 -05:00
commit 99f3e129aa
4 changed files with 350 additions and 0 deletions

View File

@ -0,0 +1,75 @@
WARNING - WORK IN PROGRESS
```
This code is known to be high risk , but also early-adopter friendly.
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/OpenSolo/meta-3dr
GIT: git@github.com:OpenSolo/meta-3dr.git

View File

@ -0,0 +1 @@
This source code was released by 3DR in the file: 3dr-yocto-bsp-base_a79c6dba.tar.gz

View File

@ -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 "

View File

@ -0,0 +1,248 @@
#!/bin/sh
shopt -s xpg_echo
# -*- 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 <otavio@ossystems.com.br>
#
# 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 "\nUsage: source $PROGNAME <build-dir>
<build-dir>: 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=<machine> source $PROGNAME <build-dir>
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
exit 1
fi
eval set -- "$ARGS"
while true;
do
case $1 in
-h|--help)
usage
clean_up
exit 0
;;
--)
shift
break
;;
esac
done
if [ "$(whoami)" = "root" ]; then
echo "\nERROR: do not use the BSP as root. Exiting..."
exit 1
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"\nERROR: Invalid machine type"
usage && clean_up
exit 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 "\nACTION REQUIRED: The project root content has been updated. Please run $0 again."
exit 1
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 <<EOF
BB_NUMBER_THREADS = '8'
PARALLEL_MAKE = '-j $NCPU'
DL_DIR ?= "\${BSPDIR}/downloads/"
EOF
# Change settings according environment
sed -e "s,MACHINE ??=.*,MACHINE ??= '$MACHINE',g" \
-e "s,SDKMACHINE ??=.*,SDKMACHINE ??= '$SDKMACHINE',g" \
-e "s,DISTRO ?=.*,DISTRO ?= '$DISTRO',g" \
-i conf/local.conf
cp $TEMPLATES/* conf/
for s in $HOME/.oe $HOME/.yocto; do
if [ -e $s/site.conf ]; then
echo "Linking $s/site.conf to conf/site.conf"
ln -s $s/site.conf conf
fi
done
generated_config=1
fi
# Handle EULA setting
if [ -z "$EULA" ] && ! grep -q '^ACCEPT_FSL_EULA\s*=' conf/local.conf; then
EULA='ask'
fi
if [ "$EULA" = "ask" ]; then
cat <<EOF
Some SoC depends on libraries and packages that are covered by
Freescale EULA. To have the right to use those binaries in your images
you need to read and accept the EULA that will be displayed.
EOF
sleep 4
more -d $CWD/sources/meta-fsl-arm/EULA
echo
while [ "$EULA" = "ask" ]; do
echo -n "Do you accept the EULA you just read? (y/n) "
read REPLY
case "$REPLY" in
y|Y)
echo "EULA has been accepted."
EULA="1"
;;
n|N)
echo "EULA has not been accepted."
EULA="0"
;;
esac
done
fi
if grep -q '^ACCEPT_FSL_EULA\s*=' conf/local.conf; then
sed -i "s/^#*ACCEPT_FSL_EULA\s*=.*/ACCEPT_FSL_EULA = \"$EULA\"/g" conf/local.conf
else
echo "ACCEPT_FSL_EULA = \"$EULA\"" >> conf/local.conf
fi
cat <<EOF
Welcome to Freescale Community BSP
The Yocto Project has extensive documentation about OE including a
reference manual which can be found at:
http://yoctoproject.org/documentation
For more information about OpenEmbedded see their website:
http://www.openembedded.org/
You can now run 'bitbake <target>'
Common targets are:
core-image-minimal
meta-toolchain
meta-toolchain-sdk
adt-installer
meta-ide-support
EOF
if [ -n "$generated_config" ]; then
cat <<EOF
Your build environemnt has been configured with:
MACHINE=$MACHINE
SDKMACHINE=$SDKMACHINE
DISTRO=$DISTRO
EULA=$EULA
EOF
else
echo "Your configuration files at $1 have not been touched."
fi
clean_up