Skip to content

Commit ac6330c

Browse files
committed
Correcting to add files that should have been added as part of
commit e0582a6. Signed-off-by: Nathan Fontenot <[email protected]>
1 parent e0582a6 commit ac6330c

11 files changed

+587
-0
lines changed

.gitignore

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
#
2+
# NOTE! Don't add files that are generated in specific
3+
# subdirectories here. Add them in the ".gitignore" file
4+
# in that subdirectory instead.
5+
#
6+
# NOTE! Please use 'git ls-files -i --exclude-standard'
7+
# command after changing this file, to see if there are
8+
# any tracked files which get ignored after the change.
9+
#
10+
# Normal rules
11+
#
12+
.*
13+
*.o
14+
*.o.*
15+
*.a
16+
*.s
17+
*.so
18+
*.so.dbg
19+
*.mod.c
20+
*.i
21+
*.order
22+
*.gz
23+
*.bz2
24+
*.lzma
25+
*.zip
26+
*.lzo
27+
*.patch
28+
*.gcno
29+
30+
#
31+
# Build files
32+
#
33+
/aclocal.m4
34+
/autom4te.cache/
35+
/config/
36+
/config.log
37+
/config.status
38+
/configure
39+
/Makefile
40+
/Makefile.in
41+
/librtas.spec
42+
/librtas_src/Makefile
43+
/librtas_src/Makefile.in
44+
/librtasevent_src/Makefile
45+
/librtasevent_src/Makefile.in
46+
47+
#
48+
# git files that we don't want to ignore even it they are dot-files
49+
#
50+
!.gitignore
51+
52+
#
53+
# Generated include files
54+
#
55+
include/config
56+
include/linux/version.h
57+
include/generated
58+
59+
# stgit generated dirs
60+
patches-*
61+
62+
# quilt's files
63+
patches
64+
series
65+
66+
# cscope files
67+
cscope.*
68+
ncscope.*
69+
70+
# ctags
71+
tags
72+
TAGS
73+
74+
# gnu global files
75+
GPATH
76+
GRTAGS
77+
GSYMS
78+
GTAGS
79+
80+
*.orig
81+
*~
82+
\#*#

Makefile.am

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
ACLOCAL_AMFLAGS = -I m4
2+
3+
EXTRA_DIST = README COPYING.LESSER
4+
EXTRA_DIST += doc/doxygen.rtas doc/doxygen.rtasevent Changelog
5+
6+
docdir = $(datadir)/doc/@PACKAGE@
7+
doc_DATA = README COPYING.LESSER
8+
9+
pkgconfigdir = $(libdir)/pkgconfig
10+
pkgconfig_DATA = librtas.pc
11+
12+
bin_PROGRAMS=
13+
lib_LTLIBRARIES=
14+
man_MANS=
15+
noinst_HEADERS=
16+
library_include_HEADERS=
17+
18+
AM_CFLAGS = -I$(top_srcdir)/librtas_src/ -I$(top_srcdir)/librtasevent_src/
19+
20+
library_includedir=$(includedir)
21+
22+
LIBRTAS_LIBRARY_VERSION = 2:0:0
23+
24+
lib_LTLIBRARIES += librtas.la
25+
librtas_la_LDFLAGS = -version-info $(LIBRTAS_LIBRARY_VERSION)
26+
librtas_la_SOURCES = \
27+
librtas_src/ofdt.c \
28+
librtas_src/syscall_calls.c \
29+
librtas_src/syscall_rmo.c
30+
31+
library_include_HEADERS += librtas_src/librtas.h
32+
noinst_HEADERS += librtas_src/syscall.h
33+
34+
lib_LTLIBRARIES += librtasevent.la
35+
librtasevent_la_LDFLAGS = -version-info $(LIBRTAS_LIBRARY_VERSION)
36+
librtasevent_la_SOURCES = \
37+
librtasevent_src/get_rtas_event.c \
38+
librtasevent_src/print_rtas_event.c \
39+
librtasevent_src/rtas_cpu.c \
40+
librtasevent_src/rtas_dump.c \
41+
librtasevent_src/rtas_epow.c \
42+
librtasevent_src/rtas_io.c \
43+
librtasevent_src/rtas_lri.c \
44+
librtasevent_src/rtas_mem.c \
45+
librtasevent_src/rtas_post.c \
46+
librtasevent_src/rtas_sp.c \
47+
librtasevent_src/rtas_srcfru.c \
48+
librtasevent_src/rtas_v6_misc.c \
49+
librtasevent_src/rtas_vend.c \
50+
librtasevent_src/rtas_hotplug.c
51+
52+
library_include_HEADERS += \
53+
librtasevent_src/librtasevent.h \
54+
librtasevent_src/librtasevent_v4.h \
55+
librtasevent_src/librtasevent_v6.h
56+
57+
noinst_HEADERS += librtasevent_src/rtas_event.h \
58+
librtasevent_src/rtas_src_codes.c

