openstlinux-4.19-thud-mp1-19-02-20 release

This commit is contained in:
Bernard PUEL
2019-02-08 14:57:02 +01:00
parent a9fae8f226
commit 4e36cf0c7c
220 changed files with 44442 additions and 0 deletions

17
COPYING.MIT Normal file
View File

@ -0,0 +1,17 @@
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

1
License.md Normal file
View File

@ -0,0 +1 @@
http://wiki.st.com/stm32mpu/index.php/OpenSTLinux_licenses

1
README Symbolic link
View File

@ -0,0 +1 @@
README.md

30
README.md Normal file
View File

@ -0,0 +1,30 @@
# Meta-st-openstlinux
## Introduction
meta-st-openstlinux is a layer containing the framework metadata for current versions of OpenSTLinux.
OpenSTLinux is a Linux® distribution based on the OpenEmbedded build framework.
## DISTRO
OpenSTLinux layer provides severals distro:
* **openstlinux-weston**:
Distribution with Wayland/Weston graphic backend usage.
* **openstlinux-eglfs**:
Distribution dedicated to QT usage. With this distribution, QT uses the eglfs graphic backend.
* **openstlinux-x11**:
Distribution dedicated to X11 framework usage.
## Images
OpenSTLinux provides two reference image to be used mainly with **openstlinux-weston** distro:
* **st-image-core**:
Basic core image with: ssh server, several tools for kernel, audio, network.
* **st-image-weston**:
Image with Wayland/weston UI (if **openstlinux-weston** distro are used). This image contains weston UI, GTK+3 demo and all tools present on st-image-core.
OpenSTLinux provides also some image **as example** to show how to enable some specific framework:
* **st-example-image-qt** (with **openstlinux-eglfs** distro):
Image which demonstrates an example of QT usage
* **st-example-image-x11** (with **openstlinux-x11** distro):
Image which demonstrates an example of Basic X11 usage.
* **st-example-image-xfce.bb** (with **openstlinux-x11** distro):
Image which demonstrates an example of X11 usage with XFCE as UI.

View File

@ -0,0 +1,194 @@
#-------------------------------------------------------------------------------
# Original reproducible_build.bbclass copy/paste from openembedded-core layer
# Original commit:
# curl: actually apply latest CVE patches
# f0394e80a37f1da47042a1aa0487594f390603f9
#-------------------------------------------------------------------------------
# reproducible_build.bbclass
#
# Sets SOURCE_DATE_EPOCH in each component's build environment.
# Upstream components (generally) respect this environment variable,
# using it in place of the "current" date and time.
# See https://reproducible-builds.org/specs/source-date-epoch/
#
# After sources are unpacked but before they are patched, we set a reproducible value for SOURCE_DATE_EPOCH.
# This value should be reproducible for anyone who builds the same revision from the same sources.
#
# There are 4 ways we determine SOURCE_DATE_EPOCH:
#
# 1. Use the value from __source_date_epoch.txt file if this file exists.
# This file was most likely created in the previous build by one of the following methods 2,3,4.
# Alternatively, it can be provided by a recipe via SRC_URI.
#
# If the file does not exist:
#
# 2. If there is a git checkout, use the last git commit timestamp.
# Git does not preserve file timestamps on checkout.
#
# 3. Use the mtime of "known" files such as NEWS, CHANGLELOG, ...
# This works for well-kept repositories distributed via tarball.
#
# 4. Use the modification time of the youngest file in the source tree, if there is one.
# This will be the newest file from the distribution tarball, if any.
#
# 5. Fall back to a fixed timestamp.
#
# Once the value of SOURCE_DATE_EPOCH is determined, it is stored in the recipe's SDE_FILE.
# If none of these mechanisms are suitable, replace the do_deploy_source_date_epoch task
# with recipe-specific functionality to write the appropriate SOURCE_DATE_EPOCH into the SDE_FILE.
#
# If this file is found by other tasks, the value is exported in the SOURCE_DATE_EPOCH variable.
# SOURCE_DATE_EPOCH is set for all tasks that might use it (do_configure, do_compile, do_package, ...)
BUILD_REPRODUCIBLE_BINARIES ??= '1'
inherit ${@oe.utils.ifelse(d.getVar('BUILD_REPRODUCIBLE_BINARIES') == '1', 'reproducible_build_simple', '')}
SDE_DIR ="${WORKDIR}/source-date-epoch"
#SDE_DIR ="${TOPDIR}/source-date-epoch"
SDE_FILE = "${SDE_DIR}/__source_date_epoch.txt"
SSTATETASKS += "do_deploy_source_date_epoch"
do_deploy_source_date_epoch () {
echo "Deploying SDE to ${SDE_DIR}."
}
python do_deploy_source_date_epoch_setscene () {
sstate_setscene(d)
}
do_deploy_source_date_epoch[dirs] = "${SDE_DIR}"
do_deploy_source_date_epoch[sstate-plaindirs] = "${SDE_DIR}"
addtask do_deploy_source_date_epoch_setscene
addtask do_deploy_source_date_epoch before do_configure after do_patch
def get_source_date_epoch_from_known_files(d, sourcedir):
source_date_epoch = None
newest_file = None
known_files = set(["NEWS", "ChangeLog", "Changelog", "CHANGES"])
for file in known_files:
filepath = os.path.join(sourcedir, file)
if os.path.isfile(filepath):
mtime = int(os.lstat(filepath).st_mtime)
# There may be more than one "known_file" present, if so, use the youngest one
if not source_date_epoch or mtime > source_date_epoch:
source_date_epoch = mtime
newest_file = filepath
if newest_file:
bb.debug(1, "SOURCE_DATE_EPOCH taken from: %s" % newest_file)
return source_date_epoch
def find_git_folder(d, sourcedir):
# First guess: WORKDIR/git
# This is the default git fetcher unpack path
workdir = d.getVar('WORKDIR')
gitpath = os.path.join(workdir, "git/.git")
if os.path.isdir(gitpath):
return gitpath
# Second guess: ${S}
gitpath = os.path.join(sourcedir, ".git")
if os.path.isdir(gitpath):
return gitpath
# Perhaps there was a subpath or destsuffix specified.
# Go looking in the WORKDIR
exclude = set(["build", "image", "license-destdir", "patches", "pseudo",
"recipe-sysroot", "recipe-sysroot-native", "sysroot-destdir", "temp"])
for root, dirs, files in os.walk(workdir, topdown=True):
dirs[:] = [d for d in dirs if d not in exclude]
if '.git' in dirs:
return root
bb.warn("Failed to find a git repository in WORKDIR: %s" % workdir)
return None
def get_source_date_epoch_from_git(d, sourcedir):
source_date_epoch = None
if "git://" in d.getVar('SRC_URI'):
gitpath = find_git_folder(d, sourcedir)
if gitpath:
import subprocess
source_date_epoch = int(subprocess.check_output(['git','log','-1','--pretty=%ct'], cwd=gitpath))
bb.debug(1, "git repository: %s" % gitpath)
return source_date_epoch
def get_source_date_epoch_from_youngest_file(d, sourcedir):
if sourcedir == d.getVar('WORKDIR'):
# These sources are almost certainly not from a tarball
return None
# Do it the hard way: check all files and find the youngest one...
source_date_epoch = None
newest_file = None
for root, dirs, files in os.walk(sourcedir, topdown=True):
files = [f for f in files if not f[0] == '.']
for fname in files:
filename = os.path.join(root, fname)
try:
mtime = int(os.lstat(filename).st_mtime)
except ValueError:
mtime = 0
if not source_date_epoch or mtime > source_date_epoch:
source_date_epoch = mtime
newest_file = filename
if newest_file:
bb.debug(1, "Newest file found: %s" % newest_file)
return source_date_epoch
def fixed_source_date_epoch():
bb.debug(1, "No tarball or git repo found to determine SOURCE_DATE_EPOCH")
return 0
python do_create_source_date_epoch_stamp() {
epochfile = d.getVar('SDE_FILE')
if os.path.isfile(epochfile):
bb.debug(1, "Reusing SOURCE_DATE_EPOCH from: %s" % epochfile)
return
sourcedir = d.getVar('S')
source_date_epoch = (
get_source_date_epoch_from_git(d, sourcedir) or
get_source_date_epoch_from_known_files(d, sourcedir) or
get_source_date_epoch_from_youngest_file(d, sourcedir) or
fixed_source_date_epoch() # Last resort
)
bb.debug(1, "SOURCE_DATE_EPOCH: %d" % source_date_epoch)
bb.utils.mkdirhier(d.getVar('SDE_DIR'))
with open(epochfile, 'w') as f:
f.write(str(source_date_epoch))
import re
import shutil
# Specific use case for 'devtool add' recipe
# Temporary fix as the source-date-epoch folder is not yet handled properly
# in 'create.py' file:
# (line 507) filterout = ['git.indirectionsymlink']
# This has to be fixed with:
# filterout = ['git.indirectionsymlink', 'source-date-epoch']
# But 'source-date-epoch' may have other name, so need to make sure to use the
# right one.
# We propose a workaround in this class to avoid patching 'create.py' file.
# At the end, the 'do_create_source_date_epoch_stamp' should not be called when
# expecting to add a new recipe with 'devtool add'.
if re.match('.*/recipetool-[^/]*/work/source-date-epoch', d.getVar('SDE_DIR')):
shutil.rmtree(d.getVar('SDE_DIR'))
}
BB_HASHBASE_WHITELIST += "SOURCE_DATE_EPOCH"
python () {
if d.getVar('BUILD_REPRODUCIBLE_BINARIES') == '1':
d.appendVarFlag("do_unpack", "postfuncs", " do_create_source_date_epoch_stamp")
epochfile = d.getVar('SDE_FILE')
source_date_epoch = "0"
if os.path.isfile(epochfile):
with open(epochfile, 'r') as f:
source_date_epoch = f.read()
bb.debug(1, "SOURCE_DATE_EPOCH: %s" % source_date_epoch)
d.setVar('SOURCE_DATE_EPOCH', source_date_epoch)
}

View File

