grisp / grisp-software

Toolchain and Examples for GRISP
28 stars 5 forks source link

WiFi optimizations and libbsd to FreeBSD 12 update #46

Open sebhub opened 6 years ago

sebhub commented 6 years ago

This pull requests updates the libbsd to a FreeBSD baseline close to the FreeBSD 12 release (2018-09-17). This requires an RSB and RTEMS update as well.

The saf1761_otg driver uses now a real interrupt handler for the saf1761_otg_filter_interrupt() function which reduces the amount of task switches to the interrupt server.

An mbuf alignment was fixed in the rtwn driver receive path to avoid unnecessary data movements.

Task stacks moved to the internal SRAM in the grisp-sd-sample. This improves TCP throughput by about 100KiB/s.

curl -o /dev/null ftp://anonymous@192.168.178.27/dev/zero % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 104M 0 0 485k 0 --:--:-- 0:03:39 --:--:-- 542k

curl -T /dev/zero ftp://anonymous@192.168.178.27/dev/null % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 76.2M 0 0 0 76.2M 0 593k --:--:-- 0:02:11 --:--:-- 606k

The signal quality has a huge impact on the throughput. This makes measurements quite uncertain.

The rtwn transmit path uses m_copydata() which uses bcopy() which is a memmove(). There is no specialized memmove() implementation for ARMv7-M in Newlib (unlike to memcpy()). This is a slight performance penalty.

lin7sh commented 5 years ago

Any progress on this, Freebsd12-release has published a few days ago

peerst commented 5 years ago

Any progress on this, Freebsd12-release has published a few days ago

Are you having issues that you hope to be fixed by this @mko-io ?

peerst commented 5 years ago

Task stacks moved to the internal SRAM in the grisp-sd-sample. This improves TCP throughput by about 100KiB/s.

@sebhub I fail to see how this is done. All I see some smaller stacks and the inclusion of stackalloc.h

We would like to replicated this for the GRiSP image too (in addition to moving heavily used RTEMS and Erlang modules into internal SRAM once we figure out how that is done -- hints welcome ;-)

lin7sh commented 5 years ago

@peerst no, I just curious about whether the new Freebsd release would improve grisp or not

peerst commented 5 years ago

@mko-io I don't expect FreeBSD 12 to bring much new things for us. This PR is mainly about the WiFi and other optimisations which just happen to be made on the latest libbsd, which happens to be based on FreeBSD 12.

What we would get is all security updates since the last update of libbsd if there are any in the kernel network stack.

sebhub commented 5 years ago

The libbsd upstream is based on FreeBSD head 2018-12-20. The FreeBSD 12 release was 2018-12-11:

https://www.freebsd.org/releases/12.0R/announce.html

It includes an update of wpa_supplicant to version 2.7.

It includes an update of the OpenSSL baseline to version 1.1.1a.

sebhub commented 5 years ago

Task stacks moved to the internal SRAM in the grisp-sd-sample. This improves TCP throughput by about 100KiB/s.

@sebhub I fail to see how this is done. All I see some smaller stacks and the inclusion of stackalloc.h

We would like to replicated this for the GRiSP image too (in addition to moving heavily used RTEMS and Erlang modules into internal SRAM once we figure out how that is done -- hints welcome ;-)

The inclusion of <bsp/stackalloc.h> in the configuration source file just enables a custom stack allocator. It uses the internal SRAM. The earlier a task is created the more likely its task stack is allocated from the internal SRAM. An alternative would be to use POSIX threads with a user defined task stack or a new API for Classic tasks which allow a user defined stack.

holzingk commented 5 years ago

Builds fine on Linux, but still having issues on macOS, need to have a closer look...

lin7sh commented 5 years ago

@peerst I've read about Freebsd has some improvement on MMC/SDIO stack (base on CAM), does this mean we can use SDIO based wifi chip on grisp board?

c-mauderer commented 5 years ago

@peerst I've read about Freebsd has some improvement on MMC/SDIO stack (base on CAM), does this mean we can use SDIO based wifi chip on grisp board?

A note regarding that from me: We had a GSoC student in 2018 who worked on the topic of using the FreeBSD-SDIO stack on RTEMS. He had some success on a Beagle Bone Black with a normal SD storage card. But there was still some work left. I would expect that about the following would be necessary:

So SDIO WLAN modules should theoretically be possible but they would need quite some work.

eproxus commented 5 years ago

@sebhub @c-mauderer I'm having trouble building this toolchain version on macOS 10.14.2:

../../gcc-7.3.0/gcc/graphite-optimize-isl.c:57:19: error: use of undeclared identifier 'isl_space_dim'
  unsigned dims = isl_space_dim (space, isl_dim_set);
                  ^
../../gcc-7.3.0/gcc/graphite-optimize-isl.c:60:3: error: use of undeclared identifier 'isl_space_free'
  isl_space_free (space);
  ^

This could be related https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86724

It's quite possible that GCC 7.3.0 does not play nice with ISL 0.20 / whatever is installed in macOS 10.13... Any suggestions?

c-mauderer commented 5 years ago

The branch has already slightly fallen behind RTEMS upstream. Sebastian updated gcc to 7.4.0 in Dezember. Would you expect that 7.4.0 would work? In that case it might would be a good idea to update rtems, libbsd and rsb in this branch and try with that.

eproxus commented 5 years ago

@c-mauderer It seems it should be fine in 7.4 according to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86724#c6

Richard Biener 2018-08-01 08:08:08 UTC: Fixed for GCC 7.4+.

So it sounds like a good idea to update all of them to the latest version.

eproxus commented 5 years ago

@c-mauderer Can you tell me how to do that, or help me do it?

c-mauderer commented 5 years ago

To update the submodules, the following steps are necessary (written out of my head so no guarantee for no typos):

c-mauderer commented 5 years ago

Note that you should always use rtems, rtems-libbsd and rtems-source-builder from about the same date. Sometimes there are dependencies - especially from libbsd to newlib and rtems.

eproxus commented 5 years ago

@c-mauderer Got further this time, but another error appeared when compiling GCC 7.4.0:

/arm-rtems5/eb/thumb/armv7-r/vfpv3-d16/hard/libstdc++-v3/include/bits/locale_facets.h:41:10: fatal error: bits/ctype_base.h: No such file or directory
 #include <bits/ctype_base.h>
          ^~~~~~~~~~~~~~~~~~~

Some casual searching suggests libstdc++ is not available in macOS Mojave (10.14)...

eproxus commented 5 years ago

Seems Apple decided to remove /usr/include in the upgrade to macOS Mojave (!). Following the instructions here solved the error above: https://stackoverflow.com/questions/52509602/cant-compile-c-program-on-a-mac-after-upgrade-to-mojave

Next problem (or is it the build successful?) is this:

...
Checking for RTEMS_POSIX_API                : yes
Checking for RTEMS_SMP                      : no
Checking for RTEMS_NETWORKING               : no
Checking for header dlfcn.h                 : yes
Checking for header rtems/pci.h             : yes
Configure variant:                          : arm-rtems5-atsamv-grisp
Checking for header rtems/rtems-debugger.h  : yes
'configure' finished successfully (0.978s)
+ waf
Could not create the directory ///o
c-mauderer commented 5 years ago

