From patchwork Tue Oct 3 21:15:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ryan Eatmon X-Patchwork-Id: 31647 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B95BE8FDBA for ; Tue, 3 Oct 2023 21:15:12 +0000 (UTC) Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by mx.groups.io with SMTP id smtpd.web11.2456.1696367710840308334 for ; Tue, 03 Oct 2023 14:15:11 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@ti.com header.s=ti-com-17Q1 header.b=GHk5vwrp; spf=pass (domain: ti.com, ip: 198.47.23.248, mailfrom: reatmon@ti.com) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 393LF98n118108; Tue, 3 Oct 2023 16:15:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1696367709; bh=vMpN2AiK22HfN3e1ap6dozIDBk9g2NGGHv5j9o2F4wc=; h=From:To:Subject:Date; b=GHk5vwrpa1yrcrUPBf7G0cZBXoXjqVVa2mxHR1WSKbRakkj/SSm3+6oNO3MTCCNLE R/8Ph1v1OAHqGlZJGgZOO2PA1aBqxIW520GhoAlyjctyatqJETSuDl4gDsXVA80+l7 BsJfer7bCzNJy004ACrNJO1D353AexmpkTbZuYeg= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 393LF9eK099221 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 3 Oct 2023 16:15:09 -0500 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 3 Oct 2023 16:15:08 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 3 Oct 2023 16:15:08 -0500 Received: from uda0214219 (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 393LF8gd039969; Tue, 3 Oct 2023 16:15:08 -0500 Received: from reatmon by uda0214219 with local (Exim 4.90_1) (envelope-from ) id 1qnmjU-0002Sb-IA; Tue, 03 Oct 2023 16:15:08 -0500 From: Ryan Eatmon To: Praneeth Bajjuri , Denys Dmytriyenko , Subject: [meta-arago][master/kirkstone][PATCH] tisdk-sw-manifest: Switch up the TI software manifest creation Date: Tue, 3 Oct 2023 16:15:08 -0500 Message-ID: <20231003211508.9405-1-reatmon@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-MIME-Autoconverted: from 8bit to quoted-printable by lelv0143.ext.ti.com id 393LF98n118108 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 03 Oct 2023 21:15:12 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arago/message/14913 We have been seeing an odd pseudo bug related to how the TI software manifest was being created. Prior to this change we needed to run the SDK installer in order to get some of the packages that needed to be included in the manifest. But installing the toolchain would randomly cause a pseudo abort error. This change has the part of the manifest that is needed from the toolchains to be created at the same time as the toolchain. Then the software manifest can just include those sections without needing to run the installer. Signed-off-by: Ryan Eatmon --- .../classes/tisdk-bundle.bbclass | 562 +--------------- .../classes/tisdk-sw-manifest.bbclass | 602 ++++++++++++++++++ .../recipes-core/meta/meta-toolchain-arago.bb | 3 + 3 files changed, 606 insertions(+), 561 deletions(-) create mode 100644 meta-arago-distro/classes/tisdk-sw-manifest.bbclass diff --git a/meta-arago-distro/classes/tisdk-bundle.bbclass b/meta-arago-distro/classes/tisdk-bundle.bbclass index 1ebdb6fb..193181be 100644 --- a/meta-arago-distro/classes/tisdk-bundle.bbclass +++ b/meta-arago-distro/classes/tisdk-bundle.bbclass @@ -1,6 +1,7 @@ inherit rootfs_ipk inherit image inherit image_types +inherit tisdk-sw-manifest # This defines the list of features that we want to include in the SDK # image. The list of packages this will be installed for each features @@ -72,13 +73,6 @@ DEPLOY_SPL_UART_NAME ?= "u-boot-spl.bin-${MACHINE}" # Variable to specify the name of the TI SCI firmware DEPLOY_TISCI_FW_NAME ?= "" -# Manifest file location which will be created as part of the image build -# process. -# This manifest follows the TI manifest format requirements which is why -# it differs from some of the default manifest code in oe-core. -SW_MANIFEST_FILE ?= "${IMAGE_ROOTFS}/manifest/software_manifest.htm" -SW_MANIFEST_TEXT ?= "${IMAGE_ROOTFS}/manifest/software_manifest.txt" - # helper function for generating a set of strings based on a list. Taken # from the image.bbclass. def string_set(iterable): @@ -114,553 +108,6 @@ cleanup_host_packages() { fi } -# Generate the header for a TI style software manifest -sw_manifest_header() { -echo " - - - -${MACHINE} TISDK ${SDK_VERSION} Installation Summary - - - -

${MACHINE} TISDK ${SDK_VERSION} Software Manifest

-

`date +"%B %d, %Y"`

-

Legend (explanation of the fields in the Manifest Table below)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Software NameThe name of the application or files
VersionVersion of the application or files
License TypeType of license(s) under which TI will be providing software to the licensee (e.g. BSD, GPLv2, TI TSPA License, TI Commercial License). See Open Source Reference License Disclaimer in the Disclaimers Section.
LocationThe directory name and path on the media (or in an archive) where the Package is located.
Delivered AsThis field will either be “Source”, “Binary” or “Source and Binary“ and is the form the content of the Package is delivered in. If the Package is delivered in an archive format, this field applies to the contents of the archive. If the word Limited is used with Source, as in “Limited Source” or “Limited Source and Binary” then only portions of the Source for the application are provided.
Modified by TIThis field will either be “Yes” or “No”. A “Yes” means TI had made changes to the Software. A “No” means TI has not made any changes. NOTE: This field is not applicable for Software “Obtained from” TI.
Obtained fromThis field specifies from where or from whom TI obtained the Software. It may be a URL to an Open Source site, a 3rd party companylicensor, or TI (if TI developed the software). If this field contains a link to an Open Source software, the date it was downloaded is also recorded. See Links Disclaimer in the Disclaimers Section.
- - -

DISCLAIMERS

-

Export Control Classification Number (ECCN)

-

-Any use of ECCNs listed in the Manifest is at the user's risk and without recourse to TI. Your company, as the exporter of record, is responsible for determining the correct classification of any item at the time of export. Any export classification by TI of Software is for TI's internal use only and shall not be construed as a representation or warranty regarding the proper export classification for such Software or whether an export license or other documentation is required for exporting such Software. -

- -

Links in the Manifest

-

-Any links appearing on this Manifest (for example in the “Obtained from” field) were verified at the time the Manifest was created. TI makes no guarantee that any listed links will remain active in the future. -

- -

Open Source License References

-

-Your company is responsible for confirming the applicable license terms for any open source Software listed in this Manifest that was not “Obtained from” TI. Any open source license specified in this Manifest for Sotware that was not “Obtained from” TI is for TI's internal use only and shall not be construed as a representation of warranty regarding the proper open source license terms for such Software. -

- -

Export Information

-

-ECCN for Software included in this release: Publicly Available -

- -

-ECCN for Technology (e.g., user documentation, specifications) included in this release: Publicly Available -

- -

Manifest

-

-See Legend above for a description of the columns and possible values. -

-" > ${SW_MANIFEST_FILE} - -cat > ${SW_MANIFEST_TEXT} << 'EOF' -<-- -Manifest template 1.0 - -This template is used to generate an unloadable manifest to the SRAS. To do so, save the document as a plain text file (Save As .txt). Do not change any options on the save which means leave the default as Windows Default Encoding. The SRAS will generate a nice looking HTML manifest for you. - -Instructions: - - 1. Text in blue should not be edited or removed. It will NOT appear on your manifest. - 2. DO NOT color outside the lines in the manifest. There are specific blocks where you enter information. Information - should only be entered in the sections below and not outside of them. - 3. DO NOT use the < or > symbols in your manifest table or in your footnotes. - 4. Please REFRAIN from using Word specific formatting when filling in the table. Examples are things like superscripts, - subscripts, etc. We are unable to understand those. - 5. Auto correction is not your friend in word. Please turn it off. It should be disabled already in this template. - -Table Instructions: - -Define what you are delivering by filling in the table below. Tables start with the start keyword end with the end keyword,
and may also contain footnotes specific to that table. - -You can have as many .Public. tables as you like in your manifest and can name them. You can have one and only one .Private. table. To create additional tables copy everything starting with down to
and then paste it after the table below. - -The field .attribute =. can be set to Public (the default) or Private to define the type of table it is. If the table is Public then everything in the table will appear on your manifest. If the table is Private then none of the entries will appear on your manifest but they will be stored in the SRAS. Private tables are useful for documenting third party code, that requires Legal review, but does not need to be acknowledged on the manifest you ship; e.g. it may be covered by our TI license. - -The field .name = . is used to put a heading over the table on the manifest you ship. - -The field .description =. is used to put a description under the Table name on the manifest you ship. - -To learn how to document software in the table read the instructions here. A brief explanation of the table columns follows. -License Type - If its an SPDX defined license use their short name identifier. You can see a list here: http://spdx.org/licenses/ . If it.s not on the list and not a commercial or TSPA license then use the application name as the license. - -Delivered As - This field will either be .Source., .Binary. or .Source and Binary. and is the form the content of the Software is delivered in. If the Software is delivered in an archive format, this field applies to the contents of the archive. If the word Limited is used with Source, as in .Limited Source. or .Limited Source and Binary. then only portions of the Source for the application are provided. - -Modified by TI - This field will either be .Yes. or .No.. A .Yes. means TI has made changes to the Software. A .No. means TI has not made any changes. Note: This field is not applicable for Software .Obtained from. TI. - -Location - The directory name and path on the media, e.g. drive, (or in an archive) where the Software is located after installing or extracting. - -Obtained From - This field specifies from where or from whom TI obtained the Software. It may be a URL to an Open Source site, a 3rd party licensor, or TI (if TI developed the software). If this field contains a link to Open Source software, the date TI downloaded the Software is also recorded. See Links Disclaimer in the Disclaimers Section. ---> - - -Version = .1.0. -Sep = .|. -Tool=.Word. - - -<-- ** Do not edit or remove anything above this line ** ---> - -<-- -Instructions: DO NOT Alter the column headings below. This is now a single row table as opposed to the older manifests which used merged rows. The order is extremely important; if you change the order or add or remove a column the upload will not work. ---> - -EOF - -} - -sw_manifest_footer() { -echo " -

Credits

- -

Licenses

-

Licenses can be found in the \"licenses\" directory of the SDK install directory

- -

GCC RUNTIME LIBRARY EXCEPTION

-

Version 3.1, 31 March 2009

- -

Copyright © 2009 Free Software Foundation, Inc. http://fsf.org/

- -

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

- -

This GCC Runtime Library Exception ("Exception") is an additional permission under section 7 of the GNU General Public License, version 3 ("GPL-3.0"). It applies to a given file (the "Runtime Library") that bears a notice placed by the copyright holder of the file stating that the file is governed by GPL-3.0 along with this Exception.

- -

When you use GCC to compile a program, GCC may combine portions of certain GCC header files and runtime libraries with the compiled program. The purpose of this Exception is to allow compilation of non-GPL (including proprietary) programs to use, in this way, the header files and runtime libraries covered by this Exception.

- -

0. Definitions.

-

A file is an "Independent Module" if it either requires the Runtime Library for execution after a Compilation Process, or makes use of an interface provided by the Runtime Library, but is not otherwise based on the Runtime Library.

- -

"GCC" means a version of the GNU Compiler Collection, with or without modifications, governed by version 3 (or a specified later version) of the GNU General Public License (GPL) with the option of using any subsequent versions published by the FSF.

- -

"GPL-compatible Software" is software whose conditions of propagation, modification and use would permit combination with GCC in accord with the license of GCC.

- -

"GPL-compatible Software" is software whose conditions of propagation, modification and use would permit combination with GCC in accord with the license of GCC.

- -

The "Compilation Process" transforms code entirely represented in non-intermediate languages designed for human-written code, and/or in Java Virtual Machine byte code, into Target Code. Thus, for example, use of source code generators and preprocessors need not be considered part of the Compilation Process, since the Compilation Process can be understood as starting with the output of the generators or preprocessors.

- -

A Compilation Process is "Eligible" if it is done using GCC, alone or with other GPL-compatible software, or if it is done without using any work based on GCC. For example, using non-GPL-compatible Software to optimize any GCC intermediate representations would not qualify as an Eligible Compilation Process.

- -

1. Grant of Additional Permission.

-

You have permission to propagate a work of Target Code formed by combining the Runtime Library with Independent Modules, even if such propagation would otherwise violate the terms of GPL-3.0, provided that all Target Code was generated by Eligible Compilation Processes. You may then convey such a combination under terms of your choice, consistent with the licensing of the Independent Modules.

- -

2. No Weakening of GCC Copyleft.

-

The availability of this Exception does not imply any general presumption that third-party software is unaffected by the copyleft requirements of the license of GCC.

- -
- Auto generated by TISDK installer on `date` - - - -" >> ${SW_MANIFEST_FILE} - - -cat >> ${SW_MANIFEST_TEXT} << 'EOF' - - - - - - -Licenses can be found in the "licenses/" directory of the SDK install directory -GCC RUNTIME LIBRARY EXCEPTION - -Version 3.1, 31 March 2009 - -Copyright © 2009 Free Software Foundation, Inc. http://fsf.org/ - -Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - -This GCC Runtime Library Exception (Exception) is an additional permission under section 7 of the GNU General Public License, version 3 (GPL-3.0). It applies to a given file (the Runtime Library) that bears a notice placed by the copyright holder of the file stating that the file is governed by GPL-3.0 along with this Exception. - -When you use GCC to compile a program, GCC may combine portions of certain GCC header files and runtime libraries with the compiled program. The purpose of this Exception is to allow compilation of non-GPL (including proprietary) programs to use, in this way, the header files and runtime libraries covered by this Exception. -0. Definitions. - -A file is an Independent Module if it either requires the Runtime Library for execution after a Compilation Process, or makes use of an interface provided by the Runtime Library, but is not otherwise based on the Runtime Library. - -GCC means a version of the GNU Compiler Collection, with or without modifications, governed by version 3 (or a specified later version) of the GNU General Public License (GPL) with the option of using any subsequent versions published by the FSF. - -GPL-compatible Software is software whose conditions of propagation, modification and use would permit combination with GCC in accord with the license of GCC. - -GPL-compatible Software is software whose conditions of propagation, modification and use would permit combination with GCC in accord with the license of GCC. - -The Compilation Process transforms code entirely represented in non-intermediate languages designed for human-written code, and/or in Java Virtual Machine byte code, into Target Code. Thus, for example, use of source code generators and preprocessors need not be considered part of the Compilation Process, since the Compilation Process can be understood as starting with the output of the generators or preprocessors. - -A Compilation Process is Eligible if it is done using GCC, alone or with other GPL-compatible software, or if it is done without using any work based on GCC. For example, using non-GPL-compatible Software to optimize any GCC intermediate representations would not qualify as an Eligible Compilation Process. -1. Grant of Additional Permission. - -You have permission to propagate a work of Target Code formed by combining the Runtime Library with Independent Modules, even if such propagation would otherwise violate the terms of GPL-3.0, provided that all Target Code was generated by Eligible Compilation Processes. You may then convey such a combination under terms of your choice, consistent with the licensing of the Independent Modules. -2. No Weakening of GCC Copyleft. - -The availability of this Exception does not imply any general presumption that third-party software is unaffected by the copyleft requirements of the license of GCC. - - -EOF - -} - -sw_manifest_table_header() { - echo " -

$1

-

$2

-" >> ${SW_MANIFEST_FILE} - - cat >> ${SW_MANIFEST_TEXT} << EOF - - -attribute = "Public" -name = "$1" -description = "$2" - - -EOF -} - -sw_manifest_table_footer() { - if [ ! -z $1 ]; then - cat >> ${SW_MANIFEST_TEXT} << EOF - -$1 - -EOF - fi - cat >> ${SW_MANIFEST_TEXT} << EOF -
- -EOF -} - -# Create the host side toolchain components table -sw_manifest_toolchain_host() { - opkg_dir="${IMAGE_ROOTFS}/${TISDK_TOOLCHAIN_PATH}/sysroots/*86*-linux/var/lib/opkg/info" - - sw_manifest_table_header "GPL-3.0 Development Host Content" "This table describes any GPL-3.0 software being delivered that is expected to run on a Development Host, instead of the target device." - - generate_sw_manifest_table $opkg_dir "true" - - sw_manifest_table_footer - - sw_manifest_table_header "Development Host Content" "This table describes any software being delivered that is expected to run on a Development Host, instead of the target device. Some of this software may be licensed under GPL-3.0 but it is not expected to be shipped as a product." - - generate_sw_manifest_table $opkg_dir - - sw_manifest_table_footer -} - -# Create the target side toolchain components table. These are components on -# the host but intended for the target. -sw_manifest_toolchain_target() { - opkg_dir="${IMAGE_ROOTFS}/${TISDK_TOOLCHAIN_PATH}/sysroots/${ARMPKGARCH}*-linux*/var/lib/opkg/info" - - sw_manifest_table_header "GPL-3.0 Development Libraries Installed on Host" "This table describes GPL-3.0 software libraries and headers that are installed on the development host and used during the development of software to run on the target. Customers should be careful when linking against these libraries to make sure they are complying with the license(s) of the library" - - generate_sw_manifest_table $opkg_dir "true" - - sw_manifest_table_footer - - sw_manifest_table_header "Development Libraries Installed on Host" "This table describes software libraries and headers that are installed on the development host and used during the development of software to run on the target. Some of this software may be licensed under GPL-3.0. Customers should be careful when linking against these libraries to make sure they are complying with the license(s) of the library" - - generate_sw_manifest_table $opkg_dir - - sw_manifest_table_footer -} - -# Create the table of GPL-3.0 components found in the target file system -sw_manifest_target_gplv3() { - opkg_dir="$1" - - sw_manifest_table_header "GPL-3.0 Target Device Content" "This table describes any GPL-3.0 software being delivered that is expected to run on the target device." - - generate_sw_manifest_table $opkg_dir "true" - - sw_manifest_table_footer -} - -# Generate the full target file system components table. -sw_manifest_target() { - # Extract the combined set of .control files from the TARGET_IMAGES in - # the filesystem directory to generate the manifest. - for image in ${TARGET_IMAGES} - do - # Only extract tar.gz or tar.bz2 types - if [ -e ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.xz ] - then - tar xJf ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.xz -C ${IMAGE_ROOTFS}/filesystem --wildcards *.control - elif [ -e ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.gz ] - then - tar xzf ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.gz -C ${IMAGE_ROOTFS}/filesystem --wildcards *.control - fi - done - - # set the opkg_dir value to look at the extracted target file system - # image files - opkg_dir="${IMAGE_ROOTFS}/filesystem/var/lib/opkg/info" - - sw_manifest_target_gplv3 $opkg_dir - - sw_manifest_table_header "All Target Device Content" "This table describes any software being delivered that is expected to run on the target device." - - generate_sw_manifest_table $opkg_dir - - sw_manifest_table_footer - - # Remove the temporary var directory that was extracted - rm -rf ${IMAGE_ROOTFS}/filesystem/var -} - -# Create the table of host components installed. -sw_manifest_host() { - sw_manifest_table_header "Additional Development Host Content" "This table describes software that is installed on the development host but is not part of the linux-devkit package. This is usually software example sources or tools such a flash utilities." - - opkg_dir="${IMAGE_ROOTFS}/var/lib/opkg/info" - - generate_sw_manifest_table $opkg_dir - - sw_manifest_table_footer -} - -# This function expects to be passed the following parameter -# - The location to the opkg info directory containing the control files -# of the installed packages -# Optionally if the second parameter is set to true then only GPL-3.0 contents -# will be listed. This is for TI SW Manifests where GPL-3.0 content is -# highlighted as a separate table. -generate_sw_manifest_table() { - control_dir="$1" - gplv3_only="$2" - - if [ ! -d "$control_dir" ] - then - echo "Could not find the control directory ($control_dir)" - return 1 - fi - - if [ "$gplv3_only" = "" ] - then - # The second parameter was not passed so set to false - gplv3_only="false" - fi - -echo " - - - - - - - - - - -" >> ${SW_MANIFEST_FILE} - -cat >> ${SW_MANIFEST_TEXT} << EOF - - - -EOF - - control_files_there=0 - for possible_control_file in $control_dir/*.control - do - if [ -f $possible_control_file ] - then - control_files_there=1 - break - fi - done - - if [ $control_files_there -eq 0 ] - then - for pkg_idx in $control_dir/oe*; do - package_start=`grep -n "^Package" $pkg_idx || true` - - IFS_OLD=${IFS} - IFS=" -" - - begin="" - end="" - for pkg in ${package_start}; do - end=`echo $pkg | cut -d: -f1` - - if [ -z $begin ]; then - pkg_name=`echo $pkg | cut -d: -f3` - begin=`echo $pkg | cut -d: -f1` - continue - fi - cnt=$[$cnt+1] - head -n $[$end - 1] $pkg_idx | tail -n $[$end - $begin] > ${control_dir}/${pkg_name// /}.control - - pkg_name=`echo $pkg | cut -d: -f3` - begin=$end - done - if [ ! -z $end ]; then - end=`wc -l $pkg_idx | awk '{ print $1 }'` - end=$[$end + 1] - tail -n $[$end - $begin] $pkg_idx > ${control_dir}/${pkg_name// /}.control - fi - - IFS=${IFS_OLD} - done - fi - - for i in $control_dir/*.control - do - package="`cat $i | grep Package: | awk {'print $2'}`" - version="`cat $i | grep Version: | awk {'print $2'} | cut -f1-2 -d-`" - long_version="`cat $i | grep Version: | awk {'print $2'}`" - license="`cat $i | grep License: | cut -d: -f2 `" - architecture="`cat $i | grep Architecture: | awk {'print $2'}`" - sources="`cat $i | grep Source: | cut -d ':' -f2-`" - location="$package""_""$long_version""_""$architecture"".ipk" - - # Set the highlight color if the license in GPL-3.0. If this is - # a GPL-3.0 only table then skip this package. - case "$license" in - *GPL-3.0*) - highlight="bgcolor=yellow" ;; - *unknown*) - if [ "$gplv3_only" != "true" ] - then - highlight="bgcolor=yellow" - else - continue - fi - ;; - *) - if [ "$gplv3_only" != "true" ] - then - highlight="" - else - continue - fi - ;; - esac - - # source variable contains the text to be used in the manifest - source="" - # Are there additional files in the package that come from the - # arago/OE metadata? - extra_files="0" - modified="No" - for s in $sources - do - case "$s" in - file://*) - extra_files="1" - ;; - http://install.source.dir.local*) - # If we are pulling something from a local file system then - # it is not a public modification and this should be marked - # as modified. This should not be the normal case. - modified="Yes" - ;; - *) - source="$source""$s";; - esac - done - - if [ "$extra_files" = "1" ] - then - source="$source""
Files from:
https://git.yoctoproject.org/meta-arago
https://git.yoctoproject.org/meta-ti" - fi - - case "$package" in - task-*) - continue ;; - *-source*) - delivered_as="Source" - ;; - *) - delivered_as="Binary" - ;; - esac - -echo " - - - - - - - - - -" >> ${SW_MANIFEST_FILE} - -cat >> ${SW_MANIFEST_TEXT} << EOF -| ${package} | ${version} | ${license} | ${delivered_as} | ${modified} | ${location} | ${source} -EOF - done - - echo "
Software NameVersionLicenseLocationDelivered AsModified by TIObtained from
${package} ${version}${license}${location}${delivered_as}${modified}${source}


