Re: Cygwin tools failure

2022-10-13 Thread Ryan Long



On 10/12/2022 7:43 PM, Chris Johns wrote:

On 12/10/2022 3:24 pm, Chris Johns wrote:

Consider a patch to add the piece removed at the end of this patch as approved.

I see the patch was pushed, thanks. The RSB hash will need to be updated so
users pick it up.

I've sent a patch that updates the hash to Joel. He'll get that pushed soon.


Thanks
Chris

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Cygwin tools failure

2022-10-11 Thread Ryan Long
Cygwin has been unable to build the tools for awhile. This has been due 
to an array subscript being a char while building DTC. The maintainers 
didn't see an issue with the code itself, so it's going to go on being 
broken for awhile I guess.


Joel recommended commented out the building of DTC through the RSB. 
After doing so, I'm running into the following error. I was building 
AArch64's tools. Disabling DTC and building with my Debian WSL instance 
built it just fine.



[ 48/258] Compiling rtemstoolkit/elftoolchain/libelf/libelf_align.c
../rtemstoolkit/elftoolchain/libelf/elf.c:34:35: error: ‘LIBELF_ARCH’ 
undeclared here (not in a function); did you mean ‘LIBELF_ERROR’?

   34 | .libelf_arch    = LIBELF_ARCH,
  |   ^~~
  |   LIBELF_ERROR
../rtemstoolkit/elftoolchain/libelf/elf.c:35:35: error: 
‘LIBELF_BYTEORDER’ undeclared here (not in a function); did you mean 
‘LIBELF_ERROR’?

   35 | .libelf_byteorder   = LIBELF_BYTEORDER,
  |   ^~~~
  |   LIBELF_ERROR
../rtemstoolkit/elftoolchain/libelf/elf.c:36:35: error: ‘LIBELF_CLASS’ 
undeclared here (not in a function)

   36 | .libelf_class   = LIBELF_CLASS,
  |   ^~~~

Waf: Leaving directory 
`/home/rtems-tester/rtems-cron-6/rtems-source-builder/rtems/build/rtems-tools-d0a65c72d1a170637258eb19f7d3e433be7c3c86-1/rtems-tools-d0a65c72d1a170637258eb19f7d3e433be7c3c86/build'



Does anyone know a fix for this?

Thanks,

Ryan

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] gsed.cfg: Add check for gsed

2022-10-05 Thread Ryan Long


On 10/4/2022 4:31 PM, Chris Johns wrote:

On 5/10/2022 12:52 am, Ryan Long wrote:

It looks like gcc checks for gsed if sed is not the GNU version.

Thanks for checking this.


I've installed it on FreeBSD and MacOS. I had to install it via Homebrew on
MacOS, but that's because it fails to build gsed.

Homebrew complicates your work. I make sure my test Macs have never had Homebrew
or Macports installed. When I played with this a long time ago the install
prefix was /usr/local and after a while I found I had no idea what was installed
and what was provided by the OS and if the base OS versions were overwritten. I
believe Macports is not doing this these days (if it ever did) but I have not
looked.


On the m1 macs, Homebrew installs under /opt/homebrew/bin. The prefix 
for Intel macs is /usr/local, so I assume anything installed would be 
under /usr/local/homebrew/bin.


I don't know when the packages in Homebrew may overwrite the programs 
used by the systems, but at least in the case of gsed, it didn't 
overwrite the system's sed.





The error is "machine `arm64-apple' not recognized".

Does the GNU sed upstream project have a fix?


I looked into how Homebrew builds it. All that they do is

  def install
    args = %W[
  --prefix=#{prefix}
  --disable-dependency-tracking
    ]

    args << if OS.mac?
  "--program-prefix=g"
    else
  "--without-selinux"
    end
    system "./configure", *args
    system "make", "install"

I experimented with the building of gsed with the RSB. I just removed 
the --host flag, and I was able to get around the error. However, it 
then reports


sizes: gsed-4.8-arm64-apple-darwin21.6.0-1: 16.874MB (installed: 0.000B)




So I added this check to get around that, and it built successfully.

Sorry, I see Homebrew and Macports as user options and not a project option. We
need repeatable builds and not builds based on a local checkout of some 
packages.

Chris

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] gsed.cfg: Add check for gsed

2022-10-04 Thread Ryan Long

It looks like gcc checks for gsed if sed is not the GNU version.

I've installed it on FreeBSD and MacOS. I had to install it via Homebrew 
on MacOS, but that's because it fails to build gsed. The error is 
"machine `arm64-apple' not recognized".


So I added this check to get around that, and it built successfully.

On 10/3/2022 8:13 PM, Chris Johns wrote:

On 4/10/2022 2:52 am, Ryan Long wrote:

---
  bare/config/textproc/gsed.cfg | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bare/config/textproc/gsed.cfg b/bare/config/textproc/gsed.cfg
index 8287c74..b4aaf4f 100644
--- a/bare/config/textproc/gsed.cfg
+++ b/bare/config/textproc/gsed.cfg
@@ -2,7 +2,7 @@
  # GNU sed has a version option, check for it.
  # If not found build it.
  #
-%define has_gnu_sed %(sed --version > /dev/null 2>&1; echo $?)
+%define has_gnu_sed %(sed --version > /dev/null 2>&1 || gsed --version > /dev/null 
2>&1; echo $?)
  %if %{has_gnu_sed} != 0
   %include %{_configdir}/textproc/gsed-4.8.cfg
  %endif

What does gcc require sed be as a command? Is it sed or gsed?

Which host has gsed installed?

Chris

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] gsed.cfg: Add check for gsed

2022-10-03 Thread Ryan Long
---
 bare/config/textproc/gsed.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bare/config/textproc/gsed.cfg b/bare/config/textproc/gsed.cfg
index 8287c74..b4aaf4f 100644
--- a/bare/config/textproc/gsed.cfg
+++ b/bare/config/textproc/gsed.cfg
@@ -2,7 +2,7 @@
 # GNU sed has a version option, check for it.
 # If not found build it.
 #
-%define has_gnu_sed %(sed --version > /dev/null 2>&1; echo $?)
+%define has_gnu_sed %(sed --version > /dev/null 2>&1 || gsed --version > 
/dev/null 2>&1; echo $?)
 %if %{has_gnu_sed} != 0
  %include %{_configdir}/textproc/gsed-4.8.cfg
 %endif
-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Libexpat missing when using Python from python.org

2022-10-03 Thread Ryan Long

Hello,

Following Chris's advice, I installed Python 3.10.6 from Python's 
website. It gets me past the header check for gdb, but then it reports



checking whether to use expat... yes

checking for libexpat... no

configure: error: expat is missing or unusable

make[1]: *** [configure-gdb] Error 1

make: *** [all] Error 2


What's the best way to get Libexpat on macOS?

I was able to successfully build it with the python installed from 
Homebrew after disabling the building of gsed.


Thanks,

Ryan

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


fnmatch.h not found on MINGW64

2022-08-23 Thread Ryan Long
When I try to include fnmatch.h, I'm getting the following error when 
using x86_64-w64-mingw32-gcc or gcc, I'm getting the following error. I 
have to manually include /usr/include with -I. Does anyone know a way to 
fix this?


Thanks,

Ryan


Using built-in specs.^M
COLLECT_GCC=C:\msys64\mingw64\bin\gcc.exe^M
COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/lto-wrapper.exe^M
Target: x86_64-w64-mingw32^M
Configured with: ../gcc-10.3.0/configure --prefix=/mingw64 
--with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 
--host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 
--with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include 
--libexecdir=/mingw64/lib --enable-bootstrap --enable-checking=release 
--with-arch=x86-64 --with-tune=generic 
--enable-languages=c,lto,c++,fortran,ada,objc,obj-c++,jit 
--enable-shared --enable-static --enable-libatomic 
--enable-threads=posix --enable-graphite --enable-fully-dynamic-string 
--enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes 
--disable-libstdcxx-pch --disable-libstdcxx-debug --enable-lto 
--enable-libgomp --disable-multilib --disable-rpath 
--disable-win32-registry --disable-nls --disable-werror 
--disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 
--with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 
--with-pkgversion='Rev5, Built by MSYS2 project' 
--with-bugurl=https://github.com/msys2/MINGW-packages/issues 
--with-gnu-as --with-gnu-ld --with-boot-ldflags='-pipe 
-Wl,--dynamicbase,--high-entropy-va,--nxcompat,--default-image-base-high 
-Wl,--disable-dynamicbase -static-libstdc++ -static-libgcc' 
'LDFLAGS_FOR_TARGET=-pipe 
-Wl,--dynamicbase,--high-entropy-va,--nxcompat,--default-image-base-high' 
--enable-linker-plugin-flags='LDFLAGS=-static-libstdc++\ -static-libgcc\ 
-pipe\ 
-Wl,--dynamicbase,--high-entropy-va,--nxcompat,--default-image-base-high\ 
-Wl,--stack,12582912'^M

Thread model: posix^M
Supported LTO compression algorithms: zlib zstd^M
gcc version 10.3.0 (Rev5, Built by MSYS2 project) ^M
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=x86-64'^M
 C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/cc1.exe 
-quiet -v -iprefix 
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/ -D_REENTRANT 
test.c -quiet -dumpbase test.c -mtune=generic -march=x86-64 -auxbase 
test -version -o C:\msys64\tmp\cc6pmIhu.s^M

GNU C17 (Rev5, Built by MSYS2 project) version 10.3.0 (x86_64-w64-mingw32)^M
    compiled by GNU C version 10.3.0, GMP version 6.2.1, MPFR 
version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP^M

^M
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072^M
ignoring duplicate directory 
"C:/msys64/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/10.3.0/include"^M

ignoring nonexistent directory "D:/a/_temp/msys/msys64/mingw64/include"^M
ignoring nonexistent directory "/mingw64/include"^M
ignoring duplicate directory 
"C:/msys64/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/10.3.0/include-fixed"^M
ignoring duplicate directory 
"C:/msys64/mingw64/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/include"^M
ignoring nonexistent directory 
"D:/a/_temp/msys/msys64/mingw64/x86_64-w64-mingw32/include"^M

#include "..." search starts here:^M
#include <...> search starts here:^M
 C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/include^M
 
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../include^M
 C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/include-fixed^M
 
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/include^M
End of search list.^M
GNU C17 (Rev5, Built by MSYS2 project) version 10.3.0 (x86_64-w64-mingw32)^M
    compiled by GN
^M
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072^M
Compiler executable checksum: 9904f531f084fcea0470441e88ced2da^M
test.c:1:10: fatal error: fnmatch.h: No such file or directory
    1 | #include 
  |  ^~~
compilation terminated.^M
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH] Change DWARF version to 5

2022-08-22 Thread Ryan Long
This is a termporary fix while we wait for it to be fixed up stream. Covoar
will not run without this at the moment. We don't know if the error occurred
with any other Elf tools.

Updates #4707
---
 rtemstoolkit/elftoolchain/libdwarf/libdwarf_info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rtemstoolkit/elftoolchain/libdwarf/libdwarf_info.c 
b/rtemstoolkit/elftoolchain/libdwarf/libdwarf_info.c
index 7476593..3c8ff9f 100644
--- a/rtemstoolkit/elftoolchain/libdwarf/libdwarf_info.c
+++ b/rtemstoolkit/elftoolchain/libdwarf/libdwarf_info.c
@@ -225,7 +225,7 @@ _dwarf_info_load(Dwarf_Debug dbg, Dwarf_Bool load_all, 
Dwarf_Bool is_info,
else
STAILQ_INSERT_TAIL(>dbg_tu, cu, cu_next);
 
-   if (cu->cu_version < 2 || cu->cu_version > 4) {
+   if (cu->cu_version < 2 || cu->cu_version > 5) {
DWARF_SET_ERROR(dbg, error, DW_DLE_VERSION_STAMP_ERROR);
ret = DW_DLE_VERSION_STAMP_ERROR;
break;
-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v1 2/2] Add QEMU 5 configuration files

2022-08-22 Thread Ryan Long
---
 bare/config/devel/qemu-5.2.0-1.cfg  |  42 +++
 bare/config/devel/qemu-couverture.bset  |   2 +-
 bare/config/devel/qemu.bset |   2 +-
 source-builder/config/qemu-5-1.cfg  |   9 ++
 source-builder/config/qemu-common-2.cfg | 145 
 5 files changed, 198 insertions(+), 2 deletions(-)
 create mode 100644 bare/config/devel/qemu-5.2.0-1.cfg
 create mode 100644 source-builder/config/qemu-5-1.cfg
 create mode 100644 source-builder/config/qemu-common-2.cfg

diff --git a/bare/config/devel/qemu-5.2.0-1.cfg 
b/bare/config/devel/qemu-5.2.0-1.cfg
new file mode 100644
index 000..1c1cfeb
--- /dev/null
+++ b/bare/config/devel/qemu-5.2.0-1.cfg
@@ -0,0 +1,42 @@
+#
+# Qemu from git
+#
+
+%if %{release} == %{nil}
+ %define release 1
+%endif
+
+%include %{_configdir}/base.cfg
+
+%include %{_configdir}/bare-config.cfg
+
+#
+# Stable version. Qemu is fast moving.
+#
+%define qemu_version 5.2.0-rc1
+
+#
+# Use released sources.
+#
+%source set qemu https://download.qemu.org/qemu-%{qemu_version}.tar.xz
+%hash sha512 qemu-%{qemu_version}.tar.xz \
+
U0XJ6IEe/iwbq5LsuEbyZ9xu8qZ6wDo5VHNE3IEKEwJ+9zUscgnVKOyBEI28Hl6cqW2m9zBsaCrY94X1lvpN3g==
+
+#
+# Patches from Qemu's patchworks site.
+#
+%patch add qemu 
pw://patchwork.ozlabs.org/patch/406903/raw/Provide-the-missing-LIBUSB_LOG_LEVEL_-for-older-libusb-or-FreeBSD.-Providing-just-the-needed-value-as-a-defined..patch
+%hash sha256 
Provide-the-missing-LIBUSB_LOG_LEVEL_-for-older-libusb-or-FreeBSD.-Providing-just-the-needed-value-as-a-defined..patch
 \
+ 40399fcedb44b2c1bfa1a95af482f7f335f42d713967ed2f34980a7a940c3740
+
+#
+# Patches to build qemu sparc with Leon3 support
+#
+%patch add qemu https://gaisler.se/qemu/qemu-5.2.0-leon3.patch
+%hash sha512 qemu-5.2.0-leon3.patch \
+   
cQju/ja5SAM+gsXEkzSteeR+7PjG9g2w+yUb4kg1eZoOSm2MmZDjA/auINVdRax8wgtIEWnzq5/hdY7/THnowg==
+
+#
+# The Qemu build instructions. We use 5.x.x Release 1.
+#
+%include %{_configdir}/qemu-5-1.cfg
diff --git a/bare/config/devel/qemu-couverture.bset 
b/bare/config/devel/qemu-couverture.bset
index fd5547c..60bec8e 100644
--- a/bare/config/devel/qemu-couverture.bset
+++ b/bare/config/devel/qemu-couverture.bset
@@ -22,5 +22,5 @@ devel/gettext-0.18.3.1-1
 devel/libffi-3.0.13-1
 devel/pixman-0.32.4-1
 devel/glib-2.48.2-1
-devel/dtc-1.6.0-1
+devel/dtc-1.6.1-1
 devel/qemu-couverture-git-1
diff --git a/bare/config/devel/qemu.bset b/bare/config/devel/qemu.bset
index a8b1ebf..3a9b0d5 100644
--- a/bare/config/devel/qemu.bset
+++ b/bare/config/devel/qemu.bset
@@ -21,4 +21,4 @@ devel/gettext-0.18.3.1-1
 devel/libffi-3.0.13-1
 devel/pixman-0.40.0-1
 devel/glib-2.48.2-1
-devel/qemu-git-1
+devel/qemu-5.2.0-1
diff --git a/source-builder/config/qemu-5-1.cfg 
b/source-builder/config/qemu-5-1.cfg
new file mode 100644
index 000..7ca58b8
--- /dev/null
+++ b/source-builder/config/qemu-5-1.cfg
@@ -0,0 +1,9 @@
+#
+# QEMU 5 Version 1.
+#
+# This configuration file configure's, make's and install's QEMU.
+#
+
+%define qemu_disables --disable-nettle
+
+%include %{_configdir}/qemu-common-2.cfg
diff --git a/source-builder/config/qemu-common-2.cfg 
b/source-builder/config/qemu-common-2.cfg
new file mode 100644
index 000..1dbaf05
--- /dev/null
+++ b/source-builder/config/qemu-common-2.cfg
@@ -0,0 +1,145 @@
+#
+# QEMU Common Version 1.
+#
+# This configuration file configure's, make's and install's QEMU.
+#
+
+%if %{release} == %{nil}
+%define release 1
+%endif
+
+#
+# Select Snapshot Macro Maps
+#
+%select qemu-snapshot
+
+#
+# The description.
+#
+Name:  qemu-%{qemu_version}-%{_host}-%{release}
+Summary:   Qemu is a simulator of various processors.
+Version:   %{qemu_version}
+Release:   %{release}
+URL:  http://www.qemu.org/
+
+#
+# Source
+#
+%source set qemu 
http://wiki.qemu-project.org/download/qemu-%{qemu_version}.tar.bz2
+
+
+#
+# QEMU Disable component list.
+#
+# We are not interested in the VM use case for qemu and most of that
+# functionality carries host platform baggage which complicates building on a
+# range of host platforms.
+#
+# You can specialise before including this config file.
+#
+#
+%define qemu_std_disables --disable-werror
+%define qemu_std_disables %{qemu_std_disables} --disable-tools
+%define qemu_std_disables %{qemu_std_disables} --disable-pie
+%define qemu_std_disables %{qemu_std_disables} --disable-vnc
+%define qemu_std_disables %{qemu_std_disables} --disable-sdl
+%define qemu_std_disables %{qemu_std_disables} --disable-gtk
+%define qemu_std_disables %{qemu_std_disables} --disable-opengl
+%define qemu_std_disables %{qemu_std_disables} --disable-netmap
+%ifn %{defined qemu_disables}
+ %define qemu_disables %{nil}
+%endif
+%define qemu_disables %{qemu_std_disables} %{qemu_disables}
+
+#
+# QEMU Targets to build.
+#
+%if %{!defined qemu_archs} && %{!defined with_qemu_archs}
+ %define qemu_target_list %{nil}
+%else
+ %if %{defined with_qemu_archs}
+  %define qemu_target_list --target-list=%{with_qemu_archs}
+ %else
+  %define 

[PATCH v1 1/2] glib-2.48.2-1.cfg: Fix checksum of patch

2022-08-22 Thread Ryan Long
---
 bare/config/devel/glib-2.48.2-1.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bare/config/devel/glib-2.48.2-1.cfg 
b/bare/config/devel/glib-2.48.2-1.cfg
index 76927e9..397a2c9 100644
--- a/bare/config/devel/glib-2.48.2-1.cfg
+++ b/bare/config/devel/glib-2.48.2-1.cfg
@@ -20,7 +20,7 @@
 
 %patch add glib 
https://gitlab.gnome.org/GNOME/glib/commit/566e1d61a500267c7849ad0b2552feec9c9a29a6.patch
 %hash sha512 566e1d61a500267c7849ad0b2552feec9c9a29a6.patch \
-   
Mz3YZfEOLgNA6eSUzg8y1yiGk0S5YFbYmWRcGyrcRHhmu8mUzuneWmsj6OYXG09zAvBLApxrEGqvaI0iJNhAMg==
+   
azOlfLYsNkeNyJSot1NCGoj15HYgyHLA4gDqiNMnWwImEPxB7K2tvkLWrwOf7QT4hdTG1qBAnhkPQXKhn9OG5Q==
 
 #
 # The GLib build instructions. We use 2.x.x Release 1.
-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v1 0/2] Change to QEMU 5

2022-08-22 Thread Ryan Long
Hi,

For this patchset I changed the hash of the glib hash because it has changed
and it doesn't work on Debian 11, Ubuntu 22.04, and CentOS 8 Stream.

After fixing the glib hash, I continued to run into other errors. So I brought
in the config files for QEMU 5 since all the previously mentioned OSes had no
problem building it.

Thanks,
Ryan

Ryan Long (2):
  glib-2.48.2-1.cfg: Fix checksum of patch
  Add QEMU 5 configuration files

 bare/config/devel/glib-2.48.2-1.cfg |   2 +-
 bare/config/devel/qemu-5.2.0-1.cfg  |  42 +++
 bare/config/devel/qemu-couverture.bset  |   2 +-
 bare/config/devel/qemu.bset |   2 +-
 source-builder/config/qemu-5-1.cfg  |   9 ++
 source-builder/config/qemu-common-2.cfg | 145 
 6 files changed, 199 insertions(+), 3 deletions(-)
 create mode 100644 bare/config/devel/qemu-5.2.0-1.cfg
 create mode 100644 source-builder/config/qemu-5-1.cfg
 create mode 100644 source-builder/config/qemu-common-2.cfg

-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


rtems-tools: DWARF5 support in Elftoolchain

2022-08-22 Thread Ryan Long
Covoar has been unable to run after upgrading to GCC 12 because by 
default it generates DWARF5 debug info. Covoar uses libdwarf from 
Elftoolchain to read the debug info, and libdwarf only supports DWARF 
versions 2 through 4.


I submitted a ticket notifying Elftoolchain about this issue 
(https://sourceforge.net/p/elftoolchain/tickets/611/).



At the moment, you can get coverage to run just by going into 
rtems-tools/rtemstoolkit/elftoolchain/libdwarf/libdward_info.c at line 
228 and changing


cu->cu_version > 4

to

cu->cu_version > 5


Ryan

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH v1 09/12] malloctest/init.c: Added pragmas to address gcc 12 warnings

2022-08-18 Thread Ryan Long

On 8/16/2022 10:55 PM, Chris Johns wrote:

On 17/8/2022 12:16 pm, Joel Sherrill wrote:

On Tue, Aug 16, 2022, 6:07 PM Chris Johns mailto:chr...@rtems.org>> wrote:
 On 17/8/2022 6:11 am, Ryan Long wrote:
 > Fixed four warnings disabled were for "-Wuse-after-free" and one for a
 > "-Wfree-nonheap-object."

 Is this a gcc warning bug? If p1 was used to access the memory the warning 
is
 right but we are only referencing the address and not the data. It is no
 different to:

   void* p = 0x1;
   printf("P is %p\n", p);

 This is fine and has to be or we could never access any hardware.


That example is different I think. Semantically after a call to free, the
address is no longer valid for any use.

Ah yes sorry, I was looking at the wrong spot in the code. It is down at line 
1531.


Ensuring you don't call another member
of the malloc family is a legitimate way to avoid double frees.

Yes using the pointer is invalid.


If we have an issue with a specific use case pattern that GCC is tripping, then
we discuss it with them. I'm sure all of these were well thought out.

Besides this code is pushing deliberate error conditions so we should not be
surprised that the compiler is detecting issues with the code.

I am not sure the test is correct and should be there. Passing in and then
testing the same value is returned assumes undefined behaviour:

  If ptr does not match a pointer returned earlier by calloc(), malloc(),
  or realloc() or if the space has previously been deallocated by a call
  to free() or realloc(), the behavior is undefined.

https://pubs.opengroup.org/onlinepubs/9699919799/functions/realloc.html


For some of the tests we would just need to set p1 to NULL before the 
check then right?


Do the rest of the patches in this set look good?



Chris

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH v1 12/12] psxkey07/init.c: Add pragma for gcc 12 warning

2022-08-16 Thread Ryan Long
Updates #4662
---
 testsuites/psxtests/psxkey07/init.c | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/testsuites/psxtests/psxkey07/init.c 
b/testsuites/psxtests/psxkey07/init.c
index 593df739db..15387264ba 100644
--- a/testsuites/psxtests/psxkey07/init.c
+++ b/testsuites/psxtests/psxkey07/init.c
@@ -56,8 +56,15 @@ rtems_task Test_Thread(rtems_task_argument argument)
 
   value_p = malloc( sizeof( int ) );
   rtems_test_assert(value_p != NULL);
