Changeset 671f0a3 in freewrt
- Timestamp:
- Jun 11, 2006, 11:52:34 PM (20 years ago)
- Branches:
- freewrt_1_0, freewrt_2_0
- Children:
- abfbcd7
- Parents:
- 22b2db8
- File:
-
- 1 edited
-
target/utils/src/trx.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
target/utils/src/trx.c
r22b2db8 r671f0a3 1 1 /* 2 2 * Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org> 3 * Copyright (C) 2006 OpenWrt developers <openwrt-developers@openwrt.org> 3 4 * 4 5 * This program is free software; you can redistribute it and/or modify … … 17 18 */ 18 19 19 /* July 29, 200420 *21 * This is a hacked replacement for the 'trx' utility used to create22 * wrt54g .trx firmware files. It isn't pretty, but it does the job23 * for me.24 *25 * As an extension, you can specify a larger maximum length for the26 * .trx file using '-m'. It will be rounded up to be a multiple of 4K.27 * NOTE: This space will be malloc()'d.28 *29 * August 16, 200430 *31 * Sigh... Make it endian-neutral.32 *33 * TODO: Support '-b' option to specify offsets for each file.34 *35 * February 19, 2005 - mbm36 *37 * Add -a (align offset) and -b (absolute offset)38 */39 40 20 #include <stdio.h> 41 21 #include <stdlib.h> … … 46 26 #include <unistd.h> 47 27 #if defined(__APPLE__) 48 #include <machine/endian.h>49 #include <machine/byte_order.h>28 #include <machine/endian.h> 29 #include <machine/byte_order.h> 50 30 #define __BYTE_ORDER BYTE_ORDER 51 31 #define __BIG_ENDIAN BIG_ENDIAN … … 53 33 #define bswap_32(x) NXSwapInt(x) 54 34 #define bswap_64(x) NXSwapLongLong(x) 35 #elif defined(__OpenBSD__) 36 #include <machine/endian.h> 37 #define bswap_16(x) swap16(x) 38 #define bswap_32(x) swap32(x) 39 #define bswap_64(x) swap64(x) 55 40 #else 56 41 #include <endian.h>
Note:
See TracChangeset
for help on using the changeset viewer.