" >> ${SW_MANIFEST_FILE} - -cat >> ${SW_MANIFEST_TEXT} << EOF - - -EOF - -} -# Generate the TI SW Manifest for the SDK image -generate_sw_manifest() { - sw_manifest_header - if [ "${TISDK_TOOLCHAIN}" != "" ] - then - sw_manifest_toolchain_host - fi - sw_manifest_target - sw_manifest_host - if [ "${TISDK_TOOLCHAIN}" != "" ] - then - sw_manifest_toolchain_target - fi - sw_manifest_footer -} - ROOTFS_PREPROCESS_COMMAND += "tisdk_image_setup; " ROOTFS_POSTPROCESS_COMMAND += "tisdk_image_build; " IMAGE_PREPROCESS_COMMAND:append = "tisdk_image_cleanup; " @@ -713,9 +160,6 @@ tisdk_image_setup () { if [ -e ${SDK_DEPLOY}/${SDK_NAME}-${ARMPKGARCH}-${TARGET_OS}${TOOLCHAIN_SUFFIX}.sh ] then chmod 755 ${SDK_DEPLOY}/${SDK_NAME}-${ARMPKGARCH}-${TARGET_OS}${TOOLCHAIN_SUFFIX}.sh - - # Temporarily extract the toolchain sdk so we can read license information from it. - echo "${IMAGE_ROOTFS}/${TISDK_TOOLCHAIN_PATH}" | ${SDK_DEPLOY}/${SDK_NAME}-${ARMPKGARCH}-${TARGET_OS}${TOOLCHAIN_SUFFIX}.sh fi if [ -e ${SDK_DEPLOY}/${SDK_NAME}-${ARMPKGARCH_K3R5}-${TARGET_OS_K3R5}${TOOLCHAIN_K3R5_SUFFIX}.sh ] then @@ -861,10 +305,6 @@ tisdk_image_build () { fi generate_sw_manifest - # Delete installed toolchain sdk since we need the toolchain sdk installer - # not the extracted version - rm -rf ${IMAGE_ROOTFS}/${TISDK_TOOLCHAIN_PATH} - # Copy over Linux glibc toolchain sdk installer and give it a simple name which # matches the traditional name within the SDK. if [ -e ${SDK_DEPLOY}/${SDK_NAME}-${ARMPKGARCH}-${TARGET_OS}${TOOLCHAIN_SUFFIX}.sh ] diff --git a/meta-arago-distro/classes/tisdk-sw-manifest.bbclass b/meta-arago-distro/classes/tisdk-sw-manifest.bbclass new file mode 100644 index 00000000..c028b955 --- /dev/null +++ b/meta-arago-distro/classes/tisdk-sw-manifest.bbclass @@ -0,0 +1,602 @@ +# Manifest file location which will be created as part of the image build +# process. +# This manifest follows the TI manifest format requirements which is why +# it differs from some of the default manifest code in oe-core. +SW_MANIFEST_FILE ?= "${IMAGE_ROOTFS}/manifest/software_manifest.htm" +SW_MANIFEST_TEXT ?= "${IMAGE_ROOTFS}/manifest/software_manifest.txt" + +SW_MANIFEST_TOOLCHAIN_DIR ?= "${SDKDEPLOYDIR}/${SDK_NAME}-${ARMPKGARCH}-${TARGET_OS}${TOOLCHAIN_SUFFIX}-sw_manifest" +SW_MANIFEST_TOOLCHAIN_HOST_FILE ?= "${SW_MANIFEST_TOOLCHAIN_DIR}/host.htm" +SW_MANIFEST_TOOLCHAIN_HOST_TEXT ?= "${SW_MANIFEST_TOOLCHAIN_DIR}/host.txt" +SW_MANIFEST_TOOLCHAIN_TARGET_FILE ?= "${SW_MANIFEST_TOOLCHAIN_DIR}/target.htm" +SW_MANIFEST_TOOLCHAIN_TARGET_TEXT ?= "${SW_MANIFEST_TOOLCHAIN_DIR}/target.txt" + +SW_MANIFEST_TOOLCHAIN_DEPLOY_DIR ?= "${SDK_DEPLOY}/${SDK_NAME}-${ARMPKGARCH}-${TARGET_OS}${TOOLCHAIN_SUFFIX}-sw_manifest" +SW_MANIFEST_TOOLCHAIN_DEPLOY_HOST_FILE ?= "${SW_MANIFEST_TOOLCHAIN_DEPLOY_DIR}/host.htm" +SW_MANIFEST_TOOLCHAIN_DEPLOY_HOST_TEXT ?= "${SW_MANIFEST_TOOLCHAIN_DEPLOY_DIR}/host.txt" +SW_MANIFEST_TOOLCHAIN_DEPLOY_TARGET_FILE ?= "${SW_MANIFEST_TOOLCHAIN_DEPLOY_DIR}/target.htm" +SW_MANIFEST_TOOLCHAIN_DEPLOY_TARGET_TEXT ?= "${SW_MANIFEST_TOOLCHAIN_DEPLOY_DIR}/target.txt" + +# Generate the header for a TI style software manifest +sw_manifest_header() { +echo " + + + +${MACHINE} TISDK ${SDK_VERSION} Installation Summary + + + +