-  sc = pthread_setspecific( Key, value_p );
-  rtems_test_assert( !sc );
+/*
+ * This was added to address the following warning.
+ * warning: 'value_p' may be used uninitialized
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+ sc = pthread_setspecific( Key, value_p );
+#pragma GCC diagnostic pop
+ rtems_test_assert( !sc );
 
   pthread_mutex_lock(  );
   ++setted_thread_count;
-- 
2.11.0

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v1 11/12] psxclock/init.c: Change print format for warning

2022-08-16 Thread Ryan Long
Updates #4662
---
 testsuites/psxtests/psxclock/init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testsuites/psxtests/psxclock/init.c 
b/testsuites/psxtests/psxclock/init.c
index 743cfa6d78..eb2f1d130c 100644
--- a/testsuites/psxtests/psxclock/init.c
+++ b/testsuites/psxtests/psxclock/init.c
@@ -115,7 +115,7 @@ static void test_clock_check( clock_context* ctx, const 
rtems_interval ticks_per
 (((ctx->tspec.tv_sec * 10LLU) + ctx->tspec.tv_nsec) / 
tick_period_nsec) + 1;
   rtems_test_assert( ctx->result == 0 );
   printf(
-"clock: %s: sec=%llu nsec=%li ticks=%u expected-ticks=%u\n",
+"clock: %s: sec=%" PRIdtime_t" nsec=%li ticks=%u expected-ticks=%u\n",
 ctx->name, ctx->tspec.tv_sec, ctx->tspec.tv_nsec, ctx->ticks, ticks);
   rtems_test_assert( ctx->ticks == ticks );
 }
-- 
2.11.0

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v1 10/12] ttest01/test-checks.c: Initialize variables

2022-08-16 Thread Ryan Long
These uninitialized variables were causing warnings to be generated.

Updates #4662
---
 testsuites/libtests/ttest01/test-checks.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/testsuites/libtests/ttest01/test-checks.c 
b/testsuites/libtests/ttest01/test-checks.c
index fa5591121e..06e1a959bf 100644
--- a/testsuites/libtests/ttest01/test-checks.c
+++ b/testsuites/libtests/ttest01/test-checks.c
@@ -90,8 +90,8 @@ T_TEST_CASE(step_assert_eq_ptr)
 
 T_TEST_CASE(check_eq_ptr)
 {
-   int a;
-   int b;
+   int a = 0;
+   int b = 0;
 
T_eq_ptr(, );
T_eq_ptr(, );
@@ -115,8 +115,8 @@ T_TEST_CASE(step_assert_ne_ptr)
 
 T_TEST_CASE(check_ne_ptr)
 {
-   int a;
-   int b;
+   int a = 0;
+   int b = 0;
 
T_ne_ptr(, );
T_ne_ptr(, );
@@ -162,7 +162,7 @@ T_TEST_CASE(step_assert_not_null)
 
 T_TEST_CASE(check_not_null)
 {
-   int a;
+   int a = 0;
 
T_not_null();
T_not_null(NULL);
-- 
2.11.0

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v1 08/12] dl09/dl-load.c: Fix gcc 12 warning

2022-08-16 Thread Ryan Long
Changed format of size_t variable being printed.

Updates #4662
---
 testsuites/libtests/dl09/dl-load.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testsuites/libtests/dl09/dl-load.c 
b/testsuites/libtests/dl09/dl-load.c
index 1de7c8fa29..ce9708c3a3 100644
--- a/testsuites/libtests/dl09/dl-load.c
+++ b/testsuites/libtests/dl09/dl-load.c
@@ -171,7 +171,7 @@ static void dl_object_open (object_def* od, objects* o)
   if (od->space != 0)
   {
 o->space = malloc (od->space);
-printf("space alloc: %s: %d: %p\n", od->name, od->space, o->space);
+printf("space alloc: %s: %zd: %p\n", od->name, od->space, o->space);
 rtems_test_assert (o->space != NULL);
   }
   dl_load_dump ();
-- 
2.11.0

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v1 09/12] malloctest/init.c: Added pragmas to address gcc 12 warnings

2022-08-16 Thread Ryan Long
Fixed four warnings disabled were for "-Wuse-after-free" and one for a
"-Wfree-nonheap-object."

Updates #4662
---
 testsuites/libtests/malloctest/init.c | 41 ---
 1 file changed, 38 insertions(+), 3 deletions(-)

diff --git a/testsuites/libtests/malloctest/init.c 
b/testsuites/libtests/malloctest/init.c
index 05d97a27d5..ae3719c2cd 100644
--- a/testsuites/libtests/malloctest/init.c
+++ b/testsuites/libtests/malloctest/init.c
@@ -60,8 +60,15 @@ static void test_realloc(void)
   for (i=2 ; i<2048 ; i++) {
 p2 = realloc(p1, i);
 if (p2 != p1)
+/*
+ * This was added to address the following warning.
+ * warning: pointer 'p1' may be used after 'realloc'
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wuse-after-free"
   printf( "realloc - failed grow in place: "
   "%p != realloc(%p,%zu)\n", p1, p2, i);
+#pragma GCC diagnostic pop
 p1 = p2;
   }
   free(p1);
@@ -71,8 +78,15 @@ static void test_realloc(void)
   for (i=2047 ; i>=1; i--)  {
 p2 = realloc(p1, i);
 if (p2 != p1)
-  printf( "realloc - failed shrink in place: "
+/*
+ * This was added to address the following warning.
+ * warning: pointer 'p1' may be used after 'realloc'
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wuse-after-free"
+   printf( "realloc - failed shrink in place: "
   "%p != realloc(%p,%zu)\n", p1, p2, i);
+#pragma GCC diagnostic pop
 p1 = p2;
   }
   free(p1);
@@ -84,8 +98,15 @@ static void test_realloc(void)
   p2 = malloc(32);
   p3 = realloc(p1, 64);
   if (p3 == p1 || p3 == NULL)
-printf(
+/*
+ * This was added to address the following warning.
+ * warning: pointer may be used after 'realloc'
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wuse-after-free"
+ printf(
   "realloc - failed non-in place: realloc(%p,%d) = %p\n", p1, 64, p3);
+#pragma GCC diagnostic pop
   free(p3);
   free(p2);
 
@@ -122,7 +143,14 @@ static void test_realloc(void)
   /*
*  Realloc with a bad pointer to force a point
*/
-  p4 = realloc( test_realloc, 32 );
+/*
+ * This was added to address the following warning.
+ * warning: 'realloc' called on unallocated object
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wfree-nonheap-object"
+   p4 = realloc( test_realloc, 32 );
+#pragma GCC diagnostic pop
 
   p4 = _realloc_r( NULL, NULL, 1 );
 }
@@ -1528,8 +1556,15 @@ static void test_early_malloc( void )
 
   free( q );
 
+/*
+ * This was added to address the following warning.
+ * warning: pointer 'q' used after 'free'
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wuse-after-free"
   r = realloc( q, 128 );
   rtems_test_assert( r == q );
+#pragma GCC diagnostic pop
 
   s = malloc( 1 );
   rtems_test_assert( s != NULL );
-- 
2.11.0

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v1 07/12] cpu.h: Fix gcc 12 warnings

2022-08-16 Thread Ryan Long
Added two pragmas to address, and changed the value of
AARCH64_EXCEPTION_MAKE_ENUM_64_BIT to INT_MAX because the old value was not
in range of an int.

Updates #4662
---
 cpukit/score/cpu/aarch64/include/rtems/score/cpu.h | 20 ++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h 
b/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h
index 47a8e97985..282977853f 100644
--- a/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h
+++ b/cpukit/score/cpu/aarch64/include/rtems/score/cpu.h
@@ -43,6 +43,7 @@
 #endif
 #include 
 #include 
+#include 
 
 /**
  * @addtogroup RTEMSScoreCPUAArch64
@@ -156,7 +157,14 @@
 extern "C" {
 #endif
 
+/*
+   This is to fix the following warning
+   ISO C does not support 'uint128_t' types
+*/
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
 typedef unsigned __int128 uint128_t;
+#pragma GCC diagnostic pop
 
 typedef struct {
   uint64_t register_x19;
@@ -404,7 +412,7 @@ typedef enum {
   AARCH64_EXCEPTION_LEL32_FIQ = 14,
   AARCH64_EXCEPTION_LEL32_SERROR = 15,
   MAX_EXCEPTIONS = 16,
-  AARCH64_EXCEPTION_MAKE_ENUM_64_BIT = 0x
+  AARCH64_EXCEPTION_MAKE_ENUM_64_BIT = INT_MAX
 } AArch64_symbolic_exception_name;
 
 #define VECTOR_POINTER_OFFSET 0x78
@@ -432,7 +440,15 @@ static inline void* AArch64_set_exception_handler(
   *vector_address = handler;
 
   /* return now-previous vector pointer */
-  return (void*)current_vector_pointer;
+
+/*
+ * This was put in to fix the following warning:
+ * warning: ISO C forbids conversion of function pointer to object pointer 
type.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
+ return (void*)current_vector_pointer;
+#pragma GCC diagnostic pop
 }
 
 typedef struct {
-- 
2.11.0

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v1 04/12] percpu.h: Add pragma to disable -Wpedantic

2022-08-16 Thread Ryan Long
Updates #4662
---
 cpukit/include/rtems/score/percpu.h | 8 
 1 file changed, 8 insertions(+)

diff --git a/cpukit/include/rtems/score/percpu.h 
b/cpukit/include/rtems/score/percpu.h
index 24086cde86..fdd40e0a8b 100644
--- a/cpukit/include/rtems/score/percpu.h
+++ b/cpukit/include/rtems/score/percpu.h
@@ -262,6 +262,13 @@ typedef struct Per_CPU_Job {
 /**
  * @brief Per-CPU statistics.
  */
+
+/*
+ * This was added to address the following warning:
+ * warning: struct has no members
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
 typedef struct {
 #if defined( RTEMS_PROFILING )
   /**
@@ -330,6 +337,7 @@ typedef struct {
   uint64_t total_interrupt_time;
 #endif /* defined( RTEMS_PROFILING ) */
 } Per_CPU_Stats;
+#pragma GCC diagnostic pop
 
 /**
  * @brief Per-CPU watchdog header index.
-- 
2.11.0

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v1 05/12] schedulerpriority.h: Fix gcc 12 warning

2022-08-16 Thread Ryan Long
Changed the size of the array to 1 to get rid of the warning.

Updates #4662
---
 cpukit/include/rtems/score/schedulerpriority.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/include/rtems/score/schedulerpriority.h 
b/cpukit/include/rtems/score/schedulerpriority.h
index cf5d0762a9..e485e97c60 100644
--- a/cpukit/include/rtems/score/schedulerpriority.h
+++ b/cpukit/include/rtems/score/schedulerpriority.h
@@ -94,7 +94,7 @@ typedef struct {
   /**
* @brief One ready queue per priority level.
*/
-  Chain_Control Ready[ 0 ];
+  Chain_Control Ready[ 1 ];
 } Scheduler_priority_Context;
 
 /**
-- 
2.11.0

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v1 06/12] test.h: Add pragma for gcc 12 warning

2022-08-16 Thread Ryan Long
Updates #4662
---
 cpukit/include/rtems/test.h | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/cpukit/include/rtems/test.h b/cpukit/include/rtems/test.h
index c283be7860..e0823394d1 100644
--- a/cpukit/include/rtems/test.h
+++ b/cpukit/include/rtems/test.h
@@ -218,12 +218,19 @@ void T_check_null(const T_check_context_msg *, const void 
*);
 
 void T_check_not_null(const T_check_context_msg *, const void *);
 
+/*
+ * This was added to address the following warning.
+ * warning: 'a' may be used uninitialized
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
 #define T_flags_not_null(a, flags, sa) \
 {  \
static const T_check_context_msg T_check_instance = {   \
{ T_FILE_NAME, __LINE__, (flags) | T_CHECK_FMT }, sa }; \
T_check_not_null(_check_instance, a); \
 }
+#pragma GCC diagnostic pop
 
 void T_check_eq_mem(const T_check_context_msg *, const void *, const void *,
 size_t);
-- 
2.11.0

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v1 04/12] percpu.h: Add pragma for gcc 12 warning

2022-08-16 Thread Ryan Long
Updates #4662
---
 cpukit/include/rtems/score/percpu.h | 8 
 1 file changed, 8 insertions(+)

diff --git a/cpukit/include/rtems/score/percpu.h 
b/cpukit/include/rtems/score/percpu.h
index 24086cde86..fdd40e0a8b 100644
--- a/cpukit/include/rtems/score/percpu.h
+++ b/cpukit/include/rtems/score/percpu.h
@@ -262,6 +262,13 @@ typedef struct Per_CPU_Job {
 /**
  * @brief Per-CPU statistics.
  */
+
+/*
+ * This was added to address the following warning:
+ * warning: struct has no members
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
 typedef struct {
 #if defined( RTEMS_PROFILING )
   /**
@@ -330,6 +337,7 @@ typedef struct {
   uint64_t total_interrupt_time;
 #endif /* defined( RTEMS_PROFILING ) */
 } Per_CPU_Stats;
+#pragma GCC diagnostic pop
 
 /**
  * @brief Per-CPU watchdog header index.
-- 
2.11.0

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v1 03/12] interr.h: Fix gcc 12 warning

2022-08-16 Thread Ryan Long
The warning that this fixes states that "ISO C restricts enumerator values to
range of 'int'."

Updates #4662
---
 cpukit/include/rtems/score/interr.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/include/rtems/score/interr.h 
b/cpukit/include/rtems/score/interr.h
index d3fb370ec3..61233dce5f 100644
--- a/cpukit/include/rtems/score/interr.h
+++ b/cpukit/include/rtems/score/interr.h
@@ -175,7 +175,7 @@ typedef enum {
* This enum value ensures that the enum type needs at least 32-bits for
* architectures with short enums.
*/
-  RTEMS_FATAL_SOURCE_LAST = 0x
+  RTEMS_FATAL_SOURCE_LAST = INT_MAX
 } Internal_errors_Source;
 
 /**
-- 
2.11.0

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v1 02/12] linkersets.h: Fix gcc 12 warning

2022-08-16 Thread Ryan Long
Changing the offset from 0 to 1 got rid of a warning stating that offset 0 is
out of bounds.

Updates #4662
---
 cpukit/include/rtems/linkersets.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/include/rtems/linkersets.h 
b/cpukit/include/rtems/linkersets.h
index cdfcd54cde..45f9dc1ef7 100644
--- a/cpukit/include/rtems/linkersets.h
+++ b/cpukit/include/rtems/linkersets.h
@@ -92,7 +92,7 @@ extern "C" {
   extern RTEMS_LINKER_SET_ALIGN( type ) type RTEMS_LINKER_SET_END( set )[]
 
 #define RTEMS_LINKER_RWSET( set, type ) \
-  RTEMS_LINKER_SET_ALIGN( type ) type RTEMS_LINKER_SET_BEGIN( set )[ 0 ] \
+  RTEMS_LINKER_SET_ALIGN( type ) type RTEMS_LINKER_SET_BEGIN( set )[ 1 ] \
   RTEMS_SECTION( ".rtemsrwset." #set ".begin" ) RTEMS_USED; \
   RTEMS_LINKER_SET_ALIGN( type ) type RTEMS_LINKER_SET_END( set )[ 0 ] \
   RTEMS_SECTION( ".rtemsrwset." #set ".end" ) RTEMS_USED
-- 
2.11.0

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v1 00/12] gcc 12 warnings patches

2022-08-16 Thread Ryan Long
Hi,

For these patches I fixed some of the warnings and added pragmas to ignore
some of the others. These were the warnings I got when building
AArch64/xilinx_zynqmp_lp64_qemu. If you have any feedback on fixing some of
these warnings instead of just ignoring them, please let me know and I can
get that put in.

Thanks,
Ryan

Ryan Long (12):
  threads.h: Add pragmas to get rid of gcc 12 errors
  linkersets.h: Fix gcc 12 warning
  interr.h: Fix gcc 12 warning
  percpu.h: Add pragma for gcc 12 warning
  schedulerpriority.h: Fix gcc 12 warning
  test.h: Add pragma for gcc 12 warning
  cpu.h: Fix gcc 12 warnings
  dl09/dl-load.c: Fix gcc 12 warning
  malloctest/init.c: Added pragmas to address gcc 12 warnings
  ttest01/test-checks.c: Initialize variables
  psxclock/init.c: Change print format for warning
  psxkey07/init.c: Add pragma for gcc 12 warning

 cpukit/include/rtems/confdefs/threads.h| 15 
 cpukit/include/rtems/linkersets.h  |  2 +-
 cpukit/include/rtems/score/interr.h|  2 +-
 cpukit/include/rtems/score/percpu.h|  8 +
 cpukit/include/rtems/score/schedulerpriority.h |  2 +-
 cpukit/include/rtems/test.h|  7 
 cpukit/score/cpu/aarch64/include/rtems/score/cpu.h | 20 +--
 testsuites/libtests/dl09/dl-load.c |  2 +-
 testsuites/libtests/malloctest/init.c  | 41 --
 testsuites/libtests/ttest01/test-checks.c  | 10 +++---
 testsuites/psxtests/psxclock/init.c|  2 +-
 testsuites/psxtests/psxkey07/init.c| 11 --
 12 files changed, 105 insertions(+), 17 deletions(-)

-- 
2.11.0

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v1 01/12] threads.h: Add pragma to disable -Wpedantic

2022-08-16 Thread Ryan Long
Updates #4662
---
 cpukit/include/rtems/confdefs/threads.h | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/cpukit/include/rtems/confdefs/threads.h 
b/cpukit/include/rtems/confdefs/threads.h
index 8e4537f90b..4040bcb50a 100644
--- a/cpukit/include/rtems/confdefs/threads.h
+++ b/cpukit/include/rtems/confdefs/threads.h
@@ -147,7 +147,15 @@ const size_t _Thread_Maximum_TLS_size =
   CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE;
 
 struct Thread_Configured_control {
+/*
+ * This was added to address the following warning.
+ * warning: invalid use of structure with flexible array member
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
   Thread_Control Control;
+#pragma GCC diagnostic pop
+
   #if CONFIGURE_MAXIMUM_USER_EXTENSIONS > 0
 void *extensions[ CONFIGURE_MAXIMUM_USER_EXTENSIONS + 1 ];
   #endif
@@ -211,7 +219,14 @@ const size_t _Thread_Control_add_on_count =
 
 #ifdef RTEMS_SMP
   struct Thread_queue_Configured_heads {
+/*
+ * This was put in to address the following warning.
+ * warning: invalid use of structure with flexible array member
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
 Thread_queue_Heads Heads;
+#pragma GCC diagnostic pop
   Thread_queue_Priority_queue Priority[ _CONFIGURE_SCHEDULER_COUNT ];
   };
 
-- 
2.11.0

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v1 01/12] threads.h: Add pragmas to get rid of gcc 12 errors

2022-08-16 Thread Ryan Long
Updates #4662
---
 cpukit/include/rtems/confdefs/threads.h | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/cpukit/include/rtems/confdefs/threads.h 
b/cpukit/include/rtems/confdefs/threads.h
index 8e4537f90b..4040bcb50a 100644
--- a/cpukit/include/rtems/confdefs/threads.h
+++ b/cpukit/include/rtems/confdefs/threads.h
@@ -147,7 +147,15 @@ const size_t _Thread_Maximum_TLS_size =
   CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE;
 
 struct Thread_Configured_control {
+/*
+ * This was added to address the following warning.
+ * warning: invalid use of structure with flexible array member
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
   Thread_Control Control;
+#pragma GCC diagnostic pop
+
   #if CONFIGURE_MAXIMUM_USER_EXTENSIONS > 0
 void *extensions[ CONFIGURE_MAXIMUM_USER_EXTENSIONS + 1 ];
   #endif
@@ -211,7 +219,14 @@ const size_t _Thread_Control_add_on_count =
 
 #ifdef RTEMS_SMP
   struct Thread_queue_Configured_heads {
+/*
+ * This was put in to address the following warning.
+ * warning: invalid use of structure with flexible array member
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
 Thread_queue_Heads Heads;
+#pragma GCC diagnostic pop
   Thread_queue_Priority_queue Priority[ _CONFIGURE_SCHEDULER_COUNT ];
   };
 
-- 
2.11.0

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[rtems-tools PATCH] rtemstoolkit: Fix conditions using "is" with literals

2022-08-11 Thread Ryan Long
Fix warnings that come from python 3.8 about using the "is" operator with
string literals.

Closes #4700
---
 rtemstoolkit/config.py |  2 +-
 rtemstoolkit/macros.py | 58 +-
 2 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/rtemstoolkit/config.py b/rtemstoolkit/config.py
index be100f2..8fd4a32 100644
--- a/rtemstoolkit/config.py
+++ b/rtemstoolkit/config.py
@@ -127,7 +127,7 @@ class file(object):
 self.opts.set_dry_run()
 
 def _label(self, name):
-if name.startswith('%{') and name[-1] is '}':
+if name.startswith('%{') and name[-1] == '}':
 return name
 return '%{' + name.lower() + '}'
 
diff --git a/rtemstoolkit/macros.py b/rtemstoolkit/macros.py
index d8012e1..136f52d 100644
--- a/rtemstoolkit/macros.py
+++ b/rtemstoolkit/macros.py
@@ -260,7 +260,7 @@ class macros:
 return [rm[7:] for rm in self.read_maps]
 
 def key_filter(self, key):
-if key.startswith('%{') and key[-1] is '}':
+if key.startswith('%{') and key[-1] == '}':
 key = key[2:-1]
 return key.lower()
 
@@ -295,29 +295,29 @@ class macros:
 print(' c:%s(%d) s:%s t:"%s" m:%r M:%s' % \
 (c, ord(c), state, token, macro, map))
 l_remaining = l_remaining[1:]
-if c is '#' and not state.startswith('value'):
+if c == '#' and not state.startswith('value'):
 break
 if c == '\n' or c == '\r':
-if not (state is 'key' and len(token) == 0) and \
+if not (state == 'key' and len(token) == 0) and \
 not state.startswith('value-multiline'):
 self.macros = orig_macros
 raise error.general('malformed macro line:%d: %s' % 
(lc, l))
-if state is 'key':
+if state == 'key':
 if c not in string.whitespace:
-if c is '[':
+if c == '[':
 state = 'map'
-elif c is '%':
+elif c == '%':
 state = 'directive'
-elif c is ':':
+elif c == ':':
 macro += [token]
 token = ''
 state = 'attribs'
-elif c is '#':
+elif c == '#':
 break
 else:
 token += c
-elif state is 'map':
-if c is ']':
+elif state == 'map':
+if c == ']':
 if token not in self.macros:
 self.macros[token] = {}
 map = token
@@ -328,7 +328,7 @@ class macros:
 else:
 self.macros = orig_macros
 raise error.general('invalid macro map:%d: %s' % (lc, 
l))
-elif state is 'directive':
+elif state == 'directive':
 if c in string.whitespace:
 if token == 'include':
 self.load(_clean(l_remaining))
@@ -340,7 +340,7 @@ class macros:
 else:
 self.macros = orig_macros
 raise error.general('invalid macro directive:%d: %s' % 
(lc, l))
-elif state is 'include':
+elif state == 'include':
 if c is string.whitespace:
 if token == 'include':
 state = 'include'
@@ -349,49 +349,49 @@ class macros:
 else:
 self.macros = orig_macros
 raise error.general('invalid macro directive:%d: %s' % 
(lc, l))
-elif state is 'attribs':
+elif state == 'attribs':
 if c not in string.whitespace:
-if c is ',':
+if c == ',':
 macro += [token]
 token = ''
 if len(macro) == 3:
 state = 'value-start'
 else:
 token += c
-elif state is 'value-start':
-if c is "'":
+elif state == 'value-start':
+if c == "'":
 state = 'value-line-start'
-elif state is 'value-line-start':
-if c is "'":
+elif state == 'value-line-start':
+if c == "'":
 state = 'value-multiline-start'
 else:
 

[rtems-tools 5 PATCH] Python 3.8 warning about "is" vs "==" in comparisons of literals

2022-08-11 Thread Ryan Long
From: Konrad Schwarz 

Signed-off-by: Konrad Schwarz 

Closes #4692
---
 rtemstoolkit/config.py |  2 +-
 rtemstoolkit/macros.py | 58 +-
 2 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/rtemstoolkit/config.py b/rtemstoolkit/config.py
index be100f2..8fd4a32 100644
--- a/rtemstoolkit/config.py
+++ b/rtemstoolkit/config.py
@@ -127,7 +127,7 @@ class file(object):
 self.opts.set_dry_run()
 
 def _label(self, name):
-if name.startswith('%{') and name[-1] is '}':
+if name.startswith('%{') and name[-1] == '}':
 return name
 return '%{' + name.lower() + '}'
 
diff --git a/rtemstoolkit/macros.py b/rtemstoolkit/macros.py
index d8012e1..136f52d 100644
--- a/rtemstoolkit/macros.py
+++ b/rtemstoolkit/macros.py
@@ -260,7 +260,7 @@ class macros:
 return [rm[7:] for rm in self.read_maps]
 
 def key_filter(self, key):
-if key.startswith('%{') and key[-1] is '}':
+if key.startswith('%{') and key[-1] == '}':
 key = key[2:-1]
 return key.lower()
 
@@ -295,29 +295,29 @@ class macros:
 print(' c:%s(%d) s:%s t:"%s" m:%r M:%s' % \
 (c, ord(c), state, token, macro, map))
 l_remaining = l_remaining[1:]
-if c is '#' and not state.startswith('value'):
+if c == '#' and not state.startswith('value'):
 break
 if c == '\n' or c == '\r':
-if not (state is 'key' and len(token) == 0) and \
+if not (state == 'key' and len(token) == 0) and \
 not state.startswith('value-multiline'):
 self.macros = orig_macros
 raise error.general('malformed macro line:%d: %s' % 
(lc, l))
-if state is 'key':
+if state == 'key':
 if c not in string.whitespace:
-if c is '[':
+if c == '[':
 state = 'map'
-elif c is '%':
+elif c == '%':
 state = 'directive'
-elif c is ':':
+elif c == ':':
 macro += [token]
 token = ''
 state = 'attribs'
-elif c is '#':
+elif c == '#':
 break
 else:
 token += c
-elif state is 'map':
-if c is ']':
+elif state == 'map':
+if c == ']':
 if token not in self.macros:
 self.macros[token] = {}
 map = token
@@ -328,7 +328,7 @@ class macros:
 else:
 self.macros = orig_macros
 raise error.general('invalid macro map:%d: %s' % (lc, 
l))
-elif state is 'directive':
+elif state == 'directive':
 if c in string.whitespace:
 if token == 'include':
 self.load(_clean(l_remaining))
@@ -340,7 +340,7 @@ class macros:
 else:
 self.macros = orig_macros
 raise error.general('invalid macro directive:%d: %s' % 
(lc, l))
-elif state is 'include':
+elif state == 'include':
 if c is string.whitespace:
 if token == 'include':
 state = 'include'
@@ -349,49 +349,49 @@ class macros:
 else:
 self.macros = orig_macros
 raise error.general('invalid macro directive:%d: %s' % 
(lc, l))
-elif state is 'attribs':
+elif state == 'attribs':
 if c not in string.whitespace:
-if c is ',':
+if c == ',':
 macro += [token]
 token = ''
 if len(macro) == 3:
 state = 'value-start'
 else:
 token += c
-elif state is 'value-start':
-if c is "'":
+elif state == 'value-start':
+if c == "'":
 state = 'value-line-start'
-elif state is 'value-line-start':
-if c is "'":
+elif state == 'value-line-start':
+if c == "'":
 state = 'value-multiline-start'
 else:
 state = 'value-line'

[rtems-docs PATCH] loader.rst: Add documentation for AArch64 support

2022-08-09 Thread Ryan Long
---
 user/exe/loader.rst | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/user/exe/loader.rst b/user/exe/loader.rst
index de77343..2a248b1 100644
--- a/user/exe/loader.rst
+++ b/user/exe/loader.rst
@@ -837,6 +837,7 @@ Architectures
 
 The following architectures are supported:
 
+ - AArch64
  - ARM
  - Blackfin
  - H8300
@@ -849,6 +850,15 @@ The following architectures are supported:
  - SPARC
  - V850
 
+AArch64
+^^^
+
+The AArch64 relocation backend supports veneers.
+
+The veneer implementation is two instructions and a 64bit target address
+making the overhead 16 bytes for each veneer. The performance overhead is two
+instructions.
+
 ARM
 ^^^
 
-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] rtems-tools-6.cfg: Bump hash

2022-07-29 Thread Ryan Long
---
 rtems/config/tools/rtems-tools-6.cfg | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rtems/config/tools/rtems-tools-6.cfg 
b/rtems/config/tools/rtems-tools-6.cfg
index c032bd4..a667175 100644
--- a/rtems/config/tools/rtems-tools-6.cfg
+++ b/rtems/config/tools/rtems-tools-6.cfg
@@ -10,14 +10,14 @@
  %define rtems_tools_source rtems-tools-%{rtems_tools_version}
  %define rtems_tools_ext xz
 %else
- %define rtems_tools_version f199d42e47e2e19175427e95797ca2f829f6aaa9
+ %define rtems_tools_version ace7db96d4561665b07ba15c2fe5f9349f4d3d8c
  %define rtems_tools_ext bz2
 %endif
 
 %define rtems_tools_source rtems-tools-%{rtems_tools_version}
 %source set rtems-tools 
https://git.rtems.org/rtems-tools/snapshot/%{rtems_tools_source}.tar.%{rtems_tools_ext}
 %hash   sha512 rtems-tools-%{rtems_tools_version}.tar.bz2 \
- 
VGmVZ8xUGYlnc7C6QGiwBbLp8e2e8/i1drFA0/y2gkoSIIcKMTIaS8gV+Qi6RuoBjJhg3HiNJ3pXIPsBCUi3Hw==
+ 
zYlopSJV6AEgEWqy3Y0c60BCy6cXWt1ej+F0OvFFzZf6PQ38avoKxlOkkDY1hzlfOjhR4AFaFM89k5vcYClreA==
 
 #
 # Optionally enable/disable building the RTEMS Tools via the command line.
-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] libdl: Refactor shared code in Arm and AArch64

2022-07-28 Thread Ryan Long
rtl-mdreloc-arm.c was used as the basis for rtl-mdreloc-aarch64.c. This lead
to some code being shared by the two files. The code was consolidated into
rtl-unwind-arm.c.

Closes #4686
---
 cpukit/libdl/rtl-mdreloc-aarch64.c | 79 +-
 cpukit/libdl/rtl-mdreloc-arm.c | 79 +-
 cpukit/libdl/rtl-unwind-arm.c  | 69 ++
 cpukit/libdl/rtl-unwind-arm.h  | 46 +
 spec/build/cpukit/objdlaarch64.yml |  1 +
 spec/build/cpukit/objdlarm.yml |  1 +
 6 files changed, 119 insertions(+), 156 deletions(-)
 create mode 100644 cpukit/libdl/rtl-unwind-arm.c
 create mode 100644 cpukit/libdl/rtl-unwind-arm.h

diff --git a/cpukit/libdl/rtl-mdreloc-aarch64.c 
b/cpukit/libdl/rtl-mdreloc-aarch64.c
index 3b1bbff2d2..738c9eba70 100644
--- a/cpukit/libdl/rtl-mdreloc-aarch64.c
+++ b/cpukit/libdl/rtl-mdreloc-aarch64.c
@@ -73,16 +73,12 @@ __RCSID("$NetBSD: mdreloc.c,v 1.14 2020/06/16 21:01:30 
joerg Exp $");
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include "rtl-elf.h"
 #include "rtl-error.h"
 #include 
-#include "rtl-unwind.h"
-
-typedef unsigned _Unwind_Word __attribute__((__mode__(__word__)));
-typedef _Unwind_Word _uw;
+#include "rtl-unwind-arm.h"
 
 struct tls_data {
   size_ttd_tlsindex;
@@ -523,76 +519,3 @@ rtems_rtl_elf_relocate_rel (rtems_rtl_obj*obj,
   return rtems_rtl_elf_rel_failure;
 }
 
-bool
-rtems_rtl_elf_unwind_parse (const rtems_rtl_obj* obj,
-const char*  name,
-uint32_t flags)
-{
-  /*
-   * We location the EH sections in section flags.
-   */
-  return false;
-}
-
-bool
-rtems_rtl_elf_unwind_register (rtems_rtl_obj* obj)
-{
-  return true;
-}
-
-bool
-rtems_rtl_elf_unwind_deregister (rtems_rtl_obj* obj)
-{
-  return true;
-}
-
-/* An exception index table entry.  */
-typedef struct __EIT_entry
-{
-  _uw fnoffset;
-  _uw content;
-} __EIT_entry;
-
-/* The exception index table location in the base module */
-extern __EIT_entry __exidx_start;
-extern __EIT_entry __exidx_end;
-
-/*
- * A weak reference is in libgcc, provide a real version and provide a way to
- * manage loaded modules.
- *
- * Passed in the return address and a reference to the number of records
- * found. We set the start of the exidx data and the number of records.
- */
-_Unwind_Ptr __gnu_Unwind_Find_exidx (_Unwind_Ptr return_address,
- int*nrec) __attribute__ 
((__noinline__,
-   
__used__,
-   
__noclone__));
-
-_Unwind_Ptr __gnu_Unwind_Find_exidx (_Unwind_Ptr return_address,
- int*nrec)
-{
-  rtems_rtl_data*   rtl;
-  rtems_chain_node* node;
-  __EIT_entry*  exidx_start = &__exidx_start;
-  __EIT_entry*  exidx_end = &__exidx_end;
-
-  rtl = rtems_rtl_lock ();
-
-  node = rtems_chain_first (>objects);
-  while (!rtems_chain_is_tail (>objects, node)) {
-rtems_rtl_obj* obj = (rtems_rtl_obj*) node;
-if (rtems_rtl_obj_text_inside (obj, (void*) return_address)) {
-  exidx_start = (__EIT_entry*) obj->eh_base;
-  exidx_end = (__EIT_entry*) (obj->eh_base + obj->eh_size);
-  break;
-}
-node = rtems_chain_next (node);
-  }
-
-  rtems_rtl_unlock ();
-
-  *nrec = exidx_end - exidx_start;
-
-  return (_Unwind_Ptr) exidx_start;
-}
diff --git a/cpukit/libdl/rtl-mdreloc-arm.c b/cpukit/libdl/rtl-mdreloc-arm.c
index 4950dcdab1..fbfd42dc58 100644
--- a/cpukit/libdl/rtl-mdreloc-arm.c
+++ b/cpukit/libdl/rtl-mdreloc-arm.c
@@ -12,14 +12,12 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 
 #include 
 #include "rtl-elf.h"
 #include "rtl-error.h"
 #include 