I'm not entirely sure because it is missing some context but I would assume that RTEMS did build fine but the libbsd build went wrong. Can you do three things:

  1. There is now a known working version of waf checked in into libbsd. Use that version.
  2. Add a -v to the waf call.
  3. Re-run ./build/build-libbsd.sh

Basically 1 and 2 would be the following changes:

diff --git a/build/build-libbsd.sh b/build/build-libbsd.sh
index 61bc009..909499f 100755
--- a/build/build-libbsd.sh
+++ b/build/build-libbsd.sh
@@ -55,15 +55,15 @@ then
        fi
 fi

-waf configure \
+./waf configure \
        --prefix="${PREFIX}" \
        --rtems-bsps="${RTEMS_CPU}/${BSP_NAME}" \
        --buildset="${SCRIPTDIR}/libbsd-buildset.ini"
-waf
+./waf -v

 if [ $DO_INSTALL -ne 0 ]
 then
-       waf install
+       ./waf install
 fi

 if [ "$BSP_NAME" = "atsamv" ]

The -v should be removed after the problem is solved. The other changes would be good to keep.

eproxus commented 5 years ago

@c-mauderer You're correct that it was in the libbsd build. Unfortunately the waf change didn't solve it:

'configure' finished successfully (1.272s)
+ ./waf -v
Could not create the directory ///o

Full output here: https://gist.github.com/eproxus/2b60f59c50ac74f05c3c93147ef58d27

c-mauderer commented 5 years ago

Somehow I remember that I had that output once too. I'm currently not sure when or why. Could you try to clean the rtems-libbsd directory? For that I would suggest the command git clean -dxn inside the libbsd directory. That shows a list with files that git wants to delete. That should be the build directory and some waf specific stuff. If the output sounds reasonable, you can replace the n by an f to really delete all listed files.

eproxus commented 5 years ago

@c-mauderer After cleaning the repo from scratch with git clean -fXd and git clean -fxd including all submodules I still get the same error.

c-mauderer commented 5 years ago

Do you have the branch somewhere so that I could try a build on my Linux machine?

eproxus commented 5 years ago

@c-mauderer Pushed my changes to eproxus/wifi-opti-and-libbsd-to-freebsd-12-update

c-mauderer commented 5 years ago

@eproxus That branch builds fine on my OpenSUSE 42.3 Linux. So I really have some trouble debugging that problem. You might can try to add some of the extra verbosity options to the waf configure and build. There are

  -v, --verbose         verbosity level -v -vv or -vvv [default: 0]
  --show-commands       Print the commands as strings.
  --enable-warnings     Enable all warnings. The default is quiet builds.

With some luck, one of them provides some more info. -v should work for configure and build. The other two are configure options.

eproxus commented 5 years ago

@c-mauderer Configure seems to work fine, it is the actual build step that fails. Here's the full output with -vvv (just -v didn't show anything extra):

