Add spec file for raspberrypi-kernel.
This commit is contained in:
parent
f5def1d5ac
commit
ab602e5aba
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
*.tar.gz
|
||||||
30
README.en.md
30
README.en.md
@ -1,22 +1,24 @@
|
|||||||
# raspberrypi-kernel
|
# raspberry-kernel
|
||||||
|
|
||||||
#### Description
|
#### Description
|
||||||
Kernel of Raspberry Pi
|
|
||||||
|
Kernel Image of Raspberry Pi.
|
||||||
|
|
||||||
|
kernel.tar.gz is from https://gitee.com/openeuler/raspberrypi-kernel. After you put your public ssh key into your account in gitee, you can get kernel.tar.gz with executing command `. SOURCE`.
|
||||||
|
|
||||||
#### Software Architecture
|
#### Software Architecture
|
||||||
Software architecture description
|
|
||||||
|
AArch64
|
||||||
|
|
||||||
#### Installation
|
#### Installation
|
||||||
|
|
||||||
1. xxxx
|
dnf install raspberrypi-kernel
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Instructions
|
#### Instructions
|
||||||
|
|
||||||
1. xxxx
|
1. The version of raspberrypi kernel end with `.raspi`.
|
||||||
2. xxxx
|
2. The module files is installed into /lib/modules.
|
||||||
3. xxxx
|
3. The image files and other files of kernel is installed into /usr/share/raspberrypi-kernel/.
|
||||||
|
|
||||||
#### Contribution
|
#### Contribution
|
||||||
|
|
||||||
@ -24,13 +26,3 @@ Software architecture description
|
|||||||
2. Create Feat_xxx branch
|
2. Create Feat_xxx branch
|
||||||
3. Commit your code
|
3. Commit your code
|
||||||
4. Create Pull Request
|
4. Create Pull Request
|
||||||
|
|
||||||
|
|
||||||
#### Gitee Feature
|
|
||||||
|
|
||||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
|
||||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
|
||||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
|
||||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
|
|||||||
26
README.md
26
README.md
@ -1,23 +1,23 @@
|
|||||||
# raspberrypi-kernel
|
# raspberrypi-kernel
|
||||||
|
|
||||||
#### 介绍
|
#### 介绍
|
||||||
Kernel of Raspberry Pi
|
Raspberry Pi 内核映像文件。
|
||||||
|
|
||||||
|
kernel.tar.gz 来自 https://gitee.com/openeuler/raspberrypi-kernel 仓库,将 SSH 公钥添加到 gitee.com 的账户中后,可通过执行 . SOURCE 来获取 kernel.tar.gz。
|
||||||
|
|
||||||
#### 软件架构
|
#### 软件架构
|
||||||
软件架构说明
|
|
||||||
|
|
||||||
|
AArch64
|
||||||
|
|
||||||
#### 安装教程
|
#### 安装教程
|
||||||
|
|
||||||
1. xxxx
|
dnf install raspberrypi-kernel
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 使用说明
|
#### 使用说明
|
||||||
|
|
||||||
1. xxxx
|
1. 内核版本号后缀增加 `.raspi` 标识。
|
||||||
2. xxxx
|
2. 内核模块安装在 /lib/modules 目录下。
|
||||||
3. xxxx
|
3. 内核映像文件等在 /usr/share/raspberrypi-kernel/ 目录下。
|
||||||
|
|
||||||
#### 参与贡献
|
#### 参与贡献
|
||||||
|
|
||||||
@ -25,13 +25,3 @@ Kernel of Raspberry Pi
|
|||||||
2. 新建 Feat_xxx 分支
|
2. 新建 Feat_xxx 分支
|
||||||
3. 提交代码
|
3. 提交代码
|
||||||
4. 新建 Pull Request
|
4. 新建 Pull Request
|
||||||
|
|
||||||
|
|
||||||
#### 码云特技
|
|
||||||
|
|
||||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
|
||||||
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
|
|
||||||
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
|
|
||||||
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
|
|||||||
1
SOURCE
Normal file
1
SOURCE
Normal file
@ -0,0 +1 @@
|
|||||||
|
git archive --format=tar.gz --prefix=kernel/ -o kernel.tar.gz --remote=git@gitee.com:openeuler/raspberrypi-kernel.git openEuler-20.03-LTS-raspi
|
||||||
96
raspberrypi-kernel.spec
Normal file
96
raspberrypi-kernel.spec
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
%global Arch $(echo %{_host_cpu} | sed -e s/i.86/x86/ -e s/x86_64/x86/ -e s/aarch64.*/arm64/)
|
||||||
|
|
||||||
|
%global KernelVer %{version}-%{release}.%{_target_cpu}
|
||||||
|
|
||||||
|
%global hulkrelease 2003.4.0
|
||||||
|
|
||||||
|
%global debug_package %{nil}
|
||||||
|
|
||||||
|
Name: raspberrypi-kernel
|
||||||
|
Version: 4.19.90
|
||||||
|
Release: %{hulkrelease}.0036.raspi
|
||||||
|
Summary: Linux Kernel
|
||||||
|
License: GPLv2
|
||||||
|
URL: http://www.kernel.org/
|
||||||
|
Source0: kernel.tar.gz
|
||||||
|
|
||||||
|
BuildRequires: module-init-tools, patch >= 2.5.4, bash >= 2.03, tar
|
||||||
|
BuildRequires: bzip2, xz, findutils, gzip, m4, perl, make >= 3.78, diffutils, gawk
|
||||||
|
BuildRequires: gcc >= 3.4.2, binutils >= 2.12
|
||||||
|
BuildRequires: hostname, net-tools, bc
|
||||||
|
BuildRequires: xmlto, asciidoc
|
||||||
|
BuildRequires: openssl-devel
|
||||||
|
BuildRequires: hmaccalc
|
||||||
|
BuildRequires: ncurses-devel
|
||||||
|
BuildRequires: elfutils-libelf-devel
|
||||||
|
BuildRequires: rpm >= 4.14.2
|
||||||
|
BuildRequires: elfutils-devel zlib-devel binutils-devel newt-devel python-devel perl(ExtUtils::Embed) bison
|
||||||
|
BuildRequires: audit-libs-devel
|
||||||
|
BuildRequires: pciutils-devel gettext
|
||||||
|
BuildRequires: rpm-build, elfutils
|
||||||
|
BuildRequires: numactl-devel python3-devel glibc-static python3-docutils
|
||||||
|
BuildRequires: perl-generators perl(Carp) libunwind-devel gtk2-devel libbabeltrace-devel java-1.8.0-openjdk
|
||||||
|
AutoReq: no
|
||||||
|
AutoProv: yes
|
||||||
|
|
||||||
|
Provides: raspberrypi-kernel-aarch64 = %{version}-%{release}
|
||||||
|
|
||||||
|
Requires: linux-firmware >= 20100806-2 raspberrypi-firmware >= 20200512
|
||||||
|
|
||||||
|
ExclusiveArch: aarch64
|
||||||
|
ExclusiveOS: Linux
|
||||||
|
|
||||||
|
%description
|
||||||
|
The Linux Kernel image for RaspberryPi.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n kernel-%{version} -c
|
||||||
|
mv kernel linux-%{version}
|
||||||
|
cp -rl linux-%{version} linux-%{KernelVer}
|
||||||
|
|
||||||
|
cd linux-%{KernelVer}
|
||||||
|
|
||||||
|
find . \( -name "*.orig" -o -name "*~" \) -exec rm -f {} \; >/dev/null
|
||||||
|
find . -name .gitignore -exec rm -f {} \; >/dev/null
|
||||||
|
|
||||||
|
%build
|
||||||
|
cd linux-%{KernelVer}
|
||||||
|
|
||||||
|
perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}.%{_target_cpu}/" Makefile
|
||||||
|
|
||||||
|
make ARCH=%{Arch} %{?_smp_mflags} openeuler-raspi_defconfig
|
||||||
|
make ARCH=%{Arch} dtbs
|
||||||
|
|
||||||
|
TargetImage=$(basename $(make -s image_name))
|
||||||
|
|
||||||
|
make ARCH=%{Arch} $TargetImage %{?_smp_mflags}
|
||||||
|
make ARCH=%{Arch} modules %{?_smp_mflags}
|
||||||
|
|
||||||
|
%install
|
||||||
|
cd linux-%{KernelVer}
|
||||||
|
|
||||||
|
## install linux
|
||||||
|
|
||||||
|
make ARCH=%{Arch} INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=%{KernelVer}
|
||||||
|
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/boot
|
||||||
|
install -m 755 $(make -s image_name) $RPM_BUILD_ROOT/boot/vmlinuz-%{KernelVer}
|
||||||
|
install -m 644 .config $RPM_BUILD_ROOT/boot/config-%{KernelVer}
|
||||||
|
install -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-%{KernelVer}
|
||||||
|
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/boot/dtb-%{KernelVer}/overlays
|
||||||
|
install -m 644 $(find arch/%{Arch}/boot/dts/broadcom/ -name "*.dtb") $RPM_BUILD_ROOT/boot/dtb-%{KernelVer}/
|
||||||
|
install -m 644 $(find arch/%{Arch}/boot/dts/overlays/ -name "*.dtbo") $RPM_BUILD_ROOT/boot/dtb-%{KernelVer}/overlays/
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr (-, root, root)
|
||||||
|
%doc
|
||||||
|
/boot/config-*
|
||||||
|
/boot/System.map-*
|
||||||
|
/boot/vmlinuz-*
|
||||||
|
/boot/dtb-*
|
||||||
|
/lib/modules/%{KernelVer}/
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Thu Jun 11 2020 EulixOS Buildteam <isrc-support@iscas.ac.cn> - 4.19.90-2003.4.0.0036-raspi
|
||||||
|
- Add spec file to generate RaspberryPi kernel image rpm.
|
||||||
Loading…
x
Reference in New Issue
Block a user