@ -0,0 +1,677 @@
# for having tab on html file generated
LICENSE_IMAGE_CONTENT_WITH_TAB ?= "1"
# We can define one or more additional images built as additional partitions
# to the default rootfs one (#IMAGE#) thought IMAGE_SUMMARY_LIST var with format
# IMAGE_SUMMARY_LIST = "<image_name_1>:<image_name_2>:#IMAGE#"
IMAGE_SUMMARY_LIST ?= "#IMAGE#"
# Configure on BSP side this var if you expect the summary to be generated
ENABLE_IMAGE_LICENSE_SUMMARY ?= "0"
inherit license_image
python do_st_write_license_create_summary() {
if d.getVar('ENABLE_IMAGE_LICENSE_SUMMARY') == "1":
try:
license_deployed_manifest(d)
except:
bb.warn("Deploy of image license not ready")
license_create_summary(d)
else:
bb.warn("IMG LIC SUM: Please set ENABLE_IMAGE_LICENSE_SUMMARY to '1' to enable licence summary")
}
def license_create_summary(d):
import re
tab = d.expand("${LICENSE_IMAGE_CONTENT_WITH_TAB}")
ref_image_name = d.expand("${IMAGE_LINK_NAME}")
ref_image_name_full = d.expand("${IMAGE_NAME}")
console_latest = d.expand("${LOG_DIR}/cooker/${MACHINE}/console-latest.log")
deploy_image_dir = d.expand("${DEPLOY_DIR_IMAGE}")
temp_deploy_image_dir = deploy_image_dir #d.expand("${IMGDEPLOYDIR}")
license_deploy_dir = d.expand("${DEPLOY_DIR}/licenses")
pkgdata_dir = d.expand("${TMPDIR}/pkgdata/${MACHINE}")
image_list_arrray = []
for img in d.getVar("IMAGE_SUMMARY_LIST").split(':'):
if img.startswith("#IMAGE#"):
for fi in os.listdir(temp_deploy_image_dir):
if fi.startswith(ref_image_name) and fi.endswith(".ext4"):
r = re.compile("(.*)-(\d+)")
mi = r.match(os.path.basename(fi))
if mi:
image_list_arrray.append([mi.group(1), mi.group(2), img ])
else:
for fi in os.listdir(deploy_image_dir):
if fi.startswith(img) and fi.endswith(".ext4"):
r = re.compile("(.*)-(\d+)")
mi = r.match(os.path.basename(fi))
if mi:
image_list_arrray.append([mi.group(1), mi.group(2), img])
if tab.startswith("1"):
with_tab = 1
else:
with_tab = None
def private_open(filename):
result = None
if os.path.exists(filename):
try:
with open(filename, "r") as lic:
result = lic.readlines()
except IOError:
bb.warn("IMG LIC SUM: Cannot open file %s" % (filename))
result = ""
except:
bb.warn("IMG LIC SUM: Error with file %s" % (filename))
result = ""
else:
bb.warn("IMG LIC SUM: File does not exist with open file %s" % (filename))
result = ""
return result
class HTMLSummaryfile():
''' format definition '''
bold = "font-weight: bold; background-color: #cccccc;"
red = "background-color: #ff0000;"
center_format = "align: center;"
border_format = "border: 1;"
wrap_format = ""
wrap_red_format = "background-color: #ff0000;"
opened_file = None
def openfile(self, file_name):
self.opened_file = open(file_name, 'w')
def closefile(self):
self.opened_file.close()
def startTable(self, style=None):
if style:
self.opened_file.write("<TABLE STYLE='%s'>\n" % style)
else:
self.opened_file.write("<TABLE border=1>\n")
def stopTable(self):
self.opened_file.write("</TABLE>\n")
def startRow(self, style=None):
self.opened_file.write("<TR>\n")
def stopRow(self, style=None):
self.opened_file.write("</TR>\n")
def startColumn(self, style=None):
if style:
self.opened_file.write("<TD STYLE='%s'>\n")
else:
self.opened_file.write("<TD>\n")
def stopColumn(self, style=None):
self.opened_file.write("</TR>\n")
def addColumnHeaderContent(self, content, style=None):
if style:
self.opened_file.write("<TH STYLE='%s'>%s</TH>\n" % (style, content))
else:
self.opened_file.write("<TH><B>%s</B></TH>\n" % content)
def addColumnContent(self, content, style=None):
if style:
self.opened_file.write("<TD STYLE='%s'>%s</TD>\n" % (style, content))
else:
self.opened_file.write("<TD>%s</TD>\n" % content)
def addColumnURLOUTContent(self, content, url, style=None):
if style:
self.opened_file.write("<TD STYLE='%s'><A HREF='%s' TARGET='_blank'>%s</A></TD>\n" % (style, url, content))
else:
self.opened_file.write("<TD><A HREF='%s' TARGET='_blank'>%s</A></TD>\n" % (url, content))
def addColumnEmptyContent(self, style=None):
if style:
self.opened_file.write("<TD STYLE='%s'><BR/></TD>\n" % style)
else:
self.opened_file.write("<TD><BR/></TD>\n")
def addNewLine(self):
self.opened_file.write("<BR/>\n")
def addContent(self, content):
self.opened_file.write(content)
def addURLContent(self, content, url):
self.opened_file.write("<A HREF='%s'>%s</A>\n" %(url, content))
def startBlock(self):
self.opened_file.write("<UL>\n")
def stopBlock(self):
self.opened_file.write("</UL>\n")
def addAnchor(self, anchor):
self.opened_file.write("<A name='%s'/>\n" % anchor)
def startDiv(self, anchor, title, style=None):
self.opened_file.write("<div id='%s' class='tabcontent'>\n" % anchor)
self.opened_file.write("<H1>%s</H1>\n" % title)
def stopDiv(self):
self.opened_file.write("</div>\n")
def beginHtml(self):
self.opened_file.write("<HTML>\n")
self.opened_file.write('<HEAD>\n')
self.opened_file.write(" <STYLE TYPE='text/css'>\n")
self.opened_file.write("/* Style the tab buttons */\n")
self.opened_file.write(".tablink {\n")
self.opened_file.write(" background-color: #555;\n")
self.opened_file.write(" color: white;\n")
self.opened_file.write(" float: left;\n")
self.opened_file.write(" border: none;\n")
self.opened_file.write(" outline: none;\n")
self.opened_file.write(" cursor: pointer;\n")
self.opened_file.write(" padding: 14px 16px;\n")
self.opened_file.write(" font-size: 17px;\n")
self.opened_file.write(" width: 25%;\n")
self.opened_file.write("}\n")
self.opened_file.write("\n")
self.opened_file.write("/* Change background color of buttons on hover */\n")
self.opened_file.write(".tablink:hover {\n")
self.opened_file.write(" background-color: #777;\n")
self.opened_file.write("}\n")
self.opened_file.write("\n")
self.opened_file.write("/* Set default styles for tab content */\n")
self.opened_file.write(".tabcontent {\n")
self.opened_file.write(" color: black;\n")
self.opened_file.write(" display: none;\n")
self.opened_file.write(" padding: 50px;\n")
self.opened_file.write(" text-align: left;\n")
self.opened_file.write("}\n")
self.opened_file.write("\n")
self.opened_file.write("/* Style each tab content individually */\n")
self.opened_file.write("#introduction {background-color: white;}\n")
self.opened_file.write("#image_content {background-color: white;}\n")
self.opened_file.write("#OE_SPDX_LICENSE {background-color: white;}\n")
self.opened_file.write(" </STYLE>\n")
self.opened_file.write("</HEAD>\n")
def endHtml(self):
self.opened_file.write("</HTML>\n")
def beginBody(self, tab=None):
self.opened_file.write("<BODY>\n")
if tab:
self.opened_file.write(' <button class="tablink" onclick="openTab(\'introduction\', this)" id="defaultOpen">Main</button>\n')
self.opened_file.write(' <button class="tablink" onclick="openTab(\'image_content\', this)">Contents of Images</button>\n')
self.opened_file.write(' <button class="tablink" onclick="openTab(\'OE_SPDX_LICENSE\', this)">SPDX License</button>\n')
self.opened_file.write("\n")
def endBody(self, tab=None):
if tab:
self.opened_file.write('<SCRIPT TYPE="text/javascript">\n')
self.opened_file.write('function openTab(Name, elmnt) {\n')
self.opened_file.write(' // Hide all elements with class="tabcontent" by default */\n')
self.opened_file.write(' var i, tabcontent, tablinks;\n')
self.opened_file.write(' tabcontent = document.getElementsByClassName("tabcontent");\n')
self.opened_file.write(' for (i = 0; i < tabcontent.length; i++) {\n')
self.opened_file.write(' tabcontent[i].style.display = "none";\n')
self.opened_file.write(' }\n')
self.opened_file.write('\n')
self.opened_file.write(' // Remove the background color of all tablinks/buttons\n')
self.opened_file.write(' tablinks = document.getElementsByClassName("tablink");\n')
self.opened_file.write(' for (i = 0; i < tablinks.length; i++) {\n')
self.opened_file.write(' tablinks[i].style.backgroundColor = "";\n')
self.opened_file.write(' }\n')
self.opened_file.write('\n')
self.opened_file.write(' // Show the specific tab content\n')
self.opened_file.write(' document.getElementById(Name).style.display = "block";\n')
self.opened_file.write('\n')
self.opened_file.write(' // Add the specific color to the button used to open the tab content\n')
self.opened_file.write(' elmnt.style.backgroundColor = \'white\';\n')
self.opened_file.write(' elmnt.style.color = "black";\n')
self.opened_file.write('}\n')
self.opened_file.write('\n')
self.opened_file.write('// Get the element with id="defaultOpen" and click on it\n')
self.opened_file.write('document.getElementById("defaultOpen").click();\n')
self.opened_file.write('</SCRIPT>\n')
else:
self.opened_file.write('<SCRIPT TYPE="text/javascript">\n')
self.opened_file.write(' // display all elements with class="tabcontent" by default */\n')
self.opened_file.write(' var i, tabcontent, tablinks;\n')
self.opened_file.write(' tabcontent = document.getElementsByClassName("tabcontent");\n')
self.opened_file.write(' for (i = 0; i < tabcontent.length; i++) {\n')
self.opened_file.write(' tabcontent[i].style.display = "block";\n')
self.opened_file.write(' }\n')
self.opened_file.write('\n')
self.opened_file.write('</SCRIPT>\n')
self.opened_file.write("</BODY>\n")
def findWholeWord(w):
return re.compile(r'\b({0})\b'.format(w), flags=re.IGNORECASE).search
def generate_spdx_license_sheet(html):
SRC_DISTRIBUTE_LICENSES = ""
SRC_DISTRIBUTE_LICENSES += "AAL Adobe AFL-1.2 AFL-2.0 AFL-2.1 AFL-3.0"
SRC_DISTRIBUTE_LICENSES += " AGPL-3.0 ANTLR-PD Apache-1.0 Apache-1.1 Apache-2.0"
SRC_DISTRIBUTE_LICENSES += " APL-1.0 APSL-1.0 APSL-1.1 APSL-1.2 APSL-2.0"
SRC_DISTRIBUTE_LICENSES += " Artistic-1.0 Artistic-2.0 BitstreamVera BSD"
SRC_DISTRIBUTE_LICENSES += " BSD-2-Clause BSD-3-Clause BSD-4-Clause BSL-1.0"
SRC_DISTRIBUTE_LICENSES += " CATOSL-1.1 CC0-1.0 CC-BY-1.0 CC-BY-2.0 CC-BY-2.5"
SRC_DISTRIBUTE_LICENSES += " CC-BY-3.0 CC-BY-NC-1.0 CC-BY-NC-2.0 CC-BY-NC-2.5"
SRC_DISTRIBUTE_LICENSES += " CC-BY-NC-3.0 CC-BY-NC-ND-1.0 CC-BY-NC-ND-2.0"
SRC_DISTRIBUTE_LICENSES += " CC-BY-NC-ND-2.5 CC-BY-NC-ND-3.0 CC-BY-NC-SA-1.0"
SRC_DISTRIBUTE_LICENSES += " CC-BY-NC-SA-2.0 CC-BY-NC-SA-2.5 CC-BY-NC-SA-3.0"
SRC_DISTRIBUTE_LICENSES += " CC-BY-ND-1.0 CC-BY-ND-2.0 CC-BY-ND-2.5 CC-BY-ND-3.0"
SRC_DISTRIBUTE_LICENSES += " CC-BY-SA-1.0 CC-BY-SA-2.0 CC-BY-SA-2.5 CC-BY-SA-3.0"
SRC_DISTRIBUTE_LICENSES += " CDDL-1.0 CECILL-1.0 CECILL-2.0 CECILL-B CECILL-C"
SRC_DISTRIBUTE_LICENSES += " ClArtistic CPAL-1.0 CPL-1.0 CUA-OPL-1.0 DSSSL"
SRC_DISTRIBUTE_LICENSES += " ECL-1.0 ECL-2.0 eCos-2.0 EDL-1.0 EFL-1.0 EFL-2.0"
SRC_DISTRIBUTE_LICENSES += " Elfutils-Exception Entessa EPL-1.0 ErlPL-1.1"
SRC_DISTRIBUTE_LICENSES += " EUDatagrid EUPL-1.0 EUPL-1.1 Fair Frameworx-1.0"
SRC_DISTRIBUTE_LICENSES += " FreeType GFDL-1.1 GFDL-1.2 GFDL-1.3 GPL-1.0"
SRC_DISTRIBUTE_LICENSES += " GPL-2.0 GPL-2.0-with-autoconf-exception"
SRC_DISTRIBUTE_LICENSES += " GPL-2.0-with-classpath-exception"
SRC_DISTRIBUTE_LICENSES += " GPL-2.0-with-font-exception"
SRC_DISTRIBUTE_LICENSES += " GPL-2.0-with-GCC-exception"
SRC_DISTRIBUTE_LICENSES += " GPL-2-with-bison-exception GPL-3.0"
SRC_DISTRIBUTE_LICENSES += " GPL-3.0-with-autoconf-exception"
SRC_DISTRIBUTE_LICENSES += " GPL-3.0-with-GCC-exception"
SRC_DISTRIBUTE_LICENSES += " gSOAP-1 gSOAP-1.3b HPND IPA IPL-1.0 ISC LGPL-2.0"
SRC_DISTRIBUTE_LICENSES += " LGPL-2.1 LGPL-3.0 Libpng LPL-1.02 LPPL-1.0 LPPL-1.1"
SRC_DISTRIBUTE_LICENSES += " LPPL-1.2 LPPL-1.3c MirOS MIT Motosoto MPL-1.0"
SRC_DISTRIBUTE_LICENSES += " MPL-1.1 MS-PL MS-RL Multics NASA-1.3 Nauman NCSA"
SRC_DISTRIBUTE_LICENSES += " NGPL Nokia NPOSL-3.0 NTP OASIS OCLC-2.0 ODbL-1.0"
SRC_DISTRIBUTE_LICENSES += " OFL-1.1 OGTSL OLDAP-2.8 OpenSSL OSL-1.0 OSL-2.0"
SRC_DISTRIBUTE_LICENSES += " OSL-3.0 PD PHP-3.0 PostgreSQL Proprietary"
SRC_DISTRIBUTE_LICENSES += " Python-2.0 QPL-1.0 RHeCos-1 RHeCos-1.1 RPL-1.5"
SRC_DISTRIBUTE_LICENSES += " RPSL-1.0 RSCPL Ruby SAX-PD SGI-1 Simple-2.0 Sleepycat"
SRC_DISTRIBUTE_LICENSES += " SPL-1.0 SugarCRM-1 SugarCRM-1.1.3 UCB VSL-1.0 W3C"
SRC_DISTRIBUTE_LICENSES += " Watcom-1.0 WXwindows XFree86-1.0 XFree86-1.1 Xnet XSL YPL-1.1"
SRC_DISTRIBUTE_LICENSES += " Zimbra-1.3 Zlib ZPL-1.1 ZPL-2.0 ZPL-2.1"
''' AGPL variations '''
SPDXLICENSEMAP = [
["AGPL-3.0", ['AGPL-3', 'AGPLv3', 'AGPLv3.0'] ],
# GPL variations
["GPL-1.0", ['GPL-1', 'GPLv1', 'GPLv1.0'] ],
["GPL-2.0", ['GPL-2', 'GPLv2', 'GPLv2.0'] ],
["GPL-3.0", ['GPL-3', 'GPLv3', 'GPLv3.0'] ],
# LGPL variations
["LGPL-2.0", ['LGPLv2', 'LGPLv2.0'] ],
["LGPL-2.1", ['LGPL2.1', 'LGPLv2.1'] ],
["LGPL-3.0", ['LGPLv3']],
# MPL variations
["MPL-1.0", ['MPL-1', 'MPLv1'] ],
["MPL-1.1", ['MPLv1.1'] ],
["MPL-2.0", ['MPLv2'] ],
# MIT variations
["MIT", ['MIT-X', 'MIT-style'] ],
# Openssl variations
["OpenSSL", ['openssl'] ],
# Python variations
["Python-2.0", ['PSF', 'PSFv2', 'Python-2'] ],
# Apache variations
["Apache-2.0", ['Apachev2', 'Apache-2'] ],
# Artistic variations
["Artistic-1.0", ['Artisticv1', 'Artistic-1'] ],
# Academic variations
["AFL-2.0", ['AFL-2', 'AFLv2'] ],
["AFL-1.2", ['AFL-1', 'AFLv1'] ],
# Other variations
["EPL-1.0", ['EPLv1.0'] ],
# Silicon Graphics variations
["SGI-1", ['SGIv1'] ]
];
html.startDiv("OE_SPDX_LICENSE", "OE SPDX LICENSE")
html.addAnchor("OE_SPDX_LICENSE")
html.addContent("Openembedded validate the License with the SPDX license list. ")
html.addNewLine()
html.addContent("How Openembedded validate an License indicated on a package:")
html.addNewLine()
html.startBlock()
html.addContent(" - remove all information after the last + on license( ex.: LGPLv2.1+ become GPLv2.1)")
html.addNewLine()
html.addContent(" - translate license with SPDX table: (LGPLV2.1 become LGPL-2.1)")
html.addNewLine()
html.addContent(" - verification with official list of license")
html.addNewLine()
html.stopBlock()
html.startTable()
html.startRow()
html.addColumnHeaderContent("Official licenses used by Openembedded", html.bold)
html.addColumnHeaderContent("Link to text of license", html.bold)
html.stopRow()
for lic in SRC_DISTRIBUTE_LICENSES.split(' '):
html.startRow()
html.addColumnContent(lic)
html.addColumnURLOUTContent('['+lic+']', "http://git.openembedded.org/openembedded-core/tree/meta/files/common-licenses/" + lic )
html.stopRow()
html.stopTable()
html.addNewLine()
html.startTable()
html.startRow()
html.addColumnHeaderContent("License name", html.bold)
html.addColumnHeaderContent("Authorized variations names", html.bold)
html.stopRow()
for lic in SPDXLICENSEMAP:
html.startRow()
html.addColumnContent(lic[0])
html.startColumn()
html.startTable("border: 0;")
for auth_lic in lic[1]:
html.startRow()
html.addColumnContent(auth_lic)
html.stopRow()
html.stopTable()
html.stopColumn()
html.stopRow()
html.stopTable()
html.addNewLine()
html.addNewLine()
html.addNewLine()
html.addContent("Information extracted from:")
html.addNewLine()
html.addURLContent("http://git.openembedded.org/openembedded-core/tree/meta/conf/licenses.conf", "http://git.openembedded.org/openembedded-core/tree/meta/conf/licenses.conf")
html.addNewLine()
html.addContent("All Text of License are available:")
html.addNewLine()
html.addURLContent("http://git.openembedded.org/openembedded-core/tree/meta/files/common-licenses", "http://git.openembedded.org/openembedded-core/tree/meta/files/common-licenses")
html.addNewLine()
html.stopDiv()
def generate_introduction_sheet(html):
general_MACHINE = None
general_DISTRO = None
general_DISTRO_VERSION = None
general_DISTRO_CODENAME = None
contents = None
contents = private_open(console_latest)
for line in contents:
r = re.compile("([^=]+)=\s*\"(.*)\"")
m = r.match(line)
if m:
if m.group(1).rstrip() == "MACHINE":
general_MACHINE = m.group(2)
elif m.group(1).rstrip() == "DISTRO":
general_DISTRO = m.group(2)
elif m.group(1).rstrip() == "DISTRO_VERSION":
general_DISTRO_VERSION = m.group(2)
elif m.group(1).rstrip() == "DISTRO_CODENAME":
general_DISTRO_CODENAME = m.group(2)
html.startDiv("introduction", "")
html.addAnchor("introduction")
html.startTable()
# Machine
html.startRow()
html.addColumnContent("MACHINE", html.bold)
if general_MACHINE:
html.addColumnContent(general_MACHINE)
else:
html.addColumnContent("")
html.stopRow()
# Image
html.startRow()
html.addColumnContent("IMAGE", html.bold)
html.addColumnContent(ref_image_name)
html.stopRow()
# DISTRO
html.startRow()
html.addColumnContent("DISTRO", html.bold)
if general_MACHINE:
html.addColumnContent(general_DISTRO)
else:
html.addColumnContent("")
html.stopRow()
# DISTRO VERSION
html.startRow()
html.addColumnContent("VERSION", html.bold)
if general_MACHINE:
html.addColumnContent(general_DISTRO_VERSION)
else:
html.addColumnContent("")
html.stopRow()
# DISTRO CODENAME
html.startRow()
html.addColumnContent("OE branch", html.bold)
if general_MACHINE:
html.addColumnContent(general_DISTRO_CODENAME)
else:
html.addColumnContent("")
html.stopRow()
html.stopTable()
html.addNewLine()
html.addNewLine()
license_file_to_read = os.path.join(temp_deploy_image_dir, "%s.license" % ref_image_name)
contents = private_open(license_file_to_read)
html.startTable()
html.startRow()
html.addColumnHeaderContent("License", html.bold)
html.stopRow()
html.startRow()
html.startColumn()
for l in contents:
if len(l.rstrip('\n')) > 0:
html.addContent(l.rstrip('\n'))
html.addNewLine()
else:
html.addNewLine()
html.stopColumn()
html.stopRow()
html.stopTable()
html.stopDiv()
def generate_image_content_sheet(html):
html.startDiv("image_content", "Image content")
html.addAnchor("image_content")
# partition schema
html.addContent("Schema of partitions:")
html.startTable()
html.startRow()
html.startColumn("width: 10%; text-align: center;")
html.addURLContent("Boot binaries", "#boot_binaries")
for img in image_list_arrray:
_image_prefix = img[0]
_image_date = img[1]
_image_flag = img[2]
if _image_flag.startswith("#IMAGE#"):
html.startColumn("width: 30%; text-align: center;")
else:
html.startColumn("width: 20%; text-align: center;")
html.addURLContent(_image_prefix, "#%s" % _image_prefix)
html.stopColumn()
html.stopRow()
html.stopTable()
html.addNewLine()
html.addNewLine()
boot_file_to_read = None
# boot binaries
for img in image_list_arrray:
_image_prefix = img[0]
_image_date = img[1]
if img[2].startswith("#IMAGE#"):
_image_package = "image_license.manifest"
boot_file_to_read = license_deploy_dir + "/" + _image_prefix + "-" + _image_date + "/" + _image_package
if boot_file_to_read:
contents = private_open(boot_file_to_read)
else:
contents = ""
html.addContent("List of packages used during the different boot phases:")
html.addAnchor("boot_binaries")
html.startTable()
html.startRow()
html.addColumnHeaderContent("Recipe Name", html.bold)
html.addColumnHeaderContent("Version", html.bold)
html.addColumnHeaderContent("License", html.bold)
html.stopRow()
r = re.compile("([^:]+):\s*(.*)")
new_boot = 0
boot_recipe = None
boot_license = None
boot_version = None
for l in contents:
m = r.match(l)
if m:
if m.group(1) == "RECIPE NAME":
boot_recipe = m.group(2)
elif m.group(1) == "LICENSE":
boot_license = m.group(2)
elif m.group(1) == "VERSION":
boot_version = m.group(2)
elif m.group(1) == "FILES":
new_boot = 1
if new_boot == 1:
if findWholeWord("GPLv3")(boot_license):
html.startRow(red)
# Recipe Name
html.addColumnContent(boot_recipe, red)
# Version
html.addColumnContent(boot_version, red)
# License
html.addColumnContent( boot_license, red)
html.stopRow()
else:
html.startRow()
# Recipe Name
html.addColumnContent(boot_recipe)
# Version
html.addColumnContent(boot_version)
# License
html.addColumnContent( boot_license)
html.stopRow()
boot_recipe = ""
boot_license = ""
boot_version = ""
new_boot = 0
html.stopTable()
# image content list
for img in image_list_arrray:
_image_prefix = img[0]
_image_date = img[1]
html.addNewLine()
html.addNewLine()
html.addContent("List of packages present on image")
html.addAnchor(_image_prefix)
html.startTable()
html.startRow()
html.addColumnHeaderContent("Image", html.bold)
html.addColumnHeaderContent(_image_prefix)
html.stopRow()
html.stopTable()
_image_package="package.manifest"
file_to_read = license_deploy_dir + "/" + _image_prefix + "-" + _image_date + "/" + _image_package
contents = private_open(file_to_read)
#print("Process for %s" % _image_prefix)
html.startTable()
html.startRow()
html.addColumnHeaderContent("Recipe Name", html.bold)
html.addColumnHeaderContent("Package Name", html.bold)
html.addColumnHeaderContent("Version", html.bold)
html.addColumnHeaderContent("License", html.bold)
html.addColumnHeaderContent("Description", html.bold)
html.stopRow()
for p in contents:
package_license = None
package_recipe = None
package_name = p.split('\n')[0]
package_version = None
package_description = None
package_summary = None
package_file = pkgdata_dir + "/runtime-reverse/" + package_name
package_file_content = private_open(package_file)
r = re.compile("([^:]+):\s*(.*)")
for line in package_file_content:
m = r.match(line)
if m:
if m.group(1) == "PN":
package_recipe = m.group(2)
elif m.group(1).startswith("LICENSE"):
package_license = m.group(2)
elif m.group(1) == "PV":
package_version = m.group(2)
elif m.group(1).startswith("DESCRIPTION"):
package_description = m.group(2)
elif m.group(1).startswith("SUMMARY"):
package_summary = m.group(2)
if findWholeWord("GPLv3")(package_license):
style = html.red
style_wrapped = html.wrap_red_format
else:
style = None
style_wrapped = None
html.startRow(style)
if package_recipe:
html.addColumnContent(package_recipe, style)
else:
html.addColumnContent("", style)
if package_name:
html.addColumnContent(package_name, style)
else:
html.addColumnContent("", style)
if package_version:
html.addColumnContent(package_version, style)
else:
html.addColumnContent("", style)
if package_license:
html.addColumnContent(package_license, style)
else:
html.addColumnContent("", style)
if package_summary:
html.addColumnContent(package_summary, style_wrapped)
else:
if package_description:
html.addColumnContent(package_description, style_wrapped)
else:
html.addColumnContent("", style)
html.stopRow()
package_license = None
package_parent = None
package_name = None
package_version = None
package_description = None
package_summary = None
html.stopTable()
html.stopDiv()
summary_file = os.path.join(deploy_image_dir, "%s-license_content.html" % ref_image_name_full)
# bb.warn("file generated %s" % (summary_file))
html = HTMLSummaryfile()
html.openfile(summary_file)
html.beginHtml()
html.beginBody(with_tab)
''' generate first page: general information + license text '''
generate_introduction_sheet(html)
''' generate image content '''
generate_image_content_sheet(html)
''' generate license spdx reference '''
generate_spdx_license_sheet(html)
html.endBody(with_tab)
html.endHtml()
html.closefile()
# create link
curcwd = os.getcwd()
os.chdir(deploy_image_dir)
if os.path.exists("%s-license_content.html" % ref_image_name):
os.remove("%s-license_content.html" % ref_image_name)
os.symlink("%s-license_content.html" % ref_image_name_full, "%s-license_content.html" % ref_image_name)
os.chdir(curcwd)
addtask st_write_license_create_summary before do_build after do_image_complete
do_populate_lic_deploy[noexec] = "1"

View File

