From 37be71a5016107a2952a0f53a1d3e4d39bf9d2ef Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Sun, 22 Nov 2020 22:05:17 +0800 Subject: [PATCH] stx-metal: add vlan setting for debain style networking in kickstart Yocto uses debain style for networking, and previous patch lack of setting for vlan, so add vlan settings in kickstart files as well. Issue-ID: INF-207 Signed-off-by: Jackie Huang Change-Id: I7528eef3ec2c392e7db8e73c3bb82e77daed1add --- ...add-vlan-setting-for-debain-style-network.patch | 38 ++++++++++++++++++++++ meta-stx/recipes-core/stx-metal/stx-metal.bb | 1 + 2 files changed, 39 insertions(+) create mode 100644 meta-stx/recipes-core/stx-metal/files/0013-kickstarts-add-vlan-setting-for-debain-style-network.patch diff --git a/meta-stx/recipes-core/stx-metal/files/0013-kickstarts-add-vlan-setting-for-debain-style-network.patch b/meta-stx/recipes-core/stx-metal/files/0013-kickstarts-add-vlan-setting-for-debain-style-network.patch new file mode 100644 index 00000000..3f5215b8 --- /dev/null +++ b/meta-stx/recipes-core/stx-metal/files/0013-kickstarts-add-vlan-setting-for-debain-style-network.patch @@ -0,0 +1,38 @@ +From 97228a9287bec2049767d175f97226d90b4be943 Mon Sep 17 00:00:00 2001 +From: Jackie Huang +Date: Sun, 22 Nov 2020 22:00:58 +0800 +Subject: [PATCH] kickstarts: add vlan setting for debain style networking + +Upstream-Status: Inappropriate [poky-stx specific] + +Signed-off-by: Jackie Huang +--- + bsp-files/kickstarts/post_net_common.cfg | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/bsp-files/kickstarts/post_net_common.cfg b/bsp-files/kickstarts/post_net_common.cfg +index 46cdeeb..c000348 100755 +--- a/bsp-files/kickstarts/post_net_common.cfg ++++ b/bsp-files/kickstarts/post_net_common.cfg +@@ -135,6 +135,18 @@ VLAN=yes + LINKDELAY=20 + EOF + ++ # For Debian style networking settings ++ cat << EOF >> /etc/network/interfaces ++auto $mgmt_dev vlan$mgmt_vlan ++ ++iface $mgmt_dev inet dhcp ++ ++iface vlan$mgmt_vlan inet dhcp ++ vlan-raw-device $mgmt_dev ++ pre-up /sbin/modprobe -q 8021q ++EOF ++ ++ + # Reject DHCPOFFER from DHCP server that doesn't send + # wrs-install-uuid option + echo "require wrs-install-uuid;" >>/etc/dhcp/dhclient.conf +-- +2.7.4 + diff --git a/meta-stx/recipes-core/stx-metal/stx-metal.bb b/meta-stx/recipes-core/stx-metal/stx-metal.bb index a2708f6d..c53fcdf6 100644 --- a/meta-stx/recipes-core/stx-metal/stx-metal.bb +++ b/meta-stx/recipes-core/stx-metal/stx-metal.bb @@ -50,6 +50,7 @@ SRC_URI = "git://opendev.org/starlingx/metal.git;protocol=${PROTOCOL};rev=${SRCR file://0010-libamon-add-shared-option.patch \ file://0011-kickstarts-adjustment-fnd-fixes-or-poky-stx.patch \ file://0012-kickstarts-add-setting-for-debain-style-networking.patch \ + file://0013-kickstarts-add-vlan-setting-for-debain-style-network.patch \ " inherit setuptools systemd -- 2.16.6