platform-kickstarts: add new recipe for generating ks files 74/4374/1
authorJackie Huang <jackie.huang@windriver.com>
Sun, 31 May 2020 15:04:14 +0000 (23:04 +0800)
committerJackie Huang <jackie.huang@windriver.com>
Mon, 13 Jul 2020 06:43:54 +0000 (14:43 +0800)
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 <jackie.huang@windriver.com>
Change-Id: I2b509b4eb30ac58666a563a5c9acec1d8193daba

meta-stx/recipes-core/packagegroups/packagegroup-stx.bb
meta-stx/recipes-core/stx-metal/platform-kickstarts.inc [new file with mode: 0644]
meta-stx/recipes-core/stx-metal/stx-metal.bb

index 88736a3..49cf0bb 100644 (file)
@@ -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 (file)
index 0000000..d90cc3e
--- /dev/null
@@ -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"
index 1442196..26a170c 100644 (file)
@@ -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 () {
        :