@ -0,0 +1,557 @@
# Configure on BSP side this var if you expect the summary to be generated
ENABLE_IMAGE_LICENSE_SUMMARY ?= "0"
python do_write_sdk_license_create_summary() {
if d.getVar('ENABLE_IMAGE_LICENSE_SUMMARY') == "1":
license_sdk_create_summary(d)
else:
bb.warn("IMG LIC SUM: Please set ENABLE_IMAGE_LICENSE_SUMMARY to '1' to enable licence summary")
}
def license_sdk_create_summary(d):
import re
tab = d.expand("${LICENSE_IMAGE_CONTENT_WITH_TAB}")
ref_sdk_name_full = d.expand("${TOOLCHAIN_OUTPUTNAME}")
console_latest = d.expand("${LOG_DIR}/cooker/${MACHINE}/console-latest.log")
temp_deploy_sdk_dir = d.expand("${SDKDEPLOYDIR}")
pkgdata_dir = d.expand("${TMPDIR}/pkgdata/${MACHINE}")
pkgdata_host_dir = d.expand("${TMPDIR}/pkgdata/${SDK_SYS}")
image_list_arrray = []
# host manifest
image_list_arrray.append([ "List of packages / tools used on host part",
"host", ref_sdk_name_full + ".host.manifest" ])
# target manifest
image_list_arrray.append([ "List of packages associated to package present on image",
"target", ref_sdk_name_full + ".target.manifest" ])
if tab.startswith("1"):
with_tab = 1
else:
with_tab = None
def private_open(filename):
result = None
if os.path.exists(filename):
try:
with open(filename, "r") as lic:
result = lic.readlines()
except IOError:
bb.warn("SDK LIC SUM: Cannot open file %s" % (filename))
result = ""
except:
bb.warn("SDK LIC SUM: Error with file %s" % (filename))
result = ""
else:
bb.warn("SDK LIC SUM: File does not exist with open file %s" % (filename))
result = ""
return result
class HTMLSummaryfile():
''' format definition '''
bold = "font-weight: bold; background-color: #cccccc;"
red = "background-color: #ff0000;"
center_format = "align: center;"
border_format = "border: 1;"
wrap_format = ""
wrap_red_format = "background-color: #ff0000;"
opened_file = None
def openfile(self, file_name):
self.opened_file = open(file_name, 'w')
def closefile(self):
self.opened_file.close()
def startTable(self, style=None):
if style:
self.opened_file.write("<TABLE STYLE='%s'>\n" % style)
else:
self.opened_file.write("<TABLE border=1>\n")
def stopTable(self):
self.opened_file.write("</TABLE>\n")
def startRow(self, style=None):
self.opened_file.write("<TR>\n")
def stopRow(self, style=None):
self.opened_file.write("</TR>\n")
def startColumn(self, style=None):
if style:
self.opened_file.write("<TD STYLE='%s'>\n")
else:
self.opened_file.write("<TD>\n")
def stopColumn(self, style=None):
self.opened_file.write("</TR>\n")
def addColumnHeaderContent(self, content, style=None):
if style:
self.opened_file.write("<TH STYLE='%s'>%s</TH>\n" % (style, content))
else:
self.opened_file.write("<TH><B>%s</B></TH>\n" % content)
def addColumnContent(self, content, style=None):
if style:
self.opened_file.write("<TD STYLE='%s'>%s</TD>\n" % (style, content))
else:
self.opened_file.write("<TD>%s</TD>\n" % content)
def addColumnURLOUTContent(self, content, url, style=None):
if style:
self.opened_file.write("<TD STYLE='%s'><A HREF='%s' TARGET='_blank'>%s</A></TD>\n" % (style, url, content))
else:
self.opened_file.write("<TD><A HREF='%s' TARGET='_blank'>%s</A></TD>\n" % (url, content))
def addColumnEmptyContent(self, style=None):
if style:
self.opened_file.write("<TD STYLE='%s'><BR/></TD>\n" % style)
else:
self.opened_file.write("<TD><BR/></TD>\n")
def addNewLine(self):
self.opened_file.write("<BR/>\n")
def addContent(self, content):
self.opened_file.write(content)
def addURLContent(self, content, url):
self.opened_file.write("<A HREF='%s'>%s</A>\n" %(url, content))
def startBlock(self):
self.opened_file.write("<UL>\n")
def stopBlock(self):
self.opened_file.write("</UL>\n")
def addAnchor(self, anchor):
self.opened_file.write("<A name='%s'/>\n" % anchor)
def startDiv(self, anchor, title, style=None):
self.opened_file.write("<div id='%s' class='tabcontent'>\n" % anchor)
self.opened_file.write("<H1>%s</H1>\n" % title)
def stopDiv(self):
self.opened_file.write("</div>\n")
def beginHtml(self):
self.opened_file.write("<HTML>\n")
self.opened_file.write('<HEAD>\n')
self.opened_file.write(" <STYLE TYPE='text/css'>\n")
self.opened_file.write("/* Style the tab buttons */\n")
self.opened_file.write(".tablink {\n")
self.opened_file.write(" background-color: #555;\n")
self.opened_file.write(" color: white;\n")
self.opened_file.write(" float: left;\n")
self.opened_file.write(" border: none;\n")
self.opened_file.write(" outline: none;\n")
self.opened_file.write(" cursor: pointer;\n")
self.opened_file.write(" padding: 14px 16px;\n")
self.opened_file.write(" font-size: 17px;\n")
self.opened_file.write(" width: 25%;\n")
self.opened_file.write("}\n")
self.opened_file.write("\n")
self.opened_file.write("/* Change background color of buttons on hover */\n")
self.opened_file.write(".tablink:hover {\n")
self.opened_file.write(" background-color: #777;\n")
self.opened_file.write("}\n")
self.opened_file.write("\n")
self.opened_file.write("/* Set default styles for tab content */\n")
self.opened_file.write(".tabcontent {\n")
self.opened_file.write(" color: black;\n")
self.opened_file.write(" display: none;\n")
self.opened_file.write(" padding: 50px;\n")
self.opened_file.write(" text-align: left;\n")
self.opened_file.write("}\n")
self.opened_file.write("\n")
self.opened_file.write("/* Style each tab content individually */\n")
self.opened_file.write("#introduction {background-color: white;}\n")
self.opened_file.write("#image_content {background-color: white;}\n")
self.opened_file.write("#OE_SPDX_LICENSE {background-color: white;}\n")
self.opened_file.write(" </STYLE>\n")
self.opened_file.write("</HEAD>\n")
def endHtml(self):
self.opened_file.write("</HTML>\n")
def beginBody(self, tab=None):
self.opened_file.write("<BODY>\n")
if tab:
self.opened_file.write(' <button class="tablink" onclick="openTab(\'introduction\', this)" id="defaultOpen">Main</button>\n')
self.opened_file.write(' <button class="tablink" onclick="openTab(\'sdk_content\', this)">Contents of Images</button>\n')
self.opened_file.write(' <button class="tablink" onclick="openTab(\'OE_SPDX_LICENSE\', this)">SPDX License</button>\n')
self.opened_file.write("\n")
def endBody(self, tab=None):
if tab:
self.opened_file.write('<SCRIPT TYPE="text/javascript">\n')
self.opened_file.write('function openTab(Name, elmnt) {\n')
self.opened_file.write(' // Hide all elements with class="tabcontent" by default */\n')
self.opened_file.write(' var i, tabcontent, tablinks;\n')
self.opened_file.write(' tabcontent = document.getElementsByClassName("tabcontent");\n')
self.opened_file.write(' for (i = 0; i < tabcontent.length; i++) {\n')
self.opened_file.write(' tabcontent[i].style.display = "none";\n')
self.opened_file.write(' }\n')
self.opened_file.write('\n')
self.opened_file.write(' // Remove the background color of all tablinks/buttons\n')
self.opened_file.write(' tablinks = document.getElementsByClassName("tablink");\n')
self.opened_file.write(' for (i = 0; i < tablinks.length; i++) {\n')
self.opened_file.write(' tablinks[i].style.backgroundColor = "";\n')
self.opened_file.write(' }\n')
self.opened_file.write('\n')
self.opened_file.write(' // Show the specific tab content\n')
self.opened_file.write(' document.getElementById(Name).style.display = "block";\n')
self.opened_file.write('\n')
self.opened_file.write(' // Add the specific color to the button used to open the tab content\n')
self.opened_file.write(' elmnt.style.backgroundColor = \'white\';\n')
self.opened_file.write(' elmnt.style.color = "black";\n')
self.opened_file.write('}\n')
self.opened_file.write('\n')
self.opened_file.write('// Get the element with id="defaultOpen" and click on it\n')
self.opened_file.write('document.getElementById("defaultOpen").click();\n')
self.opened_file.write('</SCRIPT>\n')
else:
self.opened_file.write('<SCRIPT TYPE="text/javascript">\n')
self.opened_file.write(' // display all elements with class="tabcontent" by default */\n')
self.opened_file.write(' var i, tabcontent, tablinks;\n')
self.opened_file.write(' tabcontent = document.getElementsByClassName("tabcontent");\n')
self.opened_file.write(' for (i = 0; i < tabcontent.length; i++) {\n')
self.opened_file.write(' tabcontent[i].style.display = "block";\n')
self.opened_file.write(' }\n')
self.opened_file.write('\n')
self.opened_file.write('</SCRIPT>\n')
self.opened_file.write("</BODY>\n")
def findWholeWord(w):
return re.compile(r'\b({0})\b'.format(w), flags=re.IGNORECASE).search
def generate_spdx_license_sheet(html):
SRC_DISTRIBUTE_LICENSES = ""
SRC_DISTRIBUTE_LICENSES += "AAL Adobe AFL-1.2 AFL-2.0 AFL-2.1 AFL-3.0"
SRC_DISTRIBUTE_LICENSES += " AGPL-3.0 ANTLR-PD Apache-1.0 Apache-1.1 Apache-2.0"
SRC_DISTRIBUTE_LICENSES += " APL-1.0 APSL-1.0 APSL-1.1 APSL-1.2 APSL-2.0"
SRC_DISTRIBUTE_LICENSES += " Artistic-1.0 Artistic-2.0 BitstreamVera BSD"
SRC_DISTRIBUTE_LICENSES += " BSD-2-Clause BSD-3-Clause BSD-4-Clause BSL-1.0"
SRC_DISTRIBUTE_LICENSES += " CATOSL-1.1 CC0-1.0 CC-BY-1.0 CC-BY-2.0 CC-BY-2.5"
SRC_DISTRIBUTE_LICENSES += " CC-BY-3.0 CC-BY-NC-1.0 CC-BY-NC-2.0 CC-BY-NC-2.5"
SRC_DISTRIBUTE_LICENSES += " CC-BY-NC-3.0 CC-BY-NC-ND-1.0 CC-BY-NC-ND-2.0"
SRC_DISTRIBUTE_LICENSES += " CC-BY-NC-ND-2.5 CC-BY-NC-ND-3.0 CC-BY-NC-SA-1.0"
SRC_DISTRIBUTE_LICENSES += " CC-BY-NC-SA-2.0 CC-BY-NC-SA-2.5 CC-BY-NC-SA-3.0"
SRC_DISTRIBUTE_LICENSES += " CC-BY-ND-1.0 CC-BY-ND-2.0 CC-BY-ND-2.5 CC-BY-ND-3.0"
SRC_DISTRIBUTE_LICENSES += " CC-BY-SA-1.0 CC-BY-SA-2.0 CC-BY-SA-2.5 CC-BY-SA-3.0"
SRC_DISTRIBUTE_LICENSES += " CDDL-1.0 CECILL-1.0 CECILL-2.0 CECILL-B CECILL-C"
SRC_DISTRIBUTE_LICENSES += " ClArtistic CPAL-1.0 CPL-1.0 CUA-OPL-1.0 DSSSL"
SRC_DISTRIBUTE_LICENSES += " ECL-1.0 ECL-2.0 eCos-2.0 EDL-1.0 EFL-1.0 EFL-2.0"
SRC_DISTRIBUTE_LICENSES += " Elfutils-Exception Entessa EPL-1.0 ErlPL-1.1"
SRC_DISTRIBUTE_LICENSES += " EUDatagrid EUPL-1.0 EUPL-1.1 Fair Frameworx-1.0"
SRC_DISTRIBUTE_LICENSES += " FreeType GFDL-1.1 GFDL-1.2 GFDL-1.3 GPL-1.0"
SRC_DISTRIBUTE_LICENSES += " GPL-2.0 GPL-2.0-with-autoconf-exception"
SRC_DISTRIBUTE_LICENSES += " GPL-2.0-with-classpath-exception"
SRC_DISTRIBUTE_LICENSES += " GPL-2.0-with-font-exception"
SRC_DISTRIBUTE_LICENSES += " GPL-2.0-with-GCC-exception"
SRC_DISTRIBUTE_LICENSES += " GPL-2-with-bison-exception GPL-3.0"
SRC_DISTRIBUTE_LICENSES += " GPL-3.0-with-autoconf-exception"
SRC_DISTRIBUTE_LICENSES += " GPL-3.0-with-GCC-exception"
SRC_DISTRIBUTE_LICENSES += " gSOAP-1 gSOAP-1.3b HPND IPA IPL-1.0 ISC LGPL-2.0"
SRC_DISTRIBUTE_LICENSES += " LGPL-2.1 LGPL-3.0 Libpng LPL-1.02 LPPL-1.0 LPPL-1.1"
SRC_DISTRIBUTE_LICENSES += " LPPL-1.2 LPPL-1.3c MirOS MIT Motosoto MPL-1.0"
SRC_DISTRIBUTE_LICENSES += " MPL-1.1 MS-PL MS-RL Multics NASA-1.3 Nauman NCSA"
SRC_DISTRIBUTE_LICENSES += " NGPL Nokia NPOSL-3.0 NTP OASIS OCLC-2.0 ODbL-1.0"
SRC_DISTRIBUTE_LICENSES += " OFL-1.1 OGTSL OLDAP-2.8 OpenSSL OSL-1.0 OSL-2.0"
SRC_DISTRIBUTE_LICENSES += " OSL-3.0 PD PHP-3.0 PostgreSQL Proprietary"
SRC_DISTRIBUTE_LICENSES += " Python-2.0 QPL-1.0 RHeCos-1 RHeCos-1.1 RPL-1.5"
SRC_DISTRIBUTE_LICENSES += " RPSL-1.0 RSCPL Ruby SAX-PD SGI-1 Simple-2.0 Sleepycat"
SRC_DISTRIBUTE_LICENSES += " SPL-1.0 SugarCRM-1 SugarCRM-1.1.3 UCB VSL-1.0 W3C"
SRC_DISTRIBUTE_LICENSES += " Watcom-1.0 WXwindows XFree86-1.0 XFree86-1.1 Xnet XSL YPL-1.1"
SRC_DISTRIBUTE_LICENSES += " Zimbra-1.3 Zlib ZPL-1.1 ZPL-2.0 ZPL-2.1"
''' AGPL variations '''
SPDXLICENSEMAP = [
["AGPL-3.0", ['AGPL-3', 'AGPLv3', 'AGPLv3.0'] ],
# GPL variations
["GPL-1.0", ['GPL-1', 'GPLv1', 'GPLv1.0'] ],
["GPL-2.0", ['GPL-2', 'GPLv2', 'GPLv2.0'] ],
["GPL-3.0", ['GPL-3', 'GPLv3', 'GPLv3.0'] ],
# LGPL variations
["LGPL-2.0", ['LGPLv2', 'LGPLv2.0'] ],
["LGPL-2.1", ['LGPL2.1', 'LGPLv2.1'] ],
["LGPL-3.0", ['LGPLv3']],
# MPL variations
["MPL-1.0", ['MPL-1', 'MPLv1'] ],
["MPL-1.1", ['MPLv1.1'] ],
["MPL-2.0", ['MPLv2'] ],
# MIT variations
["MIT", ['MIT-X', 'MIT-style'] ],
# Openssl variations
["OpenSSL", ['openssl'] ],
# Python variations
["Python-2.0", ['PSF', 'PSFv2', 'Python-2'] ],
# Apache variations
["Apache-2.0", ['Apachev2', 'Apache-2'] ],
# Artistic variations
["Artistic-1.0", ['Artisticv1', 'Artistic-1'] ],
# Academic variations
["AFL-2.0", ['AFL-2', 'AFLv2'] ],
["AFL-1.2", ['AFL-1', 'AFLv1'] ],
# Other variations
["EPL-1.0", ['EPLv1.0'] ],
# Silicon Graphics variations
["SGI-1", ['SGIv1'] ]
];
html.startDiv("OE_SPDX_LICENSE", "OE SPDX LICENSE")
html.addAnchor("OE_SPDX_LICENSE")
html.addContent("Openembedded validate the License with the SPDX license list. ")
html.addNewLine()
html.addContent("How Openembedded validate an License indicated on a package:")
html.addNewLine()
html.startBlock()
html.addContent(" - remove all information after the last + on license( ex.: LGPLv2.1+ become GPLv2.1)")
html.addNewLine()
html.addContent(" - translate license with SPDX table: (LGPLV2.1 become LGPL-2.1)")
html.addNewLine()
html.addContent(" - verification with official list of license")
html.addNewLine()
html.stopBlock()
html.startTable()
html.startRow()
html.addColumnHeaderContent("Official licenses used by Openembedded", html.bold)
html.addColumnHeaderContent("Link to text of license", html.bold)
html.stopRow()
for lic in SRC_DISTRIBUTE_LICENSES.split(' '):
html.startRow()
html.addColumnContent(lic)
html.addColumnURLOUTContent('['+lic+']', "http://git.openembedded.org/openembedded-core/tree/meta/files/common-licenses/" + lic )
html.stopRow()
html.stopTable()
html.addNewLine()
html.startTable()
html.startRow()
html.addColumnHeaderContent("License name", html.bold)
html.addColumnHeaderContent("Authorized variations names", html.bold)
html.stopRow()
for lic in SPDXLICENSEMAP:
html.startRow()
html.addColumnContent(lic[0])
html.startColumn()
html.startTable("border: 0;")
for auth_lic in lic[1]:
html.startRow()
html.addColumnContent(auth_lic)
html.stopRow()
html.stopTable()
html.stopColumn()
html.stopRow()
html.stopTable()
html.addNewLine()
html.addNewLine()
html.addNewLine()
html.addContent("Information extracted from:")
html.addNewLine()
html.addURLContent("http://git.openembedded.org/openembedded-core/tree/meta/conf/licenses.conf", "http://git.openembedded.org/openembedded-core/tree/meta/conf/licenses.conf")
html.addNewLine()
html.addContent("All Text of License are available:")
html.addNewLine()
html.addURLContent("http://git.openembedded.org/openembedded-core/tree/meta/files/common-licenses", "http://git.openembedded.org/openembedded-core/tree/meta/files/common-licenses")
html.addNewLine()
html.stopDiv()
def generate_introduction_sheet(html):
general_MACHINE = None
general_DISTRO = None
general_DISTRO_VERSION = None
general_DISTRO_CODENAME = None
contents = None
contents = private_open(console_latest)
for line in contents:
r = re.compile("([^=]+)=\s*\"(.*)\"")
m = r.match(line)
if m:
if m.group(1).rstrip() == "MACHINE":
general_MACHINE = m.group(2)
elif m.group(1).rstrip() == "DISTRO":
general_DISTRO = m.group(2)
elif m.group(1).rstrip() == "DISTRO_VERSION":
general_DISTRO_VERSION = m.group(2)
elif m.group(1).rstrip() == "DISTRO_CODENAME":
general_DISTRO_CODENAME = m.group(2)
html.startDiv("introduction", "")
html.addAnchor("introduction")
html.startTable()
# Machine
html.startRow()
html.addColumnContent("MACHINE", html.bold)
if general_MACHINE:
html.addColumnContent(general_MACHINE)
else:
html.addColumnContent("")
html.stopRow()
# Image
html.startRow()
html.addColumnContent("SDK", html.bold)
html.addColumnContent(ref_sdk_name_full)
html.stopRow()
# DISTRO
html.startRow()
html.addColumnContent("DISTRO", html.bold)
if general_MACHINE:
html.addColumnContent(general_DISTRO)
else:
html.addColumnContent("")
html.stopRow()
# DISTRO VERSION
html.startRow()
html.addColumnContent("VERSION", html.bold)
if general_MACHINE:
html.addColumnContent(general_DISTRO_VERSION)
else:
html.addColumnContent("")
html.stopRow()
# DISTRO CODENAME
html.startRow()
html.addColumnContent("OE branch", html.bold)
if general_MACHINE:
html.addColumnContent(general_DISTRO_CODENAME)
else:
html.addColumnContent("")
html.stopRow()
html.stopTable()
html.addNewLine()
html.addNewLine()
license_file_to_read = os.path.join(temp_deploy_sdk_dir, "%s.license" % ref_sdk_name_full)
contents = private_open(license_file_to_read)
html.startTable()
html.startRow()
html.addColumnHeaderContent("License", html.bold)
html.stopRow()
html.startRow()
html.startColumn()
for l in contents:
if len(l.rstrip('\n')) > 0:
html.addContent(l.rstrip('\n'))
html.addNewLine()
else:
html.addNewLine()
html.stopColumn()
html.stopRow()
html.stopTable()
html.stopDiv()
def generate_image_content_sheet(html):
html.startDiv("sdk_content", "SDK content")
html.addAnchor("sdk_content")
# boot binaries
for img in image_list_arrray:
_info_text = img[0]
_info_type = img[1]
_info_file = img[2]
html.startTable()
html.startRow()
html.addColumnHeaderContent("SDK name (%s part):" % _info_type, html.bold)
html.addColumnHeaderContent(ref_sdk_name_full)
html.stopRow()
html.stopTable()
html.addNewLine()
html.addContent(_info_text)
html.addNewLine()
file_to_read = temp_deploy_sdk_dir + "/" + _info_file
contents = private_open(file_to_read)
html.addAnchor("%s_binaries"% _info_type)
html.startTable()
html.startRow()
html.addColumnHeaderContent("Recipe Name", html.bold)
html.addColumnHeaderContent("Package Name", html.bold)
html.addColumnHeaderContent("Version", html.bold)
html.addColumnHeaderContent("License", html.bold)
html.addColumnHeaderContent("Description", html.bold)
html.stopRow()
for p in contents:
package_license = None
package_recipe = None
package_name = p.split('\n')[0].split(' ')[0]
package_version = None
package_description = None
package_summary = None
if _info_type.startswith("host"):
package_file = pkgdata_host_dir + "/runtime-reverse/" + package_name
else:
package_file = pkgdata_dir + "/runtime-reverse/" + package_name
package_file_content = private_open(package_file)
r = re.compile("([^:]+):\s*(.*)")
for line in package_file_content:
m = r.match(line)
if m:
if m.group(1) == "PN":
package_recipe = m.group(2)
elif m.group(1).startswith("LICENSE"):
package_license = m.group(2)
elif m.group(1) == "PV":
package_version = m.group(2)
elif m.group(1).startswith("DESCRIPTION"):
package_description = m.group(2)
elif m.group(1).startswith("SUMMARY"):
package_summary = m.group(2)
if findWholeWord("GPLv3")(package_license):
style = html.red
style_wrapped = html.wrap_red_format
else:
style = None
style_wrapped = None
html.startRow(style)
if package_recipe:
html.addColumnContent(package_recipe, style)
else:
html.addColumnContent("", style)
if package_name:
html.addColumnContent(package_name, style)
else:
html.addColumnContent("", style)
if package_version:
html.addColumnContent(package_version, style)
else:
html.addColumnContent("", style)
if package_license:
html.addColumnContent(package_license, style)
else:
html.addColumnContent("", style)
if package_summary:
html.addColumnContent(package_summary, style_wrapped)
else:
if package_description:
html.addColumnContent(package_description, style_wrapped)
else:
html.addColumnContent("", style)
html.stopRow()
package_license = None
package_parent = None
package_name = None
package_version = None
package_description = None
package_summary = None
html.stopTable()
html.addNewLine()
html.addNewLine()
html.stopDiv()
summary_file = os.path.join(temp_deploy_sdk_dir, "%s-license_content.html" % ref_sdk_name_full)
# bb.warn("file generated %s" % (summary_file))
html = HTMLSummaryfile()
html.openfile(summary_file)
html.beginHtml()
html.beginBody(with_tab)
''' generate first page: general information + license text '''
generate_introduction_sheet(html)
''' generate image content '''
generate_image_content_sheet(html)
''' generate license spdx reference '''
generate_spdx_license_sheet(html)
html.endBody(with_tab)
html.endHtml()
html.closefile()
SDK_POSTPROCESS_COMMAND_append = "do_write_sdk_license_create_summary;"

View File

@ -0,0 +1,27 @@
#@DESCRIPTION: ST GPLv3 exception
#--------------------------
# License settings
#
# We dont want (L)GPL-3.0+
INCOMPATIBLE_LICENSE = "GPLv3.0 GPLv3 GPL-3.0 GPLv3+ LGPLv3.0 LGPLv3 LGPL-3.0 LGPLv3+"
OPENSTLINUX_WHITELIST_GPLv3 = "gettext"
# for alsa-utils:
OPENSTLINUX_WHITELIST_GPLv3 =+ " gettext bash "
# for systemd
OPENSTLINUX_WHITELIST_GPLv3 =+ " bash readline "
# for udev:
OPENSTLINUX_WHITELIST_GPLv3 =+ " gawk coreutils gdbm m4 "
# for bluez
OPENSTLINUX_WHITELIST_GPLv3 =+ " python3-pycairo "
# for framework-tools-ui
OPENSTLINUX_WHITELIST_GPLv3 =+ " grep dosfstools elfutils cpio gzip which "
OPENSTLINUX_WHITELIST_GPLv3 += "${@bb.utils.contains('DISTRO_FEATURES', 'tpm', 'nano msmtp', '', d)}"
WHITELIST_GPLv3.0+ = "${OPENSTLINUX_WHITELIST_GPLv3}"
WHITELIST_LGPLv3.0 = "${OPENSTLINUX_WHITELIST_GPLv3}"
WHITELIST_GPL-3.0 = "${OPENSTLINUX_WHITELIST_GPLv3}"
WHITELIST_GPL-3.0+ = "${OPENSTLINUX_WHITELIST_GPLv3}"

View File

@ -0,0 +1,120 @@
# Distribution definition for openstlinux
# from dev manual:
# Your configuration file needs to set the following variables:
#
# DISTRO_NAME [required]
# DISTRO_VERSION [required]
# DISTRO_FEATURES [required if creating from scratch]
# DISTRO_EXTRA_RDEPENDS [optional]
# DISTRO_EXTRA_RRECOMMENDS [optional]
# TCLIBC [required if creating from scratch]
# Init OPENSTLINUX_RELEASE flag to snapshot
OPENSTLINUX_RELEASE ??= "snapshot"
DISTRO = "openstlinux"
DISTRO_NAME = "ST OpenSTLinux (A Yocto Project Based Distro)"
DISTRO_VERSION = "2.6-${@bb.utils.contains('OPENSTLINUX_RELEASE', 'snapshot', 'snapshot-${DATE}', '${OPENSTLINUX_RELEASE}', d)}"
# Don't include the DATE variable in the sstate package signatures
DISTRO_VERSION[vardepsexclude] = "DATE"
DISTRO_CODENAME = "thud"
SDK_VENDOR = "-openstlinux_sdk"
SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
# Don't include the DATE variable in the sstate package signatures
SDK_VERSION[vardepsexclude] = "DATE"
MAINTAINER = "Christophe Priouzeau <christophe.priouzeau@st.com>"
# Warning: TARGET_VENDOR does not contains a valid OS/ARCH name like : linux, arm
TARGET_VENDOR = "-ostl"
# Append distro name to each image name
IMAGE_BASENAME_append = "-${DISTRO}"
# Add image name for generated SDK and set default SDK install folder
SDK_NAME = "${IMAGE_LINK_NAME}-${SDK_ARCH}"
SDKPATH = "/opt/st/${MACHINE}/${SDK_VERSION}"
# Don't include the DATE variable in the sstate package signatures
SDKPATH[vardepsexclude] = "DATE"
LOCALCONF_VERSION = "1"
LAYER_CONF_VERSION ?= "7"
# TODO: is that really want we want?
#IMAGE_LINGUAS = "en-us en-gb"
IMAGE_LINGUAS = "en-us en-gb"
# =========================================================================
# DISTRO features
# =========================================================================
DISTRO_FEATURES = "alsa"
DISTRO_FEATURES += "argp"
DISTRO_FEATURES += "ext2"
DISTRO_FEATURES += "ext4"
DISTRO_FEATURES += "largefile"
DISTRO_FEATURES += "ipv4"
DISTRO_FEATURES += "ipv6"
DISTRO_FEATURES += "multiarch"
DISTRO_FEATURES += "wifi"
DISTRO_FEATURES += "nfs"
DISTRO_FEATURES += "usbgadget"
DISTRO_FEATURES += "usbhost"
DISTRO_FEATURES += "xattr"
DISTRO_FEATURES += "zeroconf"
DISTRO_FEATURES += "bluetooth"
DISTRO_FEATURES += "bluez5"
DISTRO_FEATURES += "${DISTRO_FEATURES_LIBC}"
# add support of gstreamer
DISTRO_FEATURES_append = " gstreamer "
# add support of optee
DISTRO_FEATURES_append = " optee "
# add support of splashscreen
DISTRO_FEATURES_append = " splashscreen "
# add support of wayland
DISTRO_FEATURES_append = " wayland pam "
# add support of X11
DISTRO_FEATURES_append = " x11"
# add support of KDE (since OE thud version)
DISTRO_FEATURES_append = " kde "
# add support of systemd
DISTRO_FEATURES_append = " systemd "
# add support of tpm2
#DISTRO_FEATURES_append = " tpm2 "
# Disabling pulseaudio
#DISTRO_FEATURES_BACKFILL_CONSIDERED += "pulseaudio"
DISTRO_FEATURES_append = "pulseaudio"
# Disabling sysvinit
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
# =========================================================================
# Preferred version
# =========================================================================
# v4l-utils
#PREFERRED_VERSION_v4l-utils ?= "1.6.2"
# =========================================================================
# IMAGE addons
# =========================================================================
LICENSE_FLAGS_WHITELIST += " non-commercial commercial"
# X11 addons
IMAGE_INSTALL_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xf86-video-modesetting', '', d)} "
# resize tools
IMAGE_INSTALL_append = " resize-helper systemd-mount-partitions "

View File

