diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..d1aad08219c4b46f5fda6b394b12f5998c50c1fe --- /dev/null +++ b/Makefile @@ -0,0 +1,34 @@ +# Makefile part of microcode_ctl package +# +# Copyright 2012 (c) Anton Arapov. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version +# 2 of the License, or (at your option) any later version. + +INS = install +CC = gcc +CFLAGS = -g -Wall -O2 + +DESTDIR = +PREFIX = /usr/local + +DOCDIR = $(PREFIX)/share/doc/microcode_ctl +MICDIR = /lib/firmware +MICDIRINTEL = $(MICDIR)/intel-ucode + +all: + +clean: + rm -rf intel-ucode + +install: + $(INS) -d $(DESTDIR)$(DOCDIR) \ + $(DESTDIR)$(MICDIRINTEL) + $(INS) -m 644 intel-ucode/* $(DESTDIR)$(MICDIRINTEL) + +uninstall: + rm -rf $(DESTDIR)$(MICDIRINTEL) \ + $(DESTDIR)$(DOCDIR) + diff --git a/README.md b/README.md deleted file mode 100644 index 7342728d557c602f51c6d278bba9f3dd9faaf356..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,11 +0,0 @@ -Anolis OS -======================================= -# 代码仓库说明 -## 分支说明 ->进行代码开发工作时,请注意选择当前版本对应的分支 -* aX分支为对应大版本的主分支,如a8分支对应当前最新版本 -* aX.Y分支为对应小版本的维护分支,如a8.2分支对应8.2版本 -## 开发流程 -1. 首先fork目标分支到自己的namespace -2. 在自己的fork分支上做出修改 -3. 向对应的仓库中提交merge request,源分支为fork分支 diff --git a/microcode-20220207.tar.gz b/microcode-20220207.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6ad3d5062158e517e281bae8dc379b518cb6cd12 Binary files /dev/null and b/microcode-20220207.tar.gz differ diff --git a/microcode_ctl.spec b/microcode_ctl.spec new file mode 100644 index 0000000000000000000000000000000000000000..32f00f25d4a7e893143761c508ab3ade2656745d --- /dev/null +++ b/microcode_ctl.spec @@ -0,0 +1,48 @@ +%define base_name microcode +%global debug_package %{nil} + +Summary: Tool to transform and deploy CPU microcode update for x86 +Name: %{base_name}_ctl +Version: 20220207 +Release: 1%{?dist} +License: GPLv2+ and Redistributable, no modification permitted +URL: https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files +Source0: https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/archive/refs/tags/%{base_name}-%{version}.tar.gz +Source1: Makefile +ExclusiveArch: x86_64 +BuildRequires: make + +%description +The microcode_ctl utility is a companion to the microcode driver written +by Tigran Aivazian . + +The microcode update is volatile and needs to be uploaded on each system +boot i.e. it doesn't reflash your cpu permanently, reboot and it reverts +back to the old microcode. + +%prep +%setup -T -q -c -n %{base_name}-%{version} +tar xf %{SOURCE0} --strip 1 */intel-ucode/* */intel-ucode-with-caveats/* \ + --one-top-level=intel-ucode --strip-components=2 --backup=simple +if [ $? -ne 0 ]; then + exit $? +fi + +cp -p %{SOURCE1} . +if [ $? -ne 0 ]; then + exit $? +fi + +%build +make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} + +%install +make DESTDIR=%{buildroot} PREFIX=%{_prefix} INSDIR=/usr/sbin install clean + +%files +/lib/firmware/* + + +%changelog +* Fri Mar 11 2022 Weitao Zhou - 20220207-1 +- Initial packaging, based upon upstream 20220207 release