Merge branch 'master' of github.com:OpenELEC/OpenELEC.tv into openelec-3.0

This commit is contained in:
Stephan Raue 2013-01-24 15:10:09 +01:00
commit 5e72c74419
16 changed files with 245 additions and 296 deletions

Binary file not shown.

View File

@ -1,55 +0,0 @@
.encoding = "UTF-8"
config.version = "8"
virtualHW.version = "7"
displayName = "OpenELEC.tv - VMWare build"
guestOS = "other26xlinux"
nvram = "OpenELEC.nvram"
numvcpus = "2"
memsize = "1024"
mks.enable3d = "TRUE"
virtualHW.productCompatibility = "hosted"
ide0:0.present = "TRUE"
ide0:0.fileName = "OpenELEC.flash"
ide0:1.present = "TRUE"
ide0:1.fileName = "OpenELEC.storage"
ide1:0.present = "TRUE"
ide1:0.autodetect = "TRUE"
ide1:0.startConnected = "FALSE"
ide1:0.deviceType = "cdrom-raw"
ide1:1.present = "FALSE"
scsi0.present = "FALSE"
floppy0.present = "FALSE"
ethernet0.present = "TRUE"
ethernet0.connectionType = "nat"
ethernet0.wakeOnPcktRcv = "FALSE"
ethernet0.addressType = "generated"
usb.present = "TRUE"
ehci.present = "TRUE"
sound.present = "TRUE"
sound.startConnected = "TRUE"
sound.fileName = "-1"
sound.autodetect = "TRUE"
extendedConfigFile = "OpenELEC.vmxf"
ethernet0.generatedAddress = "00:0c:29:39:05:27"
uuid.location = "56 4d 6b b5 e7 5c 8d 13-cc 60 70 2d 4f 39 05 27"
uuid.bios = "56 4d 6b b5 e7 5c 8d 13-cc 60 70 2d 4f 39 05 27"
cleanShutdown = "TRUE"
replay.supported = "FALSE"
replay.filename = ""
ide0:0.redo = ""
ide0:1.redo = ""
usb.pciSlotNumber = "16"
ethernet0.pciSlotNumber = "17"
sound.pciSlotNumber = "18"
ehci.pciSlotNumber = "19"
vmotion.checkpointFBSize = "134217728"
ethernet0.generatedAddressOffset = "0"
debugStub.linuxOffsets = "0x0,0xffffffff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"
tools.remindInstall = "TRUE"
ide1:0.fileName = "auto detect"

View File

@ -35,6 +35,7 @@ mkdir -p .objdir-host && cd .objdir-host
--sysconfdir=/etc \ --sysconfdir=/etc \
--libexecdir=/usr/sbin \ --libexecdir=/usr/sbin \
--localstatedir=/var/mysql \ --localstatedir=/var/mysql \
--with-zlib-dir="$ROOT/$TOOLCHAIN" \
make -C include my_config.h make -C include my_config.h
make -C mysys libmysys.a make -C mysys libmysys.a

View File

@ -26,7 +26,7 @@ PKG_LICENSE="LGPL"
PKG_SITE="http://www.mysql.com" PKG_SITE="http://www.mysql.com"
PKG_URL="" PKG_URL=""
PKG_DEPENDS="" PKG_DEPENDS=""
PKG_BUILD_DEPENDS="toolchain" PKG_BUILD_DEPENDS="toolchain zlib-host"
PKG_PRIORITY="optional" PKG_PRIORITY="optional"
PKG_SECTION="database" PKG_SECTION="database"
PKG_SHORTDESC="mysql: A database server" PKG_SHORTDESC="mysql: A database server"

View File