@ -0,0 +1,16 @@
#@DESCRIPTION: ST default distro providers
PREFERRED_PROVIDER_libevent = "libevent-fb"
PREFERRED_PROVIDER_jpeg = "libjpeg-turbo"
PREFERRED_PROVIDER_jpeg-native = "libjpeg-turbo-native"
#--------------------------
# Preferred provider
# for openvt tools
PREFERRED_PROVIDER_console-tools = "kbd"
#--------------------------
# Preferred provider
# splash
SPLASH = "${@bb.utils.contains('COMBINED_FEATURES', 'splashscreen', 'psplash-drm', '', d)}"
PREFERRED_PROVIDER_virtual/psplash = "${@bb.utils.contains('COMBINED_FEATURES', 'splashscreen', 'psplash-drm', '', d)}"

View File

@ -0,0 +1,59 @@
#@DESCRIPTION: ST default distro rules
# Set common distrooverrides for all ST distro
DISTROOVERRIDES .= ":openstlinuxcommon"
#--------------------------
# Mirror settings
#
YOCTOPROJECT_MIRROR_URL = "http://downloads.yoctoproject.org/mirror/sources/"
MIRRORS =+ "\
ftp://.*/.* ${YOCTOPROJECT_MIRROR_URL} \n \
http://.*/.* ${YOCTOPROJECT_MIRROR_URL} \n \
https://.*/.* ${YOCTOPROJECT_MIRROR_URL} \n"
INHERIT += "own-mirrors"
SOURCE_MIRROR_URL ??= "${YOCTOPROJECT_MIRROR_URL}"
#--------------------------
# The CONNECTIVITY_CHECK_URI's are used to test whether we can succesfully
# fetch from the network (and warn you if not).
# URI's to check can be set in the CONNECTIVITY_CHECK_URIS variable
# using the same syntax as for SRC_URI. If the variable is not set
# the check is skipped
#
CONNECTIVITY_CHECK_URIS ?= "https://www.example.com/"
#--------------------------
# OELAYOUT_ABI allows us to notify users when the format of TMPDIR changes in
# an incompatible way. Such changes should usually be detailed in the commit
# that breaks the format and have been previously discussed on the mailing list
# with general agreement from the core team.
#
OELAYOUT_ABI = "12"
#--------------------------
# Package configuration
#
# Force the gpl functionnality usage for libav
PACKAGECONFIG_pn-gstreamer1.0-libav = " gpl "
#--------------------------
# Add the manifest and the licenses file on image generated
COPY_LIC_MANIFEST = "1"
#--------------------------
# Tune build config display
#
BUILDCFG_VARS += "DISTRO_CODENAME"
BUILDCFG_VARS += "${@'ACCEPT_EULA_' + d.getVar('MACHINE')}"
BUILDCFG_VARS += "GCCVERSION"
BUILDCFG_VARS += "PREFERRED_PROVIDER_virtual/kernel"
BUILDCFG_VARS += "PREFERRED_VERSION_${PREFERRED_PROVIDER_virtual/kernel}"
#--------------------------
# Writes build information to target filesystem on /etc/build
#
IMAGE_BUILDINFO_VARS = "${BUILDCFG_VARS}"
INHERIT += "image-buildinfo"

View File

@ -0,0 +1,26 @@
#@NAME: openstlinux-eglfs
#@DESCRIPTION: OpenSTLinux featuring eglfs - no X11, no Wayland (with GPLv3 software)
require include/st-default-distro-rules.inc
require include/st-default-distro-providers.inc
require include/openstlinux.inc
# =========================================================================
# Distribution definition for: st-openstlinux-eglfs
# =========================================================================
DISTRO = "openstlinux-eglfs"
DISTRO_NAME = "ST OpenSTLinux - EGLfs - (A Yocto Project Based Distro)"
# Warning: TARGET_VENDOR does not contains a valid OS/ARCH name like : linux, arm
# Warning: '-' are forbidden between each word of TARGET_VENDOR
TARGET_VENDOR = "-openstlinux_eglfs"
# Warning: '-' are forbidden between each word of SDK_VENDOR
SDK_VENDOR = "-openstlinux_eglfs_sdk"
# =========================================================================
# DISTRO features
# =========================================================================
DISTRO_FEATURES_append = " opengl "
DISTRO_FEATURES_remove = " wayland x11 "
DISTRO_FEATURES_append = " gplv3 "

View File

@ -0,0 +1,26 @@
#@NAME: openstlinux-weston
#@DESCRIPTION: OpenSTLinux featuring Weston/Wayland (with GPLv3 software)
require include/st-default-distro-rules.inc
require include/st-default-distro-providers.inc
require include/openstlinux.inc
# =========================================================================
# Distribution definition for: st-openstlinux-weston-
# =========================================================================
DISTRO = "openstlinux-weston"
DISTRO_NAME = "ST OpenSTLinux - Weston - (A Yocto Project Based Distro)"
# Warning: TARGET_VENDOR does not contains a valid OS/ARCH name like : linux, arm
# Warning: '-' are forbidden between each word of TARGET_VENDOR
TARGET_VENDOR = "-openstlinux_weston"
# Warning: '-' are forbidden between each word of SDK_VENDOR
SDK_VENDOR = "-openstlinux_weston_sdk"
# =========================================================================
# DISTRO features
# =========================================================================
DISTRO_FEATURES_append = " opengl"
#DISTRO_FEATURES_remove = " x11 "
DISTRO_FEATURES_append = " gplv3 "

View File

@ -0,0 +1,33 @@
#@NAME: openstlinux-x11
#@DESCRIPTION: OpenSTLinux featuring X11 (with GPLv3 software)
require include/st-default-distro-rules.inc
require include/st-default-distro-providers.inc
require include/openstlinux.inc
# =========================================================================
# Distribution definition for: st-openstlinux-x11
# =========================================================================
DISTRO = "openstlinux-x11"
DISTRO_NAME = "ST OpenSTLinux - X11 - (A Yocto Project Based Distro)"
# Warning: TARGET_VENDOR does not contains a valid OS/ARCH name like : linux, arm
# Warning: '-' are forbidden between each word of TARGET_VENDOR
TARGET_VENDOR = "-openstlinux_x11"
# Warning: '-' are forbidden between each word of SDK_VENDOR
SDK_VENDOR = "-openstlinux_x11_sdk"
# =========================================================================
# DISTRO features
# =========================================================================
DISTRO_FEATURES_append = " opengl"
DISTRO_FEATURES_remove = " wayland "
DISTRO_FEATURES_append = " gplv3 "
# With display manager: here lxdm
VIRTUAL-RUNTIME_graphical_init_manager = "lxdm"
# without display manager: here xserver-nodm-init
#VIRTUAL-RUNTIME_graphical_init_manager = "xserver-nodm-init"
#PREFERRED_VERSION_xserver-nodm-init = "3.0"

31
conf/layer.conf Normal file
View File

@ -0,0 +1,31 @@
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have a recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend \
"
# This folder should only contains specific patches to fix issue on oe recipes
# Note that these patches may be pushed on Community
BBFILES += "${LAYERDIR}/oe-core/recipes-*/*/*.bbappend"
# This folder should only contains direct backport from oe recipes
# These recipes may be suppress at next update on oe version
BBFILES += "${LAYERDIR}/oe-backport/recipes-*/*/*.bb \
${LAYERDIR}/oe-backport/recipes-*/*/*.bbappend \
"
BBFILE_COLLECTIONS += "st-openstlinux"
BBFILE_PATTERN_st-openstlinux := "^${LAYERDIR}/"
BBFILE_PRIORITY_st-openstlinux = "5"
LAYERDEPENDS_st-openstlinux = "qt5-layer"
# Set a variable to get the openstlinux location
OPENSTLINUX_BASE = "${LAYERDIR}"
# This should only be incremented on significant changes that will
# cause compatibility issues with other layers
LAYERVERSION_st-openstlinux = "1"
LAYERSERIES_COMPAT_st-openstlinux = "thud"

View File

@ -0,0 +1,74 @@
# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = "7"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
OEROOT := "${@os.path.abspath(os.path.dirname(d.getVar('FILE')) + '/../..')}"
#--------------------------
# Layers var definition for buildsystem
#
OPENEMBEDDED = "${OPENEMBEDDED_NON_REMOVABLE}"
OPENEMBEDDED_NON_REMOVABLE = "${OEROOT}/layers/openembedded-core/meta"
POKY = "${POKY_NON_REMOVABLE}"
POKY += "${OEROOT}/layers/poky/meta-yocto-bsp"
POKY_NON_REMOVABLE = "${OEROOT}/layers/poky/meta"
POKY_NON_REMOVABLE += "${OEROOT}/layers/poky/meta-yocto"
#--------------------------
#
BASELAYERS ?= " \
${OEROOT}/layers/meta-openembedded/meta-oe \
${OEROOT}/layers/meta-openembedded/meta-gnome \
${OEROOT}/layers/meta-openembedded/meta-xfce \
${OEROOT}/layers/meta-openembedded/meta-initramfs \
${OEROOT}/layers/meta-openembedded/meta-multimedia \
${OEROOT}/layers/meta-openembedded/meta-networking \
${OEROOT}/layers/meta-openembedded/meta-webserver \
${OEROOT}/layers/meta-openembedded/meta-filesystems \
${OEROOT}/layers/meta-openembedded/meta-perl \
${OEROOT}/layers/meta-openembedded/meta-python \
"
BBLAYERS_NON_REMOVABLE ?= " \
${@'${OPENEMBEDDED_NON_REMOVABLE}' if os.path.isfile('${OEROOT}/layers/openembedded-core/meta/conf/layer.conf') else '${POKY_NON_REMOVABLE}'} \
"
BSPLAYER ?= " \
${@'${OEROOT}/layers/meta-st/meta-st-cannes2' if os.path.isfile('${OEROOT}/layers/meta-st/meta-st-cannes2/conf/layer.conf') else ''} \
${@'${OEROOT}/layers/meta-st/meta-st-stm32mp' if os.path.isfile('${OEROOT}/layers/meta-st/meta-st-stm32mp/conf/layer.conf') else ''} \
"
ADDONSLAYERS = ""
# linaro
ADDONSLAYERS += "${@'${OEROOT}/layers/meta-linaro/meta-linaro' if os.path.isfile('${OEROOT}/layers/meta-linaro/meta-linaro/conf/layer.conf') else ''}"
ADDONSLAYERS += "${@'${OEROOT}/layers/meta-linaro/meta-linaro-toolchain' if os.path.isfile('${OEROOT}/layers/meta-linaro/meta-linaro-toolchain/conf/layer.conf') else ''}"
ADDONSLAYERS += "${@'${OEROOT}/layers/meta-openembedded/meta-networking' if os.path.isfile('${OEROOT}/layers/meta-linaro/meta-linaro/conf/layer.conf') else ''}"
# Qt5
ADDONSLAYERS += "${@'${OEROOT}/layers/meta-qt5' if os.path.isfile('${OEROOT}/layers/meta-qt5/conf/layer.conf') else ''}"
# Security layer
ADDONSLAYERS += " \
${@'${OEROOT}/layers/meta-security \
${OEROOT}/layers/meta-security/meta-tpm \
${OEROOT}/layers/meta-openembedded/meta-perl \
${OEROOT}/layers/meta-openembedded/meta-filesystems' \
if os.path.isfile('${OEROOT}/layers/meta-security/conf/layer.conf') else ''} \
"
# specific to framework
FRAMEWORKLAYERS += "${@'${OEROOT}/layers/meta-st/meta-st-openstlinux' if os.path.isfile('${OEROOT}/layers/meta-st/meta-st-openstlinux/conf/layer.conf') else ''}"
# add BSP layer
BBLAYERS += " \
${BASELAYERS} \
${BSPLAYER} \
${ADDONSLAYERS} \
${FRAMEWORKLAYERS} \
${@'${OPENEMBEDDED}' if os.path.isfile('${OEROOT}/layers/openembedded-core/meta/conf/layer.conf') else '${POKY}'} \
"

View File

@ -0,0 +1,13 @@
Available images for OpenSTLinux layers are:
- Official OpenSTLinux images:
st-image-weston - OpenSTLinux weston image with basic Wayland support (if enable in distro)
- Other OpenSTLinux images:
- Supported images:
st-image-core - OpenSTLinux core image
- Proposed images as example only:
st-example-image-qt - ST example of image based on QT framework (require 'openstlinux-eglfs' distro)
st-example-image-x11 - ST example of image based on X11 (require 'openstlinux-x11' distro)
st-example-image-xfce - ST example of image based on XFCE framework (require 'openstlinux-x11' distro)
and more images are available on meta-st-openstlinux/recipes-samples/images.

View File

@ -0,0 +1,278 @@
#
# This file is your local configuration file and is where all local user settings
# are placed. The comments in this file give some guide to the options a new user
# to the system might want to change but pretty much any configuration option can
# be set in this file. More adventurous users can look at local.conf.extended
# which contains other examples of configuration which can be placed in this file
# but new users likely won't need any of them initially.
#
# Lines starting with the '#' character are commented out and in some cases the
# default values are provided as comments to show people example syntax. Enabling
# the option is a question of removing the # character and making any change to the
# variable as required.
#
# Machine Selection
#
# You need to select a specific machine to target the build with. There are a selection
# of emulated machines available which can boot and run in the QEMU emulator:
#
#MACHINE ?= "qemuarm"
#MACHINE ?= "qemuarm64"
#MACHINE ?= "qemumips"
#MACHINE ?= "qemumips64"
#MACHINE ?= "qemuppc"
#MACHINE ?= "qemux86"
#MACHINE ?= "qemux86-64"
#
# This sets the default machine to be qemux86 if no other machine is selected:
MACHINE ??= "qemux86"
#
# Default policy config
#
# The distribution setting controls which policy settings are used as defaults.
# The default value is fine for general Yocto project use, at least initially.
# Ultimately when creating custom policy, people will likely end up subclassing
# these defaults.
#
# This sets the default distribution to be nodistro if no other distribution is selected:
DISTRO ??= "nodistro"
#
# Where to place downloads
#
# During a first build the system will download many different source code tarballs
# from various upstream projects. This can take a while, particularly if your network
# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you
# can preserve this directory to speed up this part of subsequent builds. This directory
# is safe to share between multiple builds on the same machine too.
#
# The default is a downloads directory under TOPDIR which is the build directory.
#
#DL_DIR ?= "${TOPDIR}/downloads"
#
# Where to place shared-state files
#
# BitBake has the capability to accelerate builds based on previously built output.
# This is done using "shared state" files which can be thought of as cache objects
# and this option determines where those files are placed.
#
# You can wipe out TMPDIR leaving this directory intact and the build would regenerate
# from these files if no changes were made to the configuration. If changes were made
# to the configuration, only shared state files where the state was still valid would
# be used (done using checksums).
#
# The default is a sstate-cache directory under TOPDIR.
#
#SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
#
# Where to place the build output
#
# This option specifies where the bulk of the building work should be done and
# where BitBake should place its temporary files and output. Keep in mind that
# this includes the extraction and compilation of many applications and the toolchain
# which can use Gigabytes of hard disk space.
#
# The default is a tmp directory under TOPDIR.
#
#TMPDIR = "${TOPDIR}/tmp"
#
# Package Management configuration
#
# This variable lists which packaging formats to enable. Multiple package backends
# can be enabled at once and the first item listed in the variable will be used
# to generate the root filesystems.
# Options are:
# - 'package_deb' for debian style deb files
# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager)
# - 'package_rpm' for rpm style packages
# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
# We default to ipk:
PACKAGE_CLASSES ?= "package_ipk"
#
# SDK target architecture
#
# This variable specifies the architecture to build SDK items for and means
# you can build the SDK packages for architectures other than the machine you are
# running the build on (i.e. building i686 packages on an x86_64 host).
# Supported values are i686 and x86_64
#SDKMACHINE ?= "i686"
#
# Extra image configuration defaults
#
# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated
# images. Some of these options are added to certain image types automatically. The
# variable can contain the following options:
# "dbg-pkgs" - add -dbg packages for all installed packages
# (adds symbol information for debugging/profiling)
# "dev-pkgs" - add -dev packages for all installed packages
# (useful if you want to develop against libs in the image)
# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages
# (useful if you want to run the package test suites)
# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.)
# "tools-debug" - add debugging tools (gdb, strace)
# "eclipse-debug" - add Eclipse remote debugging support
# "tools-profile" - add profiling tools (oprofile, lttng, valgrind)
# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.)
# "debug-tweaks" - make an image suitable for development
# e.g. ssh root access has a blank password
# There are other application targets that can be used here too, see
# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details.
# We default to enabling the debugging tweaks.
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
#
# Additional image features
#
# The following is a list of additional classes to use when building images which
# enable extra features. Some available options which can be included in this variable
# are:
# - 'buildstats' collect build statistics
# - 'image-mklibs' to reduce shared library files size for an image
# - 'image-prelink' in order to prelink the filesystem image
# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink
# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
#
# Runtime testing of images
#
# The build system can test booting virtual machine images under qemu (an emulator)
# after any root filesystems are created and run tests against those images. It can also
# run tests against any SDK that are built. To enable this uncomment these lines.
# See classes/test{image,sdk}.bbclass for further details.
#IMAGE_CLASSES += "testimage testsdk"
#TESTIMAGE_AUTO_qemuall = "1"
#
# Interactive shell configuration
#
# Under certain circumstances the system may need input from you and to do this it
# can launch an interactive shell. It needs to do this since the build is
# multithreaded and needs to be able to handle the case where more than one parallel
# process may require the user's attention. The default is iterate over the available
# terminal types to find one that works.
#
# Examples of the occasions this may happen are when resolving patches which cannot
# be applied, to use the devshell or the kernel menuconfig
#
# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none
# Note: currently, Konsole support only works for KDE 3.x due to the way
# newer Konsole versions behave
#OE_TERMINAL = "auto"
# By default disable interactive patch resolution (tasks will just fail instead):
PATCHRESOLVE = "noop"
#
# Disk Space Monitoring during the build
#
# Monitor the disk space during the build. If there is less that 1GB of space or less
# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully
# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort
# of the build. The reason for this is that running completely out of space can corrupt
# files and damages the build in ways which may not be easily recoverable.
# It's necesary to monitor /tmp, if there is no space left the build will fail
# with very exotic errors.
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
ABORT,${TMPDIR},100M,1K \
ABORT,${DL_DIR},100M,1K \
ABORT,${SSTATE_DIR},100M,1K \
ABORT,/tmp,10M,1K"
#
# Shared-state files from other locations
#
# As mentioned above, shared state files are prebuilt cache data objects which can
# used to accelerate build time. This variable can be used to configure the system
# to search other mirror locations for these objects before it builds the data itself.
#
# This can be a filesystem directory, or a remote url such as http or ftp. These
# would contain the sstate-cache results from previous builds (possibly from other
# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the
# cache locations to check for the shared objects.
# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH
# at the end as shown in the examples below. This will be substituted with the
# correct path within the directory structure.
#SSTATE_MIRRORS ?= "\
#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
#file://.* file:///some/local/dir/sstate/PATH"
#
# Qemu configuration
#
# By default qemu will build with a builtin VNC server where graphical output can be
# seen. The two lines below enable the SDL backend too. By default libsdl2-native will
# be built, if you want to use your host's libSDL instead of the minimal libsdl built
# by libsdl2-native then uncomment the ASSUME_PROVIDED line below.
PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
#ASSUME_PROVIDED += "libsdl2-native"
# =========================================================================
# ST SPecific
# =========================================================================
#
# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to
# track the version of this file when it was generated. This can safely be ignored if
# this doesn't mean anything to you.
CONF_VERSION = "1"
# Set GLIBC_GENERATE_LOCALES to the locales you wish to generate should you not
# wish to perform the time-consuming step of generating all LIBC locales.
# NOTE: If removing en_US.UTF-8 you will also need to uncomment, and set
# appropriate value for IMAGE_LINGUAS.
# WARNING: this may break localisation!
GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
IMAGE_LINGUAS ?= "en-gb"
# Additional image generation features
#
# The following is a list of classes to import to use in the generation of images
# currently an example class is image_types_uboot
# IMAGE_CLASSES = " image_types_uboot"
# Support of devshell
INHERIT += "devshell"
# Remove the old image before the new one generated to save disk space
RM_OLD_IMAGE = "1"
# Nice debug data
INHERIT += "buildhistory"
BUILDHISTORY_COMMIT = "1"
# Clean up working directory after build
INHERIT += "rm_work"
# To generate debug image with all symbol
#IMAGE_GEN_DEBUGFS = "1"
# force the usage of debian package
PACKAGE_CLASSES = "package_deb"
# To enable archiver for recipes that are configured
#ST_ARCHIVER_ENABLE = "1"
# Setup environment for builds binary reproducibility
INHERIT += "reproducible_build_openstlinux"
# =========================================================================
# Configure STM32MP default version to github
# =========================================================================
#STM32MP_SOURCE_SELECTION_pn-linux-stm32mp = "github"
#STM32MP_SOURCE_SELECTION_pn-optee-os-stm32mp = "github"
#STM32MP_SOURCE_SELECTION_pn-tf-a-stm32mp = "github"
#STM32MP_SOURCE_SELECTION_pn-u-boot-stm32mp = "github"

View File

@ -0,0 +1 @@
en.DM00217720.pdf

Binary file not shown.

View File

@ -0,0 +1,5 @@
RDEPENDS_${PN}_remove = "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
#the dependency are put on packagegroup
RRECOMMENDS_${PN}-dev_remove = "openssh-keygen-dev update-alternatives-opkg-dev libcrypto-dev pam-plugin-keyinit-dev pam-plugin-loginuid-dev shadow-sysroot-dev"
RDEPENDS_${PN}-dev = ""
RRECOMMENDS_${PN}-dev_append = "openssh"

View File

@ -0,0 +1 @@
RDEPENDS_${PN} =+ "openssh-scp openssh-ssh openssh-sshd openssh-keygen"

View File

@ -0,0 +1 @@
EXTRA_OECONF += "DEB_HOST_ARCH=${DPKG_ARCH}"

View File

@ -0,0 +1,10 @@
CKERMIT_ADDITIONAL_append = " -pipe -funsigned-char -DFNFLOAT -DCK_NEWTERM -DPOSIX -UNOUNICODE"
CKERMIT_ADDITIONAL_append = " -UNOPUSH -UNOHELP -UNOFRILLS -UNOPUSH -DNO_OPENPTY"
CKERMIT_ADDITIONAL_append = " -UNOB_115K -UNOSERVER -UNODEBUG -DDEBUG "
CKERMIT_ADDITIONAL_append = " -DTCPSOCKET -DNOLISTEN -DNOLOGIN"
CKERMIT_ADDITIONAL_append = " -UNOCSETS -UNONET -UNOFTP -UNODIAL -UNOPUSH -UNOIKSD -UNOHTTP -UDNOFLOAT "
CKERMIT_ADDITIONAL_append = " -UNOSEXP -UNORLOGIN -UNOOLDMODEMS -UNOSSH -UNOLISTEN -UNORESEND -UNOAUTODL "
CKERMIT_ADDITIONAL_append = " -UNOSTREAMING -UNOHINTS -UNOCKXYZ -UNOLEARN -UNOMKDIR -UNOPERMS -UNOCKTIMERS "
CKERMIT_ADDITIONAL_append = " -UNOCKREGEX -UNOLOGDIAL -DNOLOCAL -DZLIB "

