distribution/packages/virtual/initramfs/package.mk

39 lines
1.2 KiB
Makefile
Raw Normal View History

2022-02-05 14:23:32 +00:00
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="initramfs"
PKG_VERSION=""
PKG_LICENSE="GPL"
PKG_SITE="http://www.openelec.tv"
PKG_URL=""
2022-07-02 20:56:42 +00:00
PKG_DEPENDS_TARGET="toolchain libc:init busybox:init linux:init plymouth-lite:init util-linux:init e2fsprogs:init dosfstools:init exfat:init fakeroot:host terminus-font:init"
2022-02-05 14:23:32 +00:00
PKG_SECTION="virtual"
2022-07-02 20:56:42 +00:00
PKG_LONGDESC="debug is a Metapackage for installing initramfs"
2022-02-05 14:23:32 +00:00
2022-07-02 20:56:42 +00:00
if [ "$ISCSI_SUPPORT" = yes ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET open-iscsi:init"
2022-02-05 14:23:32 +00:00
fi
2022-07-02 20:56:42 +00:00
if [ "$INITRAMFS_PARTED_SUPPORT" = yes ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET parted:init"
2022-02-05 14:23:32 +00:00
fi
post_install() {
2022-07-02 20:56:42 +00:00
( cd $BUILD/initramfs
if [ "$TARGET_ARCH" = "x86_64" ]; then
ln -sfn /usr/lib $BUILD/initramfs/lib64
mkdir -p $BUILD/initramfs/usr
ln -sfn /usr/lib $BUILD/initramfs/usr/lib64
fi
2022-02-05 14:23:32 +00:00
2022-07-02 20:56:42 +00:00
ln -sfn /usr/lib $BUILD/initramfs/lib
ln -sfn /usr/bin $BUILD/initramfs/bin
2022-02-05 14:23:32 +00:00
ln -sfn /usr/sbin $BUILD/initramfs/sbin
2022-07-02 20:56:42 +00:00
mkdir -p $BUILD/image/
2022-02-05 14:23:32 +00:00
fakeroot -- sh -c \
"mkdir -p dev; mknod -m 600 dev/console c 5 1; find . | cpio -H newc -ov -R 0:0 > $BUILD/image/initramfs.cpio"
)
2022-07-02 20:56:42 +00:00
}