From 883ff45f5b095457a2b8c3b58f5a51852ef56b93 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 4 Mar 2014 18:20:10 +0100 Subject: cleanup lzma kernel compression support, update lzma binary, remove not used lzma-loader --- tools/lzma-loader/Makefile | 5 - tools/lzma-loader/src/LzmaDecode.c | 663 ----------------- tools/lzma-loader/src/LzmaDecode.h | 100 --- tools/lzma-loader/src/LzmaDecode.o | Bin 6248 -> 0 bytes tools/lzma-loader/src/Makefile | 78 -- tools/lzma-loader/src/README | 55 -- tools/lzma-loader/src/data.lds | 1 - tools/lzma-loader/src/data.o | Bin 3996 -> 0 bytes tools/lzma-loader/src/decompress | Bin 71097 -> 0 bytes tools/lzma-loader/src/decompress.c | 186 ----- tools/lzma-loader/src/decompress.image | Bin 3484 -> 0 bytes tools/lzma-loader/src/decompress.lds | 20 - tools/lzma-loader/src/decompress.lds.in | 20 - tools/lzma-loader/src/decompress.o | Bin 2680 -> 0 bytes tools/lzma-loader/src/head.S | 160 ---- tools/lzma-loader/src/head.o | Bin 1204 -> 0 bytes tools/lzma-loader/src/loader | Bin 3804 -> 0 bytes tools/lzma-loader/src/loader.elf | Bin 8486 -> 0 bytes tools/lzma-loader/src/loader.gz | Bin 2374 -> 0 bytes tools/lzma-loader/src/loader.lds | 17 - tools/lzma-loader/src/loader.lds.in | 17 - tools/lzma-loader/src/loader.o | Bin 8486 -> 0 bytes tools/lzma/Makefile | 15 +- tools/lzma/patches/001-large_files.patch | 13 - tools/lzma/patches/002-lzmp.patch | 1059 --------------------------- tools/lzma/patches/003-compile_fixes.patch | 26 - tools/lzma/patches/100-static_library.patch | 70 -- 27 files changed, 5 insertions(+), 2500 deletions(-) delete mode 100644 tools/lzma-loader/Makefile delete mode 100644 tools/lzma-loader/src/LzmaDecode.c delete mode 100644 tools/lzma-loader/src/LzmaDecode.h delete mode 100644 tools/lzma-loader/src/LzmaDecode.o delete mode 100644 tools/lzma-loader/src/Makefile delete mode 100644 tools/lzma-loader/src/README delete mode 100644 tools/lzma-loader/src/data.lds delete mode 100644 tools/lzma-loader/src/data.o delete mode 100755 tools/lzma-loader/src/decompress delete mode 100644 tools/lzma-loader/src/decompress.c delete mode 100755 tools/lzma-loader/src/decompress.image delete mode 100644 tools/lzma-loader/src/decompress.lds delete mode 100644 tools/lzma-loader/src/decompress.lds.in delete mode 100644 tools/lzma-loader/src/decompress.o delete mode 100644 tools/lzma-loader/src/head.S delete mode 100644 tools/lzma-loader/src/head.o delete mode 100755 tools/lzma-loader/src/loader delete mode 100755 tools/lzma-loader/src/loader.elf delete mode 100644 tools/lzma-loader/src/loader.gz delete mode 100644 tools/lzma-loader/src/loader.lds delete mode 100644 tools/lzma-loader/src/loader.lds.in delete mode 100755 tools/lzma-loader/src/loader.o delete mode 100644 tools/lzma/patches/001-large_files.patch delete mode 100644 tools/lzma/patches/002-lzmp.patch delete mode 100644 tools/lzma/patches/003-compile_fixes.patch delete mode 100644 tools/lzma/patches/100-static_library.patch (limited to 'tools') diff --git a/tools/lzma-loader/Makefile b/tools/lzma-loader/Makefile deleted file mode 100644 index ad4a531b6..000000000 --- a/tools/lzma-loader/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -include $(TOPDIR)/rules.mk - -all: - $(MAKE) -C src CC="$(TARGET_CC)" LD="$(TARGET_CROSS)ld" CROSS_COMPILE="$(TARGET_CROSS)" \ - INCLUDE="-I$(LINUX_DIR)/arch/mips/include" diff --git a/tools/lzma-loader/src/LzmaDecode.c b/tools/lzma-loader/src/LzmaDecode.c deleted file mode 100644 index 951700bdd..000000000 --- a/tools/lzma-loader/src/LzmaDecode.c +++ /dev/null @@ -1,663 +0,0 @@ -/* - LzmaDecode.c - LZMA Decoder - - LZMA SDK 4.05 Copyright (c) 1999-2004 Igor Pavlov (2004-08-25) - http://www.7-zip.org/ - - LZMA SDK is licensed under two licenses: - 1) GNU Lesser General Public License (GNU LGPL) - 2) Common Public License (CPL) - It means that you can select one of these two licenses and - follow rules of that license. - - SPECIAL EXCEPTION: - Igor Pavlov, as the author of this code, expressly permits you to - statically or dynamically link your code (or bind by name) to the - interfaces of this file without subjecting your linked code to the - terms of the CPL or GNU LGPL. Any modifications or additions - to this file, however, are subject to the LGPL or CPL terms. -*/ - -#include "LzmaDecode.h" - -#ifndef Byte -#define Byte unsigned char -#endif - -#define kNumTopBits 24 -#define kTopValue ((UInt32)1 << kNumTopBits) - -#define kNumBitModelTotalBits 11 -#define kBitModelTotal (1 << kNumBitModelTotalBits) -#define kNumMoveBits 5 - -typedef struct _CRangeDecoder -{ - Byte *Buffer; - Byte *BufferLim; - UInt32 Range; - UInt32 Code; - #ifdef _LZMA_IN_CB - ILzmaInCallback *InCallback; - int Result; - #endif - int ExtraBytes; -} CRangeDecoder; - -Byte RangeDecoderReadByte(CRangeDecoder *rd) -{ - if (rd->Buffer == rd->BufferLim) - { - #ifdef _LZMA_IN_CB - UInt32 size; - rd->Result = rd->InCallback->Read(rd->InCallback, &rd->Buffer, &size); - rd->BufferLim = rd->Buffer + size; - if (size == 0) - #endif - { - rd->ExtraBytes = 1; - return 0xFF; - } - } - return (*rd->Buffer++); -} - -/* #define ReadByte (*rd->Buffer++) */ -#define ReadByte (RangeDecoderReadByte(rd)) - -void RangeDecoderInit(CRangeDecoder *rd, - #ifdef _LZMA_IN_CB - ILzmaInCallback *inCallback - #else - Byte *stream, UInt32 bufferSize - #endif - ) -{ - int i; - #ifdef _LZMA_IN_CB - rd->InCallback = inCallback; - rd->Buffer = rd->BufferLim = 0; - #else - rd->Buffer = stream; - rd->BufferLim = stream + bufferSize; - #endif - rd->ExtraBytes = 0; - rd->Code = 0; - rd->Range = (0xFFFFFFFF); - for(i = 0; i < 5; i++) - rd->Code = (rd->Code << 8) | ReadByte; -} - -#define RC_INIT_VAR UInt32 range = rd->Range; UInt32 code = rd->Code; -#define RC_FLUSH_VAR rd->Range = range; rd->Code = code; -#define RC_NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | ReadByte; } - -UInt32 RangeDecoderDecodeDirectBits(CRangeDecoder *rd, int numTotalBits) -{ - RC_INIT_VAR - UInt32 result = 0; - int i; - for (i = numTotalBits; i > 0; i--) - { - /* UInt32 t; */ - range >>= 1; - - result <<= 1; - if (code >= range) - { - code -= range; - result |= 1; - } - /* - t = (code - range) >> 31; - t &= 1; - code -= range & (t - 1); - result = (result + result) | (1 - t); - */ - RC_NORMALIZE - } - RC_FLUSH_VAR - return result; -} - -int RangeDecoderBitDecode(CProb *prob, CRangeDecoder *rd) -{ - UInt32 bound = (rd->Range >> kNumBitModelTotalBits) * *prob; - if (rd->Code < bound) - { - rd->Range = bound; - *prob += (kBitModelTotal - *prob) >> kNumMoveBits; - if (rd->Range < kTopValue) - { - rd->Code = (rd->Code << 8) | ReadByte; - rd->Range <<= 8; - } - return 0; - } - else - { - rd->Range -= bound; - rd->Code -= bound; - *prob -= (*prob) >> kNumMoveBits; - if (rd->Range < kTopValue) - { - rd->Code = (rd->Code << 8) | ReadByte; - rd->Range <<= 8; - } - return 1; - } -} - -#define RC_GET_BIT2(prob, mi, A0, A1) \ - UInt32 bound = (range >> kNumBitModelTotalBits) * *prob; \ - if (code < bound) \ - { A0; range = bound; *prob += (kBitModelTotal - *prob) >> kNumMoveBits; mi <<= 1; } \ - else \ - { A1; range -= bound; code -= bound; *prob -= (*prob) >> kNumMoveBits; mi = (mi + mi) + 1; } \ - RC_NORMALIZE - -#define RC_GET_BIT(prob, mi) RC_GET_BIT2(prob, mi, ; , ;) - -int RangeDecoderBitTreeDecode(CProb *probs, int numLevels, CRangeDecoder *rd) -{ - int mi = 1; - int i; - #ifdef _LZMA_LOC_OPT - RC_INIT_VAR - #endif - for(i = numLevels; i > 0; i--) - { - #ifdef _LZMA_LOC_OPT - CProb *prob = probs + mi; - RC_GET_BIT(prob, mi) - #else - mi = (mi + mi) + RangeDecoderBitDecode(probs + mi, rd); - #endif - } - #ifdef _LZMA_LOC_OPT - RC_FLUSH_VAR - #endif - return mi - (1 << numLevels); -} - -int RangeDecoderReverseBitTreeDecode(CProb *probs, int numLevels, CRangeDecoder *rd) -{ - int mi = 1; - int i; - int symbol = 0; - #ifdef _LZMA_LOC_OPT - RC_INIT_VAR - #endif - for(i = 0; i < numLevels; i++) - { - #ifdef _LZMA_LOC_OPT - CProb *prob = probs + mi; - RC_GET_BIT2(prob, mi, ; , symbol |= (1 << i)) - #else - int bit = RangeDecoderBitDecode(probs + mi, rd); - mi = mi + mi + bit; - symbol |= (bit << i); - #endif - } - #ifdef _LZMA_LOC_OPT - RC_FLUSH_VAR - #endif - return symbol; -} - -Byte LzmaLiteralDecode(CProb *probs, CRangeDecoder *rd) -{ - int symbol = 1; - #ifdef _LZMA_LOC_OPT - RC_INIT_VAR - #endif - do - { - #ifdef _LZMA_LOC_OPT - CProb *prob = probs + symbol; - RC_GET_BIT(prob, symbol) - #else - symbol = (symbol + symbol) | RangeDecoderBitDecode(probs + symbol, rd); - #endif - } - while (symbol < 0x100); - #ifdef _LZMA_LOC_OPT - RC_FLUSH_VAR - #endif - return symbol; -} - -Byte LzmaLiteralDecodeMatch(CProb *probs, CRangeDecoder *rd, Byte matchByte) -{ - int symbol = 1; - #ifdef _LZMA_LOC_OPT - RC_INIT_VAR - #endif - do - { - int bit; - int matchBit = (matchByte >> 7) & 1; - matchByte <<= 1; - #ifdef _LZMA_LOC_OPT - { - CProb *prob = probs + ((1 + matchBit) << 8) + symbol; - RC_GET_BIT2(prob, symbol, bit = 0, bit = 1) - } - #else - bit = RangeDecoderBitDecode(probs + ((1 + matchBit) << 8) + symbol, rd); - symbol = (symbol << 1) | bit; - #endif - if (matchBit != bit) - { - while (symbol < 0x100) - { - #ifdef _LZMA_LOC_OPT - CProb *prob = probs + symbol; - RC_GET_BIT(prob, symbol) - #else - symbol = (symbol + symbol) | RangeDecoderBitDecode(probs + symbol, rd); - #endif - } - break; - } - } - while (symbol < 0x100); - #ifdef _LZMA_LOC_OPT - RC_FLUSH_VAR - #endif - return symbol; -} - -#define kNumPosBitsMax 4 -#define kNumPosStatesMax (1 << kNumPosBitsMax) - -#define kLenNumLowBits 3 -#define kLenNumLowSymbols (1 << kLenNumLowBits) -#define kLenNumMidBits 3 -#define kLenNumMidSymbols (1 << kLenNumMidBits) -#define kLenNumHighBits 8 -#define kLenNumHighSymbols (1 << kLenNumHighBits) - -#define LenChoice 0 -#define LenChoice2 (LenChoice + 1) -#define LenLow (LenChoice2 + 1) -#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits)) -#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits)) -#define kNumLenProbs (LenHigh + kLenNumHighSymbols) - -int LzmaLenDecode(CProb *p, CRangeDecoder *rd, int posState) -{ - if(RangeDecoderBitDecode(p + LenChoice, rd) == 0) - return RangeDecoderBitTreeDecode(p + LenLow + - (posState << kLenNumLowBits), kLenNumLowBits, rd); - if(RangeDecoderBitDecode(p + LenChoice2, rd) == 0) - return kLenNumLowSymbols + RangeDecoderBitTreeDecode(p + LenMid + - (posState << kLenNumMidBits), kLenNumMidBits, rd); - return kLenNumLowSymbols + kLenNumMidSymbols + - RangeDecoderBitTreeDecode(p + LenHigh, kLenNumHighBits, rd); -} - -#define kNumStates 12 - -#define kStartPosModelIndex 4 -#define kEndPosModelIndex 14 -#define kNumFullDistances (1 << (kEndPosModelIndex >> 1)) - -#define kNumPosSlotBits 6 -#define kNumLenToPosStates 4 - -#define kNumAlignBits 4 -#define kAlignTableSize (1 << kNumAlignBits) - -#define kMatchMinLen 2 - -#define IsMatch 0 -#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax)) -#define IsRepG0 (IsRep + kNumStates) -#define IsRepG1 (IsRepG0 + kNumStates) -#define IsRepG2 (IsRepG1 + kNumStates) -#define IsRep0Long (IsRepG2 + kNumStates) -#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax)) -#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits)) -#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex) -#define LenCoder (Align + kAlignTableSize) -#define RepLenCoder (LenCoder + kNumLenProbs) -#define Literal (RepLenCoder + kNumLenProbs) - -#if Literal != LZMA_BASE_SIZE -StopCompilingDueBUG -#endif - -#ifdef _LZMA_OUT_READ - -typedef struct _LzmaVarState -{ - CRangeDecoder RangeDecoder; - Byte *Dictionary; - UInt32 DictionarySize; - UInt32 DictionaryPos; - UInt32 GlobalPos; - UInt32 Reps[4]; - int lc; - int lp; - int pb; - int State; - int PreviousIsMatch; - int RemainLen; -} LzmaVarState; - -int LzmaDecoderInit( - unsigned char *buffer, UInt32 bufferSize, - int lc, int lp, int pb, - unsigned char *dictionary, UInt32 dictionarySize, - #ifdef _LZMA_IN_CB - ILzmaInCallback *inCallback - #else - unsigned char *inStream, UInt32 inSize - #endif - ) -{ - LzmaVarState *vs = (LzmaVarState *)buffer; - CProb *p = (CProb *)(buffer + sizeof(LzmaVarState)); - UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + lp)); - UInt32 i; - if (bufferSize < numProbs * sizeof(CProb) + sizeof(LzmaVarState)) - return LZMA_RESULT_NOT_ENOUGH_MEM; - vs->Dictionary = dictionary; - vs->DictionarySize = dictionarySize; - vs->DictionaryPos = 0; - vs->GlobalPos = 0; - vs->Reps[0] = vs->Reps[1] = vs->Reps[2] = vs->Reps[3] = 1; - vs->lc = lc; - vs->lp = lp; - vs->pb = pb; - vs->State = 0; - vs->PreviousIsMatch = 0; - vs->RemainLen = 0; - dictionary[dictionarySize - 1] = 0; - for (i = 0; i < numProbs; i++) - p[i] = kBitModelTotal >> 1; - RangeDecoderInit(&vs->RangeDecoder, - #ifdef _LZMA_IN_CB - inCallback - #else - inStream, inSize - #endif - ); - return LZMA_RESULT_OK; -} - -int LzmaDecode(unsigned char *buffer, - unsigned char *outStream, UInt32 outSize, - UInt32 *outSizeProcessed) -{ - LzmaVarState *vs = (LzmaVarState *)buffer; - CProb *p = (CProb *)(buffer + sizeof(LzmaVarState)); - CRangeDecoder rd = vs->RangeDecoder; - int state = vs->State; - int previousIsMatch = vs->PreviousIsMatch; - Byte previousByte; - UInt32 rep0 = vs->Reps[0], rep1 = vs->Reps[1], rep2 = vs->Reps[2], rep3 = vs->Reps[3]; - UInt32 nowPos = 0; - UInt32 posStateMask = (1 << (vs->pb)) - 1; - UInt32 literalPosMask = (1 << (vs->lp)) - 1; - int lc = vs->lc; - int len = vs->RemainLen; - UInt32 globalPos = vs->GlobalPos; - - Byte *dictionary = vs->Dictionary; - UInt32 dictionarySize = vs->DictionarySize; - UInt32 dictionaryPos = vs->DictionaryPos; - - if (len == -1) - { - *outSizeProcessed = 0; - return LZMA_RESULT_OK; - } - - while(len > 0 && nowPos < outSize) - { - UInt32 pos = dictionaryPos - rep0; - if (pos >= dictionarySize) - pos += dictionarySize; - outStream[nowPos++] = dictionary[dictionaryPos] = dictionary[pos]; - if (++dictionaryPos == dictionarySize) - dictionaryPos = 0; - len--; - } - if (dictionaryPos == 0) - previousByte = dictionary[dictionarySize - 1]; - else - previousByte = dictionary[dictionaryPos - 1]; -#else - -int LzmaDecode( - Byte *buffer, UInt32 bufferSize, - int lc, int lp, int pb, - #ifdef _LZMA_IN_CB - ILzmaInCallback *inCallback, - #else - unsigned char *inStream, UInt32 inSize, - #endif - unsigned char *outStream, UInt32 outSize, - UInt32 *outSizeProcessed) -{ - UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + lp)); - CProb *p = (CProb *)buffer; - CRangeDecoder rd; - UInt32 i; - int state = 0; - int previousIsMatch = 0; - Byte previousByte = 0; - UInt32 rep0 = 1, rep1 = 1, rep2 = 1, rep3 = 1; - UInt32 nowPos = 0; - UInt32 posStateMask = (1 << pb) - 1; - UInt32 literalPosMask = (1 << lp) - 1; - int len = 0; - if (bufferSize < numProbs * sizeof(CProb)) - return LZMA_RESULT_NOT_ENOUGH_MEM; - for (i = 0; i < numProbs; i++) - p[i] = kBitModelTotal >> 1; - RangeDecoderInit(&rd, - #ifdef _LZMA_IN_CB - inCallback - #else - inStream, inSize - #endif - ); -#endif - - *outSizeProcessed = 0; - while(nowPos < outSize) - { - int posState = (int)( - (nowPos - #ifdef _LZMA_OUT_READ - + globalPos - #endif - ) - & posStateMask); - #ifdef _LZMA_IN_CB - if (rd.Result != LZMA_RESULT_OK) - return rd.Result; - #endif - if (rd.ExtraBytes != 0) - return LZMA_RESULT_DATA_ERROR; - if (RangeDecoderBitDecode(p + IsMatch + (state << kNumPosBitsMax) + posState, &rd) == 0) - { - CProb *probs = p + Literal + (LZMA_LIT_SIZE * - ((( - (nowPos - #ifdef _LZMA_OUT_READ - + globalPos - #endif - ) - & literalPosMask) << lc) + (previousByte >> (8 - lc)))); - - if (state < 4) state = 0; - else if (state < 10) state -= 3; - else state -= 6; - if (previousIsMatch) - { - Byte matchByte; - #ifdef _LZMA_OUT_READ - UInt32 pos = dictionaryPos - rep0; - if (pos >= dictionarySize) - pos += dictionarySize; - matchByte = dictionary[pos]; - #else - matchByte = outStream[nowPos - rep0]; - #endif - previousByte = LzmaLiteralDecodeMatch(probs, &rd, matchByte); - previousIsMatch = 0; - } - else - previousByte = LzmaLiteralDecode(probs, &rd); - outStream[nowPos++] = previousByte; - #ifdef _LZMA_OUT_READ - dictionary[dictionaryPos] = previousByte; - if (++dictionaryPos == dictionarySize) - dictionaryPos = 0; - #endif - } - else - { - previousIsMatch = 1; - if (RangeDecoderBitDecode(p + IsRep + state, &rd) == 1) - { - if (RangeDecoderBitDecode(p + IsRepG0 + state, &rd) == 0) - { - if (RangeDecoderBitDecode(p + IsRep0Long + (state << kNumPosBitsMax) + posState, &rd) == 0) - { - #ifdef _LZMA_OUT_READ - UInt32 pos; - #endif - if ( - (nowPos - #ifdef _LZMA_OUT_READ - + globalPos - #endif - ) - == 0) - return LZMA_RESULT_DATA_ERROR; - state = state < 7 ? 9 : 11; - #ifdef _LZMA_OUT_READ - pos = dictionaryPos - rep0; - if (pos >= dictionarySize) - pos += dictionarySize; - previousByte = dictionary[pos]; - dictionary[dictionaryPos] = previousByte; - if (++dictionaryPos == dictionarySize) - dictionaryPos = 0; - #else - previousByte = outStream[nowPos - rep0]; - #endif - outStream[nowPos++] = previousByte; - continue; - } - } - else - { - UInt32 distance; - if(RangeDecoderBitDecode(p + IsRepG1 + state, &rd) == 0) - distance = rep1; - else - { - if(RangeDecoderBitDecode(p + IsRepG2 + state, &rd) == 0) - distance = rep2; - else - { - distance = rep3; - rep3 = rep2; - } - rep2 = rep1; - } - rep1 = rep0; - rep0 = distance; - } - len = LzmaLenDecode(p + RepLenCoder, &rd, posState); - state = state < 7 ? 8 : 11; - } - else - { - int posSlot; - rep3 = rep2; - rep2 = rep1; - rep1 = rep0; - state = state < 7 ? 7 : 10; - len = LzmaLenDecode(p + LenCoder, &rd, posState); - posSlot = RangeDecoderBitTreeDecode(p + PosSlot + - ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << - kNumPosSlotBits), kNumPosSlotBits, &rd); - if (posSlot >= kStartPosModelIndex) - { - int numDirectBits = ((posSlot >> 1) - 1); - rep0 = ((2 | ((UInt32)posSlot & 1)) << numDirectBits); - if (posSlot < kEndPosModelIndex) - { - rep0 += RangeDecoderReverseBitTreeDecode( - p + SpecPos + rep0 - posSlot - 1, numDirectBits, &rd); - } - else - { - rep0 += RangeDecoderDecodeDirectBits(&rd, - numDirectBits - kNumAlignBits) << kNumAlignBits; - rep0 += RangeDecoderReverseBitTreeDecode(p + Align, kNumAlignBits, &rd); - } - } - else - rep0 = posSlot; - rep0++; - } - if (rep0 == (UInt32)(0)) - { - /* it's for stream version */ - len = -1; - break; - } - if (rep0 > nowPos - #ifdef _LZMA_OUT_READ - + globalPos - #endif - ) - { - return LZMA_RESULT_DATA_ERROR; - } - len += kMatchMinLen; - do - { - #ifdef _LZMA_OUT_READ - UInt32 pos = dictionaryPos - rep0; - if (pos >= dictionarySize) - pos += dictionarySize; - previousByte = dictionary[pos]; - dictionary[dictionaryPos] = previousByte; - if (++dictionaryPos == dictionarySize) - dictionaryPos = 0; - #else - previousByte = outStream[nowPos - rep0]; - #endif - outStream[nowPos++] = previousByte; - len--; - } - while(len > 0 && nowPos < outSize); - } - } - - #ifdef _LZMA_OUT_READ - vs->RangeDecoder = rd; - vs->DictionaryPos = dictionaryPos; - vs->GlobalPos = globalPos + nowPos; - vs->Reps[0] = rep0; - vs->Reps[1] = rep1; - vs->Reps[2] = rep2; - vs->Reps[3] = rep3; - vs->State = state; - vs->PreviousIsMatch = previousIsMatch; - vs->RemainLen = len; - #endif - - *outSizeProcessed = nowPos; - return LZMA_RESULT_OK; -} diff --git a/tools/lzma-loader/src/LzmaDecode.h b/tools/lzma-loader/src/LzmaDecode.h deleted file mode 100644 index f58944e3c..000000000 --- a/tools/lzma-loader/src/LzmaDecode.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - LzmaDecode.h - LZMA Decoder interface - - LZMA SDK 4.05 Copyright (c) 1999-2004 Igor Pavlov (2004-08-25) - http://www.7-zip.org/ - - LZMA SDK is licensed under two licenses: - 1) GNU Lesser General Public License (GNU LGPL) - 2) Common Public License (CPL) - It means that you can select one of these two licenses and - follow rules of that license. - - SPECIAL EXCEPTION: - Igor Pavlov, as the author of this code, expressly permits you to - statically or dynamically link your code (or bind by name) to the - interfaces of this file without subjecting your linked code to the - terms of the CPL or GNU LGPL. Any modifications or additions - to this file, however, are subject to the LGPL or CPL terms. -*/ - -#ifndef __LZMADECODE_H -#define __LZMADECODE_H - -/* #define _LZMA_IN_CB */ -/* Use callback for input data */ - -/* #define _LZMA_OUT_READ */ -/* Use read function for output data */ - -/* #define _LZMA_PROB32 */ -/* It can increase speed on some 32-bit CPUs, - but memory usage will be doubled in that case */ - -/* #define _LZMA_LOC_OPT */ -/* Enable local speed optimizations inside code */ - -#ifndef UInt32 -#ifdef _LZMA_UINT32_IS_ULONG -#define UInt32 unsigned long -#else -#define UInt32 unsigned int -#endif -#endif - -#ifdef _LZMA_PROB32 -#define CProb UInt32 -#else -#define CProb unsigned short -#endif - -#define LZMA_RESULT_OK 0 -#define LZMA_RESULT_DATA_ERROR 1 -#define LZMA_RESULT_NOT_ENOUGH_MEM 2 - -#ifdef _LZMA_IN_CB -typedef struct _ILzmaInCallback -{ - int (*Read)(void *object, unsigned char **buffer, UInt32 *bufferSize); -} ILzmaInCallback; -#endif - -#define LZMA_BASE_SIZE 1846 -#define LZMA_LIT_SIZE 768 - -/* -bufferSize = (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << (lc + lp)))* sizeof(CProb) -bufferSize += 100 in case of _LZMA_OUT_READ -by default CProb is unsigned short, -but if specify _LZMA_PROB_32, CProb will be UInt32(unsigned int) -*/ - -#ifdef _LZMA_OUT_READ -int LzmaDecoderInit( - unsigned char *buffer, UInt32 bufferSize, - int lc, int lp, int pb, - unsigned char *dictionary, UInt32 dictionarySize, - #ifdef _LZMA_IN_CB - ILzmaInCallback *inCallback - #else - unsigned char *inStream, UInt32 inSize - #endif -); -#endif - -int LzmaDecode( - unsigned char *buffer, - #ifndef _LZMA_OUT_READ - UInt32 bufferSize, - int lc, int lp, int pb, - #ifdef _LZMA_IN_CB - ILzmaInCallback *inCallback, - #else - unsigned char *inStream, UInt32 inSize, - #endif - #endif - unsigned char *outStream, UInt32 outSize, - UInt32 *outSizeProcessed); - -#endif diff --git a/tools/lzma-loader/src/LzmaDecode.o b/tools/lzma-loader/src/LzmaDecode.o deleted file mode 100644 index 3d7be3f4d..000000000 Binary files a/tools/lzma-loader/src/LzmaDecode.o and /dev/null differ diff --git a/tools/lzma-loader/src/Makefile b/tools/lzma-loader/src/Makefile deleted file mode 100644 index f5d780c2b..000000000 --- a/tools/lzma-loader/src/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# -# Makefile for Broadcom BCM947XX boards -# -# Copyright 2001-2003, Broadcom Corporation -# All Rights Reserved. -# -# THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -# KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -# SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -# -# Copyright 2004 Manuel Novoa III -# Modified to support bzip'd kernels. -# Of course, it would be better to integrate bunzip capability into CFE. -# -# Copyright 2005 Oleg I. Vdovikin -# Cleaned up, modified for lzma support, removed from kernel -# - -TEXT_START := 0x80001000 -BZ_TEXT_START := 0x80400000 - -OBJCOPY := $(CROSS_COMPILE)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S - -CFLAGS = -D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -Os \ - -fno-strict-aliasing -fno-common -fomit-frame-pointer -G 0 -mno-abicalls -fno-pic \ - -ffunction-sections -pipe -mlong-calls -fno-common \ - -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap -CFLAGS += -DLOADADDR=$(TEXT_START) -D_LZMA_IN_CB -CFLAGS += $(INCLUDE) - -ASFLAGS = $(CFLAGS) -D__ASSEMBLY__ -DBZ_TEXT_START=$(BZ_TEXT_START) - -SEDFLAGS := s/BZ_TEXT_START/$(BZ_TEXT_START)/;s/TEXT_START/$(TEXT_START)/ - -OBJECTS := head.o data.o - -all: loader.gz loader.elf - -# Don't build dependencies, this may die if $(CC) isn't gcc -dep: - -install: - -loader.gz: loader - gzip -nc9 $< > $@ - -loader.elf: loader.o - cp $< $@ - -loader: loader.o - $(OBJCOPY) $< $@ - -loader.o: loader.lds $(OBJECTS) - $(LD) -static --gc-sections -no-warn-mismatch -T loader.lds -o $@ $(OBJECTS) - -loader.lds: loader.lds.in Makefile - @sed "$(SEDFLAGS)" < $< > $@ - -data.o: data.lds decompress.image - $(LD) -no-warn-mismatch -T data.lds -r -o $@ -b binary decompress.image -b elf32-tradlittlemips - -data.lds: - @echo "SECTIONS { .data : { code_start = .; *(.data) code_stop = .; }}" > $@ - -decompress.image: decompress - $(OBJCOPY) $< $@ - -decompress: decompress.lds decompress.o LzmaDecode.o - $(LD) -static --gc-sections -no-warn-mismatch -T decompress.lds -o $@ decompress.o LzmaDecode.o - -decompress.lds: decompress.lds.in Makefile - @sed "$(SEDFLAGS)" < $< > $@ - -mrproper: clean - -clean: - rm -f loader.gz loader decompress *.lds *.o *.image diff --git a/tools/lzma-loader/src/README b/tools/lzma-loader/src/README deleted file mode 100644 index 16649e950..000000000 --- a/tools/lzma-loader/src/README +++ /dev/null @@ -1,55 +0,0 @@ -/* - * LZMA compressed kernel decompressor for bcm947xx boards - * - * Copyright (C) 2005 by Oleg I. Vdovikin - * - * 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 of the License, 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -The code is intended to decompress kernel, being compressed using lzma utility -build using 7zip LZMA SDK. This utility is located in the LZMA_Alone directory - -decompressor code expects that your .trx file consist of three partitions: - -1) decompressor itself (this is gziped code which pmon/cfe will extract and run -on boot-up instead of real kernel) -2) LZMA compressed kernel (both streamed and regular modes are supported now) -3) Root filesystem - -Please be sure to apply the following patch for use this new trx layout (it will -allow using both new and old trx files for root filesystem lookup code) - ---- linuz/arch/mips/brcm-boards/bcm947xx/setup.c 2005-01-23 19:24:27.503322896 +0300 -+++ linux/arch/mips/brcm-boards/bcm947xx/setup.c 2005-01-23 19:29:05.237100944 +0300 -@@ -221,7 +221,9 @@ - /* Try looking at TRX header for rootfs offset */ - if (le32_to_cpu(trx->magic) == TRX_MAGIC) { - bcm947xx_parts[1].offset = off; -- if (le32_to_cpu(trx->offsets[1]) > off) -+ if (le32_to_cpu(trx->offsets[2]) > off) -+ off = le32_to_cpu(trx->offsets[2]); -+ else if (le32_to_cpu(trx->offsets[1]) > off) - off = le32_to_cpu(trx->offsets[1]); - continue; - } - - -Revision history: - 0.02 Initial release - 0.03 Added Mineharu Takahara patch to pass actual - output size to decoder (stream mode compressed input is not - a requirement anymore) - 0.04 Reordered functions using lds script diff --git a/tools/lzma-loader/src/data.lds b/tools/lzma-loader/src/data.lds deleted file mode 100644 index ec48b2dfd..000000000 --- a/tools/lzma-loader/src/data.lds +++ /dev/null @@ -1 +0,0 @@ -SECTIONS { .data : { code_start = .; *(.data) code_stop = .; }} diff --git a/tools/lzma-loader/src/data.o b/tools/lzma-loader/src/data.o deleted file mode 100644 index 3c398909f..000000000 Binary files a/tools/lzma-loader/src/data.o and /dev/null differ diff --git a/tools/lzma-loader/src/decompress b/tools/lzma-loader/src/decompress deleted file mode 100755 index 9b2091e78..000000000 Binary files a/tools/lzma-loader/src/decompress and /dev/null differ diff --git a/tools/lzma-loader/src/decompress.c b/tools/lzma-loader/src/decompress.c deleted file mode 100644 index 05681b152..000000000 --- a/tools/lzma-loader/src/decompress.c +++ /dev/null @@ -1,186 +0,0 @@ -/* - * LZMA compressed kernel decompressor for bcm947xx boards - * - * Copyright (C) 2005 by Oleg I. Vdovikin - * - * 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 of the License, 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 this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * - * Please note, this was code based on the bunzip2 decompressor code - * by Manuel Novoa III (mjn3@codepoet.org), although the only thing left - * is an idea and part of original vendor code - * - * - * 12-Mar-2005 Mineharu Takahara - * pass actual output size to decoder (stream mode - * compressed input is not a requirement anymore) - * - * 24-Apr-2005 Oleg I. Vdovikin - * reordered functions using lds script, removed forward decl - * - */ - -#include "LzmaDecode.h" - -#define BCM4710_FLASH 0x1fc00000 /* Flash */ - -#define KSEG0 0x80000000 -#define KSEG1 0xa0000000 - -#define KSEG1ADDR(a) ((((unsigned)(a)) & 0x1fffffffU) | KSEG1) - -#define Index_Invalidate_I 0x00 -#define Index_Writeback_Inv_D 0x01 - -#define cache_unroll(base,op) \ - __asm__ __volatile__( \ - ".set noreorder;\n" \ - ".set mips3;\n" \ - "cache %1, (%0);\n" \ - ".set mips0;\n" \ - ".set reorder\n" \ - : \ - : "r" (base), \ - "i" (op)); - -static __inline__ void blast_icache(unsigned long size, unsigned long lsize) -{ - unsigned long start = KSEG0; - unsigned long end = (start + size); - - while(start < end) { - cache_unroll(start,Index_Invalidate_I); - start += lsize; - } -} - -static __inline__ void blast_dcache(unsigned long size, unsigned long lsize) -{ - unsigned long start = KSEG0; - unsigned long end = (start + size); - - while(start < end) { - cache_unroll(start,Index_Writeback_Inv_D); - start += lsize; - } -} - -#define TRX_MAGIC 0x30524448 /* "HDR0" */ - -struct trx_header { - unsigned int magic; /* "HDR0" */ - unsigned int len; /* Length of file including header */ - unsigned int crc32; /* 32-bit CRC from flag_version to end of file */ - unsigned int flag_version; /* 0:15 flags, 16:31 version */ - unsigned int offsets[3]; /* Offsets of partitions from start of header */ -}; - -#define EDIMAX_PS_HEADER_MAGIC 0x36315350 /* "PS16" */ -#define EDIMAX_PS_HEADER_LEN 0xc /* 12 bytes long for edimax header */ - -/* beyound the image end, size not known in advance */ -extern unsigned char workspace[]; - -unsigned int offset; -unsigned char *data; - -/* flash access should be aligned, so wrapper is used */ -/* read byte from the flash, all accesses are 32-bit aligned */ -static int read_byte(void *object, unsigned char **buffer, UInt32 *bufferSize) -{ - static unsigned int val; - - if (((unsigned int)offset % 4) == 0) { - val = *(unsigned int *)data; - data += 4; - } - - *bufferSize = 1; - *buffer = ((unsigned char *)&val) + (offset++ & 3); - - return LZMA_RESULT_OK; -} - -static __inline__ unsigned char get_byte(void) -{ - unsigned char *buffer; - UInt32 fake; - - return read_byte(0, &buffer, &fake), *buffer; -} - -/* should be the first function */ -void entry(unsigned long icache_size, unsigned long icache_lsize, - unsigned long dcache_size, unsigned long dcache_lsize, - unsigned long fw_arg0, unsigned long fw_arg1, - unsigned long fw_arg2, unsigned long fw_arg3) -{ - unsigned int i; /* temp value */ - unsigned int lc; /* literal context bits */ - unsigned int lp; /* literal pos state bits */ - unsigned int pb; /* pos state bits */ - unsigned int osize; /* uncompressed size */ - - ILzmaInCallback callback; - callback.Read = read_byte; - - /* look for trx header, 32-bit data access */ - for (data = ((unsigned char *) KSEG1ADDR(BCM4710_FLASH)); - ((struct trx_header *)data)->magic != TRX_MAGIC && - ((struct trx_header *)data)->magic != EDIMAX_PS_HEADER_MAGIC; - data += 65536); - - if (((struct trx_header *)data)->magic == EDIMAX_PS_HEADER_MAGIC) - data += EDIMAX_PS_HEADER_LEN; - /* compressed kernel is in the partition 0 or 1 */ - if (((struct trx_header *)data)->offsets[1] > 65536) - data += ((struct trx_header *)data)->offsets[0]; - else - data += ((struct trx_header *)data)->offsets[1]; - - offset = 0; - - /* lzma args */ - i = get_byte(); - lc = i % 9, i = i / 9; - lp = i % 5, pb = i / 5; - - /* skip rest of the LZMA coder property */ - for (i = 0; i < 4; i++) - get_byte(); - - /* read the lower half of uncompressed size in the header */ - osize = ((unsigned int)get_byte()) + - ((unsigned int)get_byte() << 8) + - ((unsigned int)get_byte() << 16) + - ((unsigned int)get_byte() << 24); - - /* skip rest of the header (upper half of uncompressed size) */ - for (i = 0; i < 4; i++) - get_byte(); - - /* decompress kernel */ - if (LzmaDecode(workspace, ~0, lc, lp, pb, &callback, - (unsigned char*)LOADADDR, osize, &i) == LZMA_RESULT_OK) - { - blast_dcache(dcache_size, dcache_lsize); - blast_icache(icache_size, icache_lsize); - - /* Jump to load address */ - ((void (*)(unsigned long, unsigned long, unsigned long, - unsigned long)) LOADADDR)(fw_arg0, fw_arg1, fw_arg2, - fw_arg3); - } -} diff --git a/tools/lzma-loader/src/decompress.image b/tools/lzma-loader/src/decompress.image deleted file mode 100755 index b0cb1af95..000000000 Binary files a/tools/lzma-loader/src/decompress.image and /dev/null differ diff --git a/tools/lzma-loader/src/decompress.lds b/tools/lzma-loader/src/decompress.lds deleted file mode 100644 index 7da944d0c..000000000 --- a/tools/lzma-loader/src/decompress.lds +++ /dev/null @@ -1,20 +0,0 @@ -OUTPUT_ARCH(mips) -ENTRY(entry) -SECTIONS { - . = 0x80400000; - .text : { - *(.text.entry) - *(.text) - *(.rodata) - } - - .data : { - *(.data) - } - - .bss : { - *(.bss) - } - - workspace = .; -} diff --git a/tools/lzma-loader/src/decompress.lds.in b/tools/lzma-loader/src/decompress.lds.in deleted file mode 100644 index 33f56f8a0..000000000 --- a/tools/lzma-loader/src/decompress.lds.in +++ /dev/null @@ -1,20 +0,0 @@ -OUTPUT_ARCH(mips) -ENTRY(entry) -SECTIONS { - . = BZ_TEXT_START; - .text : { - *(.text.entry) - *(.text) - *(.rodata) - } - - .data : { - *(.data) - } - - .bss : { - *(.bss) - } - - workspace = .; -} diff --git a/tools/lzma-loader/src/decompress.o b/tools/lzma-loader/src/decompress.o deleted file mode 100644 index 483bc0b32..000000000 Binary files a/tools/lzma-loader/src/decompress.o and /dev/null differ diff --git a/tools/lzma-loader/src/head.S b/tools/lzma-loader/src/head.S deleted file mode 100644 index 3a33e4016..000000000 --- a/tools/lzma-loader/src/head.S +++ /dev/null @@ -1,160 +0,0 @@ -/* Copyright 2005 Oleg I. Vdovikin (oleg@cs.msu.su) */ -/* cache manipulation adapted from Broadcom code */ -/* idea taken from original bunzip2 decompressor code */ -/* Copyright 2004 Manuel Novoa III (mjn3@codepoet.org) */ -/* Licensed under the linux kernel's version of the GPL.*/ - -#include -#include - -#define KSEG0 0x80000000 - -#define C0_CONFIG $16 -#define C0_TAGLO $28 -#define C0_TAGHI $29 - -#define CONF1_DA_SHIFT 7 /* D$ associativity */ -#define CONF1_DA_MASK 0x00000380 -#define CONF1_DA_BASE 1 -#define CONF1_DL_SHIFT 10 /* D$ line size */ -#define CONF1_DL_MASK 0x00001c00 -#define CONF1_DL_BASE 2 -#define CONF1_DS_SHIFT 13 /* D$ sets/way */ -#define CONF1_DS_MASK 0x0000e000 -#define CONF1_DS_BASE 64 -#define CONF1_IA_SHIFT 16 /* I$ associativity */ -#define CONF1_IA_MASK 0x00070000 -#define CONF1_IA_BASE 1 -#define CONF1_IL_SHIFT 19 /* I$ line size */ -#define CONF1_IL_MASK 0x00380000 -#define CONF1_IL_BASE 2 -#define CONF1_IS_SHIFT 22 /* Instruction cache sets/way */ -#define CONF1_IS_MASK 0x01c00000 -#define CONF1_IS_BASE 64 - -#define Index_Invalidate_I 0x00 -#define Index_Writeback_Inv_D 0x01 - - .text - LEAF(startup) - .set noreorder - addi sp, -48 - sw a0, 16(sp) - sw a1, 20(sp) - sw a2, 24(sp) - sw a3, 28(sp) - - /* Copy decompressor code to the right place */ - li t2, BZ_TEXT_START - add a0, t2, 0 - la a1, code_start - la a2, code_stop -$L1: - lw t0, 0(a1) - sw t0, 0(a0) - add a1, 4 - add a0, 4 - blt a1, a2, $L1 - nop - - /* At this point we need to invalidate dcache and */ - /* icache before jumping to new code */ - -1: /* Get cache sizes */ - .set mips32 - mfc0 s0,C0_CONFIG,1 - .set mips0 - - li s1,CONF1_DL_MASK - and s1,s0 - beq s1,zero,nodc - nop - - srl s1,CONF1_DL_SHIFT - li t0,CONF1_DL_BASE - sll s1,t0,s1 /* s1 has D$ cache line size */ - - li s2,CONF1_DA_MASK - and s2,s0 - srl s2,CONF1_DA_SHIFT - addiu s2,CONF1_DA_BASE /* s2 now has D$ associativity */ - - li t0,CONF1_DS_MASK - and t0,s0 - srl t0,CONF1_DS_SHIFT - li s3,CONF1_DS_BASE - sll s3,s3,t0 /* s3 has D$ sets per way */ - - multu s2,s3 /* sets/way * associativity */ - mflo t0 /* total cache lines */ - - multu s1,t0 /* D$ linesize * lines */ - mflo s2 /* s2 is now D$ size in bytes */ - - /* Initilize the D$: */ - mtc0 zero,C0_TAGLO - mtc0 zero,C0_TAGHI - - li t0,KSEG0 /* Just an address for the first $ line */ - addu t1,t0,s2 /* + size of cache == end */ - - .set mips3 -1: cache Index_Writeback_Inv_D,0(t0) - .set mips0 - bne t0,t1,1b - addu t0,s1 - -nodc: - /* Now we get to do it all again for the I$ */ - - move s3,zero /* just in case there is no icache */ - move s4,zero - - li t0,CONF1_IL_MASK - and t0,s0 - beq t0,zero,noic - nop - - srl t0,CONF1_IL_SHIFT - li s3,CONF1_IL_BASE - sll s3,t0 /* s3 has I$ cache line size */ - - li t0,CONF1_IA_MASK - and t0,s0 - srl t0,CONF1_IA_SHIFT - addiu s4,t0,CONF1_IA_BASE /* s4 now has I$ associativity */ - - li t0,CONF1_IS_MASK - and t0,s0 - srl t0,CONF1_IS_SHIFT - li s5,CONF1_IS_BASE - sll s5,t0 /* s5 has I$ sets per way */ - - multu s4,s5 /* sets/way * associativity */ - mflo t0 /* s4 is now total cache lines */ - - multu s3,t0 /* I$ linesize * lines */ - mflo s4 /* s4 is cache size in bytes */ - - /* Initilize the I$: */ - mtc0 zero,C0_TAGLO - mtc0 zero,C0_TAGHI - - li t0,KSEG0 /* Just an address for the first $ line */ - addu t1,t0,s4 /* + size of cache == end */ - - .set mips3 -1: cache Index_Invalidate_I,0(t0) - .set mips0 - bne t0,t1,1b - addu t0,s3 - -noic: - move a0,s3 /* icache line size */ - move a1,s4 /* icache size */ - move a2,s1 /* dcache line size */ - jal t2 - move a3,s2 /* dcache size */ - - .set reorder - END(startup) diff --git a/tools/lzma-loader/src/head.o b/tools/lzma-loader/src/head.o deleted file mode 100644 index 04763fa4b..000000000 Binary files a/tools/lzma-loader/src/head.o and /dev/null differ diff --git a/tools/lzma-loader/src/loader b/tools/lzma-loader/src/loader deleted file mode 100755 index 871117b87..000000000 Binary files a/tools/lzma-loader/src/loader and /dev/null differ diff --git a/tools/lzma-loader/src/loader.elf b/tools/lzma-loader/src/loader.elf deleted file mode 100755 index 0633a0e77..000000000 Binary files a/tools/lzma-loader/src/loader.elf and /dev/null differ diff --git a/tools/lzma-loader/src/loader.gz b/tools/lzma-loader/src/loader.gz deleted file mode 100644 index 426c9295e..000000000 Binary files a/tools/lzma-loader/src/loader.gz and /dev/null differ diff --git a/tools/lzma-loader/src/loader.lds b/tools/lzma-loader/src/loader.lds deleted file mode 100644 index 9d95adbfa..000000000 --- a/tools/lzma-loader/src/loader.lds +++ /dev/null @@ -1,17 +0,0 @@ -OUTPUT_ARCH(mips) -ENTRY(startup) -SECTIONS { - . = 0x80001000; - .text : { - *(.text) - *(.rodata) - } - - .data : { - *(.data) - } - - .bss : { - *(.bss) - } -} diff --git a/tools/lzma-loader/src/loader.lds.in b/tools/lzma-loader/src/loader.lds.in deleted file mode 100644 index 20f2ea98e..000000000 --- a/tools/lzma-loader/src/loader.lds.in +++ /dev/null @@ -1,17 +0,0 @@ -OUTPUT_ARCH(mips) -ENTRY(startup) -SECTIONS { - . = TEXT_START; - .text : { - *(.text) - *(.rodata) - } - - .data : { - *(.data) - } - - .bss : { - *(.bss) - } -} diff --git a/tools/lzma-loader/src/loader.o b/tools/lzma-loader/src/loader.o deleted file mode 100755 index 0633a0e77..000000000 Binary files a/tools/lzma-loader/src/loader.o and /dev/null differ diff --git a/tools/lzma/Makefile b/tools/lzma/Makefile index f012f3ddd..3544aaca2 100644 --- a/tools/lzma/Makefile +++ b/tools/lzma/Makefile @@ -4,27 +4,22 @@ include $(TOPDIR)/rules.mk PKG_NAME:= lzma -PKG_VERSION:= 4.65 +PKG_VERSION:= 4.32.7 PKG_RELEASE:= 1 PKG_MD5SUM:= 434e51a018b4c8ef377bf81520a53af0 -PKG_SITES:= http://downloads.openwrt.org/sources/ - -DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 +PKG_SITES:= http://tukaani.org/lzma/ include ../rules.mk install: ${STAGING_HOST_DIR}/usr/bin/lzma -UTIL_DIR=$(WRKBUILD)/C/LzmaUtil -ALONE_DIR=$(WRKBUILD)/CPP/7zip/Compress/LZMA_Alone - $(WRKBUILD)/.compiled: ${WRKDIST}/.prepared - $(MAKE) -C $(UTIL_DIR) -f makefile.gcc - $(MAKE) -C $(ALONE_DIR) -f makefile.gcc + (cd ${WRKBUILD}; PATH="$(STAGING_HOST_DIR)/usr/bin:$$PATH" ./configure) + ${MAKE} -C ${WRKBUILD} CC='${CC_FOR_BUILD}' touch $@ ${STAGING_HOST_DIR}/usr/bin/lzma: $(WRKBUILD)/.compiled - $(INSTALL_BIN) $(WRKBUILD)/CPP/7zip/Compress/LZMA_Alone/lzma_alone \ + $(INSTALL_BIN) $(WRKBUILD)/src/lzma/lzma \ $(STAGING_HOST_DIR)/usr/bin/lzma include $(TOPDIR)/mk/tools.mk diff --git a/tools/lzma/patches/001-large_files.patch b/tools/lzma/patches/001-large_files.patch deleted file mode 100644 index b95fe9e90..000000000 --- a/tools/lzma/patches/001-large_files.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc -=================================================================== ---- lzma-4.65.orig/CPP/7zip/Compress/LZMA_Alone/makefile.gcc 2009-05-15 23:33:51.000000000 +0200 -+++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc 2009-06-01 22:00:54.000000000 +0200 -@@ -3,7 +3,7 @@ - CXX_C = gcc -O2 -Wall - LIB = -lm - RM = rm -f --CFLAGS = -c -+CFLAGS = -c -D_FILE_OFFSET_BITS=64 - - ifdef SystemDrive - IS_MINGW = 1 diff --git a/tools/lzma/patches/002-lzmp.patch b/tools/lzma/patches/002-lzmp.patch deleted file mode 100644 index 72d881cdb..000000000 --- a/tools/lzma/patches/002-lzmp.patch +++ /dev/null @@ -1,1059 +0,0 @@ -Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzmp.cpp -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzmp.cpp 2009-06-01 22:01:10.000000000 +0200 -@@ -0,0 +1,895 @@ -+/* -+ * LZMA command line tool similar to gzip to encode and decode LZMA files. -+ * -+ * Copyright (C) 2005 Ville Koskinen -+ * -+ * 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 -+ * of the License, 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 this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, -+ * USA. -+ */ -+ -+#include "../../../Common/MyInitGuid.h" -+ -+#include -+using std::cout; -+using std::cerr; -+using std::endl; -+ -+#include -+#include -+#include -+ -+#include -+using std::string; -+#include -+using std::vector; -+typedef vector stringVector; -+ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include // futimes() -+ -+// For Solaris -+#ifndef HAVE_FUTIMES -+//#define futimes(fd, tv) futimesat(fd, NULL, tv) -+#endif -+ -+#if defined(_WIN32) || defined(OS2) || defined(MSDOS) -+#include -+#include -+#define MY_SET_BINARY_MODE(file) setmode(fileno(file),O_BINARY) -+#else -+#define MY_SET_BINARY_MODE(file) -+#endif -+ -+#include "../../../7zip/Common/FileStreams.h" -+ -+#include "../../../Common/Types.h" -+ -+#include "../../../7zip/Compress/LzmaDecoder.h" -+#include "../../../7zip/Compress/LzmaEncoder.h" -+ -+#include "Exception.h" -+ -+#include "lzma_version.h" -+ -+namespace lzma { -+ -+const char *PROGRAM_VERSION = PACKAGE_VERSION; -+const char *PROGRAM_COPYRIGHT = "Copyright (C) 2006 Ville Koskinen"; -+ -+/* LZMA_Alone switches: -+ -a{N}: set compression mode - [0, 2], default: 2 (max) -+ -d{N}: set dictionary - [0,28], default: 23 (8MB) -+ -fb{N}: set number of fast bytes - [5, 255], default: 128 -+ -lc{N}: set number of literal context bits - [0, 8], default: 3 -+ -lp{N}: set number of literal pos bits - [0, 4], default: 0 -+ -pb{N}: set number of pos bits - [0, 4], default: 2 -+ -mf{MF_ID}: set Match Finder: [bt2, bt3, bt4, bt4b, pat2r, pat2, -+ pat2h, pat3h, pat4h, hc3, hc4], default: bt4 -+*/ -+ -+struct lzma_option { -+ short compression_mode; // -a -+ short dictionary; // -d -+ short fast_bytes; // -fb -+ wchar_t *match_finder; // -mf -+ short literal_context_bits; // -lc -+ short literal_pos_bits; // -lp -+ short pos_bits; // -pb -+}; -+ -+/* The following is a mapping from gzip/bzip2 style -1 .. -9 compression modes -+ * to the corresponding LZMA compression modes. Thanks, Larhzu, for coining -+ * these. */ -+const lzma_option option_mapping[] = { -+ { 0, 0, 0, NULL, 0, 0, 0}, // -0 (needed for indexing) -+ { 0, 16, 64, L"hc4", 3, 0, 2}, // -1 -+ { 0, 20, 64, L"hc4", 3, 0, 2}, // -2 -+ { 1, 19, 64, L"bt4", 3, 0, 2}, // -3 -+ { 2, 20, 64, L"bt4", 3, 0, 2}, // -4 -+ { 2, 21, 128, L"bt4", 3, 0, 2}, // -5 -+ { 2, 22, 128, L"bt4", 3, 0, 2}, // -6 -+ { 2, 23, 128, L"bt4", 3, 0, 2}, // -7 -+ { 2, 24, 255, L"bt4", 3, 0, 2}, // -8 -+ { 2, 25, 255, L"bt4", 3, 0, 2}, // -9 -+}; -+ -+struct extension_pair { -+ char *from; -+ char *to; -+}; -+ -+const extension_pair known_extensions[] = { -+ { ".lzma", "" }, -+ { ".tlz", ".tar" }, -+ { NULL, NULL } -+}; -+ -+/* Sorry, I just happen to like enumerations. */ -+enum PROGRAM_MODE { -+ PM_COMPRESS = 0, -+ PM_DECOMPRESS, -+ PM_TEST, -+ PM_HELP, -+ PM_LICENSE, -+ PM_VERSION -+}; -+ -+enum { -+ STATUS_OK = 0, -+ STATUS_ERROR = 1, -+ STATUS_WARNING = 2 -+}; -+ -+/* getopt options. */ -+/* struct option { name, has_arg, flag, val } */ -+const struct option long_options[] = { -+ { "stdout", 0, 0, 'c' }, -+ { "decompress", 0, 0, 'd' }, -+ { "compress", 0, 0, 'z' }, -+ { "keep", 0, 0, 'k' }, -+ { "force", 0, 0, 'f' }, -+ { "test", 0, 0, 't' }, -+ { "suffix", 1, 0, 'S' }, -+ { "quiet", 0, 0, 'q' }, -+ { "verbose", 0, 0, 'v' }, -+ { "help", 0, 0, 'h' }, -+ { "license", 0, 0, 'L' }, -+ { "version", 0, 0, 'V' }, -+ { "fast", 0, 0, '1' }, -+ { "best", 0, 0, '9' }, -+ { 0, 0, 0, 0 } -+}; -+ -+/* getopt option string (for the above options). */ -+const char option_string[] = "cdzkftS:qvhLV123456789A:D:F:"; -+ -+/* Defaults. */ -+PROGRAM_MODE program_mode = PM_COMPRESS; -+int verbosity = 0; -+bool stdinput = false; -+bool stdoutput = false; -+bool keep = false; -+bool force = false; -+int compression_mode = 7; -+//char *suffix = strdup(".lzma"); -+char *suffix = strdup(known_extensions[0].from); -+lzma_option advanced_options = { -1, -1, -1, NULL, -1, -1, -1 }; -+ -+void print_help(const char *const argv0) -+{ -+ // Help goes to stdout while other messages go to stderr. -+ cout << "\nlzma " << PROGRAM_VERSION -+ << " " << PROGRAM_COPYRIGHT << "\n" -+ "Based on LZMA SDK " << LZMA_SDK_VERSION_STRING << " " -+ << LZMA_SDK_COPYRIGHT_STRING -+ << "\n\nUsage: " << argv0 -+ << " [flags and input files in any order]\n" -+" -c --stdout output to standard output\n" -+" -d --decompress force decompression\n" -+" -z --compress force compression\n" -+" -k --keep keep (don't delete) input files\n" -+" -f --force force overwrite of output file and compress links\n" -+" -t --test test compressed file integrity\n" -+" -S .suf --suffix .suf use suffix .suf on compressed files\n" -+" -q --quiet suppress error messages\n" -+" -v --verbose be verbose\n" -+" -h --help print this message\n" -+" -L --license display the license information\n" -+" -V --version display version numbers of LZMA SDK and lzma\n" -+" -1 .. -2 fast compression\n" -+" -3 .. -9 good to excellent compression. -7 is the default.\n" -+" --fast alias for -1\n" -+" --best alias for -9 (usually *not* what you want)\n\n" -+" Memory usage depends a lot on the chosen compression mode -1 .. -9.\n" -+" See the man page lzma(1) for details.\n\n"; -+} -+ -+void print_license(void) -+{ -+ cout << "\n LZMA command line tool " << PROGRAM_VERSION << " - " -+ << PROGRAM_COPYRIGHT -+ << "\n LZMA SDK " << LZMA_SDK_VERSION_STRING << " - " -+ << LZMA_SDK_COPYRIGHT_STRING -+ << "\n This program is a part of the LZMA utils package.\n" -+ " http://tukaani.org/lzma/\n\n" -+" This program is free software; you can redistribute it and/or\n" -+" modify it under the terms of the GNU General Public License\n" -+" as published by the Free Software Foundation; either version 2\n" -+" of the License, or (at your option) any later version.\n" -+"\n" -+" This program is distributed in the hope that it will be useful,\n" -+" but WITHOUT ANY WARRANTY; without even the implied warranty of\n" -+" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" -+" GNU General Public License for more details.\n" -+"\n"; -+} -+ -+void print_version(void) -+{ -+ cout << "LZMA command line tool " << PROGRAM_VERSION << "\n" -+ << "LZMA SDK " << LZMA_SDK_VERSION_STRING << "\n"; -+} -+ -+short str2int (const char *str, const int &min, const int &max) -+{ -+ int value = -1; -+ char *endptr = NULL; -+ if (str == NULL || str[0] == '\0') -+ throw ArgumentException("Invalid integer option"); -+ value = strtol (str, &endptr, 10); -+ if (*endptr != '\0' || value < min || value > max) -+ throw ArgumentException("Invalid integer option"); -+ return value; -+} -+ -+void parse_options(int argc, char **argv, stringVector &filenames) -+{ -+ /* Snatched from getopt(3). */ -+ int c; -+ -+ /* Check how we were called */ -+ { -+ char *p = strrchr (argv[0], '/'); // Remove path prefix, if any -+ if (p++ == NULL) -+ p = argv[0]; -+ if (strstr (p, "un") != NULL) { -+ program_mode = PM_DECOMPRESS; -+ } else if (strstr (p, "cat") != NULL) { -+ program_mode = PM_DECOMPRESS; -+ stdoutput = true; -+ } -+ } -+ -+ while (-1 != (c = getopt_long(argc, argv, option_string, -+ long_options, NULL))) { -+ switch (c) { -+ // stdout -+ case 'c': -+ stdoutput = true; -+ break; -+ -+ // decompress -+ case 'd': -+ program_mode = PM_DECOMPRESS; -+ break; -+ -+ // compress -+ case 'z': -+ program_mode = PM_COMPRESS; -+ break; -+ -+ // keep -+ case 'k': -+ keep = true; -+ break; -+ -+ // force -+ case 'f': -+ force = true; -+ break; -+ -+ // test -+ case 't': -+ program_mode = PM_TEST; -+ break; -+ -+ // suffix -+ case 'S': -+ if (optarg) { -+ free(suffix); -+ suffix = strdup(optarg); -+ } -+ break; -+ -+ // quiet -+ case 'q': -+ verbosity = 0; -+ break; -+ -+ // verbose -+ case 'v': -+ verbosity++; -+ break; -+ -+ // help -+ case 'h': -+ program_mode = PM_HELP; -+ break; -+ -+ // license -+ case 'L': -+ program_mode = PM_LICENSE; -+ break; -+ -+ // version -+ case 'V': -+ program_mode = PM_VERSION; -+ break; -+ -+ case '1': case '2': case '3': case '4': case '5': -+ case '6': case '7': case '8': case '9': -+ compression_mode = c - '0'; -+ break; -+ -+ // Advanced options // -+ // Compression mode -+ case 'A': -+ advanced_options.compression_mode = -+ str2int (optarg, 0, 2); -+ break; -+ -+ // Dictionary size -+ case 'D': -+ advanced_options.dictionary = -+ str2int (optarg, 0, 28); -+ break; -+ -+ // Fast bytes -+ case 'F': -+ advanced_options.fast_bytes = -+ str2int (optarg, 0, 273); -+ break; -+ -+ default: -+ throw ArgumentException(""); -+ break; -+ } // switch(c) -+ } // while(1) -+ -+ for (int i = optind; i < argc; i++) { -+ if (strcmp("-", argv[i]) == 0) -+ continue; -+ filenames.push_back(argv[i]); -+ } -+} // parse_options -+ -+void set_encoder_properties(NCompress::NLzma::CEncoder *encoder, -+ lzma_option &opt) -+{ -+ /* Almost verbatim from LzmaAlone.cpp. */ -+ PROPID propIDs[] = -+ { -+ NCoderPropID::kDictionarySize, -+ NCoderPropID::kPosStateBits, -+ NCoderPropID::kLitContextBits, -+ NCoderPropID::kLitPosBits, -+ NCoderPropID::kAlgorithm, -+ NCoderPropID::kNumFastBytes, -+ NCoderPropID::kMatchFinder, -+ NCoderPropID::kEndMarker -+ }; -+ const int kNumProps = sizeof(propIDs) / sizeof(propIDs[0]); -+#define VALUE(x) (advanced_options.x >= 0 ? advanced_options.x : opt.x) -+ PROPVARIANT properties[kNumProps]; -+ for (int p = 0; p < 6; p++) -+ properties[p].vt = VT_UI4; -+ properties[0].ulVal = UInt32(1 << VALUE (dictionary)); -+ properties[1].ulVal = UInt32(VALUE (pos_bits)); -+ properties[2].ulVal = UInt32(VALUE (literal_context_bits)); -+ properties[3].ulVal = UInt32(VALUE (literal_pos_bits)); -+ properties[4].ulVal = UInt32(VALUE (compression_mode)); -+ properties[5].ulVal = UInt32(VALUE (fast_bytes)); -+#undef VALUE -+ -+ properties[6].vt = VT_BSTR; -+ properties[6].bstrVal = (BSTR)opt.match_finder; -+ -+ properties[7].vt = VT_BOOL; -+ properties[7].boolVal = stdinput ? VARIANT_TRUE : VARIANT_FALSE; -+ -+ if (encoder->SetCoderProperties(propIDs, properties, kNumProps) != S_OK) -+ throw Exception("SetCoderProperties() error"); -+} -+ -+void encode(NCompress::NLzma::CEncoder *encoderSpec, -+ CMyComPtr inStream, -+ CMyComPtr outStream, -+ lzma_option encoder_options, -+ UInt64 fileSize) -+{ -+ set_encoder_properties(encoderSpec, encoder_options); -+ -+ encoderSpec->WriteCoderProperties(outStream); -+ -+ for (int i = 0; i < 8; i++) -+ { -+ Byte b = Byte(fileSize >> (8 * i)); -+ if (outStream->Write(&b, sizeof(b), 0) != S_OK) -+ throw Exception("Write error while encoding"); -+ } -+ -+ HRESULT result = encoderSpec->Code(inStream, outStream, 0, 0, 0); -+ -+ if (result == E_OUTOFMEMORY) -+ throw Exception("Cannot allocate memory"); -+ else if (result != S_OK) { -+ char buffer[33]; -+ snprintf(buffer, 33, "%d", (unsigned int)result); -+ throw Exception(string("Encoder error: ") + buffer); -+ } -+} -+ -+void decode(NCompress::NLzma::CDecoder *decoderSpec, -+ CMyComPtr inStream, -+ CMyComPtr outStream) -+{ -+ const UInt32 kPropertiesSize = 5; -+ Byte properties[kPropertiesSize]; -+ UInt32 processedSize; -+ UInt64 fileSize = 0; -+ -+ if (inStream->Read(properties, kPropertiesSize, &processedSize) != S_OK) -+ throw Exception("Read error"); -+ if (processedSize != kPropertiesSize) -+ throw Exception("Read error"); -+ if (decoderSpec->SetDecoderProperties2(properties, kPropertiesSize) != S_OK) -+ throw Exception("SetDecoderProperties() error"); -+ -+ for (int i = 0; i < 8; i++) -+ { -+ Byte b; -+ -+ if (inStream->Read(&b, sizeof(b), &processedSize) != S_OK) -+ throw Exception("Read error"); -+ if (processedSize != 1) -+ throw Exception("Read error"); -+ -+ fileSize |= ((UInt64)b) << (8 * i); -+ } -+ -+ if (decoderSpec->Code(inStream, outStream, 0, &fileSize, 0) != S_OK) -+ throw Exception("Decoder error"); -+} -+ -+int open_instream(const string infile, -+ CMyComPtr &inStream, -+ UInt64 &fileSize) -+{ -+ CInFileStream *inStreamSpec = new CInFileStream; -+ inStream = inStreamSpec; -+ if (!inStreamSpec->Open(infile.c_str())) -+ throw Exception("Cannot open input file " + infile); -+ -+ inStreamSpec->File.GetLength(fileSize); -+ -+ return inStreamSpec->File.GetHandle(); -+} -+ -+int open_outstream(const string outfile, -+ CMyComPtr &outStream) -+{ -+ COutFileStream *outStreamSpec = new COutFileStream; -+ outStream = outStreamSpec; -+ -+ bool open_by_force = (program_mode == PM_TEST) | force; -+ -+ if (!outStreamSpec->Create(outfile.c_str(), open_by_force)) -+ throw Exception("Cannot open output file " + outfile); -+ -+ return outStreamSpec->File.GetHandle(); -+} -+ -+double get_ratio(int inhandle, int outhandle) -+{ -+ struct stat in_stats, out_stats; -+ fstat(inhandle, &in_stats); -+ fstat(outhandle, &out_stats); -+ -+ return (double)out_stats.st_size / (double)in_stats.st_size; -+} -+ -+mode_t get_file_mode(string filename) -+{ -+ struct stat in_stat; -+ lstat(filename.c_str(), &in_stat); -+ -+ return in_stat.st_mode; -+} -+ -+bool string_ends_with(string str, string ending) -+{ -+ return equal(ending.rbegin(), ending.rend(), str.rbegin()); -+} -+ -+bool extension_is_known(string filename) -+{ -+ bool known_format = false; -+ extension_pair extension; int i = 1; -+ -+ extension = known_extensions[0]; -+ while (extension.from != NULL) { -+ if (string_ends_with(filename, extension.from)) { -+ known_format = true; -+ break; -+ } -+ extension = known_extensions[i]; -+ i++; -+ } -+ -+ if (!known_format) { -+ if (!string_ends_with(filename, suffix)) { -+ return false; -+ } -+ } -+ -+ return true; -+} -+ -+string replace_extension(string filename) -+{ -+ int suffix_starts_at = filename.length() - strlen (suffix); -+ string from_suffix = filename.substr(suffix_starts_at, strlen (suffix)); -+ string ret = filename.substr(0, suffix_starts_at); -+ extension_pair extension; int i = 1; -+ -+ bool found_replacement = false; -+ extension = known_extensions[0]; -+ while (extension.from != NULL) { -+ if (from_suffix.compare(extension.from) == 0) { -+ ret += extension.to; -+ found_replacement = true; -+ break; -+ } -+ -+ extension = known_extensions[i]; -+ i++; -+ } -+ -+ return ret; -+} -+ -+string pretty_print_status(string filename, string output_filename, -+ string ratio) -+{ -+ string ret = ""; -+ -+ ret += filename; -+ ret += ":\t "; -+ -+ if (program_mode == PM_TEST) { -+ ret += "decoded succesfully"; -+ -+ return ret; -+ } -+ -+ if (!stdinput && !stdoutput) { -+ ret += ratio; -+ ret += " -- "; -+ } -+ -+ if (program_mode == PM_COMPRESS) { -+ if (keep) { -+ ret += "encoded succesfully"; -+ -+ return ret; -+ } -+ -+ ret += "replaced with "; -+ ret += output_filename; -+ -+ return ret; -+ } -+ -+ if (program_mode == PM_DECOMPRESS) { -+ if (keep) { -+ ret += "decoded succesfully"; -+ -+ return ret; -+ } -+ -+ ret += "replaced with "; -+ ret += output_filename; -+ -+ return ret; -+ } -+ -+ return ret; -+} -+ -+static string archive_name; // I know, it is crude, but I haven't found any other -+ // way then making a global variable to transfer filename to handler -+ -+void signal_handler (int signum) -+{ -+ unlink (archive_name.c_str()); // deleting -+ signal (signum, SIG_DFL); // we return the default function to used signal -+ kill (getpid(), signum); // and then send this signal to the process again -+} -+ -+} // namespace lzma -+ -+ -+int main(int argc, char **argv) -+{ -+ using namespace lzma; -+ using std::cerr; -+ -+ stringVector filenames; -+ -+ signal (SIGTERM,signal_handler); -+ signal (SIGHUP,signal_handler); -+ signal (SIGINT,signal_handler); -+ -+ try { -+ parse_options(argc, argv, filenames); -+ } -+ catch (...) { -+ return STATUS_ERROR; -+ } -+ -+ if (program_mode == PM_HELP) { -+ print_help(argv[0]); -+ return STATUS_OK; -+ } -+ else if (program_mode == PM_LICENSE) { -+ print_license(); -+ return STATUS_OK; -+ } -+ else if (program_mode == PM_VERSION) { -+ print_version(); -+ return STATUS_OK; -+ } -+ -+ if (filenames.empty()) { -+ stdinput = true; -+ stdoutput = true; -+ -+ /* FIXME: get rid of this */ -+ filenames.push_back("-"); -+ } -+ -+ /* Protection: always create new files with 0600 in order to prevent -+ * outsiders from reading incomplete data. */ -+ umask(0077); -+ -+ bool warning = false; -+ -+ for (int i = 0; i < filenames.size(); i++) { -+ CMyComPtr inStream; -+ CMyComPtr outStream; -+ UInt64 fileSize = 0; -+ int inhandle = 0, outhandle = 0; -+ string output_filename; -+ -+ if (stdinput) { -+ inStream = new CStdInFileStream; -+ MY_SET_BINARY_MODE(stdin); -+ fileSize = (UInt64)(Int64)-1; -+ -+ inhandle = STDIN_FILENO; -+ -+ outStream = new CStdOutFileStream; -+ MY_SET_BINARY_MODE(stdout); -+ -+ outhandle = STDOUT_FILENO; -+ } -+ else { -+ mode_t infile_mode = get_file_mode(filenames[i]); -+ if (!S_ISREG(infile_mode)) { -+ if (S_ISDIR(infile_mode)) { -+ warning = true; -+ cerr << argv[0] << ": " << filenames[i] << ": " -+ << "cowardly refusing to work on directory" -+ << endl; -+ -+ continue; -+ } -+ else if (S_ISLNK(infile_mode)) { -+ if (!stdoutput && !force) { -+ warning = true; -+ -+ cerr << argv[0] << ": " << filenames[i] << ": " -+ << "cowardly refusing to work on symbolic link " -+ << "(use --force to force encoding or decoding)" -+ << endl; -+ -+ continue; -+ } -+ } -+ else { -+ warning = true; -+ -+ cerr << argv[0] << ": " << filenames[i] << ": " -+ << "doesn't exist or is not a regular file" -+ << endl; -+ -+ continue; -+ } -+ } -+ -+ // Test if the file already ends with *suffix. -+ if (program_mode == PM_COMPRESS && !force -+ && string_ends_with(filenames[i], -+ suffix)) { -+ warning = true; -+ -+ cerr << filenames[i] << " already has " -+ << suffix << " suffix -- unchanged\n"; -+ -+ continue; -+ } -+ -+ // Test if the file extension is known. -+ if (program_mode == PM_DECOMPRESS -+ && !extension_is_known(filenames[i])) { -+ warning = true; -+ -+ cerr << filenames[i] << ": " -+ << " unknown suffix -- unchanged" -+ << endl; -+ -+ continue; -+ } -+ -+ try { -+ inhandle = open_instream(filenames[i], inStream, fileSize); -+ } -+ catch (Exception e) { -+ cerr << argv[0] << ": " << e.what() << endl; -+ return STATUS_ERROR; -+ } -+ -+ if (stdoutput) { -+ outStream = new CStdOutFileStream; -+ MY_SET_BINARY_MODE(stdout); -+ -+ outhandle = STDOUT_FILENO; -+ } -+ else { -+ /* Testing mode is nothing else but decoding -+ * and throwing away the result. */ -+ if (program_mode == PM_TEST) -+ output_filename = "/dev/null"; -+ else if (program_mode == PM_DECOMPRESS) -+ output_filename = replace_extension(filenames[i]); -+ else -+ output_filename = filenames[i] -+ + suffix; -+ archive_name = output_filename; -+ -+ try { -+ outhandle = open_outstream(output_filename, outStream); -+ } -+ catch (Exception e) { -+ cerr << argv[0] << ": " << e.what() << endl; -+ return STATUS_ERROR; -+ } -+ } -+ -+ } -+ -+ // Unless --force is specified, do not read/write compressed -+ // data from/to a terminal. -+ if (!force) { -+ if (program_mode == PM_COMPRESS && isatty(outhandle)) { -+ cerr << argv[0] << ": compressed data not " -+ "written to a terminal. Use " -+ "-f to force compression.\n" -+ << argv[0] << ": For help, type: " -+ << argv[0] << " -h\n"; -+ return STATUS_ERROR; -+ } else if (program_mode == PM_DECOMPRESS -+ && isatty(inhandle)) { -+ cerr << argv[0] << ": compressed data not " -+ "read from a terminal. Use " -+ "-f to force decompression.\n" -+ << argv[0] << ": For help, type: " -+ << argv[0] << " -h\n"; -+ return STATUS_ERROR; -+ } -+ } -+ -+ if (program_mode == PM_COMPRESS) { -+ NCompress::NLzma::CEncoder *encoderSpec = -+ new NCompress::NLzma::CEncoder; -+ -+ lzma_option options = option_mapping[compression_mode]; -+ -+ try { -+ encode(encoderSpec, inStream, outStream, options, fileSize); -+ } -+ catch (Exception e) { -+ cerr << argv[0] << ": " << e.what() << endl; -+ unlink(output_filename.c_str()); -+ delete(encoderSpec); -+ -+ return STATUS_ERROR; -+ } -+ -+ delete(encoderSpec); -+ } -+ else { // PM_DECOMPRESS | PM_TEST -+ NCompress::NLzma::CDecoder *decoderSpec = -+ new NCompress::NLzma::CDecoder; -+ -+ try { -+ decode(decoderSpec, inStream, outStream); -+ } -+ catch (Exception e) { -+ cerr << argv[0] << ": " << e.what() << endl; -+ unlink(output_filename.c_str()); -+ delete(decoderSpec); -+ -+ return STATUS_ERROR; -+ } -+ -+ delete(decoderSpec); -+ } -+ -+ /* Set permissions and owners. */ -+ if ( (program_mode == PM_COMPRESS || program_mode == PM_DECOMPRESS ) -+ && (!stdinput && !stdoutput) ) { -+ -+ int ret = 0; -+ struct stat file_stats; -+ ret = fstat(inhandle, &file_stats); -+ -+ ret = fchmod(outhandle, file_stats.st_mode); -+ ret = fchown(outhandle, file_stats.st_uid, file_stats.st_gid); -+ // We need to call fchmod() again, since otherwise the SUID bits -+ // are lost. -+ ret = fchmod(outhandle, file_stats.st_mode); -+ -+ struct timeval file_times[2]; -+ // Access time -+ file_times[0].tv_sec = file_stats.st_atime; -+ file_times[0].tv_usec = 0; -+ // Modification time -+ file_times[1].tv_sec = file_stats.st_mtime; -+ file_times[1].tv_usec = 0; -+ -+ ret = futimes(outhandle, file_times); -+ -+ if (!keep) -+ unlink(filenames[i].c_str()); -+ } -+ -+ if (verbosity > 0) { -+ if (stdoutput) { -+ cerr << filenames[i] << ":\t "; -+ cerr << "decoded succesfully" -+ << endl; -+ } -+ -+ else { -+ char buf[10] = { 0 }; -+ -+ if (program_mode == PM_DECOMPRESS) -+ snprintf(buf, 10, "%.2f%%", -+ (1 - get_ratio(outhandle, inhandle)) * 100); -+ if (program_mode == PM_COMPRESS) -+ snprintf(buf, 10, "%.2f%%", -+ (1 - get_ratio(inhandle, outhandle)) * 100); -+ -+ string ratio = buf; -+ cerr << pretty_print_status(filenames[i], output_filename, -+ ratio) -+ << endl; -+ } -+ } -+ } -+ -+ if (warning) -+ return STATUS_WARNING; -+ -+ return STATUS_OK; -+} -+ -Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/Exception.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/Exception.h 2009-06-01 22:01:10.000000000 +0200 -@@ -0,0 +1,45 @@ -+/* A couple of exceptions for lzmp. -+ * -+ * Copyright (C) 2005 Ville Koskinen -+ * -+ * 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 -+ * of the License, 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. -+ */ -+ -+#ifndef _EXCEPTION_H_ -+#define _EXCEPTION_H_ -+ -+#include -+using std::string; -+ -+class Exception -+{ -+private: -+ string message; -+public: -+ Exception(char *what): message(what) { } -+ Exception(string what): message(what) { } -+ -+ ~Exception() { } -+ -+ string what(void) { return message; } -+}; -+ -+class ArgumentException: public Exception -+{ -+public: -+ ArgumentException(char *what): Exception(what) { } -+ ArgumentException(string what): Exception(what) { } -+ -+ ~ArgumentException() { } -+}; -+ -+#endif -+ -Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc -=================================================================== ---- lzma-4.65.orig/CPP/7zip/Compress/LZMA_Alone/makefile.gcc 2009-06-01 22:00:54.000000000 +0200 -+++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc 2009-06-01 22:06:13.000000000 +0200 -@@ -1,9 +1,10 @@ --PROG = lzma -+PROG = lzma_alone -+PROG2 = lzma - CXX = g++ -O2 -Wall - CXX_C = gcc -O2 -Wall - LIB = -lm - RM = rm -f --CFLAGS = -c -D_FILE_OFFSET_BITS=64 -+CFLAGS = -c -I ../../../ -D_FILE_OFFSET_BITS=64 -DPACKAGE_VERSION="\"4.32.0beta3\"" - - ifdef SystemDrive - IS_MINGW = 1 -@@ -45,12 +46,35 @@ - Lzma86Dec.o \ - Lzma86Enc.o \ - -+OBJS2 = \ -+ C_FileIO.o \ -+ CRC.o \ -+ Alloc.o \ -+ FileStreams.o \ -+ StreamUtils.o \ -+ InBuffer.o \ -+ OutBuffer.o \ -+ LzmaDecoder.o \ -+ StringConvert.o \ -+ StringToInt.o \ -+ LzmaEncoder.o \ -+ LzmaDec.o \ -+ LzmaEnc.o \ -+ LzFind.o \ -+ 7zCrc.o \ -+ lzmp.o - --all: $(PROG) -+all: $(PROG) $(PROG2) - - $(PROG): $(OBJS) - $(CXX) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIB) $(LIB2) - -+$(PROG2): $(OBJS2) -+ $(CXX) -o $(PROG2) $(LDFLAGS) $(OBJS2) $(LIB) -+ -+lzmp.o: lzmp.cpp -+ $(CXX) $(CFLAGS) lzmp.cpp -+ - LzmaAlone.o: LzmaAlone.cpp - $(CXX) $(CFLAGS) LzmaAlone.cpp - -@@ -131,5 +153,5 @@ - $(CXX_C) $(CFLAGS) ../../../../C/LzmaUtil/Lzma86Enc.c - - clean: -- -$(RM) $(PROG) $(OBJS) -+ -$(RM) $(PROG) $(PROG2) $(OBJS) - -Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzma_version.h -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzma_version.h 2009-06-01 22:01:10.000000000 +0200 -@@ -0,0 +1,31 @@ -+#ifndef LZMA_VERSION_H -+#define LZMA_VERSION_H -+ -+/* -+ Version and copyright information used by LZMA utils. -+*/ -+ -+static const char *LZMA_SDK_VERSION_STRING = "4.43"; -+ -+static const char *LZMA_SDK_COPYRIGHT_STRING = -+ "Copyright (C) 1999-2006 Igor Pavlov"; -+ -+static const char *LZMA_SDK_COPYRIGHT_INFO = -+ " See http://7-zip.org/sdk.html or the documentation of LZMA SDK for\n" -+ " the license. For reference, the version 4.43 is free software\n" -+ " licensed under the GNU LGPL."; -+ -+ -+static const char *LZMA_UTILS_VERSION_STRING = PACKAGE_VERSION; -+ -+static const char *LZMA_UTILS_COPYRIGHT_STRING = -+ "Copyright (C) 2006 Lasse Collin"; -+ -+static const char *LZMA_UTILS_COPYRIGHT_INFO = -+ "This program comes with ABSOLUTELY NO WARRANTY.\n" -+ "You may redistribute copies of this program\n" -+ "under the terms of the GNU General Public License.\n" -+ "For more information about these matters, see the file " -+ "named COPYING.\n"; -+ -+#endif /* ifndef LZMA_VERSION_H */ -Index: lzma-4.65/CPP/Common/C_FileIO.h -=================================================================== ---- lzma-4.65.orig/CPP/Common/C_FileIO.h 2009-05-15 23:33:51.000000000 +0200 -+++ lzma-4.65/CPP/Common/C_FileIO.h 2009-06-01 22:06:56.000000000 +0200 -@@ -24,6 +24,7 @@ - bool Close(); - bool GetLength(UInt64 &length) const; - off_t Seek(off_t distanceToMove, int moveMethod) const; -+ int GetHandle() const { return _handle; } - }; - - class CInFile: public CFileBase diff --git a/tools/lzma/patches/003-compile_fixes.patch b/tools/lzma/patches/003-compile_fixes.patch deleted file mode 100644 index 49ae66b9c..000000000 --- a/tools/lzma/patches/003-compile_fixes.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -urN lzma-4.65/CPP/7zip/Common/FileStreams.h lzma-4.65.new/CPP/7zip/Common/FileStreams.h ---- lzma-4.65/CPP/7zip/Common/FileStreams.h 2009-05-15 23:33:51.000000000 +0200 -+++ lzma-4.65.new/CPP/7zip/Common/FileStreams.h 2009-06-01 22:30:01.000000000 +0200 -@@ -72,6 +72,7 @@ - public IOutStream, - public CMyUnknownImp - { -+public: - #ifdef USE_WIN_FILE - NWindows::NFile::NIO::COutFile File; - #else -diff -urN lzma-4.65/CPP/Common/MyWindows.h lzma-4.65.new/CPP/Common/MyWindows.h ---- lzma-4.65/CPP/Common/MyWindows.h 2009-05-15 23:33:51.000000000 +0200 -+++ lzma-4.65.new/CPP/Common/MyWindows.h 2009-06-01 22:29:26.000000000 +0200 -@@ -101,8 +101,11 @@ - - #ifdef __cplusplus - -+#ifndef INITGUID -+#define INITGUID - DEFINE_GUID(IID_IUnknown, - 0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); -+#endif - struct IUnknown - { - STDMETHOD(QueryInterface) (REFIID iid, void **outObject) PURE; diff --git a/tools/lzma/patches/100-static_library.patch b/tools/lzma/patches/100-static_library.patch deleted file mode 100644 index 15ab4e055..000000000 --- a/tools/lzma/patches/100-static_library.patch +++ /dev/null @@ -1,70 +0,0 @@ ---- a/C/LzmaUtil/makefile.gcc -+++ b/C/LzmaUtil/makefile.gcc -@@ -1,44 +1,53 @@ - PROG = lzma --CXX = g++ --LIB = -+CC = gcc -+LIB = liblzma.a - RM = rm -f - CFLAGS = -c -O2 -Wall -+AR = ar -+RANLIB = ranlib - - OBJS = \ -- LzmaUtil.o \ - Alloc.o \ - LzFind.o \ - LzmaDec.o \ - LzmaEnc.o \ -+ LzmaLib.o \ - 7zFile.o \ - 7zStream.o \ - -- - all: $(PROG) - --$(PROG): $(OBJS) -- $(CXX) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIB) $(LIB2) -+$(PROG): LzmaUtil.o $(LIB) -+ $(CC) -o $(PROG) $(LDFLAGS) $< $(LIB) - - LzmaUtil.o: LzmaUtil.c -- $(CXX) $(CFLAGS) LzmaUtil.c -+ $(CC) $(CFLAGS) LzmaUtil.c -+ -+$(LIB): $(OBJS) -+ rm -f $@ -+ $(AR) rcu $@ $(OBJS) -+ $(RANLIB) $@ - - Alloc.o: ../Alloc.c -- $(CXX) $(CFLAGS) ../Alloc.c -+ $(CC) $(CFLAGS) ../Alloc.c - - LzFind.o: ../LzFind.c -- $(CXX) $(CFLAGS) ../LzFind.c -+ $(CC) $(CFLAGS) ../LzFind.c - - LzmaDec.o: ../LzmaDec.c -- $(CXX) $(CFLAGS) ../LzmaDec.c -+ $(CC) $(CFLAGS) ../LzmaDec.c - - LzmaEnc.o: ../LzmaEnc.c -- $(CXX) $(CFLAGS) ../LzmaEnc.c -+ $(CC) $(CFLAGS) ../LzmaEnc.c -+ -+LzmaLib.o: ../LzmaLib.c -+ $(CC) $(CFLAGS) ../LzmaLib.c - - 7zFile.o: ../7zFile.c -- $(CXX) $(CFLAGS) ../7zFile.c -+ $(CC) $(CFLAGS) ../7zFile.c - - 7zStream.o: ../7zStream.c -- $(CXX) $(CFLAGS) ../7zStream.c -+ $(CC) $(CFLAGS) ../7zStream.c - - clean: -- -$(RM) $(PROG) $(OBJS) -+ -$(RM) $(PROG) *.o *.a -- cgit v1.2.3 From b563b8fd141c741932c110c2901fab555f5b22ef Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 6 Mar 2014 12:25:47 +0100 Subject: get rid of ADK_NATIVE mode, it is not regulary tested and the results where not satisfying. --- mk/build.mk | 42 --------------------------------- mk/kernel-vars.mk | 7 +++--- mk/package.mk | 17 +++++-------- mk/python.mk | 5 ---- mk/vars.mk | 22 ----------------- package/Makefile | 17 ++++--------- package/MesaLib/Makefile | 4 ---- package/ant/Makefile | 2 -- package/binutils/Makefile | 4 ---- package/busybox/Makefile | 6 +---- package/cdrtools/Makefile | 2 -- package/cmake/Makefile | 2 -- package/ecj/Makefile | 2 -- package/fastjar/Makefile | 2 -- package/firefox/Makefile | 2 +- package/gcj/Makefile | 1 - package/jikes/Makefile | 2 -- package/krb5/Makefile | 4 ---- package/libc/Config.in.manual | 6 ----- package/libc/Makefile | 36 ---------------------------- package/libgcc/Makefile | 2 -- package/libpthread/Makefile | 6 ----- package/librt/Makefile | 6 ----- package/libssh/Makefile | 2 +- package/libssp/Makefile | 6 ----- package/libstdcxx/Makefile | 4 ---- package/libthread_db/Makefile | 2 -- package/nfs-utils/Makefile | 5 ---- package/p5-XML-Parser/Makefile | 2 -- package/pycurl/Makefile | 5 ---- package/qemu/Makefile | 2 +- package/valgrind/Makefile | 2 +- package/zlib/Makefile | 7 ++---- scripts/update-sys | 11 --------- target/Makefile | 8 ------- target/config/Config.in | 7 ------ target/config/Config.in.arch.choice | 10 -------- target/linux/Config.in | 1 - target/linux/config/Config.in.audio | 2 -- target/linux/config/Config.in.block | 3 --- target/linux/config/Config.in.graphics | 7 +----- target/linux/config/Config.in.input | 10 -------- target/linux/config/Config.in.misc | 4 +--- target/linux/config/Config.in.netdevice | 1 - target/linux/config/Config.in.pm | 13 ---------- target/linux/config/Config.in.sched | 1 - target/linux/config/Config.in.serial | 9 ------- target/linux/config/Config.in.usb | 15 ------------ target/x86/sys-available/intel-atom | 29 ----------------------- tools/adk/depmaker.c | 1 - 50 files changed, 23 insertions(+), 345 deletions(-) delete mode 100644 package/libc/Config.in.manual delete mode 100644 package/libc/Makefile delete mode 100644 target/linux/config/Config.in.serial delete mode 100644 target/x86/sys-available/intel-atom (limited to 'tools') diff --git a/mk/build.mk b/mk/build.mk index 8efd7becc..3e324789b 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -149,9 +149,6 @@ world: ${BASH} ${TOPDIR}/scripts/scan-pkgs.sh ${BASH} ${TOPDIR}/scripts/update-sys ${BASH} ${TOPDIR}/scripts/update-pkg -ifeq ($(ADK_NATIVE),y) - $(MAKE) -f mk/build.mk toolchain/kernel-headers-prepare tools/install target/config-prepare target/compile package/compile root_clean package/install package_index target/install -else ifeq ($(ADK_TOOLCHAIN),y) ifeq ($(ADK_TOOLCHAIN_ONLY),y) $(MAKE) -f mk/build.mk tools/install toolchain/fixup package/compile @@ -161,7 +158,6 @@ endif else $(MAKE) -f mk/build.mk tools/install toolchain/fixup target/config-prepare target/compile package/compile root_clean package/install target/install package_index endif -endif package_index: ifeq ($(ADK_TARGET_PACKAGE_IPKG),y) @@ -348,26 +344,6 @@ ifeq (${OStype},Darwin) endif ifneq (,$(filter CYGWIN%,${OStype})) @echo ADK_HOST_CYGWIN=y > $(TOPDIR)/.defconfig -endif -ifeq ($(ADKtype),ibm-x40) - @echo ADK_LINUX_NATIVE=y >> $(TOPDIR)/.defconfig - @echo ADK_TARGET_SYSTEM_IBM_X40=y >> $(TOPDIR)/.defconfig - @sed -e "s#config ADK_TARGET#config ADK_NATIVE#" target/$(ARCH_FOR_BUILD)/sys-available/$(ADKtype) > \ - target/$(ARCH_FOR_BUILD)/sys-enabled/.$(ADKtype) - @echo "choice" > $(TOPDIR)/target/config/Config.in.native - @echo "prompt \"Target system (autodetected)\"" >> $(TOPDIR)/target/config/Config.in.native - @echo "source \"target/$(ARCH_FOR_BUILD)/sys-enabled/.$(ADKtype)\"" >> $(TOPDIR)/target/config/Config.in.native - @echo "endchoice" >> $(TOPDIR)/target/config/Config.in.native -endif -ifeq ($(ADKtype),lemote-yeelong) - @echo ADK_LINUX_NATIVE=y >> $(TOPDIR)/.defconfig - @echo ADK_TARGET_SYSTEM_LEMOTE_YEELONG=y >> $(TOPDIR)/.defconfig - @sed -e "s#config ADK_TARGET#config ADK_NATIVE#" target/mips/sys-available/$(ADKtype) > \ - target/mips/sys-enabled/.$(ADKtype) - @echo "choice" > $(TOPDIR)/target/config/Config.in.native - @echo "prompt \"Target system (autodetected)\"" >> $(TOPDIR)/target/config/Config.in.native - @echo "source \"target/mips/sys-enabled/.$(ADKtype)\"" >> $(TOPDIR)/target/config/Config.in.native - @echo "endchoice" >> $(TOPDIR)/target/config/Config.in.native endif @echo 'source "target/config/Config.in.arch.default"' > target/config/Config.in.arch @echo 'source "target/config/Config.in.arch.choice"' >> target/config/Config.in.arch @@ -438,24 +414,6 @@ ifeq (${OStype},Darwin) endif ifneq (,$(filter CYGWIN%,${OStype})) @echo ADK_HOST_CYGWIN=y > $(TOPDIR)/all.config -endif -ifeq ($(ADKtype),ibm-x40) - @echo ADK_TARGET_SYSTEM_IBM_X40=y >> $(TOPDIR)/all.config - @sed -e "s#TARGET#NATIVE#" target/$(ARCH_FOR_BUILD)/sys-available/$(ADKtype) > \ - target/$(ARCH_FOR_BUILD)/sys-enabled/.$(ADKtype) - @echo "choice" > $(TOPDIR)/target/config/Config.in.native - @echo "prompt \"Target system (autodetected)\"" >> $(TOPDIR)/target/config/Config.in.native - @echo "source \"target/$(ARCH_FOR_BUILD)/sys-enabled/.$(ADKtype)\"" >> $(TOPDIR)/target/config/Config.in.native - @echo "endchoice" >> $(TOPDIR)/target/config/Config.in.native -endif -ifeq ($(ADKtype),lemote-yeelong) - @echo ADK_TARGET_SYSTEM_LEMOTE_YEELONG=y >> $(TOPDIR)/all.config - @sed -e "s#TARGET#NATIVE#" target/$(ARCH_FOR_BUILD)/sys-available/$(ADKtype) > \ - target/$(ARCH_FOR_BUILD)/sys-enabled/.$(ADKtype) - @echo "choice" > $(TOPDIR)/target/config/Config.in.native - @echo "prompt \"Target system (autodetected)\"" >> $(TOPDIR)/target/config/Config.in.native - @echo "source \"target/$(ARCH_FOR_BUILD)/sys-enabled/.$(ADKtype)\"" >> $(TOPDIR)/target/config/Config.in.native - @echo "endchoice" >> $(TOPDIR)/target/config/Config.in.native endif @echo 'source "target/config/Config.in.arch.default"' > target/config/Config.in.arch @echo 'source "target/config/Config.in.arch.choice"' >> target/config/Config.in.arch diff --git a/mk/kernel-vars.mk b/mk/kernel-vars.mk index 0b3e7ddbb..3285e891d 100644 --- a/mk/kernel-vars.mk +++ b/mk/kernel-vars.mk @@ -1,13 +1,12 @@ # This file is part of the OpenADK project. OpenADK is copyrighted # material, please see the LICENCE file in the top-level directory. -KERNEL_MAKE_OPTS:= -C "${LINUX_DIR}" V=1 -ifneq ($(ADK_NATIVE),y) -KERNEL_MAKE_OPTS+= CROSS_COMPILE="$(TARGET_CROSS)" ARCH=$(ARCH) \ +KERNEL_MAKE_OPTS:= -C "${LINUX_DIR}" V=1 \ + CROSS_COMPILE="$(TARGET_CROSS)" ARCH=$(ARCH) \ CC="$(TARGET_CC)" HOSTCC="${CC_FOR_BUILD}" \ HOSTCFLAGS='${CFLAGS_FOR_BUILD}' \ CONFIG_SHELL='${SHELL}' -endif + ifeq (${ADK_TARGET_BROADCOM_MODEL_LINKSYS_WRT54G},y) ADK_KCPPFLAGS+= -DBCM47XX_OVERRIDE_FLASHSIZE=0x400000 \ -DBCM47XX_OVERRIDE_NVRAMSIZE=0x10000 \ diff --git a/mk/package.mk b/mk/package.mk index d5d48c1e1..8439d88eb 100644 --- a/mk/package.mk +++ b/mk/package.mk @@ -25,13 +25,12 @@ CONFIGURE_ENV+= GCC_HONOUR_COPTS=s \ CXXFLAGS='$(strip ${TARGET_CXXFLAGS})' \ CPPFLAGS='$(strip ${TARGET_CPPFLAGS})' \ LDFLAGS='$(strip ${TARGET_LDFLAGS})' \ - ${HOST_CONFIGURE_OPTS} \ PKG_CONFIG_LIBDIR='${STAGING_TARGET_DIR}/usr/lib/pkgconfig' \ ac_cv_func_realloc_0_nonnull=yes \ - ac_cv_func_malloc_0_nonnull=yes -ifeq ($(ADK_NATIVE),) -CONFIGURE_ENV+= ${TARGET_CONFIGURE_OPTS} cross_compiling=yes -endif + ac_cv_func_malloc_0_nonnull=yes \ + cross_compiling=yes \ + ${HOST_CONFIGURE_OPTS} \ + ${TARGET_CONFIGURE_OPTS} CONFIGURE_PROG?= configure MAKE_FILE?= Makefile @@ -57,12 +56,8 @@ MAKE_ENV+= $(GCC_CHECK) \ CPPFLAGS='$(strip ${TARGET_CPPFLAGS})' \ LDFLAGS='$(strip ${TARGET_LDFLAGS})' \ ${HOST_CONFIGURE_OPTS} \ - PKG_CONFIG_LIBDIR='${STAGING_TARGET_DIR}/usr/lib/pkgconfig' -ifeq ($(ADK_NATIVE),) -MAKE_ENV+= ${TARGET_CONFIGURE_OPTS} -else -MAKE_ENV+= M4=m4 -endif + PKG_CONFIG_LIBDIR='${STAGING_TARGET_DIR}/usr/lib/pkgconfig' \ + ${TARGET_CONFIGURE_OPTS} MAKE_FLAGS+= ${XAKE_FLAGS} V=1 FAKE_FLAGS+= ${XAKE_FLAGS} diff --git a/mk/python.mk b/mk/python.mk index 1ef92e664..56008760a 100644 --- a/mk/python.mk +++ b/mk/python.mk @@ -1,8 +1,3 @@ PYTHON_VERSION=2.7 -ifeq ($(ADK_NATIVE),) PYTHON_LIBDIR:=$(STAGING_HOST_DIR)/usr/lib PYTHON:=${STAGING_HOST_DIR}/usr/bin/python -else -PYTHON_LIBDIR:=/usr/lib -PYTHON:=/usr/bin/python -endif diff --git a/mk/vars.mk b/mk/vars.mk index 3798757bc..8f3022634 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -18,11 +18,6 @@ STAGING_PKG_DIR:= ${BASE_DIR}/pkg_${ADK_TARGET_SYSTEM}_${CPU_ARCH}_${ADK_TARGET_ STAGING_PKG_DIR_PFX:= ${BASE_DIR}/pkg_* STAGING_HOST_DIR:= ${BASE_DIR}/host_${GNU_HOST_NAME} STAGING_HOST_DIR_PFX:= ${BASE_DIR}/host_* -# use headers and foo-config from system -ifeq ($(ADK_NATIVE),y) -STAGING_TARGET_DIR:= -SCRIPT_TARGET_DIR:= /usr/bin -else ifeq ($(ADK_TARGET_ABI),) STAGING_TARGET_DIR:= ${BASE_DIR}/target_${CPU_ARCH}_${ADK_TARGET_LIBC} STAGING_DIR:= ${BASE_DIR}/target_${CPU_ARCH}_${ADK_TARGET_LIBC} @@ -35,7 +30,6 @@ STAGING_HOST2TARGET:= ../target_${CPU_ARCH}_${ADK_TARGET_LIBC}_${ADK_TARGET_ABI} TOOLCHAIN_BUILD_DIR= $(BASE_DIR)/toolchain_build_${CPU_ARCH}_${ADK_TARGET_LIBC}_${ADK_TARGET_ABI} endif SCRIPT_TARGET_DIR:= ${STAGING_TARGET_DIR}/scripts -endif STAGING_TARGET_DIR_PFX:=${BASE_DIR}/target_* TOOLCHAIN_BUILD_DIR_PFX=$(BASE_DIR)/toolchain_build_* TOOLS_BUILD_DIR= $(BASE_DIR)/tools_build @@ -60,15 +54,9 @@ else GCC_CHECK:= endif -ifeq ($(ADK_NATIVE),y) -TARGET_CROSS:= -TARGET_COMPILER_PREFIX?= -CONFIGURE_TRIPLE:= -else TARGET_CROSS:= $(STAGING_HOST_DIR)/bin/$(GNU_TARGET_NAME)- TARGET_COMPILER_PREFIX?=${TARGET_CROSS} CONFIGURE_TRIPLE:= --build=${GNU_HOST_NAME} --host=${GNU_TARGET_NAME} --target=${GNU_TARGET_NAME} -endif ifneq ($(strip ${ADK_USE_CCACHE}),) TARGET_COMPILER_PREFIX=ccache ${TARGET_CROSS} @@ -105,12 +93,6 @@ TARGET_LDFLAGS+= -Wl,--secure-plt endif endif -ifneq ($(ADK_NATIVE),) -TARGET_CPPFLAGS:= -TARGET_CFLAGS:= $(TARGET_CFLAGS_ARCH) -fwrapv -fno-ident -fhonour-copts -TARGET_LDFLAGS:= -endif - ifneq ($(ADK_TOOLCHAIN_GCC_USE_SSP),) TARGET_CFLAGS+= -fstack-protector TARGET_CXXFLAGS+= -fstack-protector @@ -198,11 +180,7 @@ PKG_INSTALL:= PKG_INSTROOT=$(TARGET_DIR) \ PKG_STATE_DIR:= $(TARGET_DIR)/usr/lib/pkg endif -ifeq ($(ADK_NATIVE),y) -RSTRIP:= prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh -else RSTRIP:= PATH="$(TARGET_PATH)" prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh -endif STATCMD:=$(shell if stat -qs .>/dev/null 2>&1; then echo 'stat -f %z';else echo 'stat -c %s';fi) diff --git a/package/Makefile b/package/Makefile index eb49efd6a..1b8cc97f3 100644 --- a/package/Makefile +++ b/package/Makefile @@ -9,26 +9,19 @@ ifeq (${ADK_TARGET_LIB_GLIBC},y) package-$(ADK_PACKAGE_GLIBC) += glibc gcc-compile: glibc-compile endif + ifeq (${ADK_TARGET_LIB_MUSL},y) package-$(ADK_PACKAGE_MUSL) += musl gcc-compile: musl-compile endif -ifeq (${ADK_NATIVE},y) -package-$(ADK_PACKAGE_LIBC) += libc -endif -ifneq (${ADK_NATIVE},y) -package-$(ADK_PACKAGE_LIBPTHREAD) += libpthread -endif -ifneq (${ADK_TARGET_LIB_GLIBC},y) -ifneq (${ADK_TARGET_LIB_MUSL},y) -ifneq (${ADK_NATIVE},y) +ifeq (${ADK_TARGET_LIB_UCLIBC},y) package-$(ADK_PACKAGE_UCLIBC) += uclibc -gcc-compile: uclibc-compile -endif package-$(ADK_PACKAGE_UCLIBCXX) += uclibc++ +gcc-compile: uclibc-compile endif -endif + +package-$(ADK_PACKAGE_LIBPTHREAD) += libpthread include $(TOPDIR)/package/Depends.mk diff --git a/package/MesaLib/Makefile b/package/MesaLib/Makefile index e207dac9b..c6e1811a5 100644 --- a/package/MesaLib/Makefile +++ b/package/MesaLib/Makefile @@ -52,11 +52,7 @@ CONFIGURE_ARGS+= --disable-static \ --with-dri-drivers=${DRI_DRIVERS},swrast CONFIGURE_ENV+= MISSING="echo" \ PYTHON2=$(PYTHON) - XAKE_FLAGS+= HOST_CC=${CC_FOR_BUILD} -ifeq ($(ADK_NATIVE),y) -XAKE_FLAGS+= RANLIB=ranlib AR=ar -endif mesalib-install: $(INSTALL_DIR) $(IDIR_MESALIB)/usr/lib/dri diff --git a/package/ant/Makefile b/package/ant/Makefile index 5476596eb..625853bd8 100644 --- a/package/ant/Makefile +++ b/package/ant/Makefile @@ -14,8 +14,6 @@ PKG_SITES:= http://archive.apache.org/dist/ant/source/ DISTFILES:= apache-$(PKG_NAME)-$(PKG_VERSION)-src.tar.bz2 WRKDIST= $(WRKDIR)/apache-$(PKG_NAME)-$(PKG_VERSION) -PKG_ARCH_DEPENDS:= native - include $(TOPDIR)/mk/host.mk include $(TOPDIR)/mk/package.mk diff --git a/package/binutils/Makefile b/package/binutils/Makefile index b6e6fb616..c23bac585 100644 --- a/package/binutils/Makefile +++ b/package/binutils/Makefile @@ -33,13 +33,9 @@ endif TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) TARGET_CFLAGS+= -fPIC -ifeq ($(ADK_NATIVE),) CONFIGURE_ARGS+= --disable-werror \ --host=$(GNU_TARGET_NAME) \ --target=$(GNU_TARGET_NAME) -else -CONFIGURE_ARGS+= --disable-werror -endif # disable honour cflags stuff XAKE_FLAGS+= GCC_HONOUR_COPTS=s diff --git a/package/busybox/Makefile b/package/busybox/Makefile index d4184a37a..1fe63ff0a 100644 --- a/package/busybox/Makefile +++ b/package/busybox/Makefile @@ -36,12 +36,8 @@ INSTALL_STYLE:= manual BB_MAKE_FLAGS:= V=1 IPKG_ARCH="${CPU_ARCH}" ARCH="${ARCH}" GCC_HONOUR_COPTS=s \ HOSTCC="${CC_FOR_BUILD}" HOSTCFLAGS="$(CFLAGS_FOR_BUILD)" \ + CROSS_COMPILE="$(TARGET_CROSS)" EXTRA_LDFLAGS='-static-libgcc' \ -C ${WRKBUILD} -ifneq (${ADK_NATIVE},y) -BB_MAKE_FLAGS+= CROSS_COMPILE="$(TARGET_CROSS)" EXTRA_LDFLAGS='-static-libgcc' -else -BB_MAKE_FLAGS+= EXTRA_LDFLAGS="-static-libgcc" -endif do-configure: # get all symbols from top level config diff --git a/package/cdrtools/Makefile b/package/cdrtools/Makefile index 9483ad7b9..1b195fc3f 100644 --- a/package/cdrtools/Makefile +++ b/package/cdrtools/Makefile @@ -12,8 +12,6 @@ PKG_SECTION:= misc PKG_URL:= http://cdrecord.berlios.de/private/cdrecord.html PKG_SITES:= http://openadk.org/ -PKG_ARCH_DEPENDS:= native - include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,CDRTOOLS,cdrtools,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) diff --git a/package/cmake/Makefile b/package/cmake/Makefile index e4d26b185..1079227f2 100644 --- a/package/cmake/Makefile +++ b/package/cmake/Makefile @@ -12,8 +12,6 @@ PKG_SECTION:= lang PKG_URL:= http://www.cmake.org/ PKG_SITES:= http://www.cmake.org/files/v2.8/ -PKG_ARCH_DEPENDS:= native - include $(TOPDIR)/mk/host.mk include $(TOPDIR)/mk/package.mk diff --git a/package/ecj/Makefile b/package/ecj/Makefile index 37a463eb1..92898307b 100644 --- a/package/ecj/Makefile +++ b/package/ecj/Makefile @@ -12,8 +12,6 @@ PKG_SECTION:= lang NO_DISTFILES:= 1 -PKG_ARCH_DEPENDS:= native - include $(TOPDIR)/mk/host.mk include $(TOPDIR)/mk/package.mk diff --git a/package/fastjar/Makefile b/package/fastjar/Makefile index e14c66076..0f4c1a50c 100644 --- a/package/fastjar/Makefile +++ b/package/fastjar/Makefile @@ -11,8 +11,6 @@ PKG_DESCR:= fastjar utility PKG_SECTION:= lang PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=fastjar/} -PKG_ARCH_DEPENDS:= native - include $(TOPDIR)/mk/host.mk include $(TOPDIR)/mk/package.mk diff --git a/package/firefox/Makefile b/package/firefox/Makefile index e4b69591d..1fb663e06 100644 --- a/package/firefox/Makefile +++ b/package/firefox/Makefile @@ -22,7 +22,7 @@ PKG_SITES:= http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${PKG_ PKG_NOPARALLEL:= 1 PKG_NEED_CXX:= 1 -PKG_ARCH_DEPENDS:= arm x86 x86_64 native mips +PKG_ARCH_DEPENDS:= arm x86 x86_64 mips PKG_HOST_DEPENDS:= !netbsd !freebsd !openbsd !cygwin PKG_SYSTEM_DEPENDS:= tarox-pc ibm-x40 lemote-yeelong qemu-i686 qemu-x86_64 qemu-mips64el raspberry-pi diff --git a/package/gcj/Makefile b/package/gcj/Makefile index be7059def..5ff8cc810 100644 --- a/package/gcj/Makefile +++ b/package/gcj/Makefile @@ -13,7 +13,6 @@ PKG_SITES:= ${MASTER_SITE_GNU:=gcc/gcc-${PKG_VERSION}/} DISTFILES:= gcc-$(PKG_VERSION).tar.bz2 -PKG_ARCH_DEPENDS:= native WRKDIST= ${WRKDIR}/gcc-${PKG_VERSION} include $(TOPDIR)/mk/host.mk diff --git a/package/jikes/Makefile b/package/jikes/Makefile index 6f7649a49..7404fc123 100644 --- a/package/jikes/Makefile +++ b/package/jikes/Makefile @@ -13,8 +13,6 @@ PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=jikes/Jikes/1.22/} DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_ARCH_DEPENDS:= native - include $(TOPDIR)/mk/host.mk include $(TOPDIR)/mk/package.mk diff --git a/package/krb5/Makefile b/package/krb5/Makefile index 2af556c9e..692b7d630 100644 --- a/package/krb5/Makefile +++ b/package/krb5/Makefile @@ -31,10 +31,6 @@ PKGSS_KRB5_UTIL:= libkrb5 libncurses libss libcom-err DISTFILES:= ${PKG_NAME}-${PKG_VERSION}-signed.tar WRKSRC= ${WRKDIST}/src -ifeq ($(ADK_NATIVE),y) -NM:=nm -endif - include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,KRB5_SERVER,krb5-server,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) diff --git a/package/libc/Config.in.manual b/package/libc/Config.in.manual deleted file mode 100644 index ae74da26d..000000000 --- a/package/libc/Config.in.manual +++ /dev/null @@ -1,6 +0,0 @@ -config ADK_PACKAGE_LIBC - boolean - depends on ADK_NATIVE - default y if ADK_NATIVE - help - Native C library from host system. diff --git a/package/libc/Makefile b/package/libc/Makefile deleted file mode 100644 index 9b85b82bc..000000000 --- a/package/libc/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# This file is part of the OpenADK project. OpenADK is copyrighted -# material, please see the LICENCE file in the top-level directory. - -include $(TOPDIR)/rules.mk - -PKG_NAME:= libc -PKG_VERSION:= 1.0 -PKG_RELEASE:= 2 -PKG_SECTION:= base -PKG_DESCR:= native C library - -NO_DISTFILES:= 1 - -include $(TOPDIR)/mk/package.mk - -$(eval $(call PKG_template,LIBC,libc,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) - -CONFIG_STYLE:= manual -BUILD_STYLE:= manual -INSTALL_STYLE:= manual - -# do nothing, use native c library -do-install: - ${INSTALL_DIR} $(IDIR_LIBC)/lib - $(CP) /lib/libgcc_s.so* $(IDIR_LIBC)/lib/ - $(CP) /lib/ld*-*.so* $(IDIR_LIBC)/lib/ - if test -f /lib/libuClibc-*.so; then $(CP) /lib/libuClibc-*.so \ - $(IDIR_LIBC)/lib/;fi - -for file in libc libpthread libcrypt libdl libm libnsl libresolv librt libutil libnss_compat libnss_dns libnss_files; do \ - $(CP) /lib/$$file.so.* $(IDIR_LIBC)/lib/; \ - $(CP) /lib/$$file-*.so $(IDIR_LIBC)/lib/; \ - done - # create ld.so link for ldd - cd $(IDIR_LIBC)/lib && ln -sf ld-linux.so.2 ld.so - -include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libgcc/Makefile b/package/libgcc/Makefile index 28f277f8d..20f7f60f9 100644 --- a/package/libgcc/Makefile +++ b/package/libgcc/Makefile @@ -19,7 +19,6 @@ BUILD_STYLE:= manual INSTALL_STYLE:= manual do-install: -ifeq ($(ADK_NATIVE),) ${INSTALL_DIR} ${IDIR_LIBGCC}/$(ADK_TARGET_LIBC_PATH) ifeq ($(ADK_LINUX_SH),y) ifeq ($(ADK_TARGET_LIB_GLIBC),y) @@ -30,6 +29,5 @@ endif else ${CP} ${STAGING_TARGET_DIR}/$(ADK_TARGET_LIBC_PATH)/libgcc*.so* ${IDIR_LIBGCC}/$(ADK_TARGET_LIBC_PATH) endif -endif include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libpthread/Makefile b/package/libpthread/Makefile index f6f9e5f5f..cdb84d5fe 100644 --- a/package/libpthread/Makefile +++ b/package/libpthread/Makefile @@ -12,10 +12,6 @@ endif ifeq ($(ADK_TARGET_LIB_UCLIBC),y) include ${TOPDIR}/toolchain/uClibc/Makefile.inc endif -ifeq ($(ADK_NATIVE),y) -PKG_VERSION:= 1.0 -PKG_RELEASE:= 1 -endif PKG_NAME:= libpthread PKG_DESCR:= POSIX threading library @@ -37,11 +33,9 @@ BUILD_STYLE:= manual INSTALL_STYLE:= manual libpthread-install: -ifeq ($(ADK_NATIVE),) ifeq ($(ADK_TARGET_LIB_MUSL),) ${INSTALL_DIR} ${IDIR_LIBPTHREAD}/$(ADK_TARGET_LIBC_PATH) ${CP} ${STAGING_TARGET_DIR}/lib/libpthread*.so* ${IDIR_LIBPTHREAD}/$(ADK_TARGET_LIBC_PATH) endif -endif include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/librt/Makefile b/package/librt/Makefile index d056bc203..cf646672f 100644 --- a/package/librt/Makefile +++ b/package/librt/Makefile @@ -9,10 +9,6 @@ endif ifeq ($(ADK_TARGET_LIB_UCLIBC),y) include ${TOPDIR}/toolchain/uClibc/Makefile.inc endif -ifeq ($(ADK_NATIVE),y) -PKG_VERSION:= 1.0 -PKG_RELEASE:= 1 -endif PKG_NAME:= librt PKG_DESCR:= Realtime library @@ -34,11 +30,9 @@ BUILD_STYLE:= manual INSTALL_STYLE:= manual librt-install: -ifeq ($(ADK_NATIVE),) ${INSTALL_DIR} ${IDIR_LIBRT}/$(ADK_TARGET_LIBC_PATH) ifeq ($(ADK_TARGET_LIB_MUSL),) ${CP} ${STAGING_TARGET_DIR}/lib/librt*.so* ${IDIR_LIBRT}/$(ADK_TARGET_LIBC_PATH) endif -endif include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libssh/Makefile b/package/libssh/Makefile index 997e78895..6a49c346a 100644 --- a/package/libssh/Makefile +++ b/package/libssh/Makefile @@ -10,7 +10,7 @@ PKG_MD5SUM:= 9ad01838d3b89d98e900e0f6260a88cc PKG_DESCR:= SSH library PKG_SECTION:= libs PKG_DEPENDS:= libopenssl zlib -PKG_BUILDDEP:= openssl zlib +PKG_BUILDDEP:= cmake-host openssl zlib PKG_URL:= http://www.libssh.org/ PKG_SITES:= http://www.libssh.org/files/0.5/ PKG_OPTS:= dev diff --git a/package/libssp/Makefile b/package/libssp/Makefile index a5a4a2dc7..def4443e8 100644 --- a/package/libssp/Makefile +++ b/package/libssp/Makefile @@ -9,10 +9,6 @@ endif ifeq ($(ADK_TARGET_LIB_UCLIBC),y) include ${TOPDIR}/toolchain/uClibc/Makefile.inc endif -ifeq ($(ADK_NATIVE),y) -PKG_VERSION:= 1.0 -PKG_RELEASE:= 1 -endif PKG_NAME:= libssp PKG_DESCR:= Stack smashing protection library @@ -34,9 +30,7 @@ BUILD_STYLE:= manual INSTALL_STYLE:= manual libssp-install: -ifeq ($(ADK_NATIVE),) ${INSTALL_DIR} ${IDIR_LIBSSP}/$(ADK_TARGET_LIBC_PATH) ${CP} ${STAGING_TARGET_DIR}/lib/libssp.so* ${IDIR_LIBSSP}/$(ADK_TARGET_LIBC_PATH) -endif include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libstdcxx/Makefile b/package/libstdcxx/Makefile index 7fc3503f8..84f0a7aec 100644 --- a/package/libstdcxx/Makefile +++ b/package/libstdcxx/Makefile @@ -28,11 +28,7 @@ INSTALL_STYLE:= manual do-install: ${INSTALL_DIR} ${IDIR_LIBSTDCXX}/usr/${ADK_TARGET_LIBC_PATH} -ifeq ($(ADK_NATIVE),y) - $(CP) /usr/lib/libstdc++.so* ${IDIR_LIBSTDCXX}/usr/lib -else $(CP) ${STAGING_TARGET_DIR}/${ADK_TARGET_LIBC_PATH}/libstdc++.so* ${IDIR_LIBSTDCXX}/usr/${ADK_TARGET_LIBC_PATH} -@rm ${IDIR_LIBSTDCXX}/usr/${ADK_TARGET_LIBC_PATH}/libstdc++.so.*-gdb.py -endif include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libthread_db/Makefile b/package/libthread_db/Makefile index ed92676a3..a2e14cd10 100644 --- a/package/libthread_db/Makefile +++ b/package/libthread_db/Makefile @@ -32,11 +32,9 @@ BUILD_STYLE:= manual INSTALL_STYLE:= manual do-install: -ifeq ($(ADK_NATIVE),) ${INSTALL_DIR} ${IDIR_LIBTHREAD_DB}/lib ifeq ($(ADK_TARGET_LIB_MUSL),) ${CP} ${STAGING_TARGET_DIR}/lib/libthread_db*.so* ${IDIR_LIBTHREAD_DB}/lib endif -endif include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/nfs-utils/Makefile b/package/nfs-utils/Makefile index 694c9d7ae..59a71d6ed 100644 --- a/package/nfs-utils/Makefile +++ b/package/nfs-utils/Makefile @@ -40,13 +40,8 @@ $(eval $(call PKG_template,NFS_UTILS,nfs-utils,${PKG_VERSION}-${PKG_RELEASE},${P $(eval $(call PKG_template,NFS_UTILS_CLIENT,nfs-utils-client,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_NFS_UTILS_CLIENT},${PKGSD_NFS_UTILS_CLIENT},${PKG_SECTION})) $(eval $(call PKG_template,NFS_UTILS_SERVER,nfs-utils-server,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_NFS_UTILS_SERVER},${PKGSD_NFS_UTILS_SERVER},${PKG_SECTION})) -ifeq ($(ADK_NATIVE),) KRB5INC:= ${STAGING_TARGET_DIR}/usr TIRPCINC:= ${STAGING_TARGET_DIR}/usr/include/tirpc -else -KRB5INC:= /usr -TIRPCINC:= /usr/include/tirpc -endif ifeq ($(ADK_PACKAGE_NFS_UTILS_WITH_KERBEROS),y) CONFIGURE_ARGS+= --enable-nfsv4 \ diff --git a/package/p5-XML-Parser/Makefile b/package/p5-XML-Parser/Makefile index 19ad06ab0..13406fb9e 100644 --- a/package/p5-XML-Parser/Makefile +++ b/package/p5-XML-Parser/Makefile @@ -16,8 +16,6 @@ PKG_SITES:= http://search.cpan.org/CPAN/authors/id/C/CH/CHORNY/ DISTFILES:= XML-Parser-${PKG_VERSION}.tar.gz WRKDIST= ${WRKDIR}/XML-Parser-${PKG_VERSION} -PKG_ARCH_DEPENDS:= native - include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,P5_XML_PARSER,p5-xml-parser,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) diff --git a/package/pycurl/Makefile b/package/pycurl/Makefile index 05dcb49d8..899bb3ddb 100644 --- a/package/pycurl/Makefile +++ b/package/pycurl/Makefile @@ -24,13 +24,8 @@ INSTALL_STYLE:= manual XAKE_FLAGS+= GCC_HONOUR_COPTS=s TARGET_CFLAGS+= -fPIC -ifeq ($(ADK_NATIVE),) MAKE_ENV+= LDSHARED="$(TARGET_CC) -shared" CURL_CONFIG:= $(STAGING_DIR)/usr/bin/curl-config -else -MAKE_ENV+= CC="$(CC)" LDSHARED="$(CC) -shared" -CURL_CONFIG:= /usr/bin/curl-config -endif include $(TOPDIR)/mk/python.mk diff --git a/package/qemu/Makefile b/package/qemu/Makefile index b03a3ca59..4c2067ac9 100644 --- a/package/qemu/Makefile +++ b/package/qemu/Makefile @@ -16,7 +16,7 @@ PKG_SITES:= http://wiki.qemu.org/download/ DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 -PKG_ARCH_DEPENDS:= native x86 x86_64 +PKG_ARCH_DEPENDS:= x86 x86_64 include $(TOPDIR)/mk/host.mk include $(TOPDIR)/mk/package.mk diff --git a/package/valgrind/Makefile b/package/valgrind/Makefile index d0337d8f5..025db9dac 100644 --- a/package/valgrind/Makefile +++ b/package/valgrind/Makefile @@ -13,7 +13,7 @@ PKG_BUILDDEP:= autotool PKG_URL:= http://valgrind.org/ PKG_SITES:= http://valgrind.org/downloads/ -PKG_ARCH_DEPENDS:= ppc ppc64 mips mipsel mips64 mips64el x86 x86_64 native +PKG_ARCH_DEPENDS:= ppc ppc64 mips mipsel mips64 mips64el x86 x86_64 DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 diff --git a/package/zlib/Makefile b/package/zlib/Makefile index 1d1c0d57c..6fe11ae3d 100644 --- a/package/zlib/Makefile +++ b/package/zlib/Makefile @@ -26,10 +26,6 @@ $(eval $(call PKG_template,ZLIB,zlib,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS CONFIG_STYLE:= manual CONFIGURE_ENV+= uname=Linux -ifeq ($(ADK_NATIVE),) -COPTS:= $(TARGET_CONFIGURE_OPTS) -endif - ifeq ($(ADK_STATIC),) CONFIGURE_OPTS:= --shared endif @@ -37,8 +33,9 @@ endif ALL_TARGET:= libz.a libz.so.$(PKG_VERSION) do-configure: - (cd $(WRKBUILD); $(COPTS) \ + (cd $(WRKBUILD); \ uname="Linux" \ + $(TARGET_CONFIGURE_OPTS) \ CFLAGS="$(TARGET_CFLAGS) -fPIC" \ CPPFLAGS="-I$(STAGING_TARGET_DIR)/usr/include" \ LDFLAGS="-L$(STAGING_TARGET_DIR)/usr/lib" \ diff --git a/scripts/update-sys b/scripts/update-sys index 6c82dc626..47b73d52b 100755 --- a/scripts/update-sys +++ b/scripts/update-sys @@ -14,15 +14,6 @@ defaults() { exit 0 } -check_native() { - native=$(grep ^ADK_LINUX_NATIVE $topdir/.config) - if [ ! -z "$native" ];then - exit 0 - fi -} - -touch $topdir/target/config/Config.in.native - for i in $(ls $topdir/target/);do if [ -d "$topdir/target/$i/sys-enabled" ];then cat $topdir/target/$i/sys-enabled/* > $topdir/target/$i/Config.in.systems 2>/dev/null @@ -30,8 +21,6 @@ for i in $(ls $topdir/target/);do done if [ -f $topdir/.config ];then -check_native - arch=$(grep ^ADK_TARGET_ARCH $topdir/.config|cut -f 2 -d = | sed -e 's#"##g') cpuarch=$(grep ^ADK_TARGET_CPU_ARCH $topdir/.config|cut -f 2 -d = | sed -e 's#"##g') systemsym=$(grep ^ADK_TARGET_SYSTEM_ $topdir/.config|cut -f 1 -d =) diff --git a/target/Makefile b/target/Makefile index 562d2b86b..fc3fd77f6 100644 --- a/target/Makefile +++ b/target/Makefile @@ -52,13 +52,6 @@ config-prepare: $(TOPDIR)/.config >${BUILD_DIR}/.kernelconfig.kernel @sed -n '/^# ADK_KERNEL/s//# CONFIG/p' ${TOPDIR}/.config \ >${BUILD_DIR}/.kernelconfig.nokernel -ifeq ($(ADK_NATIVE),y) - @if [ -f /etc/adktarget ];then \ - cp $(TOPDIR)/target/$(ARCH)/${KERNEL_CFG} ${BUILD_DIR}/.kernelconfig.board; \ - else \ - if [ -f /proc/config.gz ];then zcat /proc/config.gz > ${BUILD_DIR}/.kernelconfig.board; else cp ${ADK_TARGET}/kernel.config.$(ARCH) ${BUILD_DIR}/.kernelconfig.board; fi; \ - fi -else ifeq ($(ADK_USE_KERNEL_MINICONFIG),y) @if [ -f ${ADK_TARGET_ARCH}/kernel/${ADK_TARGET_KERNEL_MINICONFIG} ];then \ cat ${TOPDIR}/target/linux/kernel.config \ @@ -73,7 +66,6 @@ else else \ cp ${ADK_TARGET_ARCH}/${KERNEL_CFG} ${BUILD_DIR}/.kernelconfig.board; \ fi -endif endif @(cat ${BUILD_DIR}/.kernelconfig.{modules,kernel} | \ while IFS='=' read symbol value; do \ diff --git a/target/config/Config.in b/target/config/Config.in index be008f97e..0eab0aecf 100644 --- a/target/config/Config.in +++ b/target/config/Config.in @@ -336,10 +336,6 @@ config ADK_TARGET_BROADCOM_MODEL_ASUS_WL500GP endchoice -if ADK_LINUX_NATIVE -source "target/config/Config.in.native" -endif - # hardware features config ADK_TARGET_WITH_USB boolean @@ -432,9 +428,6 @@ config ADK_HARDWARE_QEMU config ADK_HARDWARE_VBOX boolean -config ADK_NATIVE - boolean - # the inverse of ADK_TARGET_KERNEL_CUSTOMISING, # allows for selecting it off (i.e., to disable it) config ADK_TARGET_FIXED_KERNEL diff --git a/target/config/Config.in.arch.choice b/target/config/Config.in.arch.choice index a147a0251..c2fc7f2f3 100644 --- a/target/config/Config.in.arch.choice +++ b/target/config/Config.in.arch.choice @@ -4,16 +4,6 @@ prompt "Target architecture" config ADK_CHOOSE_TARGET_ARCH bool "Choose target architecture" -config ADK_LINUX_NATIVE - bool "native build" - select ADK_native - select ADK_NATIVE - select ADK_TARGET_LIB_LIBC - depends on ADK_HOST_LINUX - help - Make a native build. Use host tools. - No toolchain will be created. - config ADK_LINUX_ARM bool "arm system" select ADK_arm diff --git a/target/linux/Config.in b/target/linux/Config.in index 739e2008c..9c1c04b85 100644 --- a/target/linux/Config.in +++ b/target/linux/Config.in @@ -19,7 +19,6 @@ source target/linux/config/Config.in.misc source target/linux/config/Config.in.mips source target/linux/config/Config.in.lib source target/linux/config/Config.in.pm -source target/linux/config/Config.in.serial source target/linux/config/Config.in.spi source target/linux/config/Config.in.kvm source target/linux/config/Config.in.debug diff --git a/target/linux/config/Config.in.audio b/target/linux/config/Config.in.audio index dc2ff100f..76c353f0c 100644 --- a/target/linux/config/Config.in.audio +++ b/target/linux/config/Config.in.audio @@ -60,7 +60,6 @@ config ADK_KPACKAGE_KMOD_SND_OSSEMUL select ADK_KERNEL_SND_PCM_OSS select ADK_KPACKAGE_KMOD_SND default y if ADK_TARGET_SYSTEM_IBM_X40 - default y if ADK_NATIVE_SYSTEM_IBM_X40 default n help ALSA OSS Emulation @@ -71,7 +70,6 @@ config ADK_KPACKAGE_KMOD_SND_INTEL8X0 select ADK_KPACKAGE_KMOD_SND_AC97_CODEC select ADK_KPACKAGE_KMOD_SND default y if ADK_TARGET_SYSTEM_IBM_X40 - default y if ADK_NATIVE_SYSTEM_IBM_X40 default n depends on ADK_TARGET_WITH_PCI help diff --git a/target/linux/config/Config.in.block b/target/linux/config/Config.in.block index 057556afd..9297031c2 100644 --- a/target/linux/config/Config.in.block +++ b/target/linux/config/Config.in.block @@ -177,7 +177,6 @@ config ADK_KERNEL_SATA_AHCI select ADK_KERNEL_BLK_DEV select ADK_KERNEL_BLK_DEV_SD depends on ADK_TARGET_WITH_SATA - default y if ADK_TARGET_SYSTEM_SHUTTLE_SA76 default y if ADK_TARGET_SYSTEM_VBOX_I686 default n @@ -191,8 +190,6 @@ config ADK_KPACKAGE_KMOD_SATA_AHCI select ADK_KERNEL_BLK_DEV_SD depends on !ADK_KERNEL_SATA_AHCI depends on ADK_TARGET_WITH_SATA - default y if ADK_TARGET_SYSTEM_INTEL_ATOM - default y if ADK_NATIVE_SYSTEM_INTEL_ATOM default n help Enables support for AHCI Serial ATA. diff --git a/target/linux/config/Config.in.graphics b/target/linux/config/Config.in.graphics index 477541478..dc748e6c0 100644 --- a/target/linux/config/Config.in.graphics +++ b/target/linux/config/Config.in.graphics @@ -2,16 +2,12 @@ config ADK_KERNEL_VT boolean default y if ADK_HARDWARE_VBOX default y if ADK_TARGET_WITH_VGA - default y if ADK_NATIVE_SYSTEM_IBM_X40 - default y if ADK_NATIVE_SYSTEM_INTEL_ATOM default n config ADK_KERNEL_VT_CONSOLE boolean default y if ADK_HARDWARE_VBOX default y if ADK_TARGET_WITH_VGA - default y if ADK_NATIVE_SYSTEM_IBM_X40 - default y if ADK_NATIVE_SYSTEM_INTEL_ATOM default n config ADK_KERNEL_VGA_CONSOLE @@ -143,9 +139,8 @@ config ADK_HARDWARE_GRAPHICS_INTEL_I915 select ADK_KERNEL_DRM_I915_KMS select ADK_KERNEL_DRM_I915 default y if ADK_TARGET_SYSTEM_IBM_X40 - default y if ADK_NATIVE_SYSTEM_IBM_X40 default n - depends on ADK_TARGET_SYSTEM_IBM_X40 || ADK_NATIVE_SYSTEM_IBM_X40 || ADK_TARGET_SYSTEM_INTEL_ATOM || ADK_NATIVE_SYSTEM_INTEL_ATOM + depends on ADK_TARGET_SYSTEM_IBM_X40 help AGP/DRM/KMS support for Intel chipset i915. diff --git a/target/linux/config/Config.in.input b/target/linux/config/Config.in.input index 939354881..17c23b65c 100644 --- a/target/linux/config/Config.in.input +++ b/target/linux/config/Config.in.input @@ -4,9 +4,7 @@ config ADK_KERNEL_INPUT default y if ADK_TARGET_SYSTEM_VBOX_I686 default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C default y if ADK_TARGET_SYSTEM_IBM_X40 - default y if ADK_NATIVE_SYSTEM_IBM_X40 default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG - default y if ADK_NATIVE_SYSTEM_LEMOTE_YEELONG default y if ADK_TARGET_SYSTEM_SHARP_ZAURUS default y if ADK_TARGET_SYSTEM_RASPBERRY_PI default n @@ -61,9 +59,7 @@ config ADK_KERNEL_INPUT_KEYBOARD default y if ADK_TARGET_SYSTEM_VBOX_I686 default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C default y if ADK_TARGET_SYSTEM_IBM_X40 - default y if ADK_NATIVE_SYSTEM_IBM_X40 default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG - default y if ADK_NATIVE_SYSTEM_LEMOTE_YEELONG default y if ADK_TARGET_SYSTEM_SHARP_ZAURUS default y if ADK_TARGET_SYSTEM_RASPBERRY_PI default n @@ -73,9 +69,7 @@ config ADK_KERNEL_KEYBOARD_ATKBD default y if ADK_TARGET_SYSTEM_VBOX_I686 default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C default y if ADK_TARGET_SYSTEM_IBM_X40 - default y if ADK_NATIVE_SYSTEM_IBM_X40 default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG - default y if ADK_NATIVE_SYSTEM_LEMOTE_YEELONG default n config ADK_KERNEL_INPUT_MOUSE @@ -84,9 +78,7 @@ config ADK_KERNEL_INPUT_MOUSE default y if ADK_TARGET_SYSTEM_VBOX_I686 default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C default y if ADK_TARGET_SYSTEM_IBM_X40 - default y if ADK_NATIVE_SYSTEM_IBM_X40 default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG - default y if ADK_NATIVE_SYSTEM_LEMOTE_YEELONG default y if ADK_TARGET_SYSTEM_SHARP_ZAURUS default y if ADK_TARGET_SYSTEM_RASPBERRY_PI default n @@ -96,9 +88,7 @@ config ADK_KERNEL_INPUT_MOUSEDEV default y if ADK_TARGET_SYSTEM_VBOX_I686 default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C default y if ADK_TARGET_SYSTEM_IBM_X40 - default y if ADK_NATIVE_SYSTEM_IBM_X40 default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG - default y if ADK_NATIVE_SYSTEM_LEMOTE_YEELONG default y if ADK_TARGET_SYSTEM_SHARP_ZAURUS default y if ADK_TARGET_SYSTEM_RASPBERRY_PI default n diff --git a/target/linux/config/Config.in.misc b/target/linux/config/Config.in.misc index ea9bc5e5a..64eb8d38b 100644 --- a/target/linux/config/Config.in.misc +++ b/target/linux/config/Config.in.misc @@ -57,11 +57,9 @@ config ADK_KERNEL_RTC_DRV_CMOS default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D13 default y if ADK_TARGET_SYSTEM_IBM_X40 - default y if ADK_NATIVE_SYSTEM_IBM_X40 - default y if ADK_NATIVE_SYSTEM_LEMOTE_YEELONG default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG default n - depends on (ADK_TARGET_SYSTEM_PCENGINES_ALIX1C || ADK_TARGET_SYSTEM_PCENGINES_ALIX2D13 || ADK_TARGET_SYSTEM_IBM_X40 || ADK_NATIVE_SYSTEM_IBM_X40 || ADK_NATIVE_SYSTEM_LEMOTE_YEELONG || ADK_TARGET_SYSTEM_LEMOTE_YEELONG) + depends on (ADK_TARGET_SYSTEM_PCENGINES_ALIX1C || ADK_TARGET_SYSTEM_PCENGINES_ALIX2D13 || ADK_TARGET_SYSTEM_IBM_X40 || ADK_TARGET_SYSTEM_LEMOTE_YEELONG) help PC CMOS RTC support. diff --git a/target/linux/config/Config.in.netdevice b/target/linux/config/Config.in.netdevice index 001ecfd33..789b75b7d 100644 --- a/target/linux/config/Config.in.netdevice +++ b/target/linux/config/Config.in.netdevice @@ -357,7 +357,6 @@ config ADK_KPACKAGE_KMOD_ATH5K select ADK_KPACKAGE_KMOD_MAC80211 depends on ADK_TARGET_WITH_MINIPCI || ADK_TARGET_WITH_PCI || ADK_TARGET_WITH_AHB default y if ADK_TARGET_SYSTEM_IBM_X40 - default y if ADK_NATIVE_SYSTEM_IBM_X40 default y if ADK_TARGET_SYSTEM_FON_FON2100 default n help diff --git a/target/linux/config/Config.in.pm b/target/linux/config/Config.in.pm index d93c820cc..deff5b3f6 100644 --- a/target/linux/config/Config.in.pm +++ b/target/linux/config/Config.in.pm @@ -36,12 +36,7 @@ config ADK_HARDWARE_ACPI select ADK_KERNEL_ACPI_BUTTON select ADK_KERNEL_ACPI_FAN select ADK_KERNEL_ACPI_DOCK - default y if ADK_TARGET_SYSTEM_INTEL_ATOM - default y if ADK_NATIVE_SYSTEM_INTEL_ATOM default y if ADK_TARGET_SYSTEM_IBM_X40 - default y if ADK_NATIVE_SYSTEM_IBM_X40 - default y if ADK_TARGET_SYSTEM_TAROX_PC - default y if ADK_NATIVE_SYSTEM_TAROX_PC default n help Enable ACPI support. @@ -50,12 +45,8 @@ config ADK_KERNEL_SUSPEND prompt "Enable Suspend-to-RAM support" boolean select ADK_KERNEL_PM - default y if ADK_TARGET_SYSTEM_INTEL_ATOM - default y if ADK_NATIVE_SYSTEM_INTEL_ATOM default y if ADK_TARGET_SYSTEM_IBM_X40 - default y if ADK_NATIVE_SYSTEM_IBM_X40 default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG - default y if ADK_NATIVE_SYSTEM_LEMOTE_YEELONG default n help Enable Suspend-to-RAM support. @@ -66,12 +57,8 @@ config ADK_KERNEL_HIBERNATION select ADK_KERNEL_PM select ADK_KERNEL_SWAP select BUSYBOX_SWAPONOFF - default y if ADK_TARGET_SYSTEM_INTEL_ATOM - default y if ADK_NATIVE_SYSTEM_INTEL_ATOM default y if ADK_TARGET_SYSTEM_IBM_X40 - default y if ADK_NATIVE_SYSTEM_IBM_X40 default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG - default y if ADK_NATIVE_SYSTEM_LEMOTE_YEELONG default n help Enable Suspend-to-Disk support. diff --git a/target/linux/config/Config.in.sched b/target/linux/config/Config.in.sched index 7cea06102..2e749a5fb 100644 --- a/target/linux/config/Config.in.sched +++ b/target/linux/config/Config.in.sched @@ -17,7 +17,6 @@ config ADK_KERNEL_NET_ESTIMATOR default n config ADK_KERNEL_NET_SCHED - #prompt "kmod-net-sched.................... QoS and/or fair queueing support" boolean default n help diff --git a/target/linux/config/Config.in.serial b/target/linux/config/Config.in.serial deleted file mode 100644 index 6ba3d4872..000000000 --- a/target/linux/config/Config.in.serial +++ /dev/null @@ -1,9 +0,0 @@ -config ADK_KERNEL_SERIAL_PXA - boolean - default y if ADK_TARGET_QEMU_ARM_MODEL_SPITZ - default y if ADK_TARGET_SYSTEM_SHARP_ZAURUS - -config ADK_KERNEL_SERIAL_PXA_CONSOLE - boolean - default y if ADK_TARGET_QEMU_ARM_MODEL_SPITZ - default y if ADK_TARGET_SYSTEM_SHARP_ZAURUS diff --git a/target/linux/config/Config.in.usb b/target/linux/config/Config.in.usb index e1fd3c0c3..b2c750673 100644 --- a/target/linux/config/Config.in.usb +++ b/target/linux/config/Config.in.usb @@ -41,12 +41,7 @@ config ADK_KPACKAGE_KMOD_USB default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D2 default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D13 - default y if ADK_TARGET_SYSTEM_TAROX_PC - default y if ADK_NATIVE_SYSTEM_TAROX_PC default y if ADK_TARGET_SYSTEM_IBM_X40 - default y if ADK_NATIVE_SYSTEM_IBM_X40 - default y if ADK_TARGET_SYSTEM_INTEL_ATOM - default y if ADK_NATIVE_SYSTEM_INTEL_ATOM default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG default y if ADK_TARGET_SYSTEM_ACMESYSTEMS_FOXG20 default n @@ -88,9 +83,6 @@ config ADK_KPACKAGE_KMOD_USB_UHCI_HCD depends on !ADK_TARGET_SYSTEM_ACMESYSTEMS_FOXG20 depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI default y if ADK_TARGET_SYSTEM_IBM_X40 - default y if ADK_NATIVE_SYSTEM_IBM_X40 - default y if ADK_TARGET_SYSTEM_INTEL_ATOM - default y if ADK_NATIVE_SYSTEM_INTEL_ATOM default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG default n help @@ -114,8 +106,6 @@ config ADK_KPACKAGE_KMOD_USB_OHCI_HCD default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D2 default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D13 default y if ADK_TARGET_SYSTEM_ACMESYSTEMS_FOXG20 - default y if ADK_TARGET_SYSTEM_INTEL_ATOM - default y if ADK_NATIVE_SYSTEM_INTEL_ATOM default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG default y if ADK_TARGET_SYSTEM_QEMU_SH4 default n @@ -179,12 +169,7 @@ config ADK_KPACKAGE_KMOD_USB_EHCI_HCD default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX1C default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D2 default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D13 - default y if ADK_TARGET_SYSTEM_INTEL_ATOM - default y if ADK_NATIVE_SYSTEM_INTEL_ATOM default y if ADK_TARGET_SYSTEM_IBM_X40 - default y if ADK_NATIVE_SYSTEM_IBM_X40 - default y if ADK_TARGET_SYSTEM_TAROX_PC - default y if ADK_NATIVE_SYSTEM_TAROX_PC default y if ADK_TARGET_SYSTEM_LEMOTE_YEELONG default n help diff --git a/target/x86/sys-available/intel-atom b/target/x86/sys-available/intel-atom deleted file mode 100644 index 86bc85cd1..000000000 --- a/target/x86/sys-available/intel-atom +++ /dev/null @@ -1,29 +0,0 @@ -config ADK_TARGET_SYSTEM_INTEL_ATOM - bool "Intel Atom (NM10)" - depends on ADK_BROKEN - select ADK_x86 - select ADK_intel_atom - select ADK_CPU_ATOM - select ADK_KERNEL_MATOM - select ADK_KERNEL_MII - select ADK_TARGET_CPU_WITH_MMX - select ADK_TARGET_CPU_WITH_SSE - select ADK_TARGET_CPU_WITH_SSE2 - select ADK_TARGET_CPU_WITH_SSE3 - select ADK_TARGET_CPU_WITH_SSSE3 - select ADK_TARGET_CPU_WITH_HT - select ADK_TARGET_CPU_WITH_MTRR - select ADK_TARGET_WITH_USB_BOOT - select ADK_TARGET_WITH_USB - select ADK_TARGET_WITH_VGA - select ADK_TARGET_WITH_INPUT - select ADK_TARGET_WITH_RTC - select ADK_TARGET_WITH_CF - select ADK_TARGET_WITH_INPUT - select ADK_TARGET_WITH_HDD - select ADK_TARGET_WITH_PCI - select ADK_TARGET_WITH_ACPI - select ADK_TARGET_WITH_SATA - help - System profile for Intel Atom. - diff --git a/tools/adk/depmaker.c b/tools/adk/depmaker.c index 572baa392..e5028003b 100644 --- a/tools/adk/depmaker.c +++ b/tools/adk/depmaker.c @@ -166,7 +166,6 @@ int main() { /* exclude manual maintained packages from package/Makefile */ if ( - !(strncmp(pkgdirp->d_name, "libc", 4) == 0 && strlen(pkgdirp->d_name) == 4) && !(strncmp(pkgdirp->d_name, "libpthread", 10) == 0 && strlen(pkgdirp->d_name) == 10) && !(strncmp(pkgdirp->d_name, "uclibc++", 8) == 0) && !(strncmp(pkgdirp->d_name, "uclibc", 6) == 0) && -- cgit v1.2.3 From 35137e6c091fcb33147ad58d52140659a63affdc Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 7 Mar 2014 09:57:47 +0100 Subject: add ccache to host tools --- scripts/scan-pkgs.sh | 7 ------- target/config/Config.in.adk | 1 + target/config/Config.in.tools | 4 ++++ tools/Makefile | 3 +++ tools/ccache/Makefile | 25 +++++++++++++++++++++++++ 5 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 tools/ccache/Makefile (limited to 'tools') diff --git a/scripts/scan-pkgs.sh b/scripts/scan-pkgs.sh index 5563dcca2..8af04795b 100644 --- a/scripts/scan-pkgs.sh +++ b/scripts/scan-pkgs.sh @@ -83,11 +83,4 @@ if [[ -n $NEED_JAVA ]]; then fi fi -if [[ -n $ADK_USE_CCACHE ]]; then - if ! which ccache >/dev/null 2>&1; then - echo >&2 You have selected to build with ccache, but ccache could not be found. - out=1 - fi -fi - exit $out diff --git a/target/config/Config.in.adk b/target/config/Config.in.adk index c8f820321..46de14044 100644 --- a/target/config/Config.in.adk +++ b/target/config/Config.in.adk @@ -46,6 +46,7 @@ config ADK_WGET_TIMEOUT config ADK_USE_CCACHE bool "Use ccache to speedup recompilation" + select ADK_HOST_NEED_CCACHE default n help Useful if you have enough space for the cache and need speedup compilation. diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools index d863179b8..c4dcdace4 100644 --- a/target/config/Config.in.tools +++ b/target/config/Config.in.tools @@ -34,6 +34,10 @@ config ADK_HOST_NEED_XZ boolean default n +config ADK_HOST_NEED_CCACHE + boolean + default n + config ADK_TOOLS_ADDPATTERN_ARGS string default "-p W54G -v v4.20.6" if ADK_TARGET_BROADCOM_MODEL_LINKSYS_WRT54G diff --git a/tools/Makefile b/tools/Makefile index 2d29372dc..a8156cb79 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -29,6 +29,9 @@ endif ifeq ($(ADK_HOST_NEED_LZMA),y) TARGETS+=lzma endif +ifeq ($(ADK_HOST_NEED_CCACHE),y) +TARGETS+=ccache +endif TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS)) TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS)) diff --git a/tools/ccache/Makefile b/tools/ccache/Makefile new file mode 100644 index 000000000..fde838067 --- /dev/null +++ b/tools/ccache/Makefile @@ -0,0 +1,25 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= ccache +PKG_VERSION:= 3.1.9 +PKG_RELEASE:= 1 +PKG_MD5SUM:= a5e9954b1dae036762f7b13673a2cf76 +PKG_SITES:= http://samba.org/ftp/ccache/ + +include ../rules.mk + +install: ${STAGING_HOST_DIR}/usr/bin/ccache + +$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared + (cd ${WRKBUILD}; ./configure --prefix=$(STAGING_HOST_DIR)/usr) + ${MAKE} -C ${WRKBUILD} CC='${CC_FOR_BUILD}' + touch $@ + +${STAGING_HOST_DIR}/usr/bin/ccache: $(WRKBUILD)/.compiled + $(INSTALL_BIN) $(WRKBUILD)/ccache \ + ${STAGING_HOST_DIR}/usr/bin + +include $(TOPDIR)/mk/tools.mk -- cgit v1.2.3 From 5101b72fac2c9a6971a0c7d2fe6bbd318e9678ab Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 7 Mar 2014 10:55:50 +0100 Subject: use mksh in tools, too --- package/mksh/Makefile | 2 ++ scripts/create.sh | 15 +-------------- tools/Makefile | 2 +- tools/mksh/Makefile | 30 ++++++++++++++++++++++++++++++ 4 files changed, 34 insertions(+), 15 deletions(-) create mode 100644 tools/mksh/Makefile (limited to 'tools') diff --git a/package/mksh/Makefile b/package/mksh/Makefile index 159a3efda..c40d9d807 100644 --- a/package/mksh/Makefile +++ b/package/mksh/Makefile @@ -12,6 +12,8 @@ PKG_SECTION:= shells PKG_URL:= http://www.mirbsd.org/ PKG_SITES:= ${MASTER_SITE_MIRBSD:distfiles/=dist/mir/mksh/} +PKG_DFLT_MKSH:= y if !ADK_TOOLCHAIN_ONLY + DISTFILES= ${PKG_NAME}-R${PKG_VERSION}.tgz WRKDIST= ${WRKDIR}/${PKG_NAME} diff --git a/scripts/create.sh b/scripts/create.sh index 2d18cc64a..505549247 100755 --- a/scripts/create.sh +++ b/scripts/create.sh @@ -2,7 +2,7 @@ #- # Copyright © 2010, 2011, 2012 # Thorsten Glaser -# Copyright © 2010, 2011 +# Copyright © 2010-2014 # Waldemar Brodkorb # # Provided that these terms and disclaimer and all copyright notices @@ -36,19 +36,6 @@ case :$PATH: in (*) export PATH=$PATH:$TOPDIR/host_$HOST/usr/bin ;; esac -test -n "$KSH_VERSION" || if ! which mksh >/dev/null 2>&1; then - make package=mksh fetch || exit 1 - df=mksh-R48b.tgz - rm -rf build_mksh - mkdir -p build_mksh - gzip -dc dl/"$df" | (cd build_mksh; cpio -mid) - cd build_mksh/mksh - bash Build.sh -r -c lto || bash Build.sh -r || exit 1 - cp mksh "$TOPDIR"/host_$HOST/usr/bin - cd "$TOPDIR" - rm -rf build_mksh -fi - test -n "$KSH_VERSION" || exec mksh "$me" "$@" if test -z "$KSH_VERSION"; then echo >&2 Fatal error: could not run myself with mksh! diff --git a/tools/Makefile b/tools/Makefile index a8156cb79..cdbf2b4f1 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk -TARGETS:=adk mkcrypt cpio m4 flex bc bzip2 xz +TARGETS:=adk mksh mkcrypt cpio m4 flex bc bzip2 xz ifeq ($(ADK_HOST_NEED_GENEXT2FS),y) TARGETS+=genext2fs diff --git a/tools/mksh/Makefile b/tools/mksh/Makefile new file mode 100644 index 000000000..8cb7c29b7 --- /dev/null +++ b/tools/mksh/Makefile @@ -0,0 +1,30 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= mksh +PKG_VERSION:= 49 +PKG_RELEASE:= 1 +PKG_MD5SUM:= e8c205cac72c3dc8540bbc3897421422 +PKG_SITES:= ${MASTER_SITE_MIRBSD:distfiles/=dist/mir/mksh/} + +DISTFILES= ${PKG_NAME}-R${PKG_VERSION}.tgz +WRKDIST= ${WRKDIR}/${PKG_NAME} + +include ../rules.mk + +install: ${STAGING_HOST_DIR}/usr/bin/mksh + +$(WRKBUILD)/.compiled: ${WRKDIST}/.prepared + cd ${WRKBUILD} && CC='${TARGET_CC}' CFLAGS='${TARGET_CFLAGS}' \ + CPPFLAGS='${TARGET_CPPFLAGS}' LDFLAGS='${TARGET_LDFLAGS}' \ + HAVE_CAN_FSTACKPROTECTORALL=0 \ + TARGET_OS=Linux ${BASH} ${WRKSRC}/Build.sh -Q -r -c lto + touch $@ + +${STAGING_HOST_DIR}/usr/bin/mksh: $(WRKBUILD)/.compiled + ${INSTALL_BIN} ${WRKBUILD}/mksh \ + ${STAGING_HOST_DIR}/usr/bin + +include $(TOPDIR)/mk/tools.mk -- cgit v1.2.3