'configure' finished successfully (1.006s)
+ ./waf -vvv
12:55:57 env {'files': ['/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/wscript'], 'run_dir': '/opt/grisp/grisp-software/8b2967b756/rtems-libbsd', 'hash': '\xed\x99n+\xd7\xc0\x839B\x07J\xeaL\xdb\xee\xcf', 'top_dir': '/opt/grisp/grisp-software/8b2967b756/rtems-libbsd', 'out_dir': '/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/build', 'argv': ['./waf', 'configure', '--prefix=/opt/grisp/grisp-software/8b2967b756/build/..//rtems-install/rtems/5/', '--rtems-bsps=arm/atsamv', '--buildset=/opt/grisp/grisp-software/8b2967b756/build/libbsd-buildset.ini'], 'launch_dir': '/opt/grisp/grisp-software/8b2967b756/rtems-libbsd', 'environ': {'GOPATH': '/Users/user/Code/go', 'TERM_SESSION_ID': 'w0t0p0:7CD55A09-9877-40EA-A782-7EED94C00FF5', 'ERL_ZFLAGS': '-kernel shell_history enabled', 'LAST_EXEC_TIME': '1', 'XPC_SERVICE_NAME': '0', 'TERM_PROGRAM_VERSION': '3.2.0beta8', 'TMUX': '/private/tmp/tmux-501/default,2681,0', 'HOMEBREW_NO_ANALYTICS': '1', 'SSH_AUTH_SOCK': '/private/tmp/com.apple.launchd.r2IZtuVlL2/Listeners', 'Apple_PubSub_Socket_Render': '/private/tmp/com.apple.launchd.DjgiZR0JRi/Render', 'LOGNAME': 'user', 'USER': 'user', 'CHANDLER_GITHUB_API_TOKEN': '87cd7c6e08dc5712294daa9a3c86223d6be82e0f', 'HOME': '/Users/user', 'ITERM_PROFILE': 'Default', 'PATH': '/opt/grisp/grisp-software/8b2967b756/build/..//rtems-install/rtems/5//bin:/Users/user/.asdf/shims:/Users/user/.asdf/shims:/Users/user/.asdf/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/TeX/texbin:/usr/local/MacGPG2/bin:/Applications/Wireshark.app/Contents/MacOS:/Users/user/.bin:/Users/user/.cache/rebar3/bin:/usr/local/sbin:/Users/user/Code/go/bin:/Users/user/.psvm/current/bin:/usr/local/texlive/2017/bin/x86_64-darwin:/Users/user/.cargo/bin', 'CHANGELOG_GITHUB_TOKEN': '9ab70a1a35759050d22d997f2ccba4469574faff', 'LC_ALL': 'en_US.UTF-8', '_': './waf', 'TERM_PROGRAM': 'iTerm.app', 'TERM': 'vt100', 'SHELL': '/usr/local/bin/zsh', 'COLORFGBG': '7;0', 'TMPDIR': '/var/folders/72/nh3_jg490_g0y21tn6r6h57h0000gn/T/', 'SHLVL': '3', 'OLDPWD': '/opt/grisp/grisp-software/8b2967b756', 'HOMEBREW_GITHUB_API_TOKEN': '5cf2312251141f6511c13580b6bfd9d78227ee73', 'SECURITYSESSIONID': '186ab', 'VISUAL': 'nvim', 'XPC_FLAGS': '0x0', '__CF_USER_TEXT_ENCODING': '0x1F5:0x0:0x0', 'BASE16_THEME': 'base16-gruvbox-dark-hard', 'ITERM_SESSION_ID': 'w0t0p0:7CD55A09-9877-40EA-A782-7EED94C00FF5', 'TMUX_PANE': '%3', 'ASDF_DIR': '/Users/user/.asdf', 'COLORTERM': 'truecolor', 'VIMPAGER_VIM': 'nvim', 'PWD': '/opt/grisp/grisp-software/8b2967b756/rtems-libbsd', 'COMMAND_MODE': 'unix2003', 'TMUX_PLUGIN_MANAGER_PATH': '/Users/user/.tmux/plugins/', 'EDITOR': 'nvim'}, 'config_cmd': 'configure', 'options': {'files': '', 'freebsd_options': '', 'force': False, 'verbose': 0, 'no_lock_in_run': '', 'no_lock_in_out': '', 'whelp': 0, 'show_commands': False, 'destdir': '', 'zones': '', 'buildset': ['/opt/grisp/grisp-software/8b2967b756/build/libbsd-buildset.ini'], 'prefix': '/opt/grisp/grisp-software/8b2967b756/rtems-install/rtems/5', 'pdb': 0, 'profile': 0, 'rtems_path': None, 'rtems_tools': None, 'net_config': 'config.inc', 'targets': '', 'out': '', 'auto_regen': False, 'jobs': 8, 'rtems_archs': 'all', 'progress_bar': 0, 'optimization': '2', 'top': '', 'warnings': False, 'libdir': None, 'colors': 'auto', 'keep': 0, 'rtems_version': None, 'rtems_bsps': 'arm/atsamv', 'distcheck_args': None, 'bindir': None, 'no_lock_in_top': ''}}
12:55:57 env {'version': 33557760, 'tools': [{'tool': 'ar', 'tooldir': None, 'funs': None}, {'tool': 'c', 'tooldir': None, 'funs': None}, {'tool': 'gcc', 'tooldir': None, 'funs': None}, {'tool': 'ar', 'tooldir': None, 'funs': None}, {'tool': 'cxx', 'tooldir': None, 'funs': None}, {'tool': 'g++', 'tooldir': None, 'funs': None}, {'tool': 'ar', 'tooldir': None, 'funs': None}, {'tool': 'asm', 'tooldir': None, 'funs': None}, {'tool': 'gas', 'tooldir': None, 'funs': None}]}
12:55:57 action ['def f(tsk):', '\tenv = tsk.env', '\tgen = tsk.generator', '\tbld = gen.bld', '\tcwdx = tsk.get_cwd()', '\tdef to_list(xx):', '\t\tif isinstance(xx, str): return [xx]', '\t\treturn xx', '\tdef merge(lst1, lst2):', '\t\tif lst1 and lst2:', '\t\t\treturn lst1[:-1] + [lst1[-1] + lst2[0]] + lst2[1:]', '\t\treturn lst1 + lst2', '\tlst = []', "\tlst.extend(to_list(env['CC']))", "\tlst.extend(tsk.colon('ARCH_ST', 'ARCH'))", "\tlst.extend(to_list(env['CFLAGS']))", "\tlst.extend(tsk.colon('FRAMEWORKPATH_ST', 'FRAMEWORKPATH'))", "\tlst.extend(tsk.colon('CPPPATH_ST', 'INCPATHS'))", "\tlst.extend(tsk.colon('DEFINES_ST', 'DEFINES'))", "\tlst.extend(merge(to_list(env['CC_SRC_F']), [a.path_from(cwdx) for a in tsk.inputs]))", "\tlst.extend(merge(to_list(env['CC_TGT_F']), [tsk.outputs[0].abspath()]))", "\tlst.extend(to_list(env['CPPFLAGS']))", "\tif '' in lst:", '\t\tlst = [x for x in lst if x]', '\ttsk.last_cmd = lst', '\treturn tsk.exec_command(lst, cwd=cwdx, env=env.env or None)']
12:55:57 action ['def f(tsk):', '\tenv = tsk.env', '\tgen = tsk.generator', '\tbld = gen.bld', '\tcwdx = tsk.get_cwd()', '\tdef to_list(xx):', '\t\tif isinstance(xx, str): return [xx]', '\t\treturn xx', '\tdef merge(lst1, lst2):', '\t\tif lst1 and lst2:', '\t\t\treturn lst1[:-1] + [lst1[-1] + lst2[0]] + lst2[1:]', '\t\treturn lst1 + lst2', '\tlst = []', "\tlst.extend(to_list(env['LINK_CC']))", "\tlst.extend(to_list(env['LINKFLAGS']))", "\tlst.extend(merge(to_list(env['CCLNK_SRC_F']), [a.path_from(cwdx) for a in tsk.inputs]))", "\tlst.extend(merge(to_list(env['CCLNK_TGT_F']), [tsk.outputs[0].abspath()]))", "\tlst.extend(tsk.colon('RPATH_ST', 'RPATH'))", "\tlst.extend(tsk.colon('FRAMEWORKPATH_ST', 'FRAMEWORKPATH'))", "\tlst.extend(tsk.colon('FRAMEWORK_ST', 'FRAMEWORK'))", "\tlst.extend(tsk.colon('ARCH_ST', 'ARCH'))", "\tlst.extend(to_list(env['STLIB_MARKER']))", "\tlst.extend(tsk.colon('STLIBPATH_ST', 'STLIBPATH'))", "\tlst.extend(tsk.colon('STLIB_ST', 'STLIB'))", "\tlst.extend(to_list(env['SHLIB_MARKER']))", "\tlst.extend(tsk.colon('LIBPATH_ST', 'LIBPATH'))", "\tlst.extend(tsk.colon('LIB_ST', 'LIB'))", "\tlst.extend(to_list(env['LDFLAGS']))", "\tif '' in lst:", '\t\tlst = [x for x in lst if x]', '\ttsk.last_cmd = lst', '\treturn tsk.exec_command(lst, cwd=cwdx, env=env.env or None)']
12:55:57 action ['def f(tsk):', '\tenv = tsk.env', '\tgen = tsk.generator', '\tbld = gen.bld', '\tcwdx = tsk.get_cwd()', '\tdef to_list(xx):', '\t\tif isinstance(xx, str): return [xx]', '\t\treturn xx', '\tdef merge(lst1, lst2):', '\t\tif lst1 and lst2:', '\t\t\treturn lst1[:-1] + [lst1[-1] + lst2[0]] + lst2[1:]', '\t\treturn lst1 + lst2', '\tlst = []', "\tlst.extend(to_list(env['CXX']))", "\tlst.extend(tsk.colon('ARCH_ST', 'ARCH'))", "\tlst.extend(to_list(env['CXXFLAGS']))", "\tlst.extend(tsk.colon('FRAMEWORKPATH_ST', 'FRAMEWORKPATH'))", "\tlst.extend(tsk.colon('CPPPATH_ST', 'INCPATHS'))", "\tlst.extend(tsk.colon('DEFINES_ST', 'DEFINES'))", "\tlst.extend(merge(to_list(env['CXX_SRC_F']), [a.path_from(cwdx) for a in tsk.inputs]))", "\tlst.extend(merge(to_list(env['CXX_TGT_F']), [tsk.outputs[0].abspath()]))", "\tlst.extend(to_list(env['CPPFLAGS']))", "\tif '' in lst:", '\t\tlst = [x for x in lst if x]', '\ttsk.last_cmd = lst', '\treturn tsk.exec_command(lst, cwd=cwdx, env=env.env or None)']
12:55:57 action ['def f(tsk):', '\tenv = tsk.env', '\tgen = tsk.generator', '\tbld = gen.bld', '\tcwdx = tsk.get_cwd()', '\tdef to_list(xx):', '\t\tif isinstance(xx, str): return [xx]', '\t\treturn xx', '\tdef merge(lst1, lst2):', '\t\tif lst1 and lst2:', '\t\t\treturn lst1[:-1] + [lst1[-1] + lst2[0]] + lst2[1:]', '\t\treturn lst1 + lst2', '\tlst = []', "\tlst.extend(to_list(env['LINK_CXX']))", "\tlst.extend(to_list(env['LINKFLAGS']))", "\tlst.extend(merge(to_list(env['CXXLNK_SRC_F']), [a.path_from(cwdx) for a in tsk.inputs]))", "\tlst.extend(merge(to_list(env['CXXLNK_TGT_F']), [tsk.outputs[0].abspath()]))", "\tlst.extend(tsk.colon('RPATH_ST', 'RPATH'))", "\tlst.extend(tsk.colon('FRAMEWORKPATH_ST', 'FRAMEWORKPATH'))", "\tlst.extend(tsk.colon('FRAMEWORK_ST', 'FRAMEWORK'))", "\tlst.extend(tsk.colon('ARCH_ST', 'ARCH'))", "\tlst.extend(to_list(env['STLIB_MARKER']))", "\tlst.extend(tsk.colon('STLIBPATH_ST', 'STLIBPATH'))", "\tlst.extend(tsk.colon('STLIB_ST', 'STLIB'))", "\tlst.extend(to_list(env['SHLIB_MARKER']))", "\tlst.extend(tsk.colon('LIBPATH_ST', 'LIBPATH'))", "\tlst.extend(tsk.colon('LIB_ST', 'LIB'))", "\tlst.extend(to_list(env['LDFLAGS']))", "\tif '' in lst:", '\t\tlst = [x for x in lst if x]', '\ttsk.last_cmd = lst', '\treturn tsk.exec_command(lst, cwd=cwdx, env=env.env or None)']
12:55:57 action ['def f(tsk):', '\tenv = tsk.env', '\tgen = tsk.generator', '\tbld = gen.bld', '\tcwdx = tsk.get_cwd()', '\tdef to_list(xx):', '\t\tif isinstance(xx, str): return [xx]', '\t\treturn xx', '\tdef merge(lst1, lst2):', '\t\tif lst1 and lst2:', '\t\t\treturn lst1[:-1] + [lst1[-1] + lst2[0]] + lst2[1:]', '\t\treturn lst1 + lst2', '\tlst = []', "\tlst.extend(to_list(env['AS']))", "\tlst.extend(to_list(env['ASFLAGS']))", "\tlst.extend(tsk.colon('ASMPATH_ST', 'INCPATHS'))", "\tlst.extend(tsk.colon('DEFINES_ST', 'DEFINES'))", "\tlst.extend(merge(to_list(env['AS_SRC_F']), [a.path_from(cwdx) for a in tsk.inputs]))", "\tlst.extend(merge(to_list(env['AS_TGT_F']), [a.path_from(cwdx) for a in tsk.outputs]))", "\tif '' in lst:", '\t\tlst = [x for x in lst if x]', '\ttsk.last_cmd = lst', '\treturn tsk.exec_command(lst, cwd=cwdx, env=env.env or None)']
12:55:57 action ['def f(tsk):', '\tenv = tsk.env', '\tgen = tsk.generator', '\tbld = gen.bld', '\tcwdx = tsk.get_cwd()', '\tdef to_list(xx):', '\t\tif isinstance(xx, str): return [xx]', '\t\treturn xx', '\tdef merge(lst1, lst2):', '\t\tif lst1 and lst2:', '\t\t\treturn lst1[:-1] + [lst1[-1] + lst2[0]] + lst2[1:]', '\t\treturn lst1 + lst2', '\tlst = []', "\tlst.extend(to_list(env['ASLINK']))", "\tlst.extend(to_list(env['ASLINKFLAGS']))", "\tlst.extend(merge(to_list(env['ASLNK_TGT_F']), [a.path_from(cwdx) for a in tsk.outputs]))", "\tlst.extend(merge(to_list(env['ASLNK_SRC_F']), [a.path_from(cwdx) for a in tsk.inputs]))", "\tif '' in lst:", '\t\tlst = [x for x in lst if x]', '\ttsk.last_cmd = lst', '\treturn tsk.exec_command(lst, cwd=cwdx, env=env.env or None)']
12:55:57 build Could not load the build cache /opt/grisp/grisp-software/8b2967b756/rtems-libbsd/build/arm-rtems5-atsamv-grisp/.wafpickle-darwin-34017264-20 (missing)
  File "./waf", line 165, in <module>
    Scripting.waf_entry_point(cwd, VERSION, wafdir)
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Scripting.py", line 119, in waf_entry_point
    run_commands()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Scripting.py", line 179, in run_commands
    ctx=run_command(cmd_name)
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Scripting.py", line 170, in run_command
    ctx.execute()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Scripting.py", line 367, in execute
    return execute_method(self)
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Build.py", line 90, in execute
    self.restore()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Build.py", line 141, in restore
    self.init_dirs()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Build.py", line 88, in init_dirs
    self.bldnode.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 179, in mkdir
    self.parent.mkdir()
  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Node.py", line 188, in mkdir
    raise Errors.WafError('Could not create the directory %r'%self)

