[yocto] Remote debugging with Yocto

Houkes, Bart bart.houkes at sogeti.nl
Sat Oct 26 13:09:58 PDT 2013


Hi, 

By accident I solved some bugs in the repo, now I get better info. Here the patch, feel free to use it... or maybe it's already solved, because I use 1.4.1:

diff --git a/scripts/lib/bsp/kernel.py b/scripts/lib/bsp/kernel.py
index fc1e6bd..fbc3555 100644
--- a/scripts/lib/bsp/kernel.py
+++ b/scripts/lib/bsp/kernel.py
@@ -166,13 +166,15 @@ def read_config_items(scripts_path, machine):
     config_items = []
 
     f = open_user_file(scripts_path, machine, machine+"-user-config.cfg", "r")
-    lines = f.readlines()
-    for line in lines:
-        s = line.strip()
-        if s and not s.startswith("#"):
-            config_items.append(s)
-    f.close()
-
+    try:
+        lines = f.readlines()
+        for line in lines:
+            s = line.strip()
+            if s and not s.startswith("#"):
+                config_items.append(s)
+        f.close()
+    except:
+        print "No config file: " +machine+"-user-config.cfg"
     return config_items
 
 
@@ -562,14 +564,16 @@ def read_features(scripts_path, machine):
     features = []
 
     f = open_user_file(scripts_path, machine, machine+"-user-features.scc", "r")
-    lines = f.readlines()
-    for line in lines:
-        s = line.strip()
-        if s and not s.startswith("#"):
-            feature_include = s.split()
-            features.append(feature_include[1].strip())
-    f.close()
-
+    try:
+        lines = f.readlines()
+        for line in lines:
+            s = line.strip()
+            if s and not s.startswith("#"):
+                feature_include = s.split()
+                features.append(feature_include[1].strip())
+        f.close()

________________________________________
From: Voicu, Cristiana [cristiana.voicu at intel.com]
Sent: Tuesday, October 22, 2013 4:12 PM
To: Houkes, Bart
Cc: yocto at yoctoproject.org; Rifenbark, Scott M
Subject: RE: [yocto] Remote debugging with Yocto

Hi Bart,

It seems that tcf-agent was moved to eclipse-debug package group. So, instead of adding tools-debug to image features, you should add eclipse-debug.
I think that the documentation for tcf-agent is not updated. Scott, can you please update this?
Thank you,
Cristiana

-----Original Message-----
From: Houkes, Bart [mailto:bart.houkes at sogeti.nl]
Sent: Tuesday, October 22, 2013 4:11 PM
To: Voicu, Cristiana
Subject: RE: [yocto] Remote debugging with Yocto

Hi Cristiana,

I did step 2 from http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#getting-the-images, and changed the makefile a lot. I copied the file stubs-hard.h to stubs-soft.h, but in the end I miss a dependency lssl, which I can't find yet.

When I try to do the same with hob and add tcf-agent, it becomes red and hob stops without any result. Maybe I should hire the young girl from Yocto's movie, for her it is simple.
I added tools-debug to my local-conf and start bitbake again. For HOB, I get the RPM file which is useless... I need the sama5d34.dtb,  uImage (kernel binary) and a core-image[a-z]*.tar.gz

My local.conf has following:
BB_NUMBER_THREADS = "4"
PARALLEL_MAKE = "-j 4"
MACHINE ??= "sama5d3xek"
DL_DIR ?= "/home/mensfort/workspace_poky/downloads"
DISTRO ?= "poky"
EXTRA_IMAGE_FEATURES = "debug-tweaks tools-debug"    <=== Just added tools-debug.
USER_CLASSES ?= "buildstats image-mklibs image-prelink"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS = "\
    STOPTASKS,${TMPDIR},1G,100K \
    STOPTASKS,${DL_DIR},1G,100K \
    STOPTASKS,${SSTATE_DIR},1G,100K \
    ABORT,${TMPDIR},100M,1K \
    ABORT,${DL_DIR},100M,1K \
    ABORT,${SSTATE_DIR},100M,1K"
CONF_VERSION = "1"
SSTATE_MIRRORS = ""
PACKAGE_CLASSES = "package_rpm package_ipk"

I get following output from bitbake, no working output anymore.
| Error: packagegroup-core-boot not found in the base feeds (sama5d3xek cortexa9t2hf-vfp cortexa9hf-vfp armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp noarch any all).
| ERROR: Function failed: do_rootfs (see
| /home/mensfort/workspace_poky/poky/build-atmel/tmp/work/sama5d3xek-pok
| y-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.28222 for
| further information)
ERROR: Task 7 (/home/mensfort/workspace_poky/poky/meta/recipes-core/images/core-image-minimal.bb, do_rootfs) failed with exit code '1'
Currently 1 running tasks (1864 of 1870):
0: perl-5.14.3-r1 do_package_write_ipk (pid 28220)

Next time to try HOB, I will make a screenshot.
Maybe I am using the 'old' version 1.4.1. How to change to 1.4.2 or 1.5 ?

greetings,
Bart

Hi Bart,
On 10/21/2013 07:31 PM, Houkes, Bart wrote:
> Hi,
>
> 2 issues are blocking for my development:
>
> last few weeks I was able to download my own kernel on the ARM board with SAMA5d3S.
>
> However, with HOB I cannot add TCF-agent or any other project.. HOB will give some error, becomes red and stops. I cannot compile anymore.
>
> I need TCF-agent to do remote debugging.
Regarding tcf-agent, you can find documentation at http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#getting-the-images.
If you already have tools-debug as extra feature in local.conf, and you receive an error in Hob, can you please provide a screenshot with it?

Cristiana
>
> Another:
>
> There are some presentations about standard projects. How about kernel drivers with cross compilers or Video 4 Linux. How to start those projects?
>
> greetings,
> Bart
> bart.houkes at sogeti.nl
>
> Disclaimer:
> This message contains information that may be privileged or confidential and is the property of Sogeti Nederland B.V. or its Group members. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto




Disclaimer: This message contains information that may be privileged or confidential and is the property of Sogeti Nederland B.V. or its Group members. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

Disclaimer:
This message contains information that may be privileged or confidential and is the property of Sogeti Nederland B.V. or its Group members. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.



More information about the yocto mailing list