autogen.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
if [ ! -d config ];
6+
then
7+
mkdir config;
8+
fi
9+
10+
autoreconf --install --verbose --force

configure.ac

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
AC_INIT([librtas],[2.0.0],[See README])
2+
3+
AC_CONFIG_AUX_DIR([config])
4+
AC_CONFIG_MACRO_DIR([m4])
5+
6+
AC_CANONICAL_TARGET
7+
8+
AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability subdir-objects foreign tar-ustar])
9+
10+
AM_PROG_AR
11+
12+
AC_CONFIG_HEADERS([config.h])
13+
14+
PKG_PROG_PKG_CONFIG
15+
AC_CHECK_FUNCS([memset munmap strrchr])
16+
AC_CHECK_HEADERS([fcntl.h])
17+
AC_C_INLINE
18+
AC_FUNC_MALLOC
19+
AC_FUNC_MMAP
20+
AC_FUNC_REALLOC
21+
AC_TYPE_OFF_T
22+
AC_TYPE_SIZE_T
23+
AC_TYPE_UID_T
24+
AC_TYPE_UINT32_T
25+
AC_TYPE_UINT64_T
26+
27+
AC_DEFUN([LOCAL_CHECK_FLAGS],[
28+
AC_REQUIRE([AX_CHECK_LINK_FLAG])
29+
AC_REQUIRE([AX_APPEND_COMPILE_FLAGS])
30+
AC_LANG_PUSH([C])
31+
AX_APPEND_COMPILE_FLAGS([-Wall])
32+
AX_APPEND_COMPILE_FLAGS([-D_FORTIFY_SOURCE=2 -fstack-protector-all])
33+
AX_APPEND_COMPILE_FLAGS([-fwrapv -fPIE -Wstack-protector])
34+
AX_APPEND_COMPILE_FLAGS([--param=ssp-buffer-size=1])
35+
AX_CHECK_LINK_FLAG([-z relro -z now])
36+
AX_CHECK_LINK_FLAG([-pie])
37+
AC_LANG_POP
38+
])
39+
LOCAL_CHECK_FLAGS
40+
41+
LT_INIT
42+
LT_LANG([C])
43+
44+
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
45+
46+
AC_CONFIG_FILES([Makefile librtas.pc librtas.spec])
47+
AC_OUTPUT

librtas.pc.in

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
prefix=@prefix@
2+
exec_prefix=@exec_prefix@
3+
libdir=@libdir@
4+
includedir=@includedir@
5+
6+
Name: librtas
7+
Description: The librtas package provides an interface for Run-Time Abstraction Services (RTAS) calls on PAPR platforms. The libraries allow users to examine and manipulate hardware, and parse RTAS events.
8+
Version: @PACKAGE_VERSION@
9+
Libs: -L${libdir} -lrtas-2.0 -lofdt-2.0 -lrtasevent-2.0
10+
Cflags: -I${includedir}/librtas-2.0 -I${libdir}/librtas-2.0/include

