Re: Problem while linking rtems-libbsd with application
> On 13-Feb-2017, at 12:36, vivek kukreja wrote: > > Hello Chris, > > I have tried compiling the app with -lm flag but to no avail. I think the > rtems-libbsd waf build process has to be modified a bit to link sfp.c using > the -lm flag. I tried altering the libbsd waf script but couldn't fix the > error. I'm trying to fix it and any help is greatly appreciated. :) Nevermind. I cloned and reinstalled the latest rtems-libbsd and now the app compiles using the -lm flag. Thanks a lot! > Regards, > Vivek > >>> On 09-Feb-2017, at 07:54, Chris Johns wrote: >>> >>> On 09/02/2017 09:54, vivek kukreja wrote: >>> Hello all, >> >> Hello and welcome back to RTEMS. >> >>> >>> I have setup rtems for arm/xilinx_zynq_a9_qemu pair and installed >>> rtems-libbsd. Im trying to run NFS in an application but i get an >>> error while linking libbsd drivers. I use the following commands to >>> compile the application: >>> >>> arm-rtems4.12-gcc -B../../../../../xilinx_zynq_a9_qemu/lib/ -specs >>> bsp_specs -qrtems -DHAVE_CONFIG_H -I. >>> -I/home/vivek/sandbox/rtems/c/src/../../testsuites/samples/fileio -I.. >>> -I/home/vivek/sandbox/rtems/c/src/../../testsuites/samples/../support/include >>> -I/home/vivek/sandbox/rtems-libbsd/rtemsbsd/include >>> -I/home/vivek/sandbox/rtems-libbsd/freebsd/include >>> -I/home/vivek/sandbox/rtems-libbsd/freebsd/sys -march=armv7-a >>> -mthumb -mfpu=neon -mfloat-abi=hard -mtune=cortex-a9 -O0 -g >>> -ffunction-sections -fdata-sections -Wall -Wmissing-prototypes >>> -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs >>> -MT init.o -MD -MP -MF .deps/init.Tpo -c -o init.o >>> /home/vivek/sandbox/rtems/c/src/../../testsuites/samples/fileio/init.c >>> mv -f .deps/init.Tpo .deps/init.Po >>> arm-rtems4.12-gcc -B../../../../../xilinx_zynq_a9_qemu/lib/ -specs >>> bsp_specs -qrtems -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard >>> -mtune=cortex-a9 -O0 -g -ffunction-sections -fdata-sections -Wall >>> -Wmissing-prototypes -Wimplicit-function-declaration >>> -Wstrict-prototypes -Wnested-externs -Wl,--gc-sections >>> -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -mtune=cortex-a9 >>> -o fileio.exe init.o >>> /home/vivek/sandbox/rtems-libbsd/build/arm-rtems4.12-xilinx_zynq_a9_qemu/libbsd.a >>> >>> I'm getting the following error: >>> >>> /home/vivek/sandbox/rtems-libbsd/build/arm-rtems4.12-xilinx_zynq_a9_qemu/libbsd.a(sfp.c.12.o): >>> In function `convert_sff_power': >>> /home/vivek/sandbox/rtems-libbsd/build/arm-rtems4.12-xilinx_zynq_a9_qemu/../../freebsd/sbin/ifconfig/sfp.c:614: >>> undefined reference to `log10' >>> >>> I think this is a linking issue(in the rtems-libbsd build) and i'm >>> reinstalling libbsd to double-check. If anyone has come across this >>> error before please help me resolve it. >>> >> >> Try adding -lm to the libraries you need to link with. It looks to me like >> the recent changes Sebastian has made with libbsd has added a dependence on >> the libm.a library. >> >> Chris >> ___ >> devel mailing list >> devel@rtems.org >> http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 7/9] Patching STTY command for use in RTEMS
Am 10.02.2017 um 15:06 schrieb Kirspel, Kevin: > I can include the libbsd.txt updates in my updated patches. > > If you want getopt_r() to match FREEBSD, it needs to be updated so that it > works correctly when optind is initialized to 1 or 0. I think it might be worth to raise an issue at the newlib but it is quite possible that patching this would break a number of other existing applications (not only RTEMS but others that use newlib) so I'm not sure whether the newlib developers are really found of this idea. Kind regards Christian Mauderer > > Kevin Kirspel > Electrical Engineer - Sr. Staff > Idexx Roswell > 235 Hembree Park Drive > Roswell GA 30076 > Tel: (770)-510- ext. 81642 > Direct: (770)-688-1642 > Fax: (770)-510-4445 > > -Original Message- > From: Christian Mauderer [mailto:christian.maude...@embedded-brains.de] > Sent: Friday, February 10, 2017 6:04 AM > To: Kirspel, Kevin > Cc: RTEMS Devel > Subject: Re: [PATCH 7/9] Patching STTY command for use in RTEMS > > Hello Kevin, > > Am 09.02.2017 um 22:51 schrieb Kirspel, Kevin: >> Before or after the "Build the libbsd without optimization." step, I would >> add a statement about fixing up any compilation errors. Maybe most commands >> will compile after making the changes listed previously but I had to fixup >> errors related to termios differences between RTEMS and FREEBSD. Besides >> that, the instructions were fine and I got the suspected output. > > OK. So in general it worked. That is good to know. Do you want to add this > information to the documentation or should I create a patch? > >> >> I didn't realize the files were being changed to executables. I edit the >> files from a windows application running over a Samba share. I'll check and >> see if samba is making the change on save. > > I assumed such a problem. Also it's just a detail. > >> >> I will fix the tabs. Sometimes I forget to change my editor settings for >> the different files I am working on. > > Thanks. > >> >> There is an issue with the getopt_r() function. Even if you initialize the >> optind value to 1 the getopt_r() function returns '?'. So you get past the >> strspn() check but fail the getopt_r() call. If you initialize the optind >> value to 0, you get the right return value but the optind is wrong for the >> strspn() call. If you change the original code to the following, then it >> will also work: >> >> if (strspn(argv[optind == 0 ? 1 : optind], "-aefg") == >> strlen(argv[optind == 0 ? 1 : optind]) > > OK. So if I understand you correctly, only the first value is really wrong > but the optind will have the correct value for the further processing farther > below. That was my main concern. > >> >> Kevin Kirspel >> Electrical Engineer - Sr. Staff >> Idexx Roswell >> 235 Hembree Park Drive >> Roswell GA 30076 >> Tel: (770)-510- ext. 81642 >> Direct: (770)-688-1642 >> Fax: (770)-510-4445 >> >> -Original Message- >> From: Christian Mauderer >> [mailto:christian.maude...@embedded-brains.de] >> Sent: Thursday, February 09, 2017 3:36 PM >> To: Kirspel, Kevin >> Cc: RTEMS Devel >> Subject: Re: [PATCH 7/9] Patching STTY command for use in RTEMS >> >> Hello Kevin, >> >> thanks for your work. >> >> Out of curiosity: It seems that you are one of the first users of the new >> porting process for user space applications (beneath Sebastian and me). Did >> you encounter any problems that might be worth adding to the guide in >> libbsd.txt? >> >> Beneath that please see my remarks below. >> >> Kind regards >> >> Christian >> >> - Ursprüngliche Mail - >>> Von: "Kevin Kirspel" >>> An: "RTEMS Devel" >>> Gesendet: Donnerstag, 9. Februar 2017 04:21:38 >>> Betreff: [PATCH 7/9] Patching STTY command for use in RTEMS >> >> [...] >>> diff --git a/freebsd/bin/stty/stty.c b/freebsd/bin/stty/stty.c old >>> mode 100644 new mode 100755 >> >> You made the files executable. It would be better, if you could avoid that. >> Please note that this is also true for a lot of other sources in your >> patches. >> >>> index 54c63f6..3999a7f >>> --- a/freebsd/bin/stty/stty.c >>> +++ b/freebsd/bin/stty/stty.c >>> @@ -1,5 +1,8 @@ >>> #include >>> >>> +#ifdef __rtems__ >>> +#include "rtems-bsd-stty-namespace.h" >>> +#endif /* __rtems__ */ >>> /*- >>> * Copyright (c) 1989, 1991, 1993, 1994 >>> * The Regents of the University of California. All rights reserved. >>> @@ -43,6 +46,12 @@ static char sccsid[] = "@(#)stty.c 8.3 (Berkeley) >>> 4/2/94"; >>> #include >>> __FBSDID("$FreeBSD$"); >>> >>> +#ifdef __rtems__ >>> +#define __need_getopt_newlib >>> +#include >>> +#include #include >>> + #endif /* __rtems__ */ >>> #include >>> >>> #include >>> @@ -57,20 +66,56 @@ __FBSDID("$FreeBSD$"); >>> >>> #include "stty.h" >>> #include "extern.h" >>> +#ifdef __rtems__ >>> +#include "rtems-bsd-stty-stty-data.h" >>> +#endif /* __rtems__ */ >>> + >>> +#ifdef __rtems__ >>> +static int main(int argc, char *argv[]); >>> + >>> +RTE
git retrieval with git blocked
Hi I am helping someone with git and ftp blocked by a firewall. That definitely limits the options. We used github for some clones using https. + Does rtems.org support https clone? + Can we do snapshots from git.rtems.org like github? Any RSB hints based for the firewall situation? Thanks. --joel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Error running networks tests with rtems-libbsd, devel/qemu, arm/realview_pbx_a9_qemu
On 13/02/17 09:06, Thapa, Samman wrote: Hey Sebastian, Our project involves working with the Realview BSP, so is there a way we can get the needed patches [for Realview] and any instructions to apply those patches. The Realview BSP was only tested on QEMU. I doubt that it will work on the real hardware out of the box. Please have a look at the attached QEMU patch. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. >From a82f3d684ac9dad982c77f9208fdfc2fcda44e33 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 13 Nov 2013 17:47:38 +0100 Subject: [PATCH] FIXME: Hack to support libbsd tests --- hw/arm/realview.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/realview.c b/hw/arm/realview.c index 8d845dd..3eeb6d6 100644 --- a/hw/arm/realview.c +++ b/hw/arm/realview.c @@ -240,8 +240,8 @@ static void realview_init(QEMUMachineInitArgs *args, nd = &nd_table[n]; if (!done_nic && (!nd->model || -strcmp(nd->model, is_pb ? "lan9118" : "smc91c111") == 0)) { -if (is_pb) { +strcmp(nd->model, !is_pb ? "lan9118" : "smc91c111") == 0)) { +if (!is_pb) { lan9118_init(nd, 0x4e00, pic[28]); } else { smc91c111_init(nd, 0x4e00, pic[28]); -- 1.8.4.5 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel