diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-02 12:04:08 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-07 20:04:58 +0000 |
| commit | 19b7e950346fb1dde6505c45236eba6cd9b33b4b (patch) | |
| tree | 4e582be23e08321bd04c591be3f37926199d6005 /meta/recipes-devtools/dosfstools | |
| parent | 39f5a05152aa0c3503735e18dd3b4c066b284107 (diff) | |
| download | openembedded-core-19b7e950346fb1dde6505c45236eba6cd9b33b4b.tar.gz openembedded-core-19b7e950346fb1dde6505c45236eba6cd9b33b4b.tar.bz2 openembedded-core-19b7e950346fb1dde6505c45236eba6cd9b33b4b.zip | |
recipes: Move out stale GPLv2 versions to a seperate layeruninative-1.5
These are recipes where the upstream has moved to GPLv3 and these old
versions are the last ones under the GPLv2 license.
There are several reasons for making this move. There is a different
quality of service with these recipes in that they don't get security
fixes and upstream no longer care about them, in fact they're actively
hostile against people using old versions. The recipes tend to need a
different kind of maintenance to work with changes in the wider ecosystem
and there needs to be isolation between changes made in the v3 versions
and those in the v2 versions.
There are probably better ways to handle a "non-GPLv3" system but right
now having these in OE-Core makes them look like a first class citizen
when I believe they have potential for a variety of undesireable issues.
Moving them into a separate layer makes their different needs clearer, it
also makes it clear how many of these there are. Some are probably not
needed (e.g. mc), I also wonder whether some are useful (e.g. gmp)
since most things that use them are GPLv3 only already. Someone could
now more clearly see how to streamline the list of recipes here.
I'm proposing we mmove to this separate layer for 2.3 with its future
maintinership and testing to be determined in 2.4 and beyond.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/dosfstools')
10 files changed, 0 insertions, 1587 deletions
diff --git a/meta/recipes-devtools/dosfstools/dosfstools/0001-Include-fcntl.h-for-getting-loff_t-definition.patch b/meta/recipes-devtools/dosfstools/dosfstools/0001-Include-fcntl.h-for-getting-loff_t-definition.patch deleted file mode 100644 index 06f5b7a960..0000000000 --- a/meta/recipes-devtools/dosfstools/dosfstools/0001-Include-fcntl.h-for-getting-loff_t-definition.patch +++ /dev/null @@ -1,41 +0,0 @@ -From b7c42c6a9829bea911b22201edd7df2a9bec1a14 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 13 Apr 2015 17:52:34 -0700 -Subject: [PATCH] Include fcntl.h for getting loff_t definition - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - dosfsck/dosfsck.h | 2 ++ - dosfsck/lfn.c | 1 + - 2 files changed, 3 insertions(+) - -diff --git a/dosfsck/dosfsck.h b/dosfsck/dosfsck.h -index d9314b1..2076d5f 100644 ---- a/dosfsck/dosfsck.h -+++ b/dosfsck/dosfsck.h -@@ -50,6 +50,8 @@ - #define CT_LE_L(v) (v) - #endif /* __BIG_ENDIAN */ - -+#include <fcntl.h> -+ - #define VFAT_LN_ATTR (ATTR_RO | ATTR_HIDDEN | ATTR_SYS | ATTR_VOLUME) - - /* ++roman: Use own definition of boot sector structure -- the kernel headers' -diff --git a/dosfsck/lfn.c b/dosfsck/lfn.c -index 9b2cfc3..bb04fda 100644 ---- a/dosfsck/lfn.c -+++ b/dosfsck/lfn.c -@@ -7,6 +7,7 @@ - #include <string.h> - #include <limits.h> - #include <time.h> -+#include <fcntl.h> - - #include "common.h" - #include "io.h" --- -2.1.4 - diff --git a/meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch b/meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch deleted file mode 100644 index b46b2db0a3..0000000000 --- a/meta/recipes-devtools/dosfstools/dosfstools/alignment_hack.patch +++ /dev/null @@ -1,38 +0,0 @@ -The problem is that unsigned char[2] is -guranteed to be 8Bit aligned on arm -but unsigned short is/needs to be 16bit aligned -the union { unsigned short; unsigned char[2] } trick -didn't work so no we use the alpha hack. - -memcpy into an 16bit aligned - - -zecke - -Upstream-Status: Inappropriate [licensing] -We're tracking an old release of dosfstools due to licensing issues. - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- dosfstools/dosfsck/boot.c.orig 2003-05-15 19:32:23.000000000 +0200 -+++ dosfstools/dosfsck/boot.c 2003-06-13 17:44:25.000000000 +0200 -@@ -36,17 +36,15 @@ - { 0xff, "5.25\" 320k floppy 2s/40tr/8sec" }, - }; - --#if defined __alpha || defined __ia64__ || defined __s390x__ || defined __x86_64__ || defined __ppc64__ -+ - /* Unaligned fields must first be copied byte-wise */ - #define GET_UNALIGNED_W(f) \ - ({ \ - unsigned short __v; \ - memcpy( &__v, &f, sizeof(__v) ); \ -- CF_LE_W( *(unsigned short *)&f ); \ -+ CF_LE_W( *(unsigned short *)&__v ); \ - }) --#else --#define GET_UNALIGNED_W(f) CF_LE_W( *(unsigned short *)&f ) --#endif -+ - - - static char *get_media_descr( unsigned char media ) diff --git a/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-msdos_fs-types.patch b/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-msdos_fs-types.patch deleted file mode 100644 index 35abd1a2b1..0000000000 --- a/meta/recipes-devtools/dosfstools/dosfstools/dosfstools-msdos_fs-types.patch +++ /dev/null @@ -1,37 +0,0 @@ -Ensure the __s8 type is properly defined. - -Upstream-Status: Inappropriate [licensing] -We're tracking an old release of dosfstools due to licensing issues. - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- dosfstools-2.10/dosfsck/dosfsck.h.org 2006-02-21 08:36:14.000000000 -0700 -+++ dosfstools-2.10/dosfsck/dosfsck.h 2006-02-21 08:40:12.000000000 -0700 -@@ -22,6 +22,14 @@ - #undef __KERNEL__ - #endif - -+#ifndef __s8 -+#include <asm/types.h> -+#endif -+ -+#ifndef __ASM_STUB_BYTEORDER_H__ -+#include <asm/byteorder.h> -+#endif -+ - #include <linux/msdos_fs.h> - - /* 2.1 kernels use le16_to_cpu() type functions for CF_LE_W & Co., but don't ---- dosfstools-2.10/dosfsck/file.c.org 2006-02-21 08:37:36.000000000 -0700 -+++ dosfstools-2.10/dosfsck/file.c 2006-02-21 08:37:47.000000000 -0700 -@@ -23,6 +23,10 @@ - #undef __KERNEL__ - #endif - -+#ifndef __s8 -+#include <asm/types.h> -+#endif -+ - #include <linux/msdos_fs.h> - - #include "common.h" diff --git a/meta/recipes-devtools/dosfstools/dosfstools/fix_populated_dosfs_creation.patch b/meta/recipes-devtools/dosfstools/dosfstools/fix_populated_dosfs_creation.patch deleted file mode 100644 index 9d7f7321ac..0000000000 --- a/meta/recipes-devtools/dosfstools/dosfstools/fix_populated_dosfs_creation.patch +++ /dev/null @@ -1,489 +0,0 @@ -Upstream-Status: Inappropriate - -This patch fixes populated dosfs image creation with directory -structures. Earlier it was causing segfault; and only image -population with no subdirectories was working. - -Issues fixed: -1. (dir->count == dir->entries) check was only needed for root - directory entries. And this check is wrong for non-root - directories. -2. For each dir entry 2 dir->table entries were needed, one for - the file/dir and 2nd for long file name support. Earlier long - name support was added for filenames but the 2nd entry - allocation, initialization & counting was missed. -3. The memory clearing was missed at the code path after dir->table - memroy allocation. -4. Add entries for . & .. directories in all non-root directories. -5. The . directory points to the correct entry in fat now. -6. All directoriy entries' size was not zero as required for dosfsck, - Now all directory entries' size is zero. - -Enhancements: -1. Added support for long names for directory names. This is same - as the existing long name support for filenames. -2. Added error messages for previously silent memory allocation and - other errors. -3. -d options does not work correctly with fat32, so now throwing - an error for that. -4. Use predefined structures from kernel's msdos_fs.h file, rather - than defining again here. And accordingly change the names & use - of structure variables. - -Outstanding Issues: -1. The .. directory entry do not point to the parent of current - directory. This issue can be fixed by running dosfsck -a after - image creation. -2. For files the filesize is correct, but the clusters size is more - than it needs to be, this also can be fixed by running dosfsck -a - after image creation. - -Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> -2011/12/13 - - -Index: dosfstools-2.11/mkdosfs/mkdosfs.c -=================================================================== ---- dosfstools-2.11.orig/mkdosfs/mkdosfs.c -+++ dosfstools-2.11/mkdosfs/mkdosfs.c -@@ -21,7 +21,17 @@ - June 2004 - Jordan Crouse (info.linux@amd.com) - Added -d <directory> support to populate the image - Copyright (C) 2004, Advanced Micro Devices, All Rights Reserved -- -+ -+ 2011-12-13: Nitin A Kamble <nitin.a.kamble@intel.com> -+ Enhanced the -d <directory> support for population of image while -+ creation. Earlier subdirectores support was broken, only files in -+ the rootdir were supported. Now directory hirarchy is supported. -+ Also added long filename support to directory names. -+ The -d <directory> option (image population while creation) -+ is broken with fat32. -+ Copyright (C) 2011, Intel Corporation, All Rights Reserved -+ -+ - Fixes/additions May 1998 by Roman Hodek - <Roman.Hodek@informatik.uni-erlangen.de>: - - Atari format support -@@ -86,23 +96,23 @@ - # undef __KERNEL__ - #endif - --#if __BYTE_ORDER == __BIG_ENDIAN -- -+#ifndef __ASM_STUB_BYTEORDER_H__ - #include <asm/byteorder.h> --#ifdef __le16_to_cpu --/* ++roman: 2.1 kernel headers define these function, they're probably more -- * efficient then coding the swaps machine-independently. */ --#define CF_LE_W __le16_to_cpu --#define CF_LE_L __le32_to_cpu --#define CT_LE_W __cpu_to_le16 --#define CT_LE_L __cpu_to_le32 --#else --#define CF_LE_W(v) ((((v) & 0xff) << 8) | (((v) >> 8) & 0xff)) --#define CF_LE_L(v) (((unsigned)(v)>>24) | (((unsigned)(v)>>8)&0xff00) | \ -- (((unsigned)(v)<<8)&0xff0000) | ((unsigned)(v)<<24)) -+#endif -+ -+#include <linux/msdos_fs.h> -+ -+#undef CF_LE_W -+#undef CF_LE_L -+#undef CT_LE_W -+#undef CT_LE_L -+ -+#if __BYTE_ORDER == __BIG_ENDIAN -+#include <byteswap.h> -+#define CF_LE_W(v) bswap_16(v) -+#define CF_LE_L(v) bswap_32(v) - #define CT_LE_W(v) CF_LE_W(v) - #define CT_LE_L(v) CF_LE_L(v) --#endif /* defined(__le16_to_cpu) */ - - #else - -@@ -253,33 +263,6 @@ struct fat32_fsinfo { - __u32 reserved2[4]; - }; - --/* This stores up to 13 chars of the name */ -- --struct msdos_dir_slot { -- __u8 id; /* sequence number for slot */ -- __u8 name0_4[10]; /* first 5 characters in name */ -- __u8 attr; /* attribute byte */ -- __u8 reserved; /* always 0 */ -- __u8 alias_checksum; /* checksum for 8.3 alias */ -- __u8 name5_10[12]; /* 6 more characters in name */ -- __u16 start; /* starting cluster number, 0 in long slots */ -- __u8 name11_12[4]; /* last 2 characters in name */ --}; -- --struct msdos_dir_entry -- { -- char name[8], ext[3]; /* name and extension */ -- __u8 attr; /* attribute bits */ -- __u8 lcase; /* Case for base and extension */ -- __u8 ctime_ms; /* Creation time, milliseconds */ -- __u16 ctime; /* Creation time */ -- __u16 cdate; /* Creation date */ -- __u16 adate; /* Last access date */ -- __u16 starthi; /* high 16 bits of first cl. (FAT32) */ -- __u16 time, date, start; /* time, date and first cluster */ -- __u32 size; /* file size (in bytes) */ -- } __attribute__ ((packed)); -- - /* The "boot code" we put into the filesystem... it writes a message and - tells the user to try again */ - -@@ -356,7 +339,6 @@ static struct msdos_dir_entry *root_dir; - static int size_root_dir; /* Size of the root directory in bytes */ - static int sectors_per_cluster = 0; /* Number of sectors per disk cluster */ - static int root_dir_entries = 0; /* Number of root directory entries */ --static int root_dir_num_entries = 0; - static int last_cluster_written = 0; - - static char *blank_sector; /* Blank sector - all zeros */ -@@ -1315,7 +1297,7 @@ setup_tables (void) - de->date = CT_LE_W((unsigned short)(ctime->tm_mday + - ((ctime->tm_mon+1) << 5) + - ((ctime->tm_year-80) << 9))); -- de->ctime_ms = 0; -+ de->ctime_cs = 0; - de->ctime = de->time; - de->cdate = de->date; - de->adate = de->date; -@@ -1451,16 +1433,23 @@ write_tables (void) - - /* Add a file to the specified directory entry, and also write it into the image */ - --static void copy_filename(char *filename, char *base, char *ext) { -+static void copy_filename(char *filename, char *dos_name) { - - char *ch = filename; - int i, len; - -- memset(base, 0x20, 8); -- memset(ext, 0x20, 3); -+ if (!strcmp(filename, ".")) { -+ strncpy(dos_name, MSDOS_DOT, MSDOS_NAME); -+ return; -+ } -+ if (!strcmp(filename, "..")) { -+ strncpy(dos_name, MSDOS_DOTDOT, MSDOS_NAME); -+ return; -+ } -+ memset(dos_name, 0x20, MSDOS_NAME); - - for(len = 0 ; *ch && *ch != '.'; ch++) { -- base[len++] = toupper(*ch); -+ dos_name[len++] = toupper(*ch); - if (len == 8) break; - } - -@@ -1468,7 +1457,7 @@ static void copy_filename(char *filename - if (*ch) ch++; - - for(len = 0 ; *ch; ch++) { -- ext[len++] = toupper(*ch); -+ dos_name[8 + len++] = toupper(*ch); - if (len == 3) break; - } - } -@@ -1551,7 +1540,7 @@ static int add_file(char *filename, stru - int start; - int usedsec, totalsec; - -- char name83[8], ext83[3]; -+ char dos_name[MSDOS_NAME+1]; - - struct msdos_dir_slot *slot; - int i; -@@ -1562,23 +1551,22 @@ static int add_file(char *filename, stru - if (dir->root) { - if (dir->count == dir->entries) { - printf("Error - too many directory entries\n"); -+ return; - } - } - else { -- if (dir->count == dir->entries) { -- if (!dir->table) -- dir->table = -- (struct msdos_dir_entry *) malloc(sizeof(struct msdos_dir_entry)); -- else { -- dir->table = -- (struct msdos_dir_entry *) realloc(dir->table, (dir->entries + 1) * -- sizeof(struct msdos_dir_entry)); -- -- memset(&dir->table[dir->entries], 0, sizeof(struct msdos_dir_entry)); -- } -- -- dir->entries++; -- } -+ /* 2 entries, one extra for long filename */ -+ if (!dir->table) -+ dir->table = -+ (struct msdos_dir_entry *) malloc(2 * sizeof(struct msdos_dir_entry)); -+ else -+ dir->table = -+ (struct msdos_dir_entry *) realloc(dir->table, 2 * (dir->entries + 1) * -+ sizeof(struct msdos_dir_entry)); -+ if (!dir->table) -+ printf("Error - realloc failed\n"); -+ memset(&dir->table[dir->entries], 0, 2 * sizeof(struct msdos_dir_entry)); -+ dir->entries += 2; - } - - infile = open(filename, O_RDONLY, 0); -@@ -1611,13 +1599,13 @@ static int add_file(char *filename, stru - return -1; - } - -- printf("ADD %s\n", filename); -+ printf("ADD FILE %s\n", filename); - - /* Grab the basename of the file */ - base = basename(filename); - -- /* Extract out the 8.3 name */ -- copy_filename(base, name83, ext83); -+ /* convert for dos fat structure */ -+ copy_filename(base, dos_name); - - /* Make an extended name slot */ - -@@ -1629,12 +1617,9 @@ static int add_file(char *filename, stru - - slot->alias_checksum = 0; - -- for(i = 0; i < 8; i++) -- slot->alias_checksum = (((slot->alias_checksum&1)<<7)|((slot->alias_checksum&0xfe)>>1)) + name83[i]; -+ for(i = 0; i < MSDOS_NAME; i++) -+ slot->alias_checksum = (((slot->alias_checksum&1)<<7)|((slot->alias_checksum&0xfe)>>1)) + dos_name[i]; - -- for(i = 0; i < 3; i++) -- slot->alias_checksum = (((slot->alias_checksum&1)<<7)|((slot->alias_checksum&0xfe)>>1)) + ext83[i]; -- - p = base; - - copy_name(slot->name0_4, 10, &p); -@@ -1645,8 +1630,7 @@ static int add_file(char *filename, stru - /* Get the entry from the root filesytem */ - entry = &dir->table[dir->count++]; - -- strncpy(entry->name, name83, 8); -- strncpy(entry->ext, ext83, 3); -+ strncpy(entry->name, dos_name, MSDOS_NAME); - - - /* If the user has it read only, then add read only to the incoming -@@ -1665,7 +1649,7 @@ static int add_file(char *filename, stru - ((ctime->tm_mon+1) << 5) + - ((ctime->tm_year-80) << 9))); - -- entry->ctime_ms = 0; -+ entry->ctime_cs = 0; - entry->ctime = entry->time; - entry->cdate = entry->date; - entry->adate = entry->date; -@@ -1711,6 +1695,7 @@ static int add_file(char *filename, stru - - exit_add: - if (infile) close(infile); -+ return 0; - } - - /* Add a new directory to the specified directory entry, and in turn populate -@@ -1727,10 +1712,18 @@ static void add_directory(char *filename - struct dirent *dentry = 0; - int remain; - char *data; -+ char *base; -+ char dos_name[MSDOS_NAME+1]; -+ struct msdos_dir_slot *slot; -+ int i; -+ char *p; - - /* If the directory doesn't exist */ -- if (!rddir) return; -- -+ if (!rddir) { -+ printf("Error - dir does not exist: %s\n", filename); -+ return; -+ } -+ - if (dir->root) { - if (dir->count == dir->entries) { - printf("Error - too many directory entries\n"); -@@ -1738,28 +1731,58 @@ static void add_directory(char *filename - } - } - else { -- if (dir->count == dir->entries) { -- if (!dir->table) -- dir->table = (struct msdos_dir_entry *) malloc(sizeof(struct msdos_dir_entry)); -- else { -- dir->table = (struct msdos_dir_entry *) realloc(dir->table, (dir->entries + 1) * -- sizeof(struct msdos_dir_entry)); -- -- /* Zero it out to avoid issues */ -- memset(&dir->table[dir->entries], 0, sizeof(struct msdos_dir_entry)); -- } -- dir->entries++; -+ /* 2 entries, one extra for long name of the directory */ -+ if (!dir->table) -+ dir->table = (struct msdos_dir_entry *) malloc(2 * sizeof(struct msdos_dir_entry)); -+ else -+ dir->table = (struct msdos_dir_entry *) realloc(dir->table, 2 * (dir->entries + 1) * -+ sizeof(struct msdos_dir_entry)); -+ if (!dir->table) { -+ printf("Error - memory allocation failed\n"); -+ goto exit_add_dir; - } -+ /* Zero it out to avoid issues */ -+ memset(&dir->table[dir->entries], 0, 2 * sizeof(struct msdos_dir_entry)); -+ dir->entries += 2; - } - -+ printf("ADD DIR %s\n", filename); - /* Now, create a new directory entry for the new directory */ - newdir = (struct dir_entry *) calloc(1, sizeof(struct dir_entry)); -- if (!newdir) goto exit_add_dir; -+ if (!newdir) { -+ printf("Error - calloc failed\n"); -+ goto exit_add_dir; -+ } -+ -+ /* Grab the basename of the file */ -+ base = basename(filename); -+ -+ /* convert for dos structure */ -+ copy_filename(base, dos_name); -+ -+ /* Make an extended name slot */ -+ slot = (struct msdos_dir_slot *) &dir->table[dir->count++]; -+ slot->id = 'A'; -+ slot->attr = 0x0F; -+ slot->reserved = 0; -+ slot->start = 0; -+ -+ slot->alias_checksum = 0; - -+ for (i = 0; i < MSDOS_NAME; i++) -+ slot->alias_checksum = (((slot->alias_checksum&1)<<7)|((slot->alias_checksum&0xfe)>>1)) + dos_name[i]; -+ -+ p = base; -+ -+ copy_name(slot->name0_4, 10, &p); -+ copy_name(slot->name5_10, 12, &p); -+ copy_name(slot->name11_12, 4, &p); -+ -+ /* Get the entry from the root filesytem */ - entry = &dir->table[dir->count++]; - -- strncpy(entry->name, basename(filename), sizeof(entry->name)); -- -+ strncpy(entry->name, dos_name, MSDOS_NAME); -+ - entry->attr = ATTR_DIR; - ctime = localtime(&create_time); - -@@ -1770,25 +1793,32 @@ static void add_directory(char *filename - ((ctime->tm_mon+1) << 5) + - ((ctime->tm_year-80) << 9))); - -- entry->ctime_ms = 0; -+ entry->ctime_cs = 0; - entry->ctime = entry->time; - entry->cdate = entry->date; - entry->adate = entry->date; - - /* Now, read the directory */ - -- while((dentry = readdir(rddir))) { -+ -+ while((base[0] != '.') && (dentry = readdir(rddir))) { - struct stat st; - char *buffer; -- -- if (!strcmp(dentry->d_name, ".") || !strcmp(dentry->d_name, "..")) -- continue; - -- /* DOS wouldn't like a typical unix . (dot) file, so we skip those too */ -- if (dentry->d_name[0] == '.') continue; -+ if (dentry->d_name[0] == '.') { -+ /* dos also has . & .. directory entries */ -+ if (! ((!strcmp(dentry->d_name, ".")) || (!strcmp(dentry->d_name, "..")))) { -+ /* ignore other .* files */ -+ printf("Error - File/Dir name is not dos compatible, ignored: %s\n", dentry->d_name); -+ continue; -+ } -+ } - - buffer = malloc(strlen(filename) + strlen(dentry->d_name) + 3); -- if (!buffer) continue; -+ if (!buffer) { -+ printf("Error - malloc failed\n"); -+ goto exit_add_dir; -+ } - - sprintf(buffer, "%s/%s", filename, dentry->d_name); - if (!stat(buffer, &st)) { -@@ -1806,11 +1836,23 @@ static void add_directory(char *filename - /* Now that the entire directory has been written, go ahead and write the directory - entry as well */ - -+ entry->size = 0; /* a directory has zero size */ -+ -+ if (base[0] == '.') { /* . & .. point to parent's cluster */ -+ goto exit_add_dir; -+ } -+ - entry->start = CT_LE_W(last_cluster_written); - entry->starthi = CT_LE_W((last_cluster_written & 0xFFFF0000) >> 16); -- entry->size = newdir->count * sizeof(struct msdos_dir_entry); -+ -+/* . dir start points to parent */ -+ newdir->table[1].start = entry->start; -+/* .. dir points to parent of parent*/ -+/* .. dir start is not set yet, would need more changes to the code, -+ * but dosfsck can fix these .. entry start pointers correctly */ -+ -+ remain = newdir->count * sizeof(struct msdos_dir_entry); - -- remain = entry->size; - data = (char *) newdir->table; - - while(remain) { -@@ -1858,6 +1900,7 @@ static void add_root_directory(char *dir - - if (!newdir) { - closedir(dir); -+ printf("Error - calloc failed!\n"); - return; - } - -@@ -1877,7 +1920,10 @@ static void add_root_directory(char *dir - if (entry->d_name[0] == '.') continue; - - buffer = malloc(strlen(dirname) + strlen(entry->d_name) + 3); -- if (!buffer) continue; -+ if (!buffer) { -+ printf("Error - malloc failed!\n"); -+ continue; -+ } - - sprintf(buffer, "%s/%s", dirname, entry->d_name); - if (!stat(buffer, &st)) { -@@ -2245,6 +2291,9 @@ main (int argc, char **argv) - if (check && listfile) /* Auto and specified bad block handling are mutually */ - die ("-c and -l are incompatible"); /* exclusive of each other! */ - -+ if (dirname && (size_fat == 32)) -+ die ("-d is incompatible with FAT32"); -+ - if (!create) { - check_mount (device_name); /* Is the device already mounted? */ - dev = open (device_name, O_RDWR); /* Is it a suitable device to build the FS on? */ diff --git a/meta/recipes-devtools/dosfstools/dosfstools/include-linux-types.patch b/meta/recipes-devtools/dosfstools/dosfstools/include-linux-types.patch deleted file mode 100644 index ab5c8cf8c3..0000000000 --- a/meta/recipes-devtools/dosfstools/dosfstools/include-linux-types.patch +++ /dev/null @@ -1,22 +0,0 @@ -mkdsofs is using types of the style __u8, which it gets with some -versions of libc headers via linux/hdreg.h including asm/types.h. -Newer version of fedora (at least) have a hdreg.h whichdoes not -include asm/types.h. To work around this patch mkdosfs.c to explicity -include linux/types.h which will in turn pull in asm/types.h which -defines these variables. - -Upstream-Status: Inappropriate [licensing] -We're tracking an old release of dosfstools due to licensing issues. - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - ---- dosfstools-2.10/mkdosfs/mkdosfs.c~ 2006-07-12 18:46:21.000000000 +1000 -+++ dosfstools-2.10/mkdosfs/mkdosfs.c 2006-07-12 18:46:21.000000000 +1000 -@@ -60,6 +60,7 @@ - #include "../version.h" - - #include <fcntl.h> -+#include <linux/types.h> - #include <linux/hdreg.h> - #include <linux/fs.h> - #include <linux/fd.h> diff --git a/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-bootcode.patch b/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-bootcode.patch deleted file mode 100644 index ae21bee78e..0000000000 --- a/meta/recipes-devtools/dosfstools/dosfstools/mkdosfs-bootcode.patch +++ /dev/null @@ -1,241 +0,0 @@ -Add option to read in bootcode from a file. - -Upstream-Status: Inappropriate [licensing] -We're tracking an old release of dosfstools due to licensing issues. - -Signed-off-by: Scott Garman <scott.a.garman@intel.com> - -Index: dosfstools-2.11/mkdosfs/ChangeLog -=================================================================== ---- dosfstools-2.11.orig/mkdosfs/ChangeLog 1997-06-18 10:09:38.000000000 +0000 -+++ dosfstools-2.11/mkdosfs/ChangeLog 2011-12-06 12:14:23.634011558 +0000 -@@ -1,3 +1,14 @@ -+19th June 2003 Sam Bingner (sam@bingner.com) -+ -+ Added option to read in bootcode from a file so that if you have -+ for example Windows 2000 boot code, you can have it write that -+ as the bootcode. This is a dump of the behinning of a partition -+ generally 512 bytes, but can be up to reserved sectors*512 bytes. -+ Also writes 0x80 as the BIOS drive number if we are formatting a -+ hard drive, and sets the number of hidden sectors to be the -+ number of sectors in one track. These were required so that DOS -+ could boot using the bootcode. -+ - 28th January 1995 H. Peter Anvin (hpa@yggdrasil.com) - - Better algorithm to select cluster sizes on large filesystems. -Index: dosfstools-2.11/mkdosfs/mkdosfs.8 -=================================================================== ---- dosfstools-2.11.orig/mkdosfs/mkdosfs.8 2004-02-25 19:36:07.000000000 +0000 -+++ dosfstools-2.11/mkdosfs/mkdosfs.8 2011-12-06 12:19:54.777888434 +0000 -@@ -44,6 +44,10 @@ - .I message-file - ] - [ -+.B \-B -+.I bootcode-file -+] -+[ - .B \-n - .I volume-name - ] -@@ -165,6 +169,18 @@ - carriage return-line feed combinations, and tabs have been expanded. - If the filename is a hyphen (-), the text is taken from standard input. - .TP -+.BI \-B " bootcode-file" -+Uses boot machine code from file "file". On any thing other than FAT32, -+this only writes the first 3 bytes, and 480 bytes from offset 3Eh. On -+FAT32, this writes the first 3 bytes, 420 bytes from offset 5Ah to both -+primary and backup boot sectors. Also writes all other reserved sectors -+excluding the sectors following boot sectors (usually sector 2 and 7). -+Does not require that the input file be as large as reserved_sectors*512. -+To make a FAT32 partition bootable, you will need at least the first -+13 sectors (6656 bytes). You can also specify a partition as the argument -+to clone the boot code from that partition. -+i.e mkdosfs -B /dev/sda1 /dev/sda1 -+.TP - .BI \-n " volume-name" - Sets the volume name (label) of the filesystem. The volume name can - be up to 11 characters long. The default is no label. -@@ -198,8 +214,9 @@ - simply will not support it ;) - .SH AUTHOR - Dave Hudson - <dave@humbug.demon.co.uk>; modified by Peter Anvin --<hpa@yggdrasil.com>. Fixes and additions by Roman Hodek --<roman@hodek.net> for Debian/GNU Linux. -+<hpa@yggdrasil.com> and Sam Bingner <sam@bingner.com>. Fixes and -+additions by Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de> -+for Debian/GNU Linux. - .SH ACKNOWLEDGEMENTS - .B mkdosfs - is based on code from -Index: dosfstools-2.11/mkdosfs/mkdosfs.c -=================================================================== ---- dosfstools-2.11.orig/mkdosfs/mkdosfs.c 2005-03-12 16:12:16.000000000 +0000 -+++ dosfstools-2.11/mkdosfs/mkdosfs.c 2011-12-06 12:27:55.121886076 +0000 -@@ -24,6 +24,12 @@ - - New options -A, -S, -C - - Support for filesystems > 2GB - - FAT32 support -+ -+ Fixes/additions June 2003 by Sam Bingner -+ <sam@bingner.com>: -+ - Add -B option to read in bootcode from a file -+ - Write BIOS drive number so that FS can properly boot -+ - Set number of hidden sectors before boot code to be one track - - Copying: Copyright 1993, 1994 David Hudson (dave@humbug.demon.co.uk) - -@@ -153,6 +159,8 @@ - #define FAT_BAD 0x0ffffff7 - - #define MSDOS_EXT_SIGN 0x29 /* extended boot sector signature */ -+#define HD_DRIVE_NUMBER 0x80 /* Boot off first hard drive */ -+#define FD_DRIVE_NUMBER 0x00 /* Boot off first floppy drive */ - #define MSDOS_FAT12_SIGN "FAT12 " /* FAT12 filesystem signature */ - #define MSDOS_FAT16_SIGN "FAT16 " /* FAT16 filesystem signature */ - #define MSDOS_FAT32_SIGN "FAT32 " /* FAT32 filesystem signature */ -@@ -175,6 +183,8 @@ - #define BOOTCODE_SIZE 448 - #define BOOTCODE_FAT32_SIZE 420 - -+#define MAX_RESERVED 0xFFFF -+ - /* __attribute__ ((packed)) is used on all structures to make gcc ignore any - * alignments */ - -@@ -202,7 +212,7 @@ - __u16 fat_length; /* sectors/FAT */ - __u16 secs_track; /* sectors per track */ - __u16 heads; /* number of heads */ -- __u32 hidden; /* hidden sectors (unused) */ -+ __u32 hidden; /* hidden sectors (one track) */ - __u32 total_sect; /* number of sectors (if sectors == 0) */ - union { - struct { -@@ -285,6 +295,8 @@ - - /* Global variables - the root of all evil :-) - see these and weep! */ - -+static char *template_boot_code; /* Variable to store a full template boot sector in */ -+static int use_template = 0; - static char *program_name = "mkdosfs"; /* Name of the program */ - static char *device_name = NULL; /* Name of the device on which to create the filesystem */ - static int atari_format = 0; /* Use Atari variation of MS-DOS FS format */ -@@ -837,6 +849,12 @@ - vi->volume_id[2] = (unsigned char) ((volume_id & 0x00ff0000) >> 16); - vi->volume_id[3] = (unsigned char) (volume_id >> 24); - } -+ if (bs.media == 0xf8) { -+ vi->drive_number = HD_DRIVE_NUMBER; /* Set bios drive number to 80h */ -+ } -+ else { -+ vi->drive_number = FD_DRIVE_NUMBER; /* Set bios drive number to 00h */ -+ } - - if (!atari_format) { - memcpy(vi->volume_label, volume_name, 11); -@@ -1362,6 +1380,32 @@ - * dir area on FAT12/16, and the first cluster on FAT32. */ - writebuf( (char *) root_dir, size_root_dir, "root directory" ); - -+ if (use_template == 1) { -+ /* dupe template into reserved sectors */ -+ seekto( 0, "Start of partition" ); -+ if (size_fat == 32) { -+ writebuf( template_boot_code, 3, "backup jmpBoot" ); -+ seekto( 0x5a, "sector 1 boot area" ); -+ writebuf( template_boot_code+0x5a, 420, "sector 1 boot area" ); -+ seekto( 512*2, "third sector" ); -+ if (backup_boot != 0) { -+ writebuf( template_boot_code+512*2, backup_boot*sector_size - 512*2, "data to backup boot" ); -+ seekto( backup_boot*sector_size, "backup boot sector" ); -+ writebuf( template_boot_code, 3, "backup jmpBoot" ); -+ seekto( backup_boot*sector_size+0x5a, "backup boot sector boot area" ); -+ writebuf( template_boot_code+0x5a, 420, "backup boot sector boot area" ); -+ seekto( (backup_boot+2)*sector_size, "sector following backup code" ); -+ writebuf( template_boot_code+(backup_boot+2)*sector_size, (reserved_sectors-backup_boot-2)*512, "remaining data" ); -+ } else { -+ writebuf( template_boot_code+512*2, (reserved_sectors-2)*512, "remaining data" ); -+ } -+ } else { -+ writebuf( template_boot_code, 3, "jmpBoot" ); -+ seekto( 0x3e, "sector 1 boot area" ); -+ writebuf( template_boot_code+0x3e, 448, "boot code" ); -+ } -+ } -+ - if (blank_sector) free( blank_sector ); - if (info_sector) free( info_sector ); - free (root_dir); /* Free up the root directory space from setup_tables */ -@@ -1376,7 +1420,7 @@ - { - fatal_error("\ - Usage: mkdosfs [-A] [-c] [-C] [-v] [-I] [-l bad-block-file] [-b backup-boot-sector]\n\ -- [-m boot-msg-file] [-n volume-name] [-i volume-id]\n\ -+ [-m boot-msg-file] [-n volume-name] [-i volume-id] [-B bootcode]\n\ - [-s sectors-per-cluster] [-S logical-sector-size] [-f number-of-FATs]\n\ - [-h hidden-sectors] [-F fat-size] [-r root-dir-entries] [-R reserved-sectors]\n\ |
