From 624a8d827f1da93d61e853152294f2fbfcd93ff7 Mon Sep 17 00:00:00 2001 From: Martin Dietze Date: Fri, 8 Sep 2006 12:44:24 +0000 Subject: libccaudio2: added new port. --- packages/libccaudio2/.mtn2git_empty | 0 .../libccaudio2/libccaudio2-0.9.0/.mtn2git_empty | 0 .../libccaudio2-0.9.0/01-ccaudio-fixed-point.diff | 677 +++++++++++++++++++++ .../libccaudio2-0.9.0/02-ccaudio-stereo.diff | 54 ++ .../libccaudio2-0.9.0/03-ccaudio-dtmf-reset.diff | 36 ++ packages/libccaudio2/libccaudio2_0.9.0.bb | 24 + 6 files changed, 791 insertions(+) create mode 100644 packages/libccaudio2/.mtn2git_empty create mode 100644 packages/libccaudio2/libccaudio2-0.9.0/.mtn2git_empty create mode 100644 packages/libccaudio2/libccaudio2-0.9.0/01-ccaudio-fixed-point.diff create mode 100644 packages/libccaudio2/libccaudio2-0.9.0/02-ccaudio-stereo.diff create mode 100644 packages/libccaudio2/libccaudio2-0.9.0/03-ccaudio-dtmf-reset.diff create mode 100644 packages/libccaudio2/libccaudio2_0.9.0.bb diff --git a/packages/libccaudio2/.mtn2git_empty b/packages/libccaudio2/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/libccaudio2/libccaudio2-0.9.0/.mtn2git_empty b/packages/libccaudio2/libccaudio2-0.9.0/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/libccaudio2/libccaudio2-0.9.0/01-ccaudio-fixed-point.diff b/packages/libccaudio2/libccaudio2-0.9.0/01-ccaudio-fixed-point.diff new file mode 100644 index 0000000000..226a4203cc --- /dev/null +++ b/packages/libccaudio2/libccaudio2-0.9.0/01-ccaudio-fixed-point.diff @@ -0,0 +1,677 @@ +diff -NurBb src/audio2.h patched_src/audio2.h +--- ccaudio2-0.9.0/src/audio2.h 2006-04-06 10:25:17.000000000 +0200 ++++ ccaudio2-0.9.0/patched_src/audio2.h 2006-04-22 14:13:25.000000000 +0200 +@@ -82,6 +82,7 @@ + #endif + + #include ++#include "fixedPoint.H" + + namespace ost { + +@@ -760,7 +761,7 @@ + Rate rate; + unsigned samples; + Linear frame; +- double df1, df2, p1, p2; ++ FixedPoint df1, df2, p1, p2; + Level m1, m2; + bool silencer; + +diff -NurBb src/detect.cpp patched_src/detect.cpp +--- ccaudio2-0.9.0/src/detect.cpp 2005-07-29 22:16:35.000000000 +0200 ++++ ccaudio2-0.9.0/patched_src/detect.cpp 2006-04-22 14:13:26.000000000 +0200 +@@ -78,6 +78,13 @@ + static float dtmf_col[] = { 1209.0, 1336.0, 1477.0, 1633.0 }; + static float fax_freq = 1100.0; + ++ // fixed value for dtmf_detect_(row|col)[].fac for SAMPLE_RATE = 8000 ++ static float init[4][4]={ {1.70774,1.1641,0.916368,-0.644862}, ++ {1.64528,0.99637,0.70695,-1.00725}, ++ {1.56869,0.798618,0.460779,-1.36221}, ++ {1.4782,0.568533,0.185089,-1.67677} ++ }; ++ + state = (dtmf_detect_state_t *)malloc(sizeof(dtmf_detect_state_t)); + memset(state, 0, sizeof(state)); + +@@ -85,15 +92,19 @@ + { + theta = (float)(2.0 * M_PI * (dtmf_row[i] / SAMPLE_RATE)); + dtmf_detect_row[i].fac = (float)(2.0 * cos(theta)); ++ dtmf_detect_row[i].fac = init[i][0]; + + theta = (float)(2.0 * M_PI * (dtmf_col[i] / SAMPLE_RATE)); + dtmf_detect_col[i].fac = (float)(2.0 * cos(theta)); ++ dtmf_detect_col[i].fac = init[i][1]; + + theta = (float)(2.0 * M_PI * (dtmf_row[i] * 2.0 / SAMPLE_RATE)); + dtmf_detect_row_2nd[i].fac = (float)(2.0 * cos(theta)); ++ dtmf_detect_row_2nd[i].fac = init[i][2]; + + theta = (float)(2.0 * M_PI * (dtmf_col[i] * 2.0 / SAMPLE_RATE)); + dtmf_detect_col_2nd[i].fac = (float)(2.0 * cos(theta)); ++ dtmf_detect_col_2nd[i].fac = init[i][3]; + + goertzelInit(&state->row_out[i], &dtmf_detect_row[i]); + goertzelInit(&state->col_out[i], &dtmf_detect_col[i]); +@@ -196,30 +207,30 @@ + state->row_out[0].v2 = state->row_out[0].v3; + state->row_out[0].v3 = state->row_out[0].fac*state->row_out[0].v2 - v1 + famp; + +- v1 = state->col_out[0].v2; +- state->col_out[0].v2 = state->col_out[0].v3; +- state->col_out[0].v3 = state->col_out[0].fac*state->col_out[0].v2 - v1 + famp; +- + v1 = state->row_out[1].v2; + state->row_out[1].v2 = state->row_out[1].v3; + state->row_out[1].v3 = state->row_out[1].fac*state->row_out[1].v2 - v1 + famp; + +- v1 = state->col_out[1].v2; +- state->col_out[1].v2 = state->col_out[1].v3; +- state->col_out[1].v3 = state->col_out[1].fac*state->col_out[1].v2 - v1 + famp; +- + v1 = state->row_out[2].v2; + state->row_out[2].v2 = state->row_out[2].v3; + state->row_out[2].v3 = state->row_out[2].fac*state->row_out[2].v2 - v1 + famp; + +- v1 = state->col_out[2].v2; +- state->col_out[2].v2 = state->col_out[2].v3; +- state->col_out[2].v3 = state->col_out[2].fac*state->col_out[2].v2 - v1 + famp; +- + v1 = state->row_out[3].v2; + state->row_out[3].v2 = state->row_out[3].v3; + state->row_out[3].v3 = state->row_out[3].fac*state->row_out[3].v2 - v1 + famp; + ++ v1 = state->col_out[0].v2; ++ state->col_out[0].v2 = state->col_out[0].v3; ++ state->col_out[0].v3 = state->col_out[0].fac*state->col_out[0].v2 - v1 + famp; ++ ++ v1 = state->col_out[1].v2; ++ state->col_out[1].v2 = state->col_out[1].v3; ++ state->col_out[1].v3 = state->col_out[1].fac*state->col_out[1].v2 - v1 + famp; ++ ++ v1 = state->col_out[2].v2; ++ state->col_out[2].v2 = state->col_out[2].v3; ++ state->col_out[2].v3 = state->col_out[2].fac*state->col_out[2].v2 - v1 + famp; ++ + v1 = state->col_out[3].v2; + state->col_out[3].v2 = state->col_out[3].v3; + state->col_out[3].v3 = state->col_out[3].fac*state->col_out[3].v2 - v1 + famp; +@@ -228,34 +239,34 @@ + state->col_out2nd[0].v2 = state->col_out2nd[0].v3; + state->col_out2nd[0].v3 = state->col_out2nd[0].fac*state->col_out2nd[0].v2 - v1 + famp; + +- v1 = state->row_out2nd[0].v2; +- state->row_out2nd[0].v2 = state->row_out2nd[0].v3; +- state->row_out2nd[0].v3 = state->row_out2nd[0].fac*state->row_out2nd[0].v2 - v1 + famp; +- + v1 = state->col_out2nd[1].v2; + state->col_out2nd[1].v2 = state->col_out2nd[1].v3; + state->col_out2nd[1].v3 = state->col_out2nd[1].fac*state->col_out2nd[1].v2 - v1 + famp; + +- v1 = state->row_out2nd[1].v2; +- state->row_out2nd[1].v2 = state->row_out2nd[1].v3; +- state->row_out2nd[1].v3 = state->row_out2nd[1].fac*state->row_out2nd[1].v2 - v1 + famp; +- + v1 = state->col_out2nd[2].v2; + state->col_out2nd[2].v2 = state->col_out2nd[2].v3; + state->col_out2nd[2].v3 = state->col_out2nd[2].fac*state->col_out2nd[2].v2 - v1 + famp; + +- v1 = state->row_out2nd[2].v2; +- state->row_out2nd[2].v2 = state->row_out2nd[2].v3; +- state->row_out2nd[2].v3 = state->row_out2nd[2].fac*state->row_out2nd[2].v2 - v1 + famp; +- + v1 = state->col_out2nd[3].v2; + state->col_out2nd[3].v2 = state->col_out2nd[3].v3; + state->col_out2nd[3].v3 = state->col_out2nd[3].fac*state->col_out2nd[3].v2 - v1 + famp; + ++ v1 = state->row_out2nd[0].v2; ++ state->row_out2nd[0].v2 = state->row_out2nd[0].v3; ++ state->row_out2nd[0].v3 = state->row_out2nd[0].fac*state->row_out2nd[0].v2 - v1 + famp; ++ ++ v1 = state->row_out2nd[1].v2; ++ state->row_out2nd[1].v2 = state->row_out2nd[1].v3; ++ state->row_out2nd[1].v3 = state->row_out2nd[1].fac*state->row_out2nd[1].v2 - v1 + famp; ++ ++ v1 = state->row_out2nd[2].v2; ++ state->row_out2nd[2].v2 = state->row_out2nd[2].v3; ++ state->row_out2nd[2].v3 = state->row_out2nd[2].fac*state->row_out2nd[2].v2 - v1 + famp; ++ + v1 = state->row_out2nd[3].v2; + state->row_out2nd[3].v2 = state->row_out2nd[3].v3; + state->row_out2nd[3].v3 = state->row_out2nd[3].fac*state->row_out2nd[3].v2 - v1 + famp; +- ++#ifdef FAXDETECT + v1 = state->fax_tone.v2; + state->fax_tone.v2 = state->fax_tone.v3; + state->fax_tone.v3 = state->fax_tone.fac*state->fax_tone.v2 - v1 + famp; +@@ -263,13 +274,15 @@ + v1 = state->fax_tone.v2; + state->fax_tone2nd.v2 = state->fax_tone2nd.v3; + state->fax_tone2nd.v3 = state->fax_tone2nd.fac*state->fax_tone2nd.v2 - v1 + famp; ++#endif + } + state->current_sample += (limit - sample); + if(state->current_sample < 102) + continue; + ++#ifdef FAXDETECT + fax_energy = goertzelResult(&state->fax_tone); +- ++#endif + // We are at the end of a DTMF detection block + // Find the peak row and the peak column + row_energy[0] = goertzelResult (&state->row_out[0]); +@@ -332,6 +345,7 @@ + } + } + ++#ifdef FAXDETECT + if (!hit && (fax_energy >= FAX_THRESHOLD) && (fax_energy > state->energy * 21.0)) + { + fax_energy_2nd = goertzelResult(&state->fax_tone2nd); +@@ -356,6 +370,7 @@ + } + state->fax_hits = 0; + } ++#endif + state->hit1 = state->hit2; + state->hit2 = state->hit3; + state->hit3 = hit; +diff -NurBb src/fixedPoint.C patched_src/fixedPoint.C +--- ccaudio2-0.9.0/src/fixedPoint.C 1970-01-01 01:00:00.000000000 +0100 ++++ ccaudio2-0.9.0/patched_src/fixedPoint.C 2006-04-22 14:13:26.000000000 +0200 +@@ -0,0 +1,145 @@ ++#include "fixedPoint.H" ++ ++#include ++ ++#define TABLESIZE (1<(q))); ++} ++ ++static FixedPoint cosGenerator(int x) { ++ FixedPoint q(2 * x * 3.14156); ++ q /= NUMPOINTS; ++ return FixedPoint(cos(static_cast(q))); ++} ++ ++static FixedPoint sinGeneratorSmall(int x) { ++ FixedPoint q(2 * x * 3.14156); ++ q /= NUMPOINTS * NUMPOINTS; ++ return FixedPoint(sin(static_cast(q))); ++} ++ ++void FixedPoint::generateTables() { ++ int i; ++ std::cout << "unsigned short sinL[] = { 0"; ++ for (i=1; i(v) >> RES_BITS) & 3; ++ ++ // handle sin(alpha) as sin(large+small) with large+small=alpha ++ // large is here 0-NUMPOINTS, small is (alpha-large) scaled to NUMPOINTS ++ int large = static_cast(v) & (TABLESIZE-1); ++ int small = v.getNKS()>>(FixedPoint::decimalPlaces - RES_BITS); ++ ++ // calculate sin for first quadrant ++ FixedPoint r; ++ // assuming coshelper2(small) == 1 ++ if ( q&1 ) { ++ r = coshelper(large)-sinhelper(large)*sinhelperSmall(small); ++ } else { ++ r = sinhelper(large)+sinhelperSmall(small)*coshelper(large); ++ } ++ ++ if ( q>1 ) ++ r.negate(); ++ ++ return r; ++} ++ ++FixedPoint ++cos(const FixedPoint& v) { ++ // scaled to use NUMPOINTS==(1<(v) >> RES_BITS) & 3; ++ ++ // handle sin(alpha) as sin(large+small) with large+small=alpha ++ // large is here 0-NUMPOINTS, small is (alpha-large) scaled to NUMPOINTS ++ int large = static_cast(v) & (TABLESIZE-1); ++ int small = v.getNKS()>>(FixedPoint::decimalPlaces - RES_BITS); ++ ++ // calculate sin for first quadrant ++ FixedPoint r; ++ // assuming coshelper2(small) == 1 ++ if ( q&1 ) { ++ r = sinhelper(large)+sinhelperSmall(small)*coshelper(large); ++ } else { ++ r = coshelper(large)-sinhelper(large)*sinhelperSmall(small); ++ } ++ ++ if ( q==1 || q==2 ) ++ r.negate(); ++ ++ return r; ++} +diff -NurBb src/fixedPoint.H patched_src/fixedPoint.H +--- ccaudio2-0.9.0/src/fixedPoint.H 1970-01-01 01:00:00.000000000 +0100 ++++ ccaudio2-0.9.0/patched_src/fixedPoint.H 2006-04-22 14:13:26.000000000 +0200 +@@ -0,0 +1,239 @@ ++#ifndef FIXEDPOINT__H__ ++#define FIXEDPOINT__H__ ++ ++#include ++ ++#define longlong ++ ++const int RES_BITS = 7; ++const int NUMPOINTS = (1<<(RES_BITS+2)); ++ ++const int FP_PI_TRIG = (1<<(RES_BITS+1)); // use this as pi in trig functions ++ ++class FixedPoint; ++static inline int prepareMultiply(FixedPoint& r, FixedPoint&f); ++static inline void check_overflow(const FixedPoint&a, const FixedPoint&b); ++ ++class FixedPoint { ++public: ++#ifdef longlong ++ typedef long long _fp; ++#else ++ typedef long _fp; ++#endif ++ ++ FixedPoint() { value=0; } ++ FixedPoint(int v) { value = static_cast<_fp>(v) << decimalPlaces; } ++ FixedPoint(unsigned int v) { value = static_cast<_fp>(v) << decimalPlaces; } ++ FixedPoint(double v) { value = static_cast<_fp>(v * (1 << decimalPlaces)); } ++ FixedPoint(float v) { value = static_cast<_fp>(v * (1 << decimalPlaces)); } ++ FixedPoint(const FixedPoint& a) { value = a.value; } ++ FixedPoint(int ganz, int komma) { value = (static_cast<_fp>(ganz)<> decimalPlaces; } ++ operator int() const { return value >> decimalPlaces; } // this conversion can overflow!! ++ operator double() const { return (double)value / (1<>= shift; ++ ++ return r; ++ } ++ ++ void operator*=(const FixedPoint& b) ++ { ++ FixedPoint f(b); ++ ++ // shift r.value and f.value so, that no overrun occurs ++ int shift = prepareMultiply(*this, f); ++ check_overflow(*this, f); ++ ++ value *= f.value; ++ ++ // shift away nks ++ value >>= shift; ++ } ++ ++#endif ++ friend FixedPoint operator*(const FixedPoint& a, int v) ++ { FixedPoint r(a); r.value *= v; return r; } ++ friend FixedPoint operator*(int v, const FixedPoint& b) ++ { FixedPoint r(b); r.value *= v; return r; } ++ void operator*=(int v) ++ { value *= v; } ++ ++#ifdef longlong ++ friend FixedPoint operator/(const FixedPoint& a, const FixedPoint& b) ++ { FixedPoint r(a); r.value<<=decimalPlaces; r.value /= b.value; return r; } ++ void operator/=(const FixedPoint& a) ++ { value<<=decimalPlaces; value /= a.value; } ++#else ++ friend FixedPoint operator/(const FixedPoint& a, const FixedPoint& b) ++ { ++ FixedPoint r; ++ long long v = a.value; ++ v <<= decimalPlaces; ++ v /= b.value; ++ r.value = v; ++ return r; ++ } ++ void operator/=(const FixedPoint& a) ++ { ++ long long v = value; ++ v <<= decimalPlaces; ++ v /= a.value; ++ value = v; ++ } ++#endif ++ friend FixedPoint operator/(const FixedPoint& a, int v) ++ { FixedPoint r(a); r.value /= v; return r; } ++ void operator/=(int v) ++ { value /= v; } ++ ++ friend FixedPoint operator+(const FixedPoint& a, const FixedPoint& b) ++ { FixedPoint r(a); r.value += b.value; return r; } ++ friend FixedPoint operator+(const FixedPoint& a, int v) ++ { FixedPoint r(a); r.value += v<(const FixedPoint& a, const FixedPoint& b) ++ { return a.value > b.value; } ++ friend bool operator>(const FixedPoint& a, int v) ++ { return a.value > (v << decimalPlaces) ; } ++ friend bool operator>(int v, const FixedPoint& b) ++ { return (v << decimalPlaces )> b.value; } ++ ++ friend bool operator>=(const FixedPoint& a, const FixedPoint& b) ++ { return a.value >= b.value; } ++ friend bool operator<=(const FixedPoint& a, const FixedPoint& b) ++ { return a.value <= b.value; } ++ friend bool operator>=(const FixedPoint& a, int v) ++ { return a.value >= ( v << decimalPlaces ); } ++ friend bool operator>=(int v, const FixedPoint& b) ++ { return ( v << decimalPlaces ) >= b.value; } ++ friend bool operator<=(const FixedPoint& a, int v) ++ { return a.value <= ( v << decimalPlaces ); } ++ friend bool operator<=(int v, const FixedPoint& b) ++ { return ( v << decimalPlaces ) <= b.value; } ++ ++ friend std::ostream& operator<<(std::ostream& os, FixedPoint f) ++ { ++ return os << (double)f << " [" << std::hex << (_fp)f << "#" << f.getNKS() << std::dec << "]"; ++ } ++ ++ friend FixedPoint sin(const FixedPoint& v); ++ friend FixedPoint cos(const FixedPoint& v); ++ ++ unsigned int getNKS() const { return value & ((1<>=1; ++ } ++ } else { ++ first=0x4000000000000000LL; ++ while ( shift>=1; ++ } ++ } ++ if ( f.value < 0 ) { ++ first=0x4000000000000000LL; ++ while ( shift>=1; ++ } ++ } else { ++ first=0x4000000000000000LL; ++ while ( shift>=1; ++ } ++ } ++ ++ if ( shift>= donow/2; ++ f.value >>= donow-(donow/2); ++ } ++ return shift; ++} ++ ++void check_overflow(const FixedPoint&a, const FixedPoint&b) { ++ if ( a<0 && b<0 || (a>0 && b>0) ) { ++ if ( a.value * b.value < 0 ) ++ std::cerr << " overflow1: " << a << " * " << b << "=" << a.value*b.value << std::endl; ++ } else if ( a.value * b.value > 0 ) ++ std::cerr << " overflow2: " << a << " * " << b << "=" << a.value*b.value << std::endl; ++} ++ ++#endif /* FIXEDPOINT__H__ */ +diff -NurBb src/Makefile.am patched_src/Makefile.am +--- ccaudio2-0.9.0/src/Makefile.am 2006-03-01 17:43:29.000000000 +0100 ++++ ccaudio2-0.9.0/patched_src/Makefile.am 2006-04-22 14:13:25.000000000 +0200 +@@ -14,12 +14,13 @@ + RELEASE = -version-info @LT_VERSION@ -release @LT_RELEASE@ + ccxxincludedir=$(includedir)/cc++ + ccxxinclude_HEADERS = audio2.h ++AM_CXXFLAGS=-msoft-float + + lib_LTLIBRARIES = libccaudio2.la + + libccaudio2_la_SOURCES = audiofile.cpp friends.cpp codec.cpp tone.cpp \ + fileio.cpp buffer.cpp stream.cpp oss.cpp w32.cpp osx.cpp \ +- mapper.cpp dialers.cpp teltones.cpp detect.cpp audiobase.cpp ++ mapper.cpp dialers.cpp teltones.cpp detect.cpp audiobase.cpp fixedPoint.C + + libccaudio2_la_LDFLAGS = $(DYN_LOADER) $(AUDIO_LIBS) -lm $(RELEASE) + +diff -NurBb src/tone.cpp patched_src/tone.cpp +--- ccaudio2-0.9.0/src/tone.cpp 2006-03-01 16:51:13.000000000 +0100 ++++ ccaudio2-0.9.0/patched_src/tone.cpp 2006-04-22 14:13:25.000000000 +0200 +@@ -37,12 +37,15 @@ + + #include "private.h" + #include "audio2.h" +-#include ++#include "fixedPoint.H" + + #ifndef M_PI + #define M_PI 3.14159265358979323846 + #endif + ++#undef M_PI ++#define M_PI FP_PI_TRIG ++ + using namespace ost; + + AudioTone::AudioTone(timeout_t duration, Rate r) +@@ -59,8 +62,8 @@ + AudioTone::AudioTone(unsigned freq, Level l, timeout_t duration, Rate r) + { + rate = r; +- df1 = (freq * M_PI * 2) / (long)rate; +- df2 = (freq * M_PI * 2) / (long)rate; ++ df1 = FixedPoint(freq * M_PI * 2) / (int)rate; ++ df2 = FixedPoint(freq * M_PI * 2) / (int)rate; + p1 = 0, p2 = 0; + samples = (duration * (long)rate) / 1000; + m1 = l / 2; +@@ -73,8 +76,8 @@ + AudioTone::AudioTone(unsigned f1, unsigned f2, Level l1, Level l2, timeout_t duration, Rate r) + { + rate = r; +- df1 = (f1 * M_PI * 2) / (long)r; +- df2 = (f2 * M_PI * 2) / (long)r; ++ df1 = FixedPoint(f1 * M_PI * 2) / (int)r; ++ df2 = FixedPoint(f2 * M_PI * 2) / (int)r; + p1 = 0, p2 = 0; + samples = (duration * (long)r) / 1000; + m1 = l1 / 2; +@@ -124,8 +127,8 @@ + + void AudioTone::single(unsigned freq, Level l) + { +- df1 = (freq * M_PI * 2) / (long)rate; +- df2 = (freq * M_PI * 2) / (long)rate; ++ df1 = FixedPoint(freq * M_PI * 2) / (int)rate; ++ df2 = FixedPoint(freq * M_PI * 2) / (int)rate; + m1 = l / 2; + m2 = l / 2; + silencer = false; +@@ -133,8 +136,8 @@ + + void AudioTone::dual(unsigned f1, unsigned f2, Level l1, Level l2) + { +- df1 = (f1 * M_PI * 2) / (long)rate; +- df2 = (f2 * M_PI * 2) / (long)rate; ++ df1 = FixedPoint(f1 * M_PI * 2) / (int)rate; ++ df2 = FixedPoint(f2 * M_PI * 2) / (int)rate; + m1 = l1 / 2; + m2 = l2 / 2; + silencer = false; +@@ -188,8 +191,8 @@ + continue; + } + +- *(data++) = (Level)(sin(p1) * (double)m1) + +- (Level)(sin(p2) * (double)m2); ++ *(data++) = (Level)(int)(sin(p1) * m1) + ++ (Level)(int)(sin(p2) * m2); + + p1 += df1; + p2 += df2; +@@ -199,8 +202,8 @@ + { + while(count--) + { +- *(data++) = (Level)(sin(p1) * (double)m1) + +- (Level)(sin(p2) * (double)m2); ++ *(data++) = (Level)(int)(sin(p1) * m1) + ++ (Level)(int)(sin(p2) * m2); + + p1 += df1; + p2 += df2; diff --git a/packages/libccaudio2/libccaudio2-0.9.0/02-ccaudio-stereo.diff b/packages/libccaudio2/libccaudio2-0.9.0/02-ccaudio-stereo.diff new file mode 100644 index 0000000000..1643fd8d1c --- /dev/null +++ b/packages/libccaudio2/libccaudio2-0.9.0/02-ccaudio-stereo.diff @@ -0,0 +1,54 @@ +diff -NurBb ccaudio2-0.9.0/src/detect.cpp /tmp/ccaudiosrc/detect.cpp +--- ccaudio2-0.9.0/src/detect.cpp 2006-05-02 02:20:18.000000000 +0200 ++++ tmp/ccaudiosrc/detect.cpp 2006-05-02 02:17:27.000000000 +0200 +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + #ifdef HAVE_STDINT_H + #include +@@ -198,7 +199,7 @@ + // time of a rolled loop on the machine on which it was developed + for(j = sample; j < limit; j++) + { +- famp = amp[j]; ++ famp = amp[2*j+1]; + state->energy += famp*famp; + + // With GCC 2.95, the following unrolled code seems to take about 35% +diff -NurBb ccaudio2-0.9.0/src/oss.cpp /tmp/ccaudiosrc/oss.cpp +--- ccaudio2-0.9.0/src/oss.cpp 2006-03-30 00:17:28.000000000 +0200 ++++ tmp/ccaudiosrc/oss.cpp 2006-05-02 02:17:27.000000000 +0200 +@@ -39,7 +39,7 @@ + #include "audio2.h" + #include + #include +- ++#include + extern int _oss_ccaudio_dummy; + int _oss_ccaudio_dummy = 0; + +@@ -183,6 +183,10 @@ + + if(ioctl(dsp, SOUND_PCM_WRITE_RATE, &srate)) + return false; ++ if ( srate == 0 ) { ++ std::cerr << "ossSetAudio: invalid rate " << rate << std::endl; ++ return false; ++ } + + if(ioctl(dsp, SOUND_PCM_WRITE_CHANNELS, &channels)) + return false; +@@ -192,7 +196,10 @@ + ioctl(dsp, SNDCTL_DSP_GETBLKSIZE, &blksize); + info.framesize = blksize; + info.framecount = toSamples(info.encoding, blksize); ++ if ( srate ) + info.framing = (info.framecount * 1000l) / srate; ++ else ++ info.framing = (info.framecount * 500l); + + bufsize = info.framecount * channels; + diff --git a/packages/libccaudio2/libccaudio2-0.9.0/03-ccaudio-dtmf-reset.diff b/packages/libccaudio2/libccaudio2-0.9.0/03-ccaudio-dtmf-reset.diff new file mode 100644 index 0000000000..955de275a0 --- /dev/null +++ b/packages/libccaudio2/libccaudio2-0.9.0/03-ccaudio-dtmf-reset.diff @@ -0,0 +1,36 @@ +diff -NurbB ccaudio2-0.9.0/src/audio2.h ccaudio2-0.9.0.patched/src/audio2.h +--- ccaudio2-0.9.0/src/audio2.h 2006-05-03 14:44:12.000000000 +0200 ++++ ccaudio2-0.9.0.patched/src/audio2.h 2006-06-09 11:03:24.000000000 +0200 +@@ -1957,6 +1957,8 @@ + */ + inline bool isEnabled(void) + {return enabled;}; ++ ++ virtual void reset(void) {} + }; + + /** +diff -NurbB ccaudio2-0.9.0/src/detect.cpp ccaudio2-0.9.0.patched/src/detect.cpp +--- ccaudio2-0.9.0/src/detect.cpp 2006-05-03 14:44:12.000000000 +0200 ++++ ccaudio2-0.9.0.patched/src/detect.cpp 2006-06-09 12:36:30.000000000 +0200 +@@ -316,7 +316,7 @@ + } + // ... and second harmonic test + if(i >= 4 && +- (row_energy[best_row] + col_energy[best_col]) > 42.0*state->energy && ++ (row_energy[best_row] + col_energy[best_col]) > 37.0*state->energy && + goertzelResult (&state->col_out2nd[best_col])*DTMF_2ND_HARMONIC_COL < col_energy[best_col] && + goertzelResult (&state->row_out2nd[best_row])*DTMF_2ND_HARMONIC_ROW < row_energy[best_row]) + { +diff -NurbB ccaudio2-0.9.0/src/oss.cpp ccaudio2-0.9.0.patched/src/oss.cpp +--- ccaudio2-0.9.0/src/oss.cpp 2006-06-08 14:53:27.000000000 +0200 ++++ ccaudio2-0.9.0.patched/src/oss.cpp 2006-06-08 20:07:30.000000000 +0200 +@@ -75,6 +75,8 @@ + void resetRecord(void); + void enableRecord(void); + void disableRecord(void); ++ void reset(void) { ioctl(dsp, SNDCTL_DSP_RESET, NULL); } ++ + }; + + OSSAudioDevice::OSSAudioDevice(int fdsp, int fmixer, DeviceMode mode) diff --git a/packages/libccaudio2/libccaudio2_0.9.0.bb b/packages/libccaudio2/libccaudio2_0.9.0.bb new file mode 100644 index 0000000000..1cfb715764 --- /dev/null +++ b/packages/libccaudio2/libccaudio2_0.9.0.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "a C++ class library for generating and recognising sounds." +HOMEPAGE = "http://www.gnu.org/software/ccaudio/" +LICENSE = "GPL" +MAINTAINER = "Martin Dietze , Thomas Geffert " + +SRC_URI = "http://ftp.gnu.org/pub/gnu/ccaudio/ccaudio2-${PV}.tar.gz \ + file://01-ccaudio-fixed-point.diff;patch=1 \ + file://02-ccaudio-stereo.diff;patch=1 \ + file://03-ccaudio-dtmf-reset.diff;patch=1" + +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/libccaudio2-${PV}" + +S = "${WORKDIR}/ccaudio2-${PV}" + +inherit autotools + +${EXTRA_OECONF}="-without-fp" + +do_stage () { + install -d ${STAGING_INCDIR}/cc++ + install -m 0644 src/audio2.h ${STAGING_INCDIR}/cc++ + install -m 0644 src/fixedPoint.H ${STAGING_INCDIR}/cc++ + oe_libinstall -C src libccaudio2 ${STAGING_LIBDIR} +} -- cgit v1.2.3 From ec33e91e3b1ec6a9845742879834893c4cda9764 Mon Sep 17 00:00:00 2001 From: Martin Dietze Date: Fri, 8 Sep 2006 12:45:12 +0000 Subject: libpcre: added new port. --- packages/libpcre/.mtn2git_empty | 0 packages/libpcre/libpcre-native_4.4.bb | 4 ++++ packages/libpcre/libpcre_4.4.bb | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 packages/libpcre/.mtn2git_empty create mode 100644 packages/libpcre/libpcre-native_4.4.bb create mode 100644 packages/libpcre/libpcre_4.4.bb diff --git a/packages/libpcre/.mtn2git_empty b/packages/libpcre/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/libpcre/libpcre-native_4.4.bb b/packages/libpcre/libpcre-native_4.4.bb new file mode 100644 index 0000000000..7caddc321d --- /dev/null +++ b/packages/libpcre/libpcre-native_4.4.bb @@ -0,0 +1,4 @@ +SECTION = "unknown" +include libpcre_${PV}.bb +inherit native +FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/libpcre-${PV}" diff --git a/packages/libpcre/libpcre_4.4.bb b/packages/libpcre/libpcre_4.4.bb new file mode 100644 index 0000000000..9974e85806 --- /dev/null +++ b/packages/libpcre/libpcre_4.4.bb @@ -0,0 +1,33 @@ +DESCRIPTION = "Perl-compatible regular expression library. PCRE has its own native \ +API, but a set of 'wrapper' functions that are based on the POSIX API \ +are also supplied in the library libpcreposix. Note that this just \ +provides a POSIX calling interface to PCRE; the regular expressions \ +themselves still follow Perl syntax and semantics. The header file for \ +the POSIX-style functions is called pcreposix.h." +SECTION = "devel" +PR = "r1" + +SRC_URI = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PV}.tar.bz2" +S = "${WORKDIR}/pcre-${PV}" + +inherit autotools binconfig + +LEAD_SONAME = "libpcre.so" +CFLAGS_append = " -D_REENTRANT" +EXTRA_OECONF = " --with-link-size=2 --enable-newline-is-lf --with-match-limit=10000000" + +do_compile () { + ${BUILD_CC} -DLINK_SIZE=2 -I${S}/include -c dftables.c + ${BUILD_CC} dftables.o -o dftables + oe_runmake +} + +do_stage () { + oe_libinstall -a -so libpcreposix ${STAGING_LIBDIR} + oe_libinstall -a -so libpcre ${STAGING_LIBDIR} + install -m 0644 pcre.h ${STAGING_INCDIR}/ + install -m 0644 pcreposix.h ${STAGING_INCDIR}/ +} + +FILES_${PN} = "${libdir}/lib*.so*" +FILES_${PN}-dev += "${bindir}" -- cgit v1.2.3 From abf168554971b3e714dd2ee2bbebf18ab91121e9 Mon Sep 17 00:00:00 2001 From: Martin Dietze Date: Fri, 8 Sep 2006 12:48:50 +0000 Subject: pcre: removed accidentally added package --- packages/pcre/.mtn2git_empty | 0 packages/pcre/pcre-native_4.4.bb | 4 ---- packages/pcre/pcre_4.4.bb | 41 ---------------------------------------- 3 files changed, 45 deletions(-) delete mode 100644 packages/pcre/.mtn2git_empty delete mode 100644 packages/pcre/pcre-native_4.4.bb delete mode 100644 packages/pcre/pcre_4.4.bb diff --git a/packages/pcre/.mtn2git_empty b/packages/pcre/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/pcre/pcre-native_4.4.bb b/packages/pcre/pcre-native_4.4.bb deleted file mode 100644 index ba2645c5d3..0000000000 --- a/packages/pcre/pcre-native_4.4.bb +++ /dev/null @@ -1,4 +0,0 @@ -SECTION = "unknown" -require pcre_${PV}.bb -inherit native -FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/pcre-${PV}" diff --git a/packages/pcre/pcre_4.4.bb b/packages/pcre/pcre_4.4.bb deleted file mode 100644 index 7603e11537..0000000000 --- a/packages/pcre/pcre_4.4.bb +++ /dev/null @@ -1,41 +0,0 @@ -DESCRIPTION = "Perl-compatible regular expression library. PCRE has its own native \ -API, but a set of 'wrapper' functions that are based on the POSIX API \ -are also supplied in the library libpcreposix. Note that this just \ -provides a POSIX calling interface to PCRE; the regular expressions \ -themselves still follow Perl syntax and semantics. The header file for \ -the POSIX-style functions is called pcreposix.h." -SECTION = "devel" -PR = "r6" -LICENSE = "BSD" -SRC_URI = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PV}.tar.bz2" -S = "${WORKDIR}/pcre-${PV}" - -inherit autotools binconfig - -PARALLEL_MAKE="" - -LEAD_SONAME = "libpcre.so" -CFLAGS_append = " -D_REENTRANT" -EXTRA_OECONF = " --with-link-size=2 --enable-newline-is-lf --with-match-limit=10000000" - -do_compile () { - # stop libtool from trying to link with host libraries - fix from #33 - # this resolve build problem on amd64 - #1015 - sed -i 's:-L\$:-L${STAGING_LIBDIR} -L\$:' ${S}/${TARGET_SYS}-libtool - - # The generation of dftables can lead to timestamp problems with ccache - # because the generated config.h seems newer. It is sufficient to ensure that the - # attempt to build dftables inside make will actually work (foo_FOR_BUILD is - # only used for this). - oe_runmake CC_FOR_BUILD="${BUILD_CC}" CFLAGS_FOR_BUILD="-DLINK_SIZE=2 -I${S}/include" LINK_FOR_BUILD="${BUILD_CC}" -} - -do_stage () { - oe_libinstall -a -so libpcre ${STAGING_LIBDIR} - oe_libinstall -a -so libpcreposix ${STAGING_LIBDIR} - install -m 0644 pcre.h ${STAGING_INCDIR}/ - install -m 0644 pcreposix.h ${STAGING_INCDIR}/ -} - -FILES_${PN} = "${libdir}/lib*.so*" -FILES_${PN}-dev += "${bindir}/*" -- cgit v1.2.3 From 30596c3e0a0216faaaa5b1ffaa4bd0e2c816eb21 Mon Sep 17 00:00:00 2001 From: Martin Dietze Date: Fri, 8 Sep 2006 12:52:43 +0000 Subject: nylon: updated images and nylon specific packages from 4G trunk * updated list of supported packages in nylon-feed * new image nylon-image-extended aiming to put nylon-feed into one image (for debugging) * new versions of nylon-scripts, nylon-statistics, simple-firewall --- packages/images/nylon-image-base.bb | 8 +- packages/images/nylon-image-extended.bb | 85 +++++++++++++++++++++ packages/images/nylon-image-extra.bb | 4 +- packages/images/nylon-image-standard.bb | 2 +- packages/meta/nylon-feed.bb | 128 +++++++++----------------------- packages/meta/nylon-feed.inc | 68 +++++++++++++++++ packages/nylon/nylon-scripts_cvs.bb | 14 ++-- packages/nylon/nylon-statistics.bb | 7 +- packages/nylon/simple-firewall.bb | 5 +- packages/nylon/yamonenv.bb | 3 +- 10 files changed, 214 insertions(+), 110 deletions(-) create mode 100644 packages/images/nylon-image-extended.bb create mode 100644 packages/meta/nylon-feed.inc diff --git a/packages/images/nylon-image-base.bb b/packages/images/nylon-image-base.bb index a4f6d17dd8..4e7711e6c7 100644 --- a/packages/images/nylon-image-base.bb +++ b/packages/images/nylon-image-base.bb @@ -1,3 +1,6 @@ +inherit image_ipk nylon-image +LICENSE = MIT + export IMAGE_BASENAME = "nylon-base" NYLON_BASE = "base-files base-passwd bash busybox \ @@ -7,8 +10,8 @@ NYLON_BASE = "base-files base-passwd bash busybox \ openssh sysvinit \ timezones tinylogin" -DEPENDS = "virtual/kernel" -RDEPENDS = "kernel modutils-depmod modutils-modinfo \ +DEPENDS += "virtual/kernel less nano" +RDEPENDS = "kernel modutils-depmod modutils-modinfo less nano \ ${NYLON_BASE} ${BOOTSTRAP_EXTRA_RDEPENDS}" export IPKG_INSTALL = "${RDEPENDS}" @@ -19,4 +22,3 @@ IMAGE_LINGUAS = "" ROOTFS_POSTPROCESS_COMMAND = "rm -f ${IMAGE_ROOTFS}/tmp/zImage*" inherit image_ipk nylon-image -LICENSE = MIT diff --git a/packages/images/nylon-image-extended.bb b/packages/images/nylon-image-extended.bb new file mode 100644 index 0000000000..09ec4897f6 --- /dev/null +++ b/packages/images/nylon-image-extended.bb @@ -0,0 +1,85 @@ +LICENSE = MIT +require nylon-image-base.bb +require ../meta/nylon-feed.inc + +export IMAGE_BASENAME = "nylon-extended" + +NYLON_EXTENDED_DEPENDS = "${NYLON_FEED}" + +NYLON_EXTENDED_RDEPENDS = "\ + hostap-modules-cs \ + hostap-modules-pci \ + modutils-depmod \ + modutils-initscripts \ + modutils-modinfo \ + ntpdate \ + ntp-bin \ + ntp-tickadj \ + openssh-scp \ + openssh-ssh \ + openssh-sshd \ + perl-misc \ + perl-module-autoloader \ + perl-module-base \ + perl-module-bytes \ + perl-module-carp \ + perl-module-config \ + perl-module-constant \ + perl-module-data-dumper \ + perl-module-encode \ + perl-module-encode-alias \ + perl-module-encode-config \ + perl-module-encode-encoding \ + perl-module-encode-unicode \ + perl-module-errno \ + perl-module-exporter \ + perl-module-exporter-heavy \ + perl-module-fields \ + perl-module-getopt-long \ + perl-module-integer \ + perl-module-io \ + perl-module-io-handle \ + perl-module-io-socket \ + perl-module-io-socket-inet \ + perl-module-io-socket-unix \ + perl-module-locale \ + perl-module-overload \ + perl-module-posix \ + perl-module-selectsaver \ + perl-module-socket \ + perl-module-strict \ + perl-module-symbol \ + perl-module-sys-hostname \ + perl-module-vars \ + perl-module-warnings \ + perl-module-warnings-register \ + perl-module-xsloader \ +" + +KERNEL_MODULES = " \ + kernel-module-aes \ + kernel-module-bridge \ + kernel-module-ds \ + kernel-module-fat \ + kernel-module-mii \ + kernel-module-pcmcia-core \ + kernel-module-scsi-mod \ + kernel-module-sd-mod \ + kernel-module-usb-storage \ + kernel-module-usb-ohci \ + kernel-module-usbnet \ + kernel-module-usbserial \ + kernel-module-vfat \ + kernel-module-yenta-socket \ +" + + +DEPENDS += "${NYLON_EXTENDED_DEPENDS}" + +RDEPENDS += "${NYLON_EXTENDED_DEPENDS} ${KERNEL_MODULES} ${NYLON_EXTENDED_RDEPENDS}" + +RDEPENDS_append_mtx-1 = "\ + kernel-module-au1x00-bi \ + kernel-module-network-fd \ + kernel-module-usbdcore" + kernel-module-usbdprocfs \ diff --git a/packages/images/nylon-image-extra.bb b/packages/images/nylon-image-extra.bb index 194783af7e..e825b15e69 100644 --- a/packages/images/nylon-image-extra.bb +++ b/packages/images/nylon-image-extra.bb @@ -1,3 +1,5 @@ +LICENSE = MIT + require nylon-image-standard.bb export IMAGE_BASENAME = "nylon-extra" @@ -7,5 +9,3 @@ RDEPENDS = "\ netperf \ nylon-statistics \ openvpn" - -LICENSE = MIT diff --git a/packages/images/nylon-image-standard.bb b/packages/images/nylon-image-standard.bb index d7acf29142..c3c98ceca4 100644 --- a/packages/images/nylon-image-standard.bb +++ b/packages/images/nylon-image-standard.bb @@ -1,3 +1,4 @@ +LICENSE = MIT require nylon-image-base.bb export IMAGE_BASENAME = "nylon-standard" @@ -26,4 +27,3 @@ DEPENDS += "hostap-modules ntp \ RDEPENDS += "hostap-modules-pci ntpdate \ ${NYLON_STANDARD}" -LICENSE = MIT diff --git a/packages/meta/nylon-feed.bb b/packages/meta/nylon-feed.bb index f5b803f58e..40faab8056 100644 --- a/packages/meta/nylon-feed.bb +++ b/packages/meta/nylon-feed.bb @@ -1,99 +1,43 @@ -DEPENDS = " \ -base-files \ -bash \ -bridge-utils \ -busybox \ -chillispot \ -dash \ -db3 \ -ddclient \ -dhcp-forwarder \ -dhcp \ -dnsmasq \ -expat \ -gdb \ -glib-2.0 \ -glibc \ -gmp \ -gnupg \ -hostap-modules \ -hostap-utils \ -hostap-daemon \ -linux-hotplug \ -htb-init \ -ifplugd \ -initscripts \ -iperf \ -ipkg \ -iproute2 \ -iptables \ -virtual/kernel \ -kismet \ -less \ -libcgicc \ -libmail-sendmail-perl \ -libnetserver-generic-perl \ -libpcap \ -lsof \ -lzo \ -madwifi-modules \ -maradns \ -mc \ -mobilemesh \ -modutils \ -mtd-utils \ -mtr \ -nano \ -ncurses \ -netbase \ -netperf \ -net-snmp \ -ntp \ -nylon-scripts \ -nylon-statistics \ -olsrd \ -openssh \ -openssl \ -openvpn \ -openswan \ -pciutils \ -pcre \ -perl \ -pmacct \ -ppp \ -ppp-dsl \ -rp-pppoe \ -rrdtool \ -prism2-firmware-update \ -prism54-module \ -prism54-firmware \ -shorewall \ -stunnel \ -sysvinit \ -tcpdump \ -tinc \ -timezones \ -usbutils \ -vtun \ -wireless-tools \ -wlan-ng-modules \ -yamonenv \ -zlib \ -" +LICENSE = MIT -# TODO: -# ksymoops / binutils -# strace: SYS_read? -# gdb-cross: install paths, sdk? -# screen: sgttyb? -# nocat? -# pptp -# meshroaming +include nylon-feed.inc +DEPENDS = "${NYLON_FEED} \ + db3 \ + dhcp \ + dhcp-forwarder \ + expat \ + glib-2.0 \ + glibc \ + gmp \ + hotplug \ + iproute2 \ + libcgicc \ + libedit \ + libmail-sendmail-perl \ + libnetserver-generic-perl \ + lzo \ + make \ + mystun-server \ + mc \ + net-snmp \ + ntp \ + openssl \ + openswan \ + openvpn \ + pcre \ + ppp-dsl \ + rp-pppoe \ + simple-firewall \ + thttpd \ + vsftpd \ + wget \ + wlan-ng-modules \ + zlib \ +" do_index() { - ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK} + ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK} } addtask index before do_build after do_install -LICENSE = MIT diff --git a/packages/meta/nylon-feed.inc b/packages/meta/nylon-feed.inc new file mode 100644 index 0000000000..f2e55dc3a6 --- /dev/null +++ b/packages/meta/nylon-feed.inc @@ -0,0 +1,68 @@ +NYLON_FEED = " \ +base-files \ +bash \ +binutils \ +bridge-utils \ +busybox \ +chillispot \ +dash \ +ddclient \ +dnsmasq \ +gdb \ +gnupg \ +hostap-modules \ +hostap-utils \ +hostap-daemon \ +hotplug-ng \ +htb-init \ +ifplugd \ +initscripts \ +iperf \ +ipkg \ +iptables \ +kismet \ +ksymoops \ +less \ +lsof \ +madwifi-modules \ +maradns \ +minicom \ +mobilemesh \ +modutils \ +mtd-utils \ +mtr \ +nano \ +ncurses \ +netbase \ +netperf \ +nylon-scripts \ +nylon-statistics \ +olsrd \ +openssh \ +pciutils \ +pcmcia-cs \ +perl \ +pmacct \ +ppp \ +pptp-linux \ +rrdtool \ +ser \ +shorewall \ +stunnel \ +sysvinit \ +tcl \ +tcpdump \ +tinc \ +timezones \ +usbutils \ +vtun \ +wireless-tools \ +wpa-supplicant \ +yamonenv \ +" + +# TODO: +# strace: SYS_read? +# gdb-cross: install paths, sdk? +# screen: sgttyb? + diff --git a/packages/nylon/nylon-scripts_cvs.bb b/packages/nylon/nylon-scripts_cvs.bb index b7ce512e87..e4917d310f 100644 --- a/packages/nylon/nylon-scripts_cvs.bb +++ b/packages/nylon/nylon-scripts_cvs.bb @@ -5,14 +5,17 @@ SECTION = "base" PRIORITY = "optional" MAINTAINER = "Bruno Randolf " LICENSE = "GPLv2" -PV = "1:0.0+cvs${SRCDATE}" +SRCDATE = "20060114" +PV = "1.0.0+cvs${SRCDATE}" PR = "r2" +RDEPENDS = "bash" SRC_URI = "http://meshcube.org/download/${PN}_${SRCDATE}.tgz" S = "${WORKDIR}/${PN}" INHIBIT_PACKAGE_STRIP = "1" do_install() { + install -d -m 755 ${D} (cd ${S}; tar -c --exclude .svn -f - . ) | tar -C ${D} -xpf - } @@ -21,8 +24,8 @@ if test "x$D" != "x"; then exit 1 else update-rc.d -s hostap defaults 14 - update-rc.d -s firewall defaults 20 - update-rc.d -s routing defaults 20 + update-rc.d -s firewall defaults 16 + update-rc.d -s routing defaults 17 update-rc.d -s emergency-ip defaults 98 update-rc.d -s flash-backup start 38 S . stop 38 0 6 . update-rc.d -s dummydate start 50 S . stop 50 0 6 . @@ -46,8 +49,6 @@ fi pkg_postrm() { #!/bin/sh -e update-rc.d hostap remove -update-rc.d bridge remove -update-rc.d ipaliases remove update-rc.d firewall remove update-rc.d routing remove update-rc.d emergency-ip remove @@ -55,4 +56,5 @@ update-rc.d flash-backup remove update-rc.d dummydate remove } -CONFFILES_${PN} = "/etc/nylon/backup.list /etc/nylon/hostap.conf /etc/nylon/interfaces.conf /etc/nylon/route.list" +CONFFILES_${PN} = "/etc/nylon/backup.list /etc/nylon/hostap.conf /etc/nylon/check-process.list \ + /etc/nylon/interfaces.conf /etc/nylon/route.list /etc/nylon/wds-bridge.conf" diff --git a/packages/nylon/nylon-statistics.bb b/packages/nylon/nylon-statistics.bb index e24d9c93e8..21c588e78a 100644 --- a/packages/nylon/nylon-statistics.bb +++ b/packages/nylon/nylon-statistics.bb @@ -4,7 +4,8 @@ SECTION = "base" PRIORITY = "optional" MAINTAINER = "Bruno Randolf " LICENSE = "GPLv2" -PV = "1:0.0+cvs${SRCDATE}" +SRCDATE = "20050909" +PV = "1.0.0+cvs${SRCDATE}" PR = "r1" SRC_URI = "http://meshcube.org/download/${PN}_${SRCDATE}.tgz" @@ -13,11 +14,11 @@ INHIBIT_PACKAGE_STRIP = "1" do_install() { install -d ${D}/srv/www/cgi-bin - install -d ${D}${sbindir} + install -d ${D}/${sbindir} ln -s /var/tmp ${D}/srv/www/rrd-img install -m 755 ${S}/*.html ${D}/srv/www/cgi-bin ln -s /var/tmp/nav.inc.html ${D}/srv/www/cgi-bin - install -m 755 ${S}/collect.sh ${D}${sbindir} + install -m 755 ${S}/collect.sh ${D}/${sbindir} } pkg_postinst() { diff --git a/packages/nylon/simple-firewall.bb b/packages/nylon/simple-firewall.bb index 5698eb732a..35911dad2c 100644 --- a/packages/nylon/simple-firewall.bb +++ b/packages/nylon/simple-firewall.bb @@ -4,8 +4,9 @@ PRIORITY = "optional" MAINTAINER = "Bruno Randolf " LICENSE = "GPL" DEPENDS = "virtual/kernel" -SRCDATE = "20060114" -PV = "cvs${SRCDATE}" +SRCDATE = "20060810" +PV = "cvs${CVSDATE}" + INHIBIT_PACKAGE_STRIP = "1" diff --git a/packages/nylon/yamonenv.bb b/packages/nylon/yamonenv.bb index bf4c94200e..2c2fb3cbb7 100644 --- a/packages/nylon/yamonenv.bb +++ b/packages/nylon/yamonenv.bb @@ -3,7 +3,8 @@ SECTION = "base" PRIORITY = "optional" MAINTAINER = "Michael Stickel " LICENSE = "GPL" -PV = "1:0.0+cvs${SRCDATE}" +SRCDATE = "20050909" +PV = "1.0.0+cvs${SRCDATE}" SRC_URI = "http://meshcube.org/download/${PN}_${SRCDATE}.tgz" S = "${WORKDIR}/${PN}" -- cgit v1.2.3 From 7328a81a6b73ff6224184576d21c68af9bcad4b4 Mon Sep 17 00:00:00 2001 From: Martin Dietze Date: Fri, 8 Sep 2006 12:56:35 +0000 Subject: initscripts: adaptions necessary for use with nylon on 4G access cube. * mtx-2 hardware added * the mount command for the local file systems did not work with tmpfs * checkroot did not remount / rw --- .../initscripts-1.0/mtx-1/.mtn2git_empty | 0 .../initscripts/initscripts-1.0/mtx-1/checkroot.sh | 167 +++++++++++++++++++++ .../initscripts/initscripts-1.0/mtx-1/mountall.sh | 46 ++++++ .../initscripts-1.0/mtx-2/.mtn2git_empty | 0 .../initscripts/initscripts-1.0/mtx-2/checkroot.sh | 167 +++++++++++++++++++++ .../initscripts/initscripts-1.0/mtx-2/mountall.sh | 46 ++++++ 6 files changed, 426 insertions(+) create mode 100644 packages/initscripts/initscripts-1.0/mtx-1/.mtn2git_empty create mode 100755 packages/initscripts/initscripts-1.0/mtx-1/checkroot.sh create mode 100755 packages/initscripts/initscripts-1.0/mtx-1/mountall.sh create mode 100644 packages/initscripts/initscripts-1.0/mtx-2/.mtn2git_empty create mode 100755 packages/initscripts/initscripts-1.0/mtx-2/checkroot.sh create mode 100755 packages/initscripts/initscripts-1.0/mtx-2/mountall.sh diff --git a/packages/initscripts/initscripts-1.0/mtx-1/.mtn2git_empty b/packages/initscripts/initscripts-1.0/mtx-1/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/initscripts/initscripts-1.0/mtx-1/checkroot.sh b/packages/initscripts/initscripts-1.0/mtx-1/checkroot.sh new file mode 100755 index 0000000000..e8ae039650 --- /dev/null +++ b/packages/initscripts/initscripts-1.0/mtx-1/checkroot.sh @@ -0,0 +1,167 @@ +# +# checkroot.sh Check to root filesystem. +# +# Version: @(#)checkroot.sh 2.84 25-Jan-2002 miquels@cistron.nl +# + +. /etc/default/rcS + +# +# Set SULOGIN in /etc/default/rcS to yes if you want a sulogin to be spawned +# from this script *before anything else* with a timeout, like SCO does. +# +test "$SULOGIN" = yes && sulogin -t 30 $CONSOLE + +# +# Ensure that bdflush (update) is running before any major I/O is +# performed (the following fsck is a good example of such activity :). +# +test -x /sbin/update && update + +# +# Read /etc/fstab. +# +exec 9>&0 &9 9>&- + +# +# Activate the swap device(s) in /etc/fstab. This needs to be done +# before fsck, since fsck can be quite memory-hungry. +# +doswap=no +test -d /proc/1 || mount -n /proc +case "`uname -r`" in + 2.[0123].*) + if test $swap_on_md = yes && grep -qs resync /proc/mdstat + then + test "$VERBOSE" != no && echo "Not activating swap - RAID array resyncing" + else + doswap=yes + fi + ;; + *) + doswap=yes + ;; +esac +if test $doswap = yes +then + test "$VERBOSE" != no && echo "Activating swap" + swapon -a 2> /dev/null +fi + +# +# Check the root filesystem. +# +if test -f /fastboot || test $rootcheck = no +then + test $rootcheck = yes && echo "Fast boot, no filesystem check" +else + # + # Ensure that root is quiescent and read-only before fsck'ing. + # + mount -n -o remount,ro / + if test $? = 0 + then + if test -f /forcefsck + then + force="-f" + else + force="" + fi + if test "$FSCKFIX" = yes + then + fix="-y" + else + fix="-a" + fi + spinner="-C" + case "$TERM" in + dumb|network|unknown|"") spinner="" ;; + esac + test `uname -m` = s390 && spinner="" # This should go away + test "$VERBOSE" != no && echo "Checking root filesystem..." + fsck $spinner $force $fix / + # + # If there was a failure, drop into single-user mode. + # + # NOTE: "failure" is defined as exiting with a return code of + # 2 or larger. A return code of 1 indicates that filesystem + # errors were corrected but that the boot may proceed. + # + if test "$?" -gt 1 + then + # Surprise! Re-directing from a HERE document (as in + # "cat << EOF") won't work, because the root is read-only. + echo + echo "fsck failed. Please repair manually and reboot. Please note" + echo "that the root filesystem is currently mounted read-only. To" + echo "remount it read-write:" + echo + echo " # mount -n -o remount,rw /" + echo + echo "CONTROL-D will exit from this shell and REBOOT the system." + echo + # Start a single user shell on the console + /sbin/sulogin $CONSOLE + reboot -f + fi + else + echo "*** ERROR! Cannot fsck root fs because it is not mounted read-only!" + echo + fi +fi + +# +# If the root filesystem was not marked as read-only in /etc/fstab, +# remount the rootfs rw but do not try to change mtab because it +# is on a ro fs until the remount succeeded. Then clean up old mtabs +# and finally write the new mtab. +# This part is only needed if the rootfs was mounted ro. +# +echo "Remounting root file system..." +mount -n -o remount,$rootmode / +if test "$rootmode" = rw +then + if test ! -L /etc/mtab + then + rm -f /etc/mtab~ /etc/nologin + : > /etc/mtab + fi + mount -f -o remount / + mount -f /proc + test "$devfs" && grep -q '^devfs /dev' /proc/mounts && mount -f "$devfs" +fi + +: exit 0 diff --git a/packages/initscripts/initscripts-1.0/mtx-1/mountall.sh b/packages/initscripts/initscripts-1.0/mtx-1/mountall.sh new file mode 100755 index 0000000000..4d12c06254 --- /dev/null +++ b/packages/initscripts/initscripts-1.0/mtx-1/mountall.sh @@ -0,0 +1,46 @@ +# +# mountall.sh Mount all filesystems. +# +# Version: @(#)mountall.sh 2.83-2 01-Nov-2001 miquels@cistron.nl +# +. /etc/default/rcS + +# +# Mount local filesystems in /etc/fstab. For some reason, people +# might want to mount "proc" several times, and mount -v complains +# about this. So we mount "proc" filesystems without -v. +# +test "$VERBOSE" != no && echo "Mounting local filesystems..." +mount -a 2>/dev/null +#t nonfs,nosmbfs,noncpfs 2>/dev/null + +# +# We might have mounted something over /dev, see if /dev/initctl is there. +# +if test ! -p /dev/initctl +then + rm -f /dev/initctl + mknod -m 600 /dev/initctl p +fi +kill -USR1 1 + +# +# Execute swapon command again, in case we want to swap to +# a file on a now mounted filesystem. +# +doswap=yes +case "`uname -r`" in + 2.[0123].*) + if grep -qs resync /proc/mdstat + then + doswap=no + fi + ;; +esac +if test $doswap = yes +then + swapon -a 2> /dev/null +fi + +: exit 0 + diff --git a/packages/initscripts/initscripts-1.0/mtx-2/.mtn2git_empty b/packages/initscripts/initscripts-1.0/mtx-2/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/initscripts/initscripts-1.0/mtx-2/checkroot.sh b/packages/initscripts/initscripts-1.0/mtx-2/checkroot.sh new file mode 100755 index 0000000000..e8ae039650 --- /dev/null +++ b/packages/initscripts/initscripts-1.0/mtx-2/checkroot.sh @@ -0,0 +1,167 @@ +# +# checkroot.sh Check to root filesystem. +# +# Version: @(#)checkroot.sh 2.84 25-Jan-2002 miquels@cistron.nl +# + +. /etc/default/rcS + +# +# Set SULOGIN in /etc/default/rcS to yes if you want a sulogin to be spawned +# from this script *before anything else* with a timeout, like SCO does. +# +test "$SULOGIN" = yes && sulogin -t 30 $CONSOLE + +# +# Ensure that bdflush (update) is running before any major I/O is +# performed (the following fsck is a good example of such activity :). +# +test -x /sbin/update && update + +# +# Read /etc/fstab. +# +exec 9>&0 &9 9>&- + +# +# Activate the swap device(s) in /etc/fstab. This needs to be done +# before fsck, since fsck can be quite memory-hungry. +# +doswap=no +test -d /proc/1 || mount -n /proc +case "`uname -r`" in + 2.[0123].*) + if test $swap_on_md = yes && grep -qs resync /proc/mdstat + then + test "$VERBOSE" != no && echo "Not activating swap - RAID array resyncing" + else + doswap=yes + fi + ;; + *) + doswap=yes + ;; +esac +if test $doswap = yes +then + test "$VERBOSE" != no && echo "Activating swap" + swapon -a 2> /dev/null +fi + +# +# Check the root filesystem. +# +if test -f /fastboot || test $rootcheck = no +then + test $rootcheck = yes && echo "Fast boot, no filesystem check" +else + # + # Ensure that root is quiescent and read-only before fsck'ing. + # + mount -n -o remount,ro / + if test $? = 0 + then + if test -f /forcefsck + then + force="-f" + else + force="" + fi + if test "$FSCKFIX" = yes + then + fix="-y" + else + fix="-a" + fi + spinner="-C" + case "$TERM" in + dumb|network|unknown|"") spinner="" ;; + esac + test `uname -m` = s390 && spinner="" # This should go away + test "$VERBOSE" != no && echo "Checking root filesystem..." + fsck $spinner $force $fix / + # + # If there was a failure, drop into single-user mode. + # + # NOTE: "failure" is defined as exiting with a return code of + # 2 or larger. A return code of 1 indicates that filesystem + # errors were corrected but that the boot may proceed. + # + if test "$?" -gt 1 + then + # Surprise! Re-directing from a HERE document (as in + # "cat << EOF") won't work, because the root is read-only. + echo + echo "fsck failed. Please repair manually and reboot. Please note" + echo "that the root filesystem is currently mounted read-only. To" + echo "remount it read-write:" + echo + echo " # mount -n -o remount,rw /" + echo + echo "CONTROL-D will exit from this shell and REBOOT the system." + echo + # Start a single user shell on the console + /sbin/sulogin $CONSOLE + reboot -f + fi + else + echo "*** ERROR! Cannot fsck root fs because it is not mounted read-only!" + echo + fi +fi + +# +# If the root filesystem was not marked as read-only in /etc/fstab, +# remount the rootfs rw but do not try to change mtab because it +# is on a ro fs until the remount succeeded. Then clean up old mtabs +# and finally write the new mtab. +# This part is only needed if the rootfs was mounted ro. +# +echo "Remounting root file system..." +mount -n -o remount,$rootmode / +if test "$rootmode" = rw +then + if test ! -L /etc/mtab + then + rm -f /etc/mtab~ /etc/nologin + : > /etc/mtab + fi + mount -f -o remount / + mount -f /proc + test "$devfs" && grep -q '^devfs /dev' /proc/mounts && mount -f "$devfs" +fi + +: exit 0 diff --git a/packages/initscripts/initscripts-1.0/mtx-2/mountall.sh b/packages/initscripts/initscripts-1.0/mtx-2/mountall.sh new file mode 100755 index 0000000000..4d12c06254 --- /dev/null +++ b/packages/initscripts/initscripts-1.0/mtx-2/mountall.sh @@ -0,0 +1,46 @@ +# +# mountall.sh Mount all filesystems. +# +# Version: @(#)mountall.sh 2.83-2 01-Nov-2001 miquels@cistron.nl +# +. /etc/default/rcS + +# +# Mount local filesystems in /etc/fstab. For some reason, people +# might want to mount "proc" several times, and mount -v complains +# about this. So we mount "proc" filesystems without -v. +# +test "$VERBOSE" != no && echo "Mounting local filesystems..." +mount -a 2>/dev/null +#t nonfs,nosmbfs,noncpfs 2>/dev/null + +# +# We might have mounted something over /dev, see if /dev/initctl is there. +# +if test ! -p /dev/initctl +then + rm -f /dev/initctl + mknod -m 600 /dev/initctl p +fi +kill -USR1 1 + +# +# Execute swapon command again, in case we want to swap to +# a file on a now mounted filesystem. +# +doswap=yes +case "`uname -r`" in + 2.[0123].*) + if grep -qs resync /proc/mdstat + then + doswap=no + fi + ;; +esac +if test $doswap = yes +then + swapon -a 2> /dev/null +fi + +: exit 0 + -- cgit v1.2.3 From 21d5affb846356fd486b06656835164f0b29324e Mon Sep 17 00:00:00 2001 From: Martin Dietze Date: Fri, 8 Sep 2006 13:02:49 +0000 Subject: various packages: added mtx-2 configuration * where necessary, additional mtx-2 subdirs for files created * where necessary, additional entries in bitbake files created --- .../base-files/base-files/mtx-2/.mtn2git_empty | 0 packages/base-files/base-files/mtx-2/fstab | 8 + packages/base-files/base-files/mtx-2/profile | 25 ++ .../kismet/kismet-2004-04-R1/mtx-2/.mtn2git_empty | 0 .../kismet/kismet-2004-04-R1/mtx