aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/binutils/patches
Commit message (Expand)AuthorAgeFilesLines
* binutils: remove old versionsFelix Fietkau2014-10-0511-252/+0
* toolchain/binutils: remove obsolete patchesFelix Fietkau2014-06-068-246/+0
* upgrade the Linaro binutils to 2.24-2013.12Imre Kaloz2014-01-076-19/+9
* add support for Linaro binutils 2.23.2-2013.06Imre Kaloz2013-09-116-0/+127
* binutils: stop generating the useless _DYNAMIC_LINKING symbol on mipsFelix Fietkau2013-06-302-0/+36
* binutils: remove some unused obsolete versionsFelix Fietkau2013-06-3016-62140/+0
* toolchain/binutils: add musl libc config.sub patch to 2.23.1Florian Fainelli2013-02-261-0/+10
* toolchain/binutils: refresh patchesFlorian Fainelli2013-02-2613-201/+107
* remove support for ubicom32Florian Fainelli2012-11-301-48949/+0
* add preliminary support for muslFlorian Fainelli2012-11-231-0/+19
* binutils: remove 2.21Florian Fainelli2012-11-198-31240/+0
* binutils: add support for 2.23.1Florian Fainelli2012-11-194-0/+99
* binutils/2.22: backport an upstream fix for an assertion in the ARM backend.Florian Fainelli2012-11-191-0/+28
* binutils: backport ld patch to fix ARM specific issues with --gc-sectionsFelix Fietkau2012-09-191-0/+12
* add binutils 2.22Imre Kaloz2012-02-085-0/+173
* binutils: add binutils 2.21.1Hauke Mehrtens2011-08-068-0/+31240
* add the latest avr32 toolchain patches (with additional fixes)Imre Kaloz2011-07-011-2/+2
* remove the CS variant - broken since it's additionImre Kaloz2011-02-217-32518/+0
* add some more avr32 fixesImre Kaloz2011-02-181-2/+122
* add binutils 2.21Imre Kaloz2011-02-188-0/+31120
* add avr32 supportImre Kaloz2011-02-161-0/+30797
* fixup the ubicom patch, refreshImre Kaloz2011-02-164-82/+61
* refresh patchesImre Kaloz2011-02-163-8/+5
* binutils: backport a fix for broken relocation entries on mips with -fPIE, fi...Felix Fietkau2011-01-281-0/+15
* binutils: Fix autoreconf for packages/devel/binutils package, which uses binu...Daniel Dickinson2010-12-121-0/+84
* remove support for binutils 2.18 and 2.20Imre Kaloz2010-10-2816-53346/+0
* toolchain/binutils: building gas for arm-*-uclibc systems requires linking wi...Gabor Juhos2010-03-305-0/+190
* add binutils-2.20.1Alexandros C. Couloumbis2010-03-116-0/+326
* add avr32 support for binutils 2.19.1 based on the Atmel 1.2.0 toolchain releaseImre Kaloz2010-02-161-0/+30629
* fixup the hunks in patchImre Kaloz2010-02-151-5/+5
* binutils: remove unrelated hunk in 2.18 avr32 support patchNicolas Thill2010-01-191-9/+0
* binutils: fix build errors in 2.20 (patch from #6094)Felix Fietkau2009-11-051-2/+9
* add binutils 2.20Felix Fietkau2009-11-026-0/+319
* binutils: add support for non-pic handling and use it in the codesourcery bas...Felix Fietkau2009-10-191-0/+202
* add a binutils variant based on a binutils snapshot and codesourcery g++ enha...Felix Fietkau2009-10-196-0/+32480
* add a heavily cleaned up version of ubicom32 toolchain supportFelix Fietkau2009-08-211-0/+48967
* binutils: fix build failure on powerpc targetGabor Juhos2009-07-141-0/+20
* remove binutils 2.17 and 2.19Felix Fietkau2009-05-0516-111564/+0
* fix a small bug in binutils 2.19.1 * http://sourceware.org/bugzilla/show_bug....Gabor Juhos2009-05-011-0/+13
* binutils: refresh patches for binutils 2.17Hauke Mehrtens2009-02-2112-483/+318
* binutils: add support for v2.19.1 (from #4492, thanks to dwrobel)Nicolas Thill2009-02-034-0/+104
* add binutils 2.19 (patch from #4367)Felix Fietkau2009-01-174-0/+111
* nuke binutils 2.16.1 - old, unused, buggyImre Kaloz2008-12-027-1051/+0
* clean up patchImre Kaloz2008-12-021-461/+0
* sync avr32 binutils patch with the Atmel 1.0.1 releaseImre Kaloz2008-12-021-509/+283
* add avr32 support to binutils 2.18Imre Kaloz2008-11-251-0/+53416
* finally fixes etrax toolchain problems, thanks nbdJohn Crispin2008-06-061-0/+17
* fix avr32 compilingTravis Kemen2008-05-161-0/+20
* Add binutils-2.18 patches for all arches but AVR32.Felix Fietkau2008-02-026-0/+204
* eliminate the root cause of the uClibc problems on the powerpc platformGabor Juhos2008-02-011-9/+0
4, .unk = {0x00, 0x00}, .datalen = 0x770000, }, { /* terminating entry */ } }; /* * Message macros */ #define ERR(fmt, ...) do { \ fflush(0); \ fprintf(stderr, "[%s] *** error: " fmt "\n", \ progname, ## __VA_ARGS__ ); \ } while (0) #define ERRS(fmt, ...) do { \ int save = errno; \ fflush(0); \ fprintf(stderr, "[%s] *** error: " fmt "\n", \ progname, ## __VA_ARGS__, strerror(save)); \ } while (0) static struct board_info *find_board(char *id) { struct board_info *ret; struct board_info *board; ret = NULL; for (board = boards; board->id != NULL; board++){ if (strcasecmp(id, board->id) == 0) { ret = board; break; } }; return ret; } void usage(int status) { FILE *stream = (status != EXIT_SUCCESS) ? stderr : stdout; struct board_info *board; fprintf(stream, "Usage: %s [OPTIONS...]\n", progname); fprintf(stream, "\n" "Options:\n" " -B <board> create image for the board specified with <board>\n" " -i <file> read input from the file <file>\n" " -o <file> write output to the file <file>\n" " -v <version> set image version to <version>\n" " -h show this screen\n" ); exit(status); } int main(int argc, char *argv[]) { int res = EXIT_FAILURE; int buflen; int err; struct stat st; char *buf; struct planex_hdr *hdr; sha1_context ctx; uint32_t seed; FILE *outfile, *infile; progname = basename(argv[0]); while ( 1 ) { int c; c = getopt(argc, argv, "B:i:o:v:h"); if (c == -1) break; switch (c) { case 'B': board_id = optarg; break; case 'i': ifname = optarg; break; case 'o': ofname = optarg; break; case 'v': version = optarg; break; case 'h': usage(EXIT_SUCCESS); break; default: usage(EXIT_FAILURE); break; } } if (board_id == NULL) { ERR("no board specified"); goto err; } board = find_board(board_id); if (board == NULL) { ERR("unknown board '%s'", board_id); goto err; }; if (ifname == NULL) { ERR("no input file specified"); goto err; } if (ofname == NULL) { ERR("no output file specified"); goto err; } err = stat(ifname, &st); if (err){ ERRS("stat failed on %s", ifname); goto err; } if (st.st_size > board->datalen) { ERR("file '%s' is too big - max size: 0x%08X (exceeds %lu bytes)\n", ifname, board->datalen, st.st_size - board->datalen); goto err; } buflen = board->datalen + 0x10000; buf = malloc(buflen); if (!buf) { ERR("no memory for buffer\n"); goto err; } memset(buf, 0xff, buflen); hdr = (struct planex_hdr *)buf; hdr->datalen = HOST_TO_BE32(board->datalen); hdr->unk1[0] = board->unk[0]; hdr->unk1[1] = board->unk[1]; snprintf(hdr->version, sizeof(hdr->version), "%s", version); infile = fopen(ifname, "r"); if (infile == NULL) { ERRS("could not open \"%s\" for reading", ifname); goto err_free; } errno = 0; fread(buf + sizeof(*hdr), st.st_size, 1, infile); if (errno != 0) { ERRS("unable to read from file %s", ifname); goto err_close_in; } seed = HOST_TO_BE32(board->seed); sha1_starts(&ctx); sha1_update(&ctx, (uchar *) &seed, sizeof(seed)); sha1_update(&ctx, buf + sizeof(*hdr), board->datalen); sha1_finish(&ctx, hdr->sha1sum); outfile = fopen(ofname, "w"); if (outfile == NULL) { ERRS("could not open \"%s\" for writing", ofname); goto err_close_in; } errno = 0; fwrite(buf, buflen, 1, outfile); if (errno) { ERRS("unable to write to file %s", ofname); goto err_close_out; } res = EXIT_SUCCESS; out_flush: fflush(outfile); err_close_out: fclose(outfile); if (res != EXIT_SUCCESS) { unlink(ofname); } err_close_in: fclose(infile); err_free: free(buf); err: return res; }