syslinux: Package init
This commit is contained in:
parent
cae4ce0e0a
commit
047bb5f7c4
@ -0,0 +1,32 @@
|
||||
From ca745cdfc27b83b6bcef9f856d858a68c64429de Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Tue, 8 Apr 2014 15:28:12 -0400
|
||||
Subject: [PATCH] Add "install-all target" to top side of HAVE_FIRMWARE.
|
||||
|
||||
---
|
||||
Makefile | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index b472945..6606d31 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -275,6 +275,16 @@ efi64:
|
||||
FIRMWARE=EFI64 FWCLASS=EFI \
|
||||
$(MAKECMDGOALS)
|
||||
|
||||
+install-all:
|
||||
+
|
||||
+install:
|
||||
+
|
||||
+netinstall:
|
||||
+
|
||||
+clean:
|
||||
+
|
||||
+all:
|
||||
+
|
||||
else # FIRMWARE
|
||||
|
||||
all: all-local subdirs
|
||||
--
|
||||
2.5.5
|
||||
101
0002-ext4-64bit-feature.patch
Normal file
101
0002-ext4-64bit-feature.patch
Normal file
@ -0,0 +1,101 @@
|
||||
From af7e95c32cea40c1e443ae301e64b27f068b4915 Mon Sep 17 00:00:00 2001
|
||||
From: Paulo Alcantara <pcacjr@zytor.com>
|
||||
Date: Wed, 11 Oct 2017 07:00:31 -0400
|
||||
Subject: [PATCH] ext4: Fix 64bit feature
|
||||
|
||||
As per ext4 specification:
|
||||
|
||||
> In ext2, ext3, and ext4 (when the 64bit feature is not enabled), the
|
||||
> block group descriptor was only 32 bytes long and therefore ends at
|
||||
> bg_checksum. On an ext4 filesystem with the 64bit feature enabled, the
|
||||
> block group descriptor expands to at least the 64 bytes described below;
|
||||
> the size is stored in the superblock.
|
||||
|
||||
Since block group descriptor has been expanded to 64 bytes long (when 64
|
||||
bit feature is enabled), we cannot index ext2_group_desc and return it
|
||||
*directly* -- as we did it in ext2_get_group_desc -- it's still 32 bytes
|
||||
long.
|
||||
|
||||
Instead, use s_desc_size field from superblock to correctly index and
|
||||
return block group descriptors.
|
||||
|
||||
Cc: H. Peter Anvin <hpa@zytor.com>
|
||||
Cc: Gene Cumm <gene.cumm@gmail.com>
|
||||
Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
|
||||
---
|
||||
core/fs/ext2/ext2.c | 23 ++++++++++++++---------
|
||||
core/fs/ext2/ext2_fs.h | 1 +
|
||||
2 files changed, 15 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/core/fs/ext2/ext2.c b/core/fs/ext2/ext2.c
|
||||
index 76bd1d5..4bc0a53 100644
|
||||
--- a/core/fs/ext2/ext2.c
|
||||
+++ b/core/fs/ext2/ext2.c
|
||||
@@ -25,22 +25,17 @@ static enum dirent_type ext2_cvt_type(unsigned int d_file_type)
|
||||
return inode_type[d_file_type];
|
||||
}
|
||||
|
||||
-/*
|
||||
- * get the group's descriptor of group_num
|
||||
- */
|
||||
-static const struct ext2_group_desc *
|
||||
-ext2_get_group_desc(struct fs_info *fs, uint32_t group_num)
|
||||
+static const void *__ext2_get_group_desc(struct fs_info *fs, uint32_t group_num)
|
||||
{
|
||||
struct ext2_sb_info *sbi = EXT2_SB(fs);
|
||||
uint32_t desc_block, desc_index;
|
||||
- const struct ext2_group_desc *desc_data_block;
|
||||
+ uint8_t *p;
|
||||
|
||||
if (group_num >= sbi->s_groups_count) {
|
||||
printf ("ext2_get_group_desc"
|
||||
"block_group >= groups_count - "
|
||||
"block_group = %d, groups_count = %d",
|
||||
group_num, sbi->s_groups_count);
|
||||
-
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -49,8 +44,17 @@ ext2_get_group_desc(struct fs_info *fs, uint32_t group_num)
|
||||
|
||||
desc_block += sbi->s_first_data_block + 1;
|
||||
|
||||
- desc_data_block = get_cache(fs->fs_dev, desc_block);
|
||||
- return &desc_data_block[desc_index];
|
||||
+ p = get_cache(fs->fs_dev, desc_block);
|
||||
+ return p + sbi->s_desc_size * desc_index;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * get the group's descriptor of group_num
|
||||
+ */
|
||||
+static inline const struct ext2_group_desc *
|
||||
+ext2_get_group_desc(struct fs_info *fs, uint32_t group_num)
|
||||
+{
|
||||
+ return __ext2_get_group_desc(fs, group_num);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -306,6 +310,7 @@ static int ext2_fs_init(struct fs_info *fs)
|
||||
if (sb.s_desc_size < sizeof(struct ext2_group_desc))
|
||||
sb.s_desc_size = sizeof(struct ext2_group_desc);
|
||||
sbi->s_desc_per_block = BLOCK_SIZE(fs) / sb.s_desc_size;
|
||||
+ sbi->s_desc_size = sb.s_desc_size;
|
||||
sbi->s_groups_count = (sb.s_blocks_count - sb.s_first_data_block
|
||||
+ EXT2_BLOCKS_PER_GROUP(fs) - 1)
|
||||
/ EXT2_BLOCKS_PER_GROUP(fs);
|
||||
diff --git a/core/fs/ext2/ext2_fs.h b/core/fs/ext2/ext2_fs.h
|
||||
index 803a995..d8d07eb 100644
|
||||
--- a/core/fs/ext2/ext2_fs.h
|
||||
+++ b/core/fs/ext2/ext2_fs.h
|
||||
@@ -278,6 +278,7 @@ struct ext2_sb_info {
|
||||
uint32_t s_first_data_block; /* First Data Block */
|
||||
int s_inode_size;
|
||||
uint8_t s_uuid[16]; /* 128-bit uuid for volume */
|
||||
+ int s_desc_size; /* size of group descriptor */
|
||||
};
|
||||
|
||||
static inline struct ext2_sb_info *EXT2_SB(struct fs_info *fs)
|
||||
--
|
||||
2.7.4.GIT
|
||||
|
||||
32
0003-include-sysmacros-h.patch
Normal file
32
0003-include-sysmacros-h.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 1a74985b2a404639b08882c57f3147229605dfd5 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Frysinger <vapier@gentoo.org>
|
||||
Date: Tue, 19 Apr 2016 06:50:31 -0400
|
||||
Subject: [PATCH] extlinux: pull in sys/sysmacros.h for major/minor/makedev
|
||||
|
||||
These functions are defined in sys/sysmacros.h, so add the include to
|
||||
main.c. This is already handled correctly in mountinfo.c. Otherwise
|
||||
we get build failures like:
|
||||
|
||||
main.o: In function 'find_device_sysfs':
|
||||
extlinux/main.c:1131: undefined reference to 'minor'
|
||||
|
||||
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
||||
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
|
||||
---
|
||||
extlinux/main.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/extlinux/main.c b/extlinux/main.c
|
||||
index a7ebd49..ebff7ea 100644
|
||||
--- a/extlinux/main.c
|
||||
+++ b/extlinux/main.c
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <sysexits.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <sys/sysmacros.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/vfs.h>
|
||||
--
|
||||
2.10.5.GIT
|
||||
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
||||
# syslinux
|
||||
|
||||
#### Description
|
||||
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Contribution
|
||||
|
||||
1. Fork the repository
|
||||
2. Create Feat_xxx branch
|
||||
3. Commit your code
|
||||
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/)
|
||||
39
README.md
39
README.md
@ -1,39 +0,0 @@
|
||||
# syslinux
|
||||
|
||||
#### 介绍
|
||||
{**以下是码云平台说明,您可以替换此简介**
|
||||
码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
|
||||
无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
|
||||
|
||||
#### 软件架构
|
||||
软件架构说明
|
||||
|
||||
|
||||
#### 安装教程
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 使用说明
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
1. Fork 本仓库
|
||||
2. 新建 Feat_xxx 分支
|
||||
3. 提交代码
|
||||
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/)
|
||||
BIN
syslinux-6.04-pre1.tar.xz
Normal file
BIN
syslinux-6.04-pre1.tar.xz
Normal file
Binary file not shown.
167
syslinux.spec
Normal file
167
syslinux.spec
Normal file
@ -0,0 +1,167 @@
|
||||
%define _binaries_in_noarch_packages_terminate_build 0
|
||||
|
||||
Name: syslinux
|
||||
Version: 6.04
|
||||
Release: 1
|
||||
License: GPLv2+
|
||||
Summary: The Syslinux boot loader collection
|
||||
URL: http://syslinux.zytor.com/wiki/index.php/The_Syslinux_Project
|
||||
Source0: https://mirrors.edge.kernel.org/pub/linux/utils/boot/syslinux/Testing/6.04/syslinux-6.04-pre1.tar.xz
|
||||
ExclusiveArch: x86_64
|
||||
BuildRequires: nasm >= 0.98.38-1 perl-interpreter perl-generators netpbm-progs git glibc-devel libuuid-devel mingw64-gcc
|
||||
Requires: syslinux-nonlinux = %{version}-%{release} mtools
|
||||
|
||||
# Add install all target in top Makefile.
|
||||
# From: https://raw.githubusercontent.com/OpenMandrivaAssociation/syslinux/master/0001-Add-install-all-target-to-top-side-of-HAVE_FIRMWARE.patch
|
||||
Patch0001: 0001-Add-install-all-target-to-top-side-of-HAVE_FIRMWARE.patch
|
||||
|
||||
# Enable ext4 64bit feature.
|
||||
# From: https://raw.githubusercontent.com/JeffreyALaw/Fedora-syslinux/master/0002-ext4-64bit-feature.patch
|
||||
Patch0002: 0002-ext4-64bit-feature.patch
|
||||
|
||||
# Add include sysmacros.h to fixed building error.
|
||||
# Frome: https://raw.githubusercontent.com/JeffreyALaw/Fedora-syslinux/master/0003-include-sysmacros-h.patch
|
||||
Patch0003: 0003-include-sysmacros-h.patch
|
||||
|
||||
%description
|
||||
The Syslinux Project covers lightweight bootloaders for MS-DOS FAT filesystems (SYSLINUX),
|
||||
network booting (PXELINUX), bootable "El Torito" CD-ROMs (ISOLINUX), and Linux ext2/ext3/ext4
|
||||
or btrfs filesystems (EXTLINUX). The project also includes MEMDISK, a tool to boot legacy
|
||||
operating systems (such as DOS) from nontraditional media; it is usually used in conjunction
|
||||
with PXELINUX and ISOLINUX.
|
||||
|
||||
%package perl
|
||||
Summary: Tools for using syslinux
|
||||
|
||||
%description perl
|
||||
Tools for using syslinux.
|
||||
|
||||
%package devel
|
||||
Summary: Documentation for developing syslinux
|
||||
Provides: syslinux-static = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
Documentation for developing syslinux.
|
||||
|
||||
%package extlinux
|
||||
Summary: Modules for booting the local system
|
||||
Requires: syslinux syslinux-extlinux-nonlinux = %{version}-%{release}
|
||||
|
||||
%description extlinux
|
||||
Modules for booting the local system
|
||||
|
||||
%package tftpboot
|
||||
Summary: Modules for network booting
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: x86_64
|
||||
Requires: syslinux
|
||||
|
||||
%description tftpboot
|
||||
Modules for network booting
|
||||
|
||||
%package extlinux-nonlinux
|
||||
Summary: extlinux modules which aren't run from linux
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: x86_64
|
||||
Requires: syslinux
|
||||
|
||||
%description extlinux-nonlinux
|
||||
extlinux modules which aren't run from linux.
|
||||
|
||||
%package nonlinux
|
||||
Summary: syslinux modules which aren't run from linux
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: x86_64
|
||||
Requires: syslinux
|
||||
|
||||
%description nonlinux
|
||||
syslinux modules which aren't run from linux.
|
||||
|
||||
%package efi64
|
||||
Summary: Modules for 64-bit UEFI systems
|
||||
|
||||
%description efi64
|
||||
Modules for 64-bit UEFI systems.
|
||||
|
||||
%package help
|
||||
Summary: Help document for the syslinux
|
||||
Buildarch: noarch
|
||||
|
||||
%description help
|
||||
Help document for the syslinux package.
|
||||
|
||||
%prep
|
||||
%autosetup -n syslinux-6.04-pre1 -p1
|
||||
|
||||
%build
|
||||
make bios clean all
|
||||
make efi64 clean all
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
install -d %{buildroot}%{_bindir}
|
||||
install -d %{buildroot}/sbin
|
||||
install -d %{buildroot}%{_prefix}/lib/syslinux
|
||||
install -d %{buildroot}%{_includedir}
|
||||
make bios install-all INSTALLROOT=%{buildroot} BINDIR=%{_bindir} SBINDIR=/sbin \
|
||||
LIBDIR=%{_prefix}/lib DATADIR=%{_datadir} MANDIR=%{_mandir} INCDIR=%{_includedir} \
|
||||
TFTPBOOT=/tftpboot EXTLINUXDIR=/boot/extlinux LDLINUX=ldlinux.c32
|
||||
make efi64 install netinstall INSTALLROOT=%{buildroot} BINDIR=%{_bindir} SBINDIR=/sbin \
|
||||
LIBDIR=%{_prefix}/lib DATADIR=%{_datadir} MANDIR=%{_mandir} INCDIR=%{_includedir} \
|
||||
TFTPBOOT=/tftpboot EXTLINUXDIR=/boot/extlinux LDLINUX=ldlinux.c32
|
||||
install -d %{buildroot}%{_pkgdocdir}/sample
|
||||
install -m 644 sample/sample.* %{buildroot}%{_pkgdocdir}/sample/
|
||||
install -d %{buildroot}/etc
|
||||
( cd %{buildroot}/etc && ln -s ../boot/extlinux/extlinux.conf . )
|
||||
|
||||
%post extlinux
|
||||
if [ -f /boot/extlinux/extlinux.conf ]; then
|
||||
extlinux --update /boot/extlinux
|
||||
elif [ -f /boot/extlinux.conf ]; then
|
||||
mkdir -p /boot/extlinux && mv /boot/extlinux.conf /boot/extlinux/extlinux.conf && extlinux --update /boot/extlinux
|
||||
fi
|
||||
|
||||
%files
|
||||
%doc COPYING NEWS README*
|
||||
%{_bindir}/{gethostip,isohybrid,memdiskfind,syslinux}
|
||||
%dir %{_datadir}/syslinux/dosutil
|
||||
%{_datadir}/syslinux/dosutil/*
|
||||
%dir %{_datadir}/syslinux/diag
|
||||
%{_datadir}/syslinux/{diag/*,syslinux64.exe}
|
||||
%exclude %{_prefix}/lib/libsyslinux*
|
||||
%exclude %{_includedir}/syslinux.h
|
||||
|
||||
%files perl
|
||||
%doc COPYING
|
||||
%{_bindir}/{keytab-lilo,lss16toppm,md5pass,mkdiskimage,ppmtolss16,pxelinux-options,sha1pass,syslinux2ansi,isohybrid.pl}
|
||||
|
||||
%files devel
|
||||
%doc COPYING
|
||||
%dir %{_datadir}/syslinux/com32
|
||||
%{_datadir}/syslinux/com32/*
|
||||
|
||||
%files extlinux
|
||||
/sbin/extlinux
|
||||
%config /etc/extlinux.conf
|
||||
|
||||
%files tftpboot
|
||||
/tftpboot
|
||||
|
||||
%files nonlinux
|
||||
%{_datadir}/syslinux/{memdisk,*.com,*.exe,*.c32,*.bin,*.0}
|
||||
|
||||
%files extlinux-nonlinux
|
||||
/boot/extlinux
|
||||
|
||||
%files efi64
|
||||
%doc COPYING
|
||||
%dir %{_datadir}/syslinux/efi64
|
||||
%{_datadir}/syslinux/efi64
|
||||
|
||||
%files help
|
||||
%doc doc/* sample
|
||||
%{_mandir}/man1/{gethostip*,syslinux*,extlinux*,isohybrid*,memdiskfind*,lss16toppm*,ppmtolss16*,syslinux2ansi*}
|
||||
|
||||
%changelog
|
||||
* Thu Feb 27 2020 Ling Yang <lingyang2@huawei.com> - 6.04-1
|
||||
- Package Init
|
||||
Loading…
x
Reference in New Issue
Block a user