-#include "rtl-unwind.h"
+#include "rtl-unwind-arm.h"
 
 /*
  * Set to 1 to allow untested relocations. If you tested one and it
@@ -597,78 +595,3 @@ rtems_rtl_elf_relocate_rel (rtems_rtl_obj*obj,
   symvalue,
   false);
 }
-
-bool
-rtems_rtl_elf_unwind_parse (const rtems_rtl_obj* obj,
-const char*  name,
-uint32_t flags)
-{
-  /*
-   * We location the EH sections in section flags.
-   */
-  return false;
-}
-
-bool
-rtems_rtl_elf_unwind_register (rtems_rtl_obj* obj)
-{
-  return true;
-}
-
-bool
-rtems_rtl_elf_unwind_deregister (rtems_rtl_obj* obj)
-{
-  obj->loader = NULL;
-  return true;
-}
-
-/* An exception index table entry.  */
-typedef struct __EIT_entry
-{
-  _uw fnoffset;
-  _uw content;
-} __EIT_entry;
-
-/* The exception index table location in the base module */
-extern __EIT_entry __exidx_start;
-extern __EIT_entry __exidx_end;
-
-/*
- * A weak reference is in libgcc, provide a real version and provide a way to
- * manage loaded modules.
- *
- * Passed in the return address and a 

[PATCH v3 0/5] Add AArch64 support to libdl

2022-07-28 Thread Ryan Long
Hi,

In this version of the patchset I just removed the line that was setting the
objects loader to NULL.

Thanks,
Ryan

Ryan Long (5):
  sys/exec_elf.h: Bring in newer file
  libdl/rtl-elf.h: Fix aarch64 define
  cpukit/libdl: Add support for AArch64
  libtests/dl*: Bump up the size of CONFIGURE_INIT_TASK_STACK_SIZE
  cpukit/libdl/rtl-sym.c: Fix increment of variable

 cpukit/include/sys/exec_elf.h | 840 +-
 cpukit/libdl/rtl-elf.h|   2 +-
 cpukit/libdl/rtl-mdreloc-aarch64.c| 598 +
 cpukit/libdl/rtl-sym.c|   2 +-
 .../cpu/aarch64/include/machine/elf_machdep.h | 256 ++
 spec/build/cpukit/objdl.yml   |   2 +
 spec/build/cpukit/objdlaarch64.yml|  15 +
 spec/build/cpukit/optlibdl.yml|   1 +
 testsuites/libtests/dl01/init.c   |   2 +-
 testsuites/libtests/dl02/init.c   |   2 +-
 testsuites/libtests/dl03/init.c   |   2 +-
 testsuites/libtests/dl04/init.c   |   2 +-
 testsuites/libtests/dl05/init.c   |   2 +-
 testsuites/libtests/dl06/initimpl.h   |   2 +-
 testsuites/libtests/dl07/init.c   |   2 +-
 testsuites/libtests/dl08/init.c   |   2 +-
 testsuites/libtests/dl09/init.c   |   2 +-
 testsuites/libtests/dl10/init.c   |   2 +-
 18 files changed, 1492 insertions(+), 244 deletions(-)
 create mode 100644 cpukit/libdl/rtl-mdreloc-aarch64.c
 create mode 100644 cpukit/score/cpu/aarch64/include/machine/elf_machdep.h
 create mode 100644 spec/build/cpukit/objdlaarch64.yml

-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v3 1/5] sys/exec_elf.h: Bring in newer file

2022-07-28 Thread Ryan Long
Updated this file with the newer version in NetBSD.

Updates #4682
---
 cpukit/include/sys/exec_elf.h | 840 --
 1 file changed, 608 insertions(+), 232 deletions(-)

diff --git a/cpukit/include/sys/exec_elf.h b/cpukit/include/sys/exec_elf.h
index 4242415f54..b50da6b272 100644
--- a/cpukit/include/sys/exec_elf.h
+++ b/cpukit/include/sys/exec_elf.h
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_elf.h,v 1.102 2010/03/01 11:27:29 skrll Exp $ */
+/* $NetBSD: exec_elf.h,v 1.168 2020/10/19 19:33:02 christos Exp $  */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -44,6 +44,7 @@
 #include 
 #else
 #include 
+#include 
 #endif /* _KERNEL || _STANDALONE */
 
 #if defined(ELFSIZE)
@@ -60,49 +61,41 @@
 #include 
 #endif
 
-typedefuint8_t Elf_Byte;
-
-typedefuint32_tElf32_Addr;
-#defineELF32_FSZ_ADDR  4
-typedefuint32_tElf32_Off;
-typedefint32_t Elf32_SOff;
-#defineELF32_FSZ_OFF   4
-typedefint32_t Elf32_Sword;
-#defineELF32_FSZ_SWORD 4
-typedefuint32_tElf32_Word;
-#defineELF32_FSZ_WORD  4
-typedefuint16_tElf32_Half;
-#defineELF32_FSZ_HALF  2
-typedefuint64_tElf32_Lword;
-#defineELF32_FSZ_LWORD 8
-
-typedefuint64_tElf64_Addr;
-#defineELF64_FSZ_ADDR  8
-typedefuint64_tElf64_Off;
-typedefint64_t Elf64_SOff;
-#defineELF64_FSZ_OFF   8
-typedefint32_t Elf64_Shalf;
-#defineELF64_FSZ_SHALF 4
-
-#ifndef ELF64_FSZ_SWORD
-typedefint32_t Elf64_Sword;
-#defineELF64_FSZ_SWORD 4
-#endif /* ELF64_FSZ_SWORD */
-#ifndef ELF64_FSZ_WORD
-typedefuint32_tElf64_Word;
-#defineELF64_FSZ_WORD  4
-#endif /* ELF64_FSZ_WORD */
-
-typedefint64_t Elf64_Sxword;
-#defineELF64_FSZ_SXWORD 8
-typedefuint64_tElf64_Xword;
-#defineELF64_FSZ_XWORD 8
-typedefuint64_tElf64_Lword;
-#defineELF64_FSZ_LWORD 8
-typedefuint32_tElf64_Half;
-#defineELF64_FSZ_HALF  4
-typedefuint16_tElf64_Quarter;
-#defineELF64_FSZ_QUARTER 2
+typedef uint8_tElf_Byte;
+
+typedef uint32_t   Elf32_Addr;
+#define ELF32_FSZ_ADDR 4
+typedef uint32_t   Elf32_Off;
+typedef int32_tElf32_SOff;
+#define ELF32_FSZ_OFF  4
+typedef int32_tElf32_Sword;
+#define ELF32_FSZ_SWORD 4
+typedef uint32_t   Elf32_Word;
+#define ELF32_FSZ_WORD 4
+typedef uint16_t   Elf32_Half;
+#define ELF32_FSZ_HALF 2
+typedef uint64_t   Elf32_Lword;
+#define ELF32_FSZ_LWORD 8
+
+typedef uint64_t   Elf64_Addr;
+#define ELF64_FSZ_ADDR 8
+typedef uint64_t   Elf64_Off;
+typedef int64_tElf64_SOff;
+#define ELF64_FSZ_OFF  8
+
+typedef int32_tElf64_Sword;
+#define ELF64_FSZ_SWORD 4
+typedef uint32_t   Elf64_Word;
+#define ELF64_FSZ_WORD 4
+
+typedef int64_tElf64_Sxword;
+#define ELF64_FSZ_SXWORD 8
+typedef uint64_t   Elf64_Xword;
+#define ELF64_FSZ_XWORD 8
+typedef uint64_t   Elf64_Lword;
+#define ELF64_FSZ_LWORD 8
+typedef uint16_t   Elf64_Half;
+#define ELF64_FSZ_HALF 2
 
 /*
  * ELF Header
@@ -118,29 +111,29 @@ typedef struct {
Elf32_Off   e_phoff;/* Program hdr offset */
Elf32_Off   e_shoff;/* Section hdr offset */
Elf32_Word  e_flags;/* Processor flags */
-   Elf32_Half  e_ehsize;   /* sizeof ehdr */
-   Elf32_Half  e_phentsize;/* Program header entry size */
-   Elf32_Half  e_phnum;/* Number of program headers */
-   Elf32_Half  e_shentsize;/* Section header entry size */
-   Elf32_Half  e_shnum;/* Number of section headers */
-   Elf32_Half  e_shstrndx; /* String table index */
+   Elf32_Half  e_ehsize;   /* sizeof ehdr */
+   Elf32_Half  e_phentsize;/* Program header entry size */
+   Elf32_Half  e_phnum;/* Number of program headers */
+   Elf32_Half  e_shentsize;/* Section header entry size */
+   Elf32_Half  e_shnum;/* Number of section headers */
+   Elf32_Half  e_shstrndx; /* String table index */
 } Elf32_Ehdr;
 
 typedef struct {
unsigned char   e_ident[ELF_NIDENT];/* Id bytes */
-   Elf64_Quarter   e_type; /* file type */
-   Elf64_Quarter   e_machine;  /* machine type */
-   Elf64_Half  e_version;  /* version number */
+   Elf64_Half  e_type; /* file type */
+   Elf64_Half  e_machine;  /* machine type */
+   Elf64_Word  e_version;  /* version 

[PATCH v3 4/5] libtests/dl*: Bump up the size of CONFIGURE_INIT_TASK_STACK_SIZE

2022-07-28 Thread Ryan Long
Updates #4682
---
 testsuites/libtests/dl01/init.c | 2 +-
 testsuites/libtests/dl02/init.c | 2 +-
 testsuites/libtests/dl03/init.c | 2 +-
 testsuites/libtests/dl04/init.c | 2 +-
 testsuites/libtests/dl05/init.c | 2 +-
 testsuites/libtests/dl06/initimpl.h | 2 +-
 testsuites/libtests/dl07/init.c | 2 +-
 testsuites/libtests/dl08/init.c | 2 +-
 testsuites/libtests/dl09/init.c | 2 +-
 testsuites/libtests/dl10/init.c | 2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/testsuites/libtests/dl01/init.c b/testsuites/libtests/dl01/init.c
index 59cf3147f0..06fa8004b8 100644
--- a/testsuites/libtests/dl01/init.c
+++ b/testsuites/libtests/dl01/init.c
@@ -94,7 +94,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
 
diff --git a/testsuites/libtests/dl02/init.c b/testsuites/libtests/dl02/init.c
index 19563e9093..495a58d287 100644
--- a/testsuites/libtests/dl02/init.c
+++ b/testsuites/libtests/dl02/init.c
@@ -94,7 +94,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES   (RTEMS_DEFAULT_ATTRIBUTES | 
RTEMS_FLOATING_POINT)
 
diff --git a/testsuites/libtests/dl03/init.c b/testsuites/libtests/dl03/init.c
index 5080323c05..e953f1a4c6 100644
--- a/testsuites/libtests/dl03/init.c
+++ b/testsuites/libtests/dl03/init.c
@@ -80,7 +80,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES   (RTEMS_DEFAULT_ATTRIBUTES | 
RTEMS_FLOATING_POINT)
 
diff --git a/testsuites/libtests/dl04/init.c b/testsuites/libtests/dl04/init.c
index a733d9da14..54a852800d 100644
--- a/testsuites/libtests/dl04/init.c
+++ b/testsuites/libtests/dl04/init.c
@@ -94,7 +94,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
 
diff --git a/testsuites/libtests/dl05/init.c b/testsuites/libtests/dl05/init.c
index 93d69578f7..7e34af757d 100644
--- a/testsuites/libtests/dl05/init.c
+++ b/testsuites/libtests/dl05/init.c
@@ -96,7 +96,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (32U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (36U * 1024U)
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
 
diff --git a/testsuites/libtests/dl06/initimpl.h 
b/testsuites/libtests/dl06/initimpl.h
index 66e503b156..0d3987983d 100644
--- a/testsuites/libtests/dl06/initimpl.h
+++ b/testsuites/libtests/dl06/initimpl.h
@@ -98,7 +98,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES   (RTEMS_DEFAULT_ATTRIBUTES | 
RTEMS_FLOATING_POINT)
 
diff --git a/testsuites/libtests/dl07/init.c b/testsuites/libtests/dl07/init.c
index 42b3bed3fc..8db106ba29 100644
--- a/testsuites/libtests/dl07/init.c
+++ b/testsuites/libtests/dl07/init.c
@@ -100,7 +100,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES   (RTEMS_DEFAULT_ATTRIBUTES | 
RTEMS_FLOATING_POINT)
 
diff --git a/testsuites/libtests/dl08/init.c b/testsuites/libtests/dl08/init.c
index 02f999e0c6..23ebe41d63 100644
--- a/testsuites/libtests/dl08/init.c
+++ b/testsuites/libtests/dl08/init.c
@@ -100,7 +100,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES   (RTEMS_DEFAULT_ATTRIBUTES | 
RTEMS_FLOATING_POINT)
 
diff --git a/testsuites/libtests/dl09/init.c b/testsuites/libtests/dl09/init.c
index e8caf9b6e8..b375fe3f38 100644
--- a/testsuites/libtests/dl09/init.c
+++ b/testsuites/libtests/dl09/init.c
@@ -100,7 +100,7 @@ static void Init(rtems_task_argument arg)
 
 #define 

[PATCH v3 3/5] cpukit/libdl: Add support for AArch64

2022-07-28 Thread Ryan Long
rtl-mdreloc-aarch64.c and elf_machdep.h came from NetBSD.

Updates #4682
---
 cpukit/libdl/rtl-mdreloc-aarch64.c| 598 ++
 .../cpu/aarch64/include/machine/elf_machdep.h | 256 
 spec/build/cpukit/objdl.yml   |   2 +
 spec/build/cpukit/objdlaarch64.yml|  15 +
 spec/build/cpukit/optlibdl.yml|   1 +
 5 files changed, 872 insertions(+)
 create mode 100644 cpukit/libdl/rtl-mdreloc-aarch64.c
 create mode 100644 cpukit/score/cpu/aarch64/include/machine/elf_machdep.h
 create mode 100644 spec/build/cpukit/objdlaarch64.yml

diff --git a/cpukit/libdl/rtl-mdreloc-aarch64.c 
b/cpukit/libdl/rtl-mdreloc-aarch64.c
new file mode 100644
index 00..3b1bbff2d2
--- /dev/null
+++ b/cpukit/libdl/rtl-mdreloc-aarch64.c
@@ -0,0 +1,598 @@
+/*
+ * Taken from NetBSD and stripped of the relocations not needed on RTEMS.
+ */
+
+/* $NetBSD: mdreloc.c,v 1.14 2020/06/16 21:01:30 joerg Exp $ */
+
+/*-
+ * Copyright (c) 2014 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas of 3am Software Foundry.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*-
+ * Copyright (c) 2014-2015 The FreeBSD Foundation
+ * All rights reserved.
+ *
+ * Portions of this software were developed by Andrew Turner
+ * under sponsorship from the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+#ifndef lint
+__RCSID("$NetBSD: mdreloc.c,v 1.14 2020/06/16 21:01:30 joerg Exp $");
+#endif /* not lint */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include "rtl-elf.h"
+#include "rtl-error.h"
+#include 
+#include "rtl-unwind.h"
+
+typedef unsigned _Unwind_Word __attribute__((__mode__(__word__)));
+typedef _Unwind_Word _uw;
+
+struct tls_data {
+  size_ttd_tlsindex;
+  Elf_Addr  td_tlsoffs;
+};
+
+rtems_rtl_elf_rel_status
+rtems_rtl_elf_reloc_rela (
+  rtems_rtl_obj*obj,
+  const Elf_Rela*   rela,
+  const rtems_rtl_obj_sect* sect,
+  const char*   symname,
+  const Elf_Bytesyminfo,
+  const Elf_Wordsymvalue,
+  const boolparsing
+);
+
+#define __BITS(hi,lo) ((~((~(Elf_Addr)0)<<((hi)+1)))&((~(Elf_Addr)0)<<(lo)))
+#define WIDTHMASK(w) (0xUL >> (64 - (w)))
+
+static inline bool
+checkoverflow(Elf_Addr addr, int 

[PATCH v3 5/5] cpukit/libdl/rtl-sym.c: Fix increment of variable

2022-07-28 Thread Ryan Long
In rtems_rtl_symbol_global_add() the loop that gets to the end of the symbol
table used "unsigned long" to increment the index for the table. For most
architectures this resulted in 4, but with AArch64, it results in 8. This
resulted in the symbols being read in wrong. Changing this to void* along with
changing the RISC-V specific code for 8 byte pointers in rtems-tools to work
independent of the architecture.

Updates #4673
Closes #4682
---
 cpukit/libdl/rtl-sym.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/libdl/rtl-sym.c b/cpukit/libdl/rtl-sym.c
index c29c8c49d6..5c9c3981df 100644
--- a/cpukit/libdl/rtl-sym.c
+++ b/cpukit/libdl/rtl-sym.c
@@ -124,7 +124,7 @@ rtems_rtl_symbol_global_add (rtems_rtl_obj*   obj,
   return false;
 }
 ++count;
-s += l + sizeof (unsigned long) + 1;
+s += l + sizeof (void *) + 1;
   }
 
   /*
-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v3 2/5] libdl/rtl-elf.h: Fix aarch64 define

2022-07-28 Thread Ryan Long
The aarch64 define was incorrect. This was causing the libdl tests to not
work correctly.

Updates #4682
---
 cpukit/libdl/rtl-elf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/libdl/rtl-elf.h b/cpukit/libdl/rtl-elf.h
index c7c17c525a..0476c1ecd7 100644
--- a/cpukit/libdl/rtl-elf.h
+++ b/cpukit/libdl/rtl-elf.h
@@ -51,7 +51,7 @@ extern "C" {
 /*
  * Do not add '()'. Leave plain.
  */
-#if defined(__powerpc64__) || defined(__arch64__) || (__riscv_xlen == 64)
+#if defined(__powerpc64__) || defined(__aarch64__) || (__riscv_xlen == 64)
 #define ELFSIZE 64
 #else
 #define ELFSIZE 32
-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH v2 0/5] Add AArch64 support to libdl

