Add makefile for compute-huge

A makefile was added to compute-huge. The topology script was moved
to the source folder to be handled by this makefile.

Story: 2004043
Task: 27550

Change-Id: I84e70f409de7f68c9f04fb76b13df251858f7c4a
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
This commit is contained in:
Erich Cordoba 2018-11-01 11:49:43 -06:00
parent 3c4a9c4375
commit e31d63dad7
4 changed files with 37 additions and 31 deletions

View File

@ -1,4 +1,3 @@
SRC_DIR="compute-huge"
COPY_LIST_TO_TAR="bin"
COPY_LIST="$SRC_DIR/LICENSE"
TIS_PATCH_VER=10

View File

@ -28,38 +28,14 @@ Initial compute node hugepages and reserved cpus configuration
%setup
%build
%{__python} -m compileall topology.py
make
%install
# compute init scripts
install -d -m 755 %{buildroot}%{local_etc_initd}
install -p -D -m 755 affine-platform.sh %{buildroot}%{local_etc_initd}/affine-platform.sh
# utility scripts
install -p -D -m 755 cpumap_functions.sh %{buildroot}%{local_etc_initd}/cpumap_functions.sh
install -p -D -m 755 task_affinity_functions.sh %{buildroot}%{local_etc_initd}/task_affinity_functions.sh
install -p -D -m 755 log_functions.sh %{buildroot}%{local_etc_initd}/log_functions.sh
install -d -m 755 %{buildroot}%{local_bindir}
install -p -D -m 755 ps-sched.sh %{buildroot}%{local_bindir}/ps-sched.sh
# TODO: Only ship pyc ?
install -p -D -m 755 topology.py %{buildroot}%{local_bindir}/topology.py
install -p -D -m 755 topology.pyc %{buildroot}%{local_bindir}/topology.pyc
install -p -D -m 755 affine-interrupts.sh %{buildroot}%{local_bindir}/affine-interrupts.sh
install -p -D -m 755 set-cpu-wakeup-latency.sh %{buildroot}%{local_bindir}/set-cpu-wakeup-latency.sh
install -p -D -m 755 bin/topology %{buildroot}%{local_bindir}/topology
# compute config data
install -d -m 755 %{buildroot}%{local_etc_nova}
install -p -D -m 755 compute_reserved.conf %{buildroot}%{local_etc_nova}/compute_reserved.conf
# goenabled check
install -d -m 755 %{buildroot}%{local_etc_goenabledd}
install -p -D -m 755 compute-huge-goenabled.sh %{buildroot}%{local_etc_goenabledd}/compute-huge-goenabled.sh
# systemd services
install -d -m 755 %{buildroot}%{_unitdir}
install -p -D -m 664 affine-platform.sh.service %{buildroot}%{_unitdir}/affine-platform.sh.service
make install BINDIR=%{buildroot}%{local_bindir} \
INITDDIR=%{buildroot}%{local_etc_initd} \
GOENABLEDDIR=%{buildroot}%{local_etc_goenabledd} \
NOVACONFDIR=%{buildroot}%{local_etc_nova} \
SYSTEMDDIR=%{buildroot}%{_unitdir}
%post
/bin/systemctl enable affine-platform.sh.service >/dev/null 2>&1

View File

@ -0,0 +1,31 @@
#
# SPDX-License-Identifier: Apache-2.0
#
BINDIR ?= /usr/bin
INITDDIR ?= /etc/init.d/
GOENABLEDDIR ?= /etc/goenabled.d/
NOVACONFDIR ?= /etc/nova
SYSTEMDDIR ?= /usr/lib/systemd/system/
all:
python -m compileall topology.py
install:
install -d -m 755 $(BINDIR)
install -d -m 755 $(INITDDIR)
install -d -m 755 $(GOENABLEDDIR)
install -d -m 755 $(NOVACONFDIR)
install -d -m 755 $(SYSTEMDDIR)
install -p -D -m 755 affine-platform.sh $(INITDDIR)/affine-platform.sh
install -p -D -m 755 cpumap_functions.sh $(INITDDIR)/cpumap_functions.sh
install -p -D -m 755 task_affinity_functions.sh $(INITDDIR)/task_affinity_functions.sh
install -p -D -m 755 ps-sched.sh $(BINDIR)/ps-sched.sh
install -p -D -m 755 topology.py $(BINDIR)/topology.py
install -p -D -m 755 topology.pyc $(BINDIR)/topology.pyc
install -p -D -m 755 affine-interrupts.sh $(BINDIR)/affine-interrupts.sh
install -p -D -m 755 set-cpu-wakeup-latency.sh $(BINDIR)/set-cpu-wakeup-latency.sh
install -p -D -m 755 topology $(BINDIR)/topology
install -p -D -m 755 compute_reserved.conf $(NOVACONFDIR)/compute_reserved.conf
install -p -D -m 755 compute-huge-goenabled.sh $(GOENABLEDDIR)/compute-huge-goenabled.sh
install -p -D -m 664 affine-platform.sh.service $(SYSTEMDDIR)/affine-platform.sh.service