${MACHINE} TISDK ${SDK_VERSION} Software Manifest

+

`date +"%B %d, %Y"`

+

Legend (explanation of the fields in the Manifest Table below)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Software NameThe name of the application or files
VersionVersion of the application or files
License TypeType of license(s) under which TI will be providing software to the licensee (e.g. BSD, GPLv2, TI TSPA License, TI Commercial License). See Open Source Reference License Disclaimer in the Disclaimers Section.
LocationThe directory name and path on the media (or in an archive) where the Package is located.
Delivered AsThis field will either be “Source”, “Binary” or “Source and Binary“ and is the form the content of the Package is delivered in. If the Package is delivered in an archive format, this field applies to the contents of the archive. If the word Limited is used with Source, as in “Limited Source” or “Limited Source and Binary” then only portions of the Source for the application are provided.
Modified by TIThis field will either be “Yes” or “No”. A “Yes” means TI had made changes to the Software. A “No” means TI has not made any changes. NOTE: This field is not applicable for Software “Obtained from” TI.
Obtained fromThis field specifies from where or from whom TI obtained the Software. It may be a URL to an Open Source site, a 3rd party companylicensor, or TI (if TI developed the software). If this field contains a link to an Open Source software, the date it was downloaded is also recorded. See Links Disclaimer in the Disclaimers Section.
+ + +