View File

@ -0,0 +1,3 @@
SRCREV = "6ecff5d46e1b12c2859f0b63a73282940e3402bb"
PV = "0.15+git${SRCPV}"

View File

@ -0,0 +1,48 @@
From 3bc09eff14ddfad336f0a8b8772ae08ad23f50a7 Mon Sep 17 00:00:00 2001
From: Benjamin Gaignard <benjamin.gaignard@st.com>
Date: Thu, 6 Sep 2018 17:24:48 +0200
Subject: [PATCH] NativeStateDRM: Set a default encoder for not connected
connector
If a connector doesn't have any encoder connected try to find a
suitable one in it possible encoders list.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
---
src/native-state-drm.cpp | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/src/native-state-drm.cpp b/src/native-state-drm.cpp
index 62566ee..d8582af 100644
--- a/src/native-state-drm.cpp
+++ b/src/native-state-drm.cpp
@@ -504,6 +504,26 @@ NativeStateDRM::init()
encoder_ = 0;
}
+ // If encoder is not connected to the connector try to find
+ // a suitable one
+ if (!encoder_) {
+ for (int e = 0; e < connector_->count_encoders; e++) {
+ encoder_ = drmModeGetEncoder(fd, connector_->encoders[e]);
+ for (int c = 0; c < resources_->count_crtcs; c++) {
+ if (encoder_->possible_crtcs & (1 << c)) {
+ encoder_->crtc_id = resources_->crtcs[c];
+ break;
+ }
+ }
+ if (encoder_->crtc_id) {
+ break;
+ }
+
+ drmModeFreeEncoder(encoder_);
+ encoder_ = 0;
+ }
+ }
+
if (!encoder_) {
Log::error("Failed to find a suitable encoder\n");
return false;
--
2.15.0

View File

@ -0,0 +1,25 @@
From a2af1634f1b83ee5868318f90b462df1dd764ede Mon Sep 17 00:00:00 2001
From: Benjamin Gaignard <benjamin.gaignard@st.com>
Date: Thu, 6 Sep 2018 17:26:40 +0200
Subject: [PATCH] NativeStateDRM: add stm driver in module list
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
---
src/native-state-drm.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/native-state-drm.cpp b/src/native-state-drm.cpp
index d8582af..1098bd6 100644
--- a/src/native-state-drm.cpp
+++ b/src/native-state-drm.cpp
@@ -361,6 +361,7 @@ static int open_using_module_checking()
"exynos",
"pl111",
"vc4",
+ "stm",
};
int fd = -1;
--
2.15.0

View File

@ -0,0 +1,30 @@
From 351f516d7742646f7f3d3647e0b58ac1c04702e3 Mon Sep 17 00:00:00 2001
From: Christophe Priouzeau <christophe.priouzeau@st.com>
Date: Fri, 18 May 2018 17:08:52 +0200
Subject: [PATCH 3/3] drm: automatic driver name detection
Look for the drm driver using udev services.
Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
---
src/wscript_build | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/wscript_build b/src/wscript_build
index bc7e04e..e976f8d 100644
--- a/src/wscript_build
+++ b/src/wscript_build
@@ -25,8 +25,8 @@ flavor_sources = {
flavor_uselibs = {
'x11-gl' : ['x11', 'gl', 'matrix-gl', 'common-gl'],
'x11-glesv2' : ['x11', 'egl', 'glesv2', 'matrix-glesv2', 'common-glesv2'],
- 'drm-gl' : ['drm', 'gbm', 'udev', 'egl', 'gl', 'matrix-gl', 'common-gl'],
- 'drm-glesv2' : ['drm', 'gbm', 'udev', 'egl', 'glesv2', 'matrix-glesv2', 'common-glesv2'],
+ 'drm-gl' : ['drm', 'gbm', 'udev', 'egl', 'gl', 'matrix-gl', 'common-gl', 'udev'],
+ 'drm-glesv2' : ['drm', 'gbm', 'udev', 'egl', 'glesv2', 'matrix-glesv2', 'common-glesv2', 'udev'],
'mir-gl' : ['mirclient', 'egl', 'gl', 'matrix-gl', 'common-gl'],
'mir-glesv2' : ['mirclient', 'egl', 'glesv2', 'matrix-glesv2', 'common-glesv2'],
'wayland-gl' : ['wayland-client', 'wayland-egl', 'egl', 'gl', 'matrix-gl', 'common-gl'],
--
2.7.4

View File

@ -0,0 +1,11 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
DEPENDS += " udev "
SRC_URI_remove = "file://0001-Fix-clang-warnings.patch"
SRCREV = "5e0e448ca2c3a37c0b2c7794bcd73a700f79aa4f"
PACKAGECONFIG = "${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11-gl x11-gles2', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland opengl', 'wayland-gles2', '', d)} \
drm-gles2"

View File

@ -0,0 +1,37 @@
# Copyright (C) 2016, STMicroelectronics - All Rights Reserved
# Released under the MIT license (see COPYING.MIT for the terms)
# Tools extracted from 96boards-tools https://github.com/96boards/96boards-tools
DESCRIPTION = "Tools for resizing the file system"
SECTION = "devel"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
# e2fsprogs for resize2fs
RDEPENDS_${PN} += " e2fsprogs-resize2fs "
SRC_URI = " file://resize-helper.service file://resize-helper file://resize-helper.sh.in"
S = "${WORKDIR}/git"
inherit systemd update-rc.d
SYSTEMD_PACKAGES += " resize-helper "
SYSTEMD_SERVICE_${PN} = "resize-helper.service"
SYSTEMD_AUTO_ENABLE_${PN} = "enable"
do_install() {
install -d ${D}${systemd_unitdir}/system ${D}${base_sbindir}
install -m 0644 ${WORKDIR}/resize-helper.service ${D}${systemd_unitdir}/system
install -m 0755 ${WORKDIR}/resize-helper ${D}${base_sbindir}
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/resize-helper.sh.in ${D}${sysconfdir}/init.d/resize-helper.sh
sed -i -e "s:@sbindir@:${base_sbindir}:; s:@sysconfdir@:${sysconfdir}:" \
${D}${sysconfdir}/init.d/resize-helper.sh
}
INITSCRIPT_NAME = "resize-helper.sh"
INITSCRIPT_PARAMS = "start 22 5 3 ."

View File

@ -0,0 +1,59 @@
#!/bin/sh
# Copyright (c) Fathi Boudra <fathi.boudra@linaro.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
# we must be root
[ $(whoami) = "root" ] || { echo "E: You must be root" && exit 1; }
# we must have few tools
#SGDISK=$(which sgdisk) || { echo "E: You must have sgdisk" && exit 1; }
#PARTED=$(which parted) || { echo "E: You must have parted" && exit 1; }
#PARTPROBE=$(which partprobe) || { echo "E: You must have partprobe" && exit 1; }
RESIZE2FS=$(which resize2fs) || { echo "E: You must have resize2fs" && exit 1; }
# find root device
# ROOT_DEVICE=$(findmnt --noheadings --output=SOURCE / | cut -d'[' -f1)
DEVICES=$(ls /sys/fs/ext4/)
# prune root device (for example UUID)
#ROOT_DEVICE=$(realpath ${ROOT_DEVICE})
# get the partition number and type
#PART_ENTRY_NUMBER=$(udevadm info --query=property --name=${ROOT_DEVICE} | grep '^ID_PART_ENTRY_NUMBER=' | cut -d'=' -f2)
#PART_TABLE_TYPE=$(udevadm info --query=property --name=${ROOT_DEVICE} | grep '^ID_PART_TABLE_TYPE=' | cut -d'=' -f2)
# find the block device
#DEVICE=$(udevadm info --query=path --name=${ROOT_DEVICE} | awk -F'/' '{print $(NF-1)}')
#DEVICE="/dev/${DEVICE}"
#if [ "$PART_TABLE_TYPE" = "gpt" ]; then
# ${SGDISK} -e ${DEVICE}
# ${PARTPROBE}
#fi
#${PARTED} ${DEVICE} resizepart ${PART_ENTRY_NUMBER} Yes 100%
#${PARTPROBE}
for device in ${DEVICES}; do
if [ -e /dev/${device} ]; then
${RESIZE2FS} "/dev/${device}"
fi
done

View File

@ -0,0 +1,14 @@
[Unit]
Description=Resize root filesystem to fit available disk space
Wants=systemd-udevd.service systemd-udev-trigger.service
After=systemd-remount-fs.service systemd-udevd.service
[Service]
Type=oneshot
ExecStartPre=-/bin/udevadm settle
ExecStart=-/sbin/resize-helper
ExecStartPost=/bin/systemctl disable resize-helper.service
WatchdogSec=30
[Install]
WantedBy=basic.target

View File

@ -0,0 +1,29 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: Resize root filesystem to fit available disk space
# Description: Start resize helper, then remove own init from runlevels,
# as it is required only for first boot. run settle to provide partition
# table details.
### END INIT INFO
DESC="resize helper"
case $1 in
start)
echo "Starting $DESC"
@sbindir@/resize-helper
echo "remove $DESC from runlevels starting"
rm @sysconfdir@/rc3.d/S22resize-helper.sh &> /dev/null
rm @sysconfdir@/rc5.d/S22resize-helper.sh &> /dev/null
echo "remove $DESC from runlevels completed"
;;
*)
echo "Usage: @sysconfdir@/init.d/resize-helper.sh {start}" >&2
exit 1
;;
esac
exit 0
# vim:noet

View File

@ -0,0 +1,36 @@
# Copyright (C) 2018, STMicroelectronics - All Rights Reserved
# Released under the MIT license (see COPYING.MIT for the terms)
DESCRIPTION = "The goal is to enable USB gadget configuration"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
PV = "1.0"
SRC_URI = " file://usbotg-config.service \
file://stm32_usbotg_eth_config.sh \
"
S = "${WORKDIR}/git"
inherit systemd update-rc.d
SYSTEMD_PACKAGES += "${PN}"
SYSTEMD_SERVICE_${PN} = "usbotg-config.service"
SYSTEMD_AUTO_ENABLE_${PN} = "enable"
do_install() {
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${systemd_unitdir}/system ${D}${base_sbindir}
install -m 0644 ${WORKDIR}/usbotg-config.service ${D}${systemd_unitdir}/system
install -m 0755 ${WORKDIR}/stm32_usbotg_eth_config.sh ${D}${base_sbindir}
fi
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/stm32_usbotg_eth_config.sh ${D}${sysconfdir}/init.d/
}
INITSCRIPT_NAME = "stm32_usbotg_eth_config.sh"
INITSCRIPT_PARAMS = "start 22 5 3 ."

View File

@ -0,0 +1,109 @@
#!/bin/sh
#add stm32_eth_config script to enable USB Ethernet & MSC gadget This script configures USB Gadget
#configfs to use USB OTG as a USB Ethernet Gadget with Remote NDIS (RNDIS), well supported by Microsoft
#Windows and Linux.
configfs="/sys/kernel/config/usb_gadget"
g=g1
c=c.1
d="${configfs}/${g}"
func_eth=rndis.0
func_ms=mass_storage.0
VENDOR_ID="0x1d6b"
PRODUCT_ID="0x0104"
IP="192.168.7.2"
NETMASK="255.255.255.0"
do_start() {
if [ ! -d ${configfs} ]; then
modprobe libcomposite
if [ ! -d ${configfs} ]; then
exit 1
fi
fi
if [ -d ${d} ]; then
exit 0
fi
udc=$(ls -1 /sys/class/udc/)
if [ -z $udc ]; then
echo "No UDC driver registered"
exit 1
fi
mkdir "${d}"
echo ${VENDOR_ID} > "${d}/idVendor"
echo ${PRODUCT_ID} > "${d}/idProduct"
echo 0x0200 > "${d}/bcdUSB"
echo "0xEF" > "${d}/bDeviceClass"
echo "0x02" > "${d}/bDeviceSubClass"
echo "0x01" > "${d}/bDeviceProtocol"
echo "0x0100" > "${d}/bcdDevice"
mkdir -p "${d}/strings/0x409"
echo "0" > "${d}/strings/0x409/serialnumber"
echo "STMicroelectronics" > "${d}/strings/0x409/manufacturer"
echo "STM32MP1" > "${d}/strings/0x409/product"
# Config
mkdir -p "${d}/configs/${c}"
mkdir -p "${d}/configs/${c}/strings/0x409"
echo "Config 1: RNDIS" > "${d}/configs/${c}/strings/0x409/configuration"
echo 250 > "${d}/configs/${c}/MaxPower"
echo 0xC0 > "${d}/configs/${c}/bmAttributes" # self powered device
mkdir -p "${d}/functions/${func_eth}"
# Windows extension to force RNDIS config
mkdir -p "${d}/os_desc"
echo "1" > "${d}/os_desc/use"
echo "0xbc" > "${d}/os_desc/b_vendor_code"
echo "MSFT100" > "${d}/os_desc/qw_sign"
mkdir -p "${d}/functions/${func_eth}/os_desc/interface.rndis"
echo "RNDIS" > "${d}/functions/${func_eth}/os_desc/interface.rndis/compatible_id"
echo "5162001" > "${d}/functions/${func_eth}/os_desc/interface.rndis/sub_compatible_id"
# Set up the rndis device only first
ln -s "${d}/functions/${func_eth}" "${d}/configs/${c}"
ln -s "${d}/configs/${c}" "${d}/os_desc"
echo "${udc}" > "${d}/UDC"
sleep 0.2
ifconfig usb0 $IP $NETMASK
ifconfig usb0 up
}
do_stop() {
ifconfig usb0 down
sleep 0.2
echo "" > "${d}/UDC"
rm -f "${d}/os_desc/${c}"
[ -d "${d}/configs/${c}/${func_eth}" ] &&rm -f "${d}/configs/${c}/${func_eth}"
[ -d "${d}/strings/0x409/" ] && rmdir "${d}/strings/0x409/"
[ -d "${d}/configs/${c}/strings/0x409" ] && rmdir "${d}/configs/${c}/strings/0x409"
[ -d "${d}/configs/${c}" ] && rmdir "${d}/configs/${c}"
[ -d "${d}/functions/${func_eth}" ] && rmdir "${d}/functions/${func_eth}"
[ -d "${d}" ] && rmdir "${d}"
}
case $1 in
start)
do_start $2
;;
stop)
do_stop
;;
*)
echo "Usage: $0 (stop | start)"
;;
esac

View File

@ -0,0 +1,10 @@
[Unit]
Description=Enable USB Ethernet gadget
After=systemd-remount-fs.service
[Service]
Type=oneshot
ExecStart=-/sbin/stm32_usbotg_eth_config.sh start
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,40 @@
From 1da2a6574798c77f76e55d6b38ea8ee95ed9a07f Mon Sep 17 00:00:00 2001
From: Christophe Priouzeau <christophe.priouzeau@st.com>
Date: Thu, 27 Oct 2016 14:14:21 +0200
Subject: [PATCH] authorize pulse audio request via dbus
---
src/bluetooth.conf | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/src/bluetooth.conf b/src/bluetooth.conf
index 10d2d36..67ac27d 100644
--- a/src/bluetooth.conf
+++ b/src/bluetooth.conf
@@ -24,6 +24,23 @@
<allow send_interface="org.freedesktop.DBus.Properties"/>
</policy>
+ <policy user="pulse">
+ <allow own="org.bluez"/>
+ <allow send_destination="org.bluez"/>
+ <allow send_interface="org.bluez.Agent1"/>
+ <allow send_interface="org.bluez.MediaEndpoint1"/>
+ <allow send_interface="org.bluez.MediaPlayer1"/>
+ <allow send_interface="org.bluez.ThermometerWatcher1"/>
+ <allow send_interface="org.bluez.AlertAgent1"/>
+ <allow send_interface="org.bluez.Profile1"/>
+ <allow send_interface="org.bluez.HeartRateWatcher1"/>
+ <allow send_interface="org.bluez.CyclingSpeedWatcher1"/>
+ <allow send_interface="org.bluez.GattCharacteristic1"/>
+ <allow send_interface="org.bluez.GattDescriptor1"/>
+ <allow send_interface="org.freedesktop.DBus.ObjectManager"/>
+ <allow send_interface="org.freedesktop.DBus.Properties"/>
+ </policy>
+
<policy at_console="true">
<allow send_destination="org.bluez"/>
</policy>
--
1.9.1

View File

@ -0,0 +1,4 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-authorize-pulse-audio-request-via-dbus.patch"

View File

@ -0,0 +1,5 @@
# Disable connman service at startup
SYSTEMD_AUTO_ENABLE_${PN} = "disable"
# Set low alternative priority for resolv-conf to keep systemd by default
ALTERNATIVE_PRIORITY[resolv-conf] = "10"

View File

@ -0,0 +1,9 @@
# Enable FLASH utilities
CONFIG_FLASHCP=y
CONFIG_FLASH_LOCK=y
CONFIG_FLASH_UNLOCK=y
CONFIG_FLASH_ERASEALL=y
# Enable tools to fill ARP table (991 cameras)
CONFIG_ARP=y
CONFIG_ARPING=y

View File

@ -0,0 +1,12 @@
FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
SRC_URI += "file://${BUSYBOX_CONFIG_FRAGMENT}"
BUSYBOX_CONFIG_FRAGMENT = "busybox-openstlinux.cfg"
do_configure_append () {
# merge specific configuration to newly generated .config
merge_config.sh -m -r -O ${B} ${B}/.config ${WORKDIR}/${BUSYBOX_CONFIG_FRAGMENT} 1>&2
# make sure to generate proper config file for busybox
cml1_do_configure
}

View File

@ -0,0 +1,6 @@
#
# Due to GPLv3 limitation, gdbserver are removed of package group
#
RDEPENDS_${PN}_remove = "\
${@bb.utils.contains('DISTRO_FEATURES', 'gplv3', '', 'gdbserver', d)} \
"

View File

@ -0,0 +1,5 @@
RDEPENDS_${PN}_remove = "${LTTNGMODULES}"
RRECOMMENDS_${PN}_remove = "${@bb.utils.contains('DISTRO_FEATURES', 'gplv3', '', '${PERF}', d)}"
#RDEPENDS_append += "oprofile"

View File