m4/ax_append_compile_flags.m4

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# ===========================================================================
2+
# http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
3+
# ===========================================================================
4+
#
5+
# SYNOPSIS
6+
#
7+
# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS])
8+
#
9+
# DESCRIPTION
10+
#
11+
# For every FLAG1, FLAG2 it is checked whether the compiler works with the
12+
# flag. If it does, the flag is added FLAGS-VARIABLE
13+
#
14+
# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
15+
# CFLAGS) is used. During the check the flag is always added to the
16+
# current language's flags.
17+
#
18+
# If EXTRA-FLAGS is defined, it is added to the current language's default
19+
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
20+
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
21+
# force the compiler to issue an error when a bad flag is given.
22+
#
23+
# NOTE: This macro depends on the AX_APPEND_FLAG and
24+
# AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with
25+
# AX_APPEND_LINK_FLAGS.
26+
#
27+
# LICENSE
28+
#
29+
# Copyright (c) 2011 Maarten Bosmans <[email protected]>
30+
#
31+
# This program is free software: you can redistribute it and/or modify it
32+
# under the terms of the GNU General Public License as published by the
33+
# Free Software Foundation, either version 3 of the License, or (at your
34+
# option) any later version.
35+
#
36+
# This program is distributed in the hope that it will be useful, but
37+
# WITHOUT ANY WARRANTY; without even the implied warranty of
38+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
39+
# Public License for more details.
40+
#
41+
# You should have received a copy of the GNU General Public License along
42+
# with this program. If not, see <http://www.gnu.org/licenses/>.
43+
#
44+
# As a special exception, the respective Autoconf Macro's copyright owner
45+
# gives unlimited permission to copy, distribute and modify the configure
46+
# scripts that are the output of Autoconf when processing the Macro. You
47+
# need not follow the terms of the GNU General Public License when using
48+
# or distributing such scripts, even though portions of the text of the
49+
# Macro appear in them. The GNU General Public License (GPL) does govern
50+
# all other use of the material that constitutes the Autoconf Macro.
51+
#
52+
# This special exception to the GPL applies to versions of the Autoconf
53+
# Macro released by the Autoconf Archive. When you make and distribute a
54+
# modified version of the Autoconf Macro, you may extend this special
55+
# exception to the GPL to apply to your modified version as well.
56+
57+
#serial 4
58+
59+
AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
60+
[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
61+
AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
62+
for flag in $1; do
63+
AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3])
64+
done
65+
])dnl AX_APPEND_COMPILE_FLAGS

m4/ax_append_flag.m4

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# ===========================================================================
2+
# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html
3+
# ===========================================================================
4+
#
5+
# SYNOPSIS
6+
#
7+
# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
8+
#
9+
# DESCRIPTION
10+
#
11+
# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
12+
# added in between.
13+
#
14+
# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
15+
# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains
16+
# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly
17+
# FLAG.
18+
#
19+
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
20+
#
21+
# LICENSE
22+
#
23+
# Copyright (c) 2008 Guido U. Draheim <[email protected]>
24+
# Copyright (c) 2011 Maarten Bosmans <[email protected]>
25+
#
26+
# This program is free software: you can redistribute it and/or modify it
27+
# under the terms of the GNU General Public License as published by the
28+
# Free Software Foundation, either version 3 of the License, or (at your
29+
# option) any later version.
30+
#
31+
# This program is distributed in the hope that it will be useful, but
32+
# WITHOUT ANY WARRANTY; without even the implied warranty of
33+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
34+
# Public License for more details.
35+
#
36+
# You should have received a copy of the GNU General Public License along
37+
# with this program. If not, see <http://www.gnu.org/licenses/>.
38+
#
39+
# As a special exception, the respective Autoconf Macro's copyright owner
40+
# gives unlimited permission to copy, distribute and modify the configure
41+
# scripts that are the output of Autoconf when processing the Macro. You
42+
# need not follow the terms of the GNU General Public License when using
43+
# or distributing such scripts, even though portions of the text of the
44+
# Macro appear in them. The GNU General Public License (GPL) does govern
45+
# all other use of the material that constitutes the Autoconf Macro.
46+
#
47+
# This special exception to the GPL applies to versions of the Autoconf
48+
# Macro released by the Autoconf Archive. When you make and distribute a
49+
# modified version of the Autoconf Macro, you may extend this special
50+
# exception to the GPL to apply to your modified version as well.
51+
52+
#serial 2
53+
54+
AC_DEFUN([AX_APPEND_FLAG],
55+
[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
56+
AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])dnl
57+
AS_VAR_SET_IF(FLAGS,
58+
[case " AS_VAR_GET(FLAGS) " in
59+
*" $1 "*)
60+
AC_RUN_LOG([: FLAGS already contains $1])
61+
;;
62+
*)
63+
AC_RUN_LOG([: FLAGS="$FLAGS $1"])
64+
AS_VAR_SET(FLAGS, ["AS_VAR_GET(FLAGS) $1"])
65+
;;
66+
esac],
67+
[AS_VAR_SET(FLAGS,["$1"])])
68+
AS_VAR_POPDEF([FLAGS])dnl
69+
])dnl AX_APPEND_FLAG

0 commit comments

Comments
 (0)