DISCLAIMERS

+

Export Control Classification Number (ECCN)

+

+Any use of ECCNs listed in the Manifest is at the user's risk and without recourse to TI. Your company, as the exporter of record, is responsible for determining the correct classification of any item at the time of export. Any export classification by TI of Software is for TI's internal use only and shall not be construed as a representation or warranty regarding the proper export classification for such Software or whether an export license or other documentation is required for exporting such Software. +

+ +

Links in the Manifest

+

+Any links appearing on this Manifest (for example in the “Obtained from” field) were verified at the time the Manifest was created. TI makes no guarantee that any listed links will remain active in the future. +

+ +

Open Source License References

+

+Your company is responsible for confirming the applicable license terms for any open source Software listed in this Manifest that was not “Obtained from” TI. Any open source license specified in this Manifest for Sotware that was not “Obtained from” TI is for TI's internal use only and shall not be construed as a representation of warranty regarding the proper open source license terms for such Software. +

+ +

Export Information

+

+ECCN for Software included in this release: Publicly Available +

+ +

+ECCN for Technology (e.g., user documentation, specifications) included in this release: Publicly Available +

+ +

Manifest

+

+See Legend above for a description of the columns and possible values. +

+" > ${SW_MANIFEST_FILE} + +cat > ${SW_MANIFEST_TEXT} << 'EOF' +<-- +Manifest template 1.0 + +This template is used to generate an unloadable manifest to the SRAS. To do so, save the document as a plain text file (Save As .txt). Do not change any options on the save which means leave the default as Windows Default Encoding. The SRAS will generate a nice looking HTML manifest for you. + +Instructions: + + 1. Text in blue should not be edited or removed. It will NOT appear on your manifest. + 2. DO NOT color outside the lines in the manifest. There are specific blocks where you enter information. Information + should only be entered in the sections below and not outside of them. + 3. DO NOT use the < or > symbols in your manifest table or in your footnotes. + 4. Please REFRAIN from using Word specific formatting when filling in the table. Examples are things like superscripts, + subscripts, etc. We are unable to understand those. + 5. Auto correction is not your friend in word. Please turn it off. It should be disabled already in this template. + +Table Instructions: + +Define what you are delivering by filling in the table below. Tables start with the start keyword end with the end keyword,
and may also contain footnotes specific to that table. + +You can have as many .Public. tables as you like in your manifest and can name them. You can have one and only one .Private. table. To create additional tables copy everything starting with down to
and then paste it after the table below. + +The field .attribute =. can be set to Public (the default) or Private to define the type of table it is. If the table is Public then everything in the table will appear on your manifest. If the table is Private then none of the entries will appear on your manifest but they will be stored in the SRAS. Private tables are useful for documenting third party code, that requires Legal review, but does not need to be acknowledged on the manifest you ship; e.g. it may be covered by our TI license. + +The field .name = . is used to put a heading over the table on the manifest you ship. + +The field .description =. is used to put a description under the Table name on the manifest you ship. + +To learn how to document software in the table read the instructions here. A brief explanation of the table columns follows. +License Type - If its an SPDX defined license use their short name identifier. You can see a list here: http://spdx.org/licenses/ . If it.s not on the list and not a commercial or TSPA license then use the application name as the license. + +Delivered As - This field will either be .Source., .Binary. or .Source and Binary. and is the form the content of the Software is delivered in. If the Software is delivered in an archive format, this field applies to the contents of the archive. If the word Limited is used with Source, as in .Limited Source. or .Limited Source and Binary. then only portions of the Source for the application are provided. + +Modified by TI - This field will either be .Yes. or .No.. A .Yes. means TI has made changes to the Software. A .No. means TI has not made any changes. Note: This field is not applicable for Software .Obtained from. TI. + +Location - The directory name and path on the media, e.g. drive, (or in an archive) where the Software is located after installing or extracting. + +Obtained From - This field specifies from where or from whom TI obtained the Software. It may be a URL to an Open Source site, a 3rd party licensor, or TI (if TI developed the software). If this field contains a link to Open Source software, the date TI downloaded the Software is also recorded. See Links Disclaimer in the Disclaimers Section. +--> + + +Version = .1.0. +Sep = .|. +Tool=.Word. + + +<-- ** Do not edit or remove anything above this line ** +--> + +<-- +Instructions: DO NOT Alter the column headings below. This is now a single row table as opposed to the older manifests which used merged rows. The order is extremely important; if you change the order or add or remove a column the upload will not work. +--> + +EOF + +} + +sw_manifest_footer() { +echo " +

