commit
56143d583b
5 changed files with 35 additions and 57 deletions
|
@ -10,7 +10,7 @@ RUN apt-get update \
|
|||
xmlstarlet patchutils gawk gperf xfonts-utils default-jre python xsltproc libjson-perl \
|
||||
lzop libncurses5-dev device-tree-compiler u-boot-tools rsync p7zip libparse-yapp-perl \
|
||||
zip binutils-aarch64-linux-gnu dos2unix p7zip-full libvpx-dev bsdmainutils bc meson p7zip-full \
|
||||
qemu-user-binfmt zstd \
|
||||
qemu-user-binfmt zstd parted \
|
||||
&& apt-get autoremove --purge -y \
|
||||
&& apt-get clean -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
||||
# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)
|
||||
#
|
||||
|
||||
PKG_NAME="parted"
|
||||
PKG_VERSION="3.2"
|
||||
PKG_SHA256="858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4"
|
||||
PKG_VERSION="3.5"
|
||||
PKG_SHA256="4938dd5c1c125f6c78b1f4b3e297526f18ee74aa43d45c248578b1d2470c05a2"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.gnu.org/software/parted/"
|
||||
PKG_URL="http://ftpmirror.gnu.org/parted/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS_HOST="toolchain util-linux:host"
|
||||
PKG_URL="http://ftpmirror.gnu.org/parted/${PKG_NAME}-${PKG_VERSION}.tar.xz"
|
||||
PKG_DEPENDS_HOST="toolchain:host util-linux:host"
|
||||
PKG_DEPENDS_TARGET="toolchain util-linux parted:host"
|
||||
PKG_DEPENDS_INIT="toolchain util-linux:init parted"
|
||||
PKG_LONGDESC="GNU Parted is a program for creating, destroying, resizing, checking and copying partitions."
|
||||
|
@ -18,7 +20,15 @@ PKG_CONFIGURE_OPTS_TARGET="--disable-device-mapper \
|
|||
--disable-rpath \
|
||||
--with-gnu-ld"
|
||||
|
||||
PKG_CONFIGURE_OPTS_HOST="$PKG_CONFIGURE_OPTS_TARGET"
|
||||
PKG_CONFIGURE_OPTS_HOST="${PKG_CONFIGURE_OPTS_TARGET}"
|
||||
|
||||
pre_configure_init() {
|
||||
: # reuse pre_configure_target()
|
||||
}
|
||||
|
||||
post_configure_init() {
|
||||
: # reuse post_configure_target()
|
||||
}
|
||||
|
||||
configure_init() {
|
||||
: # reuse configure_target()
|
||||
|
@ -29,7 +39,15 @@ make_init() {
|
|||
}
|
||||
|
||||
makeinstall_init() {
|
||||
mkdir -p $INSTALL/sbin
|
||||
cp ../.$TARGET_NAME/parted/parted $INSTALL/sbin
|
||||
cp ../.$TARGET_NAME/partprobe/partprobe $INSTALL/sbin
|
||||
mkdir -p ${INSTALL}/usr/sbin
|
||||
cp ../.${TARGET_NAME}/parted/parted ${INSTALL}/usr/sbin
|
||||
cp ../.${TARGET_NAME}/partprobe/partprobe ${INSTALL}/usr/sbin
|
||||
}
|
||||
|
||||
pre_configure_target() {
|
||||
export CFLAGS+=" -I${PKG_BUILD}/lib"
|
||||
}
|
||||
|
||||
post_configure_target() {
|
||||
libtool_remove_rpath libtool
|
||||
}
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
diff -Naur parted-3.2/libparted/arch/linux.c parted-3.2.patch/libparted/arch/linux.c
|
||||
--- parted-3.2/libparted/arch/linux.c 2014-06-15 21:15:54.000000000 +0200
|
||||
+++ parted-3.2.patch/libparted/arch/linux.c 2014-08-04 01:57:47.626611437 +0200
|
||||
@@ -2307,6 +2307,7 @@
|
||||
static char *
|
||||
dm_canonical_path (PedDevice const *dev)
|
||||
{
|
||||
+#ifdef ENABLE_DEVICE_MAPPER
|
||||
LinuxSpecific const *arch_specific = LINUX_SPECIFIC (dev);
|
||||
|
||||
/* Get map name from devicemapper */
|
||||
@@ -2324,6 +2325,7 @@
|
||||
dm_task_destroy (task);
|
||||
return dev_name;
|
||||
err:
|
||||
+#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -2944,13 +2946,14 @@
|
||||
unsigned long long *start,
|
||||
unsigned long long *length);
|
||||
|
||||
-
|
||||
+#ifdef ENABLE_DEVICE_MAPPER
|
||||
if (disk->dev->type == PED_DEVICE_DM) {
|
||||
add_partition = _dm_add_partition;
|
||||
remove_partition = _dm_remove_partition;
|
||||
resize_partition = _dm_resize_partition;
|
||||
get_partition_start_and_length = _dm_get_partition_start_and_length;
|
||||
} else {
|
||||
+#endif
|
||||
add_partition = _blkpg_add_partition;
|
||||
remove_partition = _blkpg_remove_partition;
|
||||
#ifdef BLKPG_RESIZE_PARTITION
|
||||
@@ -2959,7 +2962,9 @@
|
||||
resize_partition = NULL;
|
||||
#endif
|
||||
get_partition_start_and_length = _kernel_get_partition_start_and_length;
|
||||
+#ifdef ENABLE_DEVICE_MAPPER
|
||||
}
|
||||
+#endif
|
||||
|
||||
/* lpn = largest partition number.
|
||||
* for remove pass, use greater of device or label limit */
|
|
@ -23,7 +23,7 @@ fi
|
|||
|
||||
if [ "${PKG_SOC}" = "rk356x" ]
|
||||
then
|
||||
echo "uboot: copy fit/uboot.itb to uboot.img"
|
||||
echo "uboot: copy fit uboot image to ${INSTALL}/usr/share/bootloader..."
|
||||
cp -av uboot.img ${INSTALL}/usr/share/bootloader
|
||||
else
|
||||
echo "uboot: build loader image uboot.img at ${PKG_LOAD_ADDR}..."
|
||||
|
|
|
@ -64,8 +64,13 @@ if [ "${PARTITION_TABLE}" = "gpt" ] && [ "${BOOTLOADER}" = "u-boot" ]
|
|||
then
|
||||
echo "image: creating SPL partition(s)."
|
||||
/usr/sbin/parted -s "${DISK}" unit s mkpart uboot 16384 24575 >/dev/null 2>&1
|
||||
/usr/sbin/parted -s "${DISK}" unit s mkpart resource 24576 32767 >/dev/null 2>&1
|
||||
parted -s "${DISK}" set 1 boot on
|
||||
if [ -e "${RELEASE_DIR}/3rdparty/bootloader/trust.img" ]
|
||||
then
|
||||
/usr/sbin/parted -s "${DISK}" unit s mkpart trust 24576 32767 >/dev/null 2>&1
|
||||
elif [ -e "${RELEASE_DIR}/3rdparty/bootloader/resource.img" ]
|
||||
then
|
||||
/usr/sbin/parted -s "${DISK}" unit s mkpart resource 24576 32767 >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
# create part1
|
||||
|
|
Loading…
Reference in a new issue