mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-05 17:07:49 +00:00
Merge branch 'master' of github.com:OpenELEC/OpenELEC.tv
This commit is contained in:
commit
d250a41d08
3
Makefile
3
Makefile
@ -8,6 +8,9 @@ system:
|
||||
release:
|
||||
./scripts/image release
|
||||
|
||||
image:
|
||||
BUILD_IMAGE=yes ./scripts/image release
|
||||
|
||||
noobs:
|
||||
./scripts/image noobs
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="wlan-firmware"
|
||||
PKG_VERSION="0.0.13"
|
||||
PKG_VERSION="0.0.14"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="Free-to-use"
|
||||
|
@ -1,60 +0,0 @@
|
||||
diff --git a/xbmc/powermanagement/PowerManager.cpp b/xbmc/powermanagement/PowerManager.cpp
|
||||
index 26d7002..71c4bd4 100644
|
||||
--- a/xbmc/powermanagement/PowerManager.cpp
|
||||
+++ b/xbmc/powermanagement/PowerManager.cpp
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "Application.h"
|
||||
#include "cores/AudioEngine/AEFactory.h"
|
||||
#include "input/KeyboardStat.h"
|
||||
+#include "network/Network.h"
|
||||
#include "settings/GUISettings.h"
|
||||
#include "windowing/WindowingFactory.h"
|
||||
#include "utils/log.h"
|
||||
@@ -218,10 +219,34 @@ void CPowerManager::OnSleep()
|
||||
CAEFactory::Suspend();
|
||||
}
|
||||
|
||||
+void CPowerManager::WaitForNet()
|
||||
+{
|
||||
+ CLog::Log(LOGDEBUG, "%s: Waithing for first NIC to come up", __FUNCTION__);
|
||||
+
|
||||
+ const unsigned maxLoopCount = 50u;
|
||||
+ const unsigned sleepTimeMs = 200u;
|
||||
+
|
||||
+ for(unsigned i=0; i < 50; ++i)
|
||||
+ {
|
||||
+ CNetworkInterface* pIface = g_application.getNetwork().GetFirstConnectedInterface();
|
||||
+ if (pIface && pIface->IsEnabled() && pIface->IsConnected())
|
||||
+ {
|
||||
+ CLog::Log(LOGDEBUG, "%s: NIC is up after waiting %d ms", __FUNCTION__, i * sleepTimeMs);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ Sleep(sleepTimeMs);
|
||||
+ }
|
||||
+
|
||||
+ CLog::Log(LOGDEBUG, "%s: NIC did not come up within %d ms... Lets give up...", __FUNCTION__, maxLoopCount * sleepTimeMs);
|
||||
+}
|
||||
+
|
||||
void CPowerManager::OnWake()
|
||||
{
|
||||
CLog::Log(LOGNOTICE, "%s: Running resume jobs", __FUNCTION__);
|
||||
|
||||
+ WaitForNet();
|
||||
+
|
||||
// reset out timers
|
||||
g_application.ResetShutdownTimers();
|
||||
|
||||
diff --git a/xbmc/powermanagement/PowerManager.h b/xbmc/powermanagement/PowerManager.h
|
||||
index 0a9183c..714b5cc 100644
|
||||
--- a/xbmc/powermanagement/PowerManager.h
|
||||
+++ b/xbmc/powermanagement/PowerManager.h
|
||||
@@ -72,6 +72,8 @@ private:
|
||||
|
||||
void OnLowBattery();
|
||||
|
||||
+ void WaitForNet();
|
||||
+
|
||||
IPowerSyscall *m_instance;
|
||||
};
|
||||
|
@ -0,0 +1,74 @@
|
||||
From 7cd450bb2b8ea18277efff955202bf3b36573898 Mon Sep 17 00:00:00 2001
|
||||
From: verybadsoldier <vbs@springrts.de>
|
||||
Date: Sun, 1 Sep 2013 17:10:19 +0200
|
||||
Subject: [PATCH] After suspend wait for the first NIC to come up before
|
||||
continuing
|
||||
|
||||
---
|
||||
xbmc/powermanagement/PowerManager.cpp | 24 ++++++++++++++++++++++++
|
||||
xbmc/powermanagement/PowerManager.h | 2 ++
|
||||
2 files changed, 26 insertions(+)
|
||||
|
||||
diff --git a/xbmc/powermanagement/PowerManager.cpp b/xbmc/powermanagement/PowerManager.cpp
|
||||
index a68910b..8e93492 100644
|
||||
--- a/xbmc/powermanagement/PowerManager.cpp
|
||||
+++ b/xbmc/powermanagement/PowerManager.cpp
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "Application.h"
|
||||
#include "cores/AudioEngine/AEFactory.h"
|
||||
#include "input/KeyboardStat.h"
|
||||
+#include "network/Network.h"
|
||||
#include "settings/GUISettings.h"
|
||||
#include "windowing/WindowingFactory.h"
|
||||
#include "utils/log.h"
|
||||
@@ -207,6 +207,8 @@ void CPowerManager::OnWake()
|
||||
{
|
||||
CLog::Log(LOGNOTICE, "%s: Running resume jobs", __FUNCTION__);
|
||||
|
||||
+ WaitForNic();
|
||||
+
|
||||
// reset out timers
|
||||
g_application.ResetShutdownTimers();
|
||||
|
||||
@@ -254,3 +256,25 @@ void CPowerManager::OnLowBattery()
|
||||
|
||||
CAnnouncementManager::Announce(System, "xbmc", "OnLowBattery");
|
||||
}
|
||||
+
|
||||
+void CPowerManager::WaitForNic()
|
||||
+{
|
||||
+ CLog::Log(LOGDEBUG, "%s: Waithing for first NIC to come up", __FUNCTION__);
|
||||
+
|
||||
+ const unsigned maxLoopCount = 50u;
|
||||
+ const unsigned sleepTimeMs = 200u;
|
||||
+
|
||||
+ for(unsigned i=0; i < maxLoopCount; ++i)
|
||||
+ {
|
||||
+ CNetworkInterface* pIface = g_application.getNetwork().GetFirstConnectedInterface();
|
||||
+ if (pIface && pIface->IsEnabled() && pIface->IsConnected())
|
||||
+ {
|
||||
+ CLog::Log(LOGDEBUG, "%s: NIC is up after waiting %d ms", __FUNCTION__, i * sleepTimeMs);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ Sleep(sleepTimeMs);
|
||||
+ }
|
||||
+
|
||||
+ CLog::Log(LOGDEBUG, "%s: NIC did not come up within %d ms... Lets give up...", __FUNCTION__, maxLoopCount * sleepTimeMs);
|
||||
+}
|
||||
diff --git a/xbmc/powermanagement/PowerManager.h b/xbmc/powermanagement/PowerManager.h
|
||||
index deb4b66..476cdc1 100644
|
||||
--- a/xbmc/powermanagement/PowerManager.h
|
||||
+++ b/xbmc/powermanagement/PowerManager.h
|
||||
@@ -73,6 +73,8 @@ class CPowerManager : public IPowerEventsCallback
|
||||
|
||||
void OnLowBattery();
|
||||
|
||||
+ void WaitForNic();
|
||||
+
|
||||
IPowerSyscall *m_instance;
|
||||
};
|
||||
|
||||
--
|
||||
1.8.4
|
||||
|
@ -7,5 +7,5 @@ ConditionPathExists=!/storage/.cache/services/avahi.disabled
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/sh -c 'cp /usr/share/services/avahi.conf /storage/.cache/services'
|
||||
ExecStart=/bin/sh -c 'cp /usr/share/services/avahi.conf /storage/.cache/services/'
|
||||
RemainAfterExit=yes
|
||||
|
@ -7,5 +7,5 @@ ConditionPathExists=!/storage/.cache/services/samba.disabled
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/sh -c 'cp /usr/share/services/samba.conf /storage/.cache/services'
|
||||
ExecStart=/bin/sh -c 'cp /usr/share/services/samba.conf /storage/.cache/services/'
|
||||
RemainAfterExit=yes
|
||||
|
@ -7,5 +7,5 @@ ConditionPathExists=!/storage/.cache/services/crond.disabled
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/sh -c 'cp /usr/share/services/crond.conf /storage/.cache/services'
|
||||
ExecStart=/bin/sh -c 'cp /usr/share/services/crond.conf /storage/.cache/services/'
|
||||
RemainAfterExit=yes
|
||||
|
@ -26,3 +26,4 @@ d /var/media 0755 root root - -
|
||||
d /var/run 1777 root root - -
|
||||
|
||||
f /var/run/utmp 1777 root root - -
|
||||
d /storage/.cache/services 0755 root root - -
|
||||
|
@ -98,6 +98,8 @@ PKG_CONFIGURE_OPTS_TARGET="--disable-gtk-doc \
|
||||
--without-utempter \
|
||||
--without-systemdsystemunitdir"
|
||||
|
||||
PKG_CONFIGURE_OPTS_HOST="$PKG_CONFIGURE_OPTS_TARGET"
|
||||
|
||||
post_makeinstall_target() {
|
||||
rm -rf $INSTALL/usr/bin
|
||||
rm -rf $INSTALL/usr/sbin
|
||||
|
128
packages/tools/bcm2835-bootloader/image
Executable file
128
packages/tools/bcm2835-bootloader/image
Executable file
@ -0,0 +1,128 @@
|
||||
#!/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
|
||||
################################################################################
|
||||
|
||||
cleanup()
|
||||
{
|
||||
echo "image: cleanup..."
|
||||
umount /tmp/oe_image_install &>/dev/null || :
|
||||
losetup -d "$LOOP"
|
||||
[ -f /tmp/oe_image_install/ldlinux.sys ] && chattr -i /tmp/oe_image_install/ldlinux.sys || :
|
||||
rm -rf /tmp/oe_image_install
|
||||
exit
|
||||
}
|
||||
|
||||
trap cleanup SIGINT
|
||||
|
||||
# set variables
|
||||
SYSTEM_SIZE=128
|
||||
# 3STORAGE_SIZE must be >= 32 !
|
||||
STORAGE_SIZE=32
|
||||
DISK_SIZE=$(( $SYSTEM_SIZE + $STORAGE_SIZE ))
|
||||
DISK="$TARGET_IMG/$IMAGE_NAME.img"
|
||||
LOOP=$(losetup -f)
|
||||
|
||||
# ensure loopX not in use
|
||||
echo "image: next two errors can be ignored..."
|
||||
umount /tmp/oe_image_install >/dev/null || :
|
||||
umount "$LOOP" &>/dev/null >/dev/null || :
|
||||
losetup -d "$LOOP" &>/dev/null >/dev/null || :
|
||||
rm -rf /tmp/oe_image_install &>/dev/null
|
||||
|
||||
# create an image
|
||||
echo "image: creating new image: $DISK..."
|
||||
dd if=/dev/zero of="$DISK" bs=1M count="$DISK_SIZE"
|
||||
sync
|
||||
|
||||
# write a disklabel
|
||||
echo "image: creating partition table: $DISK..."
|
||||
losetup "$LOOP" "$DISK"
|
||||
parted -s "$LOOP" mklabel msdos
|
||||
sync
|
||||
|
||||
# create part1
|
||||
echo "image: creating par1 on $DISK..."
|
||||
SYSTEM_PART_END=$(( $SYSTEM_SIZE * 1024 * 1024 / 512 + 64 ))
|
||||
parted -s "$LOOP" -a min unit s mkpart primary fat32 64 $SYSTEM_PART_END
|
||||
parted -s "$LOOP" set 1 boot on
|
||||
|
||||
# create part2
|
||||
echo "image: creating part2 on $DISK..."
|
||||
STORAGE_PART_START=$(( $SYSTEM_PART_END + 1 ))
|
||||
parted -s "$LOOP" -a min unit s mkpart primary ext4 $STORAGE_PART_START 100%
|
||||
sync
|
||||
|
||||
# create filesystem on part1
|
||||
losetup -d "$LOOP"
|
||||
echo "image: creating filesystem on part1..."
|
||||
OFFSET=$(( 64 * 512 ))
|
||||
SIZELIMIT=$(( $SYSTEM_SIZE * 1024 * 1024 ))
|
||||
losetup -o $OFFSET --sizelimit $SIZELIMIT "$LOOP" "$DISK"
|
||||
mkfs.vfat "$LOOP"
|
||||
sync
|
||||
|
||||
# mount partition
|
||||
echo "image: mounting part1 on /tmp/oe_image_install..."
|
||||
mkdir -p /tmp/oe_image_install
|
||||
mount "$LOOP" /tmp/oe_image_install
|
||||
|
||||
# create bootloader configuration
|
||||
echo "image: creating bootloader configuration..."
|
||||
cat >/tmp/oe_image_install/cmdline.txt << EOF
|
||||
boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 quiet
|
||||
EOF
|
||||
|
||||
# copy files
|
||||
echo "image: copying files to part1..."
|
||||
cp $RELEASE_DIR/3rdparty/bootloader/bootcode.bin /tmp/oe_image_install
|
||||
cp $RELEASE_DIR/3rdparty/bootloader/fixup.dat /tmp/oe_image_install
|
||||
cp $RELEASE_DIR/3rdparty/bootloader/start.elf /tmp/oe_image_install
|
||||
cp $TARGET_IMG/$IMAGE_NAME.kernel /tmp/oe_image_install/kernel.img
|
||||
cp $TARGET_IMG/$IMAGE_NAME.system /tmp/oe_image_install/SYSTEM
|
||||
|
||||
# unmount part1
|
||||
echo "image: unmounting part1..."
|
||||
umount "$LOOP"
|
||||
sync
|
||||
|
||||
# create filesystem on part2
|
||||
losetup -d "$LOOP"
|
||||
echo "image: creating filesystem on part2..."
|
||||
OFFSET=$(( $STORAGE_PART_START * 512 ))
|
||||
losetup -o $OFFSET "$LOOP" "$DISK"
|
||||
mke2fs -q -t ext4 -m 0 "$LOOP"
|
||||
e2fsck -n "$LOOP"
|
||||
sync
|
||||
|
||||
# add resize mark
|
||||
echo "image: mounting part2 on /tmp/oe_image_install..."
|
||||
mount "$LOOP" /tmp/oe_image_install
|
||||
touch /tmp/oe_image_install/.please_resize_me
|
||||
echo "image: unmounting part2..."
|
||||
umount "$LOOP"
|
||||
sync
|
||||
|
||||
# gzip
|
||||
echo "image: compressing..."
|
||||
gzip $DISK
|
||||
|
||||
# cleanup
|
||||
cleanup
|
@ -28,3 +28,11 @@ mkdir -p $RELEASE_DIR/3rdparty/bootloader
|
||||
cp -PR $BUILD/bcm2835-bootloader-*/fixup_x.dat $RELEASE_DIR/3rdparty/bootloader/fixup.dat
|
||||
cp -PR $BUILD/bcm2835-bootloader-*/start_x.elf $RELEASE_DIR/3rdparty/bootloader/start.elf
|
||||
|
||||
if [ "$BUILD_IMAGE" = "yes" -a -x "$BOOTLOADER_DIR/image" ] ; then
|
||||
# variables used in image script must be passed
|
||||
sudo env \
|
||||
TARGET_IMG="$TARGET_IMG" \
|
||||
IMAGE_NAME="$IMAGE_NAME" \
|
||||
RELEASE_DIR="$RELEASE_DIR" \
|
||||
$BOOTLOADER_DIR/image
|
||||
fi
|
||||
|
@ -24,12 +24,30 @@
|
||||
|
||||
$SCRIPTS/build toolchain
|
||||
|
||||
LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"`
|
||||
|
||||
CFLAGS="$CFLAGS -I../libinstaller -I../libfat"
|
||||
|
||||
cd $PKG_BUILD
|
||||
|
||||
setup_toolchain host
|
||||
HOST_LDFLAGS=`echo $HOST_LDFLAGS | sed -e "s|-Wl,--as-needed||"`
|
||||
HOST_CFLAGS="$HOST_CFLAGS -I../libinstaller -I../libfat"
|
||||
|
||||
# TODO: fix
|
||||
cp $ROOT/$PKG_BUILD/com32/include/com32.h $ROOT/$TOOLCHAIN/include
|
||||
make clean
|
||||
make CC=$CC \
|
||||
AR=$AR \
|
||||
RANLIB="$RANLIB" \
|
||||
LDFLAGS="$HOST_LDFLAGS" \
|
||||
CFLAGS="$HOST_CFLAGS -fomit-frame-pointer -D_FILE_OFFSET_BITS=64" \
|
||||
installer
|
||||
|
||||
# TODO: fix
|
||||
cp $ROOT/$PKG_BUILD/extlinux/extlinux $ROOT/$PKG_BUILD/extlinux/extlinux.host
|
||||
|
||||
setup_toolchain target
|
||||
LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"`
|
||||
CFLAGS="$CFLAGS -I../libinstaller -I../libfat"
|
||||
|
||||
make clean
|
||||
make CC=$CC \
|
||||
AR=$AR \
|
||||
RANLIB="$RANLIB" \
|
||||
|
180
packages/tools/syslinux/image
Executable file
180
packages/tools/syslinux/image
Executable file
@ -0,0 +1,180 @@
|
||||
#!/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
|
||||
################################################################################
|
||||
|
||||
cleanup()
|
||||
{
|
||||
echo "image: cleanup..."
|
||||
umount /tmp/oe_image_install &>/dev/null || :
|
||||
losetup -d "$LOOP"
|
||||
[ -f /tmp/oe_image_install/ldlinux.sys ] && chattr -i /tmp/oe_image_install/ldlinux.sys || :
|
||||
rm -rf /tmp/oe_image_install
|
||||
exit
|
||||
}
|
||||
|
||||
trap cleanup SIGINT
|
||||
|
||||
# set variables
|
||||
SYSTEM_SIZE=256
|
||||
# 3STORAGE_SIZE must be >= 32 !
|
||||
STORAGE_SIZE=32
|
||||
DISK_SIZE=$(( $SYSTEM_SIZE + $STORAGE_SIZE ))
|
||||
DISK="$TARGET_IMG/$IMAGE_NAME.img"
|
||||
LOOP=$(losetup -f)
|
||||
|
||||
# ensure loopX not in use
|
||||
echo "image: next two errors can be ignored..."
|
||||
umount /tmp/oe_image_install >/dev/null || :
|
||||
umount "$LOOP" &>/dev/null >/dev/null || :
|
||||
losetup -d "$LOOP" &>/dev/null >/dev/null || :
|
||||
rm -rf /tmp/oe_image_install &>/dev/null
|
||||
|
||||
# create an image
|
||||
echo "image: creating new empty image: $DISK..."
|
||||
dd if=/dev/zero of="$DISK" bs=1M count="$DISK_SIZE"
|
||||
sync
|
||||
|
||||
# write a disklabel
|
||||
echo "image: creating new partition table: $DISK..."
|
||||
losetup "$LOOP" "$DISK"
|
||||
parted -s "$LOOP" mklabel msdos
|
||||
sync
|
||||
|
||||
# create part1
|
||||
echo "image: creating part1 on $DISK..."
|
||||
SYSTEM_PART_END=$(( $SYSTEM_SIZE * 1024 * 1024 / 512 + 64 ))
|
||||
parted -s "$LOOP" -a min unit s mkpart primary ext4 64 $SYSTEM_PART_END
|
||||
parted -s "$LOOP" set 1 boot on
|
||||
|
||||
# create part2
|
||||
echo "image: creating part2 on $DISK..."
|
||||
STORAGE_PART_START=$(( $SYSTEM_PART_END + 1 ))
|
||||
parted -s "$LOOP" -a min unit s mkpart primary ext4 $STORAGE_PART_START 100%
|
||||
sync
|
||||
|
||||
# write mbr
|
||||
echo "image: writing mbr..."
|
||||
MBR="$EXTLINUX_DIR/mbr/mbr.bin"
|
||||
if [ -n "$MBR" ]; then
|
||||
dd bs=440 count=1 conv=notrunc if="$MBR" of="$LOOP"
|
||||
fi
|
||||
sync
|
||||
|
||||
# create filesystem on part1
|
||||
losetup -d "$LOOP"
|
||||
echo "image: creating filesystem on part1..."
|
||||
OFFSET=$(( 64 * 512 ))
|
||||
SIZELIMIT=$(( $SYSTEM_SIZE * 1024 * 1024 ))
|
||||
losetup -o $OFFSET --sizelimit $SIZELIMIT "$LOOP" "$DISK"
|
||||
mke2fs -q -t ext4 -m 0 "$LOOP"
|
||||
tune2fs -U $UUID_SYSTEM "$LOOP"
|
||||
e2fsck -n "$LOOP"
|
||||
sync
|
||||
|
||||
# mount partition
|
||||
echo "image: mounting part1 on /tmp/oe_image_install..."
|
||||
mkdir -p /tmp/oe_image_install
|
||||
mount "$LOOP" /tmp/oe_image_install
|
||||
|
||||
# create bootloader configuration
|
||||
echo "image: creating bootloader configuration..."
|
||||
cat >/tmp/oe_image_install/syslinux.cfg << EOF
|
||||
UI vesamenu.c32
|
||||
PROMPT 0
|
||||
MENU TITLE Boot Menu
|
||||
MENU BACKGROUND splash.png
|
||||
TIMEOUT 50
|
||||
DEFAULT live
|
||||
|
||||
MENU WIDTH 70
|
||||
MENU MARGIN 15
|
||||
MENU ROWS 2
|
||||
MENU HSHIFT 4
|
||||
MENU VSHIFT 13
|
||||
MENU TIMEOUTROW 10
|
||||
MENU TABMSGROW 8
|
||||
MENU CMDLINEROW 8
|
||||
MENU HELPMSGROW 13
|
||||
MENU HELPMSGENDROW 26
|
||||
MENU CLEAR
|
||||
|
||||
MENU COLOR border 30;44 #40ffffff #00000000 std
|
||||
MENU COLOR title 1;36;44 #ff8bbfe3 #00000000 std
|
||||
MENU COLOR sel 7;37;40 #80f0f0f0 #ff606060 all
|
||||
MENU COLOR unsel 37;44 #50ffffff #00000000 std
|
||||
MENU COLOR help 37;40 #c0ffffff #a0000000 std
|
||||
MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std
|
||||
MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std
|
||||
MENU COLOR msg07 37;40 #90ffffff #a0000000 std
|
||||
MENU COLOR tabmsg 31;40 #ff868787 #00000000 std
|
||||
|
||||
LABEL installer
|
||||
MENU LABEL Run OpenELEC Installer
|
||||
KERNEL /KERNEL
|
||||
APPEND boot=UUID=$UUID_SYSTEM installer quiet vga=current
|
||||
|
||||
LABEL live
|
||||
MENU LABEL Run OpenELEC Live
|
||||
KERNEL /KERNEL
|
||||
APPEND boot=UUID=$UUID_SYSTEM disk=UUID=$UUID_STORAGE quiet vga=current
|
||||
EOF
|
||||
|
||||
# install extlinux
|
||||
echo "image: installing extlinux to part1..."
|
||||
$EXTLINUX_DIR/extlinux/extlinux.host --heads=4 --sector=32 -i /tmp/oe_image_install
|
||||
|
||||
# copy files
|
||||
echo "image: copying files to part1..."
|
||||
cp $TARGET_IMG/$IMAGE_NAME.kernel /tmp/oe_image_install/KERNEL
|
||||
cp $TARGET_IMG/$IMAGE_NAME.system /tmp/oe_image_install/SYSTEM
|
||||
cp $RELEASE_DIR/splash.png /tmp/oe_image_install
|
||||
cp $EXTLINUX_DIR/com32/menu/vesamenu.c32 /tmp/oe_image_install
|
||||
cp $EXTLINUX_DIR/com32/lib/libcom32.c32 /tmp/oe_image_install
|
||||
cp $EXTLINUX_DIR/com32/libutil/libutil.c32 /tmp/oe_image_install
|
||||
|
||||
# unmount part1
|
||||
echo "image: unmounting part1..."
|
||||
umount "$LOOP"
|
||||
sync
|
||||
|
||||
# create filesystem on part2
|
||||
losetup -d "$LOOP"
|
||||
echo "image: creating filesystem on part2..."
|
||||
OFFSET=$(( $STORAGE_PART_START * 512 ))
|
||||
losetup -o $OFFSET "$LOOP" "$DISK"
|
||||
mke2fs -q -t ext4 -m 0 "$LOOP"
|
||||
tune2fs -U $UUID_STORAGE "$LOOP"
|
||||
e2fsck -n "$LOOP"
|
||||
sync
|
||||
|
||||
echo "image: mounting part2 on /tmp/oe_image_install..."
|
||||
mount "$LOOP" /tmp/oe_image_install
|
||||
touch /tmp/oe_image_install/.please_resize_me
|
||||
echo "image: unmounting part2..."
|
||||
umount "$LOOP"
|
||||
sync
|
||||
|
||||
# gzip
|
||||
echo "image: compressing..."
|
||||
gzip $DISK
|
||||
|
||||
# cleanup
|
||||
cleanup
|
@ -26,7 +26,7 @@ PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://syslinux.zytor.com/"
|
||||
PKG_URL="http://www.kernel.org/pub/linux/utils/boot/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
PKG_DEPENDS=""
|
||||
PKG_BUILD_DEPENDS="toolchain util-linux e2fsprogs"
|
||||
PKG_BUILD_DEPENDS="toolchain util-linux:host util-linux e2fsprogs"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="tools"
|
||||
PKG_SHORTDESC="syslinux: Linux bootloader collection"
|
||||
|
@ -40,3 +40,19 @@ mkdir -p $RELEASE_DIR/3rdparty/syslinux/win32
|
||||
|
||||
mkdir -p $RELEASE_DIR/3rdparty/syslinux/win64
|
||||
cp -PR $BUILD/syslinux-*/win64/syslinux64.exe $RELEASE_DIR/3rdparty/syslinux/win64
|
||||
|
||||
if [ "$BUILD_IMAGE" = "yes" -a -x "$BOOTLOADER_DIR/image" ] ; then
|
||||
# variables used in image script must be passed
|
||||
EXTLINUX_DIR=$(ls -d $ROOT/$BUILD/syslinux-*/)
|
||||
UUID_SYSTEM=$(uuidgen)
|
||||
UUID_STORAGE=$(uuidgen)
|
||||
|
||||
sudo env \
|
||||
TARGET_IMG="$TARGET_IMG" \
|
||||
IMAGE_NAME="$IMAGE_NAME" \
|
||||
RELEASE_DIR="$RELEASE_DIR" \
|
||||
EXTLINUX_DIR="$EXTLINUX_DIR" \
|
||||
UUID_SYSTEM="$UUID_SYSTEM" \
|
||||
UUID_STORAGE="$UUID_STORAGE" \
|
||||
$BOOTLOADER_DIR/image
|
||||
fi
|
||||
|
@ -531,7 +531,7 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
|
||||
#
|
||||
# x86 CPU frequency scaling drivers
|
||||
#
|
||||
CONFIG_X86_INTEL_PSTATE=y
|
||||
# CONFIG_X86_INTEL_PSTATE is not set
|
||||
CONFIG_X86_PCC_CPUFREQ=m
|
||||
CONFIG_X86_ACPI_CPUFREQ=y
|
||||
CONFIG_X86_ACPI_CPUFREQ_CPB=y
|
||||
|
@ -521,7 +521,7 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
|
||||
#
|
||||
# x86 CPU frequency scaling drivers
|
||||
#
|
||||
CONFIG_X86_INTEL_PSTATE=y
|
||||
# CONFIG_X86_INTEL_PSTATE is not set
|
||||
CONFIG_X86_PCC_CPUFREQ=m
|
||||
CONFIG_X86_ACPI_CPUFREQ=y
|
||||
CONFIG_X86_ACPI_CPUFREQ_CPB=y
|
||||
|
@ -531,7 +531,7 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
|
||||
#
|
||||
# x86 CPU frequency scaling drivers
|
||||
#
|
||||
CONFIG_X86_INTEL_PSTATE=y
|
||||
# CONFIG_X86_INTEL_PSTATE is not set
|
||||
CONFIG_X86_PCC_CPUFREQ=m
|
||||
CONFIG_X86_ACPI_CPUFREQ=y
|
||||
CONFIG_X86_ACPI_CPUFREQ_CPB=y
|
||||
|
@ -513,7 +513,7 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
|
||||
#
|
||||
# x86 CPU frequency scaling drivers
|
||||
#
|
||||
CONFIG_X86_INTEL_PSTATE=y
|
||||
# CONFIG_X86_INTEL_PSTATE is not set
|
||||
CONFIG_X86_PCC_CPUFREQ=m
|
||||
CONFIG_X86_ACPI_CPUFREQ=y
|
||||
# CONFIG_X86_POWERNOW_K8 is not set
|
||||
|
@ -74,6 +74,9 @@ if [ -f $PKG_DIR/addon ]; then
|
||||
else
|
||||
CUST_ADDON_VERSION="$PKG_VERSION"
|
||||
fi
|
||||
if [ ! -z "$PKG_CUSTOM_ADDON_VERSION" ] ; then
|
||||
CUST_ADDON_VERSION="$PKG_CUSTOM_ADDON_VERSION"
|
||||
fi
|
||||
|
||||
if [ -f $PKG_DIR/source/default.py ]; then
|
||||
cp -R $PKG_DIR/source/* $ADDON_BUILD/$PKG_ADDON_ID
|
||||
|
@ -215,6 +215,8 @@ IMAGE_NAME="$DISTRONAME-$TARGET_VERSION"
|
||||
|
||||
# create release dir
|
||||
mkdir -p $RELEASE_DIR
|
||||
# remove n previous created release image
|
||||
rm -rf $TARGET_IMG/$IMAGE_NAME.img.gz
|
||||
if [ -n "$BOOTLOADER" ]; then
|
||||
BOOTLOADER_DIR=`find $PACKAGES -type d -name $BOOTLOADER 2>/dev/null`
|
||||
if [ -d "$BOOTLOADER_DIR"/files ]; then
|
||||
@ -262,11 +264,9 @@ IMAGE_NAME="$DISTRONAME-$TARGET_VERSION"
|
||||
|
||||
# remove an previous created release tarball
|
||||
rm -rf $TARGET_IMG/$IMAGE_NAME.tar
|
||||
rm -rf $TARGET_IMG/$IMAGE_NAME.tar.bz2 # to remove later
|
||||
|
||||
# create release tarball
|
||||
tar cf $TARGET_IMG/$IMAGE_NAME.tar -C target $IMAGE_NAME
|
||||
tar cjf $TARGET_IMG/$IMAGE_NAME.tar.bz2 -C target $IMAGE_NAME # to remove later
|
||||
|
||||
# cleanup release dir
|
||||
rm -rf $RELEASE_DIR
|
||||
|
Loading…
x
Reference in New Issue
Block a user