Credits

+ +

Licenses

+

Licenses can be found in the \"licenses\" directory of the SDK install directory

+ +

GCC RUNTIME LIBRARY EXCEPTION

+

Version 3.1, 31 March 2009

+ +

Copyright © 2009 Free Software Foundation, Inc. http://fsf.org/

+ +

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

+ +

This GCC Runtime Library Exception ("Exception") is an additional permission under section 7 of the GNU General Public License, version 3 ("GPL-3.0"). It applies to a given file (the "Runtime Library") that bears a notice placed by the copyright holder of the file stating that the file is governed by GPL-3.0 along with this Exception.

+ +

When you use GCC to compile a program, GCC may combine portions of certain GCC header files and runtime libraries with the compiled program. The purpose of this Exception is to allow compilation of non-GPL (including proprietary) programs to use, in this way, the header files and runtime libraries covered by this Exception.

+ +

0. Definitions.

+

A file is an "Independent Module" if it either requires the Runtime Library for execution after a Compilation Process, or makes use of an interface provided by the Runtime Library, but is not otherwise based on the Runtime Library.

+ +

"GCC" means a version of the GNU Compiler Collection, with or without modifications, governed by version 3 (or a specified later version) of the GNU General Public License (GPL) with the option of using any subsequent versions published by the FSF.

