From: Jackie Huang Date: Sun, 31 May 2020 15:04:14 +0000 (+0800) Subject: platform-kickstarts: add new recipe for generating ks files X-Git-Tag: cherry~36 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=047c0e2a5dac218708f4e694deaa45f9861c9d1e;p=pti%2Frtp.git platform-kickstarts: add new recipe for generating ks files Add this new recipe for generating ks files for pxe installer based on the stx 3.0 ks templates. Issue-ID: INF-144 Signed-off-by: Jackie Huang Change-Id: I2b509b4eb30ac58666a563a5c9acec1d8193daba --- diff --git a/meta-stx/recipes-core/packagegroups/packagegroup-stx.bb b/meta-stx/recipes-core/packagegroups/packagegroup-stx.bb index 88736a3..49cf0bb 100644 --- a/meta-stx/recipes-core/packagegroups/packagegroup-stx.bb +++ b/meta-stx/recipes-core/packagegroups/packagegroup-stx.bb @@ -136,6 +136,7 @@ RDEPENDS_packagegroup-stx-metal = " \ mtce-storage \ python-inventoryclient \ pxe-network-installer \ + platform-kickstarts \ " RDEPENDS_packagegroup-stx-monitoring = " \ diff --git a/meta-stx/recipes-core/stx-metal/platform-kickstarts.inc b/meta-stx/recipes-core/stx-metal/platform-kickstarts.inc new file mode 100644 index 0000000..d90cc3e --- /dev/null +++ b/meta-stx/recipes-core/stx-metal/platform-kickstarts.inc @@ -0,0 +1,45 @@ +# +## Copyright (C) 2019 Wind River Systems, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +PACKAGES += " \ + platform-kickstarts \ + platform-kickstarts-pxeboot \ + platform-kickstarts-extracfgs \ + " + +feed_dir = "/www/pages/feed/rel-${STX_REL}" + +DEPENDS += "perl-native" + +do_compile_prepend () { + cd ${S}/bsp-files/ + ./centos-ks-gen.pl --release ${STX_REL} +} + +do_install_prepend () { + cd ${S}/bsp-files/ + install -d -m 0755 ${D}${feed_dir} + install -m 0444 generated/* ${D}${feed_dir}/ + + install -d -m 0755 ${D}/pxeboot + install -D -m 0444 pxeboot/* ${D}/pxeboot + + install -d -m 0755 ${D}/extra_cfgs + install -D -m 0444 extra_cfgs/* ${D}/extra_cfgs +} + +FILES_platform-kickstarts = "${feed_dir}" +FILES_platform-kickstarts-pxeboot = "/pxeboot" +FILES_platform-kickstarts-extracfgs = "/extra_cfgs" diff --git a/meta-stx/recipes-core/stx-metal/stx-metal.bb b/meta-stx/recipes-core/stx-metal/stx-metal.bb index 1442196..26a170c 100644 --- a/meta-stx/recipes-core/stx-metal/stx-metal.bb +++ b/meta-stx/recipes-core/stx-metal/stx-metal.bb @@ -71,7 +71,7 @@ require mtce-control.inc require mtce-storage.inc require python-inventoryclient.inc require pxe-network-installer.inc -# require kickstart.inc +require platform-kickstarts.inc do_configure () { :