@ -32,6 +32,7 @@ ac_cv_file_dev_ptmx=yes \
ac_cv_func_lchflags_works=no \ ac_cv_func_lchflags_works=no \
ac_cv_func_chflags_works=no \ ac_cv_func_chflags_works=no \
ac_cv_func_printf_zd=yes \ ac_cv_func_printf_zd=yes \
ac_cv_buggy_getaddrinfo=no \
../configure --host=$TARGET_NAME \ ../configure --host=$TARGET_NAME \
--build=$HOST_NAME \ --build=$HOST_NAME \
--prefix=/usr \ --prefix=/usr \
@ -39,7 +40,7 @@ ac_cv_func_printf_zd=yes \
--enable-shared \ --enable-shared \
--with-threads \ --with-threads \
--enable-unicode=ucs4 \ --enable-unicode=ucs4 \
--disable-ipv6 \ --enable-ipv6 \
--disable-profiling \ --disable-profiling \
--without-pydebug \ --without-pydebug \
--without-doc-strings \ --without-doc-strings \
@ -85,7 +86,7 @@ INCLUDE_DIRS="$INCLUDE_DIRS email/mime encodings hotshot importlib json logging"
INCLUDE_DIRS="$INCLUDE_DIRS multiprocessing plat-linux2 sqlite3 xml xml/dom xml/etree" INCLUDE_DIRS="$INCLUDE_DIRS multiprocessing plat-linux2 sqlite3 xml xml/dom xml/etree"
INCLUDE_DIRS="$INCLUDE_DIRS xml/parsers xml/sax" INCLUDE_DIRS="$INCLUDE_DIRS xml/parsers xml/sax"
mkdir ./Lib mkdir -p ./Lib
cp ../Lib/*.py ./Lib cp ../Lib/*.py ./Lib
for dirs in $INCLUDE_DIRS; do for dirs in $INCLUDE_DIRS; do

View File

@ -31,7 +31,7 @@ fi
if [ "$DEVTOOLS" = "yes" ]; then if [ "$DEVTOOLS" = "yes" ]; then
DEVTOOLS_CONFIG="--enable-monitor --enable-test --enable-tools" DEVTOOLS_CONFIG="--enable-monitor --enable-test --enable-tools"
else else
DEVTOOLS_CONFIG="--disable-monitor --disable-test --disable-tools" DEVTOOLS_CONFIG="--disable-monitor --disable-test --enable-tools"
fi fi
cd $PKG_BUILD cd $PKG_BUILD

View File

@ -25,35 +25,45 @@
mkdir -p $INSTALL/etc/dbus-1/system.d mkdir -p $INSTALL/etc/dbus-1/system.d
cp $PKG_BUILD/src/bluetooth.conf $INSTALL/etc/dbus-1/system.d cp $PKG_BUILD/src/bluetooth.conf $INSTALL/etc/dbus-1/system.d
mkdir -p $INSTALL/lib/udev
cp $PKG_BUILD/tools/hid2hci $INSTALL/lib/udev
mkdir -p $INSTALL/lib/udev/rules.d
cp $PKG_BUILD/tools/97-hid2hci.rules $INSTALL/lib/udev/rules.d
mkdir -p $INSTALL/usr/lib
cp -P $PKG_BUILD/lib/.libs/libbluetooth.so* $INSTALL/usr/lib
mkdir -p $INSTALL/usr/lib/bluetooth mkdir -p $INSTALL/usr/lib/bluetooth
cp $PKG_BUILD/src/bluetoothd $INSTALL/usr/lib/bluetooth cp $PKG_BUILD/src/bluetoothd $INSTALL/usr/lib/bluetooth
cp $PKG_BUILD/obexd/src/obexd $INSTALL/usr/lib/bluetooth cp $PKG_BUILD/obexd/src/obexd $INSTALL/usr/lib/bluetooth
if [ "$DEVTOOLS" = "yes" ]; then mkdir -p $INSTALL/usr/lib
mkdir -p $INSTALL/usr/bin cp -P $PKG_BUILD/lib/.libs/libbluetooth.so* $INSTALL/usr/lib
cp $PKG_BUILD/tools/bccmd $INSTALL/usr/bin
cp $PKG_BUILD/client/bluetoothctl $INSTALL/usr/bin
cp $PKG_BUILD/monitor/btmon $INSTALL/usr/bin
cp $PKG_BUILD/tools/ciptool $INSTALL/usr/bin
cp $PKG_BUILD/tools/hciattach $INSTALL/usr/bin
cp $PKG_BUILD/tools/hciconfig $INSTALL/usr/bin
cp $PKG_BUILD/tools/hcidump $INSTALL/usr/bin
cp $PKG_BUILD/tools/hcitool $INSTALL/usr/bin
cp $PKG_BUILD/tools/l2ping $INSTALL/usr/bin
cp $PKG_BUILD/tools/l2test $INSTALL/usr/bin
cp $PKG_BUILD/tools/rctest $INSTALL/usr/bin
cp $PKG_BUILD/tools/rfcomm $INSTALL/usr/bin
cp $PKG_BUILD/tools/sdptool $INSTALL/usr/bin
# client
mkdir -p $INSTALL/usr/bin
cp $PKG_BUILD/client/bluetoothctl $INSTALL/usr/bin
# tools
mkdir -p $INSTALL/lib/udev
cp $PKG_BUILD/tools/hid2hci $INSTALL/lib/udev
mkdir -p $INSTALL/lib/udev/rules.d
cp $PKG_BUILD/tools/97-hid2hci.rules $INSTALL/lib/udev/rules.d
mkdir -p $INSTALL/usr/bin
cp $PKG_BUILD/tools/bccmd $INSTALL/usr/bin
cp $PKG_BUILD/tools/ciptool $INSTALL/usr/bin
cp $PKG_BUILD/tools/hciattach $INSTALL/usr/bin
cp $PKG_BUILD/tools/hciconfig $INSTALL/usr/bin
cp $PKG_BUILD/tools/hcidump $INSTALL/usr/bin
cp $PKG_BUILD/tools/hcitool $INSTALL/usr/bin
cp $PKG_BUILD/tools/l2ping $INSTALL/usr/bin
cp $PKG_BUILD/tools/l2test $INSTALL/usr/bin
cp $PKG_BUILD/tools/rctest $INSTALL/usr/bin
cp $PKG_BUILD/tools/rfcomm $INSTALL/usr/bin
cp $PKG_BUILD/tools/sdptool $INSTALL/usr/bin
# test
if [ "$DEVTOOLS" = "yes" ]; then
# monitor
mkdir -p $INSTALL/usr/bin
cp $PKG_BUILD/monitor/btmon $INSTALL/usr/bin
# test
mkdir -p $INSTALL/usr/lib/bluez/test mkdir -p $INSTALL/usr/lib/bluez/test
cp -P $PKG_BUILD/test/* $INSTALL/usr/lib/bluez/test cp -P $PKG_BUILD/test/* $INSTALL/usr/lib/bluez/test
chmod +x $INSTALL/usr/lib/bluez/test/* chmod +x $INSTALL/usr/lib/bluez/test/*

View File

@ -0,0 +1,13 @@
diff --git a/Makefile.org b/Makefile.org
index 55273ea..4e70281 100644
--- a/Makefile.org
+++ b/Makefile.org
@@ -537,7 +537,7 @@ dist:
dist_pem_h:
(cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean)
-install: all install_docs install_sw
+install: all install_sw
install_sw:
@$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \

View File

@ -1,53 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
cd $PKG_BUILD
ac_cv_func_malloc_0_nonnull=yes \
ac_cv_func_realloc_0_nonnull=yes \
./configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/bin \
--disable-lvm1_fallback \
--disable-static_link \
--disable-readline \
--enable-realtime \
--enable-debug \
--disable-profiling \
--enable-devmapper \
--disable-compat \
--enable-o_direct \
--enable-applib \
--enable-cmdlib \
--enable-pkgconfig \
--enable-fsadm \
--disable-dmeventd \
--disable-selinux \
--disable-nls \
make
$MAKEINSTALL
make DESTDIR=`pwd`/.install install

View File

@ -1,35 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
mkdir -p $INSTALL/etc/lvm
cp $PKG_BUILD/doc/example.conf $INSTALL/etc/lvm/lvm.conf
mkdir -p $INSTALL/usr/lib
cp -P $PKG_BUILD/libdm/ioctl/libdevmapper.so* $INSTALL/usr/lib
if [ "$DEVTOOLS" = yes ]; then
mkdir -p $INSTALL/usr/bin
cp $PKG_BUILD/tools/lvm $INSTALL/usr/bin
fi

View File

@ -1,36 +0,0 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="LVM2"
PKG_VERSION="2.02.98"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE=""
PKG_SITE="http://sources.redhat.com/lvm2/"
PKG_URL="ftp://sources.redhat.com/pub/lvm2/${PKG_NAME}.${PKG_VERSION}.tgz"
PKG_DEPENDS=""
PKG_BUILD_DEPENDS="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="system"
PKG_SHORTDESC="lvm2: Logical Volume Management (Version 2)"
PKG_LONGDESC="LVM includes all of the support for handling read/write operations on physical volumes (hard disks, RAID-Systems, magneto optical, etc., multiple devices (MD), see mdadd(8) or even loop devices, see losetup(8)), creating volume groups (kind of virtual disks) from one or more physical volumes and creating one or more logical volumes (kind of logical partitions) in volume groups. This 2nd version is based on device-mapper available in linux-2.6."
PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"

View File

@ -26,10 +26,8 @@ mkdir -p $INSTALL/etc/dbus-1/system.d
cp $PKG_BUILD/data/org.freedesktop.UDisks.conf $INSTALL/etc/dbus-1/system.d cp $PKG_BUILD/data/org.freedesktop.UDisks.conf $INSTALL/etc/dbus-1/system.d
mkdir -p $INSTALL/lib/udev mkdir -p $INSTALL/lib/udev
cp -P $PKG_BUILD/src/probers/udisks-dm-export $INSTALL/lib/udev
cp -P $PKG_BUILD/src/probers/udisks-part-id $INSTALL/lib/udev cp -P $PKG_BUILD/src/probers/udisks-part-id $INSTALL/lib/udev
cp -P $PKG_BUILD/src/probers/udisks-probe-ata-smart $INSTALL/lib/udev cp -P $PKG_BUILD/src/probers/udisks-probe-ata-smart $INSTALL/lib/udev
cp -P $PKG_BUILD/src/probers/udisks-probe-sas-expander $INSTALL/lib/udev
mkdir -p $INSTALL/lib/udev/rules.d mkdir -p $INSTALL/lib/udev/rules.d
# cp $PKG_BUILD/data/80-udisks.rules $INSTALL/lib/udev/rules.d # cp $PKG_BUILD/data/80-udisks.rules $INSTALL/lib/udev/rules.d

View File

@ -25,8 +25,8 @@ PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="http://www.freedesktop.org/wiki/Software/udisks" PKG_SITE="http://www.freedesktop.org/wiki/Software/udisks"
PKG_URL="http://hal.freedesktop.org/releases/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_URL="http://hal.freedesktop.org/releases/$PKG_NAME-$PKG_VERSION.tar.gz"
PKG_DEPENDS="sg3_utils systemd glib dbus dbus-glib parted LVM2 polkit libatasmart" PKG_DEPENDS="sg3_utils systemd glib dbus dbus-glib parted polkit libatasmart"
PKG_BUILD_DEPENDS="toolchain sg3_utils systemd glib dbus dbus-glib parted LVM2 polkit libatasmart" PKG_BUILD_DEPENDS="toolchain sg3_utils systemd glib dbus dbus-glib parted polkit libatasmart"
PKG_PRIORITY="optional" PKG_PRIORITY="optional"
PKG_SECTION="system" PKG_SECTION="system"
PKG_SHORTDESC="udisks: a modular hardware abstraction layer designed for use in Linux systems that is designed to simplify device management." PKG_SHORTDESC="udisks: a modular hardware abstraction layer designed for use in Linux systems that is designed to simplify device management."

View File

@ -0,0 +1,29 @@
diff --git a/configure.ac b/configure.ac
index 50c0fe2..1d67de7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -159,10 +159,6 @@ PKG_CHECK_MODULES(LIBPARTED, [libparted >= 1.8.8])
AC_SUBST(LIBPARTED_CFLAGS)
AC_SUBST(LIBPARTED_LIBS)
-PKG_CHECK_MODULES(DEVMAPPER, [devmapper >= 1.02])
-AC_SUBST(DEVMAPPER_CFLAGS)
-AC_SUBST(DEVMAPPER_LIBS)
-
have_lvm2=no
AC_ARG_ENABLE(lvm2, AS_HELP_STRING([--enable-lvm2], [enable LVM2 support]))
if test "x$enable_lvm2" = "xyes"; then
diff --git a/src/probers/Makefile.am b/src/probers/Makefile.am
index 06bb566..578b8ae 100644
--- a/src/probers/Makefile.am
+++ b/src/probers/Makefile.am
@@ -22,9 +22,7 @@ INCLUDES = \
udevhelperdir = $(slashlibdir)/udev
udevhelper_PROGRAMS = udisks-part-id \
- udisks-dm-export \
udisks-probe-ata-smart \
- udisks-probe-sas-expander \
$(NULL)
if HAVE_LVM2

View File

@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
################################################################################ ################################################################################
# Copyright (C) 2009-2010 OpenELEC.tv # This file is part of OpenELEC - http://www.openelec.tv
# http://www.openelec.tv # Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
# #
# This Program is free software; you can redistribute it and/or modify # This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -20,49 +20,94 @@
# http://www.gnu.org/copyleft/gpl.html # http://www.gnu.org/copyleft/gpl.html
################################################################################ ################################################################################
# usage: sudo ./create_virtualmachine <path> # usage: sudo ./create_virtualmachine <path> <size(MB)> [<type>] [system partition size(MB)]
# example: sudo ./create_virtualmachine /home/test/VM # example: sudo ./create_virtualmachine /home/test/VM 512 [vdi] [128]
if [ "$(id -u)" != "0" ]; then if [ "$(id -u)" != "0" ]; then
clear echo "##############################################################"
echo "#########################################################" echo "# please execute with 'sudo' or -DANGEROUS!!!- as root #"
echo "# please execute with 'sudo' or -DANGEROUS!!!- as root #" echo "# example: #"
echo "# example: sudo ./create_virtualmachine <path> #" echo "# sudo ./create_virtualmachine <path> <size(MB)> [<type>] #"
echo "#########################################################" echo "##############################################################"
exit 1 exit 1
fi fi
if [ -z "$1" ]; then if [ -z "$1" -o -z "$2" ]; then
clear echo "##############################################################"
echo "#########################################################" echo "# please execute as follows #"
echo "# please execute with target folder drive as option #" echo "# example: #"
echo "# example: sudo ./create_virtualmachine /home/test/VM/ #" echo "# sudo ./create_virtualmachine <path> <size(MB)> [<type>] #"
echo "#########################################################" echo "##############################################################"
exit 1 exit 1
fi fi
if [ ! -d "$1" ]; then
echo "##############################################################"
echo "# please create target directory #"
echo "# example: #"
echo "# mkdir <path> #"
echo "##############################################################"
exit 1
fi
if [ "$2" -lt "200" -o "$2" -gt "2048" ]; then
echo "##############################################################"
echo "# use a value between 200MB and 2048MB (2GB) #"
echo "# example: #"
echo "# sudo ./create_virtualmachine /home/test/VM 512 #"
echo "##############################################################"
exit 1
fi
if [ ! -z "$3" -a "$3" != "vdi" -a "$3" != "vmdk" ]; then
echo "##############################################################"
echo "# only vdi or vmdk types are supported #"
echo "# example: #"
echo "# sudo ./create_virtualmachine /home/test/VM 512 [vdi] #"
echo "##############################################################"
exit 1
elif [ "$3" = "vdi" ]; then
TYPE="vdi"
elif [ -z "$3" -o "$3" = "vmdk" ]; then
TYPE="vmdk"
fi
if [ -z "$4" ]; then
SYSTEM_SIZE=192
else
if [ "$4" -lt "128" -o "$4" -gt "1024" -o "$4" -gt "$2" ]; then
echo "##############################################################"
echo "# use a value between 128MB and 1024MB #"
echo "# example: #"
echo "# sudo ./create_virtualmachine /home/test/VM 512 [vdi] [256] #"
echo "##############################################################"
exit 1
else
SYSTEM_SIZE=$4
fi
fi
DISK="$1/OpenELEC.img" DISK="$1/OpenELEC.img"
VMDK="$1/OpenELEC.vmdk" IMAGE="$1/OpenELEC.$TYPE"
LOOP=$(losetup -f) LOOP=$(losetup -f)
DISK_SIZE=$2
STORAGE_SIZE=$(( $DISK_SIZE - $SYSTEM_SIZE ))
clear echo ""
echo "#########################################################" echo " folder: $1"
echo "# #" echo " loop: $LOOP"
echo "# OpenELEC.tv USB Installer #" echo " disk: $DISK"
echo "# #" echo " image: $IMAGE"
echo "#########################################################" echo " type: $TYPE"
echo "# #" echo " disk size: $DISK_SIZE MB"
echo "# This will wipe any data off your chosen drive #" echo " system size: $SYSTEM_SIZE MB"
echo "# Please read the instructions and use very carefully.. #" echo "storage size: $STORAGE_SIZE MB"
echo "# #"
echo "#########################################################"
# check for some required tools # check for some required tools
# this is needed to create a bootloader # this is needed to create a bootloader
which syslinux > /dev/null which syslinux > /dev/null
if [ "$?" = "1" ]; then if [ "$?" = "1" ]; then
clear
echo "#########################################################" echo "#########################################################"
echo "# #" echo "# #"
echo "# OpenELEC.tv missing tool - Installation will quit #" echo "# OpenELEC.tv missing tool - Installation will quit #"
@ -75,10 +120,24 @@ echo "#########################################################"
exit 1 exit 1
fi fi
# this is needed to create a bootloader
which extlinux > /dev/null
if [ "$?" = "1" ]; then
echo "#########################################################"
echo "# #"
echo "# OpenELEC.tv missing tool - Installation will quit #"
echo "# #"
echo "# We can't find the required tool \"extlinux\" #"
echo "# on your system. #"
echo "# Please install it via your package manager. #"
echo "# #"
echo "#########################################################"
exit 1
fi
# this is needed by syslinux # this is needed by syslinux
which mcopy > /dev/null which mcopy > /dev/null
if [ "$?" = "1" ]; then if [ "$?" = "1" ]; then
clear
echo "#########################################################" echo "#########################################################"
echo "# #" echo "# #"
echo "# OpenELEC.tv missing tool - Installation will quit #" echo "# OpenELEC.tv missing tool - Installation will quit #"
@ -96,7 +155,6 @@ echo "#########################################################"
# this is needed to partion the drive # this is needed to partion the drive
which parted > /dev/null which parted > /dev/null
if [ "$?" = "1" ]; then if [ "$?" = "1" ]; then
clear
echo "#########################################################" echo "#########################################################"
echo "# #" echo "# #"
echo "# OpenELEC.tv missing tool - Installation will quit #" echo "# OpenELEC.tv missing tool - Installation will quit #"
@ -109,10 +167,9 @@ echo "#########################################################"
exit 1 exit 1
fi fi
# this is needed fo convert harddisk image to vmdk format # this is needed fo convert harddisk image to vmdk or vdi format
which qemu-img > /dev/null which qemu-img > /dev/null
if [ "$?" = "1" ]; then if [ "$?" = "1" ]; then
clear
echo "#########################################################" echo "#########################################################"
echo "# #" echo "# #"
echo "# OpenELEC.tv missing tool - Installation will quit #" echo "# OpenELEC.tv missing tool - Installation will quit #"
@ -125,60 +182,44 @@ echo "#########################################################"
exit 1 exit 1
fi fi
# ensure loopX not in use
# check MD5 sums echo ""
echo "checking MD5 sum..." echo "next two errors can be ignored..."
sync
md5sumFailed()
{
clear
echo "#########################################################"
echo "# #"
echo "# OpenELEC.tv failed md5 check - Installation will quit #"
echo "# #"
echo "# Your original download was probably corrupt. #"
echo "# Please visit www.openelec.tv and get another copy #"
echo "# #"
echo "#########################################################"
exit 1
}
md5sum -c target/KERNEL.md5
if [ "$?" = "1" ]; then
md5sumFailed
fi
md5sum -c target/SYSTEM.md5
if [ "$?" = "1" ]; then
md5sumFailed
fi
# ensure loop0 not in use
umount "$LOOP" umount "$LOOP"
losetup -d "$LOOP" losetup -d "$LOOP"
# create an image # create an image
echo ""
echo "creating new empty harddisk image: $DISK..." echo "creating new empty harddisk image: $DISK..."
dd if=/dev/zero of="$DISK" bs=1M count=512 dd if=/dev/zero of="$DISK" bs=1M count="$DISK_SIZE"
# write a disklabel # write a disklabel
echo ""
echo "creating new partition table: $DISK..." echo "creating new partition table: $DISK..."
sync
losetup "$LOOP" "$DISK" losetup "$LOOP" "$DISK"
parted -s "$LOOP" mklabel msdos parted -s "$LOOP" mklabel msdos
# create partition1 # create partition1
echo ""
echo "creating partition1 on $DISK..." echo "creating partition1 on $DISK..."
parted -s "$LOOP" -a min unit s mkpart primary ext4 64 262208 SYSTEM_PART_END=$(( $SYSTEM_SIZE * 1024 * 1024 / 512 + 64 ))
parted -s "$LOOP" -a min unit s mkpart primary ext4 64 $SYSTEM_PART_END
# create partition2 # create partition2
echo ""
echo "creating partition2 on $DISK..." echo "creating partition2 on $DISK..."
parted -s "$LOOP" -a min unit s mkpart primary ext4 262209 100% STORAGE_PART_START=$(( $SYSTEM_PART_END + 1 ))
parted -s "$LOOP" -a min unit s mkpart primary ext4 $STORAGE_PART_START 100%
# make partition1 active (bootable) # make partition1 active (bootable)
echo ""
echo "marking partition1 active..." echo "marking partition1 active..."
parted -s "$LOOP" set 1 boot on parted -s "$LOOP" set 1 boot on
# write mbr # write mbr
echo ""
echo "writing mbr..." echo "writing mbr..."
if [ -f /usr/lib/syslinux/mbr.bin ]; then if [ -f /usr/lib/syslinux/mbr.bin ]; then
MBR="/usr/lib/syslinux/mbr.bin" # example: debian, ubuntu MBR="/usr/lib/syslinux/mbr.bin" # example: debian, ubuntu
@ -186,71 +227,106 @@ echo "#########################################################"
MBR="/usr/share/syslinux/mbr.bin" # example: fedora MBR="/usr/share/syslinux/mbr.bin" # example: fedora
else else
echo "Can't find syslinux's mbr.bin on Host OS" echo "Can't find syslinux's mbr.bin on Host OS"
exit 1
fi fi
if [ -n "$MBR" ]; then if [ -n "$MBR" ]; then
cat "$MBR" > "$LOOP" cat "$MBR" > "$LOOP"
fi fi
# create filesystem on partition1 # sync disk
echo "creating filesystem on partition1..." echo ""
losetup -d "$LOOP" echo "syncing disk..."
losetup -o 32768 --sizelimit 134218240 "$LOOP" "$DISK"
mke2fs -t ext4 -m 0 "$LOOP"
tune2fs -U random -L "System" "$LOOP"
sync sync
# create filesystem on partition1
echo ""
sync
losetup -d "$LOOP"
echo "creating filesystem on partition1..."
OFFSET=$(( 64 * 512 ))
SIZELIMIT=$(( $SYSTEM_SIZE * 1024 * 1024 ))
losetup -o $OFFSET --sizelimit $SIZELIMIT "$LOOP" "$DISK"
mke2fs -q -t ext4 -m 0 "$LOOP"
tune2fs -U random -L "System" "$LOOP"
sync
e2fsck -n "$LOOP"
# mount partition # mount partition
echo ""
echo "mounting partition1 on /tmp/vmware_install..." echo "mounting partition1 on /tmp/vmware_install..."
mkdir -p /tmp/vmware_install mkdir -p /tmp/vmware_install
mount "$LOOP" /tmp/vmware_install mount "$LOOP" /tmp/vmware_install
# create bootloader configuration # create bootloader configuration
echo ""
echo "creating bootloader configuration..." echo "creating bootloader configuration..."
echo "DEFAULT linux" > /tmp/vmware_install/syslinux.cfg cat >/tmp/vmware_install/syslinux.cfg << EOF
echo "PROMPT 0" >> /tmp/vmware_install/syslinux.cfg DEFAULT linux
echo " " >> /tmp/vmware_install/syslinux.cfg PROMPT 0
echo "LABEL linux" >> /tmp/vmware_install/syslinux.cfg
echo " KERNEL /KERNEL" >> /tmp/vmware_install/syslinux.cfg LABEL linux
echo " APPEND boot=LABEL=System disk=LABEL=Storage quiet ssh" >> /tmp/vmware_install/syslinux.cfg KERNEL /KERNEL
APPEND boot=LABEL=System disk=LABEL=Storage quiet ssh
EOF
# install extlinux # install extlinux
echo ""
echo "installing extlinux to partition1..." echo "installing extlinux to partition1..."
extlinux --heads=4 --sector=32 -i /tmp/vmware_install extlinux --heads=4 --sector=32 -i /tmp/vmware_install
# copy files # copy files
echo ""
echo "copying files to partition1..." echo "copying files to partition1..."
cp target/KERNEL /tmp/vmware_install cp target/KERNEL /tmp/vmware_install
cp target/SYSTEM /tmp/vmware_install cp target/SYSTEM /tmp/vmware_install
# sync disk # sync disk
echo ""
echo "syncing disk..." echo "syncing disk..."
sync sync
# unmount partition1 # unmount partition1
echo ""
echo "unmounting partition1..." echo "unmounting partition1..."
umount "$LOOP" umount "$LOOP"
sync sync
# create filesystem on partition2 # create filesystem on partition2
echo "creating filesystem on partition2..." echo ""
sync
losetup -d "$LOOP" losetup -d "$LOOP"
losetup -o 134251008 "$LOOP" "$DISK" echo "creating filesystem on partition2..."
mke2fs -t ext4 -m 0 "$LOOP" OFFSET=$(( $STORAGE_PART_START * 512 ))
losetup -o $OFFSET "$LOOP" "$DISK"
mke2fs -q -t ext4 -m 0 "$LOOP"
tune2fs -U random -L "Storage" "$LOOP" tune2fs -U random -L "Storage" "$LOOP"
sync sync
e2fsck -n "$LOOP"
# detach loop0 # detach loopX
sync
losetup -d "$LOOP" losetup -d "$LOOP"
# cleaning # cleaning
echo ""
echo "cleaning tempdir..." echo "cleaning tempdir..."
[ -f /tmp/vmware_install/ldlinux.sys ] && chattr -i /tmp/vmware_install/ldlinux.sys
rm -rf /tmp/vmware_install rm -rf /tmp/vmware_install
# convert image to vmdk # convert image to vmdk or vdi
echo "converting $DISK to vmdk format..." echo ""
qemu-img convert -O vmdk "$DISK" "$VMDK" echo "converting $DISK to $TYPE format..."
qemu-img convert -O $TYPE "$DISK" "$IMAGE"
rm -f "$DISK" rm -f "$DISK"
echo "...installation finished" # sync disk
echo ""
echo "syncing disk..."
sync
echo ""
echo "installation finished..."
echo ""

View File

@ -19,7 +19,7 @@
################################################################################ ################################################################################
PKG_NAME="xf86-video-vmware" PKG_NAME="xf86-video-vmware"
PKG_VERSION="12.0.2" PKG_VERSION="13.0.0"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="i386 x86_64" PKG_ARCH="i386 x86_64"
PKG_LICENSE="OSS" PKG_LICENSE="OSS"