+ +

"GPL-compatible Software" is software whose conditions of propagation, modification and use would permit combination with GCC in accord with the license of GCC.

+ +

"GPL-compatible Software" is software whose conditions of propagation, modification and use would permit combination with GCC in accord with the license of GCC.

+ +

The "Compilation Process" transforms code entirely represented in non-intermediate languages designed for human-written code, and/or in Java Virtual Machine byte code, into Target Code. Thus, for example, use of source code generators and preprocessors need not be considered part of the Compilation Process, since the Compilation Process can be understood as starting with the output of the generators or preprocessors.

+ +

A Compilation Process is "Eligible" if it is done using GCC, alone or with other GPL-compatible software, or if it is done without using any work based on GCC. For example, using non-GPL-compatible Software to optimize any GCC intermediate representations would not qualify as an Eligible Compilation Process.

+ +

1. Grant of Additional Permission.

+

You have permission to propagate a work of Target Code formed by combining the Runtime Library with Independent Modules, even if such propagation would otherwise violate the terms of GPL-3.0, provided that all Target Code was generated by Eligible Compilation Processes. You may then convey such a combination under terms of your choice, consistent with the licensing of the Independent Modules.

+ +

2. No Weakening of GCC Copyleft.

+

The availability of this Exception does not imply any general presumption that third-party software is unaffected by the copyleft requirements of the license of GCC.

+ +
+ Auto generated by TISDK installer on `date` + + + +" >> ${SW_MANIFEST_FILE} + + +cat >> ${SW_MANIFEST_TEXT} << 'EOF' + + + + + + +Licenses can be found in the "licenses/" directory of the SDK install directory +GCC RUNTIME LIBRARY EXCEPTION + +Version 3.1, 31 March 2009 + +Copyright © 2009 Free Software Foundation, Inc. http://fsf.org/ + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +This GCC Runtime Library Exception (Exception) is an additional permission under section 7 of the GNU General Public License, version 3 (GPL-3.0). It applies to a given file (the Runtime Library) that bears a notice placed by the copyright holder of the file stating that the file is governed by GPL-3.0 along with this Exception. + +When you use GCC to compile a program, GCC may combine portions of certain GCC header files and runtime libraries with the compiled program. The purpose of this Exception is to allow compilation of non-GPL (including proprietary) programs to use, in this way, the header files and runtime libraries covered by this Exception. +0. Definitions. + +A file is an Independent Module if it either requires the Runtime Library for execution after a Compilation Process, or makes use of an interface provided by the Runtime Library, but is not otherwise based on the Runtime Library. + +GCC means a version of the GNU Compiler Collection, with or without modifications, governed by version 3 (or a specified later version) of the GNU General Public License (GPL) with the option of using any subsequent versions published by the FSF. + +GPL-compatible Software is software whose conditions of propagation, modification and use would permit combination with GCC in accord with the license of GCC. + +GPL-compatible Software is software whose conditions of propagation, modification and use would permit combination with GCC in accord with the license of GCC. + +The Compilation Process transforms code entirely represented in non-intermediate languages designed for human-written code, and/or in Java Virtual Machine byte code, into Target Code. Thus, for example, use of source code generators and preprocessors need not be considered part of the Compilation Process, since the Compilation Process can be understood as starting with the output of the generators or preprocessors. + +A Compilation Process is Eligible if it is done using GCC, alone or with other GPL-compatible software, or if it is done without using any work based on GCC. For example, using non-GPL-compatible Software to optimize any GCC intermediate representations would not qualify as an Eligible Compilation Process. +1. Grant of Additional Permission. + +You have permission to propagate a work of Target Code formed by combining the Runtime Library with Independent Modules, even if such propagation would otherwise violate the terms of GPL-3.0, provided that all Target Code was generated by Eligible Compilation Processes. You may then convey such a combination under terms of your choice, consistent with the licensing of the Independent Modules. +2. No Weakening of GCC Copyleft. + +The availability of this Exception does not imply any general presumption that third-party software is unaffected by the copyleft requirements of the license of GCC. + + +EOF + +} + +sw_manifest_table_header() { + html_out="$1" + txt_out="$2" + + echo " +

