initscripts-shr: remove devtmpfs initscript for palmpre machine
[openembedded.git] / recipes / silo / cross.patch
blob97aa474a6ebe0150e8629897b385d75999f65ba8
1 --- silo-1.4.8/common/Makefile.old 2004-09-13 14:31:42.000000000 +0100
2 +++ silo-1.4.8/common/Makefile 2004-09-13 14:33:58.000000000 +0100
3 @@ -16,6 +16,9 @@
5 all: $(OBJS) $(PROGRAMS)
7 +bin2h: bin2h.c
8 + $(HOSTCC) $(HOSTCFLAGS) -o $@ $^
10 prom.o: prom.c
11 $(CC) $(CFLAGS) -c -Wa,-Av9 -o prom.o prom.c
13 --- silo-1.4.8/Rules.make~cross.patch 2004-07-14 16:11:26.000000000 +0100
14 +++ silo-1.4.8/Rules.make 2004-09-13 15:14:26.000000000 +0100
15 @@ -2,11 +2,11 @@
16 IMGVERSION=0.99
17 RM=rm -f
18 # We want to force 32-bit builds
19 -CC=gcc -m32
20 -LD=ld
21 -AS=as
22 -STRIP=strip
23 -NM=nm
24 +# CC=gcc -m32
25 +# LD=ld
26 +# AS=as
27 +# STRIP=strip
28 +# NM=nm
29 ELFTOAOUT=elftoaout
30 BIN2H=../common/bin2h
32 @@ -15,7 +15,7 @@
34 CFLAGS=-Os -Wall -I. -I../include -fomit-frame-pointer \
35 -fno-strict-aliasing -DSMALL_RELOC=$(SMALL_RELOC) \
36 - -DLARGE_RELOC=$(LARGE_RELOC)
37 + -DLARGE_RELOC=$(LARGE_RELOC) $(OECFLAGS)
39 OPSYS=$(shell uname)
40 OSREV=$(shell uname -r)
41 --- silo-1.4.8/second/Makefile~cross.patch 2004-06-20 18:16:32.000000000 +0100
42 +++ silo-1.4.8/second/Makefile 2004-09-13 15:18:48.000000000 +0100
43 @@ -23,8 +23,8 @@
44 # that 3MB are guaranteed to be mapped.
46 # XXX: We seem to be going 4Megs here for LARGE? -- BenC
47 -LDFLAGS_SMALL=-N -Ttext $(SMALL_RELOC)
48 -LDFLAGS_LARGE=-N -Ttext $(LARGE_RELOC)
49 +LDFLAGS_SMALL=-N -Ttext $(SMALL_RELOC) $(OELDFLAGS)
50 +LDFLAGS_LARGE=-N -Ttext $(LARGE_RELOC) $(OELDFLAGS)
52 .c.o:
53 $(CC) $(CFLAGS) -c $*.c -o $@
54 @@ -85,7 +85,7 @@
55 $(CC) $(CFLAGS) -c -o $@ $<
57 util: util.c
58 - $(CC) -DSMALL_RELOC=$(SMALL_RELOC) -DLARGE_RELOC=$(LARGE_RELOC) -o $@ $<
59 + $(HOSTCC) $(HOSTCFLAGS) -DSMALL_RELOC=$(SMALL_RELOC) -DLARGE_RELOC=$(LARGE_RELOC) -o $@ $<
61 clean:
62 $(RM) *.o fs/*.o second* silotftp* util fs/libfs.a
63 --- silo-1.4.8/tilo/Makefile~cross.patch 2004-06-20 18:20:37.000000000 +0100
64 +++ silo-1.4.8/tilo/Makefile 2004-09-13 15:21:59.000000000 +0100
65 @@ -27,7 +27,7 @@
66 OBJS2 = crt0l.o tilol.o $(OBJS_COMMON) mallocl.o
68 maketilo: maketilo.c b.h b2.h
69 - $(CC) $(CFLAGS) maketilo.c -o maketilo
70 + $(HOSTCC) $(HOSTCFLAGS) maketilo.c -o maketilo
72 b.h : b.out $(BIN2H)
73 $(BIN2H) -l BOOT_LEN boot_loader $< > $@ || ($(RM) $@; exit 1)
74 --- silo-1.4.8/silo/Makefile.old 2004-09-13 15:24:22.000000000 +0100
75 +++ silo-1.4.8/silo/Makefile 2004-09-13 15:24:23.000000000 +0100
76 @@ -3,7 +3,7 @@
77 PROGRAMS=silo silocheck
78 UFSDEPS=
80 -CFLAGS=-O2 -Wall -I. -I../include
81 +CFLAGS=-O2 -Wall -I. -I../include $(OECFLAGS)
83 ifeq ($(OPSYS),Solaris)
84 UFSDEPS=../second/ufs.c ufs.h
85 --- /dev/null 2004-06-13 02:32:19.000000000 +0100
86 +++ silo-1.4.8/include/ext2fs/ext2_fs.h 2004-09-13 17:18:53.000000000 +0100
87 @@ -0,0 +1,582 @@
88 +/*
89 + * linux/include/linux/ext2_fs.h
90 + *
91 + * Copyright (C) 1992, 1993, 1994, 1995
92 + * Remy Card (card@masi.ibp.fr)
93 + * Laboratoire MASI - Institut Blaise Pascal
94 + * Universite Pierre et Marie Curie (Paris VI)
95 + *
96 + * from
97 + *
98 + * linux/include/linux/minix_fs.h
99 + *
100 + * Copyright (C) 1991, 1992 Linus Torvalds
101 + */
103 +#ifndef _LINUX_EXT2_FS_H
104 +#define _LINUX_EXT2_FS_H
106 +#include <linux/types.h> /* Changed from linux/types.h */
109 + * The second extended filesystem constants/structures
110 + */
113 + * Define EXT2FS_DEBUG to produce debug messages
114 + */
115 +#undef EXT2FS_DEBUG
118 + * Define EXT2_PREALLOCATE to preallocate data blocks for expanding files
119 + */
120 +#define EXT2_PREALLOCATE
121 +#define EXT2_DEFAULT_PREALLOC_BLOCKS 8
124 + * The second extended file system version
125 + */
126 +#define EXT2FS_DATE "95/08/09"
127 +#define EXT2FS_VERSION "0.5b"
130 + * Special inode numbers
131 + */
132 +#define EXT2_BAD_INO 1 /* Bad blocks inode */
133 +#define EXT2_ROOT_INO 2 /* Root inode */
134 +#define EXT2_ACL_IDX_INO 3 /* ACL inode */
135 +#define EXT2_ACL_DATA_INO 4 /* ACL inode */
136 +#define EXT2_BOOT_LOADER_INO 5 /* Boot loader inode */
137 +#define EXT2_UNDEL_DIR_INO 6 /* Undelete directory inode */
138 +#define EXT2_RESIZE_INO 7 /* Reserved group descriptors inode */
139 +#define EXT2_JOURNAL_INO 8 /* Journal inode */
141 +/* First non-reserved inode for old ext2 filesystems */
142 +#define EXT2_GOOD_OLD_FIRST_INO 11
145 + * The second extended file system magic number
146 + */
147 +#define EXT2_SUPER_MAGIC 0xEF53
149 +#ifdef __KERNEL__
150 +#define EXT2_SB(sb) (&((sb)->u.ext2_sb))
151 +#else
152 +/* Assume that user mode programs are passing in an ext2fs superblock, not
153 + * a kernel struct super_block. This will allow us to call the feature-test
154 + * macros from user land. */
155 +#define EXT2_SB(sb) (sb)
156 +#endif
159 + * Maximal count of links to a file
160 + */
161 +#define EXT2_LINK_MAX 32000
164 + * Macro-instructions used to manage several block sizes
165 + */
166 +#define EXT2_MIN_BLOCK_LOG_SIZE 10 /* 1024 */
167 +#define EXT2_MAX_BLOCK_LOG_SIZE 13 /* 8192 */
168 +#define EXT2_MIN_BLOCK_SIZE (1 << EXT2_MIN_BLOCK_LOG_SIZE)
169 +#define EXT2_MAX_BLOCK_SIZE (1 << EXT2_MAX_BLOCK_LOG_SIZE)
170 +#ifdef __KERNEL__
171 +#define EXT2_BLOCK_SIZE(s) ((s)->s_blocksize)
172 +#define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits)
173 +#define EXT2_ADDR_PER_BLOCK_BITS(s) (EXT2_SB(s)->addr_per_block_bits)
174 +#define EXT2_INODE_SIZE(s) (EXT2_SB(s)->s_inode_size)
175 +#define EXT2_FIRST_INO(s) (EXT2_SB(s)->s_first_ino)
176 +#else
177 +#define EXT2_BLOCK_SIZE(s) (EXT2_MIN_BLOCK_SIZE << (s)->s_log_block_size)
178 +#define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
179 +#define EXT2_INODE_SIZE(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
180 + EXT2_GOOD_OLD_INODE_SIZE : (s)->s_inode_size)
181 +#define EXT2_FIRST_INO(s) (((s)->s_rev_level == EXT2_GOOD_OLD_REV) ? \
182 + EXT2_GOOD_OLD_FIRST_INO : (s)->s_first_ino)
183 +#endif
184 +#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof(__u32))
187 + * Macro-instructions used to manage fragments
188 + */
189 +#define EXT2_MIN_FRAG_SIZE EXT2_MIN_BLOCK_SIZE
190 +#define EXT2_MAX_FRAG_SIZE EXT2_MAX_BLOCK_SIZE
191 +#define EXT2_MIN_FRAG_LOG_SIZE EXT2_MIN_BLOCK_LOG_SIZE
192 +#ifdef __KERNEL__
193 +# define EXT2_FRAG_SIZE(s) (EXT2_SB(s)->s_frag_size)
194 +# define EXT2_FRAGS_PER_BLOCK(s) (EXT2_SB(s)->s_frags_per_block)
195 +#else
196 +# define EXT2_FRAG_SIZE(s) (EXT2_MIN_FRAG_SIZE << (s)->s_log_frag_size)
197 +# define EXT2_FRAGS_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / EXT2_FRAG_SIZE(s))
198 +#endif
201 + * ACL structures
202 + */
203 +struct ext2_acl_header /* Header of Access Control Lists */
205 + __u32 aclh_size;
206 + __u32 aclh_file_count;
207 + __u32 aclh_acle_count;
208 + __u32 aclh_first_acle;
211 +struct ext2_acl_entry /* Access Control List Entry */
213 + __u32 acle_size;
214 + __u16 acle_perms; /* Access permissions */
215 + __u16 acle_type; /* Type of entry */
216 + __u16 acle_tag; /* User or group identity */
217 + __u16 acle_pad1;
218 + __u32 acle_next; /* Pointer on next entry for the */
219 + /* same inode or on next free entry */
223 + * Structure of a blocks group descriptor
224 + */
225 +struct ext2_group_desc
227 + __u32 bg_block_bitmap; /* Blocks bitmap block */
228 + __u32 bg_inode_bitmap; /* Inodes bitmap block */
229 + __u32 bg_inode_table; /* Inodes table block */
230 + __u16 bg_free_blocks_count; /* Free blocks count */
231 + __u16 bg_free_inodes_count; /* Free inodes count */
232 + __u16 bg_used_dirs_count; /* Directories count */
233 + __u16 bg_pad;
234 + __u32 bg_reserved[3];
238 + * Data structures used by the directory indexing feature
240 + * Note: all of the multibyte integer fields are little endian.
241 + */
244 + * Note: dx_root_info is laid out so that if it should somehow get
245 + * overlaid by a dirent the two low bits of the hash version will be
246 + * zero. Therefore, the hash version mod 4 should never be 0.
247 + * Sincerely, the paranoia department.
248 + */
249 +struct ext2_dx_root_info {
250 + __u32 reserved_zero;
251 + __u8 hash_version; /* 0 now, 1 at release */
252 + __u8 info_length; /* 8 */
253 + __u8 indirect_levels;
254 + __u8 unused_flags;
257 +#define EXT2_HASH_LEGACY 0
258 +#define EXT2_HASH_HALF_MD4 1
259 +#define EXT2_HASH_TEA 2
261 +#define EXT2_HASH_FLAG_INCOMPAT 0x1
263 +struct ext2_dx_entry {
264 + __u32 hash;
265 + __u32 block;
268 +struct ext2_dx_countlimit {
269 + __u16 limit;
270 + __u16 count;
275 + * Macro-instructions used to manage group descriptors
276 + */
277 +#define EXT2_BLOCKS_PER_GROUP(s) (EXT2_SB(s)->s_blocks_per_group)
278 +#define EXT2_INODES_PER_GROUP(s) (EXT2_SB(s)->s_inodes_per_group)
279 +#define EXT2_INODES_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s)/EXT2_INODE_SIZE(s))
280 +/* limits imposed by 16-bit value gd_free_{blocks,inode}_count */
281 +#define EXT2_MAX_BLOCKS_PER_GROUP(s) ((1 << 16) - 8)
282 +#define EXT2_MAX_INODES_PER_GROUP(s) ((1 << 16) - EXT2_INODES_PER_BLOCK(s))
283 +#ifdef __KERNEL__
284 +#define EXT2_DESC_PER_BLOCK(s) (EXT2_SB(s)->s_desc_per_block)
285 +#define EXT2_DESC_PER_BLOCK_BITS(s) (EXT2_SB(s)->s_desc_per_block_bits)
286 +#else
287 +#define EXT2_DESC_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_group_desc))
288 +#endif
291 + * Constants relative to the data blocks
292 + */
293 +#define EXT2_NDIR_BLOCKS 12
294 +#define EXT2_IND_BLOCK EXT2_NDIR_BLOCKS
295 +#define EXT2_DIND_BLOCK (EXT2_IND_BLOCK + 1)
296 +#define EXT2_TIND_BLOCK (EXT2_DIND_BLOCK + 1)
297 +#define EXT2_N_BLOCKS (EXT2_TIND_BLOCK + 1)
300 + * Inode flags
301 + */
302 +#define EXT2_SECRM_FL 0x00000001 /* Secure deletion */
303 +#define EXT2_UNRM_FL 0x00000002 /* Undelete */
304 +#define EXT2_COMPR_FL 0x00000004 /* Compress file */
305 +#define EXT2_SYNC_FL 0x00000008 /* Synchronous updates */
306 +#define EXT2_IMMUTABLE_FL 0x00000010 /* Immutable file */
307 +#define EXT2_APPEND_FL 0x00000020 /* writes to file may only append */
308 +#define EXT2_NODUMP_FL 0x00000040 /* do not dump file */
309 +#define EXT2_NOATIME_FL 0x00000080 /* do not update atime */
310 +/* Reserved for compression usage... */
311 +#define EXT2_DIRTY_FL 0x00000100
312 +#define EXT2_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */
313 +#define EXT2_NOCOMPR_FL 0x00000400 /* Access raw compressed data */
314 +#define EXT2_ECOMPR_FL 0x00000800 /* Compression error */
315 +/* End compression flags --- maybe not all used */
316 +#define EXT2_BTREE_FL 0x00001000 /* btree format dir */
317 +#define EXT2_INDEX_FL 0x00001000 /* hash-indexed directory */
318 +#define EXT2_IMAGIC_FL 0x00002000
319 +#define EXT3_JOURNAL_DATA_FL 0x00004000 /* file data should be journaled */
320 +#define EXT2_NOTAIL_FL 0x00008000 /* file tail should not be merged */
321 +#define EXT2_DIRSYNC_FL 0x00010000 /* Synchronous directory modifications */
322 +#define EXT2_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/
323 +#define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */
325 +#define EXT2_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */
326 +#define EXT2_FL_USER_MODIFIABLE 0x000080FF /* User modifiable flags */
329 + * ioctl commands
330 + */
331 +#define EXT2_IOC_GETFLAGS _IOR('f', 1, long)
332 +#define EXT2_IOC_SETFLAGS _IOW('f', 2, long)
333 +#define EXT2_IOC_GETVERSION _IOR('v', 1, long)
334 +#define EXT2_IOC_SETVERSION _IOW('v', 2, long)
337 + * Structure of an inode on the disk
338 + */
339 +struct ext2_inode {
340 + __u16 i_mode; /* File mode */
341 + __u16 i_uid; /* Low 16 bits of Owner Uid */
342 + __u32 i_size; /* Size in bytes */
343 + __u32 i_atime; /* Access time */
344 + __u32 i_ctime; /* Creation time */
345 + __u32 i_mtime; /* Modification time */
346 + __u32 i_dtime; /* Deletion Time */
347 + __u16 i_gid; /* Low 16 bits of Group Id */
348 + __u16 i_links_count; /* Links count */
349 + __u32 i_blocks; /* Blocks count */
350 + __u32 i_flags; /* File flags */
351 + union {
352 + struct {
353 + __u32 l_i_reserved1;
354 + } linux1;
355 + struct {
356 + __u32 h_i_translator;
357 + } hurd1;
358 + struct {
359 + __u32 m_i_reserved1;
360 + } masix1;
361 + } osd1; /* OS dependent 1 */
362 + __u32 i_block[EXT2_N_BLOCKS];/* Pointers to blocks */
363 + __u32 i_generation; /* File version (for NFS) */
364 + __u32 i_file_acl; /* File ACL */
365 + __u32 i_dir_acl; /* Directory ACL */
366 + __u32 i_faddr; /* Fragment address */
367 + union {
368 + struct {
369 + __u8 l_i_frag; /* Fragment number */
370 + __u8 l_i_fsize; /* Fragment size */
371 + __u16 i_pad1;
372 + __u16 l_i_uid_high; /* these 2 fields */
373 + __u16 l_i_gid_high; /* were reserved2[0] */
374 + __u32 l_i_reserved2;
375 + } linux2;
376 + struct {
377 + __u8 h_i_frag; /* Fragment number */
378 + __u8 h_i_fsize; /* Fragment size */
379 + __u16 h_i_mode_high;
380 + __u16 h_i_uid_high;
381 + __u16 h_i_gid_high;
382 + __u32 h_i_author;
383 + } hurd2;
384 + struct {
385 + __u8 m_i_frag; /* Fragment number */
386 + __u8 m_i_fsize; /* Fragment size */
387 + __u16 m_pad1;
388 + __u32 m_i_reserved2[2];
389 + } masix2;
390 + } osd2; /* OS dependent 2 */
393 +#define i_size_high i_dir_acl
395 +#if defined(__KERNEL__) || defined(__linux__)
396 +#define i_reserved1 osd1.linux1.l_i_reserved1
397 +#define i_frag osd2.linux2.l_i_frag
398 +#define i_fsize osd2.linux2.l_i_fsize
399 +#define i_uid_low i_uid
400 +#define i_gid_low i_gid
401 +#define i_uid_high osd2.linux2.l_i_uid_high
402 +#define i_gid_high osd2.linux2.l_i_gid_high
403 +#define i_reserved2 osd2.linux2.l_i_reserved2
405 +#else
406 +#if defined(__GNU__)
408 +#define i_translator osd1.hurd1.h_i_translator
409 +#define i_frag osd2.hurd2.h_i_frag;
410 +#define i_fsize osd2.hurd2.h_i_fsize;
411 +#define i_uid_high osd2.hurd2.h_i_uid_high
412 +#define i_gid_high osd2.hurd2.h_i_gid_high
413 +#define i_author osd2.hurd2.h_i_author
415 +#else
416 +#if defined(__masix__)
418 +#define i_reserved1 osd1.masix1.m_i_reserved1
419 +#define i_frag osd2.masix2.m_i_frag
420 +#define i_fsize osd2.masix2.m_i_fsize
421 +#define i_reserved2 osd2.masix2.m_i_reserved2
423 +#endif /* __masix__ */
424 +#endif /* __GNU__ */
425 +#endif /* defined(__KERNEL__) || defined(__linux__) */
428 + * File system states
429 + */
430 +#define EXT2_VALID_FS 0x0001 /* Unmounted cleanly */
431 +#define EXT2_ERROR_FS 0x0002 /* Errors detected */
434 + * Mount flags
435 + */
436 +#define EXT2_MOUNT_CHECK 0x0001 /* Do mount-time checks */
437 +#define EXT2_MOUNT_GRPID 0x0004 /* Create files with directory's group */
438 +#define EXT2_MOUNT_DEBUG 0x0008 /* Some debugging messages */
439 +#define EXT2_MOUNT_ERRORS_CONT 0x0010 /* Continue on errors */
440 +#define EXT2_MOUNT_ERRORS_RO 0x0020 /* Remount fs ro on errors */
441 +#define EXT2_MOUNT_ERRORS_PANIC 0x0040 /* Panic on errors */
442 +#define EXT2_MOUNT_MINIX_DF 0x0080 /* Mimics the Minix statfs */
443 +#define EXT2_MOUNT_NO_UID32 0x0200 /* Disable 32-bit UIDs */
445 +#define clear_opt(o, opt) o &= ~EXT2_MOUNT_##opt
446 +#define set_opt(o, opt) o |= EXT2_MOUNT_##opt
447 +#define test_opt(sb, opt) (EXT2_SB(sb)->s_mount_opt & \
448 + EXT2_MOUNT_##opt)
450 + * Maximal mount counts between two filesystem checks
451 + */
452 +#define EXT2_DFL_MAX_MNT_COUNT 20 /* Allow 20 mounts */
453 +#define EXT2_DFL_CHECKINTERVAL 0 /* Don't use interval check */
456 + * Behaviour when detecting errors
457 + */
458 +#define EXT2_ERRORS_CONTINUE 1 /* Continue execution */
459 +#define EXT2_ERRORS_RO 2 /* Remount fs read-only */
460 +#define EXT2_ERRORS_PANIC 3 /* Panic */
461 +#define EXT2_ERRORS_DEFAULT EXT2_ERRORS_CONTINUE
464 + * Structure of the super block
465 + */
466 +struct ext2_super_block {
467 + __u32 s_inodes_count; /* Inodes count */
468 + __u32 s_blocks_count; /* Blocks count */
469 + __u32 s_r_blocks_count; /* Reserved blocks count */
470 + __u32 s_free_blocks_count; /* Free blocks count */
471 + __u32 s_free_inodes_count; /* Free inodes count */
472 + __u32 s_first_data_block; /* First Data Block */
473 + __u32 s_log_block_size; /* Block size */
474 + __s32 s_log_frag_size; /* Fragment size */
475 + __u32 s_blocks_per_group; /* # Blocks per group */
476 + __u32 s_frags_per_group; /* # Fragments per group */
477 + __u32 s_inodes_per_group; /* # Inodes per group */
478 + __u32 s_mtime; /* Mount time */
479 + __u32 s_wtime; /* Write time */
480 + __u16 s_mnt_count; /* Mount count */
481 + __s16 s_max_mnt_count; /* Maximal mount count */
482 + __u16 s_magic; /* Magic signature */
483 + __u16 s_state; /* File system state */
484 + __u16 s_errors; /* Behaviour when detecting errors */
485 + __u16 s_minor_rev_level; /* minor revision level */
486 + __u32 s_lastcheck; /* time of last check */
487 + __u32 s_checkinterval; /* max. time between checks */
488 + __u32 s_creator_os; /* OS */
489 + __u32 s_rev_level; /* Revision level */
490 + __u16 s_def_resuid; /* Default uid for reserved blocks */
491 + __u16 s_def_resgid; /* Default gid for reserved blocks */
492 + /*
493 + * These fields are for EXT2_DYNAMIC_REV superblocks only.
495 + * Note: the difference between the compatible feature set and
496 + * the incompatible feature set is that if there is a bit set
497 + * in the incompatible feature set that the kernel doesn't
498 + * know about, it should refuse to mount the filesystem.
500 + * e2fsck's requirements are more strict; if it doesn't know
501 + * about a feature in either the compatible or incompatible
502 + * feature set, it must abort and not try to meddle with
503 + * things it doesn't understand...
504 + */
505 + __u32 s_first_ino; /* First non-reserved inode */
506 + __u16 s_inode_size; /* size of inode structure */
507 + __u16 s_block_group_nr; /* block group # of this superblock */
508 + __u32 s_feature_compat; /* compatible feature set */
509 + __u32 s_feature_incompat; /* incompatible feature set */
510 + __u32 s_feature_ro_compat; /* readonly-compatible feature set */
511 + __u8 s_uuid[16]; /* 128-bit uuid for volume */
512 + char s_volume_name[16]; /* volume name */
513 + char s_last_mounted[64]; /* directory where last mounted */
514 + __u32 s_algorithm_usage_bitmap; /* For compression */
515 + /*
516 + * Performance hints. Directory preallocation should only
517 + * happen if the EXT2_FEATURE_COMPAT_DIR_PREALLOC flag is on.
518 + */
519 + __u8 s_prealloc_blocks; /* Nr of blocks to try to preallocate*/
520 + __u8 s_prealloc_dir_blocks; /* Nr to preallocate for dirs */
521 + __u16 s_reserved_gdt_blocks; /* Per group table for online growth */
522 + /*
523 + * Journaling support valid if EXT2_FEATURE_COMPAT_HAS_JOURNAL set.
524 + */
525 + __u8 s_journal_uuid[16]; /* uuid of journal superblock */
526 + __u32 s_journal_inum; /* inode number of journal file */
527 + __u32 s_journal_dev; /* device number of journal file */
528 + __u32 s_last_orphan; /* start of list of inodes to delete */
529 + __u32 s_hash_seed[4]; /* HTREE hash seed */
530 + __u8 s_def_hash_version; /* Default hash version to use */
531 + __u8 s_jnl_backup_type; /* Default type of journal backup */
532 + __u16 s_reserved_word_pad;
533 + __u32 s_default_mount_opts;
534 + __u32 s_first_meta_bg; /* First metablock group */
535 + __u32 s_mkfs_time; /* When the filesystem was created */
536 + __u32 s_jnl_blocks[17]; /* Backup of the journal inode */
537 + __u32 s_reserved[172]; /* Padding to the end of the block */
541 + * Codes for operating systems
542 + */
543 +#define EXT2_OS_LINUX 0
544 +#define EXT2_OS_HURD 1
545 +#define EXT2_OS_MASIX 2
546 +#define EXT2_OS_FREEBSD 3
547 +#define EXT2_OS_LITES 4
550 + * Revision levels
551 + */
552 +#define EXT2_GOOD_OLD_REV 0 /* The good old (original) format */
553 +#define EXT2_DYNAMIC_REV 1 /* V2 format w/ dynamic inode sizes */
555 +#define EXT2_CURRENT_REV EXT2_GOOD_OLD_REV
556 +#define EXT2_MAX_SUPP_REV EXT2_DYNAMIC_REV
558 +#define EXT2_GOOD_OLD_INODE_SIZE 128
561 + * Journal inode backup types
562 + */
563 +#define EXT3_JNL_BACKUP_BLOCKS 1
566 + * Feature set definitions
567 + */
569 +#define EXT2_HAS_COMPAT_FEATURE(sb,mask) \
570 + ( EXT2_SB(sb)->s_feature_compat & (mask) )
571 +#define EXT2_HAS_RO_COMPAT_FEATURE(sb,mask) \
572 + ( EXT2_SB(sb)->s_feature_ro_compat & (mask) )
573 +#define EXT2_HAS_INCOMPAT_FEATURE(sb,mask) \
574 + ( EXT2_SB(sb)->s_feature_incompat & (mask) )
576 +#define EXT2_FEATURE_COMPAT_DIR_PREALLOC 0x0001
577 +#define EXT2_FEATURE_COMPAT_IMAGIC_INODES 0x0002
578 +#define EXT3_FEATURE_COMPAT_HAS_JOURNAL 0x0004
579 +#define EXT2_FEATURE_COMPAT_EXT_ATTR 0x0008
580 +#define EXT2_FEATURE_COMPAT_RESIZE_INODE 0x0010
581 +#define EXT2_FEATURE_COMPAT_DIR_INDEX 0x0020
583 +#define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER 0x0001
584 +#define EXT2_FEATURE_RO_COMPAT_LARGE_FILE 0x0002
585 +/* #define EXT2_FEATURE_RO_COMPAT_BTREE_DIR 0x0004 not used */
587 +#define EXT2_FEATURE_INCOMPAT_COMPRESSION 0x0001
588 +#define EXT2_FEATURE_INCOMPAT_FILETYPE 0x0002
589 +#define EXT3_FEATURE_INCOMPAT_RECOVER 0x0004 /* Needs recovery */
590 +#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */
591 +#define EXT2_FEATURE_INCOMPAT_META_BG 0x0010
593 +#define EXT2_FEATURE_COMPAT_SUPP 0
594 +#define EXT2_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE)
595 +#define EXT2_FEATURE_RO_COMPAT_SUPP (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
596 + EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
597 + EXT2_FEATURE_RO_COMPAT_BTREE_DIR)
600 + * Default values for user and/or group using reserved blocks
601 + */
602 +#define EXT2_DEF_RESUID 0
603 +#define EXT2_DEF_RESGID 0
606 + * Default mount options
607 + */
608 +#define EXT2_DEFM_DEBUG 0x0001
609 +#define EXT2_DEFM_BSDGROUPS 0x0002
610 +#define EXT2_DEFM_XATTR_USER 0x0004
611 +#define EXT2_DEFM_ACL 0x0008
612 +#define EXT2_DEFM_UID16 0x0010
613 +#define EXT3_DEFM_JMODE 0x0060
614 +#define EXT3_DEFM_JMODE_DATA 0x0020
615 +#define EXT3_DEFM_JMODE_ORDERED 0x0040
616 +#define EXT3_DEFM_JMODE_WBACK 0x0060
619 + * Structure of a directory entry
620 + */
621 +#define EXT2_NAME_LEN 255
623 +struct ext2_dir_entry {
624 + __u32 inode; /* Inode number */
625 + __u16 rec_len; /* Directory entry length */
626 + __u16 name_len; /* Name length */
627 + char name[EXT2_NAME_LEN]; /* File name */
631 + * The new version of the directory entry. Since EXT2 structures are
632 + * stored in intel byte order, and the name_len field could never be
633 + * bigger than 255 chars, it's safe to reclaim the extra byte for the
634 + * file_type field.
635 + */
636 +struct ext2_dir_entry_2 {
637 + __u32 inode; /* Inode number */
638 + __u16 rec_len; /* Directory entry length */
639 + __u8 name_len; /* Name length */
640 + __u8 file_type;
641 + char name[EXT2_NAME_LEN]; /* File name */
645 + * Ext2 directory file types. Only the low 3 bits are used. The
646 + * other bits are reserved for now.
647 + */
648 +#define EXT2_FT_UNKNOWN 0
649 +#define EXT2_FT_REG_FILE 1
650 +#define EXT2_FT_DIR 2
651 +#define EXT2_FT_CHRDEV 3
652 +#define EXT2_FT_BLKDEV 4
653 +#define EXT2_FT_FIFO 5
654 +#define EXT2_FT_SOCK 6
655 +#define EXT2_FT_SYMLINK 7
657 +#define EXT2_FT_MAX 8
660 + * EXT2_DIR_PAD defines the directory entries boundaries
662 + * NOTE: It must be a multiple of 4
663 + */
664 +#define EXT2_DIR_PAD 4
665 +#define EXT2_DIR_ROUND (EXT2_DIR_PAD - 1)
666 +#define EXT2_DIR_REC_LEN(name_len) (((name_len) + 8 + EXT2_DIR_ROUND) & \
667 + ~EXT2_DIR_ROUND)
669 +#endif /* _LINUX_EXT2_FS_H */
670 --- silo-1.4.8/tilo/maketilo.c.old 2004-09-13 20:29:57.000000000 +0100
671 +++ silo-1.4.8/tilo/maketilo.c 2004-09-13 21:29:47.000000000 +0100
672 @@ -30,6 +30,7 @@
673 #include <sys/stat.h>
674 #include <stdlib.h>
675 #include <string.h>
676 +#include <netinet/in.h>
677 #include "b.h"
678 #include "b2.h"
680 @@ -220,7 +221,7 @@
681 output_end = root_image_start + rootlen;
683 /* patch code, data and BSS size in the .out header */
684 - *(unsigned*)(output_buffer+4) = output_end - output_buffer;
685 + *(unsigned*)(output_buffer+4) = htonl(output_end - output_buffer);
686 *(unsigned*)(output_buffer+8) = 0;
687 *(unsigned*)(output_buffer+12) = 0;
689 @@ -228,10 +229,10 @@
690 ii = (struct ImageInfo*)(output_buffer + 40);
692 if (sun4_kernel) {
693 - ii[0].packed_start = sun4_kernel_start - output_buffer - 32;
694 - ii[0].packed_len = sun4c_kernel_start - sun4_kernel_start;
695 - ii[0].unpacked_len = sun4_size;
696 - ii[0].root_start = sun4_root;
697 + ii[0].packed_start = htonl(sun4_kernel_start - output_buffer - 32);
698 + ii[0].packed_len = htonl(sun4c_kernel_start - sun4_kernel_start);
699 + ii[0].unpacked_len = htonl(sun4_size);
700 + ii[0].root_start = htonl(sun4_root);
701 } else {
702 ii[0].packed_start = 0;
703 ii[0].packed_len = 0;
704 @@ -240,10 +241,10 @@
707 if (sun4c_kernel) {
708 - ii[1].packed_start = sun4c_kernel_start - output_buffer - 32;
709 - ii[1].packed_len = sun4u_kernel_start - sun4c_kernel_start;
710 - ii[1].unpacked_len = sun4c_size;
711 - ii[1].root_start = sun4c_root;
712 + ii[1].packed_start = htonl(sun4c_kernel_start - output_buffer - 32);
713 + ii[1].packed_len = htonl(sun4u_kernel_start - sun4c_kernel_start);
714 + ii[1].unpacked_len = htonl(sun4c_size);
715 + ii[1].root_start = htonl(sun4c_root);
716 } else {
717 ii[1].packed_start = 0;
718 ii[1].packed_len = 0;
719 @@ -252,10 +253,10 @@
722 if (sun4u_kernel) {
723 - ii[2].packed_start = sun4u_kernel_start - output_buffer - 32;
724 - ii[2].packed_len = root_image_start - sun4u_kernel_start;
725 - ii[2].unpacked_len = sun4u_size;
726 - ii[2].root_start = sun4u_root;
727 + ii[2].packed_start = htonl(sun4u_kernel_start - output_buffer - 32);
728 + ii[2].packed_len = htonl(root_image_start - sun4u_kernel_start);
729 + ii[2].unpacked_len = htonl(sun4u_size);
730 + ii[2].root_start = htonl(sun4u_root);
731 } else {
732 ii[2].packed_start = 0;
733 ii[2].packed_len = 0;
734 @@ -263,8 +264,8 @@
735 ii[2].root_start = 0;
738 - ii[3].packed_start = root_image_start - output_buffer - 32;
739 - ii[3].packed_len = output_end - root_image_start;
740 + ii[3].packed_start = htonl(root_image_start - output_buffer - 32);
741 + ii[3].packed_len = htonl(output_end - root_image_start);
742 ii[3].unpacked_len = 0;
743 ii[3].root_start = 0;