2022-07-27 Thread Ryan Long



On 7/25/2022 10:48 PM, Chris Johns wrote:

On 26/7/2022 12:06 am, Ryan Long wrote:

In this version of the patchset I converted the tabs to spaces in
rtl-mdreloc-aarch64.c.

I think setting the loader to NULL is a bug.


I removed it from rtl-mdreloc-arm.c, and ran dl05. It still passed. So 
should I just take this line out, and keep it out when I refactor the code?





I didn't address some of the other issues in rtl-mdreloc-aarch64.c due to the
code being copied from rtl-mdreloc-arm.c. I can pull out the shared code from
the two files in a follow up patch.

I see you close the #4682. What about keeping it open to track this?

I created a new ticket that'll be for refactoring the code.


Chris

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v2 1/5] sys/exec_elf.h: Bring in newer file

2022-07-25 Thread Ryan Long
Updated this file with the newer version in NetBSD.

Updates #4682
---
 cpukit/include/sys/exec_elf.h | 840 --
 1 file changed, 608 insertions(+), 232 deletions(-)

diff --git a/cpukit/include/sys/exec_elf.h b/cpukit/include/sys/exec_elf.h
index 4242415f54..b50da6b272 100644
--- a/cpukit/include/sys/exec_elf.h
+++ b/cpukit/include/sys/exec_elf.h
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_elf.h,v 1.102 2010/03/01 11:27:29 skrll Exp $ */
+/* $NetBSD: exec_elf.h,v 1.168 2020/10/19 19:33:02 christos Exp $  */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -44,6 +44,7 @@
 #include 
 #else
 #include 
+#include 
 #endif /* _KERNEL || _STANDALONE */
 
 #if defined(ELFSIZE)
@@ -60,49 +61,41 @@
 #include 
 #endif
 
-typedefuint8_t Elf_Byte;
-
-typedefuint32_tElf32_Addr;
-#defineELF32_FSZ_ADDR  4
-typedefuint32_tElf32_Off;
-typedefint32_t Elf32_SOff;
-#defineELF32_FSZ_OFF   4
-typedefint32_t Elf32_Sword;
-#defineELF32_FSZ_SWORD 4
-typedefuint32_tElf32_Word;
-#defineELF32_FSZ_WORD  4
-typedefuint16_tElf32_Half;
-#defineELF32_FSZ_HALF  2
-typedefuint64_tElf32_Lword;
-#defineELF32_FSZ_LWORD 8
-
-typedefuint64_tElf64_Addr;
-#defineELF64_FSZ_ADDR  8
-typedefuint64_tElf64_Off;
-typedefint64_t Elf64_SOff;
-#defineELF64_FSZ_OFF   8
-typedefint32_t Elf64_Shalf;
-#defineELF64_FSZ_SHALF 4
-
-#ifndef ELF64_FSZ_SWORD
-typedefint32_t Elf64_Sword;
-#defineELF64_FSZ_SWORD 4
-#endif /* ELF64_FSZ_SWORD */
-#ifndef ELF64_FSZ_WORD
-typedefuint32_tElf64_Word;
-#defineELF64_FSZ_WORD  4
-#endif /* ELF64_FSZ_WORD */
-
-typedefint64_t Elf64_Sxword;
-#defineELF64_FSZ_SXWORD 8
-typedefuint64_tElf64_Xword;
-#defineELF64_FSZ_XWORD 8
-typedefuint64_tElf64_Lword;
-#defineELF64_FSZ_LWORD 8
-typedefuint32_tElf64_Half;
-#defineELF64_FSZ_HALF  4
-typedefuint16_tElf64_Quarter;
-#defineELF64_FSZ_QUARTER 2
+typedef uint8_tElf_Byte;
+
+typedef uint32_t   Elf32_Addr;
+#define ELF32_FSZ_ADDR 4
+typedef uint32_t   Elf32_Off;
+typedef int32_tElf32_SOff;
+#define ELF32_FSZ_OFF  4
+typedef int32_tElf32_Sword;
+#define ELF32_FSZ_SWORD 4
+typedef uint32_t   Elf32_Word;
+#define ELF32_FSZ_WORD 4
+typedef uint16_t   Elf32_Half;
+#define ELF32_FSZ_HALF 2
+typedef uint64_t   Elf32_Lword;
+#define ELF32_FSZ_LWORD 8
+
+typedef uint64_t   Elf64_Addr;
+#define ELF64_FSZ_ADDR 8
+typedef uint64_t   Elf64_Off;
+typedef int64_tElf64_SOff;
+#define ELF64_FSZ_OFF  8
+
+typedef int32_tElf64_Sword;
+#define ELF64_FSZ_SWORD 4
+typedef uint32_t   Elf64_Word;
+#define ELF64_FSZ_WORD 4
+
+typedef int64_tElf64_Sxword;
+#define ELF64_FSZ_SXWORD 8
+typedef uint64_t   Elf64_Xword;
+#define ELF64_FSZ_XWORD 8
+typedef uint64_t   Elf64_Lword;
+#define ELF64_FSZ_LWORD 8
+typedef uint16_t   Elf64_Half;
+#define ELF64_FSZ_HALF 2
 
 /*
  * ELF Header
@@ -118,29 +111,29 @@ typedef struct {
Elf32_Off   e_phoff;/* Program hdr offset */
Elf32_Off   e_shoff;/* Section hdr offset */
Elf32_Word  e_flags;/* Processor flags */
-   Elf32_Half  e_ehsize;   /* sizeof ehdr */
-   Elf32_Half  e_phentsize;/* Program header entry size */
-   Elf32_Half  e_phnum;/* Number of program headers */
-   Elf32_Half  e_shentsize;/* Section header entry size */
-   Elf32_Half  e_shnum;/* Number of section headers */
-   Elf32_Half  e_shstrndx; /* String table index */
+   Elf32_Half  e_ehsize;   /* sizeof ehdr */
+   Elf32_Half  e_phentsize;/* Program header entry size */
+   Elf32_Half  e_phnum;/* Number of program headers */
+   Elf32_Half  e_shentsize;/* Section header entry size */
+   Elf32_Half  e_shnum;/* Number of section headers */
+   Elf32_Half  e_shstrndx; /* String table index */
 } Elf32_Ehdr;
 
 typedef struct {
unsigned char   e_ident[ELF_NIDENT];/* Id bytes */
-   Elf64_Quarter   e_type; /* file type */
-   Elf64_Quarter   e_machine;  /* machine type */
-   Elf64_Half  e_version;  /* version number */
+   Elf64_Half  e_type; /* file type */
+   Elf64_Half  e_machine;  /* machine type */
+   Elf64_Word  e_version;  /* version 

[PATCH v2 2/5] libdl/rtl-elf.h: Fix aarch64 define

2022-07-25 Thread Ryan Long
The aarch64 define was incorrect. This was causing the libdl tests to not
work correctly.

Updates #4682
---
 cpukit/libdl/rtl-elf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/libdl/rtl-elf.h b/cpukit/libdl/rtl-elf.h
index c7c17c525a..0476c1ecd7 100644
--- a/cpukit/libdl/rtl-elf.h
+++ b/cpukit/libdl/rtl-elf.h
@@ -51,7 +51,7 @@ extern "C" {
 /*
  * Do not add '()'. Leave plain.
  */
-#if defined(__powerpc64__) || defined(__arch64__) || (__riscv_xlen == 64)
+#if defined(__powerpc64__) || defined(__aarch64__) || (__riscv_xlen == 64)
 #define ELFSIZE 64
 #else
 #define ELFSIZE 32
-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v2 5/5] cpukit/libdl/rtl-sym.c: Fix increment of variable

2022-07-25 Thread Ryan Long
In rtems_rtl_symbol_global_add() the loop that gets to the end of the symbol
table used "unsigned long" to increment the index for the table. For most
architectures this resulted in 4, but with AArch64, it results in 8. This
resulted in the symbols being read in wrong. Changing this to void* along with
changing the RISC-V specific code for 8 byte pointers in rtems-tools to work
independent of the architecture.

Updates #4673
Closes #4682
---
 cpukit/libdl/rtl-sym.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/libdl/rtl-sym.c b/cpukit/libdl/rtl-sym.c
index c29c8c49d6..5c9c3981df 100644
--- a/cpukit/libdl/rtl-sym.c
+++ b/cpukit/libdl/rtl-sym.c
@@ -124,7 +124,7 @@ rtems_rtl_symbol_global_add (rtems_rtl_obj*   obj,
   return false;
 }
 ++count;
-s += l + sizeof (unsigned long) + 1;
+s += l + sizeof (void *) + 1;
   }
 
   /*
-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v2 3/5] cpukit/libdl: Add support for AArch64

2022-07-25 Thread Ryan Long
rtl-mdreloc-aarch64.c and elf_machdep.h came from NetBSD.

Updates #4682
---
 cpukit/libdl/rtl-mdreloc-aarch64.c| 599 ++
 .../cpu/aarch64/include/machine/elf_machdep.h | 256 
 spec/build/cpukit/objdl.yml   |   2 +
 spec/build/cpukit/objdlaarch64.yml|  15 +
 spec/build/cpukit/optlibdl.yml|   1 +
 5 files changed, 873 insertions(+)
 create mode 100644 cpukit/libdl/rtl-mdreloc-aarch64.c
 create mode 100644 cpukit/score/cpu/aarch64/include/machine/elf_machdep.h
 create mode 100644 spec/build/cpukit/objdlaarch64.yml

diff --git a/cpukit/libdl/rtl-mdreloc-aarch64.c 
b/cpukit/libdl/rtl-mdreloc-aarch64.c
new file mode 100644
index 00..41147e285c
--- /dev/null
+++ b/cpukit/libdl/rtl-mdreloc-aarch64.c
@@ -0,0 +1,599 @@
+/*
+ * Taken from NetBSD and stripped of the relocations not needed on RTEMS.
+ */
+
+/* $NetBSD: mdreloc.c,v 1.14 2020/06/16 21:01:30 joerg Exp $ */
+
+/*-
+ * Copyright (c) 2014 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas of 3am Software Foundry.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*-
+ * Copyright (c) 2014-2015 The FreeBSD Foundation
+ * All rights reserved.
+ *
+ * Portions of this software were developed by Andrew Turner
+ * under sponsorship from the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+#ifndef lint
+__RCSID("$NetBSD: mdreloc.c,v 1.14 2020/06/16 21:01:30 joerg Exp $");
+#endif /* not lint */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include "rtl-elf.h"
+#include "rtl-error.h"
+#include 
+#include "rtl-unwind.h"
+
+typedef unsigned _Unwind_Word __attribute__((__mode__(__word__)));
+typedef _Unwind_Word _uw;
+
+struct tls_data {
+  size_ttd_tlsindex;
+  Elf_Addr  td_tlsoffs;
+};
+
+rtems_rtl_elf_rel_status
+rtems_rtl_elf_reloc_rela (
+  rtems_rtl_obj*obj,
+  const Elf_Rela*   rela,
+  const rtems_rtl_obj_sect* sect,
+  const char*   symname,
+  const Elf_Bytesyminfo,
+  const Elf_Wordsymvalue,
+  const boolparsing
+);
+
+#define __BITS(hi,lo) ((~((~(Elf_Addr)0)<<((hi)+1)))&((~(Elf_Addr)0)<<(lo)))
+#define WIDTHMASK(w) (0xUL >> (64 - (w)))
+
+static inline bool
+checkoverflow(Elf_Addr addr, int 

[PATCH v2 0/5] Add AArch64 support to libdl

2022-07-25 Thread Ryan Long
Hi,

In this version of the patchset I converted the tabs to spaces in
rtl-mdreloc-aarch64.c.

I didn't address some of the other issues in rtl-mdreloc-aarch64.c due to the
code being copied from rtl-mdreloc-arm.c. I can pull out the shared code from
the two files in a follow up patch.

Thanks,
Ryan

Ryan Long (5):
  sys/exec_elf.h: Bring in newer file
  libdl/rtl-elf.h: Fix aarch64 define
  cpukit/libdl: Add support for AArch64
  libtests/dl*: Bump up the size of CONFIGURE_INIT_TASK_STACK_SIZE
  cpukit/libdl/rtl-sym.c: Fix increment of variable

 cpukit/include/sys/exec_elf.h | 840 +-
 cpukit/libdl/rtl-elf.h|   2 +-
 cpukit/libdl/rtl-mdreloc-aarch64.c| 599 +
 cpukit/libdl/rtl-sym.c|   2 +-
 .../cpu/aarch64/include/machine/elf_machdep.h | 256 ++
 spec/build/cpukit/objdl.yml   |   2 +
 spec/build/cpukit/objdlaarch64.yml|  15 +
 spec/build/cpukit/optlibdl.yml|   1 +
 testsuites/libtests/dl01/init.c   |   2 +-
 testsuites/libtests/dl02/init.c   |   2 +-
 testsuites/libtests/dl03/init.c   |   2 +-
 testsuites/libtests/dl04/init.c   |   2 +-
 testsuites/libtests/dl05/init.c   |   2 +-
 testsuites/libtests/dl06/initimpl.h   |   2 +-
 testsuites/libtests/dl07/init.c   |   2 +-
 testsuites/libtests/dl08/init.c   |   2 +-
 testsuites/libtests/dl09/init.c   |   2 +-
 testsuites/libtests/dl10/init.c   |   2 +-
 18 files changed, 1493 insertions(+), 244 deletions(-)
 create mode 100644 cpukit/libdl/rtl-mdreloc-aarch64.c
 create mode 100644 cpukit/score/cpu/aarch64/include/machine/elf_machdep.h
 create mode 100644 spec/build/cpukit/objdlaarch64.yml

-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v2 4/5] libtests/dl*: Bump up the size of CONFIGURE_INIT_TASK_STACK_SIZE

2022-07-25 Thread Ryan Long
Updates #4682
---
 testsuites/libtests/dl01/init.c | 2 +-
 testsuites/libtests/dl02/init.c | 2 +-
 testsuites/libtests/dl03/init.c | 2 +-
 testsuites/libtests/dl04/init.c | 2 +-
 testsuites/libtests/dl05/init.c | 2 +-
 testsuites/libtests/dl06/initimpl.h | 2 +-
 testsuites/libtests/dl07/init.c | 2 +-
 testsuites/libtests/dl08/init.c | 2 +-
 testsuites/libtests/dl09/init.c | 2 +-
 testsuites/libtests/dl10/init.c | 2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/testsuites/libtests/dl01/init.c b/testsuites/libtests/dl01/init.c
index 59cf3147f0..06fa8004b8 100644
--- a/testsuites/libtests/dl01/init.c
+++ b/testsuites/libtests/dl01/init.c
@@ -94,7 +94,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
 
diff --git a/testsuites/libtests/dl02/init.c b/testsuites/libtests/dl02/init.c
index 19563e9093..495a58d287 100644
--- a/testsuites/libtests/dl02/init.c
+++ b/testsuites/libtests/dl02/init.c
@@ -94,7 +94,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES   (RTEMS_DEFAULT_ATTRIBUTES | 
RTEMS_FLOATING_POINT)
 
diff --git a/testsuites/libtests/dl03/init.c b/testsuites/libtests/dl03/init.c
index 5080323c05..e953f1a4c6 100644
--- a/testsuites/libtests/dl03/init.c
+++ b/testsuites/libtests/dl03/init.c
@@ -80,7 +80,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES   (RTEMS_DEFAULT_ATTRIBUTES | 
RTEMS_FLOATING_POINT)
 
diff --git a/testsuites/libtests/dl04/init.c b/testsuites/libtests/dl04/init.c
index a733d9da14..54a852800d 100644
--- a/testsuites/libtests/dl04/init.c
+++ b/testsuites/libtests/dl04/init.c
@@ -94,7 +94,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
 
diff --git a/testsuites/libtests/dl05/init.c b/testsuites/libtests/dl05/init.c
index 93d69578f7..7e34af757d 100644
--- a/testsuites/libtests/dl05/init.c
+++ b/testsuites/libtests/dl05/init.c
@@ -96,7 +96,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (32U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (36U * 1024U)
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
 
diff --git a/testsuites/libtests/dl06/initimpl.h 
b/testsuites/libtests/dl06/initimpl.h
index 66e503b156..0d3987983d 100644
--- a/testsuites/libtests/dl06/initimpl.h
+++ b/testsuites/libtests/dl06/initimpl.h
@@ -98,7 +98,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES   (RTEMS_DEFAULT_ATTRIBUTES | 
RTEMS_FLOATING_POINT)
 
diff --git a/testsuites/libtests/dl07/init.c b/testsuites/libtests/dl07/init.c
index 42b3bed3fc..8db106ba29 100644
--- a/testsuites/libtests/dl07/init.c
+++ b/testsuites/libtests/dl07/init.c
@@ -100,7 +100,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES   (RTEMS_DEFAULT_ATTRIBUTES | 
RTEMS_FLOATING_POINT)
 
diff --git a/testsuites/libtests/dl08/init.c b/testsuites/libtests/dl08/init.c
index 02f999e0c6..23ebe41d63 100644
--- a/testsuites/libtests/dl08/init.c
+++ b/testsuites/libtests/dl08/init.c
@@ -100,7 +100,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES   (RTEMS_DEFAULT_ATTRIBUTES | 
RTEMS_FLOATING_POINT)
 
diff --git a/testsuites/libtests/dl09/init.c b/testsuites/libtests/dl09/init.c
index e8caf9b6e8..b375fe3f38 100644
--- a/testsuites/libtests/dl09/init.c
+++ b/testsuites/libtests/dl09/init.c
@@ -100,7 +100,7 @@ static void Init(rtems_task_argument arg)
 
 #define 

Re: [PATCH v1 3/5] cpukit/libdl: Add support for AArch64

2022-07-21 Thread Ryan Long



On 7/20/2022 11:39 PM, Chris Johns wrote:

On 21/7/2022 7:36 am, Ryan Long wrote:

rtl-mdreloc-aarch64.c and elf_machdep.h came from NetBSD.

Updates #4682
---
  cpukit/libdl/rtl-mdreloc-aarch64.c| 598 ++
  .../cpu/aarch64/include/machine/elf_machdep.h | 256 
  spec/build/cpukit/objdl.yml   |   2 +
  spec/build/cpukit/objdlaarch64.yml|  15 +
  spec/build/cpukit/optlibdl.yml|   1 +
  5 files changed, 872 insertions(+)
  create mode 100644 cpukit/libdl/rtl-mdreloc-aarch64.c
  create mode 100644 cpukit/score/cpu/aarch64/include/machine/elf_machdep.h
  create mode 100644 spec/build/cpukit/objdlaarch64.yml

diff --git a/cpukit/libdl/rtl-mdreloc-aarch64.c 
b/cpukit/libdl/rtl-mdreloc-aarch64.c
new file mode 100644
index 00..ded73ad46b
--- /dev/null
+++ b/cpukit/libdl/rtl-mdreloc-aarch64.c
@@ -0,0 +1,598 @@
+/*
+ * Taken from NetBSD and stripped of the relocations not needed on RTEMS.
+ */
+
+/* $NetBSD: mdreloc.c,v 1.14 2020/06/16 21:01:30 joerg Exp $ */
+
+/*-
+ * Copyright (c) 2014 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas of 3am Software Foundry.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*-
+ * Copyright (c) 2014-2015 The FreeBSD Foundation
+ * All rights reserved.
+ *
+ * Portions of this software were developed by Andrew Turner
+ * under sponsorship from the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+#ifndef lint
+__RCSID("$NetBSD: mdreloc.c,v 1.14 2020/06/16 21:01:30 joerg Exp $");
+#endif /* not lint */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include "rtl-elf.h"
+#include "rtl-error.h"
+#include 
+#include "rtl-unwind.h"
+
+typedef unsigned _Unwind_Word __attribute__((__mode__(__word__)));
+typedef _Unwind_Word _uw;
+
+struct tls_data {
+   size_t  td_tlsindex;
+   Elf_Addrtd_tlsoffs;
+};
+
+rtems_rtl_elf_rel_status
+rtems_rtl_elf_reloc_rela (
+  rtems_rtl_obj*obj,
+  const Elf_Rela*   rela,
+  const rtems_rtl_obj_sect* sect,
+  const char*   symname,
+  const Elf_Bytesyminfo,
+  const Elf_Wordsymvalue,
+  const boolparsing
+);
+
+#define __BITS(hi,lo)((~((~(Elf_

[PATCH v1 3/5] cpukit/libdl: Add support for AArch64

2022-07-20 Thread Ryan Long
rtl-mdreloc-aarch64.c and elf_machdep.h came from NetBSD.

Updates #4682
---
 cpukit/libdl/rtl-mdreloc-aarch64.c| 598 ++
 .../cpu/aarch64/include/machine/elf_machdep.h | 256 
 spec/build/cpukit/objdl.yml   |   2 +
 spec/build/cpukit/objdlaarch64.yml|  15 +
 spec/build/cpukit/optlibdl.yml|   1 +
 5 files changed, 872 insertions(+)
 create mode 100644 cpukit/libdl/rtl-mdreloc-aarch64.c
 create mode 100644 cpukit/score/cpu/aarch64/include/machine/elf_machdep.h
 create mode 100644 spec/build/cpukit/objdlaarch64.yml

diff --git a/cpukit/libdl/rtl-mdreloc-aarch64.c 
b/cpukit/libdl/rtl-mdreloc-aarch64.c
new file mode 100644
index 00..ded73ad46b
--- /dev/null
+++ b/cpukit/libdl/rtl-mdreloc-aarch64.c
@@ -0,0 +1,598 @@
+/*
+ * Taken from NetBSD and stripped of the relocations not needed on RTEMS.
+ */
+
+/* $NetBSD: mdreloc.c,v 1.14 2020/06/16 21:01:30 joerg Exp $ */
+
+/*-
+ * Copyright (c) 2014 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Matt Thomas of 3am Software Foundry.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*-
+ * Copyright (c) 2014-2015 The FreeBSD Foundation
+ * All rights reserved.
+ *
+ * Portions of this software were developed by Andrew Turner
+ * under sponsorship from the FreeBSD Foundation.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+#ifndef lint
+__RCSID("$NetBSD: mdreloc.c,v 1.14 2020/06/16 21:01:30 joerg Exp $");
+#endif /* not lint */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include "rtl-elf.h"
+#include "rtl-error.h"
+#include 
+#include "rtl-unwind.h"
+
+typedef unsigned _Unwind_Word __attribute__((__mode__(__word__)));
+typedef _Unwind_Word _uw;
+
+struct tls_data {
+   size_t  td_tlsindex;
+   Elf_Addrtd_tlsoffs;
+};
+
+rtems_rtl_elf_rel_status
+rtems_rtl_elf_reloc_rela (
+  rtems_rtl_obj*obj,
+  const Elf_Rela*   rela,
+  const rtems_rtl_obj_sect* sect,
+  const char*   symname,
+  const Elf_Bytesyminfo,
+  const Elf_Wordsymvalue,
+  const boolparsing
+);
+
+#define __BITS(hi,lo)((~((~(Elf_Addr)0)<<((hi)+1)))&((~(Elf_Addr)0)<<(lo)))
+#define WIDTHMASK(w)  (0xUL >> (64 - (w)))
+
+static inline bool

[PATCH v1 5/5] cpukit/libdl/rtl-sym.c: Fix increment of variable

2022-07-20 Thread Ryan Long
In rtems_rtl_symbol_global_add() the loop that gets to the end of the symbol
table used "unsigned long" to increment the index for the table. For most
architectures this resulted in 4, but with AArch64, it results in 8. This
resulted in the symbols being read in wrong. Changing this to void* along with
changing the RISC-V specific code for 8 byte pointers in rtems-tools to work
independent of the architecture.

Updates #4673
Closes #4682
---
 cpukit/libdl/rtl-sym.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/libdl/rtl-sym.c b/cpukit/libdl/rtl-sym.c
index c29c8c49d6..5c9c3981df 100644
--- a/cpukit/libdl/rtl-sym.c
+++ b/cpukit/libdl/rtl-sym.c
@@ -124,7 +124,7 @@ rtems_rtl_symbol_global_add (rtems_rtl_obj*   obj,
   return false;
 }
 ++count;
-s += l + sizeof (unsigned long) + 1;
+s += l + sizeof (void *) + 1;
   }
 
   /*
-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v1 1/5] sys/exec_elf.h: Bring in newer file

2022-07-20 Thread Ryan Long
Updated this file with the newer version in NetBSD.

Updates #4682
---
 cpukit/include/sys/exec_elf.h | 840 --
 1 file changed, 608 insertions(+), 232 deletions(-)

diff --git a/cpukit/include/sys/exec_elf.h b/cpukit/include/sys/exec_elf.h
index 4242415f54..b50da6b272 100644
--- a/cpukit/include/sys/exec_elf.h
+++ b/cpukit/include/sys/exec_elf.h
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_elf.h,v 1.102 2010/03/01 11:27:29 skrll Exp $ */
+/* $NetBSD: exec_elf.h,v 1.168 2020/10/19 19:33:02 christos Exp $  */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -44,6 +44,7 @@
 #include 
 #else
 #include 
