mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
Merge branch 'master' of github.com:OpenELEC/OpenELEC.tv
This commit is contained in:
commit
e6f76e2786
3
Makefile
3
Makefile
@ -11,6 +11,9 @@ release:
|
|||||||
image:
|
image:
|
||||||
./scripts/image mkimage
|
./scripts/image mkimage
|
||||||
|
|
||||||
|
image-efi:
|
||||||
|
./scripts/image mkimage efi
|
||||||
|
|
||||||
noobs:
|
noobs:
|
||||||
./scripts/image noobs
|
./scripts/image noobs
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
PKG_NAME="vdr-iptv"
|
PKG_NAME="vdr-iptv"
|
||||||
PKG_VERSION="2.0.2"
|
PKG_VERSION="2.1.0"
|
||||||
PKG_REV="1"
|
PKG_REV="1"
|
||||||
PKG_ARCH="any"
|
PKG_ARCH="any"
|
||||||
PKG_LICENSE="GPL"
|
PKG_LICENSE="GPL"
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
PKG_NAME="vdr-plugin-dvbapi"
|
PKG_NAME="vdr-plugin-dvbapi"
|
||||||
PKG_VERSION="400879b"
|
PKG_VERSION="a3b4a5a"
|
||||||
PKG_REV="1"
|
PKG_REV="1"
|
||||||
PKG_ARCH="any"
|
PKG_ARCH="any"
|
||||||
PKG_LICENSE="GPL"
|
PKG_LICENSE="GPL"
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
PKG_NAME="vdr-plugin-vnsiserver"
|
PKG_NAME="vdr-plugin-vnsiserver"
|
||||||
PKG_VERSION="1b74f88"
|
PKG_VERSION="e5f02b6"
|
||||||
PKG_REV="1"
|
PKG_REV="1"
|
||||||
PKG_ARCH="any"
|
PKG_ARCH="any"
|
||||||
PKG_LICENSE="GPL"
|
PKG_LICENSE="GPL"
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
PKG_NAME="vdr-plugin-xvdr"
|
PKG_NAME="vdr-plugin-xvdr"
|
||||||
PKG_VERSION="089dd3c"
|
PKG_VERSION="7d6ebb7"
|
||||||
PKG_REV="1"
|
PKG_REV="1"
|
||||||
PKG_ARCH="any"
|
PKG_ARCH="any"
|
||||||
PKG_LICENSE="GPL"
|
PKG_LICENSE="GPL"
|
||||||
|
2
packages/3rdparty/multimedia/vdr/package.mk
vendored
2
packages/3rdparty/multimedia/vdr/package.mk
vendored
@ -18,7 +18,7 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
PKG_NAME="vdr"
|
PKG_NAME="vdr"
|
||||||
PKG_VERSION="2.1.4"
|
PKG_VERSION="2.1.5"
|
||||||
PKG_REV="1"
|
PKG_REV="1"
|
||||||
PKG_ARCH="any"
|
PKG_ARCH="any"
|
||||||
PKG_LICENSE="GPL"
|
PKG_LICENSE="GPL"
|
||||||
|
@ -1,282 +0,0 @@
|
|||||||
diff --git a/device.c b/device.c
|
|
||||||
index 9da5e7f..c9095b0 100644
|
|
||||||
--- a/device.c
|
|
||||||
+++ b/device.c
|
|
||||||
@@ -794,6 +794,7 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
|
|
||||||
if (SetChannelDevice(Channel, LiveView)) {
|
|
||||||
// Start section handling:
|
|
||||||
if (sectionHandler) {
|
|
||||||
+ patFilter->Trigger(Channel->Sid());
|
|
||||||
sectionHandler->SetChannel(Channel);
|
|
||||||
sectionHandler->SetStatus(true);
|
|
||||||
}
|
|
||||||
diff --git a/pat.c b/pat.c
|
|
||||||
index dabcead..a21b402 100644
|
|
||||||
--- a/pat.c
|
|
||||||
+++ b/pat.c
|
|
||||||
@@ -12,9 +12,8 @@
|
|
||||||
#include "channels.h"
|
|
||||||
#include "libsi/section.h"
|
|
||||||
#include "libsi/descriptor.h"
|
|
||||||
-#include "thread.h"
|
|
||||||
|
|
||||||
-#define PMT_SCAN_TIMEOUT 10 // seconds
|
|
||||||
+#define PMT_SCAN_TIMEOUT 1000 // ms
|
|
||||||
|
|
||||||
// --- cCaDescriptor ---------------------------------------------------------
|
|
||||||
|
|
||||||
@@ -273,94 +272,115 @@ int GetCaPids(int Source, int Transponder, int ServiceId, const int *CaSystemIds
|
|
||||||
|
|
||||||
// --- cPatFilter ------------------------------------------------------------
|
|
||||||
|
|
||||||
+//#define DEBUG_PAT_PMT//XXX
|
|
||||||
+#ifdef DEBUG_PAT_PMT
|
|
||||||
+#define DBGLOG(a...) { cString s = cString::sprintf(a); fprintf(stderr, "%s\n", *s); dsyslog("%s", *s); }
|
|
||||||
+#else
|
|
||||||
+#define DBGLOG(a...)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
cPatFilter::cPatFilter(void)
|
|
||||||
{
|
|
||||||
- pmtIndex = 0;
|
|
||||||
- pmtPid = 0;
|
|
||||||
- pmtSid = 0;
|
|
||||||
- lastPmtScan = 0;
|
|
||||||
- numPmtEntries = 0;
|
|
||||||
+ Trigger(0);
|
|
||||||
Set(0x00, 0x00); // PAT
|
|
||||||
}
|
|
||||||
|
|
||||||
void cPatFilter::SetStatus(bool On)
|
|
||||||
{
|
|
||||||
+ cMutexLock MutexLock(&mutex);
|
|
||||||
+ DBGLOG("PAT filter set status %d", On);
|
|
||||||
cFilter::SetStatus(On);
|
|
||||||
- pmtIndex = 0;
|
|
||||||
- pmtPid = 0;
|
|
||||||
- pmtSid = 0;
|
|
||||||
- lastPmtScan = 0;
|
|
||||||
- numPmtEntries = 0;
|
|
||||||
+ Trigger();
|
|
||||||
}
|
|
||||||
|
|
||||||
-void cPatFilter::Trigger(void)
|
|
||||||
+void cPatFilter::Trigger(int Sid)
|
|
||||||
{
|
|
||||||
+ cMutexLock MutexLock(&mutex);
|
|
||||||
+ patVersion = -1;
|
|
||||||
+ pmtIndex = -1;
|
|
||||||
numPmtEntries = 0;
|
|
||||||
+ if (Sid >= 0) {
|
|
||||||
+ sid = Sid;
|
|
||||||
+ DBGLOG("PAT filter trigger SID %d", Sid);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
-bool cPatFilter::PmtVersionChanged(int PmtPid, int Sid, int Version)
|
|
||||||
+bool cPatFilter::PmtVersionChanged(int PmtPid, int Sid, int Version, bool SetNewVersion)
|
|
||||||
{
|
|
||||||
- uint64_t v = Version;
|
|
||||||
- v <<= 32;
|
|
||||||
- uint64_t id = (PmtPid | (Sid << 16)) & 0x00000000FFFFFFFFLL;
|
|
||||||
+ int Id = MakePmtId(PmtPid, Sid);
|
|
||||||
for (int i = 0; i < numPmtEntries; i++) {
|
|
||||||
- if ((pmtVersion[i] & 0x00000000FFFFFFFFLL) == id) {
|
|
||||||
- bool Changed = (pmtVersion[i] & 0x000000FF00000000LL) != v;
|
|
||||||
- if (Changed)
|
|
||||||
- pmtVersion[i] = id | v;
|
|
||||||
- return Changed;
|
|
||||||
+ if (pmtId[i] == Id) {
|
|
||||||
+ if (pmtVersion[i] != Version) {
|
|
||||||
+ if (SetNewVersion)
|
|
||||||
+ pmtVersion[i] = Version;
|
|
||||||
+ else
|
|
||||||
+ DBGLOG("PMT %d %2d %5d %2d -> %2d", Transponder(), i, PmtPid, pmtVersion[i], Version);
|
|
||||||
+ return true;
|
|
||||||
+ }
|
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- if (numPmtEntries < MAXPMTENTRIES)
|
|
||||||
- pmtVersion[numPmtEntries++] = id | v;
|
|
||||||
- return true;
|
|
||||||
+ return false;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void cPatFilter::SwitchToNextPmtPid(void)
|
|
||||||
+{
|
|
||||||
+ if (pmtIndex >= 0) {
|
|
||||||
+ Del(GetPmtPid(pmtIndex), SI::TableIdPMT);
|
|
||||||
+ pmtIndex = (pmtIndex + 1) % numPmtEntries;
|
|
||||||
+ Add(GetPmtPid(pmtIndex), SI::TableIdPMT);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length)
|
|
||||||
{
|
|
||||||
+ cMutexLock MutexLock(&mutex);
|
|
||||||
if (Pid == 0x00) {
|
|
||||||
- if (Tid == 0x00) {
|
|
||||||
- if (pmtPid && time(NULL) - lastPmtScan > PMT_SCAN_TIMEOUT) {
|
|
||||||
- Del(pmtPid, 0x02);
|
|
||||||
- pmtPid = 0;
|
|
||||||
- pmtIndex++;
|
|
||||||
- lastPmtScan = time(NULL);
|
|
||||||
- }
|
|
||||||
- if (!pmtPid) {
|
|
||||||
- SI::PAT pat(Data, false);
|
|
||||||
- if (!pat.CheckCRCAndParse())
|
|
||||||
- return;
|
|
||||||
+ if (Tid == SI::TableIdPAT) {
|
|
||||||
+ SI::PAT pat(Data, false);
|
|
||||||
+ if (!pat.CheckCRCAndParse())
|
|
||||||
+ return;
|
|
||||||
+ if (pat.getVersionNumber() != patVersion) {
|
|
||||||
+ DBGLOG("PAT %d/%d %d %d -> %d", pat.getSectionNumber(), pat.getLastSectionNumber(), Transponder(), patVersion, pat.getVersionNumber());
|
|
||||||
+ if (pmtIndex >= 0) {
|
|
||||||
+ Del(GetPmtPid(pmtIndex), SI::TableIdPMT);
|
|
||||||
+ pmtIndex = -1;
|
|
||||||
+ }
|
|
||||||
+ numPmtEntries = 0;
|
|
||||||
SI::PAT::Association assoc;
|
|
||||||
- int Index = 0;
|
|
||||||
for (SI::Loop::Iterator it; pat.associationLoop.getNext(assoc, it); ) {
|
|
||||||
- if (!assoc.isNITPid()) {
|
|
||||||
- if (Index++ >= pmtIndex && Channels.GetByServiceID(Source(), Transponder(), assoc.getServiceId())) {
|
|
||||||
- pmtPid = assoc.getPid();
|
|
||||||
- pmtSid = assoc.getServiceId();
|
|
||||||
- Add(pmtPid, 0x02);
|
|
||||||
- break;
|
|
||||||
+ if (!assoc.isNITPid() && numPmtEntries < MAXPMTENTRIES) {
|
|
||||||
+ DBGLOG(" PMT pid %2d %5d SID %5d", numPmtEntries, assoc.getPid(), assoc.getServiceId());
|
|
||||||
+ pmtId[numPmtEntries] = MakePmtId(assoc.getPid(), assoc.getServiceId());
|
|
||||||
+ pmtVersion[numPmtEntries] = -1;
|
|
||||||
+ if (sid == assoc.getServiceId()) {
|
|
||||||
+ pmtIndex = numPmtEntries;
|
|
||||||
+ DBGLOG("sid = %d pmtIndex = %d", sid, pmtIndex);
|
|
||||||
}
|
|
||||||
+ numPmtEntries++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- if (!pmtPid)
|
|
||||||
+ if (numPmtEntries > 0 && pmtIndex < 0)
|
|
||||||
pmtIndex = 0;
|
|
||||||
+ Add(GetPmtPid(pmtIndex), SI::TableIdPMT);
|
|
||||||
+ patVersion = pat.getVersionNumber();
|
|
||||||
+ timer.Set(PMT_SCAN_TIMEOUT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- else if (Pid == pmtPid && Tid == SI::TableIdPMT && Source() && Transponder()) {
|
|
||||||
+ else if (Tid == SI::TableIdPMT && Source() && Transponder()) {
|
|
||||||
+ timer.Set(PMT_SCAN_TIMEOUT);
|
|
||||||
SI::PMT pmt(Data, false);
|
|
||||||
if (!pmt.CheckCRCAndParse())
|
|
||||||
return;
|
|
||||||
- if (pmt.getServiceId() != pmtSid)
|
|
||||||
- return; // skip broken PMT records
|
|
||||||
- if (!PmtVersionChanged(pmtPid, pmt.getTableIdExtension(), pmt.getVersionNumber())) {
|
|
||||||
- lastPmtScan = 0; // this triggers the next scan
|
|
||||||
+ if (!PmtVersionChanged(Pid, pmt.getTableIdExtension(), pmt.getVersionNumber())) {
|
|
||||||
+ SwitchToNextPmtPid();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
- if (!Channels.Lock(true, 10)) {
|
|
||||||
- numPmtEntries = 0; // to make sure we try again
|
|
||||||
+ if (!Channels.Lock(true, 10))
|
|
||||||
return;
|
|
||||||
- }
|
|
||||||
+ PmtVersionChanged(Pid, pmt.getTableIdExtension(), pmt.getVersionNumber(), true);
|
|
||||||
+ SwitchToNextPmtPid();
|
|
||||||
cChannel *Channel = Channels.GetByServiceID(Source(), Transponder(), pmt.getServiceId());
|
|
||||||
if (Channel) {
|
|
||||||
SI::CaDescriptor *d;
|
|
||||||
@@ -597,7 +617,12 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|
||||||
}
|
|
||||||
Channel->SetCaDescriptors(CaDescriptorHandler.AddCaDescriptors(CaDescriptors));
|
|
||||||
}
|
|
||||||
- lastPmtScan = 0; // this triggers the next scan
|
|
||||||
Channels.Unlock();
|
|
||||||
}
|
|
||||||
+ if (timer.TimedOut()) {
|
|
||||||
+ if (pmtIndex >= 0)
|
|
||||||
+ DBGLOG("PMT timeout %d", pmtIndex);
|
|
||||||
+ SwitchToNextPmtPid();
|
|
||||||
+ timer.Set(PMT_SCAN_TIMEOUT);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
diff --git a/pat.c.orig b/pat.c.orig
|
|
||||||
index 5246e07..dabcead 100644
|
|
||||||
--- a/pat.c.orig
|
|
||||||
+++ b/pat.c.orig
|
|
||||||
@@ -591,6 +591,7 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|
||||||
}
|
|
||||||
if (Setup.UpdateChannels >= 2) {
|
|
||||||
Channel->SetPids(Vpid, Ppid, Vtype, Apids, Atypes, ALangs, Dpids, Dtypes, DLangs, Spids, SLangs, Tpid);
|
|
||||||
+ if (!cSource::IsType(Channel->Source(), 'I'))
|
|
||||||
Channel->SetCaIds(CaDescriptors->CaIds());
|
|
||||||
Channel->SetSubtitlingDescriptors(SubtitlingTypes, CompositionPageIds, AncillaryPageIds);
|
|
||||||
}
|
|
||||||
diff --git a/pat.h b/pat.h
|
|
||||||
index 7f04575..f52b903 100644
|
|
||||||
--- a/pat.h
|
|
||||||
+++ b/pat.h
|
|
||||||
@@ -12,24 +12,30 @@
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include "filter.h"
|
|
||||||
+#include "thread.h"
|
|
||||||
|
|
||||||
#define MAXPMTENTRIES 64
|
|
||||||
|
|
||||||
class cPatFilter : public cFilter {
|
|
||||||
private:
|
|
||||||
- time_t lastPmtScan;
|
|
||||||
+ cMutex mutex;
|
|
||||||
+ cTimeMs timer;
|
|
||||||
+ int patVersion;
|
|
||||||
int pmtIndex;
|
|
||||||
- int pmtPid;
|
|
||||||
- int pmtSid;
|
|
||||||
- uint64_t pmtVersion[MAXPMTENTRIES];
|
|
||||||
+ int pmtId[MAXPMTENTRIES];
|
|
||||||
+ int pmtVersion[MAXPMTENTRIES];
|
|
||||||
int numPmtEntries;
|
|
||||||
- bool PmtVersionChanged(int PmtPid, int Sid, int Version);
|
|
||||||
+ int sid;
|
|
||||||
+ int GetPmtPid(int Index) { return pmtId[Index] & 0x0000FFFF; }
|
|
||||||
+ int MakePmtId(int PmtPid, int Sid) { return PmtPid | (Sid << 16); }
|
|
||||||
+ bool PmtVersionChanged(int PmtPid, int Sid, int Version, bool SetNewVersion = false);
|
|
||||||
+ void SwitchToNextPmtPid(void);
|
|
||||||
protected:
|
|
||||||
virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length);
|
|
||||||
public:
|
|
||||||
cPatFilter(void);
|
|
||||||
virtual void SetStatus(bool On);
|
|
||||||
- void Trigger(void);
|
|
||||||
+ void Trigger(int Sid = -1);
|
|
||||||
};
|
|
||||||
|
|
||||||
int GetCaDescriptors(int Source, int Transponder, int ServiceId, const int *CaSystemIds, int BufSize, uchar *Data, int EsPid);
|
|
||||||
diff --git a/sdt.c b/sdt.c
|
|
||||||
index c6d0ce5..1667e0f 100644
|
|
||||||
--- a/sdt.c
|
|
||||||
+++ b/sdt.c
|
|
||||||
@@ -94,7 +94,7 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|
||||||
}
|
|
||||||
else if (*pn && Setup.UpdateChannels >= 4) {
|
|
||||||
channel = Channels.NewChannel(Channel(), pn, ps, pp, sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId());
|
|
||||||
- patFilter->Trigger();
|
|
||||||
+ patFilter->Trigger(SiSdtService.getServiceId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
default: ;
|
|
||||||
@@ -120,7 +120,7 @@ void cSdtFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|
||||||
cChannel *link = Channels.GetByChannelID(tChannelID(Source(), Service.getOriginalNetworkId(), Service.getTransportStream(), Service.getServiceId()));
|
|
||||||
if (!link && Setup.UpdateChannels >= 4) {
|
|
||||||
link = Channels.NewChannel(Channel(), "NVOD", "", "", Service.getOriginalNetworkId(), Service.getTransportStream(), Service.getServiceId());
|
|
||||||
- patFilter->Trigger();
|
|
||||||
+ patFilter->Trigger(Service.getServiceId());
|
|
||||||
}
|
|
||||||
if (link) {
|
|
||||||
if (!LinkChannels)
|
|
@ -1,3 +1,10 @@
|
|||||||
|
4.1.3
|
||||||
|
- update to vdr-2.1.5
|
||||||
|
- update to vdr-iptv-2.1.0
|
||||||
|
- update to vdr-plugin-vnsiserver-e5f02b6
|
||||||
|
- update to vdr-plugin-dvbapi-a3b4a5a
|
||||||
|
- update to vdr-plugin-xvdr-7d6ebb7
|
||||||
|
|
||||||
4.1.2
|
4.1.2
|
||||||
- update to vdr-2.1.3
|
- update to vdr-2.1.3
|
||||||
- update to vdr-iptv-2.0.1
|
- update to vdr-iptv-2.0.1
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
PKG_NAME="vdr-addon"
|
PKG_NAME="vdr-addon"
|
||||||
PKG_VERSION="4.1"
|
PKG_VERSION="4.1"
|
||||||
PKG_REV="2"
|
PKG_REV="3"
|
||||||
PKG_ARCH="any"
|
PKG_ARCH="any"
|
||||||
PKG_LICENSE="GPL"
|
PKG_LICENSE="GPL"
|
||||||
PKG_SITE="http://www.openelec.tv"
|
PKG_SITE="http://www.openelec.tv"
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
PKG_NAME="dialog"
|
PKG_NAME="dialog"
|
||||||
PKG_VERSION="1.1-20120706"
|
PKG_VERSION="1.2-20140219"
|
||||||
PKG_REV="1"
|
PKG_REV="1"
|
||||||
PKG_ARCH="any"
|
PKG_ARCH="any"
|
||||||
PKG_LICENSE="GPL"
|
PKG_LICENSE="GPL"
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -71,12 +71,16 @@ make_host() {
|
|||||||
makeinstall_host() {
|
makeinstall_host() {
|
||||||
mkdir -p $ROOT/$TOOLCHAIN/bin
|
mkdir -p $ROOT/$TOOLCHAIN/bin
|
||||||
cp bios/extlinux/extlinux $ROOT/$TOOLCHAIN/bin
|
cp bios/extlinux/extlinux $ROOT/$TOOLCHAIN/bin
|
||||||
|
cp bios/linux/syslinux $ROOT/$TOOLCHAIN/bin
|
||||||
|
|
||||||
mkdir -p $ROOT/$TOOLCHAIN/share/syslinux
|
mkdir -p $ROOT/$TOOLCHAIN/share/syslinux
|
||||||
cp bios/com32/menu/vesamenu.c32 $ROOT/$TOOLCHAIN/share/syslinux
|
cp bios/com32/menu/vesamenu.c32 $ROOT/$TOOLCHAIN/share/syslinux
|
||||||
cp bios/com32/lib/libcom32.c32 $ROOT/$TOOLCHAIN/share/syslinux
|
cp bios/com32/lib/libcom32.c32 $ROOT/$TOOLCHAIN/share/syslinux
|
||||||
cp bios/com32/libutil/libutil.c32 $ROOT/$TOOLCHAIN/share/syslinux
|
cp bios/com32/libutil/libutil.c32 $ROOT/$TOOLCHAIN/share/syslinux
|
||||||
cp bios/mbr/mbr.bin $ROOT/$TOOLCHAIN/share/syslinux
|
cp bios/mbr/mbr.bin $ROOT/$TOOLCHAIN/share/syslinux
|
||||||
|
cp bios/mbr/gptmbr.bin $ROOT/$TOOLCHAIN/share/syslinux
|
||||||
|
cp efi64/efi/syslinux.efi $ROOT/$TOOLCHAIN/share/syslinux/bootx64.efi
|
||||||
|
cp efi64/com32/elflink/ldlinux/ldlinux.e64 $ROOT/$TOOLCHAIN/share/syslinux
|
||||||
}
|
}
|
||||||
|
|
||||||
makeinstall_target() {
|
makeinstall_target() {
|
||||||
@ -87,4 +91,6 @@ makeinstall_target() {
|
|||||||
mkdir -p $INSTALL/usr/share/syslinux
|
mkdir -p $INSTALL/usr/share/syslinux
|
||||||
cp bios/mbr/mbr.bin $INSTALL/usr/share/syslinux
|
cp bios/mbr/mbr.bin $INSTALL/usr/share/syslinux
|
||||||
cp bios/mbr/gptmbr.bin $INSTALL/usr/share/syslinux
|
cp bios/mbr/gptmbr.bin $INSTALL/usr/share/syslinux
|
||||||
|
cp efi64/efi/syslinux.efi $INSTALL/usr/share/syslinux/bootx64.efi
|
||||||
|
cp efi64/com32/elflink/ldlinux/ldlinux.e64 $INSTALL/usr/share/syslinux
|
||||||
}
|
}
|
||||||
|
@ -240,8 +240,8 @@
|
|||||||
# OpenGL-ES implementation to use (no)
|
# OpenGL-ES implementation to use (no)
|
||||||
OPENGLES="no"
|
OPENGLES="no"
|
||||||
|
|
||||||
# Windowmanager to use (ratpoison / none)
|
# Windowmanager to use (ratpoison / fluxbox / dwm / none)
|
||||||
WINDOWMANAGER="ratpoison"
|
WINDOWMANAGER="fluxbox"
|
||||||
|
|
||||||
# include uvesafb support (yes / no)
|
# include uvesafb support (yes / no)
|
||||||
UVESAFB_SUPPORT="no"
|
UVESAFB_SUPPORT="no"
|
||||||
|
@ -242,7 +242,7 @@
|
|||||||
# OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q)
|
# OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q)
|
||||||
OPENGLES="gpu-viv-bin-mx6q"
|
OPENGLES="gpu-viv-bin-mx6q"
|
||||||
|
|
||||||
# Windowmanager to use (ratpoison / none)
|
# Windowmanager to use (ratpoison / fluxbox / dwm / none)
|
||||||
WINDOWMANAGER="none"
|
WINDOWMANAGER="none"
|
||||||
|
|
||||||
# include uvesafb support (yes / no)
|
# include uvesafb support (yes / no)
|
||||||
|
@ -443,7 +443,7 @@ CONFIG_SCHED_HRTICK=y
|
|||||||
# CONFIG_KEXEC is not set
|
# CONFIG_KEXEC is not set
|
||||||
# CONFIG_CRASH_DUMP is not set
|
# CONFIG_CRASH_DUMP is not set
|
||||||
CONFIG_PHYSICAL_START=0x1000000
|
CONFIG_PHYSICAL_START=0x1000000
|
||||||
# CONFIG_RELOCATABLE is not set
|
CONFIG_RELOCATABLE=y
|
||||||
CONFIG_PHYSICAL_ALIGN=0x1000000
|
CONFIG_PHYSICAL_ALIGN=0x1000000
|
||||||
CONFIG_HOTPLUG_CPU=y
|
CONFIG_HOTPLUG_CPU=y
|
||||||
# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
|
# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
|
||||||
|
@ -240,8 +240,8 @@
|
|||||||
# OpenGL-ES implementation to use (no)
|
# OpenGL-ES implementation to use (no)
|
||||||
OPENGLES="no"
|
OPENGLES="no"
|
||||||
|
|
||||||
# Windowmanager to use (ratpoison / none)
|
# Windowmanager to use (ratpoison / fluxbox / dwm / none)
|
||||||
WINDOWMANAGER="ratpoison"
|
WINDOWMANAGER="fluxbox"
|
||||||
|
|
||||||
# include uvesafb support (yes / no)
|
# include uvesafb support (yes / no)
|
||||||
UVESAFB_SUPPORT="yes"
|
UVESAFB_SUPPORT="yes"
|
||||||
|
@ -241,7 +241,7 @@
|
|||||||
# OpenGL-ES implementation to use (no / bcm2835-driver)
|
# OpenGL-ES implementation to use (no / bcm2835-driver)
|
||||||
OPENGLES="bcm2835-driver"
|
OPENGLES="bcm2835-driver"
|
||||||
|
|
||||||
# Windowmanager to use (ratpoison / none)
|
# Windowmanager to use (ratpoison / fluxbox / dwm / none)
|
||||||
WINDOWMANAGER="none"
|
WINDOWMANAGER="none"
|
||||||
|
|
||||||
# include uvesafb support (yes / no)
|
# include uvesafb support (yes / no)
|
||||||
|
@ -235,8 +235,8 @@
|
|||||||
# OpenGL-ES implementation to use (no)
|
# OpenGL-ES implementation to use (no)
|
||||||
OPENGLES="no"
|
OPENGLES="no"
|
||||||
|
|
||||||
# Windowmanager to use (ratpoison / none)
|
# Windowmanager to use (ratpoison / fluxbox / dwm / none)
|
||||||
WINDOWMANAGER="ratpoison"
|
WINDOWMANAGER="fluxbox"
|
||||||
|
|
||||||
# include uvesafb support (yes / no)
|
# include uvesafb support (yes / no)
|
||||||
UVESAFB_SUPPORT="yes"
|
UVESAFB_SUPPORT="yes"
|
||||||
|
@ -278,6 +278,9 @@ IMAGE_NAME="$DISTRONAME-$TARGET_VERSION"
|
|||||||
|
|
||||||
# create image files if requested
|
# create image files if requested
|
||||||
if [ "$1" = "mkimage" -a -n "$BOOTLOADER" ]; then
|
if [ "$1" = "mkimage" -a -n "$BOOTLOADER" ]; then
|
||||||
|
if [ "$2" == "efi" ] ; then
|
||||||
|
UEFI=yes
|
||||||
|
fi
|
||||||
# variables used in image script must be passed
|
# variables used in image script must be passed
|
||||||
sudo env \
|
sudo env \
|
||||||
PATH="$PATH" \
|
PATH="$PATH" \
|
||||||
@ -289,6 +292,7 @@ IMAGE_NAME="$DISTRONAME-$TARGET_VERSION"
|
|||||||
RELEASE_DIR="$RELEASE_DIR" \
|
RELEASE_DIR="$RELEASE_DIR" \
|
||||||
UUID_SYSTEM="$(uuidgen)" \
|
UUID_SYSTEM="$(uuidgen)" \
|
||||||
UUID_STORAGE="$(uuidgen)" \
|
UUID_STORAGE="$(uuidgen)" \
|
||||||
|
UEFI="$UEFI" \
|
||||||
$SCRIPTS/mkimage
|
$SCRIPTS/mkimage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
fi
|
fi
|
||||||
STORAGE_SIZE=32 # STORAGE_SIZE must be >= 32 !
|
STORAGE_SIZE=32 # STORAGE_SIZE must be >= 32 !
|
||||||
|
|
||||||
DISK_SIZE=$(( $SYSTEM_SIZE + $STORAGE_SIZE ))
|
DISK_SIZE=$(( $SYSTEM_SIZE + $STORAGE_SIZE + 4 ))
|
||||||
DISK="$TARGET_IMG/$IMAGE_NAME.img"
|
DISK="$TARGET_IMG/$IMAGE_NAME.img"
|
||||||
|
|
||||||
# functions
|
# functions
|
||||||
@ -49,6 +49,14 @@
|
|||||||
|
|
||||||
trap cleanup SIGINT
|
trap cleanup SIGINT
|
||||||
|
|
||||||
|
# generate volume id for fat partition
|
||||||
|
if [ "$UEFI" = "yes" ] ; then
|
||||||
|
UUID_1=$(date '+%d%m')
|
||||||
|
UUID_2=$(date '+%M%S')
|
||||||
|
FAT_VOL_ID="${UUID_1}${UUID_2}"
|
||||||
|
UUID_SYSTEM="${UUID_1}-${UUID_2}"
|
||||||
|
fi
|
||||||
|
|
||||||
# ensure loopX not in use
|
# ensure loopX not in use
|
||||||
umount "$OE_TMP" &>/dev/null || :
|
umount "$OE_TMP" &>/dev/null || :
|
||||||
umount "$LOOP" &>/dev/null >/dev/null || :
|
umount "$LOOP" &>/dev/null >/dev/null || :
|
||||||
@ -62,29 +70,46 @@ trap cleanup SIGINT
|
|||||||
# write a disklabel
|
# write a disklabel
|
||||||
echo "image: creating partition table on $DISK..."
|
echo "image: creating partition table on $DISK..."
|
||||||
losetup "$LOOP" "$DISK"
|
losetup "$LOOP" "$DISK"
|
||||||
parted -s "$LOOP" mklabel msdos
|
if [ "$UEFI" = "yes" ] ; then
|
||||||
|
parted -s "$LOOP" mklabel gpt
|
||||||
|
else
|
||||||
|
parted -s "$LOOP" mklabel msdos
|
||||||
|
fi
|
||||||
sync
|
sync
|
||||||
|
|
||||||
# create part1
|
# create part1
|
||||||
echo "image: creating part1 on $DISK..."
|
echo "image: creating part1 on $DISK..."
|
||||||
SYSTEM_PART_END=$(( $SYSTEM_SIZE * 1024 * 1024 / 512 + 64 ))
|
SYSTEM_PART_END=$(( $SYSTEM_SIZE * 1024 * 1024 / 512 + 2048 ))
|
||||||
if [ "$BOOTLOADER" = "syslinux" ]; then
|
if [ "$BOOTLOADER" = "syslinux" ]; then
|
||||||
parted -s "$LOOP" -a min unit s mkpart primary ext4 64 $SYSTEM_PART_END
|
if [ "$UEFI" = "yes" ] ; then
|
||||||
|
parted -s "$LOOP" -a min unit s mkpart primary fat32 2048 $SYSTEM_PART_END
|
||||||
|
else
|
||||||
|
parted -s "$LOOP" -a min unit s mkpart primary ext4 2048 $SYSTEM_PART_END
|
||||||
|
fi
|
||||||
elif [ "$BOOTLOADER" = "bcm2835-bootloader" ]; then
|
elif [ "$BOOTLOADER" = "bcm2835-bootloader" ]; then
|
||||||
parted -s "$LOOP" -a min unit s mkpart primary fat32 64 $SYSTEM_PART_END
|
parted -s "$LOOP" -a min unit s mkpart primary fat32 2048 $SYSTEM_PART_END
|
||||||
|
fi
|
||||||
|
if [ "$UEFI" = "yes" ] ; then
|
||||||
|
parted -s "$LOOP" set 1 legacy_boot on
|
||||||
|
else
|
||||||
|
parted -s "$LOOP" set 1 boot on
|
||||||
fi
|
fi
|
||||||
parted -s "$LOOP" set 1 boot on
|
|
||||||
|
|
||||||
# create part2
|
# create part2
|
||||||
echo "image: creating part2 on $DISK..."
|
echo "image: creating part2 on $DISK..."
|
||||||
STORAGE_PART_START=$(( $SYSTEM_PART_END + 1 ))
|
STORAGE_PART_START=$(( $SYSTEM_PART_END + 2048 ))
|
||||||
parted -s "$LOOP" -a min unit s mkpart primary ext4 $STORAGE_PART_START 100%
|
STORAGE_PART_END=$(( $STORAGE_PART_START + (( $STORAGE_SIZE * 1024 * 1024 / 512 )) ))
|
||||||
|
parted -s "$LOOP" -a min unit s mkpart primary ext4 $STORAGE_PART_START $STORAGE_PART_END
|
||||||
sync
|
sync
|
||||||
|
|
||||||
if [ "$BOOTLOADER" = "syslinux" ]; then
|
if [ "$BOOTLOADER" = "syslinux" ]; then
|
||||||
# write mbr
|
# write mbr
|
||||||
echo "image: writing mbr..."
|
echo "image: writing mbr..."
|
||||||
MBR="$ROOT/$TOOLCHAIN/share/syslinux/mbr.bin"
|
if [ "$UEFI" = "yes" ] ; then
|
||||||
|
MBR="$ROOT/$TOOLCHAIN/share/syslinux/gptmbr.bin"
|
||||||
|
else
|
||||||
|
MBR="$ROOT/$TOOLCHAIN/share/syslinux/mbr.bin"
|
||||||
|
fi
|
||||||
if [ -n "$MBR" ]; then
|
if [ -n "$MBR" ]; then
|
||||||
dd bs=440 count=1 conv=notrunc if="$MBR" of="$LOOP"
|
dd bs=440 count=1 conv=notrunc if="$MBR" of="$LOOP"
|
||||||
fi
|
fi
|
||||||
@ -94,13 +119,17 @@ fi
|
|||||||
# create filesystem on part1
|
# create filesystem on part1
|
||||||
losetup -d "$LOOP"
|
losetup -d "$LOOP"
|
||||||
echo "image: creating filesystem on part1..."
|
echo "image: creating filesystem on part1..."
|
||||||
OFFSET=$(( 64 * 512 ))
|
OFFSET=$(( 2048 * 512 ))
|
||||||
SIZELIMIT=$(( $SYSTEM_SIZE * 1024 * 1024 ))
|
SIZELIMIT=$(( $SYSTEM_SIZE * 1024 * 1024 ))
|
||||||
losetup -o $OFFSET --sizelimit $SIZELIMIT "$LOOP" "$DISK"
|
losetup -o $OFFSET --sizelimit $SIZELIMIT "$LOOP" "$DISK"
|
||||||
if [ "$BOOTLOADER" = "syslinux" ]; then
|
if [ "$BOOTLOADER" = "syslinux" ]; then
|
||||||
mke2fs -q -t ext4 -m 0 "$LOOP"
|
if [ "$UEFI" = "yes" ] ; then
|
||||||
tune2fs -U $UUID_SYSTEM "$LOOP"
|
mkfs.vfat -i "$FAT_VOL_ID" "$LOOP"
|
||||||
e2fsck -n "$LOOP"
|
else
|
||||||
|
mke2fs -q -t ext4 -m 0 "$LOOP"
|
||||||
|
tune2fs -U $UUID_SYSTEM "$LOOP"
|
||||||
|
e2fsck -n "$LOOP"
|
||||||
|
fi
|
||||||
elif [ "$BOOTLOADER" = "bcm2835-bootloader" ]; then
|
elif [ "$BOOTLOADER" = "bcm2835-bootloader" ]; then
|
||||||
mkfs.vfat "$LOOP"
|
mkfs.vfat "$LOOP"
|
||||||
fi
|
fi
|
||||||
@ -156,7 +185,11 @@ EOF
|
|||||||
|
|
||||||
# install extlinux
|
# install extlinux
|
||||||
echo "image: installing extlinux to part1..."
|
echo "image: installing extlinux to part1..."
|
||||||
extlinux --heads=4 --sector=32 -i "$OE_TMP"
|
if [ "$UEFI" = "yes" ] ; then
|
||||||
|
syslinux --heads=4 --sector=32 -i "$LOOP"
|
||||||
|
else
|
||||||
|
extlinux --heads=4 --sector=32 -i "$OE_TMP"
|
||||||
|
fi
|
||||||
|
|
||||||
# copy files
|
# copy files
|
||||||
echo "image: copying files to part1..."
|
echo "image: copying files to part1..."
|
||||||
@ -166,7 +199,18 @@ EOF
|
|||||||
cp $ROOT/$TOOLCHAIN/share/syslinux/vesamenu.c32 "$OE_TMP"
|
cp $ROOT/$TOOLCHAIN/share/syslinux/vesamenu.c32 "$OE_TMP"
|
||||||
cp $ROOT/$TOOLCHAIN/share/syslinux/libcom32.c32 "$OE_TMP"
|
cp $ROOT/$TOOLCHAIN/share/syslinux/libcom32.c32 "$OE_TMP"
|
||||||
cp $ROOT/$TOOLCHAIN/share/syslinux/libutil.c32 "$OE_TMP"
|
cp $ROOT/$TOOLCHAIN/share/syslinux/libutil.c32 "$OE_TMP"
|
||||||
|
if [ "$UEFI" = "yes" ] ; then
|
||||||
|
mkdir -p "$OE_TMP/EFI/BOOT"
|
||||||
|
cp $ROOT/$TOOLCHAIN/share/syslinux/bootx64.efi "$OE_TMP/EFI/BOOT"
|
||||||
|
cp $ROOT/$TOOLCHAIN/share/syslinux/ldlinux.e64 "$OE_TMP/EFI/BOOT"
|
||||||
|
cat << EOF > "$OE_TMP"/EFI/BOOT/syslinux.cfg
|
||||||
|
DEFAULT installer
|
||||||
|
|
||||||
|
LABEL installer
|
||||||
|
KERNEL /KERNEL
|
||||||
|
APPEND boot=UUID=$UUID_SYSTEM installer quiet tty vga=current
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
elif [ "$BOOTLOADER" = "bcm2835-bootloader" ]; then
|
elif [ "$BOOTLOADER" = "bcm2835-bootloader" ]; then
|
||||||
# create bootloader configuration
|
# create bootloader configuration
|
||||||
echo "image: creating bootloader configuration..."
|
echo "image: creating bootloader configuration..."
|
||||||
@ -192,7 +236,8 @@ fi # bootloader
|
|||||||
losetup -d "$LOOP"
|
losetup -d "$LOOP"
|
||||||
echo "image: creating filesystem on part2..."
|
echo "image: creating filesystem on part2..."
|
||||||
OFFSET=$(( $STORAGE_PART_START * 512 ))
|
OFFSET=$(( $STORAGE_PART_START * 512 ))
|
||||||
losetup -o $OFFSET "$LOOP" "$DISK"
|
SIZELIMIT=$(( $STORAGE_SIZE * 1024 * 1024 ))
|
||||||
|
losetup -o $OFFSET --sizelimit $SIZELIMIT "$LOOP" "$DISK"
|
||||||
mke2fs -q -t ext4 -m 0 "$LOOP"
|
mke2fs -q -t ext4 -m 0 "$LOOP"
|
||||||
tune2fs -U $UUID_STORAGE "$LOOP"
|
tune2fs -U $UUID_STORAGE "$LOOP"
|
||||||
e2fsck -n "$LOOP"
|
e2fsck -n "$LOOP"
|
||||||
@ -203,8 +248,10 @@ fi # bootloader
|
|||||||
mount "$LOOP" "$OE_TMP"
|
mount "$LOOP" "$OE_TMP"
|
||||||
|
|
||||||
# add resize mark
|
# add resize mark
|
||||||
touch "$OE_TMP/.please_resize_me"
|
if [ "$UEFI" != "yes" ] ; then
|
||||||
sync
|
touch "$OE_TMP/.please_resize_me"
|
||||||
|
sync
|
||||||
|
fi
|
||||||
|
|
||||||
# unmount part2
|
# unmount part2
|
||||||
echo "image: unmounting part2..."
|
echo "image: unmounting part2..."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user