[yocto] Adding a mount for a second partition
My image is a live image that is booted from a flash drive. The drive actually has two partitions on it, and I'd like the second partition to get mounted on startup. I believe that what I need is to create a mount point in the image's file system, and also append a line to /etc/fstab. How do I write a recipe to do those two things? -- Ciao, Paul D. DeRocco Paulmailto:pdero...@ix.netcom.com ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Adding a mount for a second partition
Hi, If I am not wrong the file mount.sh in udev already does this but I dont know if it different for a live image ... On Fri, Jun 21, 2013 at 10:37 AM, Paul D. DeRocco wrote: > My image is a live image that is booted from a flash drive. The drive > actually has two partitions on it, and I'd like the second partition to get > mounted on startup. I believe that what I need is to create a mount point > in > the image's file system, and also append a line to /etc/fstab. How do I > write a recipe to do those two things? > > -- > > Ciao, Paul D. DeRocco > Paulmailto:pdero...@ix.netcom.com > > > ___ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto > ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] -rt and COMPATIBLE_MACHINES
Hi Paul, On 20/06/13 20:40, Paul D. DeRocco wrote: > My question is this: why was I able to build core-image base without > complaint in the first place? The kernel recipes it has available > (linux-yocto_*) also set COMPATIBLE_MACHINE to a list of qemu machines. It probably built the linux-dummy recipe. An easy way to see which recipe is being used is to run 'bitbake virtual/kernel'. Tomas -- http://sleepfive.com ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] toolchain's environment-setup file that includes the image generated rootfs
Then how should I go about adding a --sysroots statement in the generated meta-toolchain, of the generated image? From: jessica.zh...@intel.com To: djnass...@hotmail.com; yocto@yoctoproject.org Subject: RE: [yocto] toolchain's environment-setup file that includes the image generated rootfs Date: Wed, 19 Jun 2013 16:26:14 + Overall, we don’t suggest user to copy and alter the environment-setup file manually. From: yocto-boun...@yoctoproject.org [mailto:yocto-boun...@yoctoproject.org] On Behalf Of Thanassis Silis Sent: Tuesday, June 18, 2013 7:19 AM To: yocto@yoctoproject.org Subject: [yocto] toolchain's environment-setup file that includes the image generated rootfs hello everyone, tampering with eclipse I was advised to use the image generated rootfs for sysroot entry, under window->preferences->Yocto Project ADT. I also used the meta-toolchain, which is extracted under /opt/poky/ If I copy extract the same toolchain and sysroots to another pc, I should alter the environment-setup file. Looking into this file some changes are obvious. Variables: CC, CXX, CPP, LD should be appended with " --sysroot=/path/to/image-rootfs/", next to the already existing "--sysroot=/opt/poky/1.4.1/sysroots/armv7a-vfp-neon-poky-linux-gnueabi". It is not clear if the above should be appended in the CONFIGURE_FLAGS="--target=arm-poky-linux-gnueabi --host=arm-poky-linux-gnueabi --build=x86_64-linux --with-libtool-sysroot=/opt/poky/1.4.1/sysroots/armv7a-vfp-neon-poky-linux-gnueabi" as well. Thank you. ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] Permission denied while accessing qmake of meta-toolchain-qte
Hi, I need to compile Qt Code for Yocto image. I have installed meta toolchain using bitbake meta-toolchain-qte It has created the SDK in ../meta-toolchain-qte-1.0-r7/sdk/image/poky/1.3.2/sysroots . Now i am trying to build qt code for my Yocto image as : source /poky/1.3.2/environment-setup-armv7a-vfp-neon-poky-linux-gnueabi qmake but for qmake, it throws me error as: qmake - permission denied I tried both from user and root. Could you please let me know if there is some permissions to be changed. -- Thanks & Regards, Vishal Jain ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] cannot bitbake/build.compile tcf-agent for use with fsl-image-gui-sdk
Hi Anna, yes it was an OpenSSL dependency, but it seems weird to bump into such a problem. I mean This seems to have been rectified or more ppl would bump into it. In the end it was some problem with the packages_deb. There seem to be some bug related to deb packaging. I only set deb packaging because it seems more compatible as I am on a Ubuntu system. rpm packagin on the other hand worked nicely. Date: Fri, 21 Jun 2013 10:24:16 +0400 Subject: Re: [yocto] cannot bitbake/build.compile tcf-agent for use with fsl-image-gui-sdk From: anna.dushist...@gmail.com To: raj.k...@gmail.com CC: djnass...@hotmail.com; meta-freesc...@yoctoproject.org; yocto@yoctoproject.org Hi everyone, On Tue, Jun 18, 2013 at 7:24 PM, Khem Raj wrote: <...> Seems a missing dep on OpenSSL btw does tcf-agent work on anything other than x86 ? First of all, it's possible to compile the agent with OpenSSL disabled, you will need to set ENABLE_SSL to 0 in your CFLAGS, see http://git.eclipse.org/c/tcf/org.eclipse.tcf.agent.git/tree/agent/tcf/config.h#n213. Then, tcf-agent as the means of communication works on all the main platforms, and as of this upcoming release,there is an initial debug support on ARM, see http://wiki.eclipse.org/TCF/NewIn11. Anna. At this point I have run out of ideas about how to prepare tcf-agent to install on my sabrelite fsl-image-gui-sdk rootfs Any help would be most welcome. for example in the 1st case how could I run apt-get as is suggested in a manner that would be appropriate to update yocto sources? Thank you. ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] [meta-freescale] cannot bitbake/build.compile tcf-agent for use with fsl-image-gui-sdk
On Fri, Jun 21, 2013 at 9:26 AM, Thanassis Silis wrote: ... > In the end it was some problem with the packages_deb. There seem to be some > bug related to deb packaging. I only set deb packaging because it seems more > compatible as I am on a Ubuntu system. > rpm packagin on the other hand worked nicely. ... I am a Debian fun (not much an Ubuntu one thought) and I use the ipk backend. The ipk is mostly a .deb but handled with 'opkg'. You can even use dpkg-deb to check control information and its contents. So it is a .deb for use in embedded. The opkg tool has soon changes to fit better in embedded requirements so this is my default option. -- Otavio Salvador O.S. Systems http://www.ossystems.com.brhttp://projetos.ossystems.com.br Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750 ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] [PATCHv2 2/8] plugins/sdk.ide: Extract project specific util methods
From: Timo Mueller Project specific util methods are moved to a separate util class. This way the general util class will get more concise and other project specific methods can be move to this new util class later. Signed-off-by: Timo Mueller --- .../natures/YoctoSDKAutotoolsProjectNature.java| 3 +- .../ide/preferences/YoctoSDKPreferencePage.java| 11 +- .../preferences/YoctoSDKProjectPropertyPage.java | 13 +- .../sdk/ide/utils/ProjectPreferenceUtils.java | 138 + .../src/org/yocto/sdk/ide/utils/YoctoSDKUtils.java | 118 -- .../ide/wizard/NewYoctoProjectTemplateProcess.java | 3 +- 6 files changed, 155 insertions(+), 131 deletions(-) create mode 100644 plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/utils/ProjectPreferenceUtils.java diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/natures/YoctoSDKAutotoolsProjectNature.java b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/natures/YoctoSDKAutotoolsProjectNature.java index fb53c53..ce80d77 100644 --- a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/natures/YoctoSDKAutotoolsProjectNature.java +++ b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/natures/YoctoSDKAutotoolsProjectNature.java @@ -18,6 +18,7 @@ import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; import org.eclipse.core.resources.IProject; import org.yocto.sdk.ide.YoctoSDKPlugin; import org.yocto.sdk.ide.YoctoUIElement; +import org.yocto.sdk.ide.utils.ProjectPreferenceUtils; import org.yocto.sdk.ide.utils.YoctoSDKUtils; public class YoctoSDKAutotoolsProjectNature extends YoctoSDKProjectNature { @@ -35,7 +36,7 @@ public class YoctoSDKAutotoolsProjectNature extends YoctoSDKProjectNature { public static void configureAutotoolsOptions(IProject project) { IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project); IConfiguration icfg = info.getDefaultConfiguration(); - YoctoUIElement elem = YoctoSDKUtils.getElemFromProjectEnv(project); + YoctoUIElement elem = ProjectPreferenceUtils.getElemFromProjectEnv(project); String sysroot_str = elem.getStrSysrootLoc(); String id = icfg.getId(); String CFLAGS_str = YoctoSDKUtils.getEnvValue(project, "CFLAGS"); diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKPreferencePage.java b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKPreferencePage.java index 211c4f9..e8123e2 100644 --- a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKPreferencePage.java +++ b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKPreferencePage.java @@ -34,6 +34,7 @@ import org.yocto.sdk.ide.YoctoProfileSetting; import org.yocto.sdk.ide.YoctoSDKChecker.SDKCheckRequestFrom; import org.yocto.sdk.ide.YoctoSDKChecker.SDKCheckResults; import org.yocto.sdk.ide.natures.YoctoSDKProjectNature; +import org.yocto.sdk.ide.utils.ProjectPreferenceUtils; import org.yocto.sdk.ide.utils.YoctoSDKUtils; import org.yocto.sdk.ide.YoctoSDKMessages; import org.yocto.sdk.ide.YoctoSDKPlugin; @@ -240,10 +241,10 @@ public class YoctoSDKPreferencePage extends PreferencePage implements IWorkbench for (IProject project : yoctoProjects) { - YoctoSDKUtils.saveProfilesToProjectPreferences(profileElement, project); + ProjectPreferenceUtils.saveProfilesToProjectPreferences(profileElement, project); YoctoUIElement elem = YoctoSDKUtils.getElemFromStore( YoctoSDKPlugin.getProfilePreferenceStore(PreferenceConstants.STANDARD_PROFILE_NAME)); - YoctoSDKUtils.saveElemToProjectEnv(elem, project); + ProjectPreferenceUtils.saveElemToProjectEnv(elem, project); } } @@ -254,14 +255,14 @@ public class YoctoSDKPreferencePage extends PreferencePage implements IWorkbench for (IProject project : yoctoProjects) { - YoctoSDKUtils.saveProfilesToProjectPreferences(profileElement, project); + ProjectPreferenceUtils.saveProfilesToProjectPreferences(profileElement, project); } } private void updateProjects(HashSet yoctoProjects, YoctoUIElement elem) { for (IProject project : yoctoProjects) { - YoctoSDKUtils.saveElemToProjectEnv(elem, project); + ProjectPreferenceUtils.saveElemToProjectEnv(elem, project); } } @@ -295,7 +296,7 @@ public class YoctoSDKPreferencePage extends PreferencePage implements IWorkbench private boolean projectUsesProfile(IProject project, String profile) { - YoctoProfileElement profileEleme
[yocto] [PATCHv2 0/8][eclipse-poky] Add target profile quick switch
From: Timo Mueller Changes in v2: Handle error when project specific profile is not configured more gracefully. Instead of showing an error message the button is now greyed out. Patches 01..07 contain the implementation with the greyed out menu button. After playing around with the two options discussed in the first patch series, I started to prefer inserting a different button in the menu allowing the user to quickly navigate to the project preferences instead of just greying it out. I've added this in the last patch of the series, so you can compare yourself. >From original cover letter if a user wants to change the used target profile of a project he currently has to open the project preferences. This can be tedious if he has to switch the profile often. This is a small addition which allows the user to quickly switch the used target profile of a project. Instead of having to open the project preferences the user can select the project in the navigator and then choose the desired target profile from a drop-down menu in the toolbar or from the project menu. 01: Small i18n fix 02..04: Refactoring the project specific utils 05..06: Introduce the target profile toolbar switch 07: Adds the target profile switch to the project menu 08: Experimental: Add button to open project preferences Best regards, Timo Timo Mueller (8): plugins/sdk.ide: Use an internationalized dialog title plugins/sdk.ide: Extract project specific util methods plugins/sdk.ide: Move project specific util methods plugins/sdk.ide: Remove project context from method names plugins/sdk.ide: Add command to switch the target profile plugins/sdk.ide: Add profile switch menu to the toolbar plugins/sdk.ide: Add profile switch menu to the project menu plugins/sdk.ide: Add project configuration button .../OSGI-INF/l10n/bundle.properties| 4 + plugins/org.yocto.sdk.ide/plugin.xml | 96 - .../sdk/ide/ProjectSpecificContributionItem.java | 91 .../sdk/ide/TargetProfileContributionItem.java | 125 +++ .../org/yocto/sdk/ide/YoctoSDKMessages.properties | 5 + .../src/org/yocto/sdk/ide/YoctoUISetting.java | 3 +- .../sdk/ide/actions/ProfileSwitchHandler.java | 134 .../natures/YoctoSDKAutotoolsProjectNature.java| 3 +- .../ide/preferences/YoctoSDKPreferencePage.java| 11 +- .../preferences/YoctoSDKProjectPropertyPage.java | 130 ++- .../sdk/ide/utils/ProjectPreferenceUtils.java | 240 + .../src/org/yocto/sdk/ide/utils/YoctoSDKUtils.java | 118 -- .../ide/wizard/NewYoctoProjectTemplateProcess.java | 3 +- 13 files changed, 717 insertions(+), 246 deletions(-) create mode 100644 plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/ProjectSpecificContributionItem.java create mode 100644 plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/TargetProfileContributionItem.java create mode 100644 plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/actions/ProfileSwitchHandler.java create mode 100644 plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/utils/ProjectPreferenceUtils.java -- 1.8.1.4 ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] [PATCHv2 1/8] plugins/sdk.ide: Use an internationalized dialog title
From: Timo Mueller Signed-off-by: Timo Mueller --- plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoUISetting.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoUISetting.java b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoUISetting.java index e5a7897..d192538 100644 --- a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoUISetting.java +++ b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoUISetting.java @@ -42,7 +42,6 @@ import org.yocto.sdk.ide.YoctoSDKChecker.SDKCheckResults; import org.yocto.sdk.ide.preferences.PreferenceConstants; public class YoctoUISetting { - private static final String ENV_SCRIPT_FILE_PREFIX = "environment-setup-"; private SelectionListener fSelectionListener; @@ -375,7 +374,7 @@ public class YoctoUISetting { if ((result != SDKCheckResults.SDK_PASS) && showErrorDialog) { Display display = Display.getCurrent(); ErrorDialog.openError(display.getActiveShell(), - "Yocto Project Configuration Error", + YoctoSDKChecker.SDKCheckRequestFrom.Other.getErrorMessage(), YoctoSDKChecker.getErrorMessage(result, from), new Status(Status.ERROR, YoctoSDKPlugin.PLUGIN_ID, result.getMessage())); -- 1.8.1.4 ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] [PATCHv2 7/8] plugins/sdk.ide: Add profile switch menu to the project menu
From: Timo Mueller If a project with a yocto nature is selected, the project menu will show a target profile menu which allows the user to switch the used target profile of the project. Signed-off-by: Timo Mueller --- plugins/org.yocto.sdk.ide/plugin.xml | 25 + 1 file changed, 25 insertions(+) diff --git a/plugins/org.yocto.sdk.ide/plugin.xml b/plugins/org.yocto.sdk.ide/plugin.xml index aaa0a35..c082c3a 100644 --- a/plugins/org.yocto.sdk.ide/plugin.xml +++ b/plugins/org.yocto.sdk.ide/plugin.xml @@ -251,6 +251,15 @@ point="org.eclipse.ui.menus"> + + + + @@ -284,6 +293,22 @@ + + + + + + + + https://lists.yoctoproject.org/listinfo/yocto
[yocto] [PATCHv2 4/8] plugins/sdk.ide: Remove project context from method names
From: Timo Mueller Through the context of the ProjectPreferenceUtil class we can infer that all methods act on project preferences. Having this context information duplicated in the method name is not needed anymore and can be removed to get a cleaner API. Signed-off-by: Timo Mueller --- .../sdk/ide/preferences/YoctoSDKPreferencePage.java | 6 +++--- .../sdk/ide/preferences/YoctoSDKProjectPropertyPage.java | 16 .../org/yocto/sdk/ide/utils/ProjectPreferenceUtils.java | 12 ++-- .../sdk/ide/wizard/NewYoctoProjectTemplateProcess.java | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKPreferencePage.java b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKPreferencePage.java index e8123e2..4e6ca2a 100644 --- a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKPreferencePage.java +++ b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKPreferencePage.java @@ -241,7 +241,7 @@ public class YoctoSDKPreferencePage extends PreferencePage implements IWorkbench for (IProject project : yoctoProjects) { - ProjectPreferenceUtils.saveProfilesToProjectPreferences(profileElement, project); + ProjectPreferenceUtils.saveProfiles(profileElement, project); YoctoUIElement elem = YoctoSDKUtils.getElemFromStore( YoctoSDKPlugin.getProfilePreferenceStore(PreferenceConstants.STANDARD_PROFILE_NAME)); ProjectPreferenceUtils.saveElemToProjectEnv(elem, project); @@ -255,7 +255,7 @@ public class YoctoSDKPreferencePage extends PreferencePage implements IWorkbench for (IProject project : yoctoProjects) { - ProjectPreferenceUtils.saveProfilesToProjectPreferences(profileElement, project); + ProjectPreferenceUtils.saveProfiles(profileElement, project); } } @@ -296,7 +296,7 @@ public class YoctoSDKPreferencePage extends PreferencePage implements IWorkbench private boolean projectUsesProfile(IProject project, String profile) { - YoctoProfileElement profileElement = ProjectPreferenceUtils.getProfilesFromProjectPreferences(project); + YoctoProfileElement profileElement = ProjectPreferenceUtils.getProfiles(project); if (!profileElement.getSelectedProfile().equals(profile)) { return false; diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKProjectPropertyPage.java b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKProjectPropertyPage.java index 1f82fe1..f6026ee 100644 --- a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKProjectPropertyPage.java +++ b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKProjectPropertyPage.java @@ -64,7 +64,7 @@ public class YoctoSDKProjectPropertyPage extends PropertyPage implements IProject project = getProject(); YoctoProfileElement globalProfileElement= YoctoSDKUtils.getProfilesFromDefaultStore(); - YoctoProfileElement profileElement = ProjectPreferenceUtils.getProfilesFromProjectPreferences(project); + YoctoProfileElement profileElement = ProjectPreferenceUtils.getProfiles(project); String selectedProfile = profileElement.getSelectedProfile(); if (!globalProfileElement.contains(selectedProfile)) { @@ -73,10 +73,10 @@ public class YoctoSDKProjectPropertyPage extends PropertyPage implements yoctoProfileSetting = new YoctoProfileSetting( new YoctoProfileElement(globalProfileElement.getProfilesAsString(), selectedProfile), this, false); - boolean useProjectSpecificSetting = ProjectPreferenceUtils.getUseProjectSpecificOptionFromProjectPreferences(project); + boolean useProjectSpecificSetting = ProjectPreferenceUtils.getUseProjectSpecificOption(project); if (useProjectSpecificSetting) { - yoctoUISetting = new YoctoUISetting(ProjectPreferenceUtils.getElemFromProjectPreferences(project)); + yoctoUISetting = new YoctoUISetting(ProjectPreferenceUtils.getElem(project)); } else { yoctoUISetting = new YoctoUISetting(YoctoSDKUtils.getElemFromStore(YoctoSDKPlugin.getProfilePreferenceStore(selectedProfile))); } @@ -154,12 +154,12 @@ public class YoctoSDKProjectPropertyPage extends PropertyPage implements return false; } - ProjectPreferenceUtils.saveUseProjectSpeci
[yocto] [PATCHv2 3/8] plugins/sdk.ide: Move project specific util methods
From: Timo Mueller Move project specific methods to the new util class to allow public usage of theses methods. Signed-off-by: Timo Mueller --- .../preferences/YoctoSDKProjectPropertyPage.java | 121 ++--- .../sdk/ide/utils/ProjectPreferenceUtils.java | 102 + 2 files changed, 109 insertions(+), 114 deletions(-) diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKProjectPropertyPage.java b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKProjectPropertyPage.java index f075c5b..1f82fe1 100644 --- a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKProjectPropertyPage.java +++ b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/preferences/YoctoSDKProjectPropertyPage.java @@ -13,12 +13,8 @@ package org.yocto.sdk.ide.preferences; import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.ProjectScope; import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.core.runtime.preferences.IEclipsePreferences; -import org.eclipse.core.runtime.preferences.IScopeContext; import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; @@ -27,19 +23,17 @@ import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; import org.eclipse.ui.IWorkbenchPropertyPage; import org.eclipse.ui.dialogs.PropertyPage; -import org.osgi.service.prefs.BackingStoreException; import org.yocto.sdk.ide.YoctoProfileElement; import org.yocto.sdk.ide.YoctoProfileSetting; import org.yocto.sdk.ide.YoctoProjectSpecificSetting; import org.yocto.sdk.ide.YoctoSDKChecker.SDKCheckRequestFrom; import org.yocto.sdk.ide.YoctoSDKChecker.SDKCheckResults; import org.yocto.sdk.ide.YoctoSDKMessages; -import org.yocto.sdk.ide.utils.ProjectPreferenceUtils; -import org.yocto.sdk.ide.utils.YoctoSDKUtils; -import org.yocto.sdk.ide.utils.YoctoSDKUtilsConstants; import org.yocto.sdk.ide.YoctoSDKPlugin; import org.yocto.sdk.ide.YoctoUIElement; import org.yocto.sdk.ide.YoctoUISetting; +import org.yocto.sdk.ide.utils.ProjectPreferenceUtils; +import org.yocto.sdk.ide.utils.YoctoSDKUtils; public class YoctoSDKProjectPropertyPage extends PropertyPage implements IWorkbenchPropertyPage { @@ -79,10 +73,10 @@ public class YoctoSDKProjectPropertyPage extends PropertyPage implements yoctoProfileSetting = new YoctoProfileSetting( new YoctoProfileElement(globalProfileElement.getProfilesAsString(), selectedProfile), this, false); - boolean useProjectSpecificSetting = getUseProjectSpecificOptionFromProjectPreferences(project); + boolean useProjectSpecificSetting = ProjectPreferenceUtils.getUseProjectSpecificOptionFromProjectPreferences(project); if (useProjectSpecificSetting) { - yoctoUISetting = new YoctoUISetting(getElemFromProjectPreferences(project)); + yoctoUISetting = new YoctoUISetting(ProjectPreferenceUtils.getElemFromProjectPreferences(project)); } else { yoctoUISetting = new YoctoUISetting(YoctoSDKUtils.getElemFromStore(YoctoSDKPlugin.getProfilePreferenceStore(selectedProfile))); } @@ -160,11 +154,11 @@ public class YoctoSDKProjectPropertyPage extends PropertyPage implements return false; } - saveUseProjectSpecificOptionToProjectPreferences(project, true); + ProjectPreferenceUtils.saveUseProjectSpecificOptionToProjectPreferences(project, true); ProjectPreferenceUtils.saveProfilesToProjectPreferences(yoctoProfileSetting.getCurrentInput(), project); - saveElemToProjectPreferences(yoctoUISetting.getCurrentInput(), project); + ProjectPreferenceUtils.saveElemToProjectPreferences(yoctoUISetting.getCurrentInput(), project); } else { - saveUseProjectSpecificOptionToProjectPreferences(project, false); + ProjectPreferenceUtils.saveUseProjectSpecificOptionToProjectPreferences(project, false); ProjectPreferenceUtils.saveProfilesToProjectPreferences(yoctoProfileSetting.getCurrentInput(), project); } @@ -173,107 +167,6 @@ public class YoctoSDKProjectPropertyPage extends PropertyPage implements return super.performOk(); } - private void saveUseProjectSpecificOptionToProjectPreferences(IProject project, boolean useProjectSpecificSetting) { - IScopeContext projectScope = new ProjectScope(project); - IEclipsePreferences projectNode = projectScope.getNode(YoctoSDKUtilsConstants.PROJECT_SCOPE); - if (
[yocto] [PATCHv2 8/8] plugins/sdk.ide: Add project configuration button
From: Timo Mueller This changes the behaviour of the project specific profile button. If the project specific profile is not yet defined for the selected project, the list will contain a button to open the project preferences instead of the greying out the button. Signed-off-by: Timo Mueller --- plugins/org.yocto.sdk.ide/plugin.xml | 4 .../src/org/yocto/sdk/ide/ProjectSpecificContributionItem.java| 8 +--- .../src/org/yocto/sdk/ide/YoctoSDKMessages.properties | 1 + 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/plugins/org.yocto.sdk.ide/plugin.xml b/plugins/org.yocto.sdk.ide/plugin.xml index c082c3a..04ed40e 100644 --- a/plugins/org.yocto.sdk.ide/plugin.xml +++ b/plugins/org.yocto.sdk.ide/plugin.xml @@ -81,10 +81,6 @@ id="org.yocto.sdk.ide.command.reconfigYocto" name="%command.name"> - - diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/ProjectSpecificContributionItem.java b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/ProjectSpecificContributionItem.java index 41374a6..13e0e7a 100644 --- a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/ProjectSpecificContributionItem.java +++ b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/ProjectSpecificContributionItem.java @@ -27,9 +27,11 @@ import org.yocto.sdk.ide.actions.ProfileSwitchHandler; import org.yocto.sdk.ide.utils.ProjectPreferenceUtils; public class ProjectSpecificContributionItem extends TargetProfileContributionItem { + private static final String CONFIGURE_PROJECT_SPECIFIC_PROFILE = + "Preferences.Profile.ProjectSpecific.Configure.Label"; //$NON-NLS-N$ private static final String PROJECT_SPECIFIC_PROFILE = "Preferences.Profile.ProjectSpecific.Profile.Label"; //$NON-NLS-N$ - private static final String DISABLED_COMMAND_ID = "org.yocto.sdk.ide.command.disabled"; //$NON-NLS-N$ + private static final String RECONFIG_YOCTO_COMMAND_ID = "org.yocto.sdk.ide.command.reconfigYocto"; //$NON-NLS-N$ private IServiceLocator serviceLocator; @@ -50,10 +52,10 @@ public class ProjectSpecificContributionItem extends TargetProfileContributionIt if ((result != SDKCheckResults.SDK_PASS)) { CommandContributionItemParameter parameter = new CommandContributionItemParameter(serviceLocator, null, - DISABLED_COMMAND_ID, + RECONFIG_YOCTO_COMMAND_ID, CommandContributionItem.STYLE_PUSH); - parameter.label = YoctoSDKMessages.getString(PROJECT_SPECIFIC_PROFILE); + parameter.label = YoctoSDKMessages.getString(CONFIGURE_PROJECT_SPECIFIC_PROFILE); items.add(new CommandContributionItem(parameter)); } else { diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoSDKMessages.properties b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoSDKMessages.properties index e71b7dd..f545c2b 100644 --- a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoSDKMessages.properties +++ b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoSDKMessages.properties @@ -89,6 +89,7 @@ Preferences.Profile.Standard.Modification.Message = Standard cross development p Preferences.Profile.ProjectSpecific.Title = Use project specific settings Preferences.Profile.ProjectSpecific.Group.Title = Project specific settings: Preferences.Profile.ProjectSpecific.Profile.Label = Project specific profile +Preferences.Profile.ProjectSpecific.Configure.Label = Configure project specific profile ... Preferences.Profile.ProjectSpecific.Error.Title = Could not change to project specific target profile Preferences.Profile.ProjectSpecific.Error.Message = The project specific target profile is not defined for the project "{0}".\nYou can define it in the project's property page. -- 1.8.1.4 ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] [PATCHv2 5/8] plugins/sdk.ide: Add command to switch the target profile
From: Timo Mueller The command can be used in a radio group to switch the target profile of a selected project. Radio items should call this command handing over the name of the target profile as the command's parameter. Signed-off-by: Timo Mueller --- .../OSGI-INF/l10n/bundle.properties| 3 + plugins/org.yocto.sdk.ide/plugin.xml | 18 .../org/yocto/sdk/ide/YoctoSDKMessages.properties | 3 + .../sdk/ide/actions/ProfileSwitchHandler.java | 110 + 4 files changed, 134 insertions(+) create mode 100644 plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/actions/ProfileSwitchHandler.java diff --git a/plugins/org.yocto.sdk.ide/OSGI-INF/l10n/bundle.properties b/plugins/org.yocto.sdk.ide/OSGI-INF/l10n/bundle.properties index 48eb653..1191af6 100644 --- a/plugins/org.yocto.sdk.ide/OSGI-INF/l10n/bundle.properties +++ b/plugins/org.yocto.sdk.ide/OSGI-INF/l10n/bundle.properties @@ -6,6 +6,9 @@ extension.name.2 = YoctoSDKCMakeNature command.name = ReconfigureYoctoProject command.label.0 = Change Yocto Project Settings command.mnemonic = C +command.targetProfileSwitch.name = Change Target Profile +command.targetProfileSwitch.description = Changes the target profile of a selected project +command.targetProfileSwitch.parameter.name = Selected Target Profile projectType.name.0 = Yocto Project ADT Autotools Project projectProperties.label.0 = Yocto Project Settings Bundle-Vendor = yoctoproject.org diff --git a/plugins/org.yocto.sdk.ide/plugin.xml b/plugins/org.yocto.sdk.ide/plugin.xml index 7ea55c7..62f1297 100644 --- a/plugins/org.yocto.sdk.ide/plugin.xml +++ b/plugins/org.yocto.sdk.ide/plugin.xml @@ -225,5 +225,23 @@ + + + + + + + + diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoSDKMessages.properties b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoSDKMessages.properties index 4ff1574..d6b5cdb 100644 --- a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoSDKMessages.properties +++ b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/YoctoSDKMessages.properties @@ -89,6 +89,9 @@ Preferences.Profile.Standard.Modification.Message = Standard cross development p Preferences.Profile.ProjectSpecific.Title = Use project specific settings Preferences.Profile.ProjectSpecific.Group.Title = Project specific settings: +Preferences.Profile.ProjectSpecific.Error.Title = Could not change to project specific target profile +Preferences.Profile.ProjectSpecific.Error.Message = The project specific target profile is not defined for the project "{0}".\nYou can define it in the project's property page. + Console.SDK.Name = Yocto Project Console LaunchConfig.Type.Name = org.eclipse.ui.externaltools.ProgramLaunchConfigurationType diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/actions/ProfileSwitchHandler.java b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/actions/ProfileSwitchHandler.java new file mode 100644 index 000..38e3e6d --- /dev/null +++ b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/actions/ProfileSwitchHandler.java @@ -0,0 +1,110 @@ +/*** + * Copyright (c) 2013 BMW Car IT GmbH. + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * BMW Car IT - initial implementation + ***/ +package org.yocto.sdk.ide.actions; + +import org.eclipse.cdt.core.model.ICElement; +import org.eclipse.cdt.core.model.ICProject; +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.dialogs.ErrorDialog; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ITreeSelection; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.handlers.HandlerUtil; +import org.eclipse.ui.handlers.RadioState; +import org.yocto.sdk.ide.YoctoProfileElement; +import org.yocto.sdk.ide.YoctoSDKChecker; +import org.yocto.sdk.ide.YoctoSDKChecker.SDKCheckResults; +import org.yocto.sdk.ide.YoctoSDKMessages; +import org.yocto.sdk.ide.YoctoSDKPlugin; +import org.yocto.sdk.ide.YoctoUIElement; +import org.yocto.sdk.ide.utils.ProjectPreferenceUtils; +import org.yocto.sdk.ide.utils.YoctoSDKUtils; + +public class ProfileSwitchHandler extends AbstractHandler { + private static final String PROJECT_SPECIFIC_ER
[yocto] [PATCHv2 6/8] plugins/sdk.ide: Add profile switch menu to the toolbar
From: Timo Mueller If a project with a yocto nature is selected, the toolbar will show a target profile menu which allows the user to switch the used target profile of the project. The content of this menu is dynamically created using the list of globally defined target profiles. Additionally it will also contain the project specific profile. If the project specific profile is not yet defined for the selected project, the button will be greyed out. Signed-off-by: Timo Mueller --- .../OSGI-INF/l10n/bundle.properties| 1 + plugins/org.yocto.sdk.ide/plugin.xml | 57 +- .../sdk/ide/ProjectSpecificContributionItem.java | 89 +++ .../sdk/ide/TargetProfileContributionItem.java | 125 + .../org/yocto/sdk/ide/YoctoSDKMessages.properties | 1 + .../sdk/ide/actions/ProfileSwitchHandler.java | 26 - 6 files changed, 297 insertions(+), 2 deletions(-) create mode 100644 plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/ProjectSpecificContributionItem.java create mode 100644 plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/TargetProfileContributionItem.java diff --git a/plugins/org.yocto.sdk.ide/OSGI-INF/l10n/bundle.properties b/plugins/org.yocto.sdk.ide/OSGI-INF/l10n/bundle.properties index 1191af6..2031154 100644 --- a/plugins/org.yocto.sdk.ide/OSGI-INF/l10n/bundle.properties +++ b/plugins/org.yocto.sdk.ide/OSGI-INF/l10n/bundle.properties @@ -7,6 +7,7 @@ command.name = ReconfigureYoctoProject command.label.0 = Change Yocto Project Settings command.mnemonic = C command.targetProfileSwitch.name = Change Target Profile +command.targetProfileSwitch.label = Target Profiles command.targetProfileSwitch.description = Changes the target profile of a selected project command.targetProfileSwitch.parameter.name = Selected Target Profile projectType.name.0 = Yocto Project ADT Autotools Project diff --git a/plugins/org.yocto.sdk.ide/plugin.xml b/plugins/org.yocto.sdk.ide/plugin.xml index 62f1297..aaa0a35 100644 --- a/plugins/org.yocto.sdk.ide/plugin.xml +++ b/plugins/org.yocto.sdk.ide/plugin.xml @@ -81,6 +81,10 @@ id="org.yocto.sdk.ide.command.reconfigYocto" name="%command.name"> + + @@ -243,5 +247,56 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/ProjectSpecificContributionItem.java b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/ProjectSpecificContributionItem.java new file mode 100644 index 000..41374a6 --- /dev/null +++ b/plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/ProjectSpecificContributionItem.java @@ -0,0 +1,89 @@ +/*** + * Copyright (c) 2013 BMW Car IT GmbH. + * 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * BMW Car IT - initial implementation + ***/ + +package org.yocto.sdk.ide; + +import java.util.ArrayList; + +import org.eclipse.core.commands.Command; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.resources.IProject; +import org.eclipse.jface.action.IContributionItem; +import org.eclipse.ui.commands.ICommandService; +import org.eclipse.ui.handlers.HandlerUtil; +import org.eclipse.ui.menus.CommandContributionItem; +import org.eclipse.ui.menus.CommandContributionItemParameter; +import org.eclipse.ui.services.IServiceLocator; +import org.yocto.sdk.ide.YoctoSDKChecker.SDKCheckResults; +import org.yocto.sdk.ide.actions.ProfileSwitchHandler; +import org.yocto.sdk.ide.utils.ProjectPreferenceUtils; + +public class ProjectSpecificContributionItem extends TargetProfileContributionItem { + private static final String PROJECT_SPECIFIC_PROFILE = + "Preferences.Profile.ProjectSpecific.Profile.Label"; //$NON-NLS-N$ + private static final String DISABLED_COMMAND_ID = "org.yocto.sdk.ide.command.disabled"; //$NON-NLS-N$ + + private IServiceLocator serviceLocator; + + public ProjectSpecificContributionItem() {} + + public ProjectSpecificContributionItem(String id) { + super(id); + } + + @Override + protected IContributionItem[] getContributionItems() { + A
[yocto] Creating a meta-layer for a third-party GCC-based binary tool-chain - how?
I'm trying to create a meta-layer for a third-party GCC-based proprietary tool-chain. I need to be able to select this tool-chain on a per-recipe basis while other recipes may either the standard Yocto native/cross-tool-chain. This proprietary tool chain is divided into a host-tool part (where all the cross-tools are located, e.g. arm-unknown-nto-qnx6.5.0-gcc/ar/g++ etc...) and the associated target sysroot that includes common headers and target (arm, mips, ppc, sh4, x86) specific libraries. This tool-chain on my system is sitting in /opt outside of the Yocto environment and is not re-distributable in a third-party SDK (e.g. you have to license it from the manufacturer and install it separately). I seem to have come across two approaches to this problem. One solution appears to be recommended by the OE community and it is described here: http://www.openembedded.org/wiki/Adding_a_secondary_toolchain This approach *seems* to offer the ability to selectively (per recipe) enable/disable a secondary tool-chain. What is not clear is whether Yocto supports this approach. The second approach seems to be the one used by Linaro and CodeSourcery and involves setting the TCMODE/TCLIB variables and may be more extensive. What's not clear is whether the Linaro/CodeSourcery tool-chain can selectively be turned on/off per recipe. I've done some prototyping with both approach but I've had mixed success . . . partly due to my in-experience with BitBake/Yocto. So I hope someone can take pity on me and answer a few questions: 1) Is the OE approach of adding a secondary tool-chain work-able under Yocto? Is the Yocto (TCMODE/TCLIB) approach more acceptable (e.g. recommended) and does it allow the recipe itself (or some other white/black listing approach) to decide which recipes are compiled with the alternate tool-chain? If so, how does a recipe specify the tool-chain that should be used? It's not clear by examining the meta-layers provided by those tool-chains. 2) Since my proprietary tool-chain has it's own sysroot outside Yocto, I believe the recommended approach is to copy this sysroot into the a Yocto generated sysroot. If so, where do I do that? Do create a second recipe to do that? Is it done in the meta-toolchain .conf files or .bbclass files? How do I make sure these system files are copied to the Yocto sysroot before building the recipes that depend on it? 3) What will be the name of the sysroot where I should copy the external binary tool-chain to? I can't figure out who/how that name is generated and used . . . is it based off the tool-chain prefix (e.g. arm-unknown-nto-6.5.0)? Is it something I can specify? 4) The external tool-chain has a non-e/glibc based C library (it's Dinkumware based). Do I have to do anything special to keep it from linking against the one created/used by Yocto? 5) Ultimately, the target machine and OS is not Linux but very similar (e.g. posix based). At this point I'm not concerned about building a boot-able image but rather just building individual recipes and packing the resulting libraries/applications into a convenient tarball (or opkg archive). So I'm thinking I just need to specify a very rudimentary/simple "machine" in order to specify the CPU architecture so the right external cross-tool is selected. Is there any such meta-layer available . . . a very minimal machine? I could accept a QEMU based machine (if necessary) because the OS I'm targeting can be run under QEMU. Of course the question may be whether I really need to specify a machine/distro for my use-case? At this time, I just want to use my tool-chain meta-layer to help me port/build/package several middle-ware and library components using an external (non-distributable) binary tool-chain. In this sense, I'm only using Yocto to do half of it's customary job which (usually) results in a Linux image for a target. This request for assistance is long. Any answers that could be provided (even if they don't address all of my questions) would be extremely helpful. Links to previous discussions would be useful as well. Thanks for your time and consideration . . . ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] [PATCH v2] Fix Eclipse workspace deadlock when restoring
From: Ioana Grigoropol - when creating a new bitbake commander project, a bunch of information relevant for the project is set in the project information map - when closing & restarting Eclipse, having a Bitbake commander project in the workspace an deadlock occurs due to the following: - Eclipse Resources container tries to restore all projects that were previously in the workspace - when trying to restore our BB project, we will try to determine what was the remote connection for that specific project, given its URI - we can only determine the connection by calling RSE plugin & we must wait for it to be initialized - the RSE plugin is initialized after the Resource container is finishes, and since this process is blocked waiting for a later one, a deadlock occurs - in order to fix this problem, perform the following steps: - when the Eclipse Resource container asks for the store of our project - return a NullFileStore - register as a listener of the RSEInitJob in order to get notified when the job is finished - restore the project information when the RSE API is up by triggering the internal file system core manager - restoring the information: - for the local implementation: - the connection of the project is missing -> retrive it by invoking RSE - for the remote implementation: - the only URI for the project is the oefs one - we cannot change this uri to point to the real one since it will block the refresh on the project - we cannot determine the real URI form the oefs one since we have no clue what is the host(ip) -> solution: - when creating the BBC project - save the information about the real URI of the project in the metadata of the workspace - when restoring the project - retrieve the information from the metadata location - fixed also the Project Description of the Location to display the real URI of the files Signed-off-by: Ioana Grigoropol --- .../src/org/yocto/bc/bitbake/ShellSession.java |2 +- .../src/org/yocto/bc/ui/Activator.java |4 +- .../org/yocto/bc/ui/filesystem/OEFileSystem.java | 10 +-- .../src/org/yocto/bc/ui/model/ProjectInfo.java | 11 ++- .../src/org/yocto/bc/ui/model/YoctoHostFile.java | 10 +++ .../yocto/bc/ui/wizards/install/InstallWizard.java |1 + .../org.yocto.remote.utils/META-INF/MANIFEST.MF|6 +- .../src/org/yocto/remote/utils/RemoteHelper.java | 79 8 files changed, 113 insertions(+), 10 deletions(-) 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 11d677a..724b7d0 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 @@ -18,7 +18,7 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.Writer; - + import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.rse.core.model.IHost; 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 5c43ba8..f53592c 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 @@ -108,7 +108,7 @@ public class Activator extends AbstractUIPlugin { BBSession bbs = (BBSession) bbSessionMap.get(projectRoot); - if (bbs == null) { + if (bbs == null || bbs.getShell() == null) { bbs = new BBSession(getShellSession(projectInfo, null, monitor), projectRoot); bbSessionMap.put(projectRoot, bbs); } @@ -190,7 +190,7 @@ public class Activator extends AbstractUIPlugin { ShellSession ss = (ShellSession) shellMap.get(absolutePath); - if (ss == null) { + if (ss == null && RemoteHelper.isInitialized(projInfo.getOriginalURI())) { IHostFile remoteHostFile = RemoteHelper.getRemoteHostFile(projInfo.getConnection(), absolutePath.getPath(), monitor); ss = new ShellSession(projInfo, remoteHostFile, ProjectInfoHelper.getInitScriptPath(absolutePath)); } diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/filesystem/OEFileSystem.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/filesystem/OEFileSystem.java index 357edc1..b814c4c 100644
[yocto] [RFC PATCH upstream org.eclipse.tm] [411343]Provide access to readers in host shell
From: Ioana Grigoropol - add a plain getter in the AbstractHostShell class: - the compilation is not broken for subclasses of this class since it always returns null - the targeted classes (local and remote) can implement the getter (local implementation is already there) - the reader can be accessed and the output can be read in a synchronous way - add implementation of getReader in TerminaServiceHostShell - store the underlying reader as a field of this class & return it Signed-off-by: Ioana Grigoropol --- .../services/shells/TerminalServiceHostShell.java | 20 .../rse/services/shells/AbstractHostShell.java |9 +++-- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceHostShell.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceHostShell.java index 2a461ad..0775894 100644 --- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceHostShell.java +++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceHostShell.java @@ -22,6 +22,7 @@ * Anna Dushistova (MontaVista) - [258720] SshHostShell fails to run command if initialWorkingDirectory supplied * Rob Stryker (JBoss) - [335059] TerminalServiceShellOutputReader logs error when hostShell.exit() is called * Martin Oberhuber (Wind River) - [356132] wait for initial output + * Ioana Grigoropol (Intel) - [411343] Provide access to readers in host shell ***/ package org.eclipse.rse.internal.services.shells; @@ -47,7 +48,7 @@ public class TerminalServiceHostShell extends AbstractHostShell { public static final String SHELL_INVOCATION = ">"; //$NON-NLS-1$ ITerminalShell fTerminalShell; - + BufferedReader fBufReader; private TerminalServiceShellOutputReader fStdoutHandler; private TerminalServiceShellOutputReader fStderrHandler; @@ -60,21 +61,21 @@ public class TerminalServiceHostShell extends AbstractHostShell { try { fTerminalShell = terminalShell; String encoding = fTerminalShell.getDefaultEncoding(); - BufferedReader bufReader; + if (encoding != null) { - bufReader = new BufferedReader(new InputStreamReader(fTerminalShell + fBufReader = new BufferedReader(new InputStreamReader(fTerminalShell .getInputStream(), encoding)); } else { - bufReader = new BufferedReader(new InputStreamReader(fTerminalShell + fBufReader = new BufferedReader(new InputStreamReader(fTerminalShell .getInputStream())); } //bug 356132: wait for initial output before sending any command //FIXME this should likely move into the TerminalServiceShellWriterThread, so wait can be canceled - bufReader.mark(1); - bufReader.read(); - bufReader.reset(); + fBufReader.mark(1); + fBufReader.read(); + fBufReader.reset(); - fStdoutHandler = new TerminalServiceShellOutputReader(this, bufReader, false); + fStdoutHandler = new TerminalServiceShellOutputReader(this, fBufReader, false); fStderrHandler = new TerminalServiceShellOutputReader(this, null, true); OutputStream outputStream = fTerminalShell.getOutputStream(); if (encoding != null) { @@ -170,4 +171,7 @@ public class TerminalServiceHostShell extends AbstractHostShell { return "echo $PWD'>'"; //$NON-NLS-1$ } + public BufferedReader getReader(boolean isErrorReader) { + return fBufReader; + } } diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShell.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShell.java index 0ac8e3f..4d189b6 100644 --- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShell.java +++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShell.java @@ -11,11 +11,13 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Ioana Grig
[yocto] [RFC PATCH upstream org.eclipse.ptp] [411387] SystemRemoteFolderDialog should return a path when selecting 'My Home' or 'Root'
- when browsing to pick the project location, if "My Home" or "Root" get picked the project location remains empty - this is caused by the RSEUIFileManager browseDirectory method - the selection made in the SystemRemoteFolderDialog is an SystemFilterReference, and thus not a instance of IRemoteFile. - if the selection is of type ISystemFilterReference: - make sure that the children of the system filter are populated - retrieve the adapter for the filter and populate the children list - retrieve first child from the list & return parent path - if the parent path is null for the first child: - this is actually the root of the file system -> return path of this child Signed-off-by: Ioana Grigoropol --- .../ptp/remote/rse/ui/RSEUIFileManager.java| 27 +++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.ptp.remote.rse.ui/src/org/eclipse/ptp/remote/rse/ui/RSEUIFileManager.java b/core/org.eclipse.ptp.remote.rse.ui/src/org/eclipse/ptp/remote/rse/ui/RSEUIFileManager.java index dd0e097..e3f1423 100644 --- a/core/org.eclipse.ptp.remote.rse.ui/src/org/eclipse/ptp/remote/rse/ui/RSEUIFileManager.java +++ b/core/org.eclipse.ptp.remote.rse.ui/src/org/eclipse/ptp/remote/rse/ui/RSEUIFileManager.java @@ -7,21 +7,27 @@ * * Contributors: * IBM Corporation - Initial API and implementation + * Ioana Grigoropol (Intel) - browseDirectory should return a path when selecting 'My Home' or 'Root' ***/ package org.eclipse.ptp.remote.rse.ui; import java.util.Vector; +import org.eclipse.core.runtime.IAdapterFactory; import org.eclipse.jface.window.Window; import org.eclipse.ptp.remote.core.IRemoteConnection; import org.eclipse.ptp.remote.core.IRemoteConnectionManager; import org.eclipse.ptp.remote.core.IRemoteServices; import org.eclipse.ptp.remote.rse.core.RSEConnection; import org.eclipse.ptp.remote.ui.IRemoteUIFileManager; +import org.eclipse.rse.core.filters.ISystemFilterReference; import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.SystemChildrenContentsType; import org.eclipse.rse.files.ui.dialogs.SystemRemoteFileDialog; import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog; +import org.eclipse.rse.internal.ui.view.SystemViewFilterReferenceAdapter; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.widgets.Shell; public class RSEUIFileManager implements IRemoteUIFileManager { @@ -51,6 +57,25 @@ public class RSEUIFileManager implements IRemoteUIFileManager { if (retObj instanceof IRemoteFile) { IRemoteFile selectedFile = (IRemoteFile) retObj; return selectedFile.getAbsolutePath(); + } else if (retObj instanceof ISystemFilterReference){ + ISystemFilterReference selectedFile = (ISystemFilterReference)retObj; + + RSEUIPlugin plugin = RSEUIPlugin.getDefault(); + if (selectedFile.getContents(SystemChildrenContentsType.getInstance()) == null) { + // in order to make sure that the children of this SystemFilterReference are populated + // the method getChildren() of the underlying adapter must be invoked + IAdapterFactory factory = plugin.getSystemViewAdapterFactory(); + SystemViewFilterReferenceAdapter adapter = (SystemViewFilterReferenceAdapter)factory.getAdapter(selectedFile, ISystemFilterReference.class); + adapter.getChildren(selectedFile); + } + // now that the children are cached for the filter references we can try and access them + Object[] con = selectedFile.getContents(SystemChildrenContentsType.getInstance()); + if (con != null && con[0] instanceof IRemoteFile) { + IRemoteFile file = (IRemoteFile)con[0]; + if (file.getParentPath() == null) + return file.getAbsolutePath();// this is actually the root of the file system + return file.getParentPath(); + } } } return null; @@ -134,4 +159,4 @@ public class RSEUIFileManager implements IRemoteUIFileManager { public void showConnections(boolean enable) { onlyConnection = !enable; } -} \ No newline at end of file +} -- 1.7.10.4 _
[yocto] [RFC PATCH v2 upstream org.eclipse.tm] [411343]Provide access to readers in host shell
- add a plain getter in the AbstractHostShell class: - the compilation is not broken for subclasses of this class since it always returns null - the targeted classes (local and remote) can implement the getter (local implementation is already there) - the reader can be accessed and the output can be read in a synchronous way - add implementation of getReader in TerminaServiceHostShell - store the underlying reader as a field of this class & return it Signed-off-by: Ioana Grigoropol --- .../services/shells/TerminalServiceHostShell.java | 20 .../rse/services/shells/AbstractHostShell.java |9 +++-- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceHostShell.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceHostShell.java index 2a461ad..0775894 100644 --- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceHostShell.java +++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceHostShell.java @@ -22,6 +22,7 @@ * Anna Dushistova (MontaVista) - [258720] SshHostShell fails to run command if initialWorkingDirectory supplied * Rob Stryker (JBoss) - [335059] TerminalServiceShellOutputReader logs error when hostShell.exit() is called * Martin Oberhuber (Wind River) - [356132] wait for initial output + * Ioana Grigoropol (Intel) - [411343] Provide access to readers in host shell ***/ package org.eclipse.rse.internal.services.shells; @@ -47,7 +48,7 @@ public class TerminalServiceHostShell extends AbstractHostShell { public static final String SHELL_INVOCATION = ">"; //$NON-NLS-1$ ITerminalShell fTerminalShell; - + BufferedReader fBufReader; private TerminalServiceShellOutputReader fStdoutHandler; private TerminalServiceShellOutputReader fStderrHandler; @@ -60,21 +61,21 @@ public class TerminalServiceHostShell extends AbstractHostShell { try { fTerminalShell = terminalShell; String encoding = fTerminalShell.getDefaultEncoding(); - BufferedReader bufReader; + if (encoding != null) { - bufReader = new BufferedReader(new InputStreamReader(fTerminalShell + fBufReader = new BufferedReader(new InputStreamReader(fTerminalShell .getInputStream(), encoding)); } else { - bufReader = new BufferedReader(new InputStreamReader(fTerminalShell + fBufReader = new BufferedReader(new InputStreamReader(fTerminalShell .getInputStream())); } //bug 356132: wait for initial output before sending any command //FIXME this should likely move into the TerminalServiceShellWriterThread, so wait can be canceled - bufReader.mark(1); - bufReader.read(); - bufReader.reset(); + fBufReader.mark(1); + fBufReader.read(); + fBufReader.reset(); - fStdoutHandler = new TerminalServiceShellOutputReader(this, bufReader, false); + fStdoutHandler = new TerminalServiceShellOutputReader(this, fBufReader, false); fStderrHandler = new TerminalServiceShellOutputReader(this, null, true); OutputStream outputStream = fTerminalShell.getOutputStream(); if (encoding != null) { @@ -170,4 +171,7 @@ public class TerminalServiceHostShell extends AbstractHostShell { return "echo $PWD'>'"; //$NON-NLS-1$ } + public BufferedReader getReader(boolean isErrorReader) { + return fBufReader; + } } diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShell.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShell.java index 0ac8e3f..4d189b6 100644 --- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShell.java +++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShell.java @@ -11,11 +11,13 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Ioana Grigoropol (Intel) - [411
[yocto] [RFC PATCH v2 upstream org.eclipse.ptp] [411387] SystemRemoteFolderDialog should return a path when selecting 'My Home' or 'Root'
- when browsing to pick the project location, if "My Home" or "Root" get picked the project location remains empty - this is caused by the RSEUIFileManager browseDirectory method - the selection made in the SystemRemoteFolderDialog is an SystemFilterReference, and thus not a instance of IRemoteFile. - if the selection is of type ISystemFilterReference: - make sure that the children of the system filter are populated - retrieve the adapter for the filter and populate the children list - retrieve first child from the list & return parent path - if the parent path is null for the first child: - this is actually the root of the file system -> return path of this child Signed-off-by: Ioana Grigoropol --- .../internal/remote/rse/ui/RSEUIFileManager.java | 27 +++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.ptp.remote.rse.ui/src/org/eclipse/ptp/internal/remote/rse/ui/RSEUIFileManager.java b/core/org.eclipse.ptp.remote.rse.ui/src/org/eclipse/ptp/internal/remote/rse/ui/RSEUIFileManager.java index 8182f01..c9a6357 100644 --- a/core/org.eclipse.ptp.remote.rse.ui/src/org/eclipse/ptp/internal/remote/rse/ui/RSEUIFileManager.java +++ b/core/org.eclipse.ptp.remote.rse.ui/src/org/eclipse/ptp/internal/remote/rse/ui/RSEUIFileManager.java @@ -7,21 +7,27 @@ * * Contributors: * IBM Corporation - Initial API and implementation + * Ioana Grigoropol (Intel) - browseDirectory should return a path when selecting 'My Home' or 'Root' ***/ package org.eclipse.ptp.internal.remote.rse.ui; import java.util.Vector; +import org.eclipse.core.runtime.IAdapterFactory; import org.eclipse.jface.window.Window; import org.eclipse.ptp.internal.remote.rse.core.RSEConnection; import org.eclipse.ptp.remote.core.IRemoteConnection; import org.eclipse.ptp.remote.core.IRemoteConnectionManager; import org.eclipse.ptp.remote.core.IRemoteServices; import org.eclipse.ptp.remote.ui.IRemoteUIFileManager; +import org.eclipse.rse.core.filters.ISystemFilterReference; import org.eclipse.rse.core.model.IHost; +import org.eclipse.rse.core.model.SystemChildrenContentsType; import org.eclipse.rse.files.ui.dialogs.SystemRemoteFileDialog; import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog; +import org.eclipse.rse.internal.ui.view.SystemViewFilterReferenceAdapter; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; +import org.eclipse.rse.ui.RSEUIPlugin; import org.eclipse.swt.widgets.Shell; public class RSEUIFileManager implements IRemoteUIFileManager { @@ -51,6 +57,25 @@ public class RSEUIFileManager implements IRemoteUIFileManager { if (retObj instanceof IRemoteFile) { IRemoteFile selectedFile = (IRemoteFile) retObj; return selectedFile.getAbsolutePath(); + } else if (retObj instanceof ISystemFilterReference){ + ISystemFilterReference selectedFile = (ISystemFilterReference)retObj; + + RSEUIPlugin plugin = RSEUIPlugin.getDefault(); + if (selectedFile.getContents(SystemChildrenContentsType.getInstance()) == null) { + // in order to make sure that the children of this SystemFilterReference are populated + // the method getChildren() of the underlying adapter must be invoked + IAdapterFactory factory = plugin.getSystemViewAdapterFactory(); + SystemViewFilterReferenceAdapter adapter = (SystemViewFilterReferenceAdapter)factory.getAdapter(selectedFile, ISystemFilterReference.class); + adapter.getChildren(selectedFile); + } + // now that the children are cached for the filter references we can try and access them + Object[] con = selectedFile.getContents(SystemChildrenContentsType.getInstance()); + if (con != null && con[0] instanceof IRemoteFile) { + IRemoteFile file = (IRemoteFile)con[0]; + if (file.getParentPath() == null) + return file.getAbsolutePath();// this is actually the root of the file system + return file.getParentPath(); + } } } return null; @@ -134,4 +159,4 @@ public class RSEUIFileManager implements IRemoteUIFileManager { public void showConnections(boolean enable) { onlyConnection = !enable; } -} \ No newline at e
[yocto] Openembedded-core
Simple question - Is openembedded-core included in one of the Yocto meta layers, or do I need to download it from the OE git repository? Chris Tapp opensou...@keylevel.com www.keylevel.com ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Openembedded-core
On Friday 21 June 2013 17:47:13 Chris Tapp wrote: > Simple question - Is openembedded-core included in one of the Yocto meta > layers, or do I need to download it from the OE git repository? It comes as part of the poky repository if you're using that. The alternative is to use bitbake and OE-Core separately. Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Openembedded-core
Thanks Paul / Elizabeth, On 21 Jun 2013, at 17:53, Paul Eggleton wrote: > On Friday 21 June 2013 17:47:13 Chris Tapp wrote: >> Simple question - Is openembedded-core included in one of the Yocto meta >> layers, or do I need to download it from the OE git repository? > > It comes as part of the poky repository if you're using that. The alternative > is to use bitbake and OE-Core separately. I thought it was, but I can't get meta-fsl-arm-extras to build and thought it was worth checking this out first ;-) Time to dig... > Cheers, > Paul > > -- > > Paul Eggleton > Intel Open Source Technology Centre Chris Tapp opensou...@keylevel.com www.keylevel.com ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] -rt and COMPATIBLE_MACHINES
> From: Tomas Frydrych > > On 20/06/13 20:40, Paul D. DeRocco wrote: > > My question is this: why was I able to build core-image base without > > complaint in the first place? The kernel recipes it has available > > (linux-yocto_*) also set COMPATIBLE_MACHINE to a list of > qemu machines. > > It probably built the linux-dummy recipe. An easy way to see which > recipe is being used is to run 'bitbake virtual/kernel'. I'm not sure what linux-dummy is for, but given that it's full of empty tasks, that looks like something that won't boot. But the resulting image booted fine. -- Ciao, Paul D. DeRocco Paulmailto:pdero...@ix.netcom.com ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] [RFC PATCH v2 upstream org.eclipse.tm] [411343]Provide access to readers in host shell
Hi Ioana, Unfortunately we have to introduce the API getReader in IHostShell interface, otherwise, when I applied the patch to my clean upstream RSE master and open a project I'm getting: An internal error occurred during "Open Project" Unresolved compilation problems: The method getReader(Boolean) is undefined for the type IHostShell Please do some local verification when sending patches upstream. Thanks, Jessica -Original Message- From: yocto-boun...@yoctoproject.org [mailto:yocto-boun...@yoctoproject.org] On Behalf Of Ioana Grigoropol Sent: Friday, June 21, 2013 8:19 AM To: yocto@yoctoproject.org Subject: [yocto] [RFC PATCH v2 upstream org.eclipse.tm] [411343]Provide access to readers in host shell - add a plain getter in the AbstractHostShell class: - the compilation is not broken for subclasses of this class since it always returns null - the targeted classes (local and remote) can implement the getter (local implementation is already there) - the reader can be accessed and the output can be read in a synchronous way - add implementation of getReader in TerminaServiceHostShell - store the underlying reader as a field of this class & return it Signed-off-by: Ioana Grigoropol --- .../services/shells/TerminalServiceHostShell.java | 20 .../rse/services/shells/AbstractHostShell.java |9 +++-- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceHostShell.java b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceHostShell.java index 2a461ad..0775894 100644 --- a/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/services/shells/TerminalServiceHostShell.java +++ b/rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/internal/ +++ services/shells/TerminalServiceHostShell.java @@ -22,6 +22,7 @@ * Anna Dushistova (MontaVista) - [258720] SshHostShell fails to run command if initialWorkingDirectory supplied * Rob Stryker (JBoss) - [335059] TerminalServiceShellOutputReader logs error when hostShell.exit() is called * Martin Oberhuber (Wind River) - [356132] wait for initial output + * Ioana Grigoropol (Intel) - [411343] Provide access to readers in host shell ***/ package org.eclipse.rse.internal.services.shells; @@ -47,7 +48,7 @@ public class TerminalServiceHostShell extends AbstractHostShell { public static final String SHELL_INVOCATION = ">"; //$NON-NLS-1$ ITerminalShell fTerminalShell; - + BufferedReader fBufReader; private TerminalServiceShellOutputReader fStdoutHandler; private TerminalServiceShellOutputReader fStderrHandler; @@ -60,21 +61,21 @@ public class TerminalServiceHostShell extends AbstractHostShell { try { fTerminalShell = terminalShell; String encoding = fTerminalShell.getDefaultEncoding(); - BufferedReader bufReader; + if (encoding != null) { - bufReader = new BufferedReader(new InputStreamReader(fTerminalShell + fBufReader = new BufferedReader(new +InputStreamReader(fTerminalShell .getInputStream(), encoding)); } else { - bufReader = new BufferedReader(new InputStreamReader(fTerminalShell + fBufReader = new BufferedReader(new +InputStreamReader(fTerminalShell .getInputStream())); } //bug 356132: wait for initial output before sending any command //FIXME this should likely move into the TerminalServiceShellWriterThread, so wait can be canceled - bufReader.mark(1); - bufReader.read(); - bufReader.reset(); + fBufReader.mark(1); + fBufReader.read(); + fBufReader.reset(); - fStdoutHandler = new TerminalServiceShellOutputReader(this, bufReader, false); + fStdoutHandler = new TerminalServiceShellOutputReader(this, +fBufReader, false); fStderrHandler = new TerminalServiceShellOutputReader(this, null, true); OutputStream outputStream = fTerminalShell.getOutputStream(); if (encoding != null) { @@ -170,4 +171,7 @@ public class TerminalServiceHostShell extends AbstractHostShell { return "echo $PWD'>'"; //$NON-NLS-1$ } + public BufferedReader ge
Re: [yocto] [PATCH v2] Fix Eclipse workspace deadlock when restoring
Hi Ioana, With the latest changes, now with a remote project if I want to restore the project, I'm getting following errors: Failed to read the project description file (.project) for 'poky'. The file has been changed on disk, and it now contains invalid information. The project will not function properly until the description file is restored to a valid state. This is when I tried on my windows machine. Thanks, Jessica -Original Message- From: yocto-boun...@yoctoproject.org [mailto:yocto-boun...@yoctoproject.org] On Behalf Of Ioana Grigoropol Sent: Friday, June 21, 2013 7:27 AM To: yocto@yoctoproject.org Cc: Ioana Grigoropol Subject: [yocto] [PATCH v2] Fix Eclipse workspace deadlock when restoring From: Ioana Grigoropol - when creating a new bitbake commander project, a bunch of information relevant for the project is set in the project information map - when closing & restarting Eclipse, having a Bitbake commander project in the workspace an deadlock occurs due to the following: - Eclipse Resources container tries to restore all projects that were previously in the workspace - when trying to restore our BB project, we will try to determine what was the remote connection for that specific project, given its URI - we can only determine the connection by calling RSE plugin & we must wait for it to be initialized - the RSE plugin is initialized after the Resource container is finishes, and since this process is blocked waiting for a later one, a deadlock occurs - in order to fix this problem, perform the following steps: - when the Eclipse Resource container asks for the store of our project - return a NullFileStore - register as a listener of the RSEInitJob in order to get notified when the job is finished - restore the project information when the RSE API is up by triggering the internal file system core manager - restoring the information: - for the local implementation: - the connection of the project is missing -> retrive it by invoking RSE - for the remote implementation: - the only URI for the project is the oefs one - we cannot change this uri to point to the real one since it will block the refresh on the project - we cannot determine the real URI form the oefs one since we have no clue what is the host(ip) -> solution: - when creating the BBC project - save the information about the real URI of the project in the metadata of the workspace - when restoring the project - retrieve the information from the metadata location - fixed also the Project Description of the Location to display the real URI of the files Signed-off-by: Ioana Grigoropol --- .../src/org/yocto/bc/bitbake/ShellSession.java |2 +- .../src/org/yocto/bc/ui/Activator.java |4 +- .../org/yocto/bc/ui/filesystem/OEFileSystem.java | 10 +-- .../src/org/yocto/bc/ui/model/ProjectInfo.java | 11 ++- .../src/org/yocto/bc/ui/model/YoctoHostFile.java | 10 +++ .../yocto/bc/ui/wizards/install/InstallWizard.java |1 + .../org.yocto.remote.utils/META-INF/MANIFEST.MF|6 +- .../src/org/yocto/remote/utils/RemoteHelper.java | 79 8 files changed, 113 insertions(+), 10 deletions(-) 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 11d677a..724b7d0 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 @@ -18,7 +18,7 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.Writer; - + import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.rse.core.model.IHost; 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 5c43ba8..f53592c 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 @@ -108,7 +108,7 @@ public class Activator extends AbstractUIPlugin { BBSession bbs = (BBSession) bbSessionMap.get(projectRoot); - if (bbs == null) { + if (bbs == null || bbs.getShell() == null) { bbs = new BBSession(getShellSession(projectInfo, null, monitor), projectRoot); bbSessionMap.put(projectRoot, bbs); } @@ -190,7 +190,7 @@ public class Activator extends AbstractUIPlugin { ShellS
Re: [yocto] [PATCH v2] Fix Eclipse workspace deadlock when restoring
OK more info. It seems if the project is remote, first we'll get the project description failure since we haven't restored the remote connection, after we dismiss the error and double click on the project and restore the RSE connection, the project will be able to restore. We should change the error message into warning and tell user to restore their RSE connection. Jessica -Original Message- From: yocto-boun...@yoctoproject.org [mailto:yocto-boun...@yoctoproject.org] On Behalf Of Ioana Grigoropol Sent: Friday, June 21, 2013 7:27 AM To: yocto@yoctoproject.org Cc: Ioana Grigoropol Subject: [yocto] [PATCH v2] Fix Eclipse workspace deadlock when restoring From: Ioana Grigoropol - when creating a new bitbake commander project, a bunch of information relevant for the project is set in the project information map - when closing & restarting Eclipse, having a Bitbake commander project in the workspace an deadlock occurs due to the following: - Eclipse Resources container tries to restore all projects that were previously in the workspace - when trying to restore our BB project, we will try to determine what was the remote connection for that specific project, given its URI - we can only determine the connection by calling RSE plugin & we must wait for it to be initialized - the RSE plugin is initialized after the Resource container is finishes, and since this process is blocked waiting for a later one, a deadlock occurs - in order to fix this problem, perform the following steps: - when the Eclipse Resource container asks for the store of our project - return a NullFileStore - register as a listener of the RSEInitJob in order to get notified when the job is finished - restore the project information when the RSE API is up by triggering the internal file system core manager - restoring the information: - for the local implementation: - the connection of the project is missing -> retrive it by invoking RSE - for the remote implementation: - the only URI for the project is the oefs one - we cannot change this uri to point to the real one since it will block the refresh on the project - we cannot determine the real URI form the oefs one since we have no clue what is the host(ip) -> solution: - when creating the BBC project - save the information about the real URI of the project in the metadata of the workspace - when restoring the project - retrieve the information from the metadata location - fixed also the Project Description of the Location to display the real URI of the files Signed-off-by: Ioana Grigoropol --- .../src/org/yocto/bc/bitbake/ShellSession.java |2 +- .../src/org/yocto/bc/ui/Activator.java |4 +- .../org/yocto/bc/ui/filesystem/OEFileSystem.java | 10 +-- .../src/org/yocto/bc/ui/model/ProjectInfo.java | 11 ++- .../src/org/yocto/bc/ui/model/YoctoHostFile.java | 10 +++ .../yocto/bc/ui/wizards/install/InstallWizard.java |1 + .../org.yocto.remote.utils/META-INF/MANIFEST.MF|6 +- .../src/org/yocto/remote/utils/RemoteHelper.java | 79 8 files changed, 113 insertions(+), 10 deletions(-) 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 11d677a..724b7d0 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 @@ -18,7 +18,7 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.Writer; - + import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.rse.core.model.IHost; 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 5c43ba8..f53592c 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 @@ -108,7 +108,7 @@ public class Activator extends AbstractUIPlugin { BBSession bbs = (BBSession) bbSessionMap.get(projectRoot); - if (bbs == null) { + if (bbs == null || bbs.getShell() == null) { bbs = new BBSession(getShellSession(projectInfo, null, monitor), projectRoot); bbSessionMap.put(projectRoot, bbs); } @@ -190,7 +190,7 @@ public class Activator extends AbstractUIPlugin { ShellSession ss = (ShellSession) shellMap.get(absolutePath
Re: [yocto] [PATCHv2 0/8][eclipse-poky] Add target profile quick switch
Hi Timo, So what's the purpose of "Project Specific Settings", my understanding is it's something that only local to project instead of global name space, e.g. profile? OK, I've played a little bit of toggling between profiles, and project specific setting and notice the following behaviors that can be confusing: 1. As your preference that user can specify "project specific settings". I've noticed for this case, if I haven't entered any project specific settings via the preference wizard, it'll always copy the profile settings prior to its selection, then in this case I don't think it makes much sense since we already have the profiles to cover all the settings 2. OK, now let's move to the case of that I do have explicit setup a project specific settings in the project property view apply it and exit the window. After that, in the drop down list, when I toggle between the options, e.g. I have two profiles besides the project specific settings, then every time after I made the selection and check in the project properties view, the settings matches my selection. So this is good and consistent behavior. 3. If inside the project properties window, I uncheck the "Use project specific settings" box, and select a profile then apply the changes close the window. Now in the drop down list I will see both the "project specific setting" and the selected profile are selected. Then next time when I go back, and re-check "Use project specific settings" box, my project specific setting will be gone, instead the settings will show as my previous profile settings. Overall, I think we still need to play a little bit more of different setting selections via different approaches, some of the inconsistent behavior can get user lost. Thanks, Jessica -Original Message- From: yocto-boun...@yoctoproject.org [mailto:yocto-boun...@yoctoproject.org] On Behalf Of Timo Mueller Sent: Friday, June 21, 2013 5:45 AM To: yocto@yoctoproject.org Cc: Timo Mueller Subject: [yocto] [PATCHv2 0/8][eclipse-poky] Add target profile quick switch From: Timo Mueller Changes in v2: Handle error when project specific profile is not configured more gracefully. Instead of showing an error message the button is now greyed out. Patches 01..07 contain the implementation with the greyed out menu button. After playing around with the two options discussed in the first patch series, I started to prefer inserting a different button in the menu allowing the user to quickly navigate to the project preferences instead of just greying it out. I've added this in the last patch of the series, so you can compare yourself. >From original cover letter if a user wants to change the used target profile of a project he currently has to open the project preferences. This can be tedious if he has to switch the profile often. This is a small addition which allows the user to quickly switch the used target profile of a project. Instead of having to open the project preferences the user can select the project in the navigator and then choose the desired target profile from a drop-down menu in the toolbar or from the project menu. 01: Small i18n fix 02..04: Refactoring the project specific utils 05..06: Introduce the target profile toolbar switch 07: Adds the target profile switch to the project menu 08: Experimental: Add button to open project preferences Best regards, Timo Timo Mueller (8): plugins/sdk.ide: Use an internationalized dialog title plugins/sdk.ide: Extract project specific util methods plugins/sdk.ide: Move project specific util methods plugins/sdk.ide: Remove project context from method names plugins/sdk.ide: Add command to switch the target profile plugins/sdk.ide: Add profile switch menu to the toolbar plugins/sdk.ide: Add profile switch menu to the project menu plugins/sdk.ide: Add project configuration button .../OSGI-INF/l10n/bundle.properties| 4 + plugins/org.yocto.sdk.ide/plugin.xml | 96 - .../sdk/ide/ProjectSpecificContributionItem.java | 91 .../sdk/ide/TargetProfileContributionItem.java | 125 +++ .../org/yocto/sdk/ide/YoctoSDKMessages.properties | 5 + .../src/org/yocto/sdk/ide/YoctoUISetting.java | 3 +- .../sdk/ide/actions/ProfileSwitchHandler.java | 134 .../natures/YoctoSDKAutotoolsProjectNature.java| 3 +- .../ide/preferences/YoctoSDKPreferencePage.java| 11 +- .../preferences/YoctoSDKProjectPropertyPage.java | 130 ++- .../sdk/ide/utils/ProjectPreferenceUtils.java | 240 + .../src/org/yocto/sdk/ide/utils/YoctoSDKUtils.java | 118 -- .../ide/wizard/NewYoctoProjectTemplateProcess.java | 3 +- 13 files changed, 717 insertions(+), 246 deletions(-) create mode 100644 plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/ProjectSpecificContributionItem.java create mode 100644 plugins/org.yocto.sdk.ide/src/org/yocto/sdk/ide/Targ