Re: mail list for Xilinx Zynq platform?
Philip Balister
On 12/06/2012 04:57 AM, Andreas Schweigstill wrote:
Hello!Thanks for the feedback. Good luck with your evaluation. Let us know if you have anymore questions. Philip
|
|
Notes: Yocto Project 1.4 M1 release readiness meeting - Thursday, December 06, 2012 8:30 AM-9:00 AM (UTC-08:00) Pacific Time (US & Canada).
Liu, Song <song.liu@...>
Attendees:
Dave, AlexG, LaurentiuS, AlexP, Jessica, TomZ, Richard, Saul, Ross, Nitin, Song  Notes:  Release criteria review: (please see https://wiki.yoctoproject.org/wiki/Yocto_Project_v1.4_Status#Milestone_1 for details) - M1 does not have high features scheduled, but we have quite some new features integrated (https://wiki.yoctoproject.org/wiki/Yocto_Project_v1.4_Status#Feature.2FTask_Board ). One important improvement we have is for performance of some specific use cases. When we building from scratch, we use the sstate cache. The improvement we integrated in M1 makes the sstate cache use more efficient and we are able to cut the build time in this case in half. - Full pass testing report for RC1 is out in the public mailing list. RC1 has some issues, we have assigned those issues to right owners and they are working on it. The X issue for Beagle Board (3522) will be fixed in M2. There is no show stopper or high issues. And there does not seem to be much value if we can RC2 at this time. - Package update: update/upstreaming is ongoing, package report system is mostly fixed. In M2 we should have a target set and check against the target by the end of M2.  Decision: Release RC1 as the M1 release.
|
|
Bugzilla Status Updates
Darren Hart <dvhart@...>
Hi All,
This is just an update to let you know that the Status field of the Yocto Project bugzilla has some new fields to better track our workflow. New values indicated with a *. Status: New Accepted *In Progress Design *In Progress Design Complete *In Progress Implementation *In Progress Review Needinfo WaitForUpstream Resolved The new "In Progress*" fields should be updated by the bug owner as they work through the bug. If you have bugs assigned to you, please take a moment to update their status accordingly. Bugs that remain in the New or Accepted states appear to be languishing and generate some churn during bug review meetings, etc. Finally, if you use saved bugzilla queries, be advised that they may require updating to include the new status values. Thanks, -- Darren Hart Intel Open Source Technology Center Yocto Project - Technical Lead - Linux Kernel
|
|
Re: [PATCH 0/1] Misc: detect trailing space in the patches
Kamble, Nitin A <nitin.a.kamble@...>
 Â
From: Daniel Stone [mailto:daniel@...]
Sent: Wednesday, December 05, 2012 9:48 PM To: Martin Jansa Cc: Kamble, Nitin A; yocto@... Subject: Re: [yocto] [PATCH 0/1] Misc: detect trailing space in the patches  Hi,
 These checks can generate infuriating false positives when your patch modifies upstream code which has trailing or mixed whitespace in either context or removal lines; in this case, removing a line with trailing whitespace and replacing it with one which doesn't would generate a warning.  Mixed whitespace is also part of some coding styles, notably the kernel's.  Cheers, Daniel  This code checks for the trialing whitespace only in the lines added by the patches. The context lines or removed lines are not checked. It is easy to check for mixed whitespace also, but before doing that I would like to know the final decision about it, as I see some objection to it too.  Thanks, Nitin  Â
|
|
Re: Difference of toolchain recipes
Mark Hatle <mark.hatle@...>
On 12/6/12 4:00 AM, Luo Zhenhua-B19537 wrote:
Can anybody shed some light, please?gcc-cross-initial - This is the initial compiler needed to bootstrap the toolchain to build software on the host for the target. (This is a 'native' package.) gcc-cross-intermediate - This is the second stage of the bootstrap process to build software on the host for the target. (This is a 'native' package.) gcc-cross - this is the the final stage of the bootstrap process, and results in the cross compiler to build software on the host for the target. (This is a 'native' package.) If you are replacing the cross compiler toolchain with a custom version, this is what you must replace. gcc-runtime - these are the runtime libraries, but from the toolchain bootstrapping process. This results in a 'target' binary. gcc-crosssdk-initial/intermediate - stage 1 and 2 of the a cross compiler to build from the 'host' to the 'sdk'. Often the SDK is not the same target as the host. (This is a 'native' binary.) gcc-crosssdk - this the final stage of the SDK compiler. Again, this is to build on the host, for the sdk. This is a 'native' binary. gcc-cross-canadian - This is the compiler included with the SDK to build on the SDK machine creating software for the target. This is an 'nativesdk' package. Not that I know of.. It's one of those things that you kind of need to know in order to work with it. It likely should be documented somewhere officially.Is there any document for those description? --Mark _______________________________________________
|
|
Re: mail list for Xilinx Zynq platform?
Andreas Schweigstill <andreas@...>
Dear Elvis!
Am Do, 12/06/2012 16:42, hat Elvis Dowson <elvis.dowson@gmail.com> geschrieben: If you want to build your own version of BOOT.bin, its quite simple.Thank you very much for your instructions regarding the creation of my own BOOT.BIN file. Currently I am only evaluating the different Linux build systems resp. "distributions" being quite happy that I don't have to switch U-Boot together with the Linux/rootfs. In the final project we probably won't use U-Boot at all but instead use a proprietary boot mechanism. Regards, Andreas Schweigstill ​-- Dipl.-Phys. Andreas Schweigstill Schweigstill IT | Embedded Systems Schauenburgerstraße 116, D-24118 Kiel, Germany Phone: (+49) 431 530354-35, Fax: (+49) 431 530354-36 Mobile: (+49) 171 6921973, Web: http://www.schweigstill.de/
|
|
[RFCv3 7/7] (TEMPORARY): Use origin/timo branch of yocto docs project
mail@...
From: Timo Mueller <timo.mueller@bmw-carit.de>
As the eclipse generation is currently not part of the master the generation is always using the origin/timo branch to generate the eclipse help. This patch is added for testing purposes only. DO NOT MERGE THIS PATCH UPSTREAM - ONLY APPLY LOCALLY FOR TESTING --- scripts/generate_doc.sh | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/scripts/generate_doc.sh b/scripts/generate_doc.sh index 7d4911f..f5ae55e 100755 --- a/scripts/generate_doc.sh +++ b/scripts/generate_doc.sh @@ -48,6 +48,11 @@ else fi PLUGIN_FOLDER=$2 +# ==================================================================== +# TODO remove this section if eclipse generation is merged into master +REFERENCE=origin/timo +# ==================================================================== + TOP=`pwd` DOC_DIR=${PLUGIN_FOLDER}/docs -- 1.7.7.6
|
|
[RFCv3 6/7] scripts/build.sh: Add documentation generation to the default build
mail@...
From: Timo Mueller <timo.mueller@bmw-carit.de>
When building the plugin the matching documentation is automatically generated and added to the user.doc plugin prior to the plugin build. --- scripts/build.sh | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index de81ce3..3597136 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -108,6 +108,13 @@ git checkout origin/${BRANCH} || fail $? "git checkout origin/${BRANCH}" git checkout ${TAG} || fail $? "git checkout ${TAG}" cd ${TOP} +# generate and add documentation +if [ "${TAG}" = "HEAD" ]; then + ${GIT_DIR}/scripts/generate_doc.sh ${BRANCH} ${GIT_DIR} +else + ${GIT_DIR}/scripts/generate_doc.sh -t ${TAG} ${GIT_DIR} +fi + #build java -jar ${LAUNCHER} -application org.eclipse.ant.core.antRunner -buildfile ${BUILDFILE} -DbaseLocation=${ECLIPSE_BASE} -Dbuilder=${GIT_DIR}/features/org.yocto.bc.headless.build -DbuildDirectory=${BUILD_DIR} -DotherSrcDirectory=${GIT_DIR} -DbuildId=${RELEASE} || fail $? "normal build" java -jar ${LAUNCHER} -application org.eclipse.ant.core.antRunner -buildfile ${BUILDFILE} -DbaseLocation=${ECLIPSE_BASE} -Dbuilder=${GIT_DIR}/features/org.yocto.sdk.headless.build -DbuildDirectory=${BUILD_DIR} -DotherSrcDirectory=${GIT_DIR} -DbuildId=${RELEASE} || fail $? "normal build" -- 1.7.7.6
|
|
[RFCv3 5/7] scripts/generat-doc.sh: Copy generated eclipse help into the user.doc plugin
mail@...
From: Timo Mueller <timo.mueller@bmw-carit.de>
After successful generation the eclipse help files and the table of contents of each manual are copied to the user.doc plugin. --- scripts/generate_doc.sh | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/scripts/generate_doc.sh b/scripts/generate_doc.sh index faab9ef..7d4911f 100755 --- a/scripts/generate_doc.sh +++ b/scripts/generate_doc.sh @@ -77,6 +77,8 @@ fi for DOC in ${DOCS}; do make DOC=${DOC} eclipse; + cp -rf ${DOC}/eclipse/html/* ${DOC_HTML_DIR} + cp -f ${DOC}/eclipse/${DOC}-toc.xml ${DOC_HTML_DIR} done sed -e "s/@.*@/${COMMIT_ID}/" < ${DOC_PLUGIN_DIR}/about.html.in > ${DOC_PLUGIN_DIR}/about.html -- 1.7.7.6
|
|
[RFCv3 4/7] plugins/sdk.ide.doc.user: Add yocto documentation to the table of contents
mail@...
From: Timo Mueller <timo.mueller@bmw-carit.de>
The separate yocto manuals are added to the table of contents to prepare their inclusion into the plugin. --- plugins/org.yocto.sdk.ide.doc.user/plugin.xml | 24 ++++++++++++++++++++++++ plugins/org.yocto.sdk.ide.doc.user/toc.xml | 18 ++++++++++++++++++ 2 files changed, 42 insertions(+), 0 deletions(-) diff --git a/plugins/org.yocto.sdk.ide.doc.user/plugin.xml b/plugins/org.yocto.sdk.ide.doc.user/plugin.xml index 59ae9d1..16ac67e 100644 --- a/plugins/org.yocto.sdk.ide.doc.user/plugin.xml +++ b/plugins/org.yocto.sdk.ide.doc.user/plugin.xml @@ -16,5 +16,29 @@ file="toc.xml" primary="true"> </toc> + <toc + file="html/adt-manual-toc.xml" + primary="false"> + </toc> + <toc + file="html/yocto-project-qs-toc.xml" + primary="false"> + </toc> + <toc + file="html/dev-manual-toc.xml" + primary="false"> + </toc> + <toc + file="html/poky-ref-manual-toc.xml" + primary="false"> + </toc> + <toc + file="html/bsp-guide-toc.xml" + primary="false"> + </toc> + <toc + file="html/kernel-manual-toc.xml" + primary="false"> + </toc> </extension> </plugin> diff --git a/plugins/org.yocto.sdk.ide.doc.user/toc.xml b/plugins/org.yocto.sdk.ide.doc.user/toc.xml index e110a54..b5ebc43 100644 --- a/plugins/org.yocto.sdk.ide.doc.user/toc.xml +++ b/plugins/org.yocto.sdk.ide.doc.user/toc.xml @@ -1,3 +1,21 @@ <?xml version="1.0" encoding="UTF-8"?> <toc label="The Yocto Project Documentation"> + <topic label="The Yocto Project Quick Start"> + <link toc="html/yocto-project-qs-toc.xml"/> + </topic> + <topic label="The·Yocto·Project·Application·Developer's·Guide"> + <link toc="html/adt-manual-toc.xml"/> + </topic> + <topic label="The Yocto Project Development Manual"> + <link toc="html/dev-manual-toc.xml"/> + </topic> + <topic label="The Yocto Project Reference Manual"> + <link toc="html/poky-ref-manual-toc.xml"/> + </topic> + <topic label="The Yocto Project Board Support Package Developer's Guide"> + <link toc="html/bsp-guide-toc.xml"/> + </topic> + <topic label="The Yocto Project Kernel Architecture and Use Manual"> + <link toc="html/kernel-manual-toc.xml"/> + </topic> </toc> -- 1.7.7.6
|
|
[RFCv3 3/7] scripts/generate_doc.sh: Add script to handle eclipse help generation
mail@...
From: Timo Mueller <timo.mueller@bmw-carit.de>
This script will checkout the yocto-docs project containing the official yocto documentation. After successful checkout the eclipse help is generated and the about.html file of the doc.user plugin is created. --- scripts/generate_doc.sh | 84 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 84 insertions(+), 0 deletions(-) create mode 100755 scripts/generate_doc.sh diff --git a/scripts/generate_doc.sh b/scripts/generate_doc.sh new file mode 100755 index 0000000..faab9ef --- /dev/null +++ b/scripts/generate_doc.sh @@ -0,0 +1,84 @@ +#!/bin/sh + +help() +{ + echo "Generate and add eclipse help from yocto's documentation" + echo "Usage: $0 BRANCH_NAME PLUGIN_FOLDER" + echo " $0 -t TAG_NAME PLUGIN_FOLDER" + echo "" + echo "Options:" + echo "-h - display this help and exit" + echo "-t TAG_NAME - tag to build the documentation upon" + echo "BRANCH_NAME - branch to build the documentation upon" + echo "PLUGIN_FOLDER - root folder of the eclipse-poky project" + exit 1 +} + +fail () +{ + local retval=$1 + shift $1 + echo "[Fail $retval]: $*" + echo "BUILD_TOP=${BUILD_TOP}" + cd ${TOP} + exit ${retval} +} + +CHECKOUT_TAG=0 +while getopts ":ht" opt; do + case $opt in + h) + help + ;; + t) + CHECKOUT_TAG=1 + ;; + esac +done +shift $(($OPTIND - 1)) + +if [ $# -ne 2 ]; then + help +fi + +if [ $CHECKOUT_TAG -eq 0 ]; then + REFERENCE=origin/$1 +else + REFERENCE=$1 +fi +PLUGIN_FOLDER=$2 + +TOP=`pwd` + +DOC_DIR=${PLUGIN_FOLDER}/docs +rm -rf ${DOC_DIR} +DOC_PLUGIN_DIR=${PLUGIN_FOLDER}/plugins/org.yocto.sdk.ide.doc.user +DOC_HTML_DIR=${DOC_PLUGIN_DIR}/html/ + +# git clone +DOC_GIT=git://git.yoctoproject.org/yocto-docs.git +git clone ${DOC_GIT} ${DOC_DIR} || fail $? "git clone ${DOC_GIT}" +cd ${DOC_DIR} +git checkout ${REFERENCE} || fail $? "git checkout ${REFERENCE}" +COMMIT_ID=`git rev-parse HEAD` + +# build and copy +DOCS="yocto-project-qs adt-manual kernel-manual \ + bsp-guide poky-ref-manual dev-manual" + +cd documentation +ECLIPSE_TARGET_AVAILABLE=`make -q eclipse &> /dev/null; echo $?` +if [ ${ECLIPSE_TARGET_AVAILABLE} -ne 1 ]; then + echo "WARNING:" + echo "This version does not support generating eclipse help" + echo "Documentation will not be available in eclipse" + exit 1 +fi + +for DOC in ${DOCS}; do + make DOC=${DOC} eclipse; +done + +sed -e "s/@.*@/${COMMIT_ID}/" < ${DOC_PLUGIN_DIR}/about.html.in > ${DOC_PLUGIN_DIR}/about.html + +cd ${TOP} -- 1.7.7.6
|
|
[RFCv3 2/7] plugins/sdk.ide.doc.user: Add about.html to prepare addition of yocto documentation
mail@...
From: Timo Mueller <timo.mueller@bmw-carit.de>
As documentation is licensed under CCA-SA 2.0 UK and the plugin itself is licensed under EPL v1.0 an about file needs to be added to the plugin identifying the third party content. --- plugins/org.yocto.sdk.ide.doc.user/about.html.in | 166 ++++++++++++++++++++ .../org.yocto.sdk.ide.doc.user/build.properties | 6 +- 2 files changed, 170 insertions(+), 2 deletions(-) create mode 100644 plugins/org.yocto.sdk.ide.doc.user/about.html.in diff --git a/plugins/org.yocto.sdk.ide.doc.user/about.html.in b/plugins/org.yocto.sdk.ide.doc.user/about.html.in new file mode 100644 index 0000000..c009f77 --- /dev/null +++ b/plugins/org.yocto.sdk.ide.doc.user/about.html.in @@ -0,0 +1,166 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +<title>About</title> +</head> +<body lang="EN-US"> + <h2>About This Content</h2> + + <p> + <em>December, 2012</em> + </p> + <h3>License</h3> + + <p> + Copyright (c) 2010 Intel, Inc. and others. + All rights reserved. This program and the accompanying materials + are made available under the terms of the Eclipse Public License v1.0 + which accompanies this distribution, and is available at <br /> + <a href="http://www.eclipse.org/legal/epl-v10.html"> + http://www.eclipse.org/legal/epl-v10.html + </a> + </p> + + <h3>Third Party Content</h3> + <p>The Content includes items that have been sourced from the Yocto project + as set out below. If you did not receive this Content directly + from the Linux Foundation, the following is provided for + informational purposes only, and you should look to the + Redistributor's license for terms and conditions of use.</p> + <p> + <strong> + Yocto Project Quick Start + </strong> + <br /> + <br /> + This short document lets you get started with the Yocto Project + quickly and start building an image. + <br /> + <br /> + <em>License:</em> + <a href="http://creativecommons.org/licenses/by-sa/2.0/uk/legalcode"> + http://creativecommons.org/licenses/by-sa/2.0/uk/legalcode + </a> + <br /> + <em>Source Code Repository:</em> + <a href="git://git.yoctoproject.org/yocto-docs"> + git://git.yoctoproject.org/yocto-docs + </a> + <br /> + <em>Commit:</em> @COMMIT_ID-yocto-project-qs@ + <br /> + <br /> + <strong> + The Yocto Project Application Developer's Guide: + </strong> + <br /> + <br /> + This manual shows you how to setup and use the Application Development + Toolkit (ADT) and stand-alone cross-development toolchains so you can + develop user-space applications. + <br /> + <br /> + <em>License:</em> + <a href="http://creativecommons.org/licenses/by-sa/2.0/uk/legalcode"> + http://creativecommons.org/licenses/by-sa/2.0/uk/legalcode + </a> + <br /> + <em>Source Code Repository:</em> + <a href="git://git.yoctoproject.org/yocto-docs"> + git://git.yoctoproject.org/yocto-docs + </a> + <br /> + <em>Commit:</em> @COMMIT_ID-adt-manual@ + <br /> + <br /> + <strong> + The Yocto Project Development Manual: + </strong> + <br /> + <br /> + This manual describes how to use the Yocto Project to develop + embedded Linux images and user-space applications to run on + targeted devices. + <br /> + <br /> + <em>License:</em> + <a href="http://creativecommons.org/licenses/by-sa/2.0/uk/legalcode"> + http://creativecommons.org/licenses/by-sa/2.0/uk/legalcode + </a> + <br /> + <em>Source Code Repository:</em> + <a href="git://git.yoctoproject.org/yocto-docs"> + git://git.yoctoproject.org/yocto-docs + </a> + <br /> + <em>Commit:</em> @COMMIT_ID-dev-manual@ + <br /> + <br /> + <strong> + The Yocto Project Reference Manual: + </strong> + <br /> + <br /> + This manual is the complete reference guide to the Poky component. + It also contains a chapter on Board Support Package (BSP) development. + <br /> + <br /> + <em>License:</em> + <a href="http://creativecommons.org/licenses/by-sa/2.0/uk/legalcode"> + http://creativecommons.org/licenses/by-sa/2.0/uk/legalcode + </a> + <br /> + <em>Source Code Repository:</em> + <a href="git://git.yoctoproject.org/yocto-docs"> + git://git.yoctoproject.org/yocto-docs + </a> + <br /> + <em>Commit:</em> @COMMIT_ID-poky-ref-manual@ + <br /> + <br /> + <strong> + The Yocto Project Board Support Package (BSP) Developer's Guide: + </strong> + <br /> + <br /> + This brief document defines a structure for BSP components. + Having a commonly understood layout encourages standardization. + <br /> + <br /> + <em>License:</em> + <a href="http://creativecommons.org/licenses/by-sa/2.0/uk/legalcode"> + http://creativecommons.org/licenses/by-sa/2.0/uk/legalcode + </a> + <br /> + <em>Source Code Repository:</em> + <a href="git://git.yoctoproject.org/yocto-docs"> + git://git.yoctoproject.org/yocto-docs + </a> + <br /> + <em>Commit:</em> @COMMIT_ID-bsp-guide@ + <br /> + <br /> + <strong> + Yocto Project Kernel Architecture and Use Manual: + </strong> + <br /> + <br /> + This document describes the architecture of the Yocto Project + kernel and provides some work flow examples. + <br /> + <br /> + <em>License:</em> + <a href="http://creativecommons.org/licenses/by-sa/2.0/uk/legalcode"> + http://creativecommons.org/licenses/by-sa/2.0/uk/legalcode + </a> + <br /> + <em>Source Code Repository:</em> + <a href="git://git.yoctoproject.org/yocto-docs"> + git://git.yoctoproject.org/yocto-docs + </a> + <br /> + <em>Commit:</em> @COMMIT_ID-kernel-manual@ + </p> +</body> diff --git a/plugins/org.yocto.sdk.ide.doc.user/build.properties b/plugins/org.yocto.sdk.ide.doc.user/build.properties index 6d00e58..17c6cb5 100644 --- a/plugins/org.yocto.sdk.ide.doc.user/build.properties +++ b/plugins/org.yocto.sdk.ide.doc.user/build.properties @@ -4,6 +4,8 @@ bin.includes = plugin.xml,\ OSGI-INF/,\ cheatsheets/,\ html/,\ - toc.xml + toc.xml,\ + about.html src.includes = cheatsheets/,\ - html/ + html/,\ + about.html -- 1.7.7.6
|
|
[RFCv3 1/7] plugins/sdk.ide.doc.user: Add empty eclipse help
mail@...
From: Timo Mueller <timo.mueller@bmw-carit.de>
Adds yocto specific eclipse help to the plugin. The help is currently empty but will contain the official yocto documentation later. --- .../META-INF/MANIFEST.MF | 3 ++- .../org.yocto.sdk.ide.doc.user/build.properties | 7 +++++-- plugins/org.yocto.sdk.ide.doc.user/html/book.css | 1 + plugins/org.yocto.sdk.ide.doc.user/plugin.xml | 7 +++++++ plugins/org.yocto.sdk.ide.doc.user/toc.xml | 3 +++ 5 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 plugins/org.yocto.sdk.ide.doc.user/html/book.css create mode 100644 plugins/org.yocto.sdk.ide.doc.user/toc.xml diff --git a/plugins/org.yocto.sdk.ide.doc.user/META-INF/MANIFEST.MF b/plugins/org.yocto.sdk.ide.doc.user/META-INF/MANIFEST.MF index 87079ce..a93601e 100644 --- a/plugins/org.yocto.sdk.ide.doc.user/META-INF/MANIFEST.MF +++ b/plugins/org.yocto.sdk.ide.doc.user/META-INF/MANIFEST.MF @@ -5,4 +5,5 @@ Bundle-SymbolicName: org.yocto.sdk.ide.doc.user;singleton:=true Bundle-Version: 1.2.0.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Require-Bundle: org.eclipse.ui.cheatsheets +Require-Bundle: org.eclipse.ui.cheatsheets, + org.eclipse.help diff --git a/plugins/org.yocto.sdk.ide.doc.user/build.properties b/plugins/org.yocto.sdk.ide.doc.user/build.properties index caf850b..6d00e58 100644 --- a/plugins/org.yocto.sdk.ide.doc.user/build.properties +++ b/plugins/org.yocto.sdk.ide.doc.user/build.properties @@ -2,5 +2,8 @@ bin.includes = plugin.xml,\ .,\ META-INF/,\ OSGI-INF/,\ - cheatsheets/ -src.includes = cheatsheets/ + cheatsheets/,\ + html/,\ + toc.xml +src.includes = cheatsheets/,\ + html/ diff --git a/plugins/org.yocto.sdk.ide.doc.user/html/book.css b/plugins/org.yocto.sdk.ide.doc.user/html/book.css new file mode 100644 index 0000000..e248f5a --- /dev/null +++ b/plugins/org.yocto.sdk.ide.doc.user/html/book.css @@ -0,0 +1 @@ +@import "PLUGINS_ROOT/PRODUCT_PLUGIN/book.css"; diff --git a/plugins/org.yocto.sdk.ide.doc.user/plugin.xml b/plugins/org.yocto.sdk.ide.doc.user/plugin.xml index 24c539d..59ae9d1 100644 --- a/plugins/org.yocto.sdk.ide.doc.user/plugin.xml +++ b/plugins/org.yocto.sdk.ide.doc.user/plugin.xml @@ -10,4 +10,11 @@ name="%cheatsheet.name"> </cheatsheet> </extension> + <extension + point="org.eclipse.help.toc"> + <toc + file="toc.xml" + primary="true"> + </toc> + </extension> </plugin> diff --git a/plugins/org.yocto.sdk.ide.doc.user/toc.xml b/plugins/org.yocto.sdk.ide.doc.user/toc.xml new file mode 100644 index 0000000..e110a54 --- /dev/null +++ b/plugins/org.yocto.sdk.ide.doc.user/toc.xml @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="UTF-8"?> + <toc label="The Yocto Project Documentation"> + </toc> -- 1.7.7.6
|
|
[RFCv3 0/7][eclipse-poky] Integrate yocto documentation into eclipse
mail@...
From: Timo Mueller <timo.mueller@bmw-carit.de>
Hi, since the last proposal some things have changed: 1. Eclipse help generation is now part of the yocto-docs project (currently available in the origin/timo branch) 2. We agreed that the plugin should be licensed under the EPL v1.0 instead of having a separate documentation plugin licensed under the CCA-SA 2.0 UK. The last patch set was adding generated eclipse help files (html) to the repository. One major change in this patch series is that I extended the plugin build system to integrate the generation into the build process. Thus keeping the eclipse help and the official documentation in sync is now automated. Also the eclipse help is now part of the user.doc plugin and no longer contained in a separate plugin/feature. Rational from the original patch: <snip> the documentation of the yocto project can currently be viewed online or as a separate pdf. When using the eclipse ide to develop software on base of a yocto sysroot and toolchain it would be convenient to access the relevant parts of the documentation from within the ide. </snip> <snip> I have intergrated this documentation in the ide and it can now be accessed through the eclipse help center (Help -> Help Contents). </snip> Best regards Timo Timo Mueller (7): plugins/sdk.ide.doc.user: Add empty eclipse help plugins/sdk.ide.doc.user: Add about.html to prepare addition of yocto documentation scripts/generate_doc.sh: Add script to handle eclipse help generation plugins/sdk.ide.doc.user: Add yocto documentation to the table of contents scripts/generat-doc.sh: Copy generated eclipse help into the user.doc plugin scripts/build.sh: Add documentation generation to the default build (TEMPORARY): Use origin/timo branch of yocto docs project .../META-INF/MANIFEST.MF | 3 +- plugins/org.yocto.sdk.ide.doc.user/about.html.in | 166 ++++++++++++++++++++ .../org.yocto.sdk.ide.doc.user/build.properties | 9 +- plugins/org.yocto.sdk.ide.doc.user/html/book.css | 1 + plugins/org.yocto.sdk.ide.doc.user/plugin.xml | 31 ++++ plugins/org.yocto.sdk.ide.doc.user/toc.xml | 21 +++ scripts/build.sh | 7 + scripts/generate_doc.sh | 91 +++++++++++ 8 files changed, 326 insertions(+), 3 deletions(-) create mode 100644 plugins/org.yocto.sdk.ide.doc.user/about.html.in create mode 100644 plugins/org.yocto.sdk.ide.doc.user/html/book.css create mode 100644 plugins/org.yocto.sdk.ide.doc.user/toc.xml create mode 100755 scripts/generate_doc.sh -- 1.7.7.6
|
|
Re: mail list for Xilinx Zynq platform?
Elvis Dowson
Hi Andreas,
On Dec 6, 2012, at 4:57 PM, Andreas Schweigstill <andreas@schweigstill.de> wrote: After changing the order of BBLAYERS in build/conf/local.conf to meta, meta-zynq,I don't add meta-yocto-bsp to my bblayers configuration. I haven't built a BOOT.BIN file with Yocto based U-Boot yet. Instead I'm usingIf you want to build your own version of BOOT.bin, its quite simple. Just take the u-boot.elf file, and use SDK to create a simple zynq_fsbl project. From that create the boot image, using the SDK, and add the system.bit, zynq_fsbl.elf and u-boot.elf binaries. Rename the produce binary to BOOT.bin, and you're good to go. You can find more information of the boot image creation process on section 3.5, page 29, of the UG821 - Zynq-7000 EPP Software Developers Guide v3.0. From within SDK, it's pretty straightforward, and it will automatically create the bif file after you've specified all the binaries, and create the bootable image. Best regards, Elvis Dowson
|
|
Re: [PATCH] Fix incompatibility with jre1.6 support for typed HashMap
Grigoropol, IoanaX <ioanax.grigoropol@...>
Hi Jessica,
toggle quoted messageShow quoted text
There seems to be a bit of a mix-up on the new branch in the order of the patches were applied. Also, some files modified under Linux have CRLF ending instead of CR. Can you please rebase the branch (the new one or the old one) to commit ec4fcf7b478f59e190d9b9fe9b56e44971c4f66c, and then apply the set of 8 patches I resent to the mailing list ? Bare in mind that the patch before last (that converts from CRLF to CR) will not apply unless applied with option --keep-cr. Thanks, Ioana
-----Original Message-----
From: Zhang, Jessica Sent: Thursday, December 06, 2012 1:12 AM To: Grigoropol, IoanaX; yocto@yoctoproject.org Subject: RE: [yocto] [PATCH] Fix incompatibility with jre1.6 support for typed HashMap Hi Ioana, None of your patches of today apply so there seems to be some rebase issue. Also, I've added headless build support changes for windows BC plugin, so can you rebase against jzhang/windows-build and resubmit the patch series? Thanks, Jessica -----Original Message----- From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Ioana Grigoropol Sent: Wednesday, December 05, 2012 2:41 AM To: yocto@yoctoproject.org Subject: [yocto] [PATCH] Fix incompatibility with jre1.6 support for typed HashMap Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com> --- .../remote/utils/YoctoHostShellProcessAdapter.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/YoctoHostShellProcessAdapter.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/YoctoHostShellProcessAdapter.java index 9ab43cf..2dba0a6 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/YoctoHostShellProcessAdapter.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/YoctoHostShe +++ llProcessAdapter.java @@ -34,6 +34,7 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { private Semaphore sem; + public YoctoHostShellProcessAdapter(IHostShell hostShell, ProcessStreamBuffer processStreamBuffer, CommandResponseHandler commandResponseHandler) throws IOException { super(hostShell); this.processStreamBuffer = processStreamBuffer; @@ -41,7 +42,7 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { this.calculator = new GitCalculatePercentage(); this.sem = new Semaphore(1); this.command = ""; - this.commandMonitors = new HashMap<>(); + this.commandMonitors = new HashMap<String, IProgressMonitor>(); } public String getLastCommand() { @@ -50,7 +51,7 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { public synchronized void setLastCommand(String lastCommand) { try { - // there are still some processes that might take a long time and if we do not wait for them, + // there are still some processes that might take a long time and if +we do not wait for them, // then the semaphore will not be released, because an interrupted exception will occur Thread.sleep(2000); isFinished = false; @@ -70,6 +71,7 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { private class GitCalculatePercentage implements ICalculatePercentage { final Pattern pattern = Pattern.compile("^Receiving objects:\\s*(\\d+)%.*"); + @Override public float calWorkloadDone(String info) throws IllegalArgumentException { Matcher m = pattern.matcher(info.trim()); if(m.matches()) { @@ -88,13 +90,16 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { } private void updateMonitor(final int work){ + Display.getDefault().asyncExec(new Runnable() { + @Override public void run() { if (getMonitor() != null) { getMonitor().worked(work); } } + }); } @@ -124,7 +129,7 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { updateMonitor(delta); reportedWorkload += delta; } - + if (reportedWorkload == RemoteHelper.TOTALWORKLOAD) doneMonitor(); } @@ -152,8 +157,9 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { continue; } setCommandPrompt(value); + if (commandPrompt != null && endChar != null && command != null && processStreamBuffer != null && - value.startsWith(commandPrompt) && value.endsWith(endChar) && + value.startsWith(commandPrompt) && value.endsWith(endChar) && !value.endsWith(command) && processStreamBuffer.getLastOutputLineContaining(command) != null /*&& waitForOutput*/) { sem.release(); isFinished = true; @@ -165,7 +171,7 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { this.commandResponseHandler.response(value, false); } } - + } private void setCommandPrompt(String value) { if (commandPrompt == null) { @@ -178,7 +184,7 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { commandPrompt = value.substring(0, end); endChar = PROMPT_USER_CH; } - + } } public boolean isFinished() { -- 1.7.9.5 _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
|
|
[PATCH 8/8] Validate Bitbake Commander project when switching between new repo and existing one
Ioana Grigoropol <ioanax.grigoropol@...>
Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com>
--- .../yocto/bc/ui/wizards/FiniteStateWizardPage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/FiniteStateWizardPage.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/FiniteStateWizardPage.java index 40696d3..2ef150a 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/FiniteStateWizardPage.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/FiniteStateWizardPage.java @@ -106,7 +106,7 @@ public abstract class FiniteStateWizardPage extends WizardPage { * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent) */ public void widgetSelected(SelectionEvent e) { -// validate(); + validate(); } /* -- 1.7.9.5
|
|
[PATCH 7/8] convert CRLF line terminators to CR only
Ioana Grigoropol <ioanax.grigoropol@...>
---
.../org/yocto/bc/ui/wizards/FiniteStateWizard.java | 112 +++---- .../yocto/bc/ui/wizards/FiniteStateWizardPage.java | 320 ++++++++++---------- 2 files changed, 216 insertions(+), 216 deletions(-) diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/FiniteStateWizard.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/FiniteStateWizard.java index 6cd87be..795f7bd 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/FiniteStateWizard.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/FiniteStateWizard.java @@ -1,56 +1,56 @@ -package org.yocto.bc.ui.wizards; -import java.util.Map; - -import org.eclipse.jface.wizard.Wizard; -import org.eclipse.swt.widgets.Composite; - - - -public abstract class FiniteStateWizard extends Wizard{ - private boolean finishable = false; - private boolean canFinish = false; - - public FiniteStateWizard() { - } - - public abstract boolean performFinish(); - - /** - * @return Returns if the wizard is finishable in its current state. - */ - public boolean isFinishable() { - return finishable; - } - /** - * @param finishable Change the finish state of the wizard. - */ - public void setFinishable(boolean finishable) { - this.finishable = finishable; - } - - /* (non-Javadoc) - * @see org.eclipse.jface.wizard.IWizard#createPageControls(org.eclipse.swt.widgets.Composite) - */ - public void createPageControls(Composite pageContainer) { - super.createPageControls(pageContainer); - } - - /* - * (non-Javadoc) Method declared on IWizard. - */ - public boolean canFinish() { - if (canFinish) - return true; - return super.canFinish(); - } - - public void setCanFinish(boolean canFinish) { - this.canFinish = canFinish; - } - - /** - * Retrive the model object from the wizard. - * @return - */ - public abstract Map<?, ?> getModel(); -} +package org.yocto.bc.ui.wizards; +import java.util.Map; + +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.swt.widgets.Composite; + + + +public abstract class FiniteStateWizard extends Wizard{ + private boolean finishable = false; + private boolean canFinish = false; + + public FiniteStateWizard() { + } + + public abstract boolean performFinish(); + + /** + * @return Returns if the wizard is finishable in its current state. + */ + public boolean isFinishable() { + return finishable; + } + /** + * @param finishable Change the finish state of the wizard. + */ + public void setFinishable(boolean finishable) { + this.finishable = finishable; + } + + /* (non-Javadoc) + * @see org.eclipse.jface.wizard.IWizard#createPageControls(org.eclipse.swt.widgets.Composite) + */ + public void createPageControls(Composite pageContainer) { + super.createPageControls(pageContainer); + } + + /* + * (non-Javadoc) Method declared on IWizard. + */ + public boolean canFinish() { + if (canFinish) + return true; + return super.canFinish(); + } + + public void setCanFinish(boolean canFinish) { + this.canFinish = canFinish; + } + + /** + * Retrive the model object from the wizard. + * @return + */ + public abstract Map<?, ?> getModel(); +} diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/FiniteStateWizardPage.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/FiniteStateWizardPage.java index 795a9c0..40696d3 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/FiniteStateWizardPage.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/FiniteStateWizardPage.java @@ -1,160 +1,160 @@ -package org.yocto.bc.ui.wizards; -import java.util.Map; - -import org.eclipse.jface.viewers.ISelectionChangedListener; -import org.eclipse.jface.viewers.SelectionChangedEvent; -import org.eclipse.jface.wizard.WizardPage; -import org.eclipse.swt.events.FocusEvent; -import org.eclipse.swt.events.FocusListener; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; - -public abstract class FiniteStateWizardPage extends WizardPage { - protected Map<String, Object> model = null; - protected FiniteStateWizard wizard = null; - private static boolean previousState = false; - /** - * @param pageName - */ - protected FiniteStateWizardPage(String name, Map<String, Object> model) { - super(name); - this.model = model; - this.setPageComplete(false); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite) - */ - public abstract void createControl(Composite parent); - - protected void setModelWizard() { - if (wizard == null) { - wizard = (FiniteStateWizard)FiniteStateWizardPage.this.getWizard(); - } - } - - /** - * Add page validation logic here. Returning <code>true</code> means that - * the page is complete and the user can go to the next page. - * - * @return - */ - protected abstract boolean validatePage(); - - /** - * This method should be implemented by ModelWizardPage classes. This method - * is called after the <code>validatePage()</code> returns successfully. - * Update the model with the contents of the controls on the page. - */ - protected abstract void updateModel(); - - /** - * Helper method to see if a field has some sort of text in it. - * @param value - * @return - */ - protected boolean hasContents(String value) { - if (value == null || value.length() == 0) { - return false; - } - - return true; - } - - /** - * This method is called right before a page is displayed. - * This occurs on user action (Next/Back buttons). - */ - public abstract void pageDisplay(); - - /** - * This method is called on the concrete WizardPage after the user has - * gone to the page after. - */ - public abstract void pageCleanup(); - - /* (non-Javadoc) - * @see org.eclipse.jface.dialogs.IDialogPage#setVisible(boolean) - */ - public void setVisible(boolean arg0) { - - if (!arg0 && previousState) { - pageCleanup(); - } else if (arg0 && !previousState) { - pageDisplay(); - } else if (arg0 && previousState) { - pageDisplay(); - } - - previousState = arg0; - - super.setVisible(arg0); - } - - public class ValidationListener implements SelectionListener, ModifyListener, Listener, ISelectionChangedListener, FocusListener { - - /* - * (non-Javadoc) - * - * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent) - */ - public void widgetSelected(SelectionEvent e) { -// validate(); - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent) - */ - public void widgetDefaultSelected(SelectionEvent e) { - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent) - */ - public void modifyText(ModifyEvent e) { - validate(); - } - - public void validate() { - if (validatePage()) { - updateModel(); - setPageComplete(true); - return; - } - - setPageComplete(false); - } - - /* (non-Javadoc) - * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event) - */ - public void handleEvent(Event event) { - - validate(); - } - - public void selectionChanged(SelectionChangedEvent event) { - validate(); - } - - @Override - public void focusGained(FocusEvent e) { - } - - @Override - public void focusLost(FocusEvent e) { - validate(); - } - } -} +package org.yocto.bc.ui.wizards; +import java.util.Map; + +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.swt.events.FocusEvent; +import org.eclipse.swt.events.FocusListener; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Listener; + +public abstract class FiniteStateWizardPage extends WizardPage { + protected Map<String, Object> model = null; + protected FiniteStateWizard wizard = null; + private static boolean previousState = false; + /** + * @param pageName + */ + protected FiniteStateWizardPage(String name, Map<String, Object> model) { + super(name); + this.model = model; + this.setPageComplete(false); + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite) + */ + public abstract void createControl(Composite parent); + + protected void setModelWizard() { + if (wizard == null) { + wizard = (FiniteStateWizard)FiniteStateWizardPage.this.getWizard(); + } + } + + /** + * Add page validation logic here. Returning <code>true</code> means that + * the page is complete and the user can go to the next page. + * + * @return + */ + protected abstract boolean validatePage(); + + /** + * This method should be implemented by ModelWizardPage classes. This method + * is called after the <code>validatePage()</code> returns successfully. + * Update the model with the contents of the controls on the page. + */ + protected abstract void updateModel(); + + /** + * Helper method to see if a field has some sort of text in it. + * @param value + * @return + */ + protected boolean hasContents(String value) { + if (value == null || value.length() == 0) { + return false; + } + + return true; + } + + /** + * This method is called right before a page is displayed. + * This occurs on user action (Next/Back buttons). + */ + public abstract void pageDisplay(); + + /** + * This method is called on the concrete WizardPage after the user has + * gone to the page after. + */ + public abstract void pageCleanup(); + + /* (non-Javadoc) + * @see org.eclipse.jface.dialogs.IDialogPage#setVisible(boolean) + */ + public void setVisible(boolean arg0) { + + if (!arg0 && previousState) { + pageCleanup(); + } else if (arg0 && !previousState) { + pageDisplay(); + } else if (arg0 && previousState) { + pageDisplay(); + } + + previousState = arg0; + + super.setVisible(arg0); + } + + public class ValidationListener implements SelectionListener, ModifyListener, Listener, ISelectionChangedListener, FocusListener { + + /* + * (non-Javadoc) + * + * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent) + */ + public void widgetSelected(SelectionEvent e) { +// validate(); + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent) + */ + public void widgetDefaultSelected(SelectionEvent e) { + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent) + */ + public void modifyText(ModifyEvent e) { + validate(); + } + + public void validate() { + if (validatePage()) { + updateModel(); + setPageComplete(true); + return; + } + + setPageComplete(false); + } + + /* (non-Javadoc) + * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event) + */ + public void handleEvent(Event event) { + + validate(); + } + + public void selectionChanged(SelectionChangedEvent event) { + validate(); + } + + @Override + public void focusGained(FocusEvent e) { + } + + @Override + public void focusLost(FocusEvent e) { + validate(); + } + } +} -- 1.7.9.5
|
|
[PATCH 6/8] Fix synchronous waiting for command prompt in Linux & connection lost when restarting
Ioana Grigoropol <ioanax.grigoropol@...>
- when waiting for an command to finish running, we wait to receive a command prompt using the syntax user@host....endChar. This pattern is not always encountered on local or remote connection from linux to linux. Instead echo some terminator value after each command and wait for recieve the value.
- when working on a Linux machine and creating a project using the Local connection, after a restart, the RSE registry fails to find the project's connection using its URI because there is no host set. Manually set the current connection to Localhost Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com> --- .../src/org/yocto/bc/bitbake/BBSession.java | 2 + .../src/org/yocto/bc/bitbake/ShellSession.java | 24 ++---- .../yocto/bc/remote/utils/ProcessStreamBuffer.java | 14 ++-- .../org/yocto/bc/remote/utils/RemoteHelper.java | 14 ++-- .../remote/utils/YoctoHostShellProcessAdapter.java | 28 +------ .../src/org/yocto/bc/ui/Activator.java | 79 ++++++-------------- .../src/org/yocto/bc/ui/model/ProjectInfo.java | 4 + .../bc/ui/wizards/NewBitBakeFileRecipeWizard.java | 7 +- .../ui/wizards/NewBitBakeFileRecipeWizardPage.java | 15 ++-- 9 files changed, 60 insertions(+), 127 deletions(-) diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBSession.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBSession.java index c5354a4..3aa4efe 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBSession.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/BBSession.java @@ -439,6 +439,8 @@ public class BBSession implements IBBSessionListener, IModelElement, Map { } protected void parse(String content, Map outMap) throws Exception { + if (content == null) + return; BufferedReader reader = new BufferedReader(new StringReader(content)); String line; boolean inLine = false; diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/ShellSession.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/ShellSession.java index f143bed..c127c25 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/ShellSession.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/bitbake/ShellSession.java @@ -81,24 +81,13 @@ public class ShellSession { this.projectInfo = pInfo; this.root = root; this.initCmd = initCmd; -// if (out == null) { -// this.out = new NullWriter(); -// } else { -// this.out = out; -// } -// if (shellType == SHELL_TYPE_SH) { -// shellPath = "/bin/sh"; -// } -// shellPath = "/bin/bash"; - initializeShell(new NullProgressMonitor()); } private void initializeShell(IProgressMonitor monitor) throws IOException { try { - IHost connection = RemoteHelper.getRemoteConnectionByName(projectInfo.getConnection().getName()); - RemoteHelper.runCommandRemote(connection, new YoctoCommand("source " + initCmd, root.getAbsolutePath(), "")); - RemoteHelper.runCommandRemote(connection, new YoctoCommand(exportCmd, root.getAbsolutePath(), "")); + RemoteHelper.runCommandRemote(projectInfo.getConnection(), new YoctoCommand("source " + initCmd, root.getAbsolutePath(), "")); + RemoteHelper.runCommandRemote(projectInfo.getConnection(), new YoctoCommand(exportCmd, root.getAbsolutePath(), "")); } catch (Exception e) { e.printStackTrace(); } @@ -113,9 +102,12 @@ public class ShellSession { public String execute(String command, boolean hasErrors) throws IOException { try { - IHost connection = RemoteHelper.getRemoteConnectionByName(projectInfo.getConnection().getName()); - hasErrors = RemoteHelper.runCommandRemote(connection, new YoctoCommand(command, root.getAbsolutePath() + "/build/", "")); - return RemoteHelper.getProcessBuffer(connection).getMergedOutputLines(); + if (projectInfo.getConnection() != null) { + IHost connection = RemoteHelper.getRemoteConnectionByName(projectInfo.getConnection().getName()); + hasErrors = RemoteHelper.runCommandRemote(connection, new YoctoCommand(command, root.getAbsolutePath() + "/build/", "")); + return RemoteHelper.getProcessBuffer(connection).getMergedOutputLines(); + } + return null; } catch (Exception e) { e.printStackTrace(); } diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/ProcessStreamBuffer.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/ProcessStreamBuffer.java index 438a5b4..2c6d122 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/ProcessStreamBuffer.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/ProcessStreamBuffer.java @@ -2,6 +2,7 @@ package org.yocto.bc.remote.utils; import java.util.ArrayList; import java.util.List; +import java.util.regex.Pattern; public class ProcessStreamBuffer { private static final String WHITESPACES = "\\s+"; @@ -54,17 +55,16 @@ public class ProcessStreamBuffer { return null; } - public String getOutputLineContaining(String str) { - int index = 0; + public String getOutputLineContaining(String arg, String pattern) { for (int i = outputLines.size() - 1; i >= 0; i--){ String line = outputLines.get(i); - if (line.contains(str)) { - index = i + 1; - break; + if (line.contains(arg)) { + String[] tokens = line.split("\\s+"); + if (Pattern.matches(pattern, tokens[0])) { + return tokens[0]; + } } } - if (index >= 0 && index < outputLines.size()) - return outputLines.get(index); return null; } } diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/RemoteHelper.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/RemoteHelper.java index f375de1..c230fd6 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/RemoteHelper.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/RemoteHelper.java @@ -45,6 +45,7 @@ import org.yocto.bc.ui.Activator; import org.yocto.bc.ui.wizards.install.Messages; public class RemoteHelper { + public static final String TERMINATOR = "234o987dsfkcqiuwey18837032843259d"; public static final int TOTALWORKLOAD = 100; private static Map<IHost, RemoteMachine> machines; @@ -95,9 +96,11 @@ public class RemoteHelper { return null; String host = uri.getHost(); - if (host == null) - return null; - + if (host == null) { + // this is a local connection + ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry(); + return sr.getLocalHost(); + } ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry(); IHost[] connections = sr.getHosts(); @@ -259,8 +262,9 @@ public class RemoteHelper { public void run() { try { YoctoHostShellProcessAdapter adapter = getHostShellProcessAdapter(connection); - adapter.setLastCommand(remoteCommand); - getHostShell(connection).writeToShell(remoteCommand); + String fullRemoteCommand = remoteCommand + "; echo " + TERMINATOR + ";"; + adapter.setLastCommand(fullRemoteCommand); + getHostShell(connection).writeToShell(fullRemoteCommand); while (!adapter.isFinished()) Thread.sleep(2); // return hostShellProcessAdapter.hasErrors(); diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/YoctoHostShellProcessAdapter.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/YoctoHostShellProcessAdapter.java index 2dba0a6..bb137b1 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/YoctoHostShellProcessAdapter.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/remote/utils/YoctoHostShellProcessAdapter.java @@ -17,10 +17,6 @@ import org.eclipse.rse.services.shells.IHostShellOutputReader; import org.eclipse.swt.widgets.Display; public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { - private String commandPrompt = null; - private static final String ROOT = "root"; - private static final String PROMPT_USER_CH = "$"; - private static final String PROMPT_ROOT_CH = "#"; private ProcessStreamBuffer processStreamBuffer; private CommandResponseHandler commandResponseHandler; private boolean isFinished; @@ -30,7 +26,6 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { private String command; private Map<String, IProgressMonitor> commandMonitors; - private String endChar = null; private Semaphore sem; @@ -57,9 +52,7 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { isFinished = false; sem.acquire(); this.command = lastCommand.trim(); - System.out.println("last command " + lastCommand + getOwnMonitor()); this.commandMonitors.put(command, getOwnMonitor()); - } catch (InterruptedException e) { e.printStackTrace(); } @@ -145,7 +138,6 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { if (value.isEmpty()) { continue; } - setCommandPrompt(value); System.out.println(value); this.processStreamBuffer.addErrorLine(value); this.commandResponseHandler.response(value, false); @@ -156,11 +148,7 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { if (value.isEmpty()) { continue; } - setCommandPrompt(value); - - if (commandPrompt != null && endChar != null && command != null && processStreamBuffer != null && - value.startsWith(commandPrompt) && value.endsWith(endChar) && - !value.endsWith(command) && processStreamBuffer.getLastOutputLineContaining(command) != null /*&& waitForOutput*/) { + if (value.endsWith(RemoteHelper.TERMINATOR)) { sem.release(); isFinished = true; } @@ -173,20 +161,6 @@ public class YoctoHostShellProcessAdapter extends HostShellProcessAdapter { } } - private void setCommandPrompt(String value) { - if (commandPrompt == null) { - if (value.startsWith(ROOT) && value.indexOf(PROMPT_ROOT_CH) != -1) { - int end = value.indexOf(PROMPT_ROOT_CH); - commandPrompt = value.substring(0, end); - endChar = PROMPT_ROOT_CH; - } else if (value.indexOf(PROMPT_USER_CH) != -1) { - int end = value.indexOf(PROMPT_USER_CH); - commandPrompt = value.substring(0, end); - endChar = PROMPT_USER_CH; - } - - } - } public boolean isFinished() { return isFinished; } diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/Activator.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/Activator.java index 64ca6a7..48c59d5 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/Activator.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/Activator.java @@ -24,10 +24,8 @@ import org.eclipse.core.resources.IResourceChangeListener; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.jface.resource.ImageRegistry; -import org.eclipse.rse.core.model.IHost; import org.eclipse.rse.services.files.IHostFile; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; @@ -68,7 +66,7 @@ public class Activator extends AbstractUIPlugin { return recipe; } - + /** * Get or create a BitBake session passing in ProjectInfo * @param pinfo @@ -80,40 +78,36 @@ public class Activator extends AbstractUIPlugin { if (bbSessionMap == null) { bbSessionMap = new Hashtable<URI, BBSession>(); } - - BBSession bbs = (BBSession) bbSessionMap.get(projectRoot); - + + BBSession bbs = bbSessionMap.get(projectRoot); + if (bbs == null) { bbs = new BBSession(getShellSession(projectInfo, out, monitor), projectRoot); bbSessionMap.put(projectRoot, bbs); } - + return bbs; } - + /** * Get or create a BitBake session passing in ProjectInfo * @param pinfo * @return - * @throws Exception + * @throws Exception */ public static BBSession getBBSession(ProjectInfo projectInfo, IProgressMonitor monitor) throws Exception { URI projectRoot = projectInfo.getURI(); if (bbSessionMap == null) { bbSessionMap = new Hashtable<URI, BBSession>(); } - - BBSession bbs = (BBSession) bbSessionMap.get(projectRoot); - + + BBSession bbs = bbSessionMap.get(projectRoot); + if (bbs == null) { bbs = new BBSession(getShellSession(projectInfo, null, monitor), projectRoot); bbSessionMap.put(projectRoot, bbs); - } else { - if (projectInfo.getConnection() == null) { - throw new Exception("The remote connection is null!"); - } } - + return bbs; } @@ -141,9 +135,7 @@ public class Activator extends AbstractUIPlugin { if (projInfoMap == null) { projInfoMap = new Hashtable<URI, ProjectInfo>(); } - - ProjectInfo pi = (ProjectInfo) projInfoMap.get(location); - + ProjectInfo pi = projInfoMap.get(location); if (pi == null) { pi = new ProjectInfo(); pi.setLocation(location); @@ -152,13 +144,10 @@ public class Activator extends AbstractUIPlugin { } catch (IOException e) { throw new InvocationTargetException(e); } - if (pi.getConnection() == null) { - IHost connection = RemoteHelper.getRemoteConnectionForURI(location, new NullProgressMonitor()); - pi.setConnection(connection); - } + projInfoMap.put(location, pi); } - + return pi; } @@ -175,7 +164,7 @@ public class Activator extends AbstractUIPlugin { if(bbSessionMap != null) { iter= bbSessionMap.values().iterator(); while(iter.hasNext()) { - BBSession p = (BBSession)iter.next(); + BBSession p = iter.next(); p.changeNotified(added, removed, changed); } } @@ -184,56 +173,31 @@ public class Activator extends AbstractUIPlugin { /** * @param absolutePath * @return a cached shell session for a given project root. - * @throws IOException + * @throws IOException */ private static ShellSession getShellSession(ProjectInfo projInfo, Writer out, IProgressMonitor monitor) throws IOException { URI absolutePath = projInfo.getURI(); if (shellMap == null) { shellMap = new Hashtable<String, ShellSession>(); } - - ShellSession ss = (ShellSession) shellMap.get(absolutePath); - + + ShellSession ss = shellMap.get(absolutePath); + if (ss == null) { -// if (conn == null) -// RemoteHelper.getRemoteConnectionByName(); IHostFile remoteHostFile = RemoteHelper.getRemoteHostFile(projInfo.getConnection(), absolutePath.getPath(), monitor); ss = new ShellSession(projInfo, ShellSession.SHELL_TYPE_BASH, remoteHostFile, ProjectInfoHelper.getInitScriptPath(absolutePath), out); } - + return ss; } -// private static String loadInit(String absolutePath) throws CoreException { -// IProject [] prjs = ResourcesPlugin.getWorkspace().getRoot().getProjects(); -// IProject foundPrj = null; -// -// for (int i = 0; i < prjs.length; ++i) { -// IProject p = prjs[i]; -// -// System.out -// .println(p.getDescription().getLocationURI().getPath()); -// -// if (p.getDescription().getLocationURI().getPath().equals(absolutePath)) { -// foundPrj = p; -// break; -// } -// } -// -// if (foundPrj == null) { -// throw new RuntimeException("Unable to find project associated with path! " + absolutePath); -// } -// -// return foundPrj.getPersistentProperty(CreateBBCProjectOperation.BBC_PROJECT_INIT); -// } - public static void putProjInfo(URI location, ProjectInfo pinfo) { if (projInfoMap == null) { projInfoMap = new Hashtable<URI, ProjectInfo>(); } projInfoMap.put(location, pinfo); } - + /** * The constructor */ @@ -273,6 +237,7 @@ public class Activator extends AbstractUIPlugin { bbSessionMap.remove(path); } + @Override protected void initializeImageRegistry(ImageRegistry reg) { reg.put(IMAGE_VARIABLE, Activator.getImageDescriptor("icons/variable.gif")); reg.put(IMAGE_FUNCTION, Activator.getImageDescriptor("icons/function.gif")); diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/ProjectInfo.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/ProjectInfo.java index 5fc4ba2..4530bb3 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/ProjectInfo.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/model/ProjectInfo.java @@ -13,6 +13,7 @@ package org.yocto.bc.ui.model; import java.net.URI; import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.ptp.remote.core.IRemoteConnection; import org.eclipse.ptp.remote.core.IRemoteServices; import org.eclipse.rse.core.model.IHost; @@ -58,6 +59,9 @@ public class ProjectInfo implements IModelElement { } public IHost getConnection() { + if (connection == null) { + connection = RemoteHelper.getRemoteConnectionForURI(location, new NullProgressMonitor()); + } return connection; } diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/NewBitBakeFileRecipeWizard.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/NewBitBakeFileRecipeWizard.java index 57cad18..8457996 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/NewBitBakeFileRecipeWizard.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/NewBitBakeFileRecipeWizard.java @@ -118,10 +118,7 @@ public class NewBitBakeFileRecipeWizard extends Wizard implements INewWizard { IProject p = ((IResource)element).getProject(); try { ProjectInfo projInfo = Activator.getProjInfo(p.getLocationURI()); - if (projInfo.getConnection() == null) - this.connection = RemoteHelper.getRemoteConnectionForURI(p.getLocationURI(), new NullProgressMonitor()); - else - this.connection = projInfo.getConnection(); + this.connection = projInfo.getConnection(); } catch (CoreException e) { e.printStackTrace(); } catch (InvocationTargetException e) { @@ -205,7 +202,7 @@ public class NewBitBakeFileRecipeWizard extends Wizard implements INewWizard { public void run(IProgressMonitor monitor) throws InvocationTargetException { try { doFinish(element, monitor); - RemoteHelper.runCommandRemote(connection, new YoctoCommand("rm -rf temp", element.getMetaDir() + "/temp", "")); + RemoteHelper.runCommandRemote(connection, new YoctoCommand("rm -rf " + element.getMetaDir() + "/temp", "", "")); } catch (Exception e) { throw new InvocationTargetException(e); } finally { diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/NewBitBakeFileRecipeWizardPage.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/NewBitBakeFileRecipeWizardPage.java index e9dc1f3..a52c2fe 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/NewBitBakeFileRecipeWizardPage.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/NewBitBakeFileRecipeWizardPage.java @@ -397,22 +397,17 @@ public class NewBitBakeFileRecipeWizardPage extends WizardPage { updateSrcUri(mirrorTable, srcURI); populateInheritance(extractDir, monitor); - String md5Val = retrieveSum(md5YCmd); + String md5Val = retrieveSum(srcFileNameExt, md5Pattern); md5sumText.setText(Pattern.matches(md5Pattern, md5Val) ? md5Val : ""); - String sha256Val = retrieveSum(sha256YCmd); + String sha256Val = retrieveSum(srcFileNameExt, sha256Pattern); sha256sumText.setText(Pattern.matches(sha256Pattern, sha256Val) ? sha256Val : ""); - String checkSumVal = retrieveSum(licenseChecksumCmd); + String checkSumVal = retrieveSum(COPYING_FILE, md5Pattern); checksumText.setText(RemoteHelper.createNewURI(extractDir, COPYING_FILE).toString() + ";md5=" + (Pattern.matches(md5Pattern, checkSumVal) ? checkSumVal : "")); } - private String retrieveSum(YoctoCommand cmd) { + private String retrieveSum(String arg, String pattern) { ProcessStreamBuffer buffer = RemoteHelper.getProcessBuffer(this.connection); - String line = buffer.getOutputLineContaining(cmd.getCommand()); - if (line != null) { - String[] tokens = line.split(WHITESPACES); - return tokens[0]; - } - return ""; + return buffer.getOutputLineContaining(arg, pattern); } private URI extractPackage(URI srcURI) { -- 1.7.9.5
|
|
[PATCH 5/8] Remove validation for existing git repository
Ioana Grigoropol <ioanax.grigoropol@...>
Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com>
--- .../yocto/bc/ui/wizards/install/OptionsPage.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java index 37c12f8..9e94aea 100644 --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java @@ -170,11 +170,11 @@ public class OptionsPage extends FiniteStateWizardPage { setErrorMessage("Directory " + projectPath + " does not exist, please select git clone."); return false; } - IHostFile gitDescr = RemoteHelper.getRemoteHostFile(connection, projectPath + "/.git", new NullProgressMonitor()); - if (gitDescr == null || !gitDescr.exists()) { - setErrorMessage("Directory " + projectPath + " does not contain a git repository, please select git clone."); - return false; - } +// IHostFile gitDescr = RemoteHelper.getRemoteHostFile(connection, projectPath + "/.git", new NullProgressMonitor()); +// if (gitDescr == null || !gitDescr.exists()) { +// setErrorMessage("Directory " + projectPath + " does not contain a git repository, please select git clone."); +// return false; +// } IHostFile validationFile = RemoteHelper.getRemoteHostFile(connection, projectPath + URI_SEPARATOR + InstallWizard.VALIDATION_FILE, new NullProgressMonitor()); if (validationFile == null || !validationFile.exists()) { -- 1.7.9.5
|
|