Re: Fwd: Re: [STHORM] Updated instruction on how to build BOSP for STHORM Platform

25 views
Skip to first unread message

Patrick Bellasi

unread,
Mar 28, 2013, 5:51:20 AM3/28/13
to Jens Brandenburg, bosp-...@googlegroups.com


Il giorno 28/mar/2013 08:48, "Jens Brandenburg" <jens.bra...@hhi.fraunhofer.de> ha scritto:
>
> Hi,
>
> I think finally compilation worked fine but the deployment failed. Please see the attached log file. It seems to me the android device has been off-line but I already started "p12run --platform=gepop --host=arm --fabric=iss".


It seems a platform issue... before running make to install the update.zip, just check that the board is reachable via ADB, try a simple:

$ adb shell ps

... you should see the list of processes running in the emulator.

Otherwise, there are ADB communication problems... and this does not depends on BOSP.

However, I've never experiences this kind of issues, actually I've also never tested with ISS for the fabric side. Could you try using the posix mode the fabric, i.e.

p12run --platform=gepop --host=arm --fabric=posix

This provides you a functional simulation for the accelerator side, but it should be just enough for your purposes (i.e. application integration) 


Maybe may configuration is faulty. I use the latest SDK and NDK (r8d) from the Android website. Additionally Germain provided me an arm-linux-androideabi-4.4.3, for what purpose ever.


Ok, that should be fine. However, just know that BOSP configured for Android/SThorm provides a gcc-4.6 cross-toolchain, which is installed in out/android-toolchain



>
> Best regards,
> Jens

Let me know if the POSIX simulation solves,

Ciao Patrick

Patrick Bellasi

unread,
Mar 28, 2013, 10:31:33 AM3/28/13
to Jens Brandenburg, bosp-...@googlegroups.com, Germain Haugou



On Thu, Mar 28, 2013 at 3:08 PM, Jens Brandenburg <jens.bra...@hhi.fraunhofer.de> wrote:
Nope,

did not work. Same error again. Log file of make is attached and output of p12run is given below:


