grub2: make grub2-bios-setup as a separate package
The grub2 and grub2-efi packages should only contain boot-related code. grub-bios-setup is the same as grub-editenv, they are both grub2 tools and should be placed in a separate package. Signed-off-by: 李国 <uxgood.org@gmail.com> [use AUTORELEASE and update to SPDX] Signed-off-by: Paul Spooren <mail@aparcar.org>
This commit is contained in:
parent
881fdb811f
commit
5876d6a62f
@ -200,6 +200,7 @@ menu "Target Images"
|
|||||||
depends on TARGET_x86
|
depends on TARGET_x86
|
||||||
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
|
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
|
||||||
select PACKAGE_grub2
|
select PACKAGE_grub2
|
||||||
|
select PACKAGE_grub2-bios-setup
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config GRUB_EFI_IMAGES
|
config GRUB_EFI_IMAGES
|
||||||
@ -208,6 +209,7 @@ menu "Target Images"
|
|||||||
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
|
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
|
||||||
select PACKAGE_grub2
|
select PACKAGE_grub2
|
||||||
select PACKAGE_grub2-efi
|
select PACKAGE_grub2-efi
|
||||||
|
select PACKAGE_grub2-bios-setup
|
||||||
select PACKAGE_kmod-fs-vfat
|
select PACKAGE_kmod-fs-vfat
|
||||||
default y
|
default y
|
||||||
|
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
#
|
#
|
||||||
# Copyright (C) 2006-2015 OpenWrt.org
|
# Copyright (C) 2006-2021 OpenWrt.org
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
@ -11,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||||||
PKG_NAME:=grub
|
PKG_NAME:=grub
|
||||||
PKG_CPE_ID:=cpe:/a:gnu:grub2
|
PKG_CPE_ID:=cpe:/a:gnu:grub2
|
||||||
PKG_VERSION:=2.06~rc1
|
PKG_VERSION:=2.06~rc1
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=$(AUTORELEASE)
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=https://alpha.gnu.org/gnu/grub
|
PKG_SOURCE_URL:=https://alpha.gnu.org/gnu/grub
|
||||||
@ -54,6 +51,20 @@ define Package/grub2-editenv/description
|
|||||||
Edit grub2 environment files.
|
Edit grub2 environment files.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/grub2-bios-setup
|
||||||
|
CATEGORY:=Utilities
|
||||||
|
SECTION:=utils
|
||||||
|
SUBMENU:=Boot Loaders
|
||||||
|
TITLE:=Grub2 BIOS boot setup tool
|
||||||
|
URL:=http://www.gnu.org/software/grub/
|
||||||
|
DEPENDS:=@TARGET_x86
|
||||||
|
VARIANT:=pc
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/grub2-bios-setup/description
|
||||||
|
Set up images to bootable.
|
||||||
|
endef
|
||||||
|
|
||||||
HOST_BUILD_PREFIX := $(STAGING_DIR_HOST)
|
HOST_BUILD_PREFIX := $(STAGING_DIR_HOST)
|
||||||
|
|
||||||
CONFIGURE_VARS += \
|
CONFIGURE_VARS += \
|
||||||
@ -93,8 +104,6 @@ define Host/Configure
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/grub2/install
|
define Package/grub2/install
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-bios-setup $(1)/usr/sbin/
|
|
||||||
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)/grub2
|
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)/grub2
|
||||||
$(CP) $(PKG_BUILD_DIR)/grub-core/boot.img $(STAGING_DIR_IMAGE)/grub2/
|
$(CP) $(PKG_BUILD_DIR)/grub-core/boot.img $(STAGING_DIR_IMAGE)/grub2/
|
||||||
$(CP) $(PKG_BUILD_DIR)/grub-core/cdboot.img $(STAGING_DIR_IMAGE)/grub2/
|
$(CP) $(PKG_BUILD_DIR)/grub-core/cdboot.img $(STAGING_DIR_IMAGE)/grub2/
|
||||||
@ -152,7 +161,13 @@ define Package/grub2-editenv/install
|
|||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/grub2-bios-setup/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-bios-setup $(1)/usr/sbin/
|
||||||
|
endef
|
||||||
|
|
||||||
$(eval $(call HostBuild))
|
$(eval $(call HostBuild))
|
||||||
$(eval $(call BuildPackage,grub2))
|
$(eval $(call BuildPackage,grub2))
|
||||||
$(eval $(call BuildPackage,grub2-efi))
|
$(eval $(call BuildPackage,grub2-efi))
|
||||||
$(eval $(call BuildPackage,grub2-editenv))
|
$(eval $(call BuildPackage,grub2-editenv))
|
||||||
|
$(eval $(call BuildPackage,grub2-bios-setup))
|
||||||
|
Loading…
Reference in New Issue
Block a user