1 From 0bc9acfc4a699faa4ba0d620f2301f257da51cf4 Mon Sep 17 00:00:00 2001
2 From: Jackie Huang <jackie.huang@windriver.com>
3 Date: Mon, 31 Jul 2023 22:55:29 +0800
4 Subject: [PATCH 2/2] kickstart: add fixes for arm64
6 Use "uname -m" to check the host arch and make the following
9 1. Reconfigure pkgs cracklib-runtime for arm64
10 This step is done when runing build-image but failed:
11 appsdk - DEBUG: Setting up cracklib-runtime (2.9.6-3.4) ...
12 appsdk - DEBUG: file: could not find any valid magic files!
14 And it ended up with failure when setting new password:
15 You are required to change your password immediately
16 (administrator enforced).
17 Changing password for sysadmin.
20 /var/cache/cracklib/cracklib_dict.pwd: No such file or directory
21 BAD PASSWORD: The password fails the dictionary check - error
24 2. Add efi=runtime for arm64 on RT kernel:
25 ARM64 server only support UEFI but the efi runtime is disable
26 by default on RT kernel, so Add the efi=runtime kernel command
27 line option to enable it for arm64.
29 As reference here is the difference in the std and rt kernel
30 requiring this change:
32 $ diff linux-yocto-{std,rt}/drivers/firmware/efi/efi.c
34 < static bool disable_runtime;
36 > static bool disable_runtime = IS_ENABLED(CONFIG_PREEMPT_RT);
39 > if (parse_option_str(str, "runtime"))
40 > disable_runtime = false;
43 PASS: build-pkgs on x86-64 host
44 PASS: build-image on x86-64 host
45 PASS: build-pkgs on arm64 host
46 PASS: build-image on arm64 host
47 PASS: Deploy AIO-SX on x86-64 target
48 PASS: Deploy AIO-SX on arm64 target
49 PASS: Deploy AIO-SX(LL) on arm64 target
50 PASS: Deploy AIO-DX on arm64 targets
51 PASS: Deploy std(2+2+2) on arm64 targets
56 Change-Id: Ic36f3757b0086979e4792c7a889c3779bd44a78a
57 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
59 kickstart/files/kickstart.cfg | 13 +++++++++++++
60 kickstart/files/miniboot.cfg | 13 +++++++++++++
61 2 files changed, 26 insertions(+)
63 diff --git a/kickstart/files/kickstart.cfg b/kickstart/files/kickstart.cfg
64 index a8cb299..e333852 100644
65 --- a/kickstart/files/kickstart.cfg
66 +++ b/kickstart/files/kickstart.cfg
67 @@ -2093,6 +2093,13 @@ groupadd nobody
69 # Reload /etc/group- to make systemd-sysusers.service happy
70 /usr/sbin/grpconv || report_failure_with_msg "Failed to convert from shadow passwords and groups"
72 +# reconfigure pkgs cracklib-runtime for arm64
73 +uname_arch=$(uname -m)
74 +if [ "${uname_arch}" = "aarch64" ] ; then
75 + dpkg-reconfigure cracklib-runtime
80 %post --interpreter=/bin/bash
81 @@ -2357,6 +2364,12 @@ if [ "${aio}" = true -o "${worker}" = true ] ; then
82 add_kernel_option "skew_tick=1"
85 + # Add kernel option to enable efi runtime for arm64 on RT kernel
86 + uname_arch=$(uname -m)
87 + if [ "${lowlatency}" = true -a "${uname_arch}" = "aarch64" ] ; then
88 + add_kernel_option "efi=runtime"
91 elif [ "${controller}" = true ] ; then
93 ilog "Adding ${TRAIT__CONTROLLER} function kernel options"
94 diff --git a/kickstart/files/miniboot.cfg b/kickstart/files/miniboot.cfg
95 index b1c2547..3f3bdb9 100644
96 --- a/kickstart/files/miniboot.cfg
97 +++ b/kickstart/files/miniboot.cfg
98 @@ -2281,6 +2281,13 @@ groupadd nobody
100 # Reload /etc/group- to make systemd-sysusers.service happy
101 /usr/sbin/grpconv || report_failure_with_msg "Failed to convert from shadow passwords and groups"
103 +# reconfigure pkgs cracklib-runtime for arm64
104 +uname_arch=$(uname -m)
105 +if [ "${uname_arch}" = "aarch64" ] ; then
106 + dpkg-reconfigure cracklib-runtime
111 %post --interpreter=/bin/bash
112 @@ -2545,6 +2552,12 @@ if [ "${aio}" = true -o "${worker}" = true ] ; then
113 add_kernel_option "skew_tick=1"
116 + # Add kernel option to enable efi runtime for arm64 on RT kernel
117 + uname_arch=$(uname -m)
118 + if [ "${lowlatency}" = true -a "${uname_arch}" = "aarch64" ] ; then
119 + add_kernel_option "efi=runtime"
122 elif [ "${controller}" = true ] ; then
124 ilog "Adding ${TRAIT__CONTROLLER} function kernel options"