brandenburg@ubuntu10:~/custom/bosp$ p12run --platform=gepop --host=arm --fabric=posix
Preparing Android images
/tmp/androidRamdisk.nE426v ~/custom/bosp
521 blocks
1286 blocks
~/custom/bosp
/tmp/androidSystemdisk.V0AlT8 ~/custom/bosp
end of image
cp: cannot stat `/home/brandenburg/custom/sthorm-sdk-118/modules/vision/etc/*': No such file or directory
~/custom/bosp
Check if avd exists
Created AVD 'P2012-4.0.x-c0d0a69c806c446d048b' based on P2012 (STMicroelectronics), ARM (armeabi-v7a) processor,
with the following hardware config:
hw.lcd.density=240
vm.heapSize=24
p12.fabric.iss=false
p12.fabric.numClusters=1

well... I could see that it seem it's using just one cluster...
Eventually there should be a switch which enables the simulation with 4 cluster, but you should ask Germain for details...

 
hw.ramSize=512
$ Gepop fabric side detected broken connection, leaving...

That "broken connection" appears just because you are "killing" the emulator, or even doing anything?

Be aware that, when you run the emulator, the GUI could seem stuck in loading Android, but you should anyway get a working console, right where you run the p12run command.

If this is the case, and you are still having issues with ADB, e.g.
  $ adb shell ps
reports a connection problem, you could try to restart the ADB server:
  $ adb kill-server
and then try again with the ps command... sometimes the ADB server is not working properly...

 
Best regards,
Jens

All the rest seems ok to me... eventually you should go back to Germain, which I've added in copy to this email.

--
#include <best/regards.h>

Patrick Bellasi
Post-Doc at Politecnico di Milano
http://home.dei.polimi.it/bellasi

Germain HAUGOU

unread,
Mar 28, 2013, 10:43:41 AM3/28/13
to Patrick Bellasi, Jens Brandenburg, bosp-...@googlegroups.com

Hi Jens,

 

it seems the emulator is crashing, could you tell me which SDK are you using and if this happens with previous SDKs ?

 

Bye,

Germain

Patrick Bellasi

unread,
Mar 28, 2013, 12:56:04 PM3/28/13
to Germain HAUGOU, Jens Brandenburg, bosp-...@googlegroups.com



On Thu, Mar 28, 2013 at 5:23 PM, Germain HAUGOU <germain...@st.com> wrote:
When you launch this command:

adb shell /data/bosp/sbin/barbeque

If I well remember, you have to keep it and launch the application in another terminal. Otherwise if you hit control C, this is killing BBQ, is it the case ?

Germain, yes, you are right... BBQ must be keept running in a separate terminal.
However, from the log Jens forwarded, it seems more the case that BBQ is stock waiting for the device driver, in the emulator as well as it happens in the physical board... but here in Milano, Giuseppe is testing it again, BBQ in the emulator is working fine and SThorm resources are properly enumerated.

Jens, maybe we could setup an hangout with desktop sharing to better check what's going wrong. Are you available?

Ciao Patrick

Patrick Bellasi

unread,
Mar 28, 2013, 12:58:21 PM3/28/13
to Germain HAUGOU, Jens Brandenburg, bosp-...@googlegroups.com
On Thu, Mar 28, 2013 at 5:56 PM, Patrick Bellasi <bel...@elet.polimi.it> wrote:
Germain, yes, you are right... BBQ must be keept running in a separate terminal.
However, from the log Jens forwarded, it seems more the case that BBQ is stock waiting for the device driver, in the emulator as well as it happens in the physical board... but here in Milano, Giuseppe is testing it again, BBQ in the emulator is working fine and SThorm resources are properly enumerated.

Jens, maybe we could setup an hangout with desktop sharing to better check what's going wrong. Are you available?

ERRATA CORRIGE: I've just checked the LogFile.. sorry!

It's a problem related to recipes... they are not the correct version for STHORM.
Few mins and I'll be back with the solution.

Patrick

Patrick Bellasi

unread,
Mar 28, 2013, 1:21:36 PM3/28/13
to Germain HAUGOU, Jens Brandenburg, bosp-...@googlegroups.com
On Thu, Mar 28, 2013 at 5:58 PM, Patrick Bellasi <bel...@elet.polimi.it> wrote:
It's a problem related to recipes... they are not the correct version for STHORM.
Few mins and I'll be back with the solution.

Jens, we updated the rtlib-testapp repository, just do a:

$ repo sync

to get the patch on recipes... and than don't forget to re-checkout the sthorm branch for barbeque, since the repo sync will switch you to the default (i.e. bosp) branch.

This time you should be up and running... with the test-app working as well.

Please, have a check to the test-app recipe: BbqRTLibTestApp.recipe
The XML fragment starting under

   <platform id="com.st.sthorm">

has the new resources requirements that you are required to use in order to forge a recipe which is valid for the SThorm platform.

Giuseppe is going to update this page on the webiste:
which will details the recipes format.

Ciao Patrick

Patrick Bellasi

unread,
Apr 8, 2013, 8:19:19 AM4/8/13
to Jens Brandenburg, bosp-...@googlegroups.com, Germain HAUGOU



On Mon, Apr 8, 2013 at 1:15 PM, Jens Brandenburg <jens.bra...@hhi.fraunhofer.de> wrote:
Hi Patrick,

Hi jens,
 

I tested the updated version. I think the log file (see logcat_2.log attached) looks different but the failure still remains (see below and in the log file attached):

E/bq.rl.xml(  114): Unable to get the system platform ID
E/bq.am   (  114): Load NEW recipe [BbqRTLibTestApp] FAILED (Error: 4)
E/bq.am   (  114): Create EXC [00125:exc_00:00] FAILED (Error while loading recipe [BbqRTLibTestApp])
E/bq.ap   (  114): APPs PRX: EXC [00125:bbque-testapp:00], name [exc_00] registration FAILED (Error: missing recipe or recipe load failure)

It's still a recipe format error. Could you please send me:
1. the SHA1 of the currently selected <BOSP>/contrib/rtlib-testapp branch, i.e.
cd <BOSP>/contrib/rtlib-testapp && git branch -av

2. the BbqRTLibTestApp.recipe file you could find under <BOSP>/out/etc/bbque/recipes

I'll have a check and come back to you... today we have absolutely to get everything working ;-)

Patrick

Patrick Bellasi

unread,
Apr 9, 2013, 7:47:41 AM4/9/13
to Germain HAUGOU, bosp-...@googlegroups.com, Jens Brandenburg



On Tue, Apr 9, 2013 at 1:24 PM, Patrick Bellasi <bel...@elet.polimi.it> wrote:
 you can find the PIL in the SDK under modules/linux/lib/include/p2012_pil.h

Ok, yess... indeed that is the header we refer once BBQ is build from sources.
Jens: please check in the BOSP menuconfig that, under "External" you point to the last STHorm SDK (i.e. v145).


Hi Germain!
We just discovered with Edoardo a possible regression on Gepop using the POSIX model for the fabric side, using SDK v145.

Indeed, using this vestion of the SDK, if we start the fabric in ISS mode, resources are properly enumerated by BBQ, while a wrong enumeration happens if we start the Gepop simulator in POSIX mode.

Thinks are working properly both in ISS and POSIX mode using the previous SDK v135.

This is probably related to the issue Jens is facing.

Let us know,
Ciao Patrick

Patrick Bellasi

unread,
Apr 9, 2013, 8:09:15 AM4/9/13
to Jens Brandenburg, bosp-...@googlegroups.com, Germain HAUGOU



On Tue, Apr 9, 2013 at 1:54 PM, Jens Brandenburg <jens.bra...@hhi.fraunhofer.de> wrote:
Hi,

Hi jens!

 
I checked the menuconfig and it points to the SDK v118 from 27th of March. What might be a problem is that I used the setup script from the SDK 2013.1. I changed this to SDK v118.

Ok, that's a pretty old one...
 

As you can see below the test application works fine at the third call of the test application. Maybe I should recompile Barbeque "make clean all"? Or should I use the new SDK v145 from yesterday? Anyway this will need some more time till the next test.

I would suggest to switch to SDK v145, which I've just tested it is working fine with Gepop in _ISS mode_, i.e.:

p12run --platform=gepop --host=arm --fabric=posix


It will be a bit slow, for the fabric side simulation, but, at the end, the ISS mode is just what we need for the SVC use-case.

Once you updated the SDK to v145, and the Gepop ISS simulator is running, please rebuild BBQ before deploying it;

$ make clean_bbque && make
 
That configuration should work fine.
While, as I have already notified to Germain, BBQ with v145 Gepop in POSIX mode is not properly enumerating resources... but that's not required for your use-case.




Best regards,
Jens

Ciao Patrick

Patrick Bellasi

unread,
Apr 9, 2013, 8:10:31 AM4/9/13
to Jens Brandenburg, bosp-...@googlegroups.com, Germain HAUGOU

On Tue, Apr 9, 2013 at 2:09 PM, Patrick Bellasi <bel...@elet.polimi.it> wrote:

I would suggest to switch to SDK v145, which I've just tested it is working fine with Gepop in _ISS mode_, i.e.:

p12run --platform=gepop --host=arm --fabric=posix

TYPO:
p12run --platform=gepop --host=arm --fabric=iss

Patrick Bellasi

unread,
Apr 9, 2013, 10:06:33 AM4/9/13
to Jens Brandenburg, bosp-...@googlegroups.com, Germain HAUGOU, Giuseppe Massari
On Tue, Apr 9, 2013 at 3:56 PM, Jens Brandenburg <jens.bra...@hhi.fraunhofer.de> wrote:
Hi,

Hi Jens!
 
I switched to SDK v145. From my point of view two problems still remain. First during make the deployment did not work correctly.

Which kind of issues are you facing? Could you forward me the make log trace?
 
Second the test application fails sometimes. At least after some tries I get the test application running.

We have these kind of problems but just for OpenCL apps (mview), running on the physical board. After 3-4 times we have to reboot the board. I don't know about NPM apps... and however we don't have instabilities when running the OpenCL app in Gepop and using POSIX model... thus, sorry: we are missing experience in the Geopo+ISS+NPM scenarios.
 
Did you test BBQ with an NPM based application?

Nope, only your SVC decoder X86 version. That should run fine AFAIK


 
If so can you provide me the code of this test application to help me with integrating BBQ into the SVC decoder.

The integration is conceptual similar to what you did for the x86 version, roughly:
1. allocate data structures in the onSetup
2. deploy kernels in the onConfigure, based on the AWM ID you receive, and eventually after having un-deployed previously deployed kernels if by switching AWM you need different kernels;
3. trigger a new frame decoding in the onRun and exit from this callback (i.e. onRun) only when the new frame is ready and completely received from the fabric side to the host side.
 

Best regards,
Jens

Ciao Patrick

Patrick Bellasi

unread,
Apr 9, 2013, 10:46:02 AM4/9/13
to Jens Brandenburg, bosp-...@googlegroups.com, Germain HAUGOU, Giuseppe Massari
On Tue, Apr 9, 2013 at 4:29 PM, Jens Brandenburg <jens.bra...@hhi.fraunhofer.de> wrote:
Hi,

make.log has been attached in the last mail (but I attached the file again). The problem is known:

 minzip: Extracted file "/data/bosp/usr/bin/bbque-testapp"
about to run program [/system/bin/dd] with 3 args
/system/vendor/lib/libbbque_rtlib.so: cannot open for write: Out of memory
run_program: child exited with status 1

Ah ok, I see... yes, indeed this is a known problem which however should have been fixed since last SDK v145.
I'll check it again, meanwhile it's just a minor trouble to use the LD_PRELOAD...
 

Concerning the second issue: As could be seen in the log at the end of the previous mail I had to restart the test application twice. I am also sorry but my experience in the Gepop+ISS+NPM scenario is also limited. So who is the expert I can pester with my issues?

No problems, if I know something I'm more than happy to help ;-)
 

Did I have to call make every time before starting Barbeque?

Of course, no... just if you restart the emulatore, since the Android image is rebuilt from scratch.
Of course you could also even just deploy the last build image:
1. keep a copy of this file <BOSP>/deployment/android-arm-p2012/update.zip file
2. use this tool to deploy it on the board:

Than, with a running emulator, you could deploy BBQ by just issuing this command:

$ ./apply_update.sh /path/to/update.zip

 

Okay I will try to create something running and cross fingers that it is that easy.

It will be simple like cooking an hamburger, believe me! ;-)
 

Best regards,
Jens

Ciao Patrick

Germain HAUGOU

unread,
Apr 9, 2013, 11:19:01 AM4/9/13
to Patrick Bellasi, bosp-...@googlegroups.com, Jens Brandenburg

Hi Patrick,

 

I managed to reproduce the issue, I will debug it.

 

Ciao,

Germain

 

From: derk...@gmail.com [mailto:derk...@gmail.com] On Behalf Of Patrick Bellasi
Sent: Tuesday, April 09, 2013 1:48 PM
To: Germain HAUGOU; bosp-...@googlegroups.com
Cc: Jens Brandenburg
Subject: Re: Fwd: Re: [STHORM] Updated instruction on how to build BOSP for STHORM Platform

 

 

 

On Tue, Apr 9, 2013 at 1:24 PM, Patrick Bellasi <bel...@elet.polimi.it> wrote:

Reply all
Reply to author
Forward
0 new messages