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"
|
2023-05-01 21:16:24 +00:00
|
|
|
PKG_VERSION=""
|
2022-02-05 14:23:32 +00:00
|
|
|
PKG_LICENSE="GPL"
|
|
|
|
PKG_SITE="http://www.openelec.tv"
|
|
|
|
PKG_URL=""
|
2023-10-17 13:25:37 +00:00
|
|
|
PKG_DEPENDS_TARGET="toolchain libc:init busybox:init util-linux:init e2fsprogs:init dosfstools:init exfat:init fakeroot:host spleen-font:init"
|
2022-02-05 14:23:32 +00:00
|
|
|
PKG_SECTION="virtual"
|
|
|
|
PKG_LONGDESC="debug is a Metapackage for installing initramfs"
|
|
|
|
|
2023-04-29 01:50:04 +00:00
|
|
|
if [ "${ISCSI_SUPPORT}" = yes ]; then
|
2023-02-24 13:53:43 +00:00
|
|
|
PKG_DEPENDS_TARGET="${PKG_DEPENDS_TARGET} open-iscsi:init"
|
2022-02-05 14:23:32 +00:00
|
|
|
fi
|
|
|
|
|
2023-04-29 01:50:04 +00:00
|
|
|
if [ "${INITRAMFS_PARTED_SUPPORT}" = yes ]; then
|
2023-02-24 13:53:43 +00:00
|
|
|
PKG_DEPENDS_TARGET="${PKG_DEPENDS_TARGET} parted:init"
|
2022-02-05 14:23:32 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
post_install() {
|
2023-04-29 01:50:04 +00:00
|
|
|
( cd ${BUILD}/initramfs
|
2023-02-24 13:53:43 +00:00
|
|
|
if [ "${TARGET_ARCH}" = "x86_64" ]; then
|
2023-04-29 01:50:04 +00:00
|
|
|
ln -sfn /usr/lib ${BUILD}/initramfs/lib64
|
|
|
|
mkdir -p ${BUILD}/initramfs/usr
|
|
|
|
ln -sfn /usr/lib ${BUILD}/initramfs/usr/lib64
|
2022-02-05 14:23:32 +00:00
|
|
|
fi
|
|
|
|
|
2023-04-29 01:50:04 +00:00
|
|
|
ln -sfn /usr/lib ${BUILD}/initramfs/lib
|
|
|
|
ln -sfn /usr/bin ${BUILD}/initramfs/bin
|
|
|
|
ln -sfn /usr/sbin ${BUILD}/initramfs/sbin
|
2022-02-05 14:23:32 +00:00
|
|
|
|
2023-04-29 01:50:04 +00:00
|
|
|
mkdir -p ${BUILD}/image/
|
2022-02-05 14:23:32 +00:00
|
|
|
fakeroot -- sh -c \
|
2023-04-29 01:50:04 +00:00
|
|
|
"mkdir -p dev; mknod -m 600 dev/console c 5 1; find . | cpio -H newc -ov -R 0:0 > ${BUILD}/image/initramfs.cpio"
|
2022-02-05 14:23:32 +00:00
|
|
|
)
|
|
|
|
}
|