+#include 
 #endif /* _KERNEL || _STANDALONE */
 
 #if defined(ELFSIZE)
@@ -60,49 +61,41 @@
 #include 
 #endif
 
-typedefuint8_t Elf_Byte;
-
-typedefuint32_tElf32_Addr;
-#defineELF32_FSZ_ADDR  4
-typedefuint32_tElf32_Off;
-typedefint32_t Elf32_SOff;
-#defineELF32_FSZ_OFF   4
-typedefint32_t Elf32_Sword;
-#defineELF32_FSZ_SWORD 4
-typedefuint32_tElf32_Word;
-#defineELF32_FSZ_WORD  4
-typedefuint16_tElf32_Half;
-#defineELF32_FSZ_HALF  2
-typedefuint64_tElf32_Lword;
-#defineELF32_FSZ_LWORD 8
-
-typedefuint64_tElf64_Addr;
-#defineELF64_FSZ_ADDR  8
-typedefuint64_tElf64_Off;
-typedefint64_t Elf64_SOff;
-#defineELF64_FSZ_OFF   8
-typedefint32_t Elf64_Shalf;
-#defineELF64_FSZ_SHALF 4
-
-#ifndef ELF64_FSZ_SWORD
-typedefint32_t Elf64_Sword;
-#defineELF64_FSZ_SWORD 4
-#endif /* ELF64_FSZ_SWORD */
-#ifndef ELF64_FSZ_WORD
-typedefuint32_tElf64_Word;
-#defineELF64_FSZ_WORD  4
-#endif /* ELF64_FSZ_WORD */
-
-typedefint64_t Elf64_Sxword;
-#defineELF64_FSZ_SXWORD 8
-typedefuint64_tElf64_Xword;
-#defineELF64_FSZ_XWORD 8
-typedefuint64_tElf64_Lword;
-#defineELF64_FSZ_LWORD 8
-typedefuint32_tElf64_Half;
-#defineELF64_FSZ_HALF  4
-typedefuint16_tElf64_Quarter;
-#defineELF64_FSZ_QUARTER 2
+typedef uint8_tElf_Byte;
+
+typedef uint32_t   Elf32_Addr;
+#define ELF32_FSZ_ADDR 4
+typedef uint32_t   Elf32_Off;
+typedef int32_tElf32_SOff;
+#define ELF32_FSZ_OFF  4
+typedef int32_tElf32_Sword;
+#define ELF32_FSZ_SWORD 4
+typedef uint32_t   Elf32_Word;
+#define ELF32_FSZ_WORD 4
+typedef uint16_t   Elf32_Half;
+#define ELF32_FSZ_HALF 2
+typedef uint64_t   Elf32_Lword;
+#define ELF32_FSZ_LWORD 8
+
+typedef uint64_t   Elf64_Addr;
+#define ELF64_FSZ_ADDR 8
+typedef uint64_t   Elf64_Off;
+typedef int64_tElf64_SOff;
+#define ELF64_FSZ_OFF  8
+
+typedef int32_tElf64_Sword;
+#define ELF64_FSZ_SWORD 4
+typedef uint32_t   Elf64_Word;
+#define ELF64_FSZ_WORD 4
+
+typedef int64_tElf64_Sxword;
+#define ELF64_FSZ_SXWORD 8
+typedef uint64_t   Elf64_Xword;
+#define ELF64_FSZ_XWORD 8
+typedef uint64_t   Elf64_Lword;
+#define ELF64_FSZ_LWORD 8
+typedef uint16_t   Elf64_Half;
+#define ELF64_FSZ_HALF 2
 
 /*
  * ELF Header
@@ -118,29 +111,29 @@ typedef struct {
Elf32_Off   e_phoff;/* Program hdr offset */
Elf32_Off   e_shoff;/* Section hdr offset */
Elf32_Word  e_flags;/* Processor flags */
-   Elf32_Half  e_ehsize;   /* sizeof ehdr */
-   Elf32_Half  e_phentsize;/* Program header entry size */
-   Elf32_Half  e_phnum;/* Number of program headers */
-   Elf32_Half  e_shentsize;/* Section header entry size */
-   Elf32_Half  e_shnum;/* Number of section headers */
-   Elf32_Half  e_shstrndx; /* String table index */
+   Elf32_Half  e_ehsize;   /* sizeof ehdr */
+   Elf32_Half  e_phentsize;/* Program header entry size */
+   Elf32_Half  e_phnum;/* Number of program headers */
+   Elf32_Half  e_shentsize;/* Section header entry size */
+   Elf32_Half  e_shnum;/* Number of section headers */
+   Elf32_Half  e_shstrndx; /* String table index */
 } Elf32_Ehdr;
 
 typedef struct {
unsigned char   e_ident[ELF_NIDENT];/* Id bytes */
-   Elf64_Quarter   e_type; /* file type */
-   Elf64_Quarter   e_machine;  /* machine type */
-   Elf64_Half  e_version;  /* version number */
+   Elf64_Half  e_type; /* file type */
+   Elf64_Half  e_machine;  /* machine type */
+   Elf64_Word  e_version;  /* version 

[PATCH v1 0/5] Add AArch64 support to libdl

2022-07-20 Thread Ryan Long
Hi,

This series of patches adds support for AArch64 in libdl and makes some small
tweaks to get the dynamic loader tests working.

Thanks,
Ryan

Ryan Long (5):
  sys/exec_elf.h: Bring in newer file
  libdl/rtl-elf.h: Fix aarch64 define
  cpukit/libdl: Add support for AArch64
  libtests/dl*: Bump up the size of CONFIGURE_INIT_TASK_STACK_SIZE
  cpukit/libdl/rtl-sym.c: Fix increment of variable

 cpukit/include/sys/exec_elf.h | 840 +-
 cpukit/libdl/rtl-elf.h|   2 +-
 cpukit/libdl/rtl-mdreloc-aarch64.c| 598 +
 cpukit/libdl/rtl-sym.c|   2 +-
 .../cpu/aarch64/include/machine/elf_machdep.h | 256 ++
 spec/build/cpukit/objdl.yml   |   2 +
 spec/build/cpukit/objdlaarch64.yml|  15 +
 spec/build/cpukit/optlibdl.yml|   1 +
 testsuites/libtests/dl01/init.c   |   2 +-
 testsuites/libtests/dl02/init.c   |   2 +-
 testsuites/libtests/dl03/init.c   |   2 +-
 testsuites/libtests/dl04/init.c   |   2 +-
 testsuites/libtests/dl05/init.c   |   2 +-
 testsuites/libtests/dl06/initimpl.h   |   2 +-
 testsuites/libtests/dl07/init.c   |   2 +-
 testsuites/libtests/dl08/init.c   |   2 +-
 testsuites/libtests/dl09/init.c   |   2 +-
 testsuites/libtests/dl10/init.c   |   2 +-
 18 files changed, 1492 insertions(+), 244 deletions(-)
 create mode 100644 cpukit/libdl/rtl-mdreloc-aarch64.c
 create mode 100644 cpukit/score/cpu/aarch64/include/machine/elf_machdep.h
 create mode 100644 spec/build/cpukit/objdlaarch64.yml

-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v1 2/5] libdl/rtl-elf.h: Fix aarch64 define

2022-07-20 Thread Ryan Long
The aarch64 define was incorrect. This was causing the libdl tests to not
work correctly.

Updates #4682
---
 cpukit/libdl/rtl-elf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/libdl/rtl-elf.h b/cpukit/libdl/rtl-elf.h
index c7c17c525a..0476c1ecd7 100644
--- a/cpukit/libdl/rtl-elf.h
+++ b/cpukit/libdl/rtl-elf.h
@@ -51,7 +51,7 @@ extern "C" {
 /*
  * Do not add '()'. Leave plain.
  */
-#if defined(__powerpc64__) || defined(__arch64__) || (__riscv_xlen == 64)
+#if defined(__powerpc64__) || defined(__aarch64__) || (__riscv_xlen == 64)
 #define ELFSIZE 64
 #else
 #define ELFSIZE 32
-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v1 4/5] libtests/dl*: Bump up the size of CONFIGURE_INIT_TASK_STACK_SIZE

2022-07-20 Thread Ryan Long
Updates #4682
---
 testsuites/libtests/dl01/init.c | 2 +-
 testsuites/libtests/dl02/init.c | 2 +-
 testsuites/libtests/dl03/init.c | 2 +-
 testsuites/libtests/dl04/init.c | 2 +-
 testsuites/libtests/dl05/init.c | 2 +-
 testsuites/libtests/dl06/initimpl.h | 2 +-
 testsuites/libtests/dl07/init.c | 2 +-
 testsuites/libtests/dl08/init.c | 2 +-
 testsuites/libtests/dl09/init.c | 2 +-
 testsuites/libtests/dl10/init.c | 2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/testsuites/libtests/dl01/init.c b/testsuites/libtests/dl01/init.c
index 59cf3147f0..06fa8004b8 100644
--- a/testsuites/libtests/dl01/init.c
+++ b/testsuites/libtests/dl01/init.c
@@ -94,7 +94,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
 
diff --git a/testsuites/libtests/dl02/init.c b/testsuites/libtests/dl02/init.c
index 19563e9093..495a58d287 100644
--- a/testsuites/libtests/dl02/init.c
+++ b/testsuites/libtests/dl02/init.c
@@ -94,7 +94,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES   (RTEMS_DEFAULT_ATTRIBUTES | 
RTEMS_FLOATING_POINT)
 
diff --git a/testsuites/libtests/dl03/init.c b/testsuites/libtests/dl03/init.c
index 5080323c05..e953f1a4c6 100644
--- a/testsuites/libtests/dl03/init.c
+++ b/testsuites/libtests/dl03/init.c
@@ -80,7 +80,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES   (RTEMS_DEFAULT_ATTRIBUTES | 
RTEMS_FLOATING_POINT)
 
diff --git a/testsuites/libtests/dl04/init.c b/testsuites/libtests/dl04/init.c
index a733d9da14..54a852800d 100644
--- a/testsuites/libtests/dl04/init.c
+++ b/testsuites/libtests/dl04/init.c
@@ -94,7 +94,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
 
diff --git a/testsuites/libtests/dl05/init.c b/testsuites/libtests/dl05/init.c
index 93d69578f7..7e34af757d 100644
--- a/testsuites/libtests/dl05/init.c
+++ b/testsuites/libtests/dl05/init.c
@@ -96,7 +96,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (32U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (36U * 1024U)
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
 
diff --git a/testsuites/libtests/dl06/initimpl.h 
b/testsuites/libtests/dl06/initimpl.h
index 66e503b156..0d3987983d 100644
--- a/testsuites/libtests/dl06/initimpl.h
+++ b/testsuites/libtests/dl06/initimpl.h
@@ -98,7 +98,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES   (RTEMS_DEFAULT_ATTRIBUTES | 
RTEMS_FLOATING_POINT)
 
diff --git a/testsuites/libtests/dl07/init.c b/testsuites/libtests/dl07/init.c
index 42b3bed3fc..8db106ba29 100644
--- a/testsuites/libtests/dl07/init.c
+++ b/testsuites/libtests/dl07/init.c
@@ -100,7 +100,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES   (RTEMS_DEFAULT_ATTRIBUTES | 
RTEMS_FLOATING_POINT)
 
diff --git a/testsuites/libtests/dl08/init.c b/testsuites/libtests/dl08/init.c
index 02f999e0c6..23ebe41d63 100644
--- a/testsuites/libtests/dl08/init.c
+++ b/testsuites/libtests/dl08/init.c
@@ -100,7 +100,7 @@ static void Init(rtems_task_argument arg)
 
 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
 
-#define CONFIGURE_INIT_TASK_STACK_SIZE (8U * 1024U)
+#define CONFIGURE_INIT_TASK_STACK_SIZE (CONFIGURE_MINIMUM_TASK_STACK_SIZE + 
(4U * 1024U))
 
 #define CONFIGURE_INIT_TASK_ATTRIBUTES   (RTEMS_DEFAULT_ATTRIBUTES | 
RTEMS_FLOATING_POINT)
 
diff --git a/testsuites/libtests/dl09/init.c b/testsuites/libtests/dl09/init.c
index e8caf9b6e8..b375fe3f38 100644
--- a/testsuites/libtests/dl09/init.c
+++ b/testsuites/libtests/dl09/init.c
@@ -100,7 +100,7 @@ static void Init(rtems_task_argument arg)
 
 #define 

Re: [PATCH] devel/spike-1.0.0: bump hash

2022-06-01 Thread Ryan Long



On 6/1/2022 7:36 AM, Gedare Bloom wrote:

What/Why did this change? Where we not using a release before?
I'm not sure. Their Github only shows two releases. One's from 2019 and 
the latest is from late 2021. The last time the hash was bumped was in 
2020 by Joel, so I'm guessing that was changing it to the 1.0.0 release, 
and this just bumps it to 1.1.0. Maybe it was in beta at the time.


Looks ok otherwise.

On Wed, May 25, 2022 at 12:31 PM Ryan Long  wrote:

Bump the hash of spike to match the 1.1.0 release

Closes #4660
---
  bare/config/devel/spike-1.1.0.cfg | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bare/config/devel/spike-1.1.0.cfg 
b/bare/config/devel/spike-1.1.0.cfg
index 644b754..73cf3c2 100644
--- a/bare/config/devel/spike-1.1.0.cfg
+++ b/bare/config/devel/spike-1.1.0.cfg
@@ -8,9 +8,9 @@

  %include %{_configdir}/base.cfg

-%define spike_version 66b44bfbedda562a32e4a2cd0716afbf731b69cd
+%define spike_version 530af85d83781a3dae31a4ace84a573ec255fefa

-%hash sha512 spike-%{spike_version}.tar.gz 
a98fc9e564edb3bb471f04063484a5d056befb8b2258b96de2d238cf27d1d5544c2782c91c7731b8f0aa03012eb3d39de33e4f30927349e38c7e131e8241b92f
+%hash sha512 spike-%{spike_version}.tar.gz 
D+9XugRwrZJ8undjx3x3CILr4VSdeaNsTTUZYeENFPZy6MG7TiQAY5umaUr/oOr6vWCq7YjFhqwjPI+fcieqYw==

  #
  # The spike build instructions. We use 1.x.x Release 1.
--
2.30.2

___
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


[PATCH] devel/spike-1.0.0: bump hash

2022-05-25 Thread Ryan Long
Bump the hash of spike to match the 1.1.0 release

Closes #4660
---
 bare/config/devel/spike-1.1.0.cfg | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bare/config/devel/spike-1.1.0.cfg 
b/bare/config/devel/spike-1.1.0.cfg
index 644b754..73cf3c2 100644
--- a/bare/config/devel/spike-1.1.0.cfg
+++ b/bare/config/devel/spike-1.1.0.cfg
@@ -8,9 +8,9 @@
 
 %include %{_configdir}/base.cfg
 
-%define spike_version 66b44bfbedda562a32e4a2cd0716afbf731b69cd
+%define spike_version 530af85d83781a3dae31a4ace84a573ec255fefa
 
-%hash sha512 spike-%{spike_version}.tar.gz 
a98fc9e564edb3bb471f04063484a5d056befb8b2258b96de2d238cf27d1d5544c2782c91c7731b8f0aa03012eb3d39de33e4f30927349e38c7e131e8241b92f
+%hash sha512 spike-%{spike_version}.tar.gz 
D+9XugRwrZJ8undjx3x3CILr4VSdeaNsTTUZYeENFPZy6MG7TiQAY5umaUr/oOr6vWCq7YjFhqwjPI+fcieqYw==
 
 #
 # The spike build instructions. We use 1.x.x Release 1.
-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: Issues building QEMU on Ubuntu

2022-05-25 Thread Ryan Long


On 5/24/2022 5:32 PM, Chris Johns wrote:

On 25/5/2022 12:47 am, Ryan Long wrote:

When building QEMU it goes through the entire build and it looks like it passes,
but it is failing. The only error that Joel and I saw in the output was this

Found ninja-1.10.1 at /usr/bin/ninja
+
LD_LIBRARY_PATH=/home/tester/rtems-cron-6/rtems-source-builder/bare/build/tmp/sb-1002/devel/qemu/home/tester/rtems-cron-6/tools/6/lib
make -j 8 all
/usr/bin/ninja  build.ninja && touch build.ninja.stamp
ninja: no work to do.
/usr/bin/python3 -B
/home/tester/rtems-cron-6/rtems-source-builder/bare/build/qemu-5.2.0-rc1-x86_64-linux-gnu-1/qemu-5.2.0-rc1/meson/meson.py
introspect --targets --tests --benchmarks | /usr/bin/python3 -B
scripts/mtest2make.py > Makefile.mtest
   BUILD   multiboot.img
   BUILD   linuxboot.img
   BUILD   linuxboot_dma.img
   BUILD   kvmvapic.img
ld: Error: unable to disambiguate: -no-pie (did you mean --no-pie ?)
ld: Error: unable to disambiguate: -no-pie (did you mean --no-pie ?)

Unless someone has any objections, I'm going to try the 5.2.0 release, and if
that doesn't work, I'm going to try bumping it to 6.2.0.

Which hosts are you testing builds on?


We have

- Ubuntu 21.04

- FreeBSD 12.2 and 13

    - QEMU doesn't build on either of these for me either

- CentOS 7

- CentOS Stream 8

- macOS (Big Sur)

    - I don't think QEMU built on here, but I can't get into the VM at 
the moment




My experience in the past has been all problems have related to support for
non-Linux hosts.

Chris

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Issues building QEMU on Ubuntu

2022-05-24 Thread Ryan Long
When building QEMU it goes through the entire build and it looks like it 
passes, but it is failing. The only error that Joel and I saw in the 
output was this


Found ninja-1.10.1 at /usr/bin/ninja
+ 
LD_LIBRARY_PATH=/home/tester/rtems-cron-6/rtems-source-builder/bare/build/tmp/sb-1002/devel/qemu/home/tester/rtems-cron-6/tools/6/lib 
make -j 8 all

/usr/bin/ninja  build.ninja && touch build.ninja.stamp
ninja: no work to do.
/usr/bin/python3 -B 
/home/tester/rtems-cron-6/rtems-source-builder/bare/build/qemu-5.2.0-rc1-x86_64-linux-gnu-1/qemu-5.2.0-rc1/meson/meson.py 
introspect --targets --tests --benchmarks | /usr/bin/python3 -B 
scripts/mtest2make.py > Makefile.mtest

  BUILD   multiboot.img
  BUILD   linuxboot.img
  BUILD   linuxboot_dma.img
  BUILD   kvmvapic.img
ld: Error: unable to disambiguate: -no-pie (did you mean --no-pie ?)
ld: Error: unable to disambiguate: -no-pie (did you mean --no-pie ?)

Unless someone has any objections, I'm going to try the 5.2.0 release, 
and if that doesn't work, I'm going to try bumping it to 6.2.0.


Thanks,

Ryan

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH v2 15/15] sp65/init.c: Add file header and license

2022-04-22 Thread Ryan Long
This file had no file header, copyright, or license. Based on git
history, added appropriate copyright and license.
---
 testsuites/sptests/sp65/init.c | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/testsuites/sptests/sp65/init.c b/testsuites/sptests/sp65/init.c
index 8360add..d074dc4 100644
--- a/testsuites/sptests/sp65/init.c
+++ b/testsuites/sptests/sp65/init.c
@@ -1 +1,16 @@
+/*
+ *  Copyright (C) 2009 Santosh G Vattam 
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 
SOFTWARE.
+ */
+
 #include "sp65impl.h"
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v2 11/15] ada/samples: Manually adding file headers and licenses

2022-04-22 Thread Ryan Long
These files had no file header, copyright, or license. Based on git
history, added appropriate copyright and license.
---
 testsuites/ada/samples/base_mp/node1/init.c | 33 +
 testsuites/ada/samples/base_mp/node2/init.c | 33 +
 2 files changed, 66 insertions(+)

diff --git a/testsuites/ada/samples/base_mp/node1/init.c 
b/testsuites/ada/samples/base_mp/node1/init.c
index 073c033..21dd58a 100644
--- a/testsuites/ada/samples/base_mp/node1/init.c
+++ b/testsuites/ada/samples/base_mp/node1/init.c
@@ -1,2 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @brief This is init for node1.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define CONFIGURE_MP_NODE_NUMBER 1
 #include "../../../support/init.c"
diff --git a/testsuites/ada/samples/base_mp/node2/init.c 
b/testsuites/ada/samples/base_mp/node2/init.c
index ea6db06..d5a8b78 100644
--- a/testsuites/ada/samples/base_mp/node2/init.c
+++ b/testsuites/ada/samples/base_mp/node2/init.c
@@ -1,2 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @brief This is init for node2.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define CONFIGURE_MP_NODE_NUMBER 2
 #include "../../../support/init.c"
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v2 14/15] sp47/init.c: Add file header and license

2022-04-22 Thread Ryan Long
This file had no header, copyright, or license. Based on git history,
added appropriate copyright and license.
---
 testsuites/sptests/sp47/init.c | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/testsuites/sptests/sp47/init.c b/testsuites/sptests/sp47/init.c
index c050347..50be401 100644
--- a/testsuites/sptests/sp47/init.c
+++ b/testsuites/sptests/sp47/init.c
@@ -1,4 +1,19 @@
 /*
+ *  Copyright (C) 2009 Nickolay Kolchin 
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 
SOFTWARE.
+ */
+
+/*
  *  Submitted as part of PR1357
  */
 
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v2 13/15] sp44/init.c: Add file header and license

2022-04-22 Thread Ryan Long
This file had no header, copyright, or license. Based on git history,
added appropriate copyright and license.
---
 testsuites/sptests/sp44/init.c | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/testsuites/sptests/sp44/init.c b/testsuites/sptests/sp44/init.c
index 7354618..d3255a9 100644
--- a/testsuites/sptests/sp44/init.c
+++ b/testsuites/sptests/sp44/init.c
@@ -1,4 +1,19 @@
 /*
+ *  Copyright (C) 2008 Xudong Guan 
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 
SOFTWARE.
+ */
+
+/*
  *  Original version submitted as part of PR1212
  *
  *  This example shows a possible blocking of timeslicing if task mode is
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v2 12/15] psxtmtests/psxtmcond*: Add file headers and licenses

2022-04-22 Thread Ryan Long
These files had no file header, copyright, or license. Based on git
history, added appropriate copyright and license.
---
 testsuites/psxtmtests/psxtmcond08/init.c | 15 +++
 testsuites/psxtmtests/psxtmcond09/init.c | 15 +++
 testsuites/psxtmtests/psxtmcond10/init.c | 15 +++
 3 files changed, 45 insertions(+)

diff --git a/testsuites/psxtmtests/psxtmcond08/init.c 
b/testsuites/psxtmtests/psxtmcond08/init.c
index c4fa914..d2dab86 100644
--- a/testsuites/psxtmtests/psxtmcond08/init.c
+++ b/testsuites/psxtmtests/psxtmcond08/init.c
@@ -1,2 +1,17 @@
+/*
+ *  Copyright (C) 2013 Christopher Kerl 
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 
SOFTWARE.
+ */
+
 #define USE_WAIT
 #include "psxtmcond08impl.h"
