Thursday, December 08, 2011

 

Missing environment.mk and other files in SFK

Q: I have installed the BSP for SFK for 5.5.1 on my Linux system, but without installing any of the BSP documentation (I didn't need it and already have a copy of it elsewhere). When I try to build the rtose, I get a "No such file or directory" errors on rtose_defaults.mk and environment.mk.Checking the SFK delivery shows these and other important build files missing - in fact, the /refsys directory only has /rtose in it, and nothing else.

A: There is a weird problem with the installer that causes it to omit a lot of important files if you don't install the BSP documentation. Re-install it with all the documentation checked, which is the default. Then the environment.mk and other files should appear in the distro where they belong.

Labels: , , ,


Thursday, July 07, 2011

 

No /refsys directory in OSE5 BSP delivery


Q: I just got a BSP delivery for my OSE5.5 product. I used the refsys reference build in OSE5 previously; however there isn't a /refsys directory in this BSP at all (!), only an /examples directory, and a /doc directory.

A: Your BSP delivery is actually a new style called "modsys" and is designed to be the new paradigm for reference platforms in OSE systems that support multicore. Starting in OSE5.5, all BSP that support multiple cores will be delivered in the modsys style rather than the refsys one.

To learn how to build in for modsys, refer to the new Modsys User's Guide, delivered with all modsys BSPs in the doc directory. There is a documentation error in the book-installation-guide.pdf delivered with the modsys BSPs for OSE5.5 which omits the mention of this guide, but this is corrected in subsequent OSE5.5.x releases.



Q: I just tried "make all" in my BSP examples/ and it gave this error:


/vobs/ose5/system/gcc_win32_mips_4.4.3/bin/mips-elf-gcc: not found

A: Since BSPs are delivered separately from the OSE delivery, the BSP architecture type must be matched to the OSE one. In this case you tried to build a BSP for a MIPS board using the OSE delivery for PowerPC. (The customization for internal paths doesn't help either.)



1. First verify you have the correct OSE architecture installed.


2. Change dir into $BSP_ROOT/examples//sysmake


3. Edit tools.mk to change this:

OSEROOT_ABS ?= /vobs/ose5/system
to this:
OSEROOT_ABS ?= C:/OSE/OSE5.5_MIPS
or whatever is appropriate.

Q: I don't see the rtose5.conf file either. Or rtose.mk. What happened there?

A: It's sort of been split up. In the modsys way, there are three main make targets now: "kernel", "lmbuild", and "image."

If you "make kernel", your build will extract .conf parameters from a new file called examples//kernel/kernel.conf. This conf file also contains any necessary parameters to make the bare-bones kernel.elf binary (e.g. dda, pm). The kernel.conf however is missing quite a few items that aren't valid for just a kernel build.

If you "make lmbuild" you will end up building all the load modules in the modules directory, for which .conf parameters aren't really valid.

When you "make image", the sys.conf file defines system parameters for all the core extensions along with krn parameters, such as inet, ramdisk, ffx, heap, and so on. However, it won't actually work unless you build the kernel and lmbuild targets first.

So a full build command after make clean is now: "make kernel lmbuild image". This is equivalent to "make all." And it builds rtose_release by default;the "FLAVOR=debug" make option still works though.

The osemain.con is also split among kernel and load modules, as it was in the old refsys.

Labels: , , ,


Wednesday, July 07, 2010

 

FLEXlm error: UNSUPPORTED: "softose_win32"

Q: I am using a local FLEXlm license server, whose license expired recently. I just updated it with my new license file, and tried to start the soft kernel. But I get this error:

10:42:37 (osedaemon) UNSUPPORTED: "softose_win32" (PORT_AT_HOST_PLUS ) jmir@jenshostname (License server system does not support this feature. (-18,327:10054 ""))

Why am I getting this even though I updated the license file to the new one?

A: Most likely because the license manager was not restarted. Just copying the license file over in the correct place is not enough. You must stop the license manager and restart it (with lmgrd -z) so that it picks up the new license. Here is a console output of a successful license acquisition:

10:42:51 (lmgrd)
10:42:51 (lmgrd) pid 1740
10:42:51 (lmgrd) Done rereading
10:42:51 (lmgrd) FLEXnet Licensing (v11.4.100.0 build 50818 i86_n3) started on jenshostname (IBM PC) (7/7/2010)
10:42:51 (lmgrd) Copyright (c) 1988-2007 Macrovision Europe Ltd. and/or Macrovision Corporation. All Rights Reserved.
10:42:51 (lmgrd) US Patents 5,390,297 and 5,671,412.
10:42:51 (lmgrd) World Wide Web: http://www.macrovision.com
10:42:51 (lmgrd) License file(s): c:/flexlm/license.dat
10:42:51 (lmgrd) lmgrd tcp-port 744
10:42:51 (lmgrd) Starting vendor daemons ...
10:42:51 (lmgrd) Started osedaemon (pid 6108)
10:42:51 (osedaemon) FLEXnet Licensing version v11.4.100.0 build 50818 i86_n3
10:42:51 (osedaemon) Server started on jenshostname for: softose
10:42:51 (osedaemon) softose softose_win32 com.ose.cdt.launch
10:42:51 (osedaemon) com.ose.system.ui com.ose.ck.system.ui com.ose.pmd
10:42:51 (osedaemon) com.ose.event.ui com.ose.prof.ui com.zealcore.se.core
10:42:51 (osedaemon) EXTERNAL FILTERS are OFF
10:42:51 (lmgrd) osedaemon using TCP-port 1996
10:42:59 (osedaemon) TCP_NODELAY NOT enabled
10:42:59 (osedaemon) OUT: "softose_win32"
jmir@jenshostname

Q: I did that, but i'm still getting the same error.

A: You should also check that your settings in the license file for OSEDAEMON and SERVER are up-to-date as well. Sometimes admins copy a new license file over but forget to fix these. When we ship them, they have default settings and each time you get a new one you should customize them to your server. Example of a correct configuration of a license.dat file:

SERVER jenshostname 001641e67507 744
DAEMON osedaemon c:/OSE/OSE5.4.1_PPC/bin/win32/osedaemon.exe
USE_SERVER

Labels: , , , ,


Wednesday, April 21, 2010

 

Optima debugger in softkernel halts before starting


Q: I am trying to get the debugger in the soft kernel for OSE5.4.1 going on Optima 2.x. I've followed the instructions in the Optima User Guide to the letter, and the soft kernel builds and runs, but when I try to debug it in Optima I get no further than this error:

Can't find a source file at "/cygdrive/c/OSE/ose5.4.1_ppc/src/osemain.c"
Locate the file or edit the source lookup path to include its location.


I thought I did everything right. Why is Optima complaining now?


A: The docs for Optima need a small amount of updating, mainly to account for the fact that they were written before the big split-off of the BSP products from the "mainline" OSE stream. Beginning in OSE5.3, BSPs were no longer delivered with the main OSE5 delivery and were purchased - and delivered - separately. Our BSP delivery docs advise users to install a directory heirarchy that co-locates the BSP at the save level with the OSE5 directory, rather than underneath it.

And now, the Optima tool runs in a completely different area of the product - within the BSP delivery, e.g. under C:/BSP_SFK_OSE5.4.1/refsys/rtose/sfk-win32. The config doc wasn't updated for this subtlety, which requires for Windows users adding a Path Mapping (under Eclipse C/C++ view in Debug -> Debug Configurations...). Hence the Optima tool's failure to find the source paths for osemain.c, which is located under the OSE5 mainline directory under C:/OSE/OSE5.4.1_PPC/src .

The simplest solution is to follow the button titled "Locate File..." as shown above in the pic. Using the standard windows file dialogue, just add the full path to the osemain.c in OSE5.4.1_PPC mainline area. You'll also have to add this for hello.c if you continue following the doc example (when it tells you to step over the hello.c breakpoint). This will automagically add the desired Path Mapping entries in your Debug Configuration for this debug run, where it can be found later under the Source tab.

Labels: , , , , ,


Friday, March 26, 2010

 

Install errors on non-supported Linux distros

Q: I'm trying to install OSE5.x/Optima products from CD on a Linux system. I got the following error during installation looking for a missing lib:

[root@localhost OSE5.4.2_PPC]# ./install.sh Welcome to the Enea Installation Program!
Creating the temporary directory...
Unzipping the Java Runtime Environment...
Launching the Enea Installation Program on display :0.0...
Exception in thread "main" java.lang.UnsatisfiedLinkError:
/tmp/ose_J6UME4/jre_linux/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at sun.security.action.LoadLibraryAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
at sun.awt.DebugHelper.(Unknown Source)
at java.awt.Component.(Unknown Source) Removing the temporary directory...

A: This error only occurs for the Linux distributions that are not officially support for OSE and Optima. Currently, the officially supported Linux distributions are:

* Suse Linux Enterprise Server 10
* Suse Linux Enterprise Desktop 10

The X11 shared library libXp.so.6 is required by JRE (Java RuntimeEnvironment) 1.4.2 used by the Enea installation program. If that library is missing you can try one of the three following things:
1. Make sure libXp.so.6 is installed.
2. If you have a newer version of libXp.so, try to create a link in that directory that is called libXp.so.6 and points to the newer version of libXp.so.
3. Use another JRE (1.4.2 or newer) that is installed on the Linux machine when starting the Enea installation program, e.g. "install.sh -j /usr/local/bin/java".

Option 3 is generally the most effective.

Labels: , , ,


Tuesday, December 22, 2009

 

"make all" gives weird errors that don't make sense

Q: I'm trying to build a BSP under OSE5.4.1 and got this error:

$ make all../../rtose/common_rtose.mk:169: *** multiple target patterns. Stop.make: *** [mods] Error 2

This makes no sense whatsoever. I've already done the required mod to environment.mk.

A: Sometimes there is more than one cause.

For example, the OSE baseline is set up differently starting in OSE5.3.x, and is also matched to a BSP for each release. So you should only use the cygwin shipped with OSE5.3.x for building BSPs intended for OSE5.3.x; If you try to use OSE5.3.x cygwin to build a BSP delivered for use with OSE5.4.x, you may get strange errors. Verify that your cygwin is the correct one and that $OSE_ROOT and toolset is pointing to the right place, e.g.:

$ echo $OSE_ROOT
C:/OSE/OSE5.4.1_PPC
$ which powerpc-eabi-gcc
/cygdrive/c/OSE/OSE5.4.1_PPC/gcc_win32_powerpc_4.2.3/bin/powerpc-eabi-gcc

Another problem may be with corrupted cygwin environment. If you see strange make errors you might quickly check the environment, e.g. run "alias" and see what comes out:

$ alias
'lias gd='grep --directories=recurse
'lias java='E:/ThirdParty/jre1.5.0_06/bin/java.exe
'lias ll='ls -la

Clearly this shows the aliases are not being interpreted correctly, and possibly that the ~/.bash_profile (which has the aliases defined) is corrupted. A quick cleaning with the col utility takes care of this:

$ cp .bash_profile orig.bash_profile
$ col -b < .bash_profile > out.bash_profile
$ cp out.bash_profile .bash_profile

The col utility will remove any escape and other "invisible" chars that may be in the cygwin init files. Not the solution to every strange problem, but something to eliminate and to restart cygwin after fixing.

Labels: , , ,


Friday, December 18, 2009

 

Compiling load modules for soft kernel?

Q: I want to try a load module in my soft kernel before putting it on the real target. How can I build this? The sfk-win32 ARCH target doesn't work.

A: The trick to getting the LMs to build for sfk is to use ARCH=x86 instead. E.g.:

$ C:/OSE/BSP_SFK_OSE5.4.1/refsys/modules/pingpong
$ make ARCH=x86 all
--- Compiling src/ping.c
--- Compiling src/pong.c
--- Compiling ../../modules/src/libwhat.c for obj/x86/debug/libwhat.o
--- Building lib/x86/debug/libpingpong.a
--- Compiling src/debug_friendly.c
--- Compiling src/pingpong_main.c
--- Concatenating osemain.con fragments
--- Compiling c:/OSE/ose5.4.1_ppc/src/osemain.c
--- Compiling c:/OSE/ose5.4.1_ppc/src/crt0_lm.c
--- Compiling c:/OSE/ose5.4.1_ppc/src/ose_confd.c
--- Linking obj/x86/debug/unconfigured (pass 1)
--- Linking obj/x86/debug/unconfigured (pass 2)
--- Stripping load module from symbol and debug information
--- Postlinking obj/x86/debug/unconfigured
--- Inserting configuration ../../modules/src/default.lmconf
--- Sizing bin/x86/pingpong_debug.elf
Size of text : 29704 (29K) (t)
Size of initdata : 0 (0K) (id)
Size of data : 2084 (2K) (d)
Size of bss : 344 (0K) (b)
ROM footprint : 31788 (31K) (t+d)
RAM footprint : 36864 (36K) (t+id+d+b)


The resulting elf file is located in :

C:/OSE/BSP_SFK_OSE5.4.1/refsys/modules/pingpong/bin/x86/pingpong_debug.elf

This applies for OSE5.4.1 but holds for older releases as well. To upload it, remember that the directory for sfk is mounted locally (for newer OSE5 releases) so you don't need the /tftp/ in the pathname. The default pathname is /host, which represents your root C: level. Just create a temp directory from your C: top-level directory and mount from there, e.g. create C:/oselm, copy the elf file over there, then download it to the rtose for sfk-win32 with:

rtose@softwin> pm_install pingpong /host/oselm/pingpong_debug.elf
rtose@softwin> pm_create pingpong
rtose@softwin> pm_lminfo
core_module
pingpong

Labels: , , ,


This page is powered by Blogger. Isn't yours?

free web hit counter
free invisible web counter