From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 6 Sep 2017 16:37:35 +0300 From: "Dmitry V. Levin" To: ALT Devel discussion list Message-ID: <20170906133734.GE13205@altlinux.org> Mail-Followup-To: ALT Devel discussion list References: <20170904115640.GA30835@lks.home> <20170904160138.GC15438@altlinux.org> <20170904191842.GA24238@lks.home> <20170904213509.GA18856@altlinux.org> <20170906120909.GA8403@lks.home> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1sNVjLsmu1MXqwQ/" Content-Disposition: inline In-Reply-To: <20170906120909.GA8403@lks.home> Subject: Re: [devel] Q: postinst hook for firmware-* X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 13:37:36 -0000 Archived-At: List-Archive: List-Post: --1sNVjLsmu1MXqwQ/ Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 06, 2017 at 02:09:09PM +0200, Konstantin Lepikhov wrote: > Hi Dmitry! >=20 > On 09/05/2017, at 12:35:09 AM you wrote: >=20 > > > > > =F0=C1=CB=C5=D4=D9 kernel-image =CE=C5 =C4=A3=D2=C7=C1=C0=D4 make-i= nitrd =D3=C1=CD=CF=D3=D4=CF=D1=D4=C5=CC=D8=CE=CF, =D0=CF=CC=C1=C7=C1=D1=D3= =D8 =CE=C1 > > > > /usr/lib/rpm/boot_kernel.filetrigger; =C5=D3=CC=C9 =DC=D4=C9 =C6=C1= =CA=CC=D9 =D3=CB=CC=CF=CE=CE=D9 =D2=C1=D3=D0=CF=CC=DA=C1=D4=D8=D3=D1 > > > > =D0=CF =D0=C1=CB=C5=D4=C1=CD, =CD=CF=D6=C5=D4 =C2=D9=D4=D8, =CC=D5= =DE=DB=C5 =D0=CF=C4=CF=CA=C4=A3=D4 =C6=C1=CA=CC=D4=D2=C9=C7=C7=C5=D2? > > > =F4=C1=CB =C5=D3=CC=C9 =CD=CE=C5 =CE=D5=D6=CE=CF =D0=C5=D2=C5=C7=C5= =CE=C5=D2=C9=D4=D8 initrd, =D4=CF =D1 =CE=C5 =D0=D2=CF=D4=C9=D7 =C4=C5=D2= =CE=D5=D4=D8 =D4=CF=D4 =D6=C5 > > > boot_kernel.filetrigger. =E7=C4=C5 =DC=D4=CF =DA=C1=C4=C1=C5=D4=D3=D1= ? =F7=CE=D5=D4=D2=C9 rpm? > >=20 > > =F0=D2=D1=CD=CF =D7 boot_kernel.filetrigger; =DC=D4=CF =D0=C1=CB=C5=D4 = bootloader-utils. > =F0=CF=C4=CF=CA=C4=C5=D4 =CC=C9 =D4=C1=CB=CF=C5 =C9=DA=CD=C5=CE=C5=CE=C9= =C5? >=20 > --=20 > WBR et al. > >From c974d0d02c1275c600929b3590e6ef644a4e8159 Mon Sep 17 00:00:00 2001 > From: "Konstantin A. Lepikhov" > Date: Wed, 6 Sep 2017 13:49:26 +0200 > Subject: [PATCH] kernel.filetrigger: ucode support >=20 > We need to rebuild initramfs on CPU ucode changes otherwise everything > will continue use outdated version till next kernel update. > --- > kernel.filetrigger | 27 ++++++++++++++++++++++++++- > 1 file changed, 26 insertions(+), 1 deletion(-) >=20 > diff --git a/kernel.filetrigger b/kernel.filetrigger > index 9cdf01e..38ea249 100755 > --- a/kernel.filetrigger > +++ b/kernel.filetrigger > @@ -9,6 +9,7 @@ > BOOTDIR=3D/boot > VMLINUZ_PREFIX=3D/boot/vmlinuz > MODULES_PREFIX=3D/lib/modules > +UCODE_PREFIX=3D/lib/firmware > INITRD_AUTOUPDATE=3D > =20 > . /etc/sysconfig/installkernel > @@ -99,6 +100,27 @@ $VERSION" > last_added=3D"$VERSION" > } > =20 > +ucode_handled=3D > +handle_ucode() > +{ > + local f VENDOR VERSION > + f=3D"$1"; shift > + # filename format: $UCODE_PREFIX/-ucode/* > + VENDOR=3D${f#$UCODE_PREFIX/} > + VENDOR=3D${VENDOR%%-ucode/*} > + ucode_handled=3D"$ucode_handled $VENDOR" =D3=CF=C4=C5=D2=D6=C9=CD=CF=C5 ucode_handled =C4=C1=CC=D8=DB=C5 =D4=CF=CC= =D8=CB=CF =D0=D2=CF=D7=C5=D2=D1=C5=D4=D3=D1 =CE=C1 =CE=C5=D0=D5=D3=D4=CF=D4= =D5, =CD=CF=D6=CE=CF =DA=C1=D0=C9=D3=D9=D7=C1=D4=D8 =D4=D5=C4=C1 =DE=D4=CF-=D4= =CF =C2=CF=CC=C5=C5 =D0=D2=CF=D3=D4=CF=C5, =CE=C1=D0=D2=C9=CD=C5=D2, ucode_= handled=3D1 > + set +f set +f =C4=C1=CC=D8=DB=C5 =CE=C5 =C9=D3=D0=CF=CC=D8=DA=D5=C5=D4=D3=D1 =C9, = =D7=C9=C4=C9=CD=CF, =CE=C5 =CE=D5=D6=C5=CE. > + f=3D"$(readlink -e /boot/vmlinuz)" > + if [ -n "$f" -a -n "$kernel_versions_handled" ]; then > + VERSION=3D${f#$VMLINUZ_PREFIX-} > + case "$kernel_version_handled" in > + "* $VERSION*") > + ucode_handled=3D > + ;; > + esac > + fi =FC=D4=CF =CC=D5=DE=DB=C5 =C4=C5=CC=C1=D4=D8 =D7=D3=C5=C7=CF =CF=C4=C9=CE = =D2=C1=DA =D0=CF=D3=CC=C5 =CF=C2=D2=C1=C2=CF=D4=CB=C9 =C3=C9=CB=CC=C1 =D0= =CF =C6=C1=CA=CC=C1=CD. =E8=CF=D4=D1 =D0=CF=DE=C5=CD=D5 =DC=D4=CF =C9=D3=CB=CC=C0=DE=C5=CE=C9=C5 = =D3=C4=C5=CC=C1=CE=CF =C9=CD=C5=CE=CE=CF =C4=CC=D1 /boot/vmlinuz, =CE=C5=CF= =DE=C5=D7=C9=C4=CE=CF. > +} > + > while read f; do > case "$f" in > $VMLINUZ_PREFIX-[0-9].*-*-*) > @@ -107,10 +129,13 @@ while read f; do > $MODULES_PREFIX/*-*-*/*/*.ko*) > handle_module "$f" > ;; > + $UCODE_PREFIX/*-ucode/*) > + handle_ucode "$f" =F0=CF=CC=D5=DE=C1=C5=D4=D3=D1, =DE=D4=CF =DA=C4=C5=D3=D8 =C4=CF=D3=D4=C1= =D4=CF=DE=CE=CF =CE=C1=D0=C9=D3=C1=D4=D8 ucode_detected=3D1, > + ;; > esac > done =E1 =D3=C0=C4=C1 =D0=CF=CD=C5=D3=D4=C9=D4=D8 =D3=C2=D2=CF=D3 ucode_detected= =D7 =D3=CC=D5=DE=C1=C5, =C5=D3=CC=C9 =CF=CE =D5=D6=C5 =C2=D9=CC =CF=C2=D2= =C1=C2=CF=D4=C1=CE. > -if [ -n "$kernel_versions_handled" -a "$INITRD_AUTOUPDATE" =3D all ]; th= en > +if [ -n "$kernel_versions_handled" -o -n "$ucode_handled" ] && [ "$INITR= D_AUTOUPDATE" =3D all ]; then > set +f > ls -c $VMLINUZ_PREFIX-[0-9].*-*-* 2> /dev/null | while read f; do > [ "$f" !=3D "$(readlink -e /boot/vmlinuz)" ] || --=20 ldv --1sNVjLsmu1MXqwQ/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJZr/oeAAoJEAVFT+BVnCUIRBwQAJ/f/hkeJEikZi6Zq3tE9svm II5fjBLOk8xo+5L5o/Ir9nj/XfDv5SG3VnXegVZZqN81jrbV1SjJ/7zBIWaVMSI7 41VEKArIv+KbqgooAJTanjtdTe1R4olRXnOGPqu7MiUECJCeJIQ3TLumPEnCtvNL 77k8mSrsudiRuSWnfMLkueoUqrSroqMJxGhvhisSNV1/ytOAsagdsanlWwZMw7GH BiKuypIT7FswiHtm/XkoUtfGFEusa3cF65XMlG1isRXkDGlFG+jnpViYBEsmhDL+ 6EPc62TS88W96KV3A6lGzPt1uP77af+J9D8YO0oj7UEjLpbqAVrlxG0UQsGWZyl8 jUbsvaT/1RzBI3HkPxpsxsmM1jYVmcko5TNLKfv+sDbuosWDbc/aCTr5Of6H0wfr OJVrLofMfPJStSTSz8AW0s8O4P7I21k2LqVHEp4buOE+ZYLUAhV6a/exPYr2qCoa LgLv+aOwdmEvUPjqU1tIyRzANITdVxa6G916GqZdS4yg1AeTBK9s1LLTGK+P3q9C Lwu/JyJDzvBymJVuq0rVENzORGAJFZBpLtCys1dZVk7ychSAj3dYya1QGZFZMPqZ xbfhx3CRhZbDO+3jqmgchwvMFJlG99JreaWAaI8eE9V/w/jCxXtRBK+P/sBiB+Xc FW+eKyYoTVKsOxB60kjE =7kli -----END PGP SIGNATURE----- --1sNVjLsmu1MXqwQ/--