diff --git a/testsuites/psxtmtests/psxtmcond09/init.c 
b/testsuites/psxtmtests/psxtmcond09/init.c
index 5a40a7a..f08dc71 100644
--- a/testsuites/psxtmtests/psxtmcond09/init.c
+++ b/testsuites/psxtmtests/psxtmcond09/init.c
@@ -1,2 +1,17 @@
+/*
+ *  Copyright (C) 2013 Christopher Kerl 
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 
SOFTWARE.
+ */
+
 #define USE_TIMEDWAIT_WITH_VALUE
 #include "../psxtmcond08/psxtmcond08impl.h"
diff --git a/testsuites/psxtmtests/psxtmcond10/init.c 
b/testsuites/psxtmtests/psxtmcond10/init.c
index ba08dc1..74522ab 100644
--- a/testsuites/psxtmtests/psxtmcond10/init.c
+++ b/testsuites/psxtmtests/psxtmcond10/init.c
@@ -1,2 +1,17 @@
+/*
+ *  Copyright (C) 2013 Christopher Kerl 
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 
SOFTWARE.
+ */
+
 #define USE_TIMEDWAIT_WAIT_VALUE_IN_PAST
 #include "../psxtmcond08/psxtmcond08impl.h"
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v2 10/15] sptests/sp27*: Manually adding file headers and licenses

2022-04-22 Thread Ryan Long
These files had no file header, copyright, or license. Based on git
history, added appropriate copyright and license.
---
 testsuites/sptests/sp27/init.c  | 35 +++
 testsuites/sptests/sp27a/init.c | 35 +++
 2 files changed, 70 insertions(+)

diff --git a/testsuites/sptests/sp27/init.c b/testsuites/sptests/sp27/init.c
index c1e9ba5..3dfb2f6 100644
--- a/testsuites/sptests/sp27/init.c
+++ b/testsuites/sptests/sp27/init.c
@@ -1 +1,36 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup sptests
+ *
+ *  @brief This is init for sp27.
+ */
+
+/*
+ * Copyright (C) 1999 Eric Norum .
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include "sp27impl.h"
diff --git a/testsuites/sptests/sp27a/init.c b/testsuites/sptests/sp27a/init.c
index 23a5033..e9cdd27 100644
--- a/testsuites/sptests/sp27a/init.c
+++ b/testsuites/sptests/sp27a/init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup sptests
+ *
+ *  @brief This is init for sp27a.
+ */
+
+/*
+ * Copyright (C) 1999 Eric Norum .
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define USE_COUNTING_SEMAPHORE
 #include "../sp27/sp27impl.h"
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v2 09/15] libtests/dl06: Manually adding file headers and licenses.

2022-04-22 Thread Ryan Long
These files had no header, copyright, or license. Based on git history,
added appropriate copyright and license.
---
 testsuites/libtests/dl06/init.c | 35 +++
 testsuites/libtests/dl06/pre-init.c | 35 +++
 2 files changed, 70 insertions(+)

diff --git a/testsuites/libtests/dl06/init.c b/testsuites/libtests/dl06/init.c
index 413ebf0..65d1437 100644
--- a/testsuites/libtests/dl06/init.c
+++ b/testsuites/libtests/dl06/init.c
@@ -1 +1,36 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup libtests
+ *
+ *  @brief This is init for dl06.
+ */
+
+/*
+ * Copyright (C) 2018 Chris Johns .
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include "initimpl.h"
diff --git a/testsuites/libtests/dl06/pre-init.c 
b/testsuites/libtests/dl06/pre-init.c
index 6dc232a..0eeef9f 100644
--- a/testsuites/libtests/dl06/pre-init.c
+++ b/testsuites/libtests/dl06/pre-init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup libtests
+ *
+ *  @brief This is pre-init for dl06.
+ */
+
+/*
+ * Copyright (C) 2018 Chris Johns .
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define DL06_PRE 1
 #include "initimpl.h"
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v2 08/15] libdl: Manually adding file headers and licenses

2022-04-22 Thread Ryan Long
These files had no file header, copyright, or license. Chris identified
that these were made by him.

Updates #4521
---
 cpukit/libdl/rtl-mdreloc-bfin.c| 35 +++
 cpukit/libdl/rtl-mdreloc-lm32.c| 35 +++
 cpukit/libdl/rtl-mdreloc-mips.c| 35 +++
 cpukit/libdl/rtl-mdreloc-moxie.c   | 35 +++
 cpukit/libdl/rtl-mdreloc-powerpc.c | 35 +++
 cpukit/libdl/rtl-mdreloc-v850.c| 35 +++
 6 files changed, 210 insertions(+)

diff --git a/cpukit/libdl/rtl-mdreloc-bfin.c b/cpukit/libdl/rtl-mdreloc-bfin.c
index 27f865e..f46b86c 100644
--- a/cpukit/libdl/rtl-mdreloc-bfin.c
+++ b/cpukit/libdl/rtl-mdreloc-bfin.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup
+ *
+ *  @brief
+ */
+
+/*
+ * Copyright (C) 2014 Chris Johns .
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include 
 
 #include 
diff --git a/cpukit/libdl/rtl-mdreloc-lm32.c b/cpukit/libdl/rtl-mdreloc-lm32.c
index 4d47592..de06093 100644
--- a/cpukit/libdl/rtl-mdreloc-lm32.c
+++ b/cpukit/libdl/rtl-mdreloc-lm32.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup
+ *
+ *  @brief
+ */
+
+/*
+ * Copyright (C) 2014 Chris Johns .
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include 
 
 #include 
diff --git a/cpukit/libdl/rtl-mdreloc-mips.c b/cpukit/libdl/rtl-mdreloc-mips.c
index d96f150..d43b144 100644
--- a/cpukit/libdl/rtl-mdreloc-mips.c
+++ b/cpukit/libdl/rtl-mdreloc-mips.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup
+ *
+ *  @brief
+ */
+
+/*
+ * Copyright (C) 2014 Chris Johns .
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS 

[PATCH v2 06/15] samples: Manually adding file headers and licenses

2022-04-22 Thread Ryan Long
These files had no file header, copyright, or license. Based on git
history, added appropriate copyrights and licenses.
---
 testsuites/samples/base_mp/init1.c | 35 +++
 testsuites/samples/base_mp/init2.c | 35 +++
 testsuites/samples/nsecs/system.h  | 35 +++
 3 files changed, 105 insertions(+)

diff --git a/testsuites/samples/base_mp/init1.c 
b/testsuites/samples/base_mp/init1.c
index cfe033d..ee853b4 100644
--- a/testsuites/samples/base_mp/init1.c
+++ b/testsuites/samples/base_mp/init1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup samples
+ *
+ *  @brief This is init1 for base_mp.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define CONFIGURE_MP_NODE_NUMBER 1
 #include "initimpl.h"
diff --git a/testsuites/samples/base_mp/init2.c 
b/testsuites/samples/base_mp/init2.c
index 40c2c81..e1cff62 100644
--- a/testsuites/samples/base_mp/init2.c
+++ b/testsuites/samples/base_mp/init2.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup samples
+ *
+ *  @brief This is init2 for base_mp.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define CONFIGURE_MP_NODE_NUMBER 2
 #include "initimpl.h"
diff --git a/testsuites/samples/nsecs/system.h 
b/testsuites/samples/nsecs/system.h
index 31c17a4..b2d31e1 100644
--- a/testsuites/samples/nsecs/system.h
+++ b/testsuites/samples/nsecs/system.h
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup samples
+ *
+ *  @brief This is the system header file for nsecs.
+ */
+
+/*
+ * Copyright (C) 1989-2007 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the 

[PATCH v2 07/15] support: Manually adding file headers and licenses

2022-04-22 Thread Ryan Long
This file had no file header, copyright, or license. Based on git
history, added appropriate copyright and license.
---
 testsuites/support/include/buffer_test_io.h | 36 +
 1 file changed, 36 insertions(+)

diff --git a/testsuites/support/include/buffer_test_io.h 
b/testsuites/support/include/buffer_test_io.h
index f0eae50..840dd51 100644
--- a/testsuites/support/include/buffer_test_io.h
+++ b/testsuites/support/include/buffer_test_io.h
@@ -1,3 +1,39 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup support
+ *
+ *  @brief This is the buffer_test_io header file.
+ */
+
+/*
+ * Copyright (C) 1989-2011 On-Line Applications Research Corporation (OAR).
+ * Copyright (C) 2011 Chris Johns . All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 /*
  *  Support for running the test output through a buffer
  */
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v2 01/15] mptests: Manually adding file headers and licenses

2022-04-22 Thread Ryan Long
These files had no file header, copyright, or license. Based on git
history, added appropriate copyrights and licenses.
---
 testsuites/mptests/mp01/init1.c | 35 +++
 testsuites/mptests/mp01/init2.c | 35 +++
 testsuites/mptests/mp03/init1.c | 35 +++
 testsuites/mptests/mp03/init2.c | 35 +++
 testsuites/mptests/mp04/init1.c | 35 +++
 testsuites/mptests/mp04/init2.c | 35 +++
 testsuites/mptests/mp05/init1.c | 35 +++
 testsuites/mptests/mp05/init2.c | 35 +++
 testsuites/mptests/mp06/init1.c | 35 +++
 testsuites/mptests/mp06/init2.c | 35 +++
 testsuites/mptests/mp07/init1.c | 35 +++
 testsuites/mptests/mp07/init2.c | 35 +++
 testsuites/mptests/mp08/init1.c | 35 +++
 testsuites/mptests/mp08/init2.c | 35 +++
 testsuites/mptests/mp09/init1.c | 35 +++
 testsuites/mptests/mp09/init2.c | 35 +++
 testsuites/mptests/mp10/init1.c | 35 +++
 testsuites/mptests/mp10/init2.c | 35 +++
 testsuites/mptests/mp11/init1.c | 35 +++
 testsuites/mptests/mp11/init2.c | 35 +++
 testsuites/mptests/mp12/init1.c | 35 +++
 testsuites/mptests/mp12/init2.c | 35 +++
 testsuites/mptests/mp13/init1.c | 35 +++
 testsuites/mptests/mp13/init2.c | 35 +++
 testsuites/mptests/mp14/init1.c | 35 +++
 testsuites/mptests/mp14/init2.c | 35 +++
 26 files changed, 910 insertions(+)

diff --git a/testsuites/mptests/mp01/init1.c b/testsuites/mptests/mp01/init1.c
index cfe033d..16aeaea 100644
--- a/testsuites/mptests/mp01/init1.c
+++ b/testsuites/mptests/mp01/init1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup mptests
+ *
+ *  @brief This is init1 for mp01.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define CONFIGURE_MP_NODE_NUMBER 1
 #include "initimpl.h"
diff --git a/testsuites/mptests/mp01/init2.c b/testsuites/mptests/mp01/init2.c
index 40c2c81..5ea7af1 100644
--- a/testsuites/mptests/mp01/init2.c
+++ b/testsuites/mptests/mp01/init2.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup mptests
+ *
+ *  @brief This is init2 for mp01.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

[PATCH v2 05/15] psxtests: Adding file headers and licenses

2022-04-22 Thread Ryan Long
These files had no file header, copyright, or license. Based on git
history, added appropriate copyrights and licenses.
---
 testsuites/psxtests/psxchroot01/main.c | 35 ++
 testsuites/psxtests/psxfatal01/init.c  | 35 ++
 testsuites/psxtests/psxfatal02/init.c  | 35 ++
 testsuites/psxtests/psxmount/main.c| 35 ++
 testsuites/psxtests/psxreaddir/main.c  | 35 ++
 testsuites/psxtests/psxsignal03/init.c | 35 ++
 testsuites/psxtests/psxsignal04/init.c | 35 ++
 7 files changed, 245 insertions(+)

diff --git a/testsuites/psxtests/psxchroot01/main.c 
b/testsuites/psxtests/psxchroot01/main.c
index 2c1c489..ccb5609 100644
--- a/testsuites/psxtests/psxchroot01/main.c
+++ b/testsuites/psxtests/psxchroot01/main.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup psxtests
+ *
+ *  @brief This is main for psxchroot01.
+ */
+
+/*
+ * Copyright (C) 1989-2012 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 /*
  *  Simple test program -- simplified version of sample test hello.
  */
diff --git a/testsuites/psxtests/psxfatal01/init.c 
b/testsuites/psxtests/psxfatal01/init.c
index ffc5b35..8162b0e 100644
--- a/testsuites/psxtests/psxfatal01/init.c
+++ b/testsuites/psxtests/psxfatal01/init.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup psxtests
+ *
+ *  @brief This is init for psxfatal01.
+ */
+
+/*
+ * Copyright (C) 1989-2012 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
diff --git a/testsuites/psxtests/psxfatal02/init.c 
b/testsuites/psxtests/psxfatal02/init.c
index eaf9330..50dbd43 100644
--- a/testsuites/psxtests/psxfatal02/init.c
+++ b/testsuites/psxtests/psxfatal02/init.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup psxtests
+ *
+ *  @brief This is init for psxfatal02.
+ */
+
+/*
+ * Copyright (C) 1989-2012 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the 

[PATCH v2 04/15] libtests: Adding file headers and licenses

2022-04-22 Thread Ryan Long
These files had no file header, copyright, or license. Based on git
history, added appropriate copyrights and licenses.
---
 testsuites/libtests/mouse01/serial_mouse_config.c  | 35 ++
 .../libtests/termios04/termios_testdriver_intr.c   | 35 ++
 .../libtests/termios05/termios_testdriver_task.c   | 35 ++
 testsuites/libtests/termios10/init.c   | 35 ++
 testsuites/libtests/termios11/init.c   | 35 ++
 5 files changed, 175 insertions(+)

diff --git a/testsuites/libtests/mouse01/serial_mouse_config.c 
b/testsuites/libtests/mouse01/serial_mouse_config.c
index 798cbf3..7f74edb 100644
--- a/testsuites/libtests/mouse01/serial_mouse_config.c
+++ b/testsuites/libtests/mouse01/serial_mouse_config.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup libtests
+ *
+ *  @brief This is serial_mouse_config for mouse01.
+ */
+
+/*
+ * Copyright (C) 1989-2011 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 /*
  *
  * MODULE DESCRIPTION:
diff --git a/testsuites/libtests/termios04/termios_testdriver_intr.c 
b/testsuites/libtests/termios04/termios_testdriver_intr.c
index 5946c29..7d524ae 100644
--- a/testsuites/libtests/termios04/termios_testdriver_intr.c
+++ b/testsuites/libtests/termios04/termios_testdriver_intr.c
@@ -1 +1,36 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup libtests
+ *
+ *  @brief This is termios_testdriver_intr for termios04.
+ */
+
+/*
+ * Copyright (C) 1989-2012 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include "termios_testdriver_impl.h"
diff --git a/testsuites/libtests/termios05/termios_testdriver_task.c 
b/testsuites/libtests/termios05/termios_testdriver_task.c
index e1b3181..d38182c 100644
--- a/testsuites/libtests/termios05/termios_testdriver_task.c
+++ b/testsuites/libtests/termios05/termios_testdriver_task.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup libtests
+ *
+ *  @brief This is termios_testdriver_task for termios05.
+ */
+
+/*
+ * Copyright (C) 1989-2010 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided 

[PATCH v2 03/15] sptests: Manually adding file headers and licenses

2022-04-22 Thread Ryan Long
Theses files had no file header, copyright, or license. Based on git
history, added appropriate copyrights and licenses.
---
 testsuites/sptests/sp52/init.c | 35 ++
 testsuites/sptests/sp53/init.c | 35 ++
 testsuites/sptests/sp66/init.c | 35 ++
 testsuites/sptests/spcpuset01/init.c   | 35 ++
 testsuites/sptests/spcpuset01/test.c   | 35 ++
 testsuites/sptests/spfatal01/init.c| 35 ++
 testsuites/sptests/spfatal04/init.c| 35 ++
 testsuites/sptests/spintrcritical01/init.c | 35 ++
 testsuites/sptests/spintrcritical02/init.c | 35 ++
 testsuites/sptests/spintrcritical03/init.c | 35 ++
 testsuites/sptests/spintrcritical04/init.c | 35 ++
 testsuites/sptests/spintrcritical05/init.c | 35 ++
 testsuites/sptests/spintrcritical11/init.c | 35 ++
 testsuites/sptests/spintrcritical12/init.c | 35 ++
 testsuites/sptests/spintrcritical13/init.c | 35 ++
 testsuites/sptests/spintrcritical14/init.c | 35 ++
 16 files changed, 560 insertions(+)

diff --git a/testsuites/sptests/sp52/init.c b/testsuites/sptests/sp52/init.c
index 6cf79eb..d1c8662 100644
--- a/testsuites/sptests/sp52/init.c
+++ b/testsuites/sptests/sp52/init.c
@@ -1 +1,36 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup sptests
+ *
+ *  @brief This is the init for sp52.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include "sp52impl.h"
diff --git a/testsuites/sptests/sp53/init.c b/testsuites/sptests/sp53/init.c
index 3ff09bc..9a81e17 100644
--- a/testsuites/sptests/sp53/init.c
+++ b/testsuites/sptests/sp53/init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup sptests
+ *
+ *  @brief This is the init for sp53.
+ */
+
+/*
+ * Copyright (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define USE_TIMER_SERVER
 

[PATCH v2 02/15] tmtests: Manually adding file headers and licenses

2022-04-22 Thread Ryan Long
These files had no file header, copyright, or license. Based on git
history, added appropriate copyrights and licenses.
---
 testsuites/tmtests/tm02/task1.c | 35 +++
 testsuites/tmtests/tm03/task1.c | 35 +++
 testsuites/tmtests/tm31/task1.c | 35 +++
 testsuites/tmtests/tm32/task1.c | 35 +++
 testsuites/tmtests/tm33/task1.c | 35 +++
 testsuites/tmtests/tm34/task1.c | 35 +++
 testsuites/tmtests/tm35/task1.c | 35 +++
 testsuites/tmtests/tm36/task1.c | 35 +++
 8 files changed, 280 insertions(+)

diff --git a/testsuites/tmtests/tm02/task1.c b/testsuites/tmtests/tm02/task1.c
index c770390..9eb19d0 100644
--- a/testsuites/tmtests/tm02/task1.c
+++ b/testsuites/tmtests/tm02/task1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup tmtests
+ *
+ *  @brief This is task1 for the tm02 test.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define TM02
 #include "tm02impl.h"
diff --git a/testsuites/tmtests/tm03/task1.c b/testsuites/tmtests/tm03/task1.c
index 88c13f3..69e76ac 100644
--- a/testsuites/tmtests/tm03/task1.c
+++ b/testsuites/tmtests/tm03/task1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup tmtests
+ *
+ *  @brief This is task1 for the tm03 test.
+ */
+
+/*
+ * Copyright (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define TM03
 #include "tm03impl.h"
diff --git a/testsuites/tmtests/tm31/task1.c b/testsuites/tmtests/tm31/task1.c
index 158c2d3..1e26085 100644
--- a/testsuites/tmtests/tm31/task1.c
+++ b/testsuites/tmtests/tm31/task1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup tmtests
+ *
+ *  @brief This is task1 for the tm31 test.
+ */
+
+/*
+ * Copyright (C) 1989-2014 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above 

[PATCH 11/15] ada/samples: Manually adding file headers and licenses

2022-04-21 Thread Ryan Long
These files had no file header, copyright, or license. Based on git
history, added appropriate copyright and license.
---
 testsuites/ada/samples/base_mp/node1/init.c | 33 +
 testsuites/ada/samples/base_mp/node2/init.c | 33 +
 2 files changed, 66 insertions(+)

diff --git a/testsuites/ada/samples/base_mp/node1/init.c 
b/testsuites/ada/samples/base_mp/node1/init.c
index 073c033..578abff 100644
--- a/testsuites/ada/samples/base_mp/node1/init.c
+++ b/testsuites/ada/samples/base_mp/node1/init.c
@@ -1,2 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @brief This is init for node1.
+ */
+
+/*
+ * COPYRIGHT (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define CONFIGURE_MP_NODE_NUMBER 1
 #include "../../../support/init.c"
diff --git a/testsuites/ada/samples/base_mp/node2/init.c 
b/testsuites/ada/samples/base_mp/node2/init.c
index ea6db06..3cad39c 100644
--- a/testsuites/ada/samples/base_mp/node2/init.c
+++ b/testsuites/ada/samples/base_mp/node2/init.c
@@ -1,2 +1,35 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @brief This is init for node2.
+ */
+
+/*
+ * COPYRIGHT (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define CONFIGURE_MP_NODE_NUMBER 2
 #include "../../../support/init.c"
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 10/15] sptests/sp27*: Manually adding file headers and licenses

2022-04-21 Thread Ryan Long
These files had no file header, copyright, or license. Based on git
history, added appropriate copyright and license.
---
 testsuites/sptests/sp27/init.c  | 35 +++
 testsuites/sptests/sp27a/init.c | 35 +++
 2 files changed, 70 insertions(+)

diff --git a/testsuites/sptests/sp27/init.c b/testsuites/sptests/sp27/init.c
index c1e9ba5..1b7c95e 100644
--- a/testsuites/sptests/sp27/init.c
+++ b/testsuites/sptests/sp27/init.c
@@ -1 +1,36 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup sptests
+ *
+ *  @brief This is init for sp27.
+ */
+
+/*
+ * COPYRIGHT (C) 1999 Eric Norum .
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include "sp27impl.h"
diff --git a/testsuites/sptests/sp27a/init.c b/testsuites/sptests/sp27a/init.c
index 23a5033..dd472850 100644
--- a/testsuites/sptests/sp27a/init.c
+++ b/testsuites/sptests/sp27a/init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup sptests
+ *
+ *  @brief This is init for sp27a.
+ */
+
+/*
+ * COPYRIGHT (C) 1999 Eric Norum .
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define USE_COUNTING_SEMAPHORE
 #include "../sp27/sp27impl.h"
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 14/15] sp47/init.c: Add file header and license

2022-04-21 Thread Ryan Long
This file had no header, copyright, or license. Based on git history,
added appropriate copyright and license.
---
 testsuites/sptests/sp47/init.c | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/testsuites/sptests/sp47/init.c b/testsuites/sptests/sp47/init.c
index c050347..0c7ec0b 100644
--- a/testsuites/sptests/sp47/init.c
+++ b/testsuites/sptests/sp47/init.c
@@ -1,4 +1,19 @@
 /*
+ *  COPYRIGHT (c) 2009 Nickolay Kolchin 
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 
SOFTWARE.
+ */
+
+/*
  *  Submitted as part of PR1357
  */
 
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 09/15] libtests/dl06: Manually adding file headers and licenses.

2022-04-21 Thread Ryan Long
These files had no header, copyright, or license. Based on git history,
added appropriate copyright and license.
---
 testsuites/libtests/dl06/init.c | 35 +++
 testsuites/libtests/dl06/pre-init.c | 35 +++
 2 files changed, 70 insertions(+)

diff --git a/testsuites/libtests/dl06/init.c b/testsuites/libtests/dl06/init.c
index 413ebf0..f472724 100644
--- a/testsuites/libtests/dl06/init.c
+++ b/testsuites/libtests/dl06/init.c
@@ -1 +1,36 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup libtests
+ *
+ *  @brief This is init for dl06.
+ */
+
+/*
+ * COPYRIGHT (C) 2018 Chris Johns .
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include "initimpl.h"
diff --git a/testsuites/libtests/dl06/pre-init.c 
b/testsuites/libtests/dl06/pre-init.c
index 6dc232a..c6d2544 100644
--- a/testsuites/libtests/dl06/pre-init.c
+++ b/testsuites/libtests/dl06/pre-init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup libtests
+ *
+ *  @brief This is pre-init for dl06.
+ */
+
+/*
+ * COPYRIGHT (C) 2018 Chris Johns .
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define DL06_PRE 1
 #include "initimpl.h"
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 15/15] sp65/init.c: Add file header and license

2022-04-21 Thread Ryan Long
This file had no file header, copyright, or license. Based on git
history, added appropriate copyright and license.
---
 testsuites/sptests/sp65/init.c | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/testsuites/sptests/sp65/init.c b/testsuites/sptests/sp65/init.c
index 8360add..b8028e0 100644
--- a/testsuites/sptests/sp65/init.c
+++ b/testsuites/sptests/sp65/init.c
@@ -1 +1,16 @@
+/*
+ *  COPYRIGHT (c) 2009 Santosh G Vattam 
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 
SOFTWARE.
+ */
+
 #include "sp65impl.h"
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 13/15] sp44/init.c: Add file header and license

2022-04-21 Thread Ryan Long
This file had no header, copyright, or license. Based on git history,
added appropriate copyright and license.
---
 testsuites/sptests/sp44/init.c | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/testsuites/sptests/sp44/init.c b/testsuites/sptests/sp44/init.c