Could not create the directory ///o
  File './waf', line 165, in <module>
        Scripting.waf_entry_point(cwd, VERSION, wafdir)
  File '/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Scripting.py', line 131, in waf_entry_point
        Logs.error(e.msg)
c-mauderer commented 5 years ago

I had a look whether I can organize some legal system similar to MacOS. But it seems that beneath some VMs (that would violate the license terms of Apple) and a "PureDarwin" project which is not usable, there are no real usable systems.

But I noted something else while updating to your branch on my home machine: The repo-URL for the rtems_waf subrepository in libbsd has changed. Can you have a look at what a git remote -v in rtems-libbsd/rtems_waf prints? The URL should be git://git.rtems.org/rtems_waf.git. If there is still a chrisj in the URL, that one hasn't been updated. In that case, we might should add a git submodule sync during the repo update of libbsd in the buildscripts.

Edit: PS: The build went fine on my home machine (Arch Linux) too.

eproxus commented 5 years ago

@c-mauderer Yeah, running macOS under VMs is only allowed on macOS hosts AFAIK.

I changed it to our fork, because we have a cloned repo and I assumed we would use our forks for all three sub repositories. Any reason we shouldn't?

So, question is, how can I continue debugging the build. Neither the stack trace nor the error message Waf gives me is in any way helpful. Do you know how to check what build step actually goes wrong?

c-mauderer commented 5 years ago

The reason that I didn't change rtems_waf is, that it makes it necessary to fork the rtems-libbsd and not only clone it. To change the URL, you would have to add a commit and do merges in the future instead of just taking over the upstream branch. I discussed using relative URLs in the RTEMS repo once on the mailing list. But there are still some distros (CentOS, ...) with a git that doesn't yet support relative URLs so that we didn't use them.

Regarding debugging: Debugging problems with waf is really hard. I had a similar bug one or two times. Basically what I used was a combination of the python debugger (you can set break points in the wscript) and printing messages.

Maybe you can try to post that error message to the RTEMS mailing list. There is at least one RTEMS maintainer who uses MacOS too and maybe knows that error.

What I can say from your error message is, that your are quite at the beginning of the build. Some node want's to create a directory.

From the messages it is visible that it happens somewhere during the init_dirs in waflib/Build.py:

  File "/opt/grisp/grisp-software/8b2967b756/rtems-libbsd/.waf-2.0.13-4c5a17779813574907c253ab5418388d/waflib/Build.py", line 88, in init_dirs
    self.bldnode.mkdir()

That function tries to create create all the directories for the nodes:

    def init_dirs(self):
        if not(os.path.isabs(self.top_dir)and os.path.isabs(self.out_dir)):
            raise Errors.WafError('The project was not configured: run "waf configure" first!')
        self.path=self.srcnode=self.root.find_dir(self.top_dir)
        self.bldnode=self.root.make_node(self.variant_dir)
        self.bldnode.mkdir()

