diff options
author | Felix Domke <tmbinc@elitedvb.ne> | 2008-02-28 13:13:54 +0000 |
---|---|---|
committer | Felix Domke <tmbinc@elitedvb.ne> | 2008-02-28 13:13:54 +0000 |
commit | 19ddd13e4d5b4b7a8850b83d2938d3e39df46cb3 (patch) | |
tree | 663e46da793f00493d31f89bb409f2c1d7390a41 /packages | |
parent | 9104d4fe2fe2127209d2c000359e86ca8d88216d (diff) | |
parent | 3cd606314a2f141735bac42f984970f4939763d1 (diff) | |
download | openembedded-19ddd13e4d5b4b7a8850b83d2938d3e39df46cb3.tar.gz |
merge of '68d893e0df34facfd3eafd9715729aa07bda2791'
and '97437d26e6f38d8a20cc6e70ffef53a086cb3493'
Diffstat (limited to 'packages')
-rw-r--r-- | packages/dreambox/dreambox-buildimage-native.bb | 2 | ||||
-rw-r--r-- | packages/dreambox/dreambox-buildimage-native/buildimage.c | 14 |
2 files changed, 10 insertions, 6 deletions
diff --git a/packages/dreambox/dreambox-buildimage-native.bb b/packages/dreambox/dreambox-buildimage-native.bb index 4fd12b95d9..7faaecf419 100644 --- a/packages/dreambox/dreambox-buildimage-native.bb +++ b/packages/dreambox/dreambox-buildimage-native.bb @@ -2,7 +2,7 @@ DESCRIPTION = "create Dreambox NAND boot images" SECTION = "console/utils" MAINTAINER = "Felix Domke <tmbinc@elitedvb.net>" PV = "1.0" -PR = "r1" +PR = "r2" SRC_URI = "file://buildimage.c" diff --git a/packages/dreambox/dreambox-buildimage-native/buildimage.c b/packages/dreambox/dreambox-buildimage-native/buildimage.c index c8377dae62..675b898688 100644 --- a/packages/dreambox/dreambox-buildimage-native/buildimage.c +++ b/packages/dreambox/dreambox-buildimage-native/buildimage.c @@ -215,9 +215,9 @@ void emit_file(FILE *src, int size, fnc_encode_ecc * eccfnc) int main(int argc, char **argv) { - if ((argc != 4) && (argc != 5)) + if ((argc != 4) && (argc != 5) && (argc != 6)) { - fprintf(stderr, "usage: %s <2nd.bin.gz> <boot.jffs2> <root.jffs2> [<arch>] > image.nfi\n", *argv); + fprintf(stderr, "usage: %s <2nd.bin.gz> <boot.jffs2> <root.jffs2> [<arch> [<size-in-MB>]] > image.nfi\n", *argv); return 1; } @@ -228,11 +228,15 @@ int main(int argc, char **argv) file_open(&f_boot, &size_boot, argv[2]); file_open(&f_root, &size_root, argv[3]); + int flashsize = 32*1024*1024; + if (argc >= 6) + flashsize = atoi(argv[5]) * 1024 * 1024; + // pre-35 have old layout #ifdef OLD_LAYOUT - int partition[] = {0x20000, 0x200000, 0x2000000}; + int partition[] = {0x20000, 0x200000, flashsize}; #else - int partition[] = {0x40000, 0x400000, 0x2000000}; + int partition[] = {0x40000, 0x400000, flashsize}; #endif if (size_2nd > BADBLOCK_SAFE(partition[0])) @@ -249,7 +253,7 @@ int main(int argc, char **argv) int total_size = 4 + num_partitions * 4 + 4 + sectors_2nd * 528 + 4 + sectors_boot * 528 + 4 + sectors_root * 528; /* in case an architecture is given, write NFI1 header */ - if (argc == 5) + if (argc >= 5) { char header[32] = "NFI1"; strncpy(header + 4, argv[4], 28); |