index 7354618..c21a27b 100644
--- a/testsuites/sptests/sp44/init.c
+++ b/testsuites/sptests/sp44/init.c
@@ -1,4 +1,19 @@
 /*
+ *  COPYRIGHT (c) 2008 Xudong Guan 
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 
SOFTWARE.
+ */
+
+/*
  *  Original version submitted as part of PR1212
  *
  *  This example shows a possible blocking of timeslicing if task mode is
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 08/15] libdl: Manually adding file headers and licenses

2022-04-21 Thread Ryan Long
These files had no file header, copyright, or license. Chris identified
that these were made by him.

Updates #4521
---
 cpukit/libdl/rtl-mdreloc-bfin.c| 35 +++
 cpukit/libdl/rtl-mdreloc-lm32.c| 35 +++
 cpukit/libdl/rtl-mdreloc-mips.c| 35 +++
 cpukit/libdl/rtl-mdreloc-moxie.c   | 35 +++
 cpukit/libdl/rtl-mdreloc-powerpc.c | 35 +++
 cpukit/libdl/rtl-mdreloc-v850.c| 35 +++
 6 files changed, 210 insertions(+)

diff --git a/cpukit/libdl/rtl-mdreloc-bfin.c b/cpukit/libdl/rtl-mdreloc-bfin.c
index 27f865e..2c9cc40 100644
--- a/cpukit/libdl/rtl-mdreloc-bfin.c
+++ b/cpukit/libdl/rtl-mdreloc-bfin.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup
+ *
+ *  @brief
+ */
+
+/*
+ * COPYRIGHT (C) 2014 Chris Johns .
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include 
 
 #include 
diff --git a/cpukit/libdl/rtl-mdreloc-lm32.c b/cpukit/libdl/rtl-mdreloc-lm32.c
index 4d47592..809ca87 100644
--- a/cpukit/libdl/rtl-mdreloc-lm32.c
+++ b/cpukit/libdl/rtl-mdreloc-lm32.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup
+ *
+ *  @brief
+ */
+
+/*
+ * COPYRIGHT (C) 2014 Chris Johns .
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include 
 
 #include 
diff --git a/cpukit/libdl/rtl-mdreloc-mips.c b/cpukit/libdl/rtl-mdreloc-mips.c
index d96f150..ac9d87a 100644
--- a/cpukit/libdl/rtl-mdreloc-mips.c
+++ b/cpukit/libdl/rtl-mdreloc-mips.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup
+ *
+ *  @brief
+ */
+
+/*
+ * COPYRIGHT (C) 2014 Chris Johns .
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS 

[PATCH 12/15] psxtmtests/psxtmcond*: Add file headers and licenses

2022-04-21 Thread Ryan Long
These files had no file header, copyright, or license. Based on git
history, added appropriate copyright and license.
---
 testsuites/psxtmtests/psxtmcond08/init.c | 15 +++
 testsuites/psxtmtests/psxtmcond09/init.c | 15 +++
 testsuites/psxtmtests/psxtmcond10/init.c | 15 +++
 3 files changed, 45 insertions(+)

diff --git a/testsuites/psxtmtests/psxtmcond08/init.c 
b/testsuites/psxtmtests/psxtmcond08/init.c
index c4fa914..e2c4960 100644
--- a/testsuites/psxtmtests/psxtmcond08/init.c
+++ b/testsuites/psxtmtests/psxtmcond08/init.c
@@ -1,2 +1,17 @@
+/*
+ *  COPYRIGHT (c) 2013 Christopher Kerl 
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 
SOFTWARE.
+ */
+
 #define USE_WAIT
 #include "psxtmcond08impl.h"
diff --git a/testsuites/psxtmtests/psxtmcond09/init.c 
b/testsuites/psxtmtests/psxtmcond09/init.c
index 5a40a7a..af17c85 100644
--- a/testsuites/psxtmtests/psxtmcond09/init.c
+++ b/testsuites/psxtmtests/psxtmcond09/init.c
@@ -1,2 +1,17 @@
+/*
+ *  COPYRIGHT (c) 2013 Christopher Kerl 
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 
SOFTWARE.
+ */
+
 #define USE_TIMEDWAIT_WITH_VALUE
 #include "../psxtmcond08/psxtmcond08impl.h"
diff --git a/testsuites/psxtmtests/psxtmcond10/init.c 
b/testsuites/psxtmtests/psxtmcond10/init.c
index ba08dc1..a14cb1c 100644
--- a/testsuites/psxtmtests/psxtmcond10/init.c
+++ b/testsuites/psxtmtests/psxtmcond10/init.c
@@ -1,2 +1,17 @@
+/*
+ *  COPYRIGHT (c) 2013 Christopher Kerl 
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 
SOFTWARE.
+ */
+
 #define USE_TIMEDWAIT_WAIT_VALUE_IN_PAST
 #include "../psxtmcond08/psxtmcond08impl.h"
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 06/15] samples: Manually adding file headers and licenses

2022-04-21 Thread Ryan Long
These files had no file header, copyright, or license. Based on git
history, added appropriate copyrights and licenses.
---
 testsuites/samples/base_mp/init1.c | 35 +++
 testsuites/samples/base_mp/init2.c | 35 +++
 testsuites/samples/nsecs/system.h  | 35 +++
 3 files changed, 105 insertions(+)

diff --git a/testsuites/samples/base_mp/init1.c 
b/testsuites/samples/base_mp/init1.c
index cfe033d..1a7ecff 100644
--- a/testsuites/samples/base_mp/init1.c
+++ b/testsuites/samples/base_mp/init1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup samples
+ *
+ *  @brief This is init1 for base_mp.
+ */
+
+/*
+ * COPYRIGHT (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define CONFIGURE_MP_NODE_NUMBER 1
 #include "initimpl.h"
diff --git a/testsuites/samples/base_mp/init2.c 
b/testsuites/samples/base_mp/init2.c
index 40c2c81..318250d 100644
--- a/testsuites/samples/base_mp/init2.c
+++ b/testsuites/samples/base_mp/init2.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup samples
+ *
+ *  @brief This is init2 for base_mp.
+ */
+
+/*
+ * COPYRIGHT (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define CONFIGURE_MP_NODE_NUMBER 2
 #include "initimpl.h"
diff --git a/testsuites/samples/nsecs/system.h 
b/testsuites/samples/nsecs/system.h
index 31c17a4..70579e2 100644
--- a/testsuites/samples/nsecs/system.h
+++ b/testsuites/samples/nsecs/system.h
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup samples
+ *
+ *  @brief This is the system header file for nsecs.
+ */
+
+/*
+ * COPYRIGHT (C) 1989-2007 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the 

[PATCH 05/15] psxtests: Adding file headers and licenses

2022-04-21 Thread Ryan Long
These files had no file header, copyright, or license. Based on git
history, added appropriate copyrights and licenses.
---
 testsuites/psxtests/psxchroot01/main.c | 35 ++
 testsuites/psxtests/psxfatal01/init.c  | 35 ++
 testsuites/psxtests/psxfatal02/init.c  | 35 ++
 testsuites/psxtests/psxmount/main.c| 35 ++
 testsuites/psxtests/psxreaddir/main.c  | 35 ++
 testsuites/psxtests/psxsignal03/init.c | 35 ++
 testsuites/psxtests/psxsignal04/init.c | 35 ++
 7 files changed, 245 insertions(+)

diff --git a/testsuites/psxtests/psxchroot01/main.c 
b/testsuites/psxtests/psxchroot01/main.c
index 2c1c489..2e879a5 100644
--- a/testsuites/psxtests/psxchroot01/main.c
+++ b/testsuites/psxtests/psxchroot01/main.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup psxtests
+ *
+ *  @brief This is main for psxchroot01.
+ */
+
+/*
+ * COPYRIGHT (C) 1989-2012 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 /*
  *  Simple test program -- simplified version of sample test hello.
  */
diff --git a/testsuites/psxtests/psxfatal01/init.c 
b/testsuites/psxtests/psxfatal01/init.c
index ffc5b35..53f3289 100644
--- a/testsuites/psxtests/psxfatal01/init.c
+++ b/testsuites/psxtests/psxfatal01/init.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup psxtests
+ *
+ *  @brief This is init for psxfatal01.
+ */
+
+/*
+ * COPYRIGHT (C) 1989-2012 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
diff --git a/testsuites/psxtests/psxfatal02/init.c 
b/testsuites/psxtests/psxfatal02/init.c
index eaf9330..59f9ced 100644
--- a/testsuites/psxtests/psxfatal02/init.c
+++ b/testsuites/psxtests/psxfatal02/init.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup psxtests
+ *
+ *  @brief This is init for psxfatal02.
+ */
+
+/*
+ * COPYRIGHT (C) 1989-2012 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the 

[PATCH 07/15] support: Manually adding file headers and licenses

2022-04-21 Thread Ryan Long
This file had no file header, copyright, or license. Based on git
history, added appropriate copyright and license.
---
 testsuites/support/include/buffer_test_io.h | 35 +
 1 file changed, 35 insertions(+)

diff --git a/testsuites/support/include/buffer_test_io.h 
b/testsuites/support/include/buffer_test_io.h
index f0eae50..3ff5ca1 100644
--- a/testsuites/support/include/buffer_test_io.h
+++ b/testsuites/support/include/buffer_test_io.h
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup support
+ *
+ *  @brief This is the buffer_test_io header file.
+ */
+
+/*
+ * COPYRIGHT (C) 1989-2011 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 /*
  *  Support for running the test output through a buffer
  */
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 01/15] mptests: Manually adding file headers and licenses

2022-04-21 Thread Ryan Long
These files had no file header, copyright, or license. Based on git
history, added appropriate copyrights and licenses.
---
 testsuites/mptests/mp01/init1.c | 35 +++
 testsuites/mptests/mp01/init2.c | 35 +++
 testsuites/mptests/mp03/init1.c | 35 +++
 testsuites/mptests/mp03/init2.c | 35 +++
 testsuites/mptests/mp04/init1.c | 35 +++
 testsuites/mptests/mp04/init2.c | 35 +++
 testsuites/mptests/mp05/init1.c | 35 +++
 testsuites/mptests/mp05/init2.c | 35 +++
 testsuites/mptests/mp06/init1.c | 35 +++
 testsuites/mptests/mp06/init2.c | 35 +++
 testsuites/mptests/mp07/init1.c | 35 +++
 testsuites/mptests/mp07/init2.c | 35 +++
 testsuites/mptests/mp08/init1.c | 35 +++
 testsuites/mptests/mp08/init2.c | 35 +++
 testsuites/mptests/mp09/init1.c | 35 +++
 testsuites/mptests/mp09/init2.c | 35 +++
 testsuites/mptests/mp10/init1.c | 35 +++
 testsuites/mptests/mp10/init2.c | 35 +++
 testsuites/mptests/mp11/init1.c | 35 +++
 testsuites/mptests/mp11/init2.c | 35 +++
 testsuites/mptests/mp12/init1.c | 35 +++
 testsuites/mptests/mp12/init2.c | 35 +++
 testsuites/mptests/mp13/init1.c | 35 +++
 testsuites/mptests/mp13/init2.c | 35 +++
 testsuites/mptests/mp14/init1.c | 35 +++
 testsuites/mptests/mp14/init2.c | 35 +++
 26 files changed, 910 insertions(+)

diff --git a/testsuites/mptests/mp01/init1.c b/testsuites/mptests/mp01/init1.c
index cfe033d..7231d4f 100644
--- a/testsuites/mptests/mp01/init1.c
+++ b/testsuites/mptests/mp01/init1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup mptests
+ *
+ *  @brief This is init1 for mp01.
+ */
+
+/*
+ * COPYRIGHT (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define CONFIGURE_MP_NODE_NUMBER 1
 #include "initimpl.h"
diff --git a/testsuites/mptests/mp01/init2.c b/testsuites/mptests/mp01/init2.c
index 40c2c81..b50f506 100644
--- a/testsuites/mptests/mp01/init2.c
+++ b/testsuites/mptests/mp01/init2.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup mptests
+ *
+ *  @brief This is init2 for mp01.
+ */
+
+/*
+ * COPYRIGHT (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

[PATCH 04/15] libtests: Adding file headers and licenses

2022-04-21 Thread Ryan Long
These files had no file header, copyright, or license. Based on git
history, added appropriate copyrights and licenses.
---
 testsuites/libtests/mouse01/serial_mouse_config.c  | 35 ++
 .../libtests/termios04/termios_testdriver_intr.c   | 35 ++
 .../libtests/termios05/termios_testdriver_task.c   | 35 ++
 testsuites/libtests/termios10/init.c   | 35 ++
 testsuites/libtests/termios11/init.c   | 35 ++
 5 files changed, 175 insertions(+)

diff --git a/testsuites/libtests/mouse01/serial_mouse_config.c 
b/testsuites/libtests/mouse01/serial_mouse_config.c
index 798cbf3..b3782a7 100644
--- a/testsuites/libtests/mouse01/serial_mouse_config.c
+++ b/testsuites/libtests/mouse01/serial_mouse_config.c
@@ -1,3 +1,38 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup libtests
+ *
+ *  @brief This is serial_mouse_config for mouse01.
+ */
+
+/*
+ * COPYRIGHT (C) 1989-2011 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 /*
  *
  * MODULE DESCRIPTION:
diff --git a/testsuites/libtests/termios04/termios_testdriver_intr.c 
b/testsuites/libtests/termios04/termios_testdriver_intr.c
index 5946c29..f13c7c4 100644
--- a/testsuites/libtests/termios04/termios_testdriver_intr.c
+++ b/testsuites/libtests/termios04/termios_testdriver_intr.c
@@ -1 +1,36 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup libtests
+ *
+ *  @brief This is termios_testdriver_intr for termios04.
+ */
+
+/*
+ * COPYRIGHT (C) 1989-2012 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include "termios_testdriver_impl.h"
diff --git a/testsuites/libtests/termios05/termios_testdriver_task.c 
b/testsuites/libtests/termios05/termios_testdriver_task.c
index e1b3181..5fa7005 100644
--- a/testsuites/libtests/termios05/termios_testdriver_task.c
+++ b/testsuites/libtests/termios05/termios_testdriver_task.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup libtests
+ *
+ *  @brief This is termios_testdriver_task for termios05.
+ */
+
+/*
+ * COPYRIGHT (C) 1989-2010 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided 

[PATCH 03/15] sptests: Manually adding file headers and licenses

2022-04-21 Thread Ryan Long
Theses files had no file header, copyright, or license. Based on git
history, added appropriate copyrights and licenses.
---
 testsuites/sptests/sp52/init.c | 35 ++
 testsuites/sptests/sp53/init.c | 35 ++
 testsuites/sptests/sp66/init.c | 35 ++
 testsuites/sptests/spcpuset01/init.c   | 35 ++
 testsuites/sptests/spcpuset01/test.c   | 35 ++
 testsuites/sptests/spfatal01/init.c| 35 ++
 testsuites/sptests/spfatal04/init.c| 35 ++
 testsuites/sptests/spintrcritical01/init.c | 35 ++
 testsuites/sptests/spintrcritical02/init.c | 35 ++
 testsuites/sptests/spintrcritical03/init.c | 35 ++
 testsuites/sptests/spintrcritical04/init.c | 35 ++
 testsuites/sptests/spintrcritical05/init.c | 35 ++
 testsuites/sptests/spintrcritical11/init.c | 35 ++
 testsuites/sptests/spintrcritical12/init.c | 35 ++
 testsuites/sptests/spintrcritical13/init.c | 35 ++
 testsuites/sptests/spintrcritical14/init.c | 35 ++
 16 files changed, 560 insertions(+)

diff --git a/testsuites/sptests/sp52/init.c b/testsuites/sptests/sp52/init.c
index 6cf79eb..7f41083 100644
--- a/testsuites/sptests/sp52/init.c
+++ b/testsuites/sptests/sp52/init.c
@@ -1 +1,36 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup sptests
+ *
+ *  @brief This is the init for sp52.
+ */
+
+/*
+ * COPYRIGHT (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include "sp52impl.h"
diff --git a/testsuites/sptests/sp53/init.c b/testsuites/sptests/sp53/init.c
index 3ff09bc..dd3f07d 100644
--- a/testsuites/sptests/sp53/init.c
+++ b/testsuites/sptests/sp53/init.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup sptests
+ *
+ *  @brief This is the init for sp53.
+ */
+
+/*
+ * COPYRIGHT (C) 1989-2009 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define USE_TIMER_SERVER
 

[PATCH 02/15] tmtests: Manually adding file headers and licenses

2022-04-21 Thread Ryan Long
These files had no file header, copyright, or license. Based on git
history, added appropriate copyrights and licenses.
---
 testsuites/tmtests/tm02/task1.c | 35 +++
 testsuites/tmtests/tm03/task1.c | 35 +++
 testsuites/tmtests/tm31/task1.c | 35 +++
 testsuites/tmtests/tm32/task1.c | 35 +++
 testsuites/tmtests/tm33/task1.c | 35 +++
 testsuites/tmtests/tm34/task1.c | 35 +++
 testsuites/tmtests/tm35/task1.c | 35 +++
 testsuites/tmtests/tm36/task1.c | 35 +++
 8 files changed, 280 insertions(+)

diff --git a/testsuites/tmtests/tm02/task1.c b/testsuites/tmtests/tm02/task1.c
index c770390..304c23b 100644
--- a/testsuites/tmtests/tm02/task1.c
+++ b/testsuites/tmtests/tm02/task1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup tmtests
+ *
+ *  @brief This is task1 for the tm02 test.
+ */
+
+/*
+ * COPYRIGHT (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define TM02
 #include "tm02impl.h"
diff --git a/testsuites/tmtests/tm03/task1.c b/testsuites/tmtests/tm03/task1.c
index 88c13f3..b79f685 100644
--- a/testsuites/tmtests/tm03/task1.c
+++ b/testsuites/tmtests/tm03/task1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup tmtests
+ *
+ *  @brief This is task1 for the tm03 test.
+ */
+
+/*
+ * COPYRIGHT (C) 1989-1999 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #define TM03
 #include "tm03impl.h"
diff --git a/testsuites/tmtests/tm31/task1.c b/testsuites/tmtests/tm31/task1.c
index 158c2d3..ac3aab3 100644
--- a/testsuites/tmtests/tm31/task1.c
+++ b/testsuites/tmtests/tm31/task1.c
@@ -1,2 +1,37 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ *  @file
+ *
+ *  @ingroup tmtests
+ *
+ *  @brief This is task1 for the tm31 test.
+ */
+
+/*
+ * COPYRIGHT (C) 1989-2014 On-Line Applications Research Corporation (OAR).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above 

[PATCH 00/15] Add copyrights and licenses to files missing them

2022-04-21 Thread Ryan Long
Hi,

This is the first in a set of patches that will be adding copyrights and
licenses to the files that are missing them. I went through the git
history to determine who the files belonged to to give them credit.

Thanks,
Ryan

Ryan Long (15):
  mptests: Manually adding file headers and licenses
  tmtests: Manually adding file headers and licenses
  sptests: Manually adding file headers and licenses
  libtests: Adding file headers and licenses
  psxtests: Adding file headers and licenses
  samples: Manually adding file headers and licenses
  support: Manually adding file headers and licenses
  libdl: Manually adding file headers and licenses
  libtests/dl06: Manually adding file headers and licenses.
  sptests/sp27*: Manually adding file headers and licenses
  ada/samples: Manually adding file headers and licenses
  psxtmtests/psxtmcond*: Add file headers and licenses
  sp44/init.c: Add file header and license
  sp47/init.c: Add file header and license
  sp65/init.c: Add file header and license

 cpukit/libdl/rtl-mdreloc-bfin.c| 35 ++
 cpukit/libdl/rtl-mdreloc-lm32.c| 35 ++
 cpukit/libdl/rtl-mdreloc-mips.c| 35 ++
 cpukit/libdl/rtl-mdreloc-moxie.c   | 35 ++
 cpukit/libdl/rtl-mdreloc-powerpc.c | 35 ++
 cpukit/libdl/rtl-mdreloc-v850.c| 35 ++
 testsuites/ada/samples/base_mp/node1/init.c| 33 
 testsuites/ada/samples/base_mp/node2/init.c| 33 
 testsuites/libtests/dl06/init.c| 35 ++
 testsuites/libtests/dl06/pre-init.c| 35 ++
 testsuites/libtests/mouse01/serial_mouse_config.c  | 35 ++
 .../libtests/termios04/termios_testdriver_intr.c   | 35 ++
 .../libtests/termios05/termios_testdriver_task.c   | 35 ++
 testsuites/libtests/termios10/init.c   | 35 ++
 testsuites/libtests/termios11/init.c   | 35 ++
 testsuites/mptests/mp01/init1.c| 35 ++
 testsuites/mptests/mp01/init2.c| 35 ++
 testsuites/mptests/mp03/init1.c| 35 ++
 testsuites/mptests/mp03/init2.c| 35 ++
 testsuites/mptests/mp04/init1.c| 35 ++
 testsuites/mptests/mp04/init2.c| 35 ++
 testsuites/mptests/mp05/init1.c| 35 ++
 testsuites/mptests/mp05/init2.c| 35 ++
 testsuites/mptests/mp06/init1.c| 35 ++
 testsuites/mptests/mp06/init2.c| 35 ++
 testsuites/mptests/mp07/init1.c| 35 ++
 testsuites/mptests/mp07/init2.c| 35 ++
 testsuites/mptests/mp08/init1.c| 35 ++
 testsuites/mptests/mp08/init2.c| 35 ++
 testsuites/mptests/mp09/init1.c| 35 ++
 testsuites/mptests/mp09/init2.c| 35 ++
 testsuites/mptests/mp10/init1.c| 35 ++
 testsuites/mptests/mp10/init2.c| 35 ++
 testsuites/mptests/mp11/init1.c| 35 ++
 testsuites/mptests/mp11/init2.c| 35 ++
 testsuites/mptests/mp12/init1.c| 35 ++
 testsuites/mptests/mp12/init2.c| 35 ++
 testsuites/mptests/mp13/init1.c| 35 ++
 testsuites/mptests/mp13/init2.c| 35 ++
 testsuites/mptests/mp14/init1.c| 35 ++
 testsuites/mptests/mp14/init2.c| 35 ++
 testsuites/psxtests/psxchroot01/main.c | 35 ++
 testsuites/psxtests/psxfatal01/init.c  | 35 ++
 testsuites/psxtests/psxfatal02/init.c  | 35 ++
 testsuites/psxtests/psxmount/main.c| 35 ++
 testsuites/psxtests/psxreaddir/main.c  | 35 ++
 testsuites/psxtests/psxsignal03/init.c | 35 ++
 testsuites/psxtests/psxsignal04/init.c | 35 ++
 testsuites/psxtmtests/psxtmcond08/init.c   | 15 ++
 testsuites/psxtmtests/psxtmcond09/init.c   | 15 ++
 testsuites

List third party files in cpukit and testsuites

2022-04-08 Thread Ryan Long
This is the set of files in the source code that are all third party. 
This means they should not be re-licensed or re-formatted.


If anything on this list is wrong, or if I missed some, please comment.

Thanks,

Ryan

David Gibson, IBM Corporation
cpukit/dtc/libfdt/fdt.c
cpukit/dtc/libfdt/fdt_empty_tree.c
cpukit/dtc/libfdt/fdt_ro.c
cpukit/dtc/libfdt/fdt_rw.c
cpukit/dtc/libfdt/fdt_strerror.c
cpukit/dtc/libfdt/fdt_sw.c
cpukit/dtc/libfdt/fdt_wip.c
cpukit/dtc/libfdt/libfdt_internal.h
cpukit/include/fdt.h
cpukit/include/libfdt.h
cpukit/include/libfdt_env.h

The Regents of the University of California
cpukit/include/arpa/ftp.h
cpukit/include/machine/_kernel_in.h
cpukit/include/machine/_kernel_mman.h
.cpukit/libmisc/shell/dd-args.c
cpukit/libmisc/shell/dd-conv.c
cpukit/libmisc/shell/dd-conv_tab.c
cpukit/libmisc/shell/dd-misc.c
cpukit/libmisc/shell/dd-position.c
cpukit/libmisc/shell/dd.h
cpukit/libmisc/shell/err.c
cpukit/libmisc/shell/err.h
cpukit/libmisc/shell/errx.c
cpukit/libmisc/shell/extern-cp.h
cpukit/libmisc/shell/extern-dd.h
cpukit/libmisc/shell/extern-ls.h
cpukit/libmisc/shell/filemode.c
cpukit/libmisc/shell/fts.c
cpukit/libmisc/shell/fts.h
cpukit/libmisc/shell/hexdump-conv.c
cpukit/libmisc/shell/hexdump-display.c
cpukit/libmisc/shell/hexdump-odsyntax.c
cpukit/libmisc/shell/hexdump-parse.c
cpukit/libmisc/shell/hexdump.h
cpukit/libmisc/shell/hexsyntax.c
cpukit/libmisc/shell/main_cp.c
cpukit/libmisc/shell/main_dd.c
cpukit/libmisc/shell/main_echo.c
cpukit/libmisc/shell/main_hexdump.c
cpukit/libmisc/shell/main_mv.c
cpukit/libmisc/shell/main_ln.c
cpukit/libmisc/shell/main_ls.c
cpukit/libmisc/shell/main_rm.c
cpukit/libmisc/shell/pathnames-mv.h
cpukit/libmisc/shell/print-ls.c
cpukit/libmisc/shell/pwcache.c
cpukit/libmisc/shell/sysexits.h
cpukit/libmisc/shell/utils-cp.c
cpukit/libmisc/shell/utils-ls.c
cpukit/libmisc/shell/verr.c
cpukit/libmisc/shell/verrx.c
cpukit/libmisc/shell/vis.c
cpukit/libmisc/shell/vis.h
cpukit/libmisc/shell/vwarn.c
cpukit/libmisc/shell/vwarnx.c
cpukit/libmisc/shell/warn.c
cpukit/libmisc/shell/warnx.c
cpukit/score/src/iovprintf.c
cpukit/libcsupport/src/cfmakeraw.c
cpukit/libcsupport/src/cfmakesane.c
/include/machine/_kernel_uio.h

Mark Murray
cpukit/include/crypt.h

NetBSD
cpukit/include/dlfcn.h
cpukit/include/link.h
cpukit/include/link_elf.h
cpukit/libmisc/shell/cmp-ls.c
cpukit/libdl/rtl-mdreloc-arm.c
cpukit/libdl/rtl-mdreloc-i386.c
cpukit/libdl/rtl-mdreloc-m68k.c
cpukit/libdl/rtl-mdreloc-riscv.c
cpukit/libdl/rtl-mdreloc-sparc.c
cpukit/libmisc/shell/main_mknod.c
cpukit/libmisc/shell/mknod-pack_dev.c
cpukit/libmisc/shell/mknod-pack_dev.h
cpukit/score/cpu/i386/include/machine/elf_machdep.h
cpukit/score/cpu/m68k/include/machine/elf_machdep.h
cpukit/score/cpu/mips/include/machine/elf_machdep.h
cpukit/score/cpu/nios2/include/machine/elf_machdep.h
cpukit/score/cpu/sparc/include/machine/elf_machdep.h
cpukit/score/cpu/x86_64/include/machine/elf_machdep.h
cpukit/include/sys/cdefs_elf.h
cpukit/include/sys/exec_elf.h
cpukit/telnetd/des.c

WIDE Project
cpukit/include/machine/_kernel_in6.h

RSA Data Security, Inc.
cpukit/include/md4.h
cpukit/include/md5.h

Sergey Lyubka
cpukit/include/mghttpd/mongoose.h
cpukit/mghttpd/mongoose.c

FreeBSD
cpukit/include/pci/pcireg.h
cpukit/libstdthreads/call_once.c
cpukit/libstdthreads/thrd.c
cpukit/libstdthreads/tss.c
cpukit/include/sys/endian.h
cpukit/include/sys/event.h
cpukit/include/sys/poll.h
cpukit/include/sys/priority.h
cpukit/include/sys/timepps.h
cpukit/include/sys/timetc.h
cpukit/include/sys/timex.h
cpukit/libcrypt/crypt-sha256.c
cpukit/libcrypt/crypt-sha512.c
cpukit/score/src/kern_ntptime.c
cpukit/score/src/kern_tc.c
cpukit/include/sha256.h
cpukit/include/sha512.h
cpukit/include/sys/_ffcounter.h
cpukit/include/sys/timeffc.h

Public Software Group
cpukit/include/utf8proc/utf8proc.h
cpukit/libmisc/utf8proc/utf8proc.c

Poul-Henning Kamp
cpukit/libcrypt/crypt-md5.c

University of California
cpukit/libcrypt/misc.c
testsuites/samples/paranoia/paranoia.c

Ariya Hidayat 
cpukit/libdl/fastlz.c
cpukit/libdl/fastlz.h

Kevin Kirspel 
cpukit/libfs/src/defaults/default_mmap.c

Red Hat
cpukit/libfs/src/jffs2/include/asm/atomic.h
cpukit/libfs/src/jffs2/include/asm/bug.h
cpukit/libfs/src/jffs2/include/asm/page.h
cpukit/libfs/src/jffs2/include/cyg/crc/crc.h
cpukit/libfs/src/jffs2/include/cyg/infra/cyg_type.h
cpukit/libfs/src/jffs2/include/linux/compiler.h
cpukit/libfs/src/jffs2/include/linux/completion.h
cpukit/libfs/src/jffs2/include/linux/config.h
cpukit/libfs/src/jffs2/include/linux/crc32.h
cpukit/libfs/src/jffs2/include/linux/errno.h
cpukit/libfs/src/jffs2/include/linux/fs.h
cpukit/libfs/src/jffs2/include/linux/jffs2.h
cpukit/libfs/src/jffs2/include/linux/kernel.h
cpukit/libfs/src/jffs2/include/linux/list.h
cpukit/libfs/src/jffs2/include/linux/magic.h
cpukit/libfs/src/jffs2/include/linux/mm.h
cpukit/libfs/src/jffs2/include/linux/mtd/compatmac.h
cpukit/libfs/src/jffs2/include/linux/mtd/mtd.h
cpukit/libfs/src/jffs2/include/linux/mutex.h

[PATCH v1] x86_64/elf_machdep.h: Replace stub with NetBSD version

2022-04-07 Thread Ryan Long
The other ports included that architecture's version of this file from
NetBSD. This patch follows that pattern.

closes #4641
---
 .../score/cpu/x86_64/include/machine/elf_machdep.h | 80 --
 1 file changed, 76 insertions(+), 4 deletions(-)

diff --git a/cpukit/score/cpu/x86_64/include/machine/elf_machdep.h 
b/cpukit/score/cpu/x86_64/include/machine/elf_machdep.h
index 5f5cf1d..ee50640 100644
--- a/cpukit/score/cpu/x86_64/include/machine/elf_machdep.h
+++ b/cpukit/score/cpu/x86_64/include/machine/elf_machdep.h
@@ -1,4 +1,76 @@
-/*
- * XXX: Needs research as to purpose. Seems like this might do:
- * 
https://github.com/NetBSD/src/blob/trunk/sys/arch/amd64/include/elf_machdep.h
- */
+/* $NetBSD: elf_machdep.h,v 1.4.18.1 2017/12/03 11:35:47 jdolecek Exp $
*/
+
+#if !defined __i386__
+
+#defineELF32_MACHDEP_ENDIANNESSELFDATA2LSB
+#defineELF32_MACHDEP_ID_CASES  
\
+   case EM_386:\
+   break;
+
+#defineELF64_MACHDEP_ENDIANNESSELFDATA2LSB
+#defineELF64_MACHDEP_ID_CASES  
\
+   case EM_X86_64: \
+   break;
+
+#defineELF32_MACHDEP_IDEM_386
+#defineELF64_MACHDEP_IDEM_X86_64
+
+#defineKERN_ELFSIZE64
+#define ARCH_ELFSIZE   64  /* MD native binary size */
+
+/* x86-64 relocations */
+
+#define R_X86_64_NONE  0
+#define R_X86_64_641
+#define R_X86_64_PC32  2
+#define R_X86_64_GOT32 3
+#define R_X86_64_PLT32 4
+#define R_X86_64_COPY  5
+#define R_X86_64_GLOB_DAT  6
+#define R_X86_64_JUMP_SLOT 7
+#define R_X86_64_RELATIVE  8
+#define R_X86_64_GOTPCREL  9
+#define R_X86_64_3210
+#define R_X86_64_32S   11
+#define R_X86_64_1612
+#define R_X86_64_PC16  13
+#define R_X86_64_8 14
+#define R_X86_64_PC8   15
+
+/* TLS relocations */
+#define R_X86_64_DTPMOD64  16
+#define R_X86_64_DTPOFF64  17
+#define R_X86_64_TPOFF64   18
+#define R_X86_64_TLSGD 19
+#define R_X86_64_TLSLD 20
+#define R_X86_64_DTPOFF32  21
+#define R_X86_64_GOTTPOFF  22
+#define R_X86_64_TPOFF32   23
+
+#define R_X86_64_PC64  24
+#define R_X86_64_GOTOFF64  25
+#define R_X86_64_GOTPC32   26
+#define R_X86_64_GOT64 27
+#define R_X86_64_GOTPCREL6428
+#define R_X86_64_GOTPC64   29
+#define R_X86_64_GOTPLT64  30
+#define R_X86_64_PLTOFF64  31
+#define R_X86_64_SIZE3232
+#define R_X86_64_SIZE6433
+#define R_X86_64_GOTPC32_TLSDESC 34
+#define R_X86_64_TLSDESC_CALL  35
+#define R_X86_64_TLSDESC   36
+#define R_X86_64_IRELATIVE 37
+#define R_X86_64_RELATIVE6438
+#define R_X86_64_PC32_BND  39
+#define R_X86_64_PLT32_BND 40
+#define R_X86_64_GOTPCRELX 41
+#define R_X86_64_REX_GOTPCRELX 42
+
+#defineR_TYPE(name)__CONCAT(R_X86_64_,name)
+
+#else  /*  !__i386__   */
+
+#include 
+
+#endif /*  !__i386__   */
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH v2] devel/glib-2.48: Update hash and patch