I assume that either the self.root itself has a wrong directory or that one of the nodes is somehow odd.

holzingk commented 5 years ago

@sebhub @c-mauderer Do you know the source of the failure? https://20-67125809-gh.circle-artifacts.com/0/tmp/rsb-reports/rsb-report-arm-rtems5-gcc-7.3.0-newlib-d13c84eb07e35984bf7a974cd786a6cdac29e6b9-x86_64-linux-gnu-1.txt

I think it is connected to limited RAM of 4GB inside the Docker container of the CI system. We are currently requesting more from CircleCI.

eproxus commented 5 years ago

@nextl00p Could be the OOM killer in Linux

c-mauderer commented 5 years ago

I would too assume the OOM killer. Compiling gcc needs quite a lot of memory. And it seems that some process (most likely cc1plus) has been killed and therefore the output stream has been aborted. That resulted in the {standard input}: Assembler messages:.

Do you have the possibility to get a dmesg output of the system? I think the OOM-killer is logged there.

eproxus commented 5 years ago

@c-mauderer @nextl00p You can debug with SSH: https://circleci.com/docs/2.0/ssh-access-jobs/

sebhub commented 5 years ago

If you plan to integrate these changes, I recommend to update to the libbsd/5-freebsd-12 branch. This branch tracks FreeBSD stable/12.

eproxus commented 5 years ago

The problems I'm having might be related to this bug: https://devel.rtems.org/ticket/3709

eproxus commented 5 years ago

Note: Python 3 is now (temporarily) needed to build libbsd as a workaround for https://devel.rtems.org/ticket/3709

@sebhub @c-mauderer Can you confirm my latest commit looks okay, in regards to the versions used of RTEMS, libbsd and RTEMS source builder?

c-mauderer commented 5 years ago

@eproxus: Are you sure you want to switch back to the upstream repository instead of mirroring the branches in your repo?

eproxus commented 5 years ago

@c-mauderer Since some sub repos point to git.rtems.org anyway, there's no point in having our own forks for just some repositories, right?

c-mauderer commented 5 years ago

I think the only one left pointing to git.rtems.org has been the rtems_waf in libbsd.

Please don't understand me wrong: I'm OK with the repos pointing to git.rtems.org. I think the original change was due to some server outage on the RTEMS server. I'm sure that happens more often than an outage on github.

c-mauderer commented 5 years ago

PS: Maybe it would be good then to somehow mark the mirrored repos to only be left in the GRiSP project for building old versions (especially the ones that used the grisp-branches). No idea how to do that on github but I'm sure there is something that can be done.

eproxus commented 5 years ago

@c-mauderer I thought so as well, but didn't like the idea of having a separate branch of libbsd master just to be able to point to a fork of rtems_waf as well. It gets recursively messy 😕

You can mark repositories as no longer active/maintained somehow. I'll do that in that case.

c-mauderer commented 5 years ago

I had suggested once that we use a relative URL for rtems_waf in libbsd. But then I noted that the git version used in old but still maintained CentOS versions can't handle these. So the absolute URL has been left. Maybe in a distant future when even a distribution like CentOS handles the relative URLs we will change that in libbsd ;-)

Please mark the repos only after the merge.

eproxus commented 5 years ago

Yeah, sounds good. There are so many external dependencies in this toolchain anyway, so having one more is fine for now. We don't build that often.

eproxus commented 4 years ago

Trying to attack this again now, and am following this procedure on macOS 10.15.3 (using Homebrew for all the dependencies):

  1. mkdir -p /opt/grisp/grisp-software
  2. cd /opt/grisp/grisp-software
  3. git clone https://github.com/grisp/grisp-software.git -b eproxus/wifi-opti-and-libbsd-to-freebsd-12-update tmp
  4. mv tmp 02e43314de
  5. cd 02e43314de
  6. ./build/build.sh

It fails building libgrisp with the following error:

