diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /usr | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'usr')
-rw-r--r-- | usr/Kconfig | 34 | ||||
-rw-r--r-- | usr/Makefile | 11 | ||||
-rw-r--r-- | usr/gen_init_cpio.c | 73 | ||||
-rw-r--r-- | usr/initramfs_data.S | 22 | ||||
-rw-r--r-- | usr/initramfs_data.bz2.S | 29 | ||||
-rw-r--r-- | usr/initramfs_data.gz.S | 29 | ||||
-rw-r--r-- | usr/initramfs_data.lzma.S | 29 | ||||
-rw-r--r-- | usr/initramfs_data.lzo.S | 29 |
8 files changed, 103 insertions, 153 deletions
diff --git a/usr/Kconfig b/usr/Kconfig index e2721f5a3504..65b845bd4e3e 100644 --- a/usr/Kconfig +++ b/usr/Kconfig | |||
@@ -46,7 +46,7 @@ config INITRAMFS_ROOT_GID | |||
46 | If you are not sure, leave it set to "0". | 46 | If you are not sure, leave it set to "0". |
47 | 47 | ||
48 | config RD_GZIP | 48 | config RD_GZIP |
49 | bool "Support initial ramdisks compressed using gzip" if EMBEDDED | 49 | bool "Support initial ramdisks compressed using gzip" if EXPERT |
50 | default y | 50 | default y |
51 | depends on BLK_DEV_INITRD | 51 | depends on BLK_DEV_INITRD |
52 | select DECOMPRESS_GZIP | 52 | select DECOMPRESS_GZIP |
@@ -55,8 +55,8 @@ config RD_GZIP | |||
55 | If unsure, say Y. | 55 | If unsure, say Y. |
56 | 56 | ||
57 | config RD_BZIP2 | 57 | config RD_BZIP2 |
58 | bool "Support initial ramdisks compressed using bzip2" if EMBEDDED | 58 | bool "Support initial ramdisks compressed using bzip2" if EXPERT |
59 | default !EMBEDDED | 59 | default !EXPERT |
60 | depends on BLK_DEV_INITRD | 60 | depends on BLK_DEV_INITRD |
61 | select DECOMPRESS_BZIP2 | 61 | select DECOMPRESS_BZIP2 |
62 | help | 62 | help |
@@ -64,17 +64,26 @@ config RD_BZIP2 | |||
64 | If unsure, say N. | 64 | If unsure, say N. |
65 | 65 | ||
66 | config RD_LZMA | 66 | config RD_LZMA |
67 | bool "Support initial ramdisks compressed using LZMA" if EMBEDDED | 67 | bool "Support initial ramdisks compressed using LZMA" if EXPERT |
68 | default !EMBEDDED | 68 | default !EXPERT |
69 | depends on BLK_DEV_INITRD | 69 | depends on BLK_DEV_INITRD |
70 | select DECOMPRESS_LZMA | 70 | select DECOMPRESS_LZMA |
71 | help | 71 | help |
72 | Support loading of a LZMA encoded initial ramdisk or cpio buffer | 72 | Support loading of a LZMA encoded initial ramdisk or cpio buffer |
73 | If unsure, say N. | 73 | If unsure, say N. |
74 | 74 | ||
75 | config RD_XZ | ||
76 | bool "Support initial ramdisks compressed using XZ" if EXPERT | ||
77 | default !EXPERT | ||
78 | depends on BLK_DEV_INITRD | ||
79 | select DECOMPRESS_XZ | ||
80 | help | ||
81 | Support loading of a XZ encoded initial ramdisk or cpio buffer. | ||
82 | If unsure, say N. | ||
83 | |||
75 | config RD_LZO | 84 | config RD_LZO |
76 | bool "Support initial ramdisks compressed using LZO" if EMBEDDED | 85 | bool "Support initial ramdisks compressed using LZO" if EXPERT |
77 | default !EMBEDDED | 86 | default !EXPERT |
78 | depends on BLK_DEV_INITRD | 87 | depends on BLK_DEV_INITRD |
79 | select DECOMPRESS_LZO | 88 | select DECOMPRESS_LZO |
80 | help | 89 | help |
@@ -139,12 +148,21 @@ config INITRAMFS_COMPRESSION_LZMA | |||
139 | three. Compression is slowest. The initramfs size is about 33% | 148 | three. Compression is slowest. The initramfs size is about 33% |
140 | smaller with LZMA in comparison to gzip. | 149 | smaller with LZMA in comparison to gzip. |
141 | 150 | ||
151 | config INITRAMFS_COMPRESSION_XZ | ||
152 | bool "XZ" | ||
153 | depends on RD_XZ | ||
154 | help | ||
155 | XZ uses the LZMA2 algorithm. The initramfs size is about 30% | ||
156 | smaller with XZ in comparison to gzip. Decompression speed | ||
157 | is better than that of bzip2 but worse than gzip and LZO. | ||
158 | Compression is slow. | ||
159 | |||
142 | config INITRAMFS_COMPRESSION_LZO | 160 | config INITRAMFS_COMPRESSION_LZO |
143 | bool "LZO" | 161 | bool "LZO" |
144 | depends on RD_LZO | 162 | depends on RD_LZO |
145 | help | 163 | help |
146 | Its compression ratio is the poorest among the four. The kernel | 164 | Its compression ratio is the poorest among the four. The kernel |
147 | size is about about 10% bigger than gzip; however its speed | 165 | size is about 10% bigger than gzip; however its speed |
148 | (both compression and decompression) is the fastest. | 166 | (both compression and decompression) is the fastest. |
149 | 167 | ||
150 | endchoice | 168 | endchoice |
diff --git a/usr/Makefile b/usr/Makefile index 6b4b6da0b67d..029ffe6cd0d8 100644 --- a/usr/Makefile +++ b/usr/Makefile | |||
@@ -15,16 +15,21 @@ suffix_$(CONFIG_INITRAMFS_COMPRESSION_BZIP2) = .bz2 | |||
15 | # Lzma | 15 | # Lzma |
16 | suffix_$(CONFIG_INITRAMFS_COMPRESSION_LZMA) = .lzma | 16 | suffix_$(CONFIG_INITRAMFS_COMPRESSION_LZMA) = .lzma |
17 | 17 | ||
18 | # XZ | ||
19 | suffix_$(CONFIG_INITRAMFS_COMPRESSION_XZ) = .xz | ||
20 | |||
18 | # Lzo | 21 | # Lzo |
19 | suffix_$(CONFIG_INITRAMFS_COMPRESSION_LZO) = .lzo | 22 | suffix_$(CONFIG_INITRAMFS_COMPRESSION_LZO) = .lzo |
20 | 23 | ||
24 | AFLAGS_initramfs_data.o += -DINITRAMFS_IMAGE="usr/initramfs_data.cpio$(suffix_y)" | ||
25 | |||
21 | # Generate builtin.o based on initramfs_data.o | 26 | # Generate builtin.o based on initramfs_data.o |
22 | obj-$(CONFIG_BLK_DEV_INITRD) := initramfs_data$(suffix_y).o | 27 | obj-$(CONFIG_BLK_DEV_INITRD) := initramfs_data.o |
23 | 28 | ||
24 | # initramfs_data.o contains the compressed initramfs_data.cpio image. | 29 | # initramfs_data.o contains the compressed initramfs_data.cpio image. |
25 | # The image is included using .incbin, a dependency which is not | 30 | # The image is included using .incbin, a dependency which is not |
26 | # tracked automatically. | 31 | # tracked automatically. |
27 | $(obj)/initramfs_data$(suffix_y).o: $(obj)/initramfs_data.cpio$(suffix_y) FORCE | 32 | $(obj)/initramfs_data.o: $(obj)/initramfs_data.cpio$(suffix_y) FORCE |
28 | 33 | ||
29 | ##### | 34 | ##### |
30 | # Generate the initramfs cpio archive | 35 | # Generate the initramfs cpio archive |
@@ -48,7 +53,7 @@ endif | |||
48 | quiet_cmd_initfs = GEN $@ | 53 | quiet_cmd_initfs = GEN $@ |
49 | cmd_initfs = $(initramfs) -o $@ $(ramfs-args) $(ramfs-input) | 54 | cmd_initfs = $(initramfs) -o $@ $(ramfs-args) $(ramfs-input) |
50 | 55 | ||
51 | targets := initramfs_data.cpio.gz initramfs_data.cpio.bz2 initramfs_data.cpio.lzma initramfs_data.cpio.lzo initramfs_data.cpio | 56 | targets := initramfs_data.cpio.gz initramfs_data.cpio.bz2 initramfs_data.cpio.lzma initramfs_data.cpio.xz initramfs_data.cpio.lzo initramfs_data.cpio |
52 | # do not try to update files included in initramfs | 57 | # do not try to update files included in initramfs |
53 | $(deps_initramfs): ; | 58 | $(deps_initramfs): ; |
54 | 59 | ||
diff --git a/usr/gen_init_cpio.c b/usr/gen_init_cpio.c index b2b3c2d1cf8b..af0f22fb1ef7 100644 --- a/usr/gen_init_cpio.c +++ b/usr/gen_init_cpio.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | static unsigned int offset; | 23 | static unsigned int offset; |
24 | static unsigned int ino = 721; | 24 | static unsigned int ino = 721; |
25 | static time_t default_mtime; | ||
25 | 26 | ||
26 | struct file_handler { | 27 | struct file_handler { |
27 | const char *type; | 28 | const char *type; |
@@ -102,8 +103,9 @@ static int cpio_mkslink(const char *name, const char *target, | |||
102 | unsigned int mode, uid_t uid, gid_t gid) | 103 | unsigned int mode, uid_t uid, gid_t gid) |
103 | { | 104 | { |
104 | char s[256]; | 105 | char s[256]; |
105 | time_t mtime = time(NULL); | ||
106 | 106 | ||
107 | if (name[0] == '/') | ||
108 | name++; | ||
107 | sprintf(s,"%s%08X%08X%08lX%08lX%08X%08lX" | 109 | sprintf(s,"%s%08X%08X%08lX%08lX%08X%08lX" |
108 | "%08X%08X%08X%08X%08X%08X%08X", | 110 | "%08X%08X%08X%08X%08X%08X%08X", |
109 | "070701", /* magic */ | 111 | "070701", /* magic */ |
@@ -112,7 +114,7 @@ static int cpio_mkslink(const char *name, const char *target, | |||
112 | (long) uid, /* uid */ | 114 | (long) uid, /* uid */ |
113 | (long) gid, /* gid */ | 115 | (long) gid, /* gid */ |
114 | 1, /* nlink */ | 116 | 1, /* nlink */ |
115 | (long) mtime, /* mtime */ | 117 | (long) default_mtime, /* mtime */ |
116 | (unsigned)strlen(target)+1, /* filesize */ | 118 | (unsigned)strlen(target)+1, /* filesize */ |
117 | 3, /* major */ | 119 | 3, /* major */ |
118 | 1, /* minor */ | 120 | 1, /* minor */ |
@@ -150,8 +152,9 @@ static int cpio_mkgeneric(const char *name, unsigned int mode, | |||
150 | uid_t uid, gid_t gid) | 152 | uid_t uid, gid_t gid) |
151 | { | 153 | { |
152 | char s[256]; | 154 | char s[256]; |
153 | time_t mtime = time(NULL); | ||
154 | 155 | ||
156 | if (name[0] == '/') | ||
157 | name++; | ||
155 | sprintf(s,"%s%08X%08X%08lX%08lX%08X%08lX" | 158 | sprintf(s,"%s%08X%08X%08lX%08lX%08X%08lX" |
156 | "%08X%08X%08X%08X%08X%08X%08X", | 159 | "%08X%08X%08X%08X%08X%08X%08X", |
157 | "070701", /* magic */ | 160 | "070701", /* magic */ |
@@ -160,7 +163,7 @@ static int cpio_mkgeneric(const char *name, unsigned int mode, | |||
160 | (long) uid, /* uid */ | 163 | (long) uid, /* uid */ |
161 | (long) gid, /* gid */ | 164 | (long) gid, /* gid */ |
162 | 2, /* nlink */ | 165 | 2, /* nlink */ |
163 | (long) mtime, /* mtime */ | 166 | (long) default_mtime, /* mtime */ |
164 | 0, /* filesize */ | 167 | 0, /* filesize */ |
165 | 3, /* major */ | 168 | 3, /* major */ |
166 | 1, /* minor */ | 169 | 1, /* minor */ |
@@ -238,13 +241,14 @@ static int cpio_mknod(const char *name, unsigned int mode, | |||
238 | unsigned int maj, unsigned int min) | 241 | unsigned int maj, unsigned int min) |
239 | { | 242 | { |
240 | char s[256]; | 243 | char s[256]; |
241 | time_t mtime = time(NULL); | ||
242 | 244 | ||
243 | if (dev_type == 'b') | 245 | if (dev_type == 'b') |
244 | mode |= S_IFBLK; | 246 | mode |= S_IFBLK; |
245 | else | 247 | else |
246 | mode |= S_IFCHR; | 248 | mode |= S_IFCHR; |
247 | 249 | ||
250 | if (name[0] == '/') | ||
251 | name++; | ||
248 | sprintf(s,"%s%08X%08X%08lX%08lX%08X%08lX" | 252 | sprintf(s,"%s%08X%08X%08lX%08lX%08X%08lX" |
249 | "%08X%08X%08X%08X%08X%08X%08X", | 253 | "%08X%08X%08X%08X%08X%08X%08X", |
250 | "070701", /* magic */ | 254 | "070701", /* magic */ |
@@ -253,7 +257,7 @@ static int cpio_mknod(const char *name, unsigned int mode, | |||
253 | (long) uid, /* uid */ | 257 | (long) uid, /* uid */ |
254 | (long) gid, /* gid */ | 258 | (long) gid, /* gid */ |
255 | 1, /* nlink */ | 259 | 1, /* nlink */ |
256 | (long) mtime, /* mtime */ | 260 | (long) default_mtime, /* mtime */ |
257 | 0, /* filesize */ | 261 | 0, /* filesize */ |
258 | 3, /* major */ | 262 | 3, /* major */ |
259 | 1, /* minor */ | 263 | 1, /* minor */ |
@@ -303,18 +307,18 @@ static int cpio_mkfile(const char *name, const char *location, | |||
303 | 307 | ||
304 | mode |= S_IFREG; | 308 | mode |= S_IFREG; |
305 | 309 | ||
306 | retval = stat (location, &buf); | ||
307 | if (retval) { | ||
308 | fprintf (stderr, "File %s could not be located\n", location); | ||
309 | goto error; | ||
310 | } | ||
311 | |||
312 | file = open (location, O_RDONLY); | 310 | file = open (location, O_RDONLY); |
313 | if (file < 0) { | 311 | if (file < 0) { |
314 | fprintf (stderr, "File %s could not be opened for reading\n", location); | 312 | fprintf (stderr, "File %s could not be opened for reading\n", location); |
315 | goto error; | 313 | goto error; |
316 | } | 314 | } |
317 | 315 | ||
316 | retval = fstat(file, &buf); | ||
317 | if (retval) { | ||
318 | fprintf(stderr, "File %s could not be stat()'ed\n", location); | ||
319 | goto error; | ||
320 | } | ||
321 | |||
318 | filebuf = malloc(buf.st_size); | 322 | filebuf = malloc(buf.st_size); |
319 | if (!filebuf) { | 323 | if (!filebuf) { |
320 | fprintf (stderr, "out of memory\n"); | 324 | fprintf (stderr, "out of memory\n"); |
@@ -332,6 +336,8 @@ static int cpio_mkfile(const char *name, const char *location, | |||
332 | /* data goes on last link */ | 336 | /* data goes on last link */ |
333 | if (i == nlinks) size = buf.st_size; | 337 | if (i == nlinks) size = buf.st_size; |
334 | 338 | ||
339 | if (name[0] == '/') | ||
340 | name++; | ||
335 | namesize = strlen(name) + 1; | 341 | namesize = strlen(name) + 1; |
336 | sprintf(s,"%s%08X%08X%08lX%08lX%08X%08lX" | 342 | sprintf(s,"%s%08X%08X%08lX%08lX%08X%08lX" |
337 | "%08lX%08X%08X%08X%08X%08X%08X", | 343 | "%08lX%08X%08X%08X%08X%08X%08X", |
@@ -452,7 +458,7 @@ static int cpio_mkfile_line(const char *line) | |||
452 | static void usage(const char *prog) | 458 | static void usage(const char *prog) |
453 | { | 459 | { |
454 | fprintf(stderr, "Usage:\n" | 460 | fprintf(stderr, "Usage:\n" |
455 | "\t%s <cpio_list>\n" | 461 | "\t%s [-t <timestamp>] <cpio_list>\n" |
456 | "\n" | 462 | "\n" |
457 | "<cpio_list> is a file containing newline separated entries that\n" | 463 | "<cpio_list> is a file containing newline separated entries that\n" |
458 | "describe the files to be included in the initramfs archive:\n" | 464 | "describe the files to be included in the initramfs archive:\n" |
@@ -483,7 +489,11 @@ static void usage(const char *prog) | |||
483 | "nod /dev/console 0600 0 0 c 5 1\n" | 489 | "nod /dev/console 0600 0 0 c 5 1\n" |
484 | "dir /root 0700 0 0\n" | 490 | "dir /root 0700 0 0\n" |
485 | "dir /sbin 0755 0 0\n" | 491 | "dir /sbin 0755 0 0\n" |
486 | "file /sbin/kinit /usr/src/klibc/kinit/kinit 0755 0 0\n", | 492 | "file /sbin/kinit /usr/src/klibc/kinit/kinit 0755 0 0\n" |
493 | "\n" | ||
494 | "<timestamp> is time in seconds since Epoch that will be used\n" | ||
495 | "as mtime for symlinks, special files and directories. The default\n" | ||
496 | "is to use the current time for these entries.\n", | ||
487 | prog); | 497 | prog); |
488 | } | 498 | } |
489 | 499 | ||
@@ -521,17 +531,42 @@ int main (int argc, char *argv[]) | |||
521 | char *args, *type; | 531 | char *args, *type; |
522 | int ec = 0; | 532 | int ec = 0; |
523 | int line_nr = 0; | 533 | int line_nr = 0; |
534 | const char *filename; | ||
524 | 535 | ||
525 | if (2 != argc) { | 536 | default_mtime = time(NULL); |
537 | while (1) { | ||
538 | int opt = getopt(argc, argv, "t:h"); | ||
539 | char *invalid; | ||
540 | |||
541 | if (opt == -1) | ||
542 | break; | ||
543 | switch (opt) { | ||
544 | case 't': | ||
545 | default_mtime = strtol(optarg, &invalid, 10); | ||
546 | if (!*optarg || *invalid) { | ||
547 | fprintf(stderr, "Invalid timestamp: %s\n", | ||
548 | optarg); | ||
549 | usage(argv[0]); | ||
550 | exit(1); | ||
551 | } | ||
552 | break; | ||
553 | case 'h': | ||
554 | case '?': | ||
555 | usage(argv[0]); | ||
556 | exit(opt == 'h' ? 0 : 1); | ||
557 | } | ||
558 | } | ||
559 | |||
560 | if (argc - optind != 1) { | ||
526 | usage(argv[0]); | 561 | usage(argv[0]); |
527 | exit(1); | 562 | exit(1); |
528 | } | 563 | } |
529 | 564 | filename = argv[optind]; | |
530 | if (!strcmp(argv[1], "-")) | 565 | if (!strcmp(filename, "-")) |
531 | cpio_list = stdin; | 566 | cpio_list = stdin; |
532 | else if (! (cpio_list = fopen(argv[1], "r"))) { | 567 | else if (!(cpio_list = fopen(filename, "r"))) { |
533 | fprintf(stderr, "ERROR: unable to open '%s': %s\n\n", | 568 | fprintf(stderr, "ERROR: unable to open '%s': %s\n\n", |
534 | argv[1], strerror(errno)); | 569 | filename, strerror(errno)); |
535 | usage(argv[0]); | 570 | usage(argv[0]); |
536 | exit(1); | 571 | exit(1); |
537 | } | 572 | } |
diff --git a/usr/initramfs_data.S b/usr/initramfs_data.S index 7c6973d8d829..c14322d1c0cf 100644 --- a/usr/initramfs_data.S +++ b/usr/initramfs_data.S | |||
@@ -11,11 +11,7 @@ | |||
11 | -T initramfs_data.scr initramfs_data.cpio.gz -o initramfs_data.o | 11 | -T initramfs_data.scr initramfs_data.cpio.gz -o initramfs_data.o |
12 | ld -m elf_i386 -r -o built-in.o initramfs_data.o | 12 | ld -m elf_i386 -r -o built-in.o initramfs_data.o |
13 | 13 | ||
14 | initramfs_data.scr looks like this: | 14 | For including the .init.ramfs sections, see include/asm-generic/vmlinux.lds. |
15 | SECTIONS | ||
16 | { | ||
17 | .init.ramfs : { *(.data) } | ||
18 | } | ||
19 | 15 | ||
20 | The above example is for i386 - the parameters vary from architectures. | 16 | The above example is for i386 - the parameters vary from architectures. |
21 | Eventually look up LDFLAGS_BLOB in an older version of the | 17 | Eventually look up LDFLAGS_BLOB in an older version of the |
@@ -25,6 +21,18 @@ SECTIONS | |||
25 | in the ELF header, as required by certain architectures. | 21 | in the ELF header, as required by certain architectures. |
26 | */ | 22 | */ |
27 | 23 | ||
28 | .section .init.ramfs,"a" | 24 | #include <linux/stringify.h> |
29 | .incbin "usr/initramfs_data.cpio" | 25 | #include <asm-generic/vmlinux.lds.h> |
30 | 26 | ||
27 | .section .init.ramfs,"a" | ||
28 | __irf_start: | ||
29 | .incbin __stringify(INITRAMFS_IMAGE) | ||
30 | __irf_end: | ||
31 | .section .init.ramfs.info,"a" | ||
32 | .globl VMLINUX_SYMBOL(__initramfs_size) | ||
33 | VMLINUX_SYMBOL(__initramfs_size): | ||
34 | #ifdef CONFIG_64BIT | ||
35 | .quad __irf_end - __irf_start | ||
36 | #else | ||
37 | .long __irf_end - __irf_start | ||
38 | #endif | ||
diff --git a/usr/initramfs_data.bz2.S b/usr/initramfs_data.bz2.S deleted file mode 100644 index bc54d090365c..000000000000 --- a/usr/initramfs_data.bz2.S +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | initramfs_data includes the compressed binary that is the | ||
3 | filesystem used for early user space. | ||
4 | Note: Older versions of "as" (prior to binutils 2.11.90.0.23 | ||
5 | released on 2001-07-14) dit not support .incbin. | ||
6 | If you are forced to use older binutils than that then the | ||
7 | following trick can be applied to create the resulting binary: | ||
8 | |||
9 | |||
10 | ld -m elf_i386 --format binary --oformat elf32-i386 -r \ | ||
11 | -T initramfs_data.scr initramfs_data.cpio.gz -o initramfs_data.o | ||
12 | ld -m elf_i386 -r -o built-in.o initramfs_data.o | ||
13 | |||
14 | initramfs_data.scr looks like this: | ||
15 | SECTIONS | ||
16 | { | ||
17 | .init.ramfs : { *(.data) } | ||
18 | } | ||
19 | |||
20 | The above example is for i386 - the parameters vary from architectures. | ||
21 | Eventually look up LDFLAGS_BLOB in an older version of the | ||
22 | arch/$(ARCH)/Makefile to see the flags used before .incbin was introduced. | ||
23 | |||
24 | Using .incbin has the advantage over ld that the correct flags are set | ||
25 | in the ELF header, as required by certain architectures. | ||
26 | */ | ||
27 | |||
28 | .section .init.ramfs,"a" | ||
29 | .incbin "usr/initramfs_data.cpio.bz2" | ||
diff --git a/usr/initramfs_data.gz.S b/usr/initramfs_data.gz.S deleted file mode 100644 index 890c8dd1d6bd..000000000000 --- a/usr/initramfs_data.gz.S +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | initramfs_data includes the compressed binary that is the | ||
3 | filesystem used for early user space. | ||
4 | Note: Older versions of "as" (prior to binutils 2.11.90.0.23 | ||
5 | released on 2001-07-14) dit not support .incbin. | ||
6 | If you are forced to use older binutils than that then the | ||
7 | following trick can be applied to create the resulting binary: | ||
8 | |||
9 | |||
10 | ld -m elf_i386 --format binary --oformat elf32-i386 -r \ | ||
11 | -T initramfs_data.scr initramfs_data.cpio.gz -o initramfs_data.o | ||
12 | ld -m elf_i386 -r -o built-in.o initramfs_data.o | ||
13 | |||
14 | initramfs_data.scr looks like this: | ||
15 | SECTIONS | ||
16 | { | ||
17 | .init.ramfs : { *(.data) } | ||
18 | } | ||
19 | |||
20 | The above example is for i386 - the parameters vary from architectures. | ||
21 | Eventually look up LDFLAGS_BLOB in an older version of the | ||
22 | arch/$(ARCH)/Makefile to see the flags used before .incbin was introduced. | ||
23 | |||
24 | Using .incbin has the advantage over ld that the correct flags are set | ||
25 | in the ELF header, as required by certain architectures. | ||
26 | */ | ||
27 | |||
28 | .section .init.ramfs,"a" | ||
29 | .incbin "usr/initramfs_data.cpio.gz" | ||
diff --git a/usr/initramfs_data.lzma.S b/usr/initramfs_data.lzma.S deleted file mode 100644 index e11469e48562..000000000000 --- a/usr/initramfs_data.lzma.S +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | initramfs_data includes the compressed binary that is the | ||
3 | filesystem used for early user space. | ||
4 | Note: Older versions of "as" (prior to binutils 2.11.90.0.23 | ||
5 | released on 2001-07-14) dit not support .incbin. | ||
6 | If you are forced to use older binutils than that then the | ||
7 | following trick can be applied to create the resulting binary: | ||
8 | |||
9 | |||
10 | ld -m elf_i386 --format binary --oformat elf32-i386 -r \ | ||
11 | -T initramfs_data.scr initramfs_data.cpio.gz -o initramfs_data.o | ||
12 | ld -m elf_i386 -r -o built-in.o initramfs_data.o | ||
13 | |||
14 | initramfs_data.scr looks like this: | ||
15 | SECTIONS | ||
16 | { | ||
17 | .init.ramfs : { *(.data) } | ||
18 | } | ||
19 | |||
20 | The above example is for i386 - the parameters vary from architectures. | ||
21 | Eventually look up LDFLAGS_BLOB in an older version of the | ||
22 | arch/$(ARCH)/Makefile to see the flags used before .incbin was introduced. | ||
23 | |||
24 | Using .incbin has the advantage over ld that the correct flags are set | ||
25 | in the ELF header, as required by certain architectures. | ||
26 | */ | ||
27 | |||
28 | .section .init.ramfs,"a" | ||
29 | .incbin "usr/initramfs_data.cpio.lzma" | ||
diff --git a/usr/initramfs_data.lzo.S b/usr/initramfs_data.lzo.S deleted file mode 100644 index 59211905da84..000000000000 --- a/usr/initramfs_data.lzo.S +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | initramfs_data includes the compressed binary that is the | ||
3 | filesystem used for early user space. | ||
4 | Note: Older versions of "as" (prior to binutils 2.11.90.0.23 | ||
5 | released on 2001-07-14) dit not support .incbin. | ||
6 | If you are forced to use older binutils than that then the | ||
7 | following trick can be applied to create the resulting binary: | ||
8 | |||
9 | |||
10 | ld -m elf_i386 --format binary --oformat elf32-i386 -r \ | ||
11 | -T initramfs_data.scr initramfs_data.cpio.gz -o initramfs_data.o | ||
12 | ld -m elf_i386 -r -o built-in.o initramfs_data.o | ||
13 | |||
14 | initramfs_data.scr looks like this: | ||
15 | SECTIONS | ||
16 | { | ||
17 | .init.ramfs : { *(.data) } | ||
18 | } | ||
19 | |||
20 | The above example is for i386 - the parameters vary from architectures. | ||
21 | Eventually look up LDFLAGS_BLOB in an older version of the | ||
22 | arch/$(ARCH)/Makefile to see the flags used before .incbin was introduced. | ||
23 | |||
24 | Using .incbin has the advantage over ld that the correct flags are set | ||
25 | in the ELF header, as required by certain architectures. | ||
26 | */ | ||
27 | |||
28 | .section .init.ramfs,"a" | ||
29 | .incbin "usr/initramfs_data.cpio.lzo" | ||