$3

+

$4

+" >> ${html_out} + + + cat >> ${txt_out} << EOF + + +attribute = "Public" +name = "$3" +description = "$4" + + +EOF +} + +sw_manifest_table_footer() { + html_out="$1" + txt_out="$2" + + if [ ! -z $3 ]; then + cat >> ${txt_out} << EOF + +$1 + +EOF + fi + cat >> ${txt_out} << EOF +
+ +EOF +} + +# Create the host side toolchain components table +sw_manifest_toolchain_host() { + sdk_path="$1" + + opkg_dir="${sdk_path}/sysroots/*86*-linux/var/lib/opkg/info" + + sw_manifest_table_header ${SW_MANIFEST_TOOLCHAIN_HOST_FILE} ${SW_MANIFEST_TOOLCHAIN_HOST_TEXT} "GPL-3.0 Development Host Content" "This table describes any GPL-3.0 software being delivered that is expected to run on a Development Host, instead of the target device." + + generate_sw_manifest_table ${SW_MANIFEST_TOOLCHAIN_HOST_FILE} ${SW_MANIFEST_TOOLCHAIN_HOST_TEXT} $opkg_dir "true" + + sw_manifest_table_footer ${SW_MANIFEST_TOOLCHAIN_HOST_FILE} ${SW_MANIFEST_TOOLCHAIN_HOST_TEXT} + + sw_manifest_table_header ${SW_MANIFEST_TOOLCHAIN_HOST_FILE} ${SW_MANIFEST_TOOLCHAIN_HOST_TEXT} "Development Host Content" "This table describes any software being delivered that is expected to run on a Development Host, instead of the target device. Some of this software may be licensed under GPL-3.0 but it is not expected to be shipped as a product." + + generate_sw_manifest_table ${SW_MANIFEST_TOOLCHAIN_HOST_FILE} ${SW_MANIFEST_TOOLCHAIN_HOST_TEXT} $opkg_dir + + sw_manifest_table_footer ${SW_MANIFEST_TOOLCHAIN_HOST_FILE} ${SW_MANIFEST_TOOLCHAIN_HOST_TEXT} +} + +# Create the target side toolchain components table. These are components on +# the host but intended for the target. +sw_manifest_toolchain_target() { + sdk_path="$1" + + opkg_dir="${sdk_path}/sysroots/${ARMPKGARCH}*-linux*/var/lib/opkg/info" + + sw_manifest_table_header ${SW_MANIFEST_TOOLCHAIN_TARGET_FILE} ${SW_MANIFEST_TOOLCHAIN_TARGET_TEXT} "GPL-3.0 Development Libraries Installed on Host" "This table describes GPL-3.0 software libraries and headers that are installed on the development host and used during the development of software to run on the target. Customers should be careful when linking against these libraries to make sure they are complying with the license(s) of the library" + + generate_sw_manifest_table ${SW_MANIFEST_TOOLCHAIN_TARGET_FILE} ${SW_MANIFEST_TOOLCHAIN_TARGET_TEXT} $opkg_dir "true" + + sw_manifest_table_footer ${SW_MANIFEST_TOOLCHAIN_TARGET_FILE} ${SW_MANIFEST_TOOLCHAIN_TARGET_TEXT} + + sw_manifest_table_header ${SW_MANIFEST_TOOLCHAIN_TARGET_FILE} ${SW_MANIFEST_TOOLCHAIN_TARGET_TEXT} "Development Libraries Installed on Host" "This table describes software libraries and headers that are installed on the development host and used during the development of software to run on the target. Some of this software may be licensed under GPL-3.0. Customers should be careful when linking against these libraries to make sure they are complying with the license(s) of the library" + + generate_sw_manifest_table ${SW_MANIFEST_TOOLCHAIN_TARGET_FILE} ${SW_MANIFEST_TOOLCHAIN_TARGET_TEXT} $opkg_dir + + sw_manifest_table_footer ${SW_MANIFEST_TOOLCHAIN_TARGET_FILE} ${SW_MANIFEST_TOOLCHAIN_TARGET_TEXT} +} + +# Create the table of GPL-3.0 components found in the target file system +sw_manifest_target_gplv3() { + opkg_dir="$1" + + sw_manifest_table_header ${SW_MANIFEST_FILE} ${SW_MANIFEST_TEXT} "GPL-3.0 Target Device Content" "This table describes any GPL-3.0 software being delivered that is expected to run on the target device." + + generate_sw_manifest_table ${SW_MANIFEST_FILE} ${SW_MANIFEST_TEXT} $opkg_dir "true" + + sw_manifest_table_footer ${SW_MANIFEST_FILE} ${SW_MANIFEST_TEXT} +} + +# Generate the full target file system components table. +sw_manifest_target() { + # Extract the combined set of .control files from the TARGET_IMAGES in + # the filesystem directory to generate the manifest. + for image in ${TARGET_IMAGES} + do + # Only extract tar.gz or tar.bz2 types + if [ -e ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.xz ] + then + tar xJf ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.xz -C ${IMAGE_ROOTFS}/filesystem --wildcards *.control + elif [ -e ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.gz ] + then + tar xzf ${IMAGE_ROOTFS}/filesystem/${image}-${MACHINE}.tar.gz -C ${IMAGE_ROOTFS}/filesystem --wildcards *.control + fi + done + + # set the opkg_dir value to look at the extracted target file system + # image files + opkg_dir="${IMAGE_ROOTFS}/filesystem/var/lib/opkg/info" + + sw_manifest_target_gplv3 $opkg_dir + + sw_manifest_table_header ${SW_MANIFEST_FILE} ${SW_MANIFEST_TEXT} "All Target Device Content" "This table describes any software being delivered that is expected to run on the target device." + + generate_sw_manifest_table ${SW_MANIFEST_FILE} ${SW_MANIFEST_TEXT} $opkg_dir + + sw_manifest_table_footer ${SW_MANIFEST_FILE} ${SW_MANIFEST_TEXT} + + # Remove the temporary var directory that was extracted + rm -rf ${IMAGE_ROOTFS}/filesystem/var +} + +# Create the table of host components installed. +sw_manifest_host() { + sw_manifest_table_header ${SW_MANIFEST_FILE} ${SW_MANIFEST_TEXT} "Additional Development Host Content" "This table describes software that is installed on the development host but is not part of the linux-devkit package. This is usually software example sources or tools such a flash utilities." + + opkg_dir="${IMAGE_ROOTFS}/var/lib/opkg/info" + + generate_sw_manifest_table ${SW_MANIFEST_FILE} ${SW_MANIFEST_TEXT} $opkg_dir + + sw_manifest_table_footer ${SW_MANIFEST_FILE} ${SW_MANIFEST_TEXT} +} + +# This function expects to be passed the following parameter +# - The location to the opkg info directory containing the control files +# of the installed packages +# Optionally if the second parameter is set to true then only GPL-3.0 contents +# will be listed. This is for TI SW Manifests where GPL-3.0 content is +# highlighted as a separate table. +generate_sw_manifest_table() { + html_out="$1" + txt_out="$2" + control_dir="$3" + gplv3_only="$4" + + if [ ! -d "$control_dir" ] + then + echo "Could not find the control directory ($control_dir)" + return 1 + fi + + if [ "$gplv3_only" = "" ] + then + # The second parameter was not passed so set to false + gplv3_only="false" + fi + +echo " + + + + + + + + + + +" >> ${html_out} + +cat >> ${txt_out} << EOF + + + +EOF + + control_files_there=0 + for possible_control_file in $control_dir/*.control + do + if [ -f $possible_control_file ] + then + control_files_there=1 + break + fi + done + + if [ $control_files_there -eq 0 ] + then + for pkg_idx in $control_dir/oe*; do + package_start=`grep -n "^Package" $pkg_idx || true` + + IFS_OLD=${IFS} + IFS=" +" + + begin="" + end="" + for pkg in ${package_start}; do + end=`echo $pkg | cut -d: -f1` + + if [ -z $begin ]; then + pkg_name=`echo $pkg | cut -d: -f3` + begin=`echo $pkg | cut -d: -f1` + continue + fi + cnt=$[$cnt+1] + head -n $[$end - 1] $pkg_idx | tail -n $[$end - $begin] > ${control_dir}/${pkg_name// /}.control + + pkg_name=`echo $pkg | cut -d: -f3` + begin=$end + done + if [ ! -z $end ]; then + end=`wc -l $pkg_idx | awk '{ print $1 }'` + end=$[$end + 1] + tail -n $[$end - $begin] $pkg_idx > ${control_dir}/${pkg_name// /}.control + fi + + IFS=${IFS_OLD} + done + fi + + for i in $control_dir/*.control + do + package="`cat $i | grep Package: | awk {'print $2'}`" + version="`cat $i | grep Version: | awk {'print $2'} | cut -f1-2 -d-`" + long_version="`cat $i | grep Version: | awk {'print $2'}`" + license="`cat $i | grep License: | cut -d: -f2 `" + architecture="`cat $i | grep Architecture: | awk {'print $2'}`" + sources="`cat $i | grep Source: | cut -d ':' -f2-`" + location="$package""_""$long_version""_""$architecture"".ipk" + + # Set the highlight color if the license in GPL-3.0. If this is + # a GPL-3.0 only table then skip this package. + case "$license" in + *GPL-3.0*) + highlight="bgcolor=yellow" ;; + *unknown*) + if [ "$gplv3_only" != "true" ] + then + highlight="bgcolor=yellow" + else + continue + fi + ;; + *) + if [ "$gplv3_only" != "true" ] + then + highlight="" + else + continue + fi + ;; + esac + + # source variable contains the text to be used in the manifest + source="" + # Are there additional files in the package that come from the + # arago/OE metadata? + extra_files="0" + modified="No" + for s in $sources + do + case "$s" in + file://*) + extra_files="1" + ;; + http://install.source.dir.local*) + # If we are pulling something from a local file system then + # it is not a public modification and this should be marked + # as modified. This should not be the normal case. + modified="Yes" + ;; + *) + source="$source""$s";; + esac + done + + if [ "$extra_files" = "1" ] + then + source="$source""
Files from:
https://git.yoctoproject.org/meta-arago
https://git.yoctoproject.org/meta-ti" + fi + + case "$package" in + task-*) + continue ;; + *-source*) + delivered_as="Source" + ;; + *) + delivered_as="Binary" + ;; + esac + +echo " + + + + + + + + + +" >> ${html_out} + +cat >> ${txt_out} << EOF +| ${package} | ${version} | ${license} | ${delivered_as} | ${modified} | ${location} | ${source} +EOF + done + + echo "
Software NameVersionLicenseLocationDelivered AsModified by TIObtained from
${package} ${version}${license}${location}${delivered_as}${modified}${source}


