[oe-commits] org.oe.dreambox dreambox-buildimage-native: support for different flash sizes
tmbinc commit
openembedded-commits at lists.openembedded.org
Thu Feb 28 18:22:03 UTC 2008
dreambox-buildimage-native: support for different flash sizes
Author: tmbinc at openembedded.org
Branch: org.openembedded.dreambox
Revision: 97437d26e6f38d8a20cc6e70ffef53a086cb3493
ViewMTN: http://monotone.openembedded.org/revision/info/97437d26e6f38d8a20cc6e70ffef53a086cb3493
Files:
1
packages/dreambox/dreambox-buildimage-native/buildimage.c
packages/dreambox/dreambox-buildimage-native.bb
Diffs:
#
# mt diff -r195e59f104871d3e61f581fcfb309c34116d9a81 -r97437d26e6f38d8a20cc6e70ffef53a086cb3493
#
#
#
# patch "packages/dreambox/dreambox-buildimage-native/buildimage.c"
# from [d2cdfa6f8576de039a72c5174dc5c408c08c7e42]
# to [c97c5922a7062d32321f1e86666570f8516749ce]
#
# patch "packages/dreambox/dreambox-buildimage-native.bb"
# from [6575fa4319a3937cfa2da476e11e386700375d62]
# to [39a9459763addccbbf392f449e041aad072d00ab]
#
============================================================
--- packages/dreambox/dreambox-buildimage-native/buildimage.c d2cdfa6f8576de039a72c5174dc5c408c08c7e42
+++ packages/dreambox/dreambox-buildimage-native/buildimage.c c97c5922a7062d32321f1e86666570f8516749ce
@@ -215,9 +215,9 @@ int main(int argc, char **argv)
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);
============================================================
--- packages/dreambox/dreambox-buildimage-native.bb 6575fa4319a3937cfa2da476e11e386700375d62
+++ packages/dreambox/dreambox-buildimage-native.bb 39a9459763addccbbf392f449e041aad072d00ab
@@ -1,8 +1,8 @@ PV = "1.0"
DESCRIPTION = "create Dreambox NAND boot images"
SECTION = "console/utils"
MAINTAINER = "Felix Domke <tmbinc at elitedvb.net>"
PV = "1.0"
-PR = "r1"
+PR = "r2"
SRC_URI = "file://buildimage.c"
More information about the Openembedded-commits
mailing list