/opt/grisp/grisp-software/8f7399b9b7/rtems-install/rtems/5/lib/gcc/arm-rtems5/7.4.0/../../../../arm-rtems5/bin/ld: /opt/grisp/grisp-software/8f7399b9b7/grisp-fatbench/../rtems-install/rtems/5/arm-rtems5/atsamv/lib/libbsd.a(rtwn_usb_reg.c.19.o): in function `_bsd_rtwn_usb_delay':
/opt/grisp/grisp-software/8f7399b9b7/rtems-libbsd/build/arm-rtems5-atsamv-grisp/../../freebsd/sys/dev/rtwn/usb/rtwn_usb_reg.c:178: undefined reference to `MSEC_2_TICKS'
Output ``` + /opt/grisp/grisp-software/8f7399b9b7/build/build-libgrisp.sh + set -e -u ++ readlink -- /opt/grisp/grisp-software/8f7399b9b7/build/build-libgrisp.sh ++ echo /opt/grisp/grisp-software/8f7399b9b7/build/build-libgrisp.sh + SCRIPTPATH=/opt/grisp/grisp-software/8f7399b9b7/build/build-libgrisp.sh +++ dirname -- /opt/grisp/grisp-software/8f7399b9b7/build/build-libgrisp.sh ++ CDPATH= ++ cd -- /opt/grisp/grisp-software/8f7399b9b7/build ++ pwd + SCRIPTDIR=/opt/grisp/grisp-software/8f7399b9b7/build + PROJECTDIR=/opt/grisp/grisp-software/8f7399b9b7/build/../ + . /opt/grisp/grisp-software/8f7399b9b7/build/configuration.sh ++ BSP_NAME=atsamv ++ RTEMS_CPU=arm ++ RTEMS_VERSION=5 ++ TARGET=arm-rtems5 ++ PREFIX=/opt/grisp/grisp-software/8f7399b9b7/build/..//rtems-install/rtems/5/ +++ git rev-parse HEAD ++ TOOLCHAIN_REVISION=8f7399b9b722f3d048d1f2e0a5f1ac757ecc737d ++ RTEMS_SOURCE_DIR=/opt/grisp/grisp-software/8f7399b9b7/build/..//rtems ++ LIBBSD_SOURCE_DIR=/opt/grisp/grisp-software/8f7399b9b7/build/..//rtems-libbsd ++ LIBINIH_SOURCE_DIR=/opt/grisp/grisp-software/8f7399b9b7/build/..//libinih ++ LIBGRISP_SOURCE_DIR=/opt/grisp/grisp-software/8f7399b9b7/build/..//libgrisp ++ BSP_CONFIG_OPT=' --disable-tests --disable-networking --enable-chip=same70q21 --enable-sdram=is42s16320f-7bl ATSAM_CONSOLE_DEVICE_TYPE=1 ATSAM_CONSOLE_DEVICE_INDEX=2 ATSAM_MEMORY_QSPIFLASH_SIZE=0x0 ATSAM_MEMORY_NOCACHE_SIZE=0x8000 ' + export 'PATH=/opt/grisp/grisp-software/8f7399b9b7/build/..//rtems-install/rtems/5//bin:/opt/grisp/grisp-software/8f7399b9b7/build/..//rtems-install/rtems/5//bin:/Users/alind/.asdf/shims:/Users/alind/.asdf/bin:/Users/alind/.local/bin:/Users/alind/.cache/rebar3/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/MacGPG2/bin:/Applications/Wireshark.app/Contents/MacOS:/usr/local/anaconda3/bin:/usr/local/anaconda3/condabin:/Users/alind/Code/go/bin:/Users/alind/.cargo/bin' + PATH='/opt/grisp/grisp-software/8f7399b9b7/build/..//rtems-install/rtems/5//bin:/opt/grisp/grisp-software/8f7399b9b7/build/..//rtems-install/rtems/5//bin:/Users/alind/.asdf/shims:/Users/alind/.asdf/bin:/Users/alind/.local/bin:/Users/alind/.cache/rebar3/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/MacGPG2/bin:/Applications/Wireshark.app/Contents/MacOS:/usr/local/anaconda3/bin:/usr/local/anaconda3/condabin:/Users/alind/Code/go/bin:/Users/alind/.cargo/bin' + cd /opt/grisp/grisp-software/8f7399b9b7/build/..//libgrisp + make clean install rm -rf b-atsamv mkdir b-atsamv mkdir b-atsamv/src arm-rtems5-gcc --pipe -Iinclude -MT b-atsamv/src/eeprom.o -MD -MP -MF b-atsamv/src/eeprom.d -B /opt/grisp/grisp-software/8f7399b9b7/libgrisp/../rtems-install/rtems/5/arm-rtems5/atsamv/lib -specs bsp_specs -qrtems -Wall -Wextra -Wconversion -Wformat-security -Wformat=2 -Wshadow -Wcast-qual -Wcast-align -Wredundant-decls -Wstrict-prototypes -Wbad-function-cast -mthumb -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -O2 -g -ffunction-sections -fdata-sections -c src/eeprom.c -o b-atsamv/src/eeprom.o src/eeprom.c: In function 'grisp_eeprom_dump': src/eeprom.c:126:9: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint32_t {aka unsigned int}' [-Wformat=] printf("sig_version: %u\n" ^~~~~~~~~~~~~~~~~~~ src/eeprom.c:138:6: eeprom->serial, ~~~~~~~~~~~~~~ src/eeprom.c:127:17: note: format string is defined here "serial: %lu\n" ~~^ %u arm-rtems5-gcc --pipe -Iinclude -MT b-atsamv/src/eeprom_crc.o -MD -MP -MF b-atsamv/src/eeprom_crc.d -B /opt/grisp/grisp-software/8f7399b9b7/libgrisp/../rtems-install/rtems/5/arm-rtems5/atsamv/lib -specs bsp_specs -qrtems -Wall -Wextra -Wconversion -Wformat-security -Wformat=2 -Wshadow -Wcast-qual -Wcast-align -Wredundant-decls -Wstrict-prototypes -Wbad-function-cast -mthumb -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -O2 -g -ffunction-sections -fdata-sections -c src/eeprom_crc.c -o b-atsamv/src/eeprom_crc.o arm-rtems5-gcc --pipe -Iinclude -MT b-atsamv/src/init.o -MD -MP -MF b-atsamv/src/init.d -B /opt/grisp/grisp-software/8f7399b9b7/libgrisp/../rtems-install/rtems/5/arm-rtems5/atsamv/lib -specs bsp_specs -qrtems -Wall -Wextra -Wconversion -Wformat-security -Wformat=2 -Wshadow -Wcast-qual -Wcast-align -Wredundant-decls -Wstrict-prototypes -Wbad-function-cast -mthumb -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -O2 -g -ffunction-sections -fdata-sections -c src/init.c -o b-atsamv/src/init.o arm-rtems5-gcc --pipe -Iinclude -MT b-atsamv/src/init_wpa.o -MD -MP -MF b-atsamv/src/init_wpa.d -B /opt/grisp/grisp-software/8f7399b9b7/libgrisp/../rtems-install/rtems/5/arm-rtems5/atsamv/lib -specs bsp_specs -qrtems -Wall -Wextra -Wconversion -Wformat-security -Wformat=2 -Wshadow -Wcast-qual -Wcast-align -Wredundant-decls -Wstrict-prototypes -Wbad-function-cast -mthumb -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -O2 -g -ffunction-sections -fdata-sections -c src/init_wpa.c -o b-atsamv/src/init_wpa.o arm-rtems5-gcc --pipe -Iinclude -MT b-atsamv/src/led.o -MD -MP -MF b-atsamv/src/led.d -B /opt/grisp/grisp-software/8f7399b9b7/libgrisp/../rtems-install/rtems/5/arm-rtems5/atsamv/lib -specs bsp_specs -qrtems -Wall -Wextra -Wconversion -Wformat-security -Wformat=2 -Wshadow -Wcast-qual -Wcast-align -Wredundant-decls -Wstrict-prototypes -Wbad-function-cast -mthumb -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -O2 -g -ffunction-sections -fdata-sections -c src/led.c -o b-atsamv/src/led.o arm-rtems5-ar rcu b-atsamv/libgrisp.a b-atsamv/src/eeprom.o b-atsamv/src/eeprom_crc.o b-atsamv/src/init.o b-atsamv/src/init_wpa.o b-atsamv/src/led.o arm-rtems5-ar: `u' modifier ignored since `D' is the default (see `U') arm-rtems5-ranlib b-atsamv/libgrisp.a mkdir -p /opt/grisp/grisp-software/8f7399b9b7/libgrisp/../rtems-install/rtems/5/arm-rtems5/atsamv/lib/include/grisp install -m 644 b-atsamv/libgrisp.a /opt/grisp/grisp-software/8f7399b9b7/libgrisp/../rtems-install/rtems/5/arm-rtems5/atsamv/lib install -m 644 include/grisp/*.h /opt/grisp/grisp-software/8f7399b9b7/libgrisp/../rtems-install/rtems/5/arm-rtems5/atsamv/lib/include/grisp + echo 8f7399b9b722f3d048d1f2e0a5f1ac757ecc737d + echo '#define GRISP_TOOLCHAIN_REVISION "8f7399b9b722f3d048d1f2e0a5f1ac757ecc737d"' + echo '-define(GRISP_TOOLCHAIN_REVISION, "8f7399b9b722f3d048d1f2e0a5f1ac757ecc737d").' + cd /opt/grisp/grisp-software/8f7399b9b7/build/..//grisp-bootloader + make clean all rm -rf b-atsamv mkdir b-atsamv arm-rtems5-gcc --pipe -MT b-atsamv/init.o -MD -MP -MF b-atsamv/init.d -B /opt/grisp/grisp-software/8f7399b9b7/grisp-bootloader/../rtems-install/rtems/5/arm-rtems5/atsamv/lib -specs bsp_specs -qrtems -Wall -Wextra -Wconversion -Wformat-security -Wformat=2 -Wshadow -Wcast-qual -Wcast-align -Wredundant-decls -Wstrict-prototypes -Wbad-function-cast -mthumb -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -O2 -g -ffunction-sections -fdata-sections -O2 -DGRISP_BL_VERSION="\"bootloader-V1.0.1-35-g8f73-dirty\"" -DGRISP_BL_BUILD_DATE="\"Mon Mar 9 18:32:53 UTC 2020\"" -c init.c -o b-atsamv/init.o arm-rtems5-gcc --pipe -B /opt/grisp/grisp-software/8f7399b9b7/grisp-bootloader/../rtems-install/rtems/5/arm-rtems5/atsamv/lib -specs bsp_specs -qrtems -mthumb -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -Wl,--gc-sections -qnolinkcmds -T linkcmds.bootloader -O2 -g -ffunction-sections -fdata-sections -Wl,-Map,b-atsamv/bootloader.map b-atsamv/init.o -lgrisp -linih -lbsd -lm -o b-atsamv/bootloader.exe + cd /opt/grisp/grisp-software/8f7399b9b7/build/..//grisp-fatbench + make clean all rm -rf b-atsamv mkdir b-atsamv arm-rtems5-gcc --pipe -MT b-atsamv/fatbench.o -MD -MP -MF b-atsamv/fatbench.d -B /opt/grisp/grisp-software/8f7399b9b7/grisp-fatbench/../rtems-install/rtems/5/arm-rtems5/atsamv/lib -specs bsp_specs -qrtems -Wall -Wextra -Wconversion -Wformat-security -Wformat=2 -Wshadow -Wcast-qual -Wcast-align -Wredundant-decls -Wstrict-prototypes -Wbad-function-cast -mthumb -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -O2 -g -ffunction-sections -fdata-sections -O0 -c fatbench.c -o b-atsamv/fatbench.o arm-rtems5-gcc --pipe -MT b-atsamv/init.o -MD -MP -MF b-atsamv/init.d -B /opt/grisp/grisp-software/8f7399b9b7/grisp-fatbench/../rtems-install/rtems/5/arm-rtems5/atsamv/lib -specs bsp_specs -qrtems -Wall -Wextra -Wconversion -Wformat-security -Wformat=2 -Wshadow -Wcast-qual -Wcast-align -Wredundant-decls -Wstrict-prototypes -Wbad-function-cast -mthumb -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -O2 -g -ffunction-sections -fdata-sections -O0 -c init.c -o b-atsamv/init.o arm-rtems5-gcc --pipe -B /opt/grisp/grisp-software/8f7399b9b7/grisp-fatbench/../rtems-install/rtems/5/arm-rtems5/atsamv/lib -specs bsp_specs -qrtems -mthumb -mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -Wl,--gc-sections -qnolinkcmds -T linkcmds.sdram -O2 -g -ffunction-sections -fdata-sections -Wl,-Map,b-atsamv/fatbench.map b-atsamv/fatbench.o b-atsamv/init.o -lgrisp -lbsd -lm -o b-atsamv/fatbench.exe /opt/grisp/grisp-software/8f7399b9b7/rtems-install/rtems/5/lib/gcc/arm-rtems5/7.4.0/../../../../arm-rtems5/bin/ld: /opt/grisp/grisp-software/8f7399b9b7/grisp-fatbench/../rtems-install/rtems/5/arm-rtems5/atsamv/lib/libbsd.a(rtwn_usb_reg.c.19.o): in function `_bsd_rtwn_usb_delay': /opt/grisp/grisp-software/8f7399b9b7/rtems-libbsd/build/arm-rtems5-atsamv-grisp/../../freebsd/sys/dev/rtwn/usb/rtwn_usb_reg.c:178: undefined reference to `MSEC_2_TICKS' /opt/grisp/grisp-software/8f7399b9b7/rtems-install/rtems/5/lib/gcc/arm-rtems5/7.4.0/../../../../arm-rtems5/bin/ld: /opt/grisp/grisp-software/8f7399b9b7/grisp-fatbench/../rtems-install/rtems/5/arm-rtems5/atsamv/lib/libbsd.a(ieee80211_amrr.c.19.o): in function `amrr_setinterval': /opt/grisp/grisp-software/8f7399b9b7/rtems-libbsd/build/arm-rtems5-atsamv-grisp/../../freebsd/sys/net80211/ieee80211_amrr.c:113: undefined reference to `MSEC_2_TICKS' /opt/grisp/grisp-software/8f7399b9b7/rtems-install/rtems/5/lib/gcc/arm-rtems5/7.4.0/../../../../arm-rtems5/bin/ld: /opt/grisp/grisp-software/8f7399b9b7/grisp-fatbench/../rtems-install/rtems/5/arm-rtems5/atsamv/lib/libbsd.a(ieee80211_amrr.c.19.o): in function `amrr_sysctl_interval': /opt/grisp/grisp-software/8f7399b9b7/rtems-libbsd/build/arm-rtems5-atsamv-grisp/../../freebsd/sys/net80211/ieee80211_amrr.c:452: undefined reference to `TICKS_2_MSEC' /opt/grisp/grisp-software/8f7399b9b7/rtems-install/rtems/5/lib/gcc/arm-rtems5/7.4.0/../../../../arm-rtems5/bin/ld: /opt/grisp/grisp-software/8f7399b9b7/grisp-fatbench/../rtems-install/rtems/5/arm-rtems5/atsamv/lib/libbsd.a(ieee80211_amrr.c.19.o): in function `amrr_setinterval': /opt/grisp/grisp-software/8f7399b9b7/rtems-libbsd/build/arm-rtems5-atsamv-grisp/../../freebsd/sys/net80211/ieee80211_amrr.c:113: undefined reference to `MSEC_2_TICKS' /opt/grisp/grisp-software/8f7399b9b7/rtems-install/rtems/5/lib/gcc/arm-rtems5/7.4.0/../../../../arm-rtems5/bin/ld: /opt/grisp/grisp-software/8f7399b9b7/rtems-libbsd/build/arm-rtems5-atsamv-grisp/../../freebsd/sys/net80211/ieee80211_amrr.c:113: undefined reference to `MSEC_2_TICKS' /opt/grisp/grisp-software/8f7399b9b7/rtems-install/rtems/5/lib/gcc/arm-rtems5/7.4.0/../../../../arm-rtems5/bin/ld: /opt/grisp/grisp-software/8f7399b9b7/grisp-fatbench/../rtems-install/rtems/5/arm-rtems5/atsamv/lib/libbsd.a(ieee80211_freebsd.c.19.o): in function `_bsd_ieee80211_sysctl_msecs_ticks': /opt/grisp/grisp-software/8f7399b9b7/rtems-libbsd/build/arm-rtems5-atsamv-grisp/../../freebsd/sys/net80211/ieee80211_freebsd.c:138: undefined reference to `TICKS_2_MSEC' /opt/grisp/grisp-software/8f7399b9b7/rtems-install/rtems/5/lib/gcc/arm-rtems5/7.4.0/../../../../arm-rtems5/bin/ld: /opt/grisp/grisp-software/8f7399b9b7/rtems-libbsd/build/arm-rtems5-atsamv-grisp/../../freebsd/sys/net80211/ieee80211_freebsd.c:144: undefined reference to `MSEC_2_TICKS' /opt/grisp/grisp-software/8f7399b9b7/rtems-install/rtems/5/lib/gcc/arm-rtems5/7.4.0/../../../../arm-rtems5/bin/ld: /opt/grisp/grisp-software/8f7399b9b7/grisp-fatbench/../rtems-install/rtems/5/arm-rtems5/atsamv/lib/libbsd.a(ieee80211_freebsd.c.19.o): in function `_bsd_ieee80211_com_vdetach': /opt/grisp/grisp-software/8f7399b9b7/rtems-libbsd/build/arm-rtems5-atsamv-grisp/../../freebsd/sys/net80211/ieee80211_freebsd.c:348: undefined reference to `MSEC_2_TICKS' /opt/grisp/grisp-software/8f7399b9b7/rtems-install/rtems/5/lib/gcc/arm-rtems5/7.4.0/../../../../arm-rtems5/bin/ld: /opt/grisp/grisp-software/8f7399b9b7/grisp-fatbench/../rtems-install/rtems/5/arm-rtems5/atsamv/lib/libbsd.a(ieee80211_node.c.19.o): in function `ieee80211_erp_timeout': /opt/grisp/grisp-software/8f7399b9b7/rtems-libbsd/build/arm-rtems5-atsamv-grisp/../../freebsd/sys/net80211/ieee80211_node.c:2882: undefined reference to `MSEC_2_TICKS' /opt/grisp/grisp-software/8f7399b9b7/rtems-install/rtems/5/lib/gcc/arm-rtems5/7.4.0/../../../../arm-rtems5/bin/ld: /opt/grisp/grisp-software/8f7399b9b7/grisp-fatbench/../rtems-install/rtems/5/arm-rtems5/atsamv/lib/libbsd.a(ieee80211_scan_sta.c.19.o): in function `sta_start': /opt/grisp/grisp-software/8f7399b9b7/rtems-libbsd/build/arm-rtems5-atsamv-grisp/../../freebsd/sys/net80211/ieee80211_scan_sta.c:760: undefined reference to `MSEC_2_TICKS' /opt/grisp/grisp-software/8f7399b9b7/rtems-install/rtems/5/lib/gcc/arm-rtems5/7.4.0/../../../../arm-rtems5/bin/ld: /opt/grisp/grisp-software/8f7399b9b7/rtems-libbsd/build/arm-rtems5-atsamv-grisp/../../freebsd/sys/net80211/ieee80211_scan_sta.c:758: undefined reference to `MSEC_2_TICKS' /opt/grisp/grisp-software/8f7399b9b7/rtems-install/rtems/5/lib/gcc/arm-rtems5/7.4.0/../../../../arm-rtems5/bin/ld: /opt/grisp/grisp-software/8f7399b9b7/grisp-fatbench/../rtems-install/rtems/5/arm-rtems5/atsamv/lib/libbsd.a(ieee80211_scan_sta.c.19.o):/opt/grisp/grisp-software/8f7399b9b7/rtems-libbsd/build/arm-rtems5-atsamv-grisp/../../freebsd/sys/net80211/ieee80211_scan_sta.c:1561: more undefined references to `MSEC_2_TICKS' follow collect2: error: ld returned 1 exit status make: *** [b-atsamv/fatbench.exe] Error 1 ```

@c-mauderer @sebhub Any ideas?

c-mauderer commented 4 years ago

It could be a non-matching RTEMS and libbsd version. The MSEC_2_TICKS has been added in commit c6d8589bb00a9d2a5a094c68c90290df1dc44807 in RTEMS into cpukit/include/machine/_kernel_time.h. I assume that libbsd would use that definition.

sebhub commented 4 years ago

Maybe we should test the Grisp stuff with the RTEMS 5.1 release candidate once it is available.

On Wed, Mar 11, 2020 at 9:38 AM Christian Mauderer notifications@github.com wrote:

It could be a non-matching RTEMS and libbsd version. The MSEC_2_TICKS has been added in commit c6d8589bb00a9d2a5a094c68c90290df1dc44807 in RTEMS into cpukit/include/machine/_kernel_time.h. I assume that libbsd would use that definition.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/grisp/grisp-software/pull/46?email_source=notifications&email_token=AAHDRWFWL4RY63I7FFPPGYDRG5EWXA5CNFSM4FZAJJ6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOOUCFY#issuecomment-597508375, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHDRWD7ZMTSM26PQRFG5V3RG5EWXANCNFSM4FZAJJ6A .

eproxus commented 4 years ago

@c-mauderer Any idea how that could have happened? I haven't changed the versions since last time (only I'm now testing on macOS 10.15). Newbie question: How can I check which version of RTEMS I'm using?

c-mauderer commented 4 years ago

@c-mauderer Any idea how that could have happened? I haven't changed the versions since last time (only I'm now testing on macOS 10.15).

Not really. It's also just a guess that it could be a version mismatch.

I looked back at your commands:

  • mv tmp 02e43314de

  • cd 02e43314de

and

/opt/grisp/grisp-software/8f7399b9b7/rtems-install/rtems/5/lib/gcc/arm-rtems5/7.4.0/../../../../arm-rtems5/bin/ld: /opt/grisp/grisp-software/8f7399b9b7/grisp-fatbench/../rtems-install/rtems/5/arm-rtems5/atsamv/lib/libbsd.a(rtwn_usb_reg.c.19.o): in function `_bsd_rtwn_usb_delay':
/opt/grisp/grisp-software/8f7399b9b7/rtems-libbsd/build/arm-rtems5-atsamv-grisp/../../freebsd/sys/dev/rtwn/usb/rtwn_usb_reg.c:178: undefined reference to `MSEC_2_TICKS'

There is a mismatch in the folder name. Just to make sure: Did you build the version that you wanted to build or is there a mismatch for some reason?

Newbie question: How can I check which version of RTEMS I'm using?

First you can take a look at version you checked out. But I assume that you do know that method and therefore you are searching for a method to analyze the generated binaries?

Since 2017 we have a version API: https://docs.rtems.org/doxygen/branches/master/group__ClassicVersion.html So in software you can use rtems_version() in an application to get a version string.

Another method is to analyze the binary files. You want the content of rtems_version from version.o which is linked into librtemscpu.a. I'm sure there is a nice objdump or readelf command for that. But the simplest method I found is to use strings (note: this is for another BSP - adapt your path):

> strings rtems/5/arm-rtems5/imx7/lib/librtemscpu.a | grep '5\.0\.0\.'
5.0.0.7cb8d066fea89d2b4844ff760ca2a3b053d7f901
eproxus commented 4 years ago

@c-mauderer Sorry, my bad. The correct hash is of course 8f7399b9b7. I'm building this PR branch directly (not my old fork).

This is what my submodules show:

$ git submodule status
 d709bdac5b6bfa27c913d3a3e0e982d2c12217f2 libinih/inih (r36-13-gd709bda)
 7a1934dac087295b209563d984549a48728599a3 rtems (7a1934dac0)
 eb1d30ad351ed18116acbd8b224ed8e07d6627d0 rtems-libbsd (eb1d30ad)
 9c825f0b9a4eff4f87d22e12d3c94072712c3918 rtems-source-builder (9c825f0)

Something is fishy here. Not sure why we have RTEMS code from March 2019 (7a1934da) which depends on code from November 2019 (c6d8589b). That doesn't make sense.

c-mauderer commented 4 years ago

Something is fishy here. Not sure why we have RTEMS code from March 2019 (7a1934da) which depends on code from November 2019 (c6d8589b). That doesn't make sense.

Yes, you are right. That seems unlikely except if a long lasting bug has been fixed with it. But then it would be odd that it worked some-when in the past on my system...

Like @sebhub said:

Maybe we should test the Grisp stuff with the RTEMS 5.1 release candidate once it is available.

If you are thinking about that too, I would suggest to not take a too detailed look at the current problem but wait for the update instead.