" >> ${html_out} + +cat >> ${txt_out} << EOF + + +EOF + +} + +# Generate the TI SW Manifest for the SDK image +generate_sw_manifest() { + sw_manifest_header + + if [ -f "${SW_MANIFEST_TOOLCHAIN_DEPLOY_HOST_FILE}" ] + then + cat ${SW_MANIFEST_TOOLCHAIN_DEPLOY_HOST_FILE} >> ${SW_MANIFEST_FILE} + fi + if [ -f "${SW_MANIFEST_TOOLCHAIN_DEPLOY_HOST_TEXT}" ] + then + cat ${SW_MANIFEST_TOOLCHAIN_DEPLOY_HOST_TEXT} >> ${SW_MANIFEST_TEXT} + fi + + sw_manifest_target + sw_manifest_host + + if [ -f "${SW_MANIFEST_TOOLCHAIN_DEPLOY_TARGET_FILE}" ] + then + cat ${SW_MANIFEST_TOOLCHAIN_DEPLOY_TARGET_FILE} >> ${SW_MANIFEST_FILE} + fi + if [ -f "${SW_MANIFEST_TOOLCHAIN_DEPLOY_TARGET_TEXT}" ] + then + cat ${SW_MANIFEST_TOOLCHAIN_DEPLOY_TARGET_TEXT} >> ${SW_MANIFEST_TEXT} + fi + + sw_manifest_footer +} + +# Generate the TI SW Manifest for the tolchains +generate_sw_manifest_toolchain() { + sdk_path="$1" + + mkdir -p ${SW_MANIFEST_TOOLCHAIN_DIR} + + sw_manifest_toolchain_host "${sdk_path}" + sw_manifest_toolchain_target "${sdk_path}" +} + diff --git a/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb b/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb index 8bff9abb..be18be00 100644 --- a/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb +++ b/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb @@ -9,6 +9,7 @@ SDKIMAGE_FEATURES = "package-management" SDK_PACKAGE_ARCHS += "buildtools-dummy-${SDKPKGSUFFIX}" inherit toolchain-scripts +inherit tisdk-sw-manifest require recipes-core/meta/meta-toolchain.bb @@ -135,6 +136,8 @@ fakeroot archive_sdk() { mkdir -p ${SDKDEPLOYDIR} cd ${SDK_OUTPUT}/${SDKPATH} tar --owner=root --group=root -c . | xz ${SDK_XZ_OPTIONS} > ${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.${SDK_ARCHIVE_TYPE} + + generate_sw_manifest_toolchain "${SDK_OUTPUT}/${SDKPATH}" } fakeroot create_shar() {