@ -0,0 +1,44 @@
# Copyright (C) 2014, STMicroelectronics - All Rights Reserved
# Released under the MIT license (see COPYING.MIT for the terms)
DESCRIPTION = "Basic splash screen which display a picture on DRM/KMS"
LICENSE = "MIT"
DEPENDS = "libdrm pkgconfig-native"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = " \
file://image_header.h \
file://basic_splash_drm.c \
file://Makefile \
file://psplash-drm-quit \
"
SRC_URI += " file://psplash-drm-start.service "
inherit systemd
SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','psplash-drm-start.service','',d)}"
S = "${WORKDIR}"
do_configure[noexec] = "1"
do_compile() {
bbnote "EXTRA_OEMAKE=${EXTRA_OEMAKE}"
oe_runmake clean
oe_runmake psplash
}
do_install() {
install -d ${D}${bindir}
install -m 755 ${WORKDIR}/psplash-drm ${D}${bindir}
install -m 755 ${WORKDIR}/psplash-drm-quit ${D}${bindir}
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${systemd_unitdir}/system
install -m 644 ${WORKDIR}/*.service ${D}/${systemd_unitdir}/system
fi
}

View File

@ -0,0 +1,16 @@
SPLASH_IMG ?= ST13028_Linux_picto_11_480x352_8bits.png
SPLASH_IMG_ROT ?= ST13028_Linux_picto_11_480x352_8bits_rotation.png
all: modeset
generate_header: $(SPLASH_IMG) $(SPLASH_IMG_ROT)
@gdk-pixbuf-csource --macros $(SPLASH_IMG) > image_header.tmp
@(sed -e "s/MY_PIXBUF/SPLASH_IMG/g" -e "s/guint8/uint8_t/g" image_header.tmp > image_header.h && rm image_header.tmp)
@gdk-pixbuf-csource --macros $(SPLASH_IMG_ROT) > image_header.tmp
@(sed -e "s/MY_PIXBUF/SPLASH_IMG_ROT/g" -e "s/guint8/uint8_t/g" image_header.tmp >> image_header.h && rm image_header.tmp)
psplash:
$(CC) $(CFLAGS) $(LDFLAGS) -o psplash-drm basic_splash_drm.c -I. `pkg-config --cflags --libs libdrm` -Wall -Os
clean:
rm -rf psplash-drm

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -0,0 +1,698 @@
/*
* basic_splash_drm.c - Basic splash screen on DRM
*
* Inspired by the code of modeset:
* https://github.com/dvdhrm/docs/blob/master/drm-howto/modeset.c
* Written 2012 by David Herrmann <dh.herrmann@googlemail.com>
*
*
*/
#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <time.h>
#include <unistd.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "image_header.h"
#define SPLASH_FIFO "/tmp/splash_fifo"
#define MAX_HEIGHT_THRESHOLD 720
//-----------------------
// Static variable
static int drm_fd;
static int pipe_fd;
static int wait = 0;
//----------------------
// Prototype
struct modeset_dev;
static int modeset_find_crtc (int fd, drmModeRes * res,
drmModeConnector * conn,
struct modeset_dev *dev);
static int modeset_create_fb (int fd, struct modeset_dev *dev);
static int modeset_setup_dev (int fd, drmModeRes * res,
drmModeConnector * conn,
struct modeset_dev *dev);
static int modeset_open (int *out, const char *node);
static int modeset_prepare (int fd);
static void modeset_draw_bgcolor (uint8_t r_p, uint8_t g_p, uint8_t b_p);
static void modeset_cleanup (int fd);
static void splash_draw_image_center (void);
//-------------------------------
// Modeset function
static int
modeset_open (int *out, const char *node)
{
int fd, ret;
uint64_t has_dumb;
fd = open (node, O_RDWR | O_CLOEXEC);
if (fd < 0) {
ret = -errno;
fprintf (stderr, "cannot open '%s': %m\n", node);
return ret;
}
if (drmGetCap (fd, DRM_CAP_DUMB_BUFFER, &has_dumb) < 0 || !has_dumb) {
fprintf (stderr, "drm device '%s' does not support dumb buffers\n",
node);
close (fd);
return -EOPNOTSUPP;
}
*out = fd;
return 0;
}
struct modeset_dev
{
struct modeset_dev *next;
uint32_t width;
uint32_t height;
uint32_t stride;
uint32_t size;
uint32_t handle;
uint8_t *map;
drmModeModeInfo mode;
uint32_t fb;
uint32_t conn;
uint32_t crtc;
drmModeCrtc *saved_crtc;
};
static struct modeset_dev *modeset_list = NULL;
static int
modeset_prepare (int fd)
{
drmModeRes *res;
drmModeConnector *conn;
unsigned int i;
struct modeset_dev *dev;
int ret;
/* retrieve resources */
res = drmModeGetResources (fd);
if (!res) {
fprintf (stderr, "cannot retrieve DRM resources (%d): %m\n", errno);
return -errno;
}
/* iterate all connectors */
for (i = 0; i < res->count_connectors; ++i)
{
/* get information for each connector */
conn = drmModeGetConnector (fd, res->connectors[i]);
if (!conn) {
fprintf (stderr, "cannot retrieve DRM connector %u:%u (%d): %m\n",
i, res->connectors[i], errno);
continue;
}
/* create a device structure */
dev = malloc (sizeof (*dev));
memset (dev, 0, sizeof (*dev));
dev->conn = conn->connector_id;
/* call helper function to prepare this connector */
ret = modeset_setup_dev (fd, res, conn, dev);
if (ret) {
if (ret != -ENOENT) {
errno = -ret;
fprintf (stderr,
"cannot setup device for connector %u:%u (%d): %m\n",
i, res->connectors[i], errno);
}
free (dev);
drmModeFreeConnector (conn);
continue;
}
/* free connector data and link device into global list */
drmModeFreeConnector (conn);
dev->next = modeset_list;
modeset_list = dev;
}
/* free resources again */
drmModeFreeResources (res);
return 0;
}
static int
modeset_setup_dev (int fd,
drmModeRes * res,
drmModeConnector * conn, struct modeset_dev *dev)
{
int mode, ret;
/* check if a monitor is connected */
if (conn->connection != DRM_MODE_CONNECTED) {
fprintf (stderr, "ignoring unused connector %u\n", conn->connector_id);
return -ENOENT;
}
/* check if there is at least one valid mode */
if (conn->count_modes == 0) {
fprintf (stderr, "no valid mode for connector %u\n",
conn->connector_id);
return -EFAULT;
}
mode = 0;
if (conn->count_modes > 1) {
/* Kick out any resolution above 720p */
for (mode = 0; mode < conn->count_modes; mode++) {
if (conn->modes[mode].vdisplay <= MAX_HEIGHT_THRESHOLD) {
fprintf (stderr, "Defaulting to 720p - id:%d\n", mode);
break;
}
}
if (mode >= conn->count_modes)
mode = 0;
}
/* copy the mode information into our device structure */
memcpy (&dev->mode, &conn->modes[mode], sizeof (dev->mode));
dev->width = conn->modes[mode].hdisplay;
dev->height = conn->modes[mode].vdisplay;
fprintf (stderr, "mode for connector %u is %ux%u\n",
conn->connector_id, dev->width, dev->height);
/* find a crtc for this connector */
ret = modeset_find_crtc (fd, res, conn, dev);
if (ret) {
fprintf (stderr, "no valid crtc for connector %u\n",
conn->connector_id);
return ret;
}
/* create a framebuffer for this CRTC */
ret = modeset_create_fb (fd, dev);
if (ret) {
fprintf (stderr, "cannot create framebuffer for connector %u\n",
conn->connector_id);
return ret;
}
return 0;
}
static int
modeset_find_crtc (int fd, drmModeRes * res, drmModeConnector * conn,
struct modeset_dev *dev)
{
drmModeEncoder *enc;
unsigned int i, j;
int32_t crtc;
struct modeset_dev *iter;
/* first try the currently conected encoder+crtc */
if (conn->encoder_id)
enc = drmModeGetEncoder (fd, conn->encoder_id);
else
enc = NULL;
if (enc) {
if (enc->crtc_id) {
crtc = enc->crtc_id;
for (iter = modeset_list; iter; iter = iter->next) {
if (iter->crtc == crtc) {
crtc = -1;
break;
}
}
if (crtc >= 0) {
drmModeFreeEncoder (enc);
dev->crtc = crtc;
return 0;
}
}
drmModeFreeEncoder (enc);
}
/* If the connector is not currently bound to an encoder or if the
* encoder+crtc is already used by another connector (actually unlikely
* but lets be safe), iterate all other available encoders to find a
* matching CRTC. */
for (i = 0; i < conn->count_encoders; ++i) {
enc = drmModeGetEncoder (fd, conn->encoders[i]);
if (!enc) {
fprintf (stderr, "cannot retrieve encoder %u:%u (%d): %m\n",
i, conn->encoders[i], errno);
continue;
}
/* iterate all global CRTCs */
for (j = 0; j < res->count_crtcs; ++j) {
/* check whether this CRTC works with the encoder */
if (!(enc->possible_crtcs & (1 << j)))
continue;
/* check that no other device already uses this CRTC */
crtc = res->crtcs[j];
for (iter = modeset_list; iter; iter = iter->next) {
if (iter->crtc == crtc) {
crtc = -1;
break;
}
}
/* we have found a CRTC, so save it and return */
if (crtc >= 0) {
drmModeFreeEncoder (enc);
dev->crtc = crtc;
return 0;
}
}
drmModeFreeEncoder (enc);
}
fprintf (stderr, "cannot find suitable CRTC for connector %u\n",
conn->connector_id);
return -ENOENT;
}
static int
modeset_create_fb (int fd, struct modeset_dev *dev)
{
struct drm_mode_create_dumb creq;
struct drm_mode_destroy_dumb dreq;
struct drm_mode_map_dumb mreq;
int ret;
/* create dumb buffer */
memset (&creq, 0, sizeof (creq));
creq.width = dev->width;
creq.height = dev->height;
creq.bpp = 32;
ret = drmIoctl (fd, DRM_IOCTL_MODE_CREATE_DUMB, &creq);
if (ret < 0) {
fprintf (stderr, "cannot create dumb buffer (%d): %m\n", errno);
return -errno;
}
dev->stride = creq.pitch;
dev->size = creq.size;
dev->handle = creq.handle;
/* create framebuffer object for the dumb-buffer */
ret = drmModeAddFB (fd, dev->width, dev->height, 24, 32, dev->stride,
dev->handle, &dev->fb);
if (ret) {
fprintf (stderr, "cannot create framebuffer (%d): %m\n", errno);
ret = -errno;
goto err_destroy;
}
/* prepare buffer for memory mapping */
memset (&mreq, 0, sizeof (mreq));
mreq.handle = dev->handle;
ret = drmIoctl (fd, DRM_IOCTL_MODE_MAP_DUMB, &mreq);
if (ret) {
fprintf (stderr, "cannot map dumb buffer (%d): %m\n", errno);
ret = -errno;
goto err_fb;
}
/* perform actual memory mapping */
dev->map = mmap (0, dev->size, PROT_READ | PROT_WRITE, MAP_SHARED,
fd, mreq.offset);
if (dev->map == MAP_FAILED) {
fprintf (stderr, "cannot mmap dumb buffer (%d): %m\n", errno);
ret = -errno;
goto err_fb;
}
/* clear the framebuffer to 0 */
memset (dev->map, 0, dev->size);
return 0;
err_fb:
drmModeRmFB (fd, dev->fb);
err_destroy:
memset (&dreq, 0, sizeof (dreq));
dreq.handle = dev->handle;
drmIoctl (fd, DRM_IOCTL_MODE_DESTROY_DUMB, &dreq);
return ret;
}
static void
modeset_draw_bgcolor (uint8_t r_p, uint8_t g_p, uint8_t b_p)
{
uint8_t r, g, b;
unsigned int j, k, off;
struct modeset_dev *iter;
srand (time (NULL));
r = r_p & 0xff;
g = g_p & 0xff;
b = b_p & 0xff;
for (iter = modeset_list; iter; iter = iter->next) {
for (j = 0; j < iter->height; ++j) {
for (k = 0; k < iter->width; ++k) {
off = iter->stride * j + k * 4;
*(uint32_t *) & iter->map[off] = (r << 16) | (g << 8) | b;
}
}
}
}
static void
modeset_cleanup (int fd)
{
struct modeset_dev *iter;
struct drm_mode_destroy_dumb dreq;
while (modeset_list) {
/* remove from global list */
iter = modeset_list;
modeset_list = iter->next;
/* restore saved CRTC configuration */
drmModeSetCrtc (fd,
iter->saved_crtc->crtc_id,
iter->saved_crtc->buffer_id,
iter->saved_crtc->x,
iter->saved_crtc->y,
&iter->conn, 1,
&iter->saved_crtc->mode);
drmModeFreeCrtc (iter->saved_crtc);
/* unmap buffer */
munmap (iter->map, iter->size);
/* delete framebuffer */
drmModeRmFB (fd, iter->fb);
/* delete dumb buffer */
memset (&dreq, 0, sizeof (dreq));
dreq.handle = iter->handle;
drmIoctl (fd, DRM_IOCTL_MODE_DESTROY_DUMB, &dreq);
/* free allocated memory */
free (iter);
}
}
//-------------------------------
// Draw function
static void
splash_draw_image_for_modeset (struct modeset_dev *iter,
int x,
int y,
int img_width,
int img_height,
int img_bytes_per_pixel,
uint8_t * rle_data)
{
uint8_t *p = rle_data;
int dx = 0, dy = 0, total_len;
unsigned int len;
unsigned int off;
total_len = img_width * img_height * img_bytes_per_pixel;
while ((p - rle_data) < total_len) {
len = *(p++);
if (len & 128) {
len -= 128;
if (len == 0) break;
do {
if (img_bytes_per_pixel < 4 || *(p + 3)) {
off = iter->stride * (y + dy) + (x + dx) * 4;
*(uint32_t *) & iter->map[off] =
(*(p) << 16) | (*(p + 1) << 8) | *(p + 2);
}
if (++dx >= img_width) {
dx = 0;
dy++;
}
} while (--len && (p - rle_data) < total_len);
p += img_bytes_per_pixel;
}
else {
if (len == 0) break;
do {
if (img_bytes_per_pixel < 4 || *(p + 3)) {
off = iter->stride * (y + dy) + (x + dx) * 4;
*(uint32_t *) & iter->map[off] =
(*(p) << 16) | (*(p + 1) << 8) | *(p + 2);
}
if (++dx >= img_width) {
dx = 0;
dy++;
}
p += img_bytes_per_pixel;
} while (--len && (p - rle_data) < total_len);
}
}
}
static void
splash_draw_image_center (void)
{
struct modeset_dev *iter;
int img_width, img_height, img_bytes_per_pixel;
uint8_t *rle_data;
int x, y;
for (iter = modeset_list; iter; iter = iter->next) {
if (iter->width >= iter->height) {
/* Default mode is landscape, ie. use image with no rotation */
img_width = SPLASH_IMG_WIDTH;
img_height = SPLASH_IMG_HEIGHT;
img_bytes_per_pixel = SPLASH_IMG_BYTES_PER_PIXEL;
rle_data = SPLASH_IMG_RLE_PIXEL_DATA;
} else {
/* Else portrait, ie. use image with 90 degree rotation */
img_width = SPLASH_IMG_ROT_WIDTH;
img_height = SPLASH_IMG_ROT_HEIGHT;
img_bytes_per_pixel = SPLASH_IMG_ROT_BYTES_PER_PIXEL;
rle_data = SPLASH_IMG_ROT_RLE_PIXEL_DATA;
}
x = (iter->width - img_width) / 2;
y = (iter->height - img_height) / 2;
splash_draw_image_for_modeset (iter, x, y, img_width, img_height,
img_bytes_per_pixel, rle_data);
}
}
//-------------------------------
// Exit function
void
splash_exit (int signum)
{
modeset_cleanup (drm_fd);
close(pipe_fd);
}
//-------------------------------
// fifo processing message
static int
parse_command (char *string, int length)
{
char *command;
//int parsed=0;
//parsed = strlen(string)+1;
fprintf(stderr, "got cmd %s", string);
if (strcmp(string,"QUIT") == 0)
return 1;
command = strtok(string," ");
if (!strcmp(command,"PROGRESS")) {
//psplash_draw_progress (fb, atoi(strtok(NULL,"\0")));
}
else if (!strcmp(command,"MSG")) {
//psplash_draw_msg (fb, strtok(NULL,"\0"));
}
else if (!strcmp(command,"QUIT")) {
return 1;
}
return 0;
}
void
splash_processing ()
{
int err;
ssize_t length = 0;
fd_set descriptors;
struct timeval tv;
char *end;
char command[2048];
int timeout = 2; //2 sec
tv.tv_sec = timeout;
tv.tv_usec = 0;
FD_ZERO(&descriptors);
FD_SET(pipe_fd, &descriptors);
end = command;
if (wait > 0)
timeout = 0;
while (1) {
if (timeout != 0)
err = select(pipe_fd+1, &descriptors, NULL, NULL, &tv);
else
err = select(pipe_fd+1, &descriptors, NULL, NULL, NULL);
if (err <= 0) {
return;
}
length += read (pipe_fd, end, sizeof(command) - (end - command));
if (length == 0) {
/* Reopen to see if there's anything more for us */
close(pipe_fd);
pipe_fd = open(SPLASH_FIFO,O_RDONLY|O_NONBLOCK);
goto out;
}
if (command[length-1] == '\0') {
fprintf(stderr, "1 %m\n");
if (parse_command(command, strlen(command)))
return;
length = 0;
}
else if (command[length-1] == '\n') {
command[length-1] = '\0';
if (parse_command(command, strlen(command)))
return;
length = 0;
}
out:
end = &command[length];
tv.tv_sec = timeout;
tv.tv_usec = 0;
FD_ZERO(&descriptors);
FD_SET(pipe_fd,&descriptors);
}
return;
}
//-------------------------------
// Main function
int
main (int argc, char **argv)
{
int ret;
const char *card;
struct modeset_dev *iter;
char *tmpdir;
/* check which DRM device to open */
//if (argc > 1)
// card = argv[1];
//else
card = "/dev/dri/card0";
fprintf (stderr, "using card '%s'\n", card);
wait = 0;
if (argc > 1) {
if ( !strncasecmp(argv[1], "-w",2) ||
!strncasecmp(argv[1], "--wait", 6) ) {
fprintf (stderr, "Wait until we are stopped via %s\n"
"echo QUIT > %s",
SPLASH_FIFO, SPLASH_FIFO);
wait = 1;
}
else {
fprintf (stderr, "%s [-w|--wait]\n", argv[0]);
wait = 1;
}
}
//set signal
signal(SIGHUP, splash_exit);
signal(SIGINT, splash_exit);
signal(SIGQUIT, splash_exit);
//open fifo for receiving command
tmpdir = getenv("TMPDIR");
if (!tmpdir)
tmpdir = "/tmp";
chdir(tmpdir);
if (mkfifo(SPLASH_FIFO, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP)) {
if (errno != EEXIST) {
perror("mkfifo");
exit(-1);
}
}
pipe_fd = open (SPLASH_FIFO,O_RDONLY|O_NONBLOCK);
if (-1 == pipe_fd) {
perror("pipe open");
exit(-2);
}
/* open the DRM device */
ret = modeset_open (&drm_fd, card);
if (ret)
goto out_return;
/* prepare all connectors and CRTCs */
ret = modeset_prepare (drm_fd);
if (ret)
goto out_close;
/* perform actual modesetting on each found connector+CRTC */
for (iter = modeset_list; iter; iter = iter->next) {
iter->saved_crtc = drmModeGetCrtc (drm_fd, iter->crtc);
ret = drmModeSetCrtc (drm_fd, iter->crtc, iter->fb, 0, 0,
&iter->conn, 1, &iter->mode);
if (ret)
fprintf (stderr, "cannot set CRTC for connector %u (%d): %m\n",
iter->conn, errno);
}
/* draw some colors for 5seconds */
modeset_draw_bgcolor (0xFF, 0xFF, 0xFF);
splash_draw_image_center ();
splash_processing ();
/* cleanup everything */
modeset_cleanup (drm_fd);
close(pipe_fd);
ret = 0;
out_close:
close (drm_fd);
close(pipe_fd);
out_return:
if (ret) {
errno = -ret;
fprintf (stderr, "modeset failed with error %d: %m\n", errno);
}
else {
fprintf (stderr, "exiting\n");
}
close(pipe_fd);
return ret;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,55 @@
#!/bin/sh
while [[ $# > 1 ]]
do
key="$1"
shift
case $key in
quit)
echo "QUIT" > /tmp/splash_fifo
;;
update)
;;
show-splash)
;;
hide-splash)
;;
*)
# unknown option
;;
esac
done
#help)
# #This help message
#debug)
# #Enable verbose debug logging
#get-splash-plugin-path)
# #Get directory where splash plugins are installed
#newroot)
# #Tell boot daemon that new root filesystem is mounted
#quit)
# #Tell boot daemon to quit
#ping)
# #Check of boot daemon is running
#has-active-vt)
# #Check if boot daemon has an active vt
#sysinit)
# #Tell boot daemon root filesystem is mounted read-write
#show-splash)
# #Show splash screen
#hide-splash)
# #Hide splash screen
#ask-for-password)
# #Ask user for password
#ignore-keystroke)
# #Remove sensitivity to a keystroke
#update)
# #Tell boot daemon an update about boot progress
#details)
# #Tell boot daemon there were errors during boot
#wait)
# #Wait for boot daemon to quit

View File

@ -0,0 +1,9 @@
#!/bin/sh
PSPLASH_PID=`pidof psplash-drm`
if [[ ! -z $PSPLASH_PID ]]; then
echo -n "Stop psplash: "
echo QUIT > /tmp/splash_fifo
#kill -9 $PSPLASH_PID
echo "done."
fi

View File

@ -0,0 +1,12 @@
[Unit]
Description=Starts Psplash Boot screen
#Wants=systemd-remount-fs.service
#After=systemd-vconsole-setup.service systemd-udev-trigger.service systemd-udevd.service
After=systemd-remount-fs.service
DefaultDependencies=no
[Service]
ExecStart=/usr/bin/psplash-drm -w
[Install]
WantedBy=local-fs.target

View File

@ -0,0 +1,11 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append = " \
file://0001-logind.conf-ignore-the-poweroff-key.patch \
file://coredump-custom.conf \
"
do_install_append() {
install -d ${D}${sysconfdir}/systemd/coredump.conf.d/
install -m 644 ${WORKDIR}/coredump-custom.conf ${D}${sysconfdir}/systemd/coredump.conf.d/
}

View File

@ -0,0 +1,30 @@
From c110910b5077ff992c0c0ef1838d5fc91875b197 Mon Sep 17 00:00:00 2001
From: Christophe Priouzeau <christophe.priouzeau@st.com>
Date: Fri, 8 Jun 2018 10:45:27 +0200
Subject: [PATCH 2/2] logind.conf: ignore the poweroff key
For test usage, on stm32mp157c board,
the poweroff key must be ignored due to the
double functionality of the button: wape-up and
poweroff.
Signed-off-by: Christophe Priouzeau <christophe.priouzeau@st.com>
---
src/login/logind.conf.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/login/logind.conf.in b/src/login/logind.conf.in
index 6f720b7..85d3719 100644
--- a/src/login/logind.conf.in
+++ b/src/login/logind.conf.in
@@ -18,6 +18,7 @@
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
+HandlePowerKey=ignore
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
--
2.7.4

View File

@ -0,0 +1,3 @@
[Coredump]
Storage=external

View File

@ -0,0 +1,67 @@
# Copyright (C) 2018, STMicroelectronics - All Rights Reserved
# Released under the MIT license (see COPYING.MIT for the terms)
DESCRIPTION = "Mount partitions"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
RDEPENDS_${PN} += " util-linux "
MOUNT_BASENAME = "mount-partitions"
SRC_URI = " \
file://${MOUNT_BASENAME}.service \
file://${MOUNT_BASENAME}.sh \
"
inherit systemd update-rc.d
INITSCRIPT_NAME = "${MOUNT_BASENAME}.sh"
INITSCRIPT_PARAMS = "start 22 5 3 ."
SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
SYSTEMD_SERVICE_${PN} = "${MOUNT_BASENAME}.service"
SYSTEMD_AUTO_ENABLE_${PN} = "enable"
# This list should be set with partition label and associated mountpoint
# <partition_label1>;<partition_mountpoint1> <partition_label2>;<partition_mountpoint2>
MOUNT_PARTITIONS_LIST ?= ""
do_install() {
if [ -n "${MOUNT_PARTITIONS_LIST} " ] ; then
for part in ${MOUNT_PARTITIONS_LIST}
do
part_label=$(echo ${part} | cut -d',' -f1)
mountpoint=$(echo ${part} | cut -d',' -f2)
# Check that list is properly feed
[ -z "${part_label}" ] && bbfatal "MOUNT_PARTITIONS_LIST parsing error: ${part} does not contain partition label"
[ -z "${mountpoint}" ] && bbfatal "MOUNT_PARTITIONS_LIST parsing error: ${part} does not contain partition mountpoint"
done
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${systemd_unitdir}/system ${D}/${base_sbindir}
install -m 644 ${WORKDIR}/${MOUNT_BASENAME}.service ${D}/${systemd_unitdir}/system
install -m 755 ${WORKDIR}/${MOUNT_BASENAME}.sh ${D}/${base_sbindir}/
# Update script
sed 's:^MOUNT_PARTITIONS_LIST=.*$:MOUNT_PARTITIONS_LIST=\"'"${MOUNT_PARTITIONS_LIST}"'\":' -i ${D}/${base_sbindir}/${MOUNT_BASENAME}.sh
# Update service
for part in ${MOUNT_PARTITIONS_LIST}
do
mountpoint=$(echo ${part} | cut -d',' -f2)
# Append line with mountpoint
sed '/^ConditionPathExists=##mountpoint##/ i ConditionPathExists='"${mountpoint}"'' -i ${D}/${systemd_unitdir}/system/${MOUNT_BASENAME}.service
done
# Clean pattern insertion
sed 's/^ConditionPathExists=##mountpoint##//' -i ${D}/${systemd_unitdir}/system/${MOUNT_BASENAME}.service
fi
install -d ${D}/${INIT_D_DIR}
install -m 755 ${WORKDIR}/${MOUNT_BASENAME}.sh ${D}/${INIT_D_DIR}/
# Update script
sed 's:^MOUNT_PARTITIONS_LIST=.*$:MOUNT_PARTITIONS_LIST=\"'"${MOUNT_PARTITIONS_LIST}"'\":' -i ${D}/${INIT_D_DIR}/${MOUNT_BASENAME}.sh
else
bbfatal "Please set MOUNT_PARTITIONS_LIST with expected partition labels and mount point."
fi
}
FILES_${PN} += " ${systemd_unitdir} ${base_sbindir} ${INIT_D_DIR}"

View File

@ -0,0 +1,16 @@
[Unit]
Description=Mount partitions
DefaultDependencies=false
Before=local-fs.target
ConditionPathExists=##mountpoint##
[Service]
Type=oneshot
RemainAfterExit=Yes
StandardOutput=syslog
TimeoutSec=0
ExecStart=-/sbin/mount-partitions.sh start
ExecStop=/sbin/mount-partitions.sh stop
[Install]
WantedBy=local-fs.target

View File