2022-03-24 Thread Ryan Long
Changes patch to be pulled from an RTEMS ticket and updated the hash of the
patch.

Updates #4634
---
 bare/config/devel/glib-2.48.2-1.cfg | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bare/config/devel/glib-2.48.2-1.cfg 
b/bare/config/devel/glib-2.48.2-1.cfg
index 76927e9..13c0d74 100644
--- a/bare/config/devel/glib-2.48.2-1.cfg
+++ b/bare/config/devel/glib-2.48.2-1.cfg
@@ -18,9 +18,9 @@
 #Add patches to suppress null argument warning
 #
 
-%patch add glib 
https://gitlab.gnome.org/GNOME/glib/commit/566e1d61a500267c7849ad0b2552feec9c9a29a6.patch
+%patch add glib 
https://devel.rtems.org/raw-attachment/ticket/4634/566e1d61a500267c7849ad0b2552feec9c9a29a6.patch
 %hash sha512 566e1d61a500267c7849ad0b2552feec9c9a29a6.patch \
-   
Mz3YZfEOLgNA6eSUzg8y1yiGk0S5YFbYmWRcGyrcRHhmu8mUzuneWmsj6OYXG09zAvBLApxrEGqvaI0iJNhAMg==
+   
ULwUKgmgGLAOlgsr09K2GdYVGm8yzffwWRGRZTi5B8KdMuyAE+Y0eFOAg2L77aVG3o14l6x9qNA1DH8uMYKOcw==
 
 #
 # The GLib build instructions. We use 2.x.x Release 1.
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH] devel/glib-2.48: Update hash

2022-03-24 Thread Ryan Long



On 3/24/2022 12:59 PM, Sebastian Huber wrote:

On 24/03/2022 18:42, Ryan Long wrote:


But if we're just bumping the hash because we're running into 
checksum failures, why would we need a patch attached to a ticket to 
just bump the hash?


Why did the hash change? Is this because the actual patch changed or 
because there were some changes in the metadata, for example a 
different Git version.



I'm not sure. I don't have the old patch to compare to the current one.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH] devel/glib-2.48: Update hash

2022-03-24 Thread Ryan Long
I didn't see that any of the patches attached to tickets that were 
updating RSB config files. They only seemed to be applying the patches 
to the directories where the source code is located. I don't know if 
this is possible with the RSB. At least I didn't see an example of it 
being done.


But if we're just bumping the hash because we're running into checksum 
failures, why would we need a patch attached to a ticket to just bump 
the hash?


Thanks,

Ryan

On 3/23/2022 11:33 AM, Sebastian Huber wrote:

On 23/03/2022 17:30, Ryan Long wrote:

Fixed checksum failure when building qemu.


I think we had similar issues before. The workaround was to attach the 
patch to an RTEMS ticket.



___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH] devel/glib-2.48: Update hash

2022-03-23 Thread Ryan Long
Fixed checksum failure when building qemu.
---
 bare/config/devel/glib-2.48.2-1.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bare/config/devel/glib-2.48.2-1.cfg 
b/bare/config/devel/glib-2.48.2-1.cfg
index 76927e9..397a2c9 100644
--- a/bare/config/devel/glib-2.48.2-1.cfg
+++ b/bare/config/devel/glib-2.48.2-1.cfg
@@ -20,7 +20,7 @@
 
 %patch add glib 
https://gitlab.gnome.org/GNOME/glib/commit/566e1d61a500267c7849ad0b2552feec9c9a29a6.patch
 %hash sha512 566e1d61a500267c7849ad0b2552feec9c9a29a6.patch \
-   
Mz3YZfEOLgNA6eSUzg8y1yiGk0S5YFbYmWRcGyrcRHhmu8mUzuneWmsj6OYXG09zAvBLApxrEGqvaI0iJNhAMg==
+   
azOlfLYsNkeNyJSot1NCGoj15HYgyHLA4gDqiNMnWwImEPxB7K2tvkLWrwOf7QT4hdTG1qBAnhkPQXKhn9OG5Q==
 
 #
 # The GLib build instructions. We use 2.x.x Release 1.
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


GMP error when building aarch64-rtems-gcc on Mingw64

2022-03-21 Thread Ryan Long

While building gcc, arg3nexwm1 fails. The error follows

In file included from ../../../gnu-mirror-gcc-348fb9d/gmp/gmp-impl.h:146,
 from fib_table.c:4:
../fib_table.h:4:1: warning: data definition has no type or storage class
    4 | Error, error, this data is for 32 bits
  | ^
../fib_table.h:4:1: warning: type defaults to 'int' in declaration of 
'Error' [-Wimplicit-int]
../fib_table.h:4:8: warning: type defaults to 'int' in declaration of 
'error' [-Wimplicit-int]

    4 | Error, error, this data is for 32 bits
  |    ^
../fib_table.h:4:20: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 'data'

    4 | Error, error, this data is for 32 bits
  |    ^~~~
fib_table.c:7:1: warning: data definition has no type or storage class
    7 | Error, error, this data is for 32 bits
  | ^
fib_table.c:7:1: warning: type defaults to 'int' in declaration of 
'Error' [-Wimplicit-int]
fib_table.c:7:8: warning: type defaults to 'int' in declaration of 
'error' [-Wimplicit-int]

    7 | Error, error, this data is for 32 bits
  |    ^
fib_table.c:7:20: error: expected '=', ',', ';', 'asm' or 
'__attribute__' before 'data'

    7 | Error, error, this data is for 32 bits
  |    ^~~~

This is due to GMP_NUMB_BITS not being equal to 32. Has anyone 
encountered this?


Thanks,

Ryan

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] spec/build/bsps: Fix blank variables

2022-03-11 Thread Ryan Long


On 3/10/2022 12:52 AM, Sebastian Huber wrote:

On 09/03/2022 22:02, Ryan Long wrote:

Several variables in the installed Makefile.inc, target.cfg, and bsp.cfg
had values that were not being initialized to yes or no as they should
be. 


What are "several variables"?


RTEMS_HAS_POSIX_API, HAS_POSIX_API, HAS_NETWORKING, 
RTEMS_HAS_MULTIPROCESSING, RTEMS_HAS_NETWORKING


Should I add that list to the commit message?




Reordering the files and adding an initialization using yesno() to
RTEMS_HAS_NETWORKING fixed this issue.
---
  spec/build/bsps/grpmake.yml | 8 
  spec/build/bsps/optmake.yml | 1 +
  2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/spec/build/bsps/grpmake.yml b/spec/build/bsps/grpmake.yml
index 0998efc..f4a21f2 100644
--- a/spec/build/bsps/grpmake.yml
+++ b/spec/build/bsps/grpmake.yml
@@ -30,15 +30,15 @@ install:
  ldflags: []
  links:
  - role: build-dependency
-  uid: makebsp
-- role: build-dependency
    uid: makecustom
  - role: build-dependency
+  uid: optmake
+- role: build-dependency
+  uid: makebsp
+- role: build-dependency
    uid: makeinc
  - role: build-dependency
    uid: maketarget
-- role: build-dependency
-  uid: optmake
  type: build
  use-after: []
  use-before: []
diff --git a/spec/build/bsps/optmake.yml b/spec/build/bsps/optmake.yml
index 28e9660..bea2c90 100644
--- a/spec/build/bsps/optmake.yml
+++ b/spec/build/bsps/optmake.yml
@@ -7,6 +7,7 @@ actions:
  return "no"
  conf.env["RTEMS_HAS_MULTIPROCESSING"] = yesno(conf, 
"RTEMS_MULTIPROCESSING")

  conf.env["RTEMS_HAS_POSIX_API"] = yesno(conf, "RTEMS_POSIX_API")
+    conf.env["RTEMS_HAS_NETWORKING"] = yesno(conf, "RTEMS_NETWORKING")
  build-type: option
  copyrights:
  - Copyright (C) 2020 embedded brains GmbH 
(http://www.embedded-brains.de)


The RTEMS_NETWORKING option no longer exists, so this should be a 
hared coded "no".

Alright, I'll make that change.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] spec/build/bsps: Fix blank variables

2022-03-11 Thread Ryan Long


On 3/9/2022 6:44 PM, Chris Johns wrote:

On 10/3/2022 9:43 am, Joel Sherrill wrote:

On Wed, Mar 9, 2022 at 4:24 PM Heinz Junkes 
wrote:


Thanks for that. I've been struggling with this for a while ;-)

But there is this comment in the file:
“
#
# BSP specific settings. To be included in application Makefiles
#
# This support will be removed from RTEMS. Please consider other
# ways to build applications.
#
“
I thought this was no longer maintained and the "correct" way is now
pkg-config?
Or am I wrong here?

I do not think so. I pushed for removal because of the problems Makefile.inc
creates and it was decided to add some support for backwards compatibility to
the waf build system. Unfortunately we cannot generate fully compatible files
for all users and so we are here again.

This topic has been about for decades dating back to when Ralf attempted to add
pkg-config support to the autoconf build system and realised the scale of the
problem and how it was impossible to do.


pkg-config is better. I think Chris has mentioned issues with it but I
don't know what they might be.

It is and I encourage users to move off Makefile.inc.

Makefile.inc changes need to fit within a narrow window that models the sort of
flags pkg-config encourages you to export. Older RTEMS versions generated a
Makefile.inc that exported everything in an internal build and as a result we
cannot determine what users depend on and if that is suitable or not to export.

I am not sure what this patch generates. I would like to know before I agree to
it. Ryan, would it be ok for you to post a generated Makefile.inc diff from this
patch?

Specifically I am not sure about RTEMS_HAS_NETWORKING. We may need this one
because of backwards compatibility. In rtems_waf I check the opts header file:

  https://git.rtems.org/rtems_waf/tree/rtems.py#n307
  https://git.rtems.org/rtems_waf/tree/rtems.py#n356


Makefile.inc diff

< RTEMS_HAS_POSIX_API = yes
---
> RTEMS_HAS_POSIX_API =

make/bsp.cfg diff

< HAS_MP = no
---
> HAS_MP =
16c16
< HAS_POSIX_API = yes
---
> HAS_POSIX_API =
31c31
< HAS_NETWORKING = no
---
> HAS_NETWORKING =

make/target.cfg diff

< RTEMS_HAS_MULTIPROCESSING = no
< RTEMS_HAS_POSIX_API = yes
---
> RTEMS_HAS_MULTIPROCESSING =
> RTEMS_HAS_POSIX_API =
36c36
< RTEMS_HAS_NETWORKING = no
---
> RTEMS_HAS_NETWORKING =




Removing these is an ongoing debate.

Ah ok ... hmmm ...


The rtems-examples are the only user
left within the RTEMS Project. And you can build them with waf.

AFAIK they generally still work OK but you don't inherit the optimization
or warning CFLAGS like you once did.

Correct. It was a mistake to have these included in Makefile.inc and as a result
it is unfortunate applications depended on them. For example wanting to build an
application with no optimisation often meant a local hack to Makefile.inc or
rebuilding RTEMS.

RTEMS's internal build configuration is just that, it's internal to it's build.
Applications can and should have different configurations to the kernel. The
only mandated compiler flags are for the ABI and that has been documented in the
User Manual for a while now and we export those.

Unless there is a giant upswell of support, I'm prone to acquiesce and let
them be removed after 6.

Sorry, they went away with the autoconf build system and so that means rtems5
was the last version with them.

And I hope a ground swell comes with a complete audit of all BSP Makefile
fragments and custom elements plus the list of what is used by users. :D

It makes no sense to me to cherry pick some because they effect some users. We
need to rip the band-aid off and get users to fix what they have.


But apparently you are using it. What's the scope of that?

EPICS uses Makefile.inc in its build system. It has a BSP config and then the
RTEMS specific make support includes Makefile.inc for the ABI flags. It does
have the V_OPTIMISE etc but I am not sure how this effects an EPICS build.

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

[PATCH] spec/build/bsps: Fix blank variables

2022-03-09 Thread Ryan Long
Several variables in the installed Makefile.inc, target.cfg, and bsp.cfg
had values that were not being initialized to yes or no as they should
be. Reordering the files and adding an initialization using yesno() to
RTEMS_HAS_NETWORKING fixed this issue.
---
 spec/build/bsps/grpmake.yml | 8 
 spec/build/bsps/optmake.yml | 1 +
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/spec/build/bsps/grpmake.yml b/spec/build/bsps/grpmake.yml
index 0998efc..f4a21f2 100644
--- a/spec/build/bsps/grpmake.yml
+++ b/spec/build/bsps/grpmake.yml
@@ -30,15 +30,15 @@ install:
 ldflags: []
 links:
 - role: build-dependency
-  uid: makebsp
-- role: build-dependency
   uid: makecustom
 - role: build-dependency
+  uid: optmake
+- role: build-dependency
+  uid: makebsp
+- role: build-dependency
   uid: makeinc
 - role: build-dependency
   uid: maketarget
-- role: build-dependency
-  uid: optmake
 type: build
 use-after: []
 use-before: []
diff --git a/spec/build/bsps/optmake.yml b/spec/build/bsps/optmake.yml
index 28e9660..bea2c90 100644
--- a/spec/build/bsps/optmake.yml
+++ b/spec/build/bsps/optmake.yml
@@ -7,6 +7,7 @@ actions:
 return "no"
 conf.env["RTEMS_HAS_MULTIPROCESSING"] = yesno(conf, 
"RTEMS_MULTIPROCESSING")
 conf.env["RTEMS_HAS_POSIX_API"] = yesno(conf, "RTEMS_POSIX_API")
+conf.env["RTEMS_HAS_NETWORKING"] = yesno(conf, "RTEMS_NETWORKING")
 build-type: option
 copyrights:
 - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
-- 
1.8.3.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: hello world with devfs has no output

2022-03-09 Thread Ryan Long


On 3/7/2022 10:33 AM, Sebastian Huber wrote:

On 07/03/2022 16:18, Joel Sherrill wrote:



On Mon, Mar 7, 2022 at 12:46 AM Sebastian Huber 
> wrote:


    On 03/03/2022 00:06, Joel Sherrill wrote:
 > What's the missing capability now in devfs? This used to work.

    Is this problem detected by one of the testsuites/libtests/devfs*
    tests?
    If not, could you add a test case which shows the problem?


It was actually the hello_world_c example from rtems-examples BEFORE
this patch from Ryan:

https://git.rtems.org/rtems-examples/commit/?id=5799ab5a8c4e5d6de6532ecea3d895bb01cfb9c9 
 



Pretty minimal. Does it need to be added to the devfs* tests?


Adding a test case which fails currently would be good.
I've tried to make a new devfs to show this failure, but I can't get it 
to produce the same results. Can you take a look at it in rtems-examples?

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Warnings when building sparc/leon3

2022-03-07 Thread Ryan Long
Joel and I noticed these warnings when building the leon3 BSP with 
multiprocessing enabled. Joel thinks this means that something has 
changed around the multiprocessing configuration to generate these. Does 
anybody have an idea on how to fix these?



In file included from ../../../cpukit/include/rtems.h:59,
 from ../../../cpukit/libmisc/stackchk/check.c:28:
../../../cpukit/libmisc/stackchk/check.c: In function 
'Stack_check_report_blown_task':
../../../cpukit/include/rtems/config.h:492:5: warning: the address of 
'_MPCI_Configuration' will always evaluate as 'true' [-Waddress]

  492 | ( &_MPCI_Configuration )
  | ^
../../../cpukit/libmisc/stackchk/check.c:281:9: note: in expansion of 
macro 'rtems_configuration_get_user_multiprocessing_table'

  281 | if (rtems_configuration_get_user_multiprocessing_table()) {
  | ^~

../../../cpukit/libmisc/monitor/mon-editor.c: In function 
'rtems_monitor_command_read':
../../../cpukit/libmisc/monitor/mon-editor.c:503:7: warning: the address 
of '_MPCI_Configuration' will always evaluate as 'true' [-Waddress]

  503 |   if (!rtems_configuration_get_user_multiprocessing_table ())

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

  1   2   3   4   5   6   7   >