summaryrefslogtreecommitdiffstats
path: root/rtems
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2019-07-06 19:20:09 +1000
committerChris Johns <chrisj@rtems.org>2019-07-21 21:09:34 +1000
commitc799e04a8fe85bf90d7f9dfe59298a696f4b0893 (patch)
tree82006becec36090a9647cc65d65215d8cdf2a490 /rtems
parent6: Update unstable RTEMS 6 tool chain (diff)
downloadrtems-source-builder-c799e04a8fe85bf90d7f9dfe59298a696f4b0893.tar.bz2
5/packages: Add curl and update all packages with RTEMS 5 and LibBSD
- Update rtems-bsp support to correctly handle hosts for BSP. - Clean up the options for a BSP. - Check all RTEMS 5 packages and add 5/rtems-packages for all that build. - Update download locations and checksum of all packages. - The work requires the kernel and Libbsd hacve the same prefix.
Diffstat (limited to 'rtems')
-rw-r--r--rtems/config/5/rtems-packages.bset24
-rw-r--r--rtems/config/databases/sqlite-3.8.8.1-1.cfg2
-rw-r--r--rtems/config/ftp/curl-7.65.1-1.cfg21
-rw-r--r--rtems/config/ftp/curl.bset20
-rw-r--r--rtems/config/graphics/freetype-2.4.10-1.cfg2
-rw-r--r--rtems/config/graphics/graphics-all.bset5
-rw-r--r--rtems/config/graphics/libjpeg-9a-1.cfg2
-rw-r--r--rtems/config/graphics/libpng-1.6.37-1.cfg21
-rw-r--r--rtems/config/graphics/libpng.bset2
-rw-r--r--rtems/config/graphics/libtiff-4.0.10-1.cfg21
-rw-r--r--rtems/config/graphics/libtiff-4.0.6-1.cfg2
-rw-r--r--rtems/config/graphics/libtiff.bset2
-rw-r--r--rtems/config/graphics/microwindows-0.93-dev-1.cfg12
-rw-r--r--rtems/config/graphics/t1lib-5.1.2-1.cfg4
-rw-r--r--rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg6
-rw-r--r--rtems/config/net/lwip-1-1.cfg12
-rw-r--r--rtems/config/net/ntp-4.2.6p5-1.cfg6
-rw-r--r--rtems/config/net/protobuf-2.6.1-1.cfg2
-rw-r--r--rtems/config/rtems-bsp.cfg83
19 files changed, 206 insertions, 43 deletions
diff --git a/rtems/config/5/rtems-packages.bset b/rtems/config/5/rtems-packages.bset
new file mode 100644
index 0000000..edc7e6b
--- /dev/null
+++ b/rtems/config/5/rtems-packages.bset
@@ -0,0 +1,24 @@
+#
+# RTEMS Packages that build for this release.
+#
+
+#
+# Databases
+#
+databases/sqlite
+
+#
+# Graphics
+#
+graphics/freetype2
+graphics/libjpeg
+graphics/libpng
+graphics/libtiff
+graphics/t1lib
+
+#
+# Networking
+#
+ftp/curl
+net/lwip
+net/protobuf
diff --git a/rtems/config/databases/sqlite-3.8.8.1-1.cfg b/rtems/config/databases/sqlite-3.8.8.1-1.cfg
index 609d4c1..aac06be 100644
--- a/rtems/config/databases/sqlite-3.8.8.1-1.cfg
+++ b/rtems/config/databases/sqlite-3.8.8.1-1.cfg
@@ -19,7 +19,7 @@
%define sqlite_src_version 3080801
%define sqlite_src_year 2015
-%hash md5 sqlite-src-%{sqlite_src_version}.zip 9dde57c312da00cbe791bcba42d1e96a
+%hash sha512 sqlite-src-%{sqlite_src_version}.zip 4f09228cb0c9c608e492da6e480afe3d27a63e27ccdcf33a88d5e56427f0846efab8930c81026b8e608f1bbb8d63e8d937dd26571deb828617f7efa27a765950
#
# Sqlite configuration
diff --git a/rtems/config/ftp/curl-7.65.1-1.cfg b/rtems/config/ftp/curl-7.65.1-1.cfg
new file mode 100644
index 0000000..abc7e9d
--- /dev/null
+++ b/rtems/config/ftp/curl-7.65.1-1.cfg
@@ -0,0 +1,21 @@
+#
+# Curl 7.65.1
+#
+
+%if %{release} == %{nil}
+ %define release 1
+%endif
+
+%include %{_configdir}/rtems-bsp.cfg
+
+#
+# Curl Version
+#
+%define curl_version 7.65.1
+
+%hash sha512 curl-%{curl_version}.tar.xz aba2d979a416d14a0f0852d595665e49fc4f7bff3bee31f3a52b90ba9dc5ffdb09c092777f124215470b72c47ebca7ddb47844cbf5c0e9142099272b6ac55df4
+
+#
+# Curl Build configuration
+#
+%include %{_configdir}/curl-1.cfg
diff --git a/rtems/config/ftp/curl.bset b/rtems/config/ftp/curl.bset
new file mode 100644
index 0000000..84cac39
--- /dev/null
+++ b/rtems/config/ftp/curl.bset
@@ -0,0 +1,20 @@
+#
+# Build set for Curl
+#
+
+%define release 1
+
+#
+# RTEMS Version
+#
+%define rtems_version 5
+
+#
+# The RTEMS URL paths.
+#
+%include rtems-urls.bset
+
+#
+# Build Curl
+#
+ftp/curl-7.65.1-1
diff --git a/rtems/config/graphics/freetype-2.4.10-1.cfg b/rtems/config/graphics/freetype-2.4.10-1.cfg
index 524dc3a..3963c98 100644
--- a/rtems/config/graphics/freetype-2.4.10-1.cfg
+++ b/rtems/config/graphics/freetype-2.4.10-1.cfg
@@ -13,7 +13,7 @@
#
%define freetype_version 2.4.10
-%hash md5 freetype-%{freetype_version}.tar.gz 4f255c6ee5d5cc2b5c3d423a07386fcb
+%hash sha512 freetype-%{freetype_version}.tar.gz 507d1c03d394b695b5a96041ad7ee03b375964c89f007678db864a7e5bd2ee69d83e6c638f4aadaf348c921d37c16741a03ef9bee03196bda2b94ceea409b688
#
# freetype Build configuration
diff --git a/rtems/config/graphics/graphics-all.bset b/rtems/config/graphics/graphics-all.bset
index 5527ca3..b0ea5fe 100644
--- a/rtems/config/graphics/graphics-all.bset
+++ b/rtems/config/graphics/graphics-all.bset
@@ -2,8 +2,11 @@
# All RTEMS Graphics Build Sets
#
+graphics/freetype2
graphics/libjpeg
graphics/libpng
graphics/libtiff
graphics/t1lib
-graphics/microwindows.bset
+
+# Remove as microwindows does not build. Please fix and provide a patch.
+# graphics/microwindows
diff --git a/rtems/config/graphics/libjpeg-9a-1.cfg b/rtems/config/graphics/libjpeg-9a-1.cfg
index a366da9..fef32d6 100644
--- a/rtems/config/graphics/libjpeg-9a-1.cfg
+++ b/rtems/config/graphics/libjpeg-9a-1.cfg
@@ -13,7 +13,7 @@
#
%define libjpeg_version 9a
-%hash md5 jpegsrc.v%{libjpeg_version}.tar.gz 3353992aecaee1805ef4109aadd433e7
+%hash sha512 jpegsrc.v%{libjpeg_version}.tar.gz 9b21cc115e22c68bea46db462263c5c7a0d10beb192a919ecccbd801a25982b518ce44d8c301dd582ecaba1850e0e0f20e322be82b0e24ae917b9949b4f10d3b
#
# libjpeg Build configuration
diff --git a/rtems/config/graphics/libpng-1.6.37-1.cfg b/rtems/config/graphics/libpng-1.6.37-1.cfg
new file mode 100644
index 0000000..f4717f4
--- /dev/null
+++ b/rtems/config/graphics/libpng-1.6.37-1.cfg
@@ -0,0 +1,21 @@
+#
+# libpng 1.6.37
+#
+
+%if %{release} == %{nil}
+ %define release 1
+%endif
+
+%include %{_configdir}/rtems-bsp.cfg
+
+#
+# libpng Version
+#
+%define libpng_version 1.6.37
+
+%hash sha512 libpng-%{libpng_version}.tar.xz 59e8c1059013497ae616a14c3abbe239322d3873c6ded0912403fc62fb260561768230b6ab997e2cccc3b868c09f539fd13635616b9fa0dd6279a3f63ec7e074
+
+#
+# libpng Build configuration
+#
+%include %{_configdir}/libpng-1.cfg
diff --git a/rtems/config/graphics/libpng.bset b/rtems/config/graphics/libpng.bset
index 4e6db7d..57abeaf 100644
--- a/rtems/config/graphics/libpng.bset
+++ b/rtems/config/graphics/libpng.bset
@@ -12,4 +12,4 @@
#
# Build libpng.
#
-graphics/libpng-1.6.21-1.cfg
+graphics/libpng-1.6.37-1.cfg
diff --git a/rtems/config/graphics/libtiff-4.0.10-1.cfg b/rtems/config/graphics/libtiff-4.0.10-1.cfg
new file mode 100644
index 0000000..901eed1
--- /dev/null
+++ b/rtems/config/graphics/libtiff-4.0.10-1.cfg
@@ -0,0 +1,21 @@
+#
+# libtiff 4.0.10
+#
+
+%if %{release} == %{nil}
+ %define release 1
+%endif
+
+%include %{_configdir}/rtems-bsp.cfg
+
+#
+# tiff Version
+#
+%define tiff_version 4.0.10
+
+%hash sha512 tiff-%{tiff_version}.tar.gz d213e5db09fd56b8977b187c5a756f60d6e3e998be172550c2892dbdb4b2a8e8c750202bc863fe27d0d1c577ab9de1710d15e9f6ed665aadbfd857525a81eea8
+
+#
+# tiff Build configuration
+#
+%include %{_configdir}/libtiff-1.cfg
diff --git a/rtems/config/graphics/libtiff-4.0.6-1.cfg b/rtems/config/graphics/libtiff-4.0.6-1.cfg
index 946daef..bcd7c5b 100644
--- a/rtems/config/graphics/libtiff-4.0.6-1.cfg
+++ b/rtems/config/graphics/libtiff-4.0.6-1.cfg
@@ -13,7 +13,7 @@
#
%define tiff_version 4.0.6
-%hash md5 tiff-%{tiff_version}.tar.gz d1d2e940dea0b5ad435f21f03d96dd72
+%hash sha512 tiff-%{tiff_version}.tar.gz 2c8dbaaaab9f82a7722bfe8cb6fcfcf67472beb692f1b7dafaf322759e7016dad1bc58457c0f03db50aa5bd088fef2b37358fcbc1524e20e9e14a9620373fdf8
#
# tiff Build configuration
diff --git a/rtems/config/graphics/libtiff.bset b/rtems/config/graphics/libtiff.bset
index 434cdbc..f10e60e 100644
--- a/rtems/config/graphics/libtiff.bset
+++ b/rtems/config/graphics/libtiff.bset
@@ -12,4 +12,4 @@
#
# Build libtiff.
#
-graphics/libtiff-4.0.6-1.cfg
+graphics/libtiff-4.0.10-1.cfg
diff --git a/rtems/config/graphics/microwindows-0.93-dev-1.cfg b/rtems/config/graphics/microwindows-0.93-dev-1.cfg
index 0ab9da4..7ca8968 100644
--- a/rtems/config/graphics/microwindows-0.93-dev-1.cfg
+++ b/rtems/config/graphics/microwindows-0.93-dev-1.cfg
@@ -11,15 +11,17 @@
#
# microwindows Version
#
-%define microwindows_version 0.93-dev
+%define microwindows_version 56041759161132a94df3e575ae995e53d6b6e1d8
%define rtems_git_tools_4_11 %{rtems_http_git}/rtems-tools/plain/tools/4.11
-%source set microwindows git://github.com/ghaerr/microwindows.git
+%hash sha512 microwindows-%{microwindows_version}.tar.gz cf29a9d966a8a5b3926aab7f911c47890c9b1a589ff0ecf098e6be45ae1555958b0e437270fb26e353b8c58f261834a3a7f0fce84bea0fdb9138fc38c8703ddc
+
%patch add microwindows %{rtems_git_tools_4_11}/microwindows/microwindows-0.93-dev.diff
-%hash md5 microwindows-0.93-dev.diff 5b06e77d9ee42c8ff0032bba07d01c1a
-%patch add microwindows %{rtems_git_tools_4_11}/microwindows/microwindows-0.93-dev-without-keyboard.diff
-%hash md5 microwindows-0.93-dev-without-keyboard.diff a675f55750754e1cd82a17496f0e8fab
+%hash sha512 microwindows-0.93-dev.diff 2f575f603ce9ccff5c98e9c434d72fb9952d1385903495bf818d50de6568c57c9ca1d3320388e3bae384388d192a389012baf4d734d2cc8481d56f231d2a93d0
+
+#%patch add microwindows %{rtems_git_tools_4_11}/microwindows/microwindows-0.93-dev-without-keyboard.diff
+#%hash sha512 microwindows-0.93-dev-without-keyboard.diff c235177fa80035ec70957aee1daa9232c9050abddac08e5f7b2977bd58703224367b4262a2ddc2999b1ac64b5ab838ad3ad740ee1490741293cffe7c16575fb2
#
# microwindows Build configuration
diff --git a/rtems/config/graphics/t1lib-5.1.2-1.cfg b/rtems/config/graphics/t1lib-5.1.2-1.cfg
index 58eaa3b..27de3cf 100644
--- a/rtems/config/graphics/t1lib-5.1.2-1.cfg
+++ b/rtems/config/graphics/t1lib-5.1.2-1.cfg
@@ -13,13 +13,13 @@
#
%define t1lib_version 5.1.2
-%hash md5 t1lib-%{t1lib_version}.tar.gz a5629b56b93134377718009df1435f3c
+%hash sha512 t1lib-%{t1lib_version}.tar.gz 9f424b19c6f35cc4f194ff7351a4c2352216462c7d1b1d9650ad3a05cf48c6e90c89ccbcda5ecc47a4169a39a850cf84a1fcbf88b3b15614860c27364b631ae3
#
# Patch for RTEMS.
#
%patch add t1lib https://raw.githubusercontent.com/yangqiao/rtems-tools/graphics/tools/4.11/t1lib/t1lib-5.1.2.diff
-%hash md5 t1lib-5.1.2.diff 98eeed85780227adf8525deab3679877
+%hash sha512 t1lib-5.1.2.diff 1afd18182350d7d2426a910c61537f8532e149bf37c616f3a4a84ae0767c4549a2be857db6fd1b1994ed86f8a2e2d4cdfb2abdf67053c8ca1ee83893f4b56d23
#
# t1lib Build configuration
diff --git a/rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg b/rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg
index 7527871..e4fe63e 100644
--- a/rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg
+++ b/rtems/config/net-mgmt/net-snmp-5.7.2.1-1.cfg
@@ -13,7 +13,7 @@
#
%define net_snmp_version 5.7.2.1
-%hash md5 net-snmp-%{net_snmp_version}.tar.gz 7db683faba037249837b226f64d566d4
+%hash sha512 net-snmp-%{net_snmp_version}.tar.gz 6c4dadd145cab9572e2559ad99d6794469685086771c6d757d3667da1a061ab86746d53c28d48381c59a90d92b1812b813f3176cff156c41929177fb585299d0
#
# We need some special flags to build this version.
@@ -23,8 +23,8 @@
#
# Patch for RTEMS support.
#
-%patch add net-snmp %{rtems_git_tools}/net-snmp/rtems-net-snmp-5.7.2.1-20140623.patch
-%hash md5 rtems-net-snmp-5.7.2.1-20140623.patch 9a22fb4366a113f5df71ed2acd672b2b
+%patch add net-snmp %{rtems_git_tools}/net-snmp/rtems-net-snmp-5.7.2.1-20190704.patch
+#%hash sha512 rtems-net-snmp-5.7.2.1-20140623.patch 4eb987d88c6414f2e07d725c2ebb3e88a40191c7befce879cae9ef67143dc25aa88942cfc525d36cd3683476d1cc0f5882d4a730d3bb9c53be2c7a079874d7dd
#
# NetSNMP Build configuration
diff --git a/rtems/config/net/lwip-1-1.cfg b/rtems/config/net/lwip-1-1.cfg
index cf25963..8605f1c 100644
--- a/rtems/config/net/lwip-1-1.cfg
+++ b/rtems/config/net/lwip-1-1.cfg
@@ -11,15 +11,19 @@
#
# LWIP Version
#
-%define lwip_version lwip-c2ebf5544b4268eac9b32c7f3a689ff646d96eef
+%define lwip_version c2ebf5544b4268eac9b32c7f3a689ff646d96eef
+%hash sha512 lwip-%{lwip_version}.tar.gz bfa93e050133ca591c628f0e3a04f5082f55a655b099cdd49138ebf74494354a4cbbee56839f5939174b4c965b29ec648c24b7479c73393ac94ec536cb578b70
-#Will be modified to be pointing to RTEMS repo
+#
+# Will be modified to be pointing to RTEMS repo
+#
%define rtems_ragu_git https://raw.githubusercontent.com/ragunath3252/lwip-nodrv/master
+
#
# Patch for RTEMS support.
#
-%patch add lwip %{rtems_ragu_git}/rtems.patch
-%hash md5 rtems.patch 489c0def3a89e538fb526a5396bf27ca
+%patch add lwip --rsb-file=lwip-nodrv-rtems.patch %{rtems_ragu_git}/rtems.patch
+%hash sha512 lwip-nodrv-rtems.patch ba49163e11069cb036280023db064625e5d1aed3a6cf3e51c64e59639580e9f758434e60853242fb924eb5cebc73b478f01ff51f24505e85d4c21bb1963415e1
#
# LWIP Build configuration
diff --git a/rtems/config/net/ntp-4.2.6p5-1.cfg b/rtems/config/net/ntp-4.2.6p5-1.cfg
index 43afbf3..34676b6 100644
--- a/rtems/config/net/ntp-4.2.6p5-1.cfg
+++ b/rtems/config/net/ntp-4.2.6p5-1.cfg
@@ -13,13 +13,13 @@
#
%define ntp_version 4.2.6p5
-%hash md5 ntp-%{ntp_version}.tar.gz 00df80a84ec9528fcfb09498075525bc
+%hash sha512 ntp-%{ntp_version}.tar.gz 8d76fc7e92b2ea6dd5031e6030a7aba4ff6fb3e19d3bc0153852509861be5d0960e70604814163caedb81f8315a451d78371f99634a50b55cfe1cbd2c69e3046
#
# Patch for RTEMS support.
#
-%patch add ntp %{rtems_git_tools}/ntp/rtems-ntp-4.2.6p5.diff
-%hash md5 rtems-ntp-4.2.6p5.diff 6fce685a73873f924a48b19d6b1700fc
+%patch add ntp %{rtems_http_git}/rtems-tools/plain/tools/4.11/ntp/rtems-ntp-4.2.6p5.diff
+%hash sha512 rtems-ntp-4.2.6p5.diff 257223d207d0b77cde2b9d7add22e3b9d657b58998411d2e20d0b1adf36910be21f1277386c54c34f5d9616fccd29f721d007295708047ea7ae0270a00be25a0
#
# NTP Build configuration
diff --git a/rtems/config/net/protobuf-2.6.1-1.cfg b/rtems/config/net/protobuf-2.6.1-1.cfg
index 5218eac..2e507f6 100644
--- a/rtems/config/net/protobuf-2.6.1-1.cfg
+++ b/rtems/config/net/protobuf-2.6.1-1.cfg
@@ -13,7 +13,7 @@
#
%define protobuf_version 2.6.1
-%hash md5 protobuf-%{protobuf_version}.tar.gz f3916ce13b7fcb3072a1fa8cf02b2423
+%hash sha512 protobuf-%{protobuf_version}.tar.gz 818ac4ad24aca84d214d14ac860a75c14494528821af144d3cb603f69c94d4500512814be6d62cc82973804ebfa99eb94d9f034b309f53cadb622603a7886a3e
#
# Protocol Buffers configuration
diff --git a/rtems/config/rtems-bsp.cfg b/rtems/config/rtems-bsp.cfg
index 28d250f..8e1c12a 100644
--- a/rtems/config/rtems-bsp.cfg
+++ b/rtems/config/rtems-bsp.cfg
@@ -3,13 +3,21 @@
#
#
-# The RTEMS BSP support requires the host turple, the RTEMS BSP and the path to
+# The RTEMS BSP support requires the host tuple, the RTEMS BSP and the path to
# the tools. The prefix is set to an installed RTEMS. The built package is
# installed into the prefix.
#
# Keeping the package's installed path in the RTEMS install path and separate
-# to the tools lets the tools version vary independently. If --rtems-tools
-# (--with-tools) is not provided use the prefix.
+# to the tools lets the tools version vary independently.
+#
+# Provide the path to the RTEMS tools is not in the prefix with the
+# --with-tools option. If --with-tools is not provided use the prefix.
+#
+# Provide the path to the installed RTEMS kernel is not in the prefix with the
+# --with-rtems option. If --with-rtems is not provided use the prefix.
+#
+# Note, only a single path (--with-rtems) for the RTEMS kernel and any other
+# add on or 3rd party libraries is supported.
#
#
@@ -23,14 +31,24 @@
%define rtems_bsp_error 1
%endif
-%if %{_target} == %{nil} && %{rtems_bsp_error}
- %error No RTEMS target specified: --rtems-bsp=arch/bsp (or --target=target)
+#
+# The target is used by compilers or Cxc builds.
+#
+%if %{_target} != %{nil}
+ %error RTEMS BSP builds use --host and not --target
%endif
-%if %{_host} != %{_build}
- %error Canadian cross building for BSP is not supported.
+#
+# We need a host from the user to specifiy the RTEMS architecture and major
+# version.
+#
+%if %{_host} == %{nil} && %{rtems_bsp_error}
+ %error No RTEMS host or BSP specified: --host=<arch>-rtems<ver>
%endif
+#
+# We need a BSP from the user.
+#
%ifn %{defined with_rtems_bsp}
%if %{rtems_bsp_error}
%error No RTEMS BSP specified: --rtems-bsp=arch/bsp (or --with-rtems-bsp=bsp)
@@ -38,14 +56,16 @@
%define with_rtems_bsp sparc/erc32
%endif
+#
+# If no tools or RTEMS provided use the prefix.
+#
%ifn %{defined with_tools}
%define with_tools %{_prefix}
%endif
-#
-# Set the host to the target.
-#
-%define _host %{_target}
+%ifn %{defined with_rtems}
+ %define with_rtems %{_prefix}
+%endif
#
# Set the path to the tools.
@@ -57,21 +77,21 @@
# enable support when crosscompiling, and filter specific optimisation and
# warning from the flags that RTEMS exports.
#
-%{pkgconfig prefix %{_prefix}/lib/pkgconfig}
+%{pkgconfig prefix %{with_rtems}/lib/pkgconfig}
%{pkgconfig crosscompile yes}
%{pkgconfig filter-flags yes}
#
# The RTEMS BSP Flags
#
-%define rtems_bsp %{with_rtems_bsp}
-%define rtems_bsp_ccflags %{pkgconfig ccflags %{_host}-%{rtems_bsp}}
-%define rtems_bsp_cflags %{pkgconfig cflags %{_host}-%{rtems_bsp}}
-%define rtems_bsp_ldflags %{pkgconfig ldflags %{_host}-%{rtems_bsp}}
-%define rtems_bsp_libs %{pkgconfig libs %{_host}-%{rtems_bsp}}
+%define rtems_bsp %{with_rtems_bsp}
+%define rtems_bsp_ccflags %{pkgconfig ccflags %{_host}-%{rtems_bsp}}
+%define rtems_bsp_cflags %{pkgconfig cflags %{_host}-%{rtems_bsp}}
+%define rtems_bsp_ldflags %{pkgconfig ldflags %{_host}-%{rtems_bsp}}
+%define rtems_bsp_libs %{pkgconfig libs %{_host}-%{rtems_bsp}}
%if %{rtems_bsp_cflags} == %{nil} && %{rtems_bsp_error}
- %error No RTEMS target CFLAGS found; Please check the --rtems-bsp option.
+ %error No RTEMS BSP CFLAGS found; Please check the --rtems-bsp option.
%endif
%if %{rtems_bsp_ccflags} == %{nil}
@@ -79,6 +99,33 @@
%endif
#
+# RTEMS BSP paths
+#
+%define rtems_bsp_cc %{_host}-gcc
+%define rtems_bsp_incpath %{with_rtems}/%{_host}/%{rtems_bsp}/include
+%define rtems_bsp_libpath %{with_rtems}/%{_host}/%{rtems_bsp}/lib
+
+#
+# Check for installed libraries.
+#
+# - Check is LibBSD is install
+# - Add librtemsdefaultconfig so configure scripts work.
+#
+# Note: default BSP flags include the standard RTEMS libraries.
+#
+%define rtems-dep-check %(%{_sbdir}/sb/rtems-build-dep -c %{with_tools}/bin/%{rtems_bsp_cc}
+
+%define rtems-libbsd %{rtems-dep-check} -L %{rtems_bsp_libpath} -l libbsd.a)
+%if %{rtems-libbsd} == found
+ %define rtems_bsp_libs %{rtems_bsp_libs} -lbsd -lm -lz
+%endif
+
+%define rtems-defaultconfig %{rtems-dep-check} -L %{rtems_bsp_libpath} -l librtemsdefaultconfig.a)
+%if %{rtems-defaultconfig} == found
+ %define rtems_bsp_libs %{rtems_bsp_libs} -lrtemsdefaultconfig
+%endif
+
+#
# Update the configure paths to be BSP specific.
#
%define rtems_bsp_prefix %{_prefix}/%{_host}/%{rtems_bsp}