@ -0,0 +1,128 @@
#!/bin/sh -
#===============================================================================
#
# FILE: mount-partitions.sh
#
# USAGE: ./mount-partitions.sh [start|stop]
#
# DESCRIPTION: mount partitions
# ORGANIZATION: STMicroelectronics
# COPYRIGHT: Copyright (C) 2018, STMicroelectronics - All Rights Reserved
# CREATED: 01/09/2018 13:36
# REVISION: ---
#===============================================================================
MOUNT_PARTITIONS_LIST=""
get_type() {
local __resultvar=$1
ROOT_TYPE="unknown"
if [ -f /usr/bin/findmnt ];
then
ROOT_DEVICE=$(findmnt --noheadings --output=SOURCE / | cut -d'[' -f1)
case $ROOT_DEVICE in
ubi*)
ROOT_TYPE="nand"
;;
/dev/mmcblk0*)
ROOT_TYPE="sdmmc"
;;
/dev/mmcblk1*)
ROOT_TYPE="mmc"
;;
esac
else
if [ `cat /proc/cmdline | sed "s/.*mmcblk0.*/mmcblk0/" ` == "mmcblk0" ]; then
ROOT_TYPE="sdmmc"
elif [ `cat /proc/cmdline | sed "s/.*mmcblk1.*/mmcblk1/" ` == "mmcblk1" ]; then
ROOT_TYPE="mmc"
elif [ `cat /proc/cmdline | sed "s/.*ubi0.*/ubi0/" ` == "ubi0" ]; then
ROOT_TYPE="nand"
fi
fi
eval $__resultvar="'$ROOT_TYPE'"
}
found_devices() {
local __resultvar=$1
local __resultopt=$2
local _type=$3
local _search=$4
local _device="unknown"
local _option=" "
case $_type in
nand)
for f in ubi0_0 ubi0_1 ubi0_2 ubi0_3;
do
if [ -r /sys/class/ubi/$f ];
then
cat /sys/class/ubi/$f/name | grep -sq $_search
if [ $? -eq 0 ];
then
_device="/dev/$f"
_option="-t ubifs"
break;
fi
fi
done
;;
sdmmc)
for f in 1 2 3 4 5 6 7 8 9 10;
do
if [ -r /sys/block/mmcblk0/mmcblk0p$f/uevent ];
then
cat /sys/block/mmcblk0/mmcblk0p$f/uevent | grep PARTNAME | sed "s/PARTNAME=//" | grep -sq $_search
if [ $? -eq 0 ];
then
_device="/dev/mmcblk0p$f"
break;
fi
fi
done
;;
mmc)
for f in 1 2 3 4 5 6 7 8 9 10;
do
if [ -r /sys/block/mmcblk1/mmcblk1p$f/uevent ];
then
cat /sys/block/mmcblk1/mmcblk1p$f/uevent | grep PARTNAME | sed "s/PARTNAME=//" | grep -sq $_search
if [ $? -eq 0 ];
then
_device="/dev/mmcblk1p$f"
break;
fi
fi
done
;;
esac
eval $__resultvar="'$_device'"
eval $__resultopt="'$_option'"
}
case "$1" in
start)
# mount partitions
get_type TYPE
echo "TYPE of support detected: $TYPE"
for part in $MOUNT_PARTITIONS_LIST
do
part_label=$(echo $part | cut -d',' -f1)
mountpoint=$(echo $part | cut -d',' -f2)
found_devices DEVICE DEVICE_OPTION $TYPE $part_label
echo "$part_label device: $DEVICE"
[ -e $DEVICE ] && mount $DEVICE_OPTION $DEVICE $mountpoint
done
;;
stop)
# umount partitions
for part in $MOUNT_PARTITIONS_LIST
do
mountpoint=$(echo $part | cut -d',' -f2)
umount $mountpoint
done
;;
*)
echo "Usage: $0 [start|stop]"
;;
esac

View File

@ -0,0 +1,40 @@
# Copyright (C) 2017, STMicroelectronics - All Rights Reserved
# Released under the MIT license (see COPYING.MIT for the terms)
DESCRIPTION = "Basic networkd configuration"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
DEPENDS = "systemd"
SRC_URI = " \
file://50-wired.network.all \
file://50-wired.network.nfs \
file://51-wireless.network.sample \
\
file://verify_eth0.sh \
file://st-check-nfs.service \
"
inherit systemd
SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}"
SYSTEMD_SERVICE_${PN} = "st-check-nfs.service"
SYSTEMD_AUTO_ENABLE_${PN} = "enable"
do_install() {
install -d ${D}${systemd_unitdir}/network
install -m 644 ${WORKDIR}/50-wired.network.all ${D}${systemd_unitdir}/network
install -m 644 ${WORKDIR}/50-wired.network.nfs ${D}${systemd_unitdir}/network
install -m 644 ${WORKDIR}/51-wireless.network.sample ${D}${systemd_unitdir}/network
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${systemd_unitdir}/system
install -m 644 ${WORKDIR}/st-check-nfs.service ${D}${systemd_unitdir}/system
fi
install -d ${D}${base_sbindir}/
install -m 755 ${WORKDIR}/verify_eth0.sh ${D}${base_sbindir}/verify_eth0.sh
}
FILES_${PN} = "${systemd_unitdir}/network ${systemd_unitdir}/system ${base_sbindir}"

View File

@ -0,0 +1,5 @@
[Match]
Name=eth*
[Network]
DHCP=ipv4

View File

@ -0,0 +1,5 @@
[Match]
Name=eth[1-9]
[Network]
DHCP=ipv4

View File

@ -0,0 +1,30 @@
[Match]
Name=wlan*
[Network]
DHCP=ipv4
# Documentation to activate manually wireless interface
# 1. generate the specific wpa_supplicant file
# mkdir -p /etc/wpa_supplicant/
# echo "ctrl_interface=/var/run/wpa_supplicant" > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
# echo "eapol_version=1" >> /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
# echo "ap_scan=1" >> /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
# echo "fast_reauth=1" >> /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
# echo "" >> /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
# wpa_passphrase SSID_OF_NETWORK PASSWORD_OF_NETWORK >> /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
# or
# wpa_passphrase ssid_of_network >> /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
# 2. put in place network configuration
# rename file 51-wireless.network.sample to 51-wireless.network on /usr/lib/systemd/network/
# 3. restart/start service
# systemctl enable systemd-networkd.service
# systemctl enable wpa_supplicant@wlan0.service
# systemctl restart systemd-networkd.service
# systemctl restart wpa_supplicant@wlan0.service
# info:
# How to list SSID available
# ifconfig wlan0 up
# iw dev wlan0 scan | grep SSID
# or
# iwlist wlan0 scanning | grep ESSID

View File

@ -0,0 +1,10 @@
[Unit]
Description=ST Verify if eth0 network interface are already configured
Before=systemd-networkd.service
After=network-pre.target
[Service]
ExecStart=/sbin/verify_eth0.sh
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,36 @@
#!/bin/sh -
#===============================================================================
#
# FILE: verify_eth0.sh
#
# USAGE: ./verify_eth0.sh
#
# DESCRIPTION: this script verify if the eth0 interface are already UP and
# have an ip address
#
# ORGANIZATION: STMicroelectronics
# COPYRIGHT: Copyright (C) 2017, STMicroelectronics - All Rights Reserved
# CREATED: 11/04/17 11:21
# REVISION: ---
#===============================================================================
set -o nounset # Treat unset variables as an error
INTERFACE=eth0
INTERFACE_UP=`ifconfig $INTERFACE | grep UP | wc -l`
INTERFACE_IP_ADDRESS=$(ifconfig $INTERFACE | awk '/inet addr/{print substr($2,6)}')
if [ $INTERFACE_UP -eq 1 ];
then
if [ -n $INTERFACE_IP_ADDRESS ];
then
cp -f /lib/systemd/network/50-wired.network.nfs /lib/systemd/network/50-wired.network
else
cp -f /lib/systemd/network/50-wired.network.all /lib/systemd/network/50-wired.network
fi
else
cp -f /lib/systemd/network/50-wired.network.all /lib/systemd/network/50-wired.network
fi
systemctl restart systemd-networkd

View File

@ -0,0 +1 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

View File

@ -0,0 +1,37 @@
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Serial Getty on %I
Documentation=man:agetty(8) man:systemd-getty-generator(8)
Documentation=http://0pointer.de/blog/projects/serial-console.html
BindsTo=dev-%i.device
After=systemd-user-sessions.service plymouth-quit-wait.service
After=rc-local.service
# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes
[Service]
Environment="TERM=xterm"
ExecStart=-/sbin/agetty -8 --autologin root -L %I @BAUDRATE@ $TERM
Type=idle
Restart=always
RestartSec=0
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
KillMode=process
IgnoreSIGPIPE=no
SendSIGHUP=yes
[Install]
WantedBy=getty.target

View File

