Skip to content
Snippets Groups Projects
Commit 8e092e02 authored by Jonathan Hanks's avatar Jonathan Hanks
Browse files

Adapt the rcg build process to use rts-cpu-isolator symvers file.

 * work towards #335
 * modify find_module_symvers to user argparser and have a quiet option to make missing symvers files empty strings
 * update the src/epics/util/Makefile.in to pass the location of the rts cpu isolator symver file to feCodeGen.pl
 * update createKernelMakefile.pm to add the rts cpu isolator symvers file to the KBUILD_EXTRA_SYMBOLS for the module
parent 9a9979e3
No related branches found
No related tags found
2 merge requests!439RCG 5.0 release fro deb 10,!290Adapt the rcg build process to use rts-cpu-isolator symvers file (if present)
......@@ -23,10 +23,11 @@ PERFORMANCEFLAGS=-DNDEBUG -g -O5
RELEASEFLAGS=-DNDEBUG -DNPROBE -g -O5
#DEBUGFLAGS=-DNDEBUG -O5 -unroll=16
DEVFLAGS=@DEVFLAGS@
MBUFSYM := $(shell $(srcdir)/find_module_symvers mbuf)
GPSSYM := $(shell $(srcdir)/find_module_symvers gpstime)
MBUFSYM := $(shell $(srcdir)/find_module_symvers -q mbuf)
GPSSYM := $(shell $(srcdir)/find_module_symvers -q gpstime)
CPUISOSYM := $(shell $(srcdir)/find_module_symvers -q rts-cpu-isolator)
%:
env RCG_SRC_DIR=$(top_srcdir) PERL5LIB=$(srcdir) MBUFSYM=$(MBUFSYM) GPSSYM=$(GPSSYM) $(srcdir)/feCodeGen.pl $@.mdl $@
env RCG_SRC_DIR=$(top_srcdir) PERL5LIB=$(srcdir) MBUFSYM=$(MBUFSYM) GPSSYM=$(GPSSYM) CPUISOSYM=$(CPUISOSYM) $(srcdir)/feCodeGen.pl $@.mdl $@
all:
......@@ -70,6 +70,7 @@ $currWorkDir = &Cwd::cwd();
$rcg_src_dir = $ENV{"RCG_SRC_DIR"};
$mbufsymfile = $ENV{"MBUFSYM"};
$gpssymfile = $ENV{"GPSSYM"};
$cpuisolatorfile = $ENV{"CPUISOSYM"};
$dolphinGen = 2;
if (! length $rcg_src_dir) { $rcg_src_dir = "$currWorkDir/../../.."; }
......
......@@ -4,10 +4,15 @@ import os
import sys
import subprocess
try:
modname = sys.argv[1]
except IndexError:
exit("usage: {} <modname>".format(sys.argv[0]))
import argparse
parser = argparse.ArgumentParser(description='A utility to search for symvers files for dkms kernel modules')
parser.add_argument('modname', help='Name of the module to search for a symvers file for.')
parser.add_argument('-q', '--quiet', default=False, action='store_true', help='Request no output on errors')
args = parser.parse_args()
modname = args.modname
quiet_err = args.quiet
uname = os.uname()
modstat = subprocess.run(
......@@ -37,4 +42,6 @@ if os.path.exists(modsym):
print(modsym)
exit()
if quiet_err:
exit(1)
exit("Module '{}' symvers file could not be found.".format(modname))
......@@ -15,6 +15,7 @@ print OUTM "# CPU-Shutdown Real Time Linux\n";
print OUTM "KBUILD_EXTRA_SYMBOLS=$::rcg_src_dir/src/drv/ExtraSymbols.symvers\n";
print OUTM "KBUILD_EXTRA_SYMBOLS += $::mbufsymfile\n";
print OUTM "KBUILD_EXTRA_SYMBOLS += $::gpssymfile\n";
print OUTM "KBUILD_EXTRA_SYMBOLS += $::cpuisolatorfile\n";
print OUTM "KBUILD_EXTRA_SYMBOLS += \$(PWD)/ModuleIOP.symvers\n";
print OUTM "ALL \+= user_mmap \$(TARGET_RTL)\n";
print OUTM "EXTRA_CFLAGS += -O -w -I../../include\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment