summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2011-12-06 13:28:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-12 21:50:16 +0000
commit0c45ecb60cfb8b1f1e775e8d4f8808909ced8838 (patch)
treeaadae7fe14ae5ed386d6240906d9018ebad5a129 /meta
parent896f2abab6ef1df3102dbd551f7a67dc2da20bee (diff)
downloadpoky-0c45ecb60cfb8b1f1e775e8d4f8808909ced8838.tar.gz
dosfstools: update native to 2.11
This unify recipes for target and native builds and also drops the the already merged patches. (From OE-Core rev: 3a401ddce55e185c8ccfdc43c1440fd77daff9ae) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools-native_2.10.bb19
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/2.6.20-syscall.patch72
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/dosfstools-2.10-kernel-2.6.patch74
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-bootcode.patch68
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-dir.patch62
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools_2.10.bb24
-rw-r--r--meta/recipes-devtools/dosfstools/dosfstools_2.11.bb11
7 files changed, 69 insertions, 261 deletions
diff --git a/meta/recipes-devtools/dosfstools/dosfstools-native_2.10.bb b/meta/recipes-devtools/dosfstools/dosfstools-native_2.10.bb
deleted file mode 100644
index 91ff11faa6..0000000000
--- a/meta/recipes-devtools/dosfstools/dosfstools-native_2.10.bb
+++ /dev/null
@@ -1,19 +0,0 @@
1# dosfstools-native OE build file
2# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
3# Released under the MIT license (see packages/COPYING)
4
5require dosfstools_${PV}.bb
6
7PR="r5"
8
9SRC_URI = "ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools/dosfstools-${PV}.src.tar.gz \
10 file://mkdosfs-bootcode.patch \
11 file://mkdosfs-dir.patch \
12 file://alignment_hack.patch \
13 file://dosfstools-2.10-kernel-2.6.patch \
14 file://msdos_fat12_undefined.patch \
15 file://dosfstools-msdos_fs-types.patch \
16 file://include-linux-types.patch \
17 file://2.6.20-syscall.patch"
18
19inherit native
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/2.6.20-syscall.patch b/meta/recipes-devtools/dosfstools/dosfstools/2.6.20-syscall.patch
deleted file mode 100644
index 4460f0618d..0000000000
--- a/meta/recipes-devtools/dosfstools/dosfstools/2.6.20-syscall.patch
+++ /dev/null
@@ -1,72 +0,0 @@
1Only use the system's llseek().
2
3Upstream-Status: Inappropriate [licensing]
4We're tracking an old release of dosfstools due to licensing issues.
5
6Signed-off-by: Scott Garman <scott.a.garman@intel.com>
7
8Index: dosfstools-2.10/dosfsck/io.c
9===================================================================
10--- dosfstools-2.10.orig/dosfsck/io.c 2007-06-07 16:15:52.000000000 +0200
11+++ dosfstools-2.10/dosfsck/io.c 2007-06-07 16:16:06.000000000 +0200
12@@ -42,28 +42,11 @@
13 /* Use the _llseek system call directly, because there (once?) was a bug in
14 * the glibc implementation of it. */
15 #include <linux/unistd.h>
16-#if defined __alpha || defined __ia64__ || defined __s390x__ || defined __x86_64__ || defined __ppc64__
17 /* On alpha, the syscall is simply lseek, because it's a 64 bit system. */
18 static loff_t llseek( int fd, loff_t offset, int whence )
19 {
20 return lseek(fd, offset, whence);
21 }
22-#else
23-# ifndef __NR__llseek
24-# error _llseek system call not present
25-# endif
26-static _syscall5( int, _llseek, uint, fd, ulong, hi, ulong, lo,
27- loff_t *, res, uint, wh );
28-
29-static loff_t llseek( int fd, loff_t offset, int whence )
30-{
31- loff_t actual;
32-
33- if (_llseek(fd, offset>>32, offset&0xffffffff, &actual, whence) != 0)
34- return (loff_t)-1;
35- return actual;
36-}
37-#endif
38
39
40 void fs_open(char *path,int rw)
41Index: dosfstools-2.10/mkdosfs/mkdosfs.c
42===================================================================
43--- dosfstools-2.10.orig/mkdosfs/mkdosfs.c 2007-06-07 16:15:11.000000000 +0200
44+++ dosfstools-2.10/mkdosfs/mkdosfs.c 2007-06-07 16:15:30.000000000 +0200
45@@ -116,27 +116,11 @@
46 /* Use the _llseek system call directly, because there (once?) was a bug in
47 * the glibc implementation of it. */
48 #include <linux/unistd.h>
49-#if defined __alpha || defined __ia64__ || defined __s390x__ || defined __x86_64__ || defined __ppc64__
50 /* On alpha, the syscall is simply lseek, because it's a 64 bit system. */
51 static loff_t llseek( int fd, loff_t offset, int whence )
52 {
53 return lseek(fd, offset, whence);
54 }
55-#else
56-# ifndef __NR__llseek
57-# error _llseek system call not present
58-# endif
59-static _syscall5( int, _llseek, uint, fd, ulong, hi, ulong, lo,
60- loff_t *, res, uint, wh );
61-static loff_t llseek( int fd, loff_t offset, int whence )
62-{
63- loff_t actual;
64-
65- if (_llseek(fd, offset>>32, offset&0xffffffff, &actual, whence) != 0)
66- return (loff_t)-1;
67- return actual;
68-}
69-#endif
70
71 #define ROUND_UP(value, divisor) (value + (divisor - (value % divisor))) / divisor
72
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-2.10-kernel-2.6.patch b/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-2.10-kernel-2.6.patch
deleted file mode 100644
index 0c9230f7e4..0000000000
--- a/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-2.10-kernel-2.6.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1Submitted By: Jim Gifford (jim at linuxfromscratch dot org)
2Date: 2004-02-09
3Initial Package Version: 2.6
4Origin: Jim Gifford
5Upstream-Status: Accepted
6Description: Fixes Compile Issues with the 2.6 Kernel
7
8--- dosfstools-2.10/dosfsck/common.h.orig 2004-02-09 18:37:59.056737458 +0000
9+++ dosfstools-2.10/dosfsck/common.h 2004-02-09 18:38:18.333392952 +0000
10@@ -2,6 +2,13 @@
11
12 /* Written 1993 by Werner Almesberger */
13
14+#include <linux/version.h>
15+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
16+ #define __KERNEL__
17+ #include <asm/types.h>
18+ #undef __KERNEL__
19+ #define MSDOS_FAT12 4084 /* maximum number of clusters in a 12 bit FAT */
20+#endif
21
22 #ifndef _COMMON_H
23 #define _COMMON_H
24--- dosfstools-2.10/dosfsck/file.c.orig 2004-02-09 18:40:52.016728845 +0000
25+++ dosfstools-2.10/dosfsck/file.c 2004-02-09 18:40:03.665117865 +0000
26@@ -15,6 +15,14 @@
27 #define _LINUX_STAT_H /* hack to avoid inclusion of <linux/stat.h> */
28 #define _LINUX_STRING_H_ /* hack to avoid inclusion of <linux/string.h>*/
29 #define _LINUX_FS_H /* hack to avoid inclusion of <linux/fs.h> */
30+
31+#include <linux/version.h>
32+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
33+ #define __KERNEL__
34+ #include <asm/types.h>
35+ #undef __KERNEL__
36+#endif
37+
38 #include <linux/msdos_fs.h>
39
40 #include "common.h"
41--- dosfstools-2.10/dosfsck/dosfsck.h.orig 2004-02-09 18:57:11.022870974 +0000
42+++ dosfstools-2.10/dosfsck/dosfsck.h 2004-02-09 18:56:20.628614393 +0000
43@@ -13,6 +13,15 @@
44 #define _LINUX_STAT_H /* hack to avoid inclusion of <linux/stat.h> */
45 #define _LINUX_STRING_H_ /* hack to avoid inclusion of <linux/string.h>*/
46 #define _LINUX_FS_H /* hack to avoid inclusion of <linux/fs.h> */
47+
48+#include <linux/version.h>
49+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
50+ #define __KERNEL__
51+ #include <asm/types.h>
52+ #include <asm/byteorder.h>
53+ #undef __KERNEL__
54+#endif
55+
56 #include <linux/msdos_fs.h>
57
58 /* 2.1 kernels use le16_to_cpu() type functions for CF_LE_W & Co., but don't
59--- dosfstools-2.10/mkdosfs/mkdosfs.c.orig 2004-02-09 18:31:41.997157413 +0000
60+++ dosfstools-2.10/mkdosfs/mkdosfs.c 2004-02-09 18:34:07.311945252 +0000
61@@ -66,6 +66,13 @@
62 #include <time.h>
63 #include <errno.h>
64
65+#include <linux/version.h>
66+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
67+ #define __KERNEL__
68+ #include <asm/types.h>
69+ #undef __KERNEL__
70+#endif
71+
72 #if __BYTE_ORDER == __BIG_ENDIAN
73
74 #include <asm/byteorder.h>
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-bootcode.patch b/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-bootcode.patch
index dd5cc7f0fa..ae21bee78e 100644
--- a/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-bootcode.patch
+++ b/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-bootcode.patch
@@ -5,9 +5,10 @@ We're tracking an old release of dosfstools due to licensing issues.
5 5
6Signed-off-by: Scott Garman <scott.a.garman@intel.com> 6Signed-off-by: Scott Garman <scott.a.garman@intel.com>
7 7
8diff -urN dosfstools-2.10.orig/mkdosfs/ChangeLog dosfstools-2.10/mkdosfs/ChangeLog 8Index: dosfstools-2.11/mkdosfs/ChangeLog
9--- dosfstools-2.10.orig/mkdosfs/ChangeLog 1997-06-18 03:09:38.000000000 -0700 9===================================================================
10+++ dosfstools-2.10/mkdosfs/ChangeLog 2004-08-02 20:57:57.734939816 -0700 10--- dosfstools-2.11.orig/mkdosfs/ChangeLog 1997-06-18 10:09:38.000000000 +0000
11+++ dosfstools-2.11/mkdosfs/ChangeLog 2011-12-06 12:14:23.634011558 +0000
11@@ -1,3 +1,14 @@ 12@@ -1,3 +1,14 @@
12+19th June 2003 Sam Bingner (sam@bingner.com) 13+19th June 2003 Sam Bingner (sam@bingner.com)
13+ 14+
@@ -23,10 +24,11 @@ diff -urN dosfstools-2.10.orig/mkdosfs/ChangeLog dosfstools-2.10/mkdosfs/ChangeL
23 28th January 1995 H. Peter Anvin (hpa@yggdrasil.com) 24 28th January 1995 H. Peter Anvin (hpa@yggdrasil.com)
24 25
25 Better algorithm to select cluster sizes on large filesystems. 26 Better algorithm to select cluster sizes on large filesystems.
26diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.8 dosfstools-2.10/mkdosfs/mkdosfs.8 27Index: dosfstools-2.11/mkdosfs/mkdosfs.8
27--- dosfstools-2.10.orig/mkdosfs/mkdosfs.8 2003-05-15 11:28:28.000000000 -0700 28===================================================================
28+++ dosfstools-2.10/mkdosfs/mkdosfs.8 2004-08-02 20:57:57.735939664 -0700 29--- dosfstools-2.11.orig/mkdosfs/mkdosfs.8 2004-02-25 19:36:07.000000000 +0000
29@@ -40,6 +40,10 @@ 30+++ dosfstools-2.11/mkdosfs/mkdosfs.8 2011-12-06 12:19:54.777888434 +0000
31@@ -44,6 +44,10 @@
30 .I message-file 32 .I message-file
31 ] 33 ]
32 [ 34 [
@@ -37,7 +39,7 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.8 dosfstools-2.10/mkdosfs/mkdosfs
37 .B \-n 39 .B \-n
38 .I volume-name 40 .I volume-name
39 ] 41 ]
40@@ -155,6 +159,18 @@ 42@@ -165,6 +169,18 @@
41 carriage return-line feed combinations, and tabs have been expanded. 43 carriage return-line feed combinations, and tabs have been expanded.
42 If the filename is a hyphen (-), the text is taken from standard input. 44 If the filename is a hyphen (-), the text is taken from standard input.
43 .TP 45 .TP
@@ -56,21 +58,22 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.8 dosfstools-2.10/mkdosfs/mkdosfs
56 .BI \-n " volume-name" 58 .BI \-n " volume-name"
57 Sets the volume name (label) of the filesystem. The volume name can 59 Sets the volume name (label) of the filesystem. The volume name can
58 be up to 11 characters long. The default is no label. 60 be up to 11 characters long. The default is no label.
59@@ -188,8 +204,9 @@ 61@@ -198,8 +214,9 @@
60 simply will not support it ;) 62 simply will not support it ;)
61 .SH AUTHOR 63 .SH AUTHOR
62 Dave Hudson - <dave@humbug.demon.co.uk>; modified by Peter Anvin 64 Dave Hudson - <dave@humbug.demon.co.uk>; modified by Peter Anvin
63-<hpa@yggdrasil.com>. Fixes and additions by Roman Hodek 65-<hpa@yggdrasil.com>. Fixes and additions by Roman Hodek
64-<Roman.Hodek@informatik.uni-erlangen.de> for Debian/GNU Linux. 66-<roman@hodek.net> for Debian/GNU Linux.
65+<hpa@yggdrasil.com> and Sam Bingner <sam@bingner.com>. Fixes and 67+<hpa@yggdrasil.com> and Sam Bingner <sam@bingner.com>. Fixes and
66+additions by Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de> 68+additions by Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
67+for Debian/GNU Linux. 69+for Debian/GNU Linux.
68 .SH ACKNOWLEDGEMENTS 70 .SH ACKNOWLEDGEMENTS
69 .B mkdosfs 71 .B mkdosfs
70 is based on code from 72 is based on code from
71diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs.c 73Index: dosfstools-2.11/mkdosfs/mkdosfs.c
72--- dosfstools-2.10.orig/mkdosfs/mkdosfs.c 2003-06-14 13:07:08.000000000 -0700 74===================================================================
73+++ dosfstools-2.10/mkdosfs/mkdosfs.c 2004-08-02 20:57:57.736939512 -0700 75--- dosfstools-2.11.orig/mkdosfs/mkdosfs.c 2005-03-12 16:12:16.000000000 +0000
76+++ dosfstools-2.11/mkdosfs/mkdosfs.c 2011-12-06 12:27:55.121886076 +0000
74@@ -24,6 +24,12 @@ 77@@ -24,6 +24,12 @@
75 - New options -A, -S, -C 78 - New options -A, -S, -C
76 - Support for filesystems > 2GB 79 - Support for filesystems > 2GB
@@ -84,7 +87,7 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs
84 87
85 Copying: Copyright 1993, 1994 David Hudson (dave@humbug.demon.co.uk) 88 Copying: Copyright 1993, 1994 David Hudson (dave@humbug.demon.co.uk)
86 89
87@@ -167,6 +173,8 @@ 90@@ -153,6 +159,8 @@
88 #define FAT_BAD 0x0ffffff7 91 #define FAT_BAD 0x0ffffff7
89 92
90 #define MSDOS_EXT_SIGN 0x29 /* extended boot sector signature */ 93 #define MSDOS_EXT_SIGN 0x29 /* extended boot sector signature */
@@ -93,7 +96,7 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs
93 #define MSDOS_FAT12_SIGN "FAT12 " /* FAT12 filesystem signature */ 96 #define MSDOS_FAT12_SIGN "FAT12 " /* FAT12 filesystem signature */
94 #define MSDOS_FAT16_SIGN "FAT16 " /* FAT16 filesystem signature */ 97 #define MSDOS_FAT16_SIGN "FAT16 " /* FAT16 filesystem signature */
95 #define MSDOS_FAT32_SIGN "FAT32 " /* FAT32 filesystem signature */ 98 #define MSDOS_FAT32_SIGN "FAT32 " /* FAT32 filesystem signature */
96@@ -188,6 +196,8 @@ 99@@ -175,6 +183,8 @@
97 #define BOOTCODE_SIZE 448 100 #define BOOTCODE_SIZE 448
98 #define BOOTCODE_FAT32_SIZE 420 101 #define BOOTCODE_FAT32_SIZE 420
99 102
@@ -102,7 +105,7 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs
102 /* __attribute__ ((packed)) is used on all structures to make gcc ignore any 105 /* __attribute__ ((packed)) is used on all structures to make gcc ignore any
103 * alignments */ 106 * alignments */
104 107
105@@ -215,7 +225,7 @@ 108@@ -202,7 +212,7 @@
106 __u16 fat_length; /* sectors/FAT */ 109 __u16 fat_length; /* sectors/FAT */
107 __u16 secs_track; /* sectors per track */ 110 __u16 secs_track; /* sectors per track */
108 __u16 heads; /* number of heads */ 111 __u16 heads; /* number of heads */
@@ -111,7 +114,7 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs
111 __u32 total_sect; /* number of sectors (if sectors == 0) */ 114 __u32 total_sect; /* number of sectors (if sectors == 0) */
112 union { 115 union {
113 struct { 116 struct {
114@@ -298,6 +308,8 @@ 117@@ -285,6 +295,8 @@
115 118
116 /* Global variables - the root of all evil :-) - see these and weep! */ 119 /* Global variables - the root of all evil :-) - see these and weep! */
117 120
@@ -120,7 +123,7 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs
120 static char *program_name = "mkdosfs"; /* Name of the program */ 123 static char *program_name = "mkdosfs"; /* Name of the program */
121 static char *device_name = NULL; /* Name of the device on which to create the filesystem */ 124 static char *device_name = NULL; /* Name of the device on which to create the filesystem */
122 static int atari_format = 0; /* Use Atari variation of MS-DOS FS format */ 125 static int atari_format = 0; /* Use Atari variation of MS-DOS FS format */
123@@ -842,6 +854,12 @@ 126@@ -837,6 +849,12 @@
124 vi->volume_id[2] = (unsigned char) ((volume_id & 0x00ff0000) >> 16); 127 vi->volume_id[2] = (unsigned char) ((volume_id & 0x00ff0000) >> 16);
125 vi->volume_id[3] = (unsigned char) (volume_id >> 24); 128 vi->volume_id[3] = (unsigned char) (volume_id >> 24);
126 } 129 }
@@ -133,16 +136,7 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs
133 136
134 if (!atari_format) { 137 if (!atari_format) {
135 memcpy(vi->volume_label, volume_name, 11); 138 memcpy(vi->volume_label, volume_name, 11);
136@@ -886,7 +904,7 @@ 139@@ -1362,6 +1380,32 @@
137 printf( "Using %d reserved sectors\n", reserved_sectors );
138 bs.fats = (char) nr_fats;
139 if (!atari_format || size_fat == 32)
140- bs.hidden = CT_LE_L(0);
141+ bs.hidden = bs.secs_track;
142 else
143 /* In Atari format, hidden is a 16 bit field */
144 memset( &bs.hidden, 0, 2 );
145@@ -1358,6 +1376,32 @@
146 * dir area on FAT12/16, and the first cluster on FAT32. */ 140 * dir area on FAT12/16, and the first cluster on FAT32. */
147 writebuf( (char *) root_dir, size_root_dir, "root directory" ); 141 writebuf( (char *) root_dir, size_root_dir, "root directory" );
148 142
@@ -156,9 +150,9 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs
156+ seekto( 512*2, "third sector" ); 150+ seekto( 512*2, "third sector" );
157+ if (backup_boot != 0) { 151+ if (backup_boot != 0) {
158+ writebuf( template_boot_code+512*2, backup_boot*sector_size - 512*2, "data to backup boot" ); 152+ writebuf( template_boot_code+512*2, backup_boot*sector_size - 512*2, "data to backup boot" );
159+ seekto( backup_boot*sector_size, "backup boot sector" ); 153+ seekto( backup_boot*sector_size, "backup boot sector" );
160+ writebuf( template_boot_code, 3, "backup jmpBoot" ); 154+ writebuf( template_boot_code, 3, "backup jmpBoot" );
161+ seekto( backup_boot*sector_size+0x5a, "backup boot sector boot area" ); 155+ seekto( backup_boot*sector_size+0x5a, "backup boot sector boot area" );
162+ writebuf( template_boot_code+0x5a, 420, "backup boot sector boot area" ); 156+ writebuf( template_boot_code+0x5a, 420, "backup boot sector boot area" );
163+ seekto( (backup_boot+2)*sector_size, "sector following backup code" ); 157+ seekto( (backup_boot+2)*sector_size, "sector following backup code" );
164+ writebuf( template_boot_code+(backup_boot+2)*sector_size, (reserved_sectors-backup_boot-2)*512, "remaining data" ); 158+ writebuf( template_boot_code+(backup_boot+2)*sector_size, (reserved_sectors-backup_boot-2)*512, "remaining data" );
@@ -172,28 +166,28 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs
172+ } 166+ }
173+ } 167+ }
174+ 168+
169 if (blank_sector) free( blank_sector );
175 if (info_sector) free( info_sector ); 170 if (info_sector) free( info_sector );
176 free (root_dir); /* Free up the root directory space from setup_tables */ 171 free (root_dir); /* Free up the root directory space from setup_tables */
177 free (fat); /* Free up the fat table space reserved during setup_tables */ 172@@ -1376,7 +1420,7 @@
178@@ -1371,7 +1415,7 @@
179 { 173 {
180 fatal_error("\ 174 fatal_error("\
181 Usage: mkdosfs [-A] [-c] [-C] [-v] [-I] [-l bad-block-file] [-b backup-boot-sector]\n\ 175 Usage: mkdosfs [-A] [-c] [-C] [-v] [-I] [-l bad-block-file] [-b backup-boot-sector]\n\
182- [-m boot-msg-file] [-n volume-name] [-i volume-id]\n\ 176- [-m boot-msg-file] [-n volume-name] [-i volume-id]\n\
183+ [-m boot-msg-file] [-n volume-name] [-i volume-id] [-B bootcode]\n\ 177+ [-m boot-msg-file] [-n volume-name] [-i volume-id] [-B bootcode]\n\
184 [-s sectors-per-cluster] [-S logical-sector-size] [-f number-of-FATs]\n\ 178 [-s sectors-per-cluster] [-S logical-sector-size] [-f number-of-FATs]\n\
185 [-F fat-size] [-r root-dir-entries] [-R reserved-sectors]\n\ 179 [-h hidden-sectors] [-F fat-size] [-r root-dir-entries] [-R reserved-sectors]\n\
186 /dev/name [blocks]\n"); 180 /dev/name [blocks]\n");
187@@ -1433,7 +1477,7 @@ 181@@ -1439,7 +1483,7 @@
188 printf ("%s " VERSION " (" VERSION_DATE ")\n", 182 printf ("%s " VERSION " (" VERSION_DATE ")\n",
189 program_name); 183 program_name);
190 184
191- while ((c = getopt (argc, argv, "AcCf:F:Ii:l:m:n:r:R:s:S:v")) != EOF) 185- while ((c = getopt (argc, argv, "AbcCf:F:Ii:l:m:n:r:R:s:S:h:v")) != EOF)
192+ while ((c = getopt (argc, argv, "AcCf:F:Ii:l:m:n:r:R:s:S:v:B:b")) != EOF) 186+ while ((c = getopt (argc, argv, "AbcCf:F:Ii:l:m:n:r:R:s:S:v:B:")) != EOF)
193 /* Scan the command line for options */ 187 /* Scan the command line for options */
194 switch (c) 188 switch (c)
195 { 189 {
196@@ -1494,6 +1538,51 @@ 190@@ -1509,6 +1553,51 @@
197 listfile = optarg; 191 listfile = optarg;
198 break; 192 break;
199 193
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-dir.patch b/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-dir.patch
index 7feee0f10d..3ba4711d12 100644
--- a/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-dir.patch
+++ b/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-dir.patch
@@ -1,13 +1,14 @@
1Add -s <directory> support to populate the image. 1Add -d <directory> support to populate the image.
2 2
3Upstream-Status: Inappropriate [licensing] 3Upstream-Status: Inappropriate [licensing]
4We're tracking an old release of dosfstools due to licensing issues. 4We're tracking an old release of dosfstools due to licensing issues.
5 5
6Signed-off-by: Scott Garman <scott.a.garman@intel.com> 6Signed-off-by: Scott Garman <scott.a.garman@intel.com>
7 7
8diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs.c 8Index: dosfstools-2.11/mkdosfs/mkdosfs.c
9--- dosfstools-2.10.orig/mkdosfs/mkdosfs.c 2004-08-02 20:48:45.000000000 -0700 9===================================================================
10+++ dosfstools-2.10/mkdosfs/mkdosfs.c 2004-08-02 20:49:44.296953792 -0700 10--- dosfstools-2.11.orig/mkdosfs/mkdosfs.c 2011-12-06 12:27:55.000000000 +0000
11+++ dosfstools-2.11/mkdosfs/mkdosfs.c 2011-12-06 12:37:13.445950703 +0000
11@@ -18,6 +18,10 @@ 12@@ -18,6 +18,10 @@
12 as a rule), and not the block. For example the boot block does not 13 as a rule), and not the block. For example the boot block does not
13 occupy a full cluster. 14 occupy a full cluster.
@@ -26,18 +27,18 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs
26+#include <libgen.h> 27+#include <libgen.h>
27+#include <dirent.h> 28+#include <dirent.h>
28 29
29 #if __BYTE_ORDER == __BIG_ENDIAN 30 #include <linux/version.h>
30 31 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
31@@ -124,6 +130,8 @@ 32@@ -110,6 +116,8 @@
32 } 33 * sufficient (or even better :) for 64 bit offsets in the meantime */
33 #endif 34 #define llseek lseek
34 35
35+#define ROUND_UP(value, divisor) (value + (divisor - (value % divisor))) / divisor 36+#define ROUND_UP(value, divisor) (value + (divisor - (value % divisor))) / divisor
36+ 37+
37 /* Constant definitions */ 38 /* Constant definitions */
38 39
39 #define TRUE 1 /* Boolean constants */ 40 #define TRUE 1 /* Boolean constants */
40@@ -163,7 +171,6 @@ 41@@ -149,7 +157,6 @@
41 #define ATTR_VOLUME 8 /* volume label */ 42 #define ATTR_VOLUME 8 /* volume label */
42 #define ATTR_DIR 16 /* directory */ 43 #define ATTR_DIR 16 /* directory */
43 #define ATTR_ARCH 32 /* archived */ 44 #define ATTR_ARCH 32 /* archived */
@@ -45,7 +46,7 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs
45 #define ATTR_NONE 0 /* no attribute bits */ 46 #define ATTR_NONE 0 /* no attribute bits */
46 #define ATTR_UNUSED (ATTR_VOLUME | ATTR_ARCH | ATTR_SYS | ATTR_HIDDEN) 47 #define ATTR_UNUSED (ATTR_VOLUME | ATTR_ARCH | ATTR_SYS | ATTR_HIDDEN)
47 /* attribute bits that are copied "as is" */ 48 /* attribute bits that are copied "as is" */
48@@ -258,6 +265,19 @@ 49@@ -245,6 +252,19 @@
49 __u32 reserved2[4]; 50 __u32 reserved2[4];
50 }; 51 };
51 52
@@ -65,7 +66,7 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs
65 struct msdos_dir_entry 66 struct msdos_dir_entry
66 { 67 {
67 char name[8], ext[3]; /* name and extension */ 68 char name[8], ext[3]; /* name and extension */
68@@ -306,6 +326,15 @@ 69@@ -293,6 +313,15 @@
69 70
70 #define MESSAGE_OFFSET 29 /* Offset of message in above code */ 71 #define MESSAGE_OFFSET 29 /* Offset of message in above code */
71 72
@@ -81,7 +82,7 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs
81 /* Global variables - the root of all evil :-) - see these and weep! */ 82 /* Global variables - the root of all evil :-) - see these and weep! */
82 83
83 static char *template_boot_code; /* Variable to store a full template boot sector in */ 84 static char *template_boot_code; /* Variable to store a full template boot sector in */
84@@ -339,6 +368,9 @@ 85@@ -326,6 +355,9 @@
85 static int size_root_dir; /* Size of the root directory in bytes */ 86 static int size_root_dir; /* Size of the root directory in bytes */
86 static int sectors_per_cluster = 0; /* Number of sectors per disk cluster */ 87 static int sectors_per_cluster = 0; /* Number of sectors per disk cluster */
87 static int root_dir_entries = 0; /* Number of root directory entries */ 88 static int root_dir_entries = 0; /* Number of root directory entries */
@@ -89,9 +90,9 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs
89+static int last_cluster_written = 0; 90+static int last_cluster_written = 0;
90+ 91+
91 static char *blank_sector; /* Blank sector - all zeros */ 92 static char *blank_sector; /* Blank sector - all zeros */
93 static int hidden_sectors = 0; /* Number of hidden sectors */
92 94
93 95@@ -399,7 +431,6 @@
94@@ -411,7 +443,6 @@
95 } 96 }
96 } 97 }
97 98
@@ -99,7 +100,7 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs
99 /* Mark a specified sector as having a particular value in it's FAT entry */ 100 /* Mark a specified sector as having a particular value in it's FAT entry */
100 101
101 static void 102 static void
102@@ -1262,6 +1293,9 @@ 103@@ -1266,6 +1297,9 @@
103 die ("unable to allocate space for root directory in memory"); 104 die ("unable to allocate space for root directory in memory");
104 } 105 }
105 106
@@ -109,7 +110,7 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs
109 memset(root_dir, 0, size_root_dir); 110 memset(root_dir, 0, size_root_dir);
110 if ( memcmp(volume_name, " ", 11) ) 111 if ( memcmp(volume_name, " ", 11) )
111 { 112 {
112@@ -1310,11 +1344,11 @@ 113@@ -1314,11 +1348,11 @@
113 } 114 }
114 115
115 if (!(blank_sector = malloc( sector_size ))) 116 if (!(blank_sector = malloc( sector_size )))
@@ -124,7 +125,7 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs
124 /* Write the new filesystem's data tables to wherever they're going to end up! */ 125 /* Write the new filesystem's data tables to wherever they're going to end up! */
125 126
126 #define error(str) \ 127 #define error(str) \
127@@ -1336,7 +1370,7 @@ 128@@ -1340,7 +1374,7 @@
128 do { \ 129 do { \
129 int __size = (size); \ 130 int __size = (size); \
130 if (write (dev, buf, __size) != __size) \ 131 if (write (dev, buf, __size) != __size) \
@@ -133,7 +134,7 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs
133 } while(0) 134 } while(0)
134 135
135 136
136@@ -1407,6 +1441,452 @@ 137@@ -1412,6 +1446,452 @@
137 free (fat); /* Free up the fat table space reserved during setup_tables */ 138 free (fat); /* Free up the fat table space reserved during setup_tables */
138 } 139 }
139 140
@@ -586,19 +587,16 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs
586 587
587 /* Report the command usage and return a failure error code */ 588 /* Report the command usage and return a failure error code */
588 589
589@@ -1418,9 +1898,9 @@ 590@@ -1423,7 +1903,7 @@
590 [-m boot-msg-file] [-n volume-name] [-i volume-id] [-B bootcode]\n\ 591 [-m boot-msg-file] [-n volume-name] [-i volume-id] [-B bootcode]\n\
591 [-s sectors-per-cluster] [-S logical-sector-size] [-f number-of-FATs]\n\ 592 [-s sectors-per-cluster] [-S logical-sector-size] [-f number-of-FATs]\n\
592 [-F fat-size] [-r root-dir-entries] [-R reserved-sectors]\n\ 593 [-h hidden-sectors] [-F fat-size] [-r root-dir-entries] [-R reserved-sectors]\n\
593- /dev/name [blocks]\n"); 594- /dev/name [blocks]\n");
594+ [-d directory] /dev/name [blocks]\n"); 595+ [-d directory] /dev/name [blocks]\n");
595 } 596 }
596- 597
597+
598 /* 598 /*
599 * ++roman: On m68k, check if this is an Atari; if yes, turn on Atari variant 599@@ -1463,6 +1943,8 @@
600 * of MS-DOS filesystem by default.
601@@ -1458,6 +1938,8 @@
602 int c; 600 int c;
603 char *tmp; 601 char *tmp;
604 char *listfile = NULL; 602 char *listfile = NULL;
@@ -607,27 +605,27 @@ diff -urN dosfstools-2.10.orig/mkdosfs/mkdosfs.c dosfstools-2.10/mkdosfs/mkdosfs
607 FILE *msgfile; 605 FILE *msgfile;
608 struct stat statbuf; 606 struct stat statbuf;
609 int i = 0, pos, ch; 607 int i = 0, pos, ch;
610@@ -1477,7 +1959,7 @@ 608@@ -1483,7 +1965,7 @@
611 printf ("%s " VERSION " (" VERSION_DATE ")\n", 609 printf ("%s " VERSION " (" VERSION_DATE ")\n",
612 program_name); 610 program_name);
613 611
614- while ((c = getopt (argc, argv, "AcCf:F:Ii:l:m:n:r:R:s:S:v:B:b")) != EOF) 612- while ((c = getopt (argc, argv, "AbcCf:F:Ii:l:m:n:r:R:s:S:v:B:")) != EOF)
615+ while ((c = getopt (argc, argv, "AcCd:f:F:Ii:l:m:n:r:R:s:S:v:B:b")) != EOF) 613+ while ((c = getopt (argc, argv, "AbcCd:f:F:Ii:l:m:n:r:R:s:S:v:B:")) != EOF)
616 /* Scan the command line for options */ 614 /* Scan the command line for options */
617 switch (c) 615 switch (c)
618 { 616 {
619@@ -1502,6 +1984,10 @@ 617@@ -1508,6 +1990,10 @@
620 create = TRUE; 618 create = TRUE;
621 break; 619 break;
622 620
623+ case 'd': 621+ case 'd':
624+ dirname = optarg; 622+ dirname = optarg;
625+ break; 623+ break;
626+ 624+
627 case 'f': /* f : Choose number of FATs */ 625 case 'f': /* f : Choose number of FATs */
628 nr_fats = (int) strtol (optarg, &tmp, 0); 626 nr_fats = (int) strtol (optarg, &tmp, 0);
629 if (*tmp || nr_fats < 1 || nr_fats > 4) 627 if (*tmp || nr_fats < 1 || nr_fats > 4)
630@@ -1796,8 +2282,10 @@ 628@@ -1811,8 +2297,10 @@
631 else if (listfile) 629 else if (listfile)
632 get_list_blocks (listfile); 630 get_list_blocks (listfile);
633 631
diff --git a/meta/recipes-devtools/dosfstools/dosfstools_2.10.bb b/meta/recipes-devtools/dosfstools/dosfstools_2.10.bb
deleted file mode 100644
index c23c02de64..0000000000
--- a/meta/recipes-devtools/dosfstools/dosfstools_2.10.bb
+++ /dev/null
@@ -1,24 +0,0 @@
1# dosfstools OE build file
2# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
3# Released under the MIT license (see packages/COPYING)
4
5DESCRIPTION = "DOS FAT Filesystem Utilities"
6
7SECTION = "base"
8LICENSE = "GPLv2"
9LIC_FILES_CHKSUM = "file://mkdosfs/COPYING;md5=cbe67f08d6883bff587f615f0cc81aa8"
10PR = "r3"
11
12SRC_URI = "ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools/dosfstools-${PV}.src.tar.gz \
13 file://alignment_hack.patch \
14 file://dosfstools-2.10-kernel-2.6.patch \
15 file://msdos_fat12_undefined.patch \
16 file://include-linux-types.patch"
17
18SRC_URI[md5sum] = "59a02f311a891af8787c4c9e28c6b89b"
19SRC_URI[sha256sum] = "55a7b2f5ea4506bde935ee3145573e1773427fc72283a36796c7c2cf861dd064"
20
21do_install () {
22 oe_runmake "PREFIX=${D}" "SBINDIR=${D}${sbindir}" \
23 "MANDIR=${D}${mandir}/man8" install
24}
diff --git a/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb b/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
index 944d873db7..7d0080cdf1 100644
--- a/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
+++ b/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
@@ -7,12 +7,15 @@ DESCRIPTION = "DOS FAT Filesystem Utilities"
7SECTION = "base" 7SECTION = "base"
8LICENSE = "GPLv2" 8LICENSE = "GPLv2"
9LIC_FILES_CHKSUM = "file://mkdosfs/COPYING;md5=cbe67f08d6883bff587f615f0cc81aa8" 9LIC_FILES_CHKSUM = "file://mkdosfs/COPYING;md5=cbe67f08d6883bff587f615f0cc81aa8"
10PR = "r0" 10PR = "r1"
11 11
12SRC_URI = "ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools/dosfstools-${PV}.src.tar.gz \ 12SRC_URI = "ftp://ftp.uni-erlangen.de/pub/Linux/LOCAL/dosfstools/dosfstools-${PV}.src.tar.gz \
13 file://alignment_hack.patch \ 13 file://mkdosfs-bootcode.patch \
14 file://mkdosfs-dir.patch \
15 file://alignment_hack.patch \
14 file://msdos_fat12_undefined.patch \ 16 file://msdos_fat12_undefined.patch \
15 file://include-linux-types.patch" 17 file://dosfstools-msdos_fs-types.patch \
18 file://include-linux-types.patch"
16 19
17SRC_URI[md5sum] = "407d405ade410f7597d364ab5dc8c9f6" 20SRC_URI[md5sum] = "407d405ade410f7597d364ab5dc8c9f6"
18SRC_URI[sha256sum] = "0eac6d12388b3d9ed78684529c1b0d9346fa2abbe406c4d4a3eb5a023c98a484" 21SRC_URI[sha256sum] = "0eac6d12388b3d9ed78684529c1b0d9346fa2abbe406c4d4a3eb5a023c98a484"
@@ -21,3 +24,5 @@ do_install () {
21 oe_runmake "PREFIX=${D}" "SBINDIR=${D}${sbindir}" \ 24 oe_runmake "PREFIX=${D}" "SBINDIR=${D}${sbindir}" \
22 "MANDIR=${D}${mandir}/man8" install 25 "MANDIR=${D}${mandir}/man8" install
23} 26}
27
28BBCLASSEXTEND = "native"