@ -0,0 +1,36 @@
PACKAGECONFIG = " \
${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux usrmerge', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
acl \
backlight \
binfmt \
firstboot \
gshadow \
hibernate \
hostnamed \
ima \
kmod \
localed \
logind \
machined \
myhostname \
networkd \
nss \
polkit \
quotacheck \
randomseed \
resolved \
smack \
sysusers \
timedated \
timesyncd \
utmp \
vconsole \
xz \
coredump \
"
do_install_append() {
#Remove this service useless for our needs
rm -f ${D}/${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator
}

View File

@ -0,0 +1,19 @@
SUMMARY = "LSB support to check gpu provider"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
# need lsb_release
RDEPENDS_${PN} += "lsb"
PV="1.0"
do_install() {
if [ "${TARGET_ARCH}" = "arm" ]; then
mkdir -p ${D}${sysconfdir}/lsb-release.d
touch ${D}${sysconfdir}/lsb-release.d/graphics-${PV}
printf "LIBGLES1=${PREFERRED_PROVIDER_virtual/libgles1}\n" > ${D}${sysconfdir}/lsb-release.d/graphics-${PV}
fi
}
ALLOW_EMPTY_${PN} = "1"

View File

@ -0,0 +1,4 @@
PACKAGECONFIG = " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'egl glesv2', '', d)} \
"

View File

@ -0,0 +1,30 @@
From 9b4875dee576dbfe28a46881a8dc1eb16c39c4cd Mon Sep 17 00:00:00 2001
From: Philippe Cornu <philippe.cornu@st.com>
Date: Tue, 18 Dec 2018 15:15:46 +0100
Subject: [PATCH] fix gbm_bo_map detection
The HAVE_GBM_BO_MAP flag was not created as a #define macro
for the source code.
Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
---
configure.ac | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index c7f621f..47b9beb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,7 +49,8 @@ if test "x$HAVE_GST" = "xyes"; then
fi
AM_CONDITIONAL(ENABLE_GST, [test "x$HAVE_GST" = "xyes"])
-AC_CHECK_LIB([gbm], [gbm_bo_map], [HAVE_GBM_BO_MAP=yes], [])
+AC_CHECK_LIB([gbm], [gbm_bo_map], [HAVE_GBM_BO_MAP=yes
+ AC_DEFINE([HAVE_GBM_BO_MAP], 1)], [])
AM_CONDITIONAL(ENABLE_GBM_MAP, [test "x$HAVE_GBM_BO_MAP" = "xyes"])
AC_CONFIG_FILES([Makefile])
--
2.7.4

View File

@ -0,0 +1,3 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append += " file://0001-fix-gbm_bo_map-detection.patch "

View File

@ -0,0 +1,24 @@
From ed54c23781f8a0c363650ecb1649a2a0fae88ddd Mon Sep 17 00:00:00 2001
From: Christophe Priouzeau <christophe.priouzeau@st.com>
Date: Fri, 25 Aug 2017 10:01:33 +0200
Subject: [PATCH] stop splash screen
---
systemd/lxdm.service | 1 +
1 file changed, 1 insertion(+)
diff --git a/systemd/lxdm.service b/systemd/lxdm.service
index bf4a0a8..f924229 100644
--- a/systemd/lxdm.service
+++ b/systemd/lxdm.service
@@ -4,6 +4,7 @@ Conflicts=getty@tty1.service plymouth-quit.service
After=systemd-user-sessions.service getty@tty1.service plymouth-quit.service
[Service]
+ExecStartPre=-/usr/bin/psplash-drm-quit
ExecStart=/usr/sbin/lxdm
Restart=always
IgnoreSIGPIPE=no
--
2.7.4

View File

@ -0,0 +1,24 @@
From e47ba37dc7ee1119a05b3d130d6c556e3575f5cb Mon Sep 17 00:00:00 2001
From: Christophe Priouzeau <christophe.priouzeau@st.com>
Date: Fri, 25 Aug 2017 12:22:24 +0200
Subject: [PATCH] use openbox as default session
---
data/lxdm.conf | 1 +
1 file changed, 1 insertion(+)
diff --git a/data/lxdm.conf.in b/data/lxdm.conf.in
index da36f3f..fe4b535 100644
--- a/data/lxdm.conf.in
+++ b/data/lxdm.conf.in
@@ -8,6 +8,7 @@
## default session or desktop used when no systemwide config
# session=/usr/bin/startlxde
+session=/usr/bin/openbox-session
## uncomment and set to set numlock on your keyboard
# numlock=0
--
2.7.4

View File

@ -0,0 +1,6 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI =+ " \
file://0001-stop-splash-screen.patch \
file://0001-use-openbox-as-default-session.patch"

View File

@ -0,0 +1,43 @@
From cae18dad41f11683aa8c99d6e884b3d59a6e6739 Mon Sep 17 00:00:00 2001
From: Mickael Reulier <mickael.reulier@st.com>
Date: Wed, 22 Mar 2017 13:52:49 +0100
Subject: [PATCH] linux-dmabuf: Add support for YUV Full color range
Add new flag yuv_full_color_range to dmabuf protocol for
YUV components color range.
If set, components are in full color range.
If not set, components are in limited color range.
Change-Id: Id4589f050d83d00298a834c444b01a13365ae6f2
Signed-off-by: Mickael Reulier <mickael.reulier@st.com>
---
unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml b/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml
index 3b4861f..9f3df6e 100644
--- a/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml
+++ b/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml
@@ -185,6 +185,8 @@
<entry name="y_invert" value="1" summary="contents are y-inverted"/>
<entry name="interlaced" value="2" summary="content is interlaced"/>
<entry name="bottom_first" value="4" summary="bottom field first"/>
+ <entry name="yuv_full_color_range" value="8"
+ summary="For YUV buffers, components are in full color range"/>
</enum>
<request name="create">
@@ -210,6 +212,10 @@
'bottom_first' is specified. It is undefined whether 'bottom_first'
is ignored if 'interlaced' is not set.
+ Flag 'yuv_full_color_range' specifies YUV components color range.
+ If set, components are in full color range.
+ If not set, components are in limited color range.
+
This protocol does not convey any information about field rate,
duration, or timing, other than the relative ordering between the
two fields in one buffer. A compositor may have to estimate the
--
1.9.1

View File

@ -0,0 +1,4 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-linux-dmabuf-Add-support-for-YUV-Full-color-range.patch"

View File

@ -0,0 +1,70 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " \
file://weston.ini \
file://utilities-terminal.png \
file://ST_1366x768.png \
file://ST13028_Linux_picto_11_1366x768.png \
file://ST13345_Products_light_blue_24x24.png \
file://space.png \
file://weston.sh \
file://weston_profile.sh \
file://README-CHECK-GPU \
"
SRC_URI_append_stm32mpcommon = " file://check-gpu "
FILES_${PN} += " ${datadir}/weston \
${systemd_system_unitdir}/weston.service \
${sbindir}/weston.sh \
${sysconfdir}/etc/profile.d \
${sysconfdir}/xdg/weston/weston.ini \
/home/root \
"
CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini"
do_install_append() {
install -d ${D}${sysconfdir}/xdg/weston/
install -d ${D}${datadir}/weston/backgrounds
install -d ${D}${datadir}/weston/icon
install -m 0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston
install -m 0644 ${WORKDIR}/utilities-terminal.png ${D}${datadir}/weston/icon/utilities-terminal.png
install -m 0644 ${WORKDIR}/ST13345_Products_light_blue_24x24.png ${D}${datadir}/weston/icon/ST13345_Products_light_blue_24x24.png
install -m 0644 ${WORKDIR}/ST_1366x768.png ${D}${datadir}/weston/backgrounds/ST_1366x768.png
install -m 0644 ${WORKDIR}/ST13028_Linux_picto_11_1366x768.png ${D}${datadir}/weston/backgrounds/ST13028_Linux_picto_11_1366x768.png
install -m 0644 ${WORKDIR}/space.png ${D}${datadir}/weston/icon/
install -d ${D}${systemd_system_unitdir} ${D}${sbindir}
install -m 0755 ${WORKDIR}/weston.sh ${D}${sbindir}/
# install -d ${D}/etc/systemd/system/ ${D}/etc/systemd/system/multi-user.target.wants/
# ln -s /lib/systemd/system/weston.service ${D}/etc/systemd/system/multi-user.target.wants/display-manager.service
install -d ${D}${sysconfdir}/profile.d
install -m 0755 ${WORKDIR}/weston_profile.sh ${D}${sysconfdir}/profile.d/
if ${@bb.utils.contains('DISTRO_FEATURES','xwayland','true','false',d)}; then
# uncomment modules line for support of xwayland
sed -i -e 's,#modules=xwayland.so,modules=xwayland.so,g' ${D}${sysconfdir}/xdg/weston/weston.ini
fi
# check GPU
install -d ${D}/home/root/
install -m 644 ${WORKDIR}/README-CHECK-GPU ${D}/home/root/
if ! test -f ${D}${base_sbindir}/check-gpu; then
install -d ${D}${base_sbindir}
echo '#!/bin/sh' > ${WORKDIR}/check-gpu.empty
echo '/bin/true' >> ${WORKDIR}/check-gpu.empty
install -m 755 ${WORKDIR}/check-gpu.empty ${D}${base_sbindir}/check-gpu
fi
}
do_install_append_stm32mpcommon() {
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${base_sbindir}
install -m 755 ${WORKDIR}/check-gpu ${D}${base_sbindir}
fi
}

View File

@ -0,0 +1,9 @@
Check GPU
=========
GPU can be deactivated by fuse or not present in some SOC
So in case the GPU is not present, you must configure weston on pix-man by creating this file :
/etc/default/weston with this content :
OPTARGS=--use-pixman

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -0,0 +1,84 @@
#!/bin/sh -
#===============================================================================
#
# FILE: system-generator-check-gpu
#
# DESCRIPTION: The goal are to detect if the gpu are present/loaded or not
# ORGANIZATION: STMicroelectronics
# COPYRIGHT: Copyright (C) 2018, STMicroelectronics - All Rights Reserved
#===============================================================================
check_dt_status() {
gcnano_dir=$(ls /proc/device-tree/soc/ | grep gpu)
if [ ! -d /proc/device-tree/soc/$gcnano_dir ];
then
echo "Gcnano in /proc/device-tree/soc/ is not available" > /dev/kmsg
exit 1
else
if $(grep -q "okay" /proc/device-tree/soc/$gcnano_dir/status); then
gcnano_status="okay"
fi
fi
}
check_load_module() {
local _timeout=0
while [ -z "$(cat /proc/modules | grep galcore)" ]; do
sleep 1
_timeout=$(($_timeout+1))
if [ "$_timeout" -eq "10" ]; then
echo "Time out check load galcore module expired" > /dev/kmsg
break
fi
done
galcore_module=$(cat /proc/modules | grep galcore)
}
check_devices() {
local _timeout=0
while [ -z "$(ls -l /dev/ | grep galcore)" ]; do
sleep 1
_timeout=$(($_timeout+1))
if [ "$_timeout" -eq "10" ]; then
echo "Time out check galcore device expired" > /dev/kmsg
break
fi
done
galcore_device=$(ls -l /dev/ | grep galcore)
}
#
# Main
#
gcnano_status="disabled"
galcore_module=""
galcore_device=""
check_dt_status
check_load_module
check_devices
if [ "$gcnano_status" = "okay" ] && [ -n "$galcore_module" ] && [ -n "$galcore_device" ];
then
echo "Gcnano is present and activated" > /dev/kmsg
if [ -f /etc/default/weston ] && $(grep -q "Autogenerated" /etc/default/weston) ;
then
sed -i "s/OPTARGS=--use-pixman/#OPTARGS=--use-pixman/g" /etc/default/weston
sed -i "/#Autogenerated/d" /etc/default/weston
fi
else
if [ -f /etc/default/weston ] && $(grep -q "Autogenerated" /etc/default/weston) ;
then
echo "Weston already configured on pixman" > /dev/kmsg
else
echo "Configure weston on pixman" > /dev/kmsg
echo "#Autogenerated" > /etc/default/weston
echo "OPTARGS=--use-pixman" >> /etc/default/weston
fi
fi
dri_device=$(ls -l /dev/ | grep dri)
if [ -z "$dri_device" ];
then
exit 1
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 961 B

View File

@ -0,0 +1,3 @@
#OPTARGS="--log=/tmp/weston.log --use-pixman "
#OPTARGS="--log=/tmp/weston.log "
OPTARGS=

View File

@ -0,0 +1,85 @@
#!/bin/sh
# Copyright (C) 2016 O.S. Systems Software LTDA.
# Copyright (C) 2016 Freescale Semiconductor
export PATH="/sbin:/usr/sbin:/bin:/usr/bin"
usage() {
cat <<EOF
$0 [<openvt arguments>] [-- <weston options>]
EOF
}
## Module support
modules_dir=@DATADIR@/weston-start
start_application_dir=@DATADIR@/weston-start-at-startup
start_local_application_dir=/usr/local/weston-start-at-startup
# Add weston extra argument
add_weston_argument() {
weston_args="$weston_args $1"
}
# Add openvt extra argument
add_openvt_argument() {
openvt_args="$openvt_args $1"
}
if [ -n "$WAYLAND_DISPLAY" ]; then
echo "ERROR: A Wayland compositor is already running, nested Weston instance is not supported yet."
exit 1
fi
if [ -n "$DISPLAY" ]; then
launcher="weston"
else
launcher="weston-launch --"
fi
openvt_args="-s"
while [ -n "$1" ]; do
if [ "$1" = "--" ]; then
shift
break
fi
openvt_args="$openvt_args $1"
shift
done
weston_args=$*
# Load and run modules
if [ -d "$modules_dir" ]; then
for m in "$modules_dir"/*; do
# Skip backup files
if [ "`echo $m | sed -e 's/\~$//'`" != "$m" ]; then
continue
fi
# process module
. $m
done
fi
if test -z "$XDG_RUNTIME_DIR"; then
export XDG_RUNTIME_DIR=/run/user/`id -u`
if ! test -d "$XDG_RUNTIME_DIR"; then
mkdir --parents $XDG_RUNTIME_DIR
chmod 0700 $XDG_RUNTIME_DIR
fi
fi
# Load and run application at startup
if [ -d "$start_application_dir" ]; then
for m in "$start_application_dir"/*; do
(sleep 5 && $m)&
done
fi
if [ -d "$start_local_application_dir" ]; then
for m in "$start_local_application_dir"/*; do
(sleep 5 && $m)&
done
fi
exec openvt $openvt_args -- $launcher $weston_args --log=@LOCALSTATEDIR@/log/weston.log

View File

@ -0,0 +1,85 @@
[core]
#modules=cms-colord.so
shell=desktop-shell.so
backend=drm-backend.so
idle-time=0
repaint-window=100
require-input=false
[keyboard]
keymap_layout=us
[shell]
background-image=/usr/share/weston/backgrounds/ST13028_Linux_picto_11_1366x768.png
background-color=0xff002244
background-type=scale-crop
clock-format=minutes
panel-color=0x90a1a1a1
panel-position=bottom
locking=false
animation=none
startup-animation=none
close-animation=none
focus-animation=none
binding-modifier=ctrl
#num-workspaces=6
#cursor-theme=whiteglass
#cursor-size=24
#lockscreen-icon=/usr/share/icons/gnome/256x256/actions/lock.png
#lockscreen=/usr/share/backgrounds/gnome/Garden.jpg
#homescreen=/usr/share/backgrounds/gnome/Blinds.jpg
[launcher]
icon=/usr/share/weston/icon/utilities-terminal.png
path=/usr/bin/weston-terminal
[launcher]
icon=/usr/share/weston/icon/space.png
path=/bin/true
[launcher]
icon=/usr/share/weston/icon_flower.png
path=/usr/bin/weston-flower
[launcher]
icon=/usr/share/weston/icon/space.png
path=/bin/true
[launcher]
icon=/usr/share/weston/icon/ST13345_Products_light_blue_24x24.png
path=/usr/local/demo/demo_launcher.py
[launcher]
icon=/usr/share/weston/icon/space.png
path=/bin/true
[input-method]
path=/usr/libexec/weston-keyboard
# HDMI connector
# If the hdmi cable is plugged, weston uses the hdmi output (else dsi output).
# Use the command "systemctl restart weston" after pluging/unpluging the hdmi cable.
[output]
name=HDMI-A-1
mode=1280x720
# DSI connector
[output]
name=DSI-1
mode=preferred
transform=270
#[libinput]
#enable_tap=true
#[touchpad]
#constant_accel_factor = 50
#min_accel_factor = 0.16
#max_accel_factor = 1.0
[screen-share]
command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize
#[xwayland]
#path=/usr/bin/Xwayland

View File

@ -0,0 +1,20 @@
[Unit]
Description=Weston Wayland Compositor
RequiresMountsFor=/run
After=pulsesaudio.service
[Service]
User=root
EnvironmentFile=-/etc/default/weston
Environment="XDG_RUNTIME_DIR=/run/user/root"
ExecStartPre=/bin/mkdir -p /run/user/root
ExecStartPre=/bin/chmod 0700 /run/user/root
ExecStartPre=/sbin/check-gpu
ExecStartPre=-/usr/bin/psplash-drm-quit
ExecStart=/usr/bin/weston-start -v -e -- $OPTARGS
Restart=on-success
RestartSec=10
[Install]
Alias=display-manager.service
WantedBy=multi-user.target

View File

@ -0,0 +1,139 @@
#!/bin/sh
# Weston
#uncomment some part of the following line if you like:
# - see the weston log
# LOG_FILE: file on which the log are writed
# - use a software compositor instead of egl compositor
# USE_PIXMAN: populate the variable to use the software compositor on
# weston
# - add some new option to weston application
# ST_WESTON_ADDONS
# - debug weston via openvt
# DEBUG_OPENGL_VIA_OPENVT: file on which the all stdout, sdterr trace
# are stocked
#LOG_FILE=/tmp/weston.log
#USE_PIXMAN=1
#ST_WESTON_ADDONS
#DEBUG_OPENGL_VIA_OPENVT=/tmp/opengl.log
mkdir -p $XDG_RUNTIME_DIR
chmod 0700 $XDG_RUNTIME_DIR
# psplash management
case "$1" in
start)
PSPLASH_PID=`pgrep psplash`
if [ ! -z $PSPLASH_PID ]; then
echo -n "Stop psplash: "
/usr/bin/psplash-write QUIT
#kill -9 $PSPLASH_PID
echo "done."
fi
PSPLASH_PID=`pgrep psplash-drm`
if [ ! -z $PSPLASH_PID ]; then
echo -n "Stop psplash: "
echo QUIT > /tmp/splash_fifo
#kill -9 $PSPLASH_PID
echo "done."
fi
;;
*)
;;
esac
#log file managment on weston CMD line
CMD_LINE_WESTON=""
if [ -z $LOG_FILE ];
then
CMD_LINE_WESTON=" "
else
if [ -f $LOG_FILE ]; then
rm $LOG_FILE
fi
CMD_LINE_WESTON="--log=$LOG_FILE"
fi
if [ -z "$ST_WESTON_IDLE_TIME" ];
then
ST_WESTON_IDLE_TIME=648000
fi
#compositor managment on CMD line
if [ -z $USE_PIXMAN ];
then
echo "";
else
CMD_LINE_WESTON="$CMD_LINE_WESTON --use-pixman"
fi
#Addons paramaters
if [ -n $ST_WESTON_ADDONS ];
then
CMD_LINE_WESTON="$CMD_LINE_WESTON $ST_WESTON_ADDONS"
fi
# See how we were called.
case "$1" in
start)
if [ ! -z $LOG_FILE ];
then
echo "[SERVICE] start.........." >> $LOG_FILE
fi
echo "Starting Weston"
if [ -n "$DEBUG_OPENGL_VIA_OPENVT" ];
then
echo "[DEBUG] use script /tmp/launch_basic_weston.sh"
echo "[DEBUG] output saved on file $DEBUG_OPENGL_VIA_OPENVT"
#generate a wrapper script to launch weston
cat > /tmp/launch_basic_weston.sh << EOF
/usr/bin/weston $CMD_LINE_WESTON 2>&1 > $DEBUG_OPENGL_VIA_OPENVT
EOF
chmod +x /tmp/launch_basic_weston.sh
openvt -s -w -- /tmp/launch_basic_weston.sh
else
echo "/usr/bin/weston $CMD_LINE_WESTON"
openvt -s -w -- /usr/bin/weston $CMD_LINE_WESTON
# weston --tty=1 $CMD_LINE_WESTON
fi
;;
stop)
echo "Stopping Weston"
if [ ! -z $LOG_FILE ];
then
echo "[SERVICE] stop.........." >> $LOG_FILE
fi
pid_weston=`pidof weston`
kill -9 $pid_weston
;;
status)
if pidof weston >/dev/null
then
echo "Weston: running"
echo "CMDLINE of weston:"
echo " /usr/bin/weston $CMD_LINE_WESTON"
else
echo "Weston: not running"
exit 3
fi
exit 0
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: weston.sh {start|stop|status|restart}"
exit 1
;;
esac
exit 0

View File

@ -0,0 +1,13 @@
export XDG_RUNTIME_DIR=/run/user/root
export QT_QPA_PLATFORM=wayland
export ELM_ENGINE=wayland_shm
export ECORE_EVAS_ENGINE=wayland_shm
export ECORE_EVAS_ENGINE=wayland_shm
export GDK_BACKEND=wayland
mkdir --parents $XDG_RUNTIME_DIR
chmod 0700 $XDG_RUNTIME_DIR

View File

@ -0,0 +1,11 @@
[Unit]
Description=Xserver startup without a display manager
[Service]
EnvironmentFile=/etc/default/xserver-nodm
User=@USER@
ExecStartPre=-/usr/bin/psplash-drm-quit
ExecStart=/etc/xserver-nodm/Xserver
[Install]
Alias=display-manager.service

View File

@ -0,0 +1 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

View File

@ -0,0 +1,40 @@
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
if [ -f /usr/bin/matchbox-window-manager ]; then
exec matchbox-window-manager -use_titlebar no
fi
#for xfce
#exec startxfce4

View File

@ -0,0 +1,8 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += " file://xinitrc "
do_install_append() {
install -d ${D}/etc/X11/xinit
install -m 0644 ${WORKDIR}/xinitrc ${D}/etc/X11/xinit/xinitrc
}

View File

@ -0,0 +1,164 @@
From d5fb6dddf7d2748593b9b06a0a5fa1b4e258aafe Mon Sep 17 00:00:00 2001
From: Fabien Dessenne <fabien.dessenne@st.com>
Date: Fri, 5 Sep 2014 12:00:59 +0200
Subject: [PATCH] NV12 format support
Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
---
pixman/pixman-access.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
pixman/pixman.c | 3 ++-
pixman/pixman.h | 4 ++-
3 files changed, 85 insertions(+), 3 deletions(-)
diff --git a/pixman/pixman-access.c b/pixman/pixman-access.c
index 4f0642d..3da3fb3 100644
--- a/pixman/pixman-access.c
+++ b/pixman/pixman-access.c
@@ -803,6 +803,46 @@ fetch_scanline_yv12 (bits_image_t *image,
}
}
+static void
+fetch_scanline_nv12 (bits_image_t *image,
+ int x,
+ int line,
+ int width,
+ uint32_t * buffer,
+ const uint32_t *mask)
+{
+ uint8_t *bits = (uint8_t *) image->bits;
+ int stride = image->rowstride * sizeof (uint32_t);
+ int offset_uv = stride * image->height;
+ uint8_t *y_line, *uv_line;
+ int i;
+
+ y_line = bits + (stride * line);
+ uv_line = bits + offset_uv + (stride * (line >>1));
+
+ for (i = 0; i < width; i++)
+ {
+ int16_t y, u, v;
+ int32_t r, g, b;
+
+ y = *(y_line + x + i) - 16;
+ u = *(uv_line + ((x + i) & ~1)) - 128;
+ v = *(uv_line + ((x + i) & ~1) + 1) - 128;
+
+ /* R = 1.164(Y - 16) + 1.596(V - 128) */
+ r = 0x012b27 * y + 0x019a2e * v;
+ /* G = 1.164(Y - 16) - 0.813(V - 128) - 0.391(U - 128) */
+ g = 0x012b27 * y - 0x00d0f2 * v - 0x00647e * u;
+ /* B = 1.164(Y - 16) + 2.018(U - 128) */
+ b = 0x012b27 * y + 0x0206a2 * u;
+
+ *buffer++ = 0xff000000 |
+ (r >= 0 ? r < 0x1000000 ? r & 0xff0000 : 0xff0000 : 0) |
+ (g >= 0 ? g < 0x1000000 ? (g >> 8) & 0x00ff00 : 0x00ff00 : 0) |
+ (b >= 0 ? b < 0x1000000 ? (b >> 16) & 0x0000ff : 0x0000ff : 0);
+ }
+}
+
/**************************** Pixel wise fetching *****************************/
static argb_t
@@ -960,6 +1000,40 @@ fetch_pixel_yv12 (bits_image_t *image,
(b >= 0 ? b < 0x1000000 ? (b >> 16) & 0x0000ff : 0x0000ff : 0);
}
+static uint32_t
+fetch_pixel_nv12 (bits_image_t *image,
+ int offset,
+ int line)
+{
+ uint8_t *bits = (uint8_t *) image->bits;
+ int stride = image->rowstride * sizeof (uint32_t);
+ int offset_uv = stride * image->height;
+ uint8_t *y_bits, *uv_bits;
+ int16_t y, u, v;
+ int32_t r, g, b;
+
+ y_bits = bits + (stride * line) + offset;
+ uv_bits = bits + offset_uv + (stride * (line >>1)) + (offset & ~1);
+
+ y = *y_bits - 16;
+ u = *uv_bits- 128;
+ v = *(uv_bits + 1) - 128;
+
+ /* R = 1.164(Y - 16) + 1.596(V - 128) */
+ r = 0x012b27 * y + 0x019a2e * v;
+
+ /* G = 1.164(Y - 16) - 0.813(V - 128) - 0.391(U - 128) */
+ g = 0x012b27 * y - 0x00d0f2 * v - 0x00647e * u;
+
+ /* B = 1.164(Y - 16) + 2.018(U - 128) */
+ b = 0x012b27 * y + 0x0206a2 * u;
+
+ return 0xff000000 |
+ (r >= 0 ? r < 0x1000000 ? r & 0xff0000 : 0xff0000 : 0) |
+ (g >= 0 ? g < 0x1000000 ? (g >> 8) & 0x00ff00 : 0x00ff00 : 0) |
+ (b >= 0 ? b < 0x1000000 ? (b >> 16) & 0x0000ff : 0x0000ff : 0);
+}
+
/*********************************** Store ************************************/
static void
@@ -1382,7 +1456,12 @@ static const format_info_t accessors[] =
fetch_scanline_yv12, fetch_scanline_generic_float,
fetch_pixel_yv12, fetch_pixel_generic_float,
NULL, NULL },
-
+
+ { PIXMAN_nv12,
+ fetch_scanline_nv12, fetch_scanline_generic_float,
+ fetch_pixel_nv12, fetch_pixel_generic_float,
+ NULL, NULL },
+
{ PIXMAN_null },
};
diff --git a/pixman/pixman.c b/pixman/pixman.c
index 9555cea..4dc91bb 100644
--- a/pixman/pixman.c
+++ b/pixman/pixman.c
@@ -1072,6 +1072,7 @@ pixman_format_supported_source (pixman_format_code_t format)
/* YUV formats */
case PIXMAN_yuy2:
case PIXMAN_yv12:
+ case PIXMAN_nv12:
return TRUE;
default:
@@ -1094,7 +1095,7 @@ PIXMAN_EXPORT pixman_bool_t
pixman_format_supported_destination (pixman_format_code_t format)
{
/* YUV formats cannot be written to at the moment */
- if (format == PIXMAN_yuy2 || format == PIXMAN_yv12)
+ if (format == PIXMAN_yuy2 || format == PIXMAN_yv12 || format == PIXMAN_nv12)
return FALSE;
return pixman_format_supported_source (format);
diff --git a/pixman/pixman.h b/pixman/pixman.h
index 509ba5e..b6e3fb5 100644
--- a/pixman/pixman.h
+++ b/pixman/pixman.h
@@ -678,6 +678,7 @@ struct pixman_indexed
#define PIXMAN_TYPE_BGRA 8
#define PIXMAN_TYPE_RGBA 9
#define PIXMAN_TYPE_ARGB_SRGB 10
+#define PIXMAN_TYPE_NV12 11
#define PIXMAN_FORMAT_COLOR(f) \
(PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_ARGB || \
@@ -753,7 +754,8 @@ typedef enum {
/* YUV formats */
PIXMAN_yuy2 = PIXMAN_FORMAT(16,PIXMAN_TYPE_YUY2,0,0,0,0),
- PIXMAN_yv12 = PIXMAN_FORMAT(12,PIXMAN_TYPE_YV12,0,0,0,0)
+ PIXMAN_yv12 = PIXMAN_FORMAT(12,PIXMAN_TYPE_YV12,0,0,0,0),
+ PIXMAN_nv12 = PIXMAN_FORMAT(12,PIXMAN_TYPE_NV12,0,0,0,0)
} pixman_format_code_t;
/* Querying supported format values. */
--
1.9.1

View File

@ -0,0 +1,4 @@
# look for files in the layer first
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://0001-NV12-format-support.patch"

View File

@ -0,0 +1,56 @@
From 8c3e0ef9625066c2bb67ee3d2b8cd37fd44eadac Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Fri, 29 Aug 2014 18:58:56 +0300
Subject: [PATCH] alsactl: don't let systemd unit restore the volume when
asound.state is missing
This avoids an error on bootup
Filed as https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5459
Upstream-Status: Pending
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Rebased on 1.1.0.
Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
---
alsactl/Makefile.am | 7 ++++---
alsactl/alsa-restore.service.in | 1 +
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am
index cac8094..ff865dc 100644
--- a/alsactl/Makefile.am
+++ b/alsactl/Makefile.am
@@ -38,9 +38,10 @@ install-data-hook:
endif
edit = \
- $(SED) -r -e 's,@sbindir\@,$(sbindir),g' \
- -e 's,@mydatadir\@,$(mydatadir),g' \
- -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
+ $(SED) -e 's,@localstatedir\@,$(localstatedir),g' \
+ -e 's,@sbindir\@,$(sbindir),g' \
+ -e 's,@mydatadir\@,$(mydatadir),g' \
+ -e 's,@daemonswitch\@,$(ALSACTL_DAEMONSWITCH),g' \
< $< > $@ || rm $@
alsa-state.service: alsa-state.service.in
diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
index 2884098..bac3ccc 100644
--- a/alsactl/alsa-restore.service.in
+++ b/alsactl/alsa-restore.service.in
@@ -8,6 +8,7 @@ Description=Save/Restore Sound Card State
ConditionPathExists=!@daemonswitch@
ConditionPathExistsGlob=/dev/snd/control*
After=alsa-state.service
+ConditionPathExists=@localstatedir@/lib/alsa/asound.state
[Service]
Type=oneshot
--
2.7.0.rc3

View File

@ -0,0 +1,8 @@
PACKAGECONFIG = "udev bat"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
do_add_audio_sample_files() {
cp ${S}/speaker-test/samples/Side_Left.wav ${S}/speaker-test/samples/Channel_12.wav
cp ${S}/speaker-test/samples/Side_Right.wav ${S}/speaker-test/samples/Channel_13.wav
}
addtask add_audio_sample_files after do_unpack before do_patch

View File

@ -0,0 +1,88 @@
From 3fa21bc5ce32120e4fb488471b23b973cc21161b Mon Sep 17 00:00:00 2001
From: Hugues Fruchet <hugues.fruchet@st.com>
Date: Mon, 10 Dec 2018 15:28:20 +0100
Subject: [PATCH] Description: Fix SIGBUS on armhf when compiled with binutils
2.29 In binutils 2.29, the behavior of the ADR instruction changed so that 1
is added to the address of a Thumb function (previously nothing was added).
This allows the loaded address to be passed to a BLX instruction and the
correct mode change will occur. . So that the behavior matches in binutils
2.29 and pre-2.29: - Use .eqv to clear the function attribute from a symbol
- This allows us to always add 1 to the symbol when in Thumb mode and get the
correct result. . See:
https://sourceware.org/bugzilla/show_bug.cgi?id=21458 Thanks to Jiong Wang
for original idea to solve this.
Author: James Cowgill <jcowgill@debian.org>
Bug: https://trac.ffmpeg.org/ticket/6571
Bug-Debian: https://bugs.debian.org/870622
---
gst-libs/ext/libav/libavcodec/arm/h264idct_neon.S | 25 +++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/gst-libs/ext/libav/libavcodec/arm/h264idct_neon.S b/gst-libs/ext/libav/libavcodec/arm/h264idct_neon.S
index 4f68bdb..1857582 100644
--- a/gst-libs/ext/libav/libavcodec/arm/h264idct_neon.S
+++ b/gst-libs/ext/libav/libavcodec/arm/h264idct_neon.S
@@ -20,6 +20,15 @@
#include "libavutil/arm/asm.S"
+# These .eqv clear the function attribute allowing the +CONFIG_THUMB hack to
+# work on old and new binutils.
+#
+# See: https://sourceware.org/bugzilla/show_bug.cgi?id=21458
+.eqv wfa_ff_h264_idct_add_neon, X(ff_h264_idct_add_neon)
+.eqv wfa_ff_h264_idct_dc_add_neon, X(ff_h264_idct_dc_add_neon)
+.eqv wfa_ff_h264_idct8_add_neon, X(ff_h264_idct8_add_neon)
+.eqv wfa_ff_h264_idct8_dc_add_neon, X(ff_h264_idct8_dc_add_neon)
+
function ff_h264_idct_add_neon, export=1
vld1.64 {d0-d3}, [r1,:128]
vmov.i16 q15, #0
@@ -113,8 +122,8 @@ function ff_h264_idct_add16_neon, export=1
movne lr, #0
cmp lr, #0
ite ne
- adrne lr, X(ff_h264_idct_dc_add_neon) + CONFIG_THUMB
- adreq lr, X(ff_h264_idct_add_neon) + CONFIG_THUMB
+ adrne lr, wfa_ff_h264_idct_dc_add_neon + CONFIG_THUMB
+ adreq lr, wfa_ff_h264_idct_add_neon + CONFIG_THUMB
blx lr
2: subs ip, ip, #1
add r1, r1, #32
@@ -138,8 +147,8 @@ function ff_h264_idct_add16intra_neon, export=1
cmp r8, #0
ldrsh r8, [r1]
iteet ne
- adrne lr, X(ff_h264_idct_add_neon) + CONFIG_THUMB
- adreq lr, X(ff_h264_idct_dc_add_neon) + CONFIG_THUMB
+ adrne lr, wfa_ff_h264_idct_add_neon + CONFIG_THUMB
+ adreq lr, wfa_ff_h264_idct_dc_add_neon + CONFIG_THUMB
cmpeq r8, #0
blxne lr
subs ip, ip, #1
@@ -166,8 +175,8 @@ function ff_h264_idct_add8_neon, export=1
cmp r8, #0
ldrsh r8, [r1]
iteet ne
- adrne lr, X(ff_h264_idct_add_neon) + CONFIG_THUMB
- adreq lr, X(ff_h264_idct_dc_add_neon) + CONFIG_THUMB
+ adrne lr, wfa_ff_h264_idct_add_neon + CONFIG_THUMB
+ adreq lr, wfa_ff_h264_idct_dc_add_neon + CONFIG_THUMB
cmpeq r8, #0
blxne lr
add r12, r12, #1
@@ -388,8 +397,8 @@ function ff_h264_idct8_add4_neon, export=1
movne lr, #0
cmp lr, #0
ite ne
- adrne lr, X(ff_h264_idct8_dc_add_neon) + CONFIG_THUMB
- adreq lr, X(ff_h264_idct8_add_neon) + CONFIG_THUMB
+ adrne lr, wfa_ff_h264_idct8_dc_add_neon + CONFIG_THUMB
+ adreq lr, wfa_ff_h264_idct8_add_neon + CONFIG_THUMB
blx lr
2: subs r12, r12, #4
add r1, r1, #128
--
2.7.4

View File

@ -0,0 +1,35 @@
From 0eb1e0643aac0f428985dc5e431bb3843963b1ad Mon Sep 17 00:00:00 2001
From: Hugues Fruchet <hugues.fruchet@st.com>
Date: Wed, 12 Dec 2018 18:30:58 +0100
Subject: [PATCH 2/2] gstreamer1.0-libav: disable decoder direct rendering by
default
DMA-buf 0-copy path and direct-rendering mode are not yet compatible
because of stride and offset issues.
Nevertheless performances are better than with direct-rendering enabled
and virtual memory path.
This fix is required to reach 30fps on display driver side
with 30fps VGA video content.
Signed-off-by: Hugues Fruchet <hugues.fruchet@st.com>
---
ext/libav/gstavviddec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ext/libav/gstavviddec.c b/ext/libav/gstavviddec.c
index d3830dd..40aa0a2 100644
--- a/ext/libav/gstavviddec.c
+++ b/ext/libav/gstavviddec.c
@@ -44,7 +44,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE);
#define DEFAULT_LOWRES 0
#define DEFAULT_SKIPFRAME 0
-#define DEFAULT_DIRECT_RENDERING TRUE
+#define DEFAULT_DIRECT_RENDERING FALSE
#define DEFAULT_DEBUG_MV FALSE
#define DEFAULT_MAX_THREADS 0
#define DEFAULT_OUTPUT_CORRUPT TRUE
--
2.7.4

Some files were not shown because too many files have changed in this diff Show More