linux revision 267843
153813Simp
2180314Simp#------------------------------------------------------------------------------
3100213Simp# $File: linux,v 1.57 2014/05/20 20:10:17 christos Exp $
452506Simp# linux:  file(1) magic for Linux files
552506Simp#
6140752Simp# Values for Linux/i386 binaries, from Daniel Quinlan <quinlan@yggdrasil.com>
752506Simp# The following basic Linux magic is useful for reference, but using
852506Simp# "long" magic is a better practice in order to avoid collisions.
952506Simp#
1052506Simp# 2	leshort		100		Linux/i386
1152506Simp# >0	leshort		0407		impure executable (OMAGIC)
1252506Simp# >0	leshort		0410		pure executable (NMAGIC)
1352506Simp# >0	leshort		0413		demand-paged executable (ZMAGIC)
1452506Simp# >0	leshort		0314		demand-paged executable (QMAGIC)
1552506Simp#
1652506Simp0	lelong		0x00640107	Linux/i386 impure executable (OMAGIC)
1752506Simp>16	lelong		0		\b, stripped
1852506Simp0	lelong		0x00640108	Linux/i386 pure executable (NMAGIC)
1952506Simp>16	lelong		0		\b, stripped
2052506Simp0	lelong		0x0064010b	Linux/i386 demand-paged executable (ZMAGIC)
2152506Simp>16	lelong		0		\b, stripped
2252506Simp0	lelong		0x006400cc	Linux/i386 demand-paged executable (QMAGIC)
2352506Simp>16	lelong		0		\b, stripped
2452506Simp#
2552506Simp0	string		\007\001\000	Linux/i386 object file
2652506Simp>20	lelong		>0x1020		\b, DLL library
2752506Simp# Linux-8086 stuff:
2852506Simp0	string		\01\03\020\04	Linux-8086 impure executable
2952506Simp>28	long		!0		not stripped
3052506Simp0	string		\01\03\040\04	Linux-8086 executable
3152506Simp>28	long		!0		not stripped
3252506Simp#
3352506Simp0	string		\243\206\001\0	Linux-8086 object file
34140752Simp#
35140752Simp0	string		\01\03\020\20	Minix-386 impure executable
36140752Simp>28	long		!0		not stripped
37140752Simp0	string		\01\03\040\20	Minix-386 executable
38140752Simp>28	long		!0		not stripped
39140752Simp0	string		\01\03\04\20	Minix-386 NSYM/GNU executable
40140752Simp>28	long		!0		not stripped
41140752Simp# core dump file, from Bill Reynolds <bill@goshawk.lanl.gov>
42140752Simp216	lelong		0421		Linux/i386 core file
43140752Simp!:strength / 2
44140752Simp>220	string		>\0		of '%s'
45140752Simp>200	lelong		>0		(signal %d)
46140752Simp#
47140752Simp# LILO boot/chain loaders, from Daniel Quinlan <quinlan@yggdrasil.com>
48140752Simp# this can be overridden by the DOS executable (COM) entry
49140752Simp2	string		LILO		Linux/i386 LILO boot/chain loader
50140752Simp#
51140752Simp# Linux make config build file, from Ole Aamot <oka@oka.no>
52140752Simp# Updated by Ken Sharp
53140752Simp28	string		make\ config		Linux make config build file (old)
54140752Simp49	search/70	Kernel\ Configuration	Linux make config build file
55140752Simp
56140752Simp#
57140752Simp# PSF fonts, from H. Peter Anvin <hpa@yggdrasil.com>
58140752Simp# Updated by Adam Buchbinder <adam.buchbinder@gmail.com>
59140752Simp# See: http://www.win.tue.nl/~aeb/linux/kbd/font-formats-1.html
60140752Simp0	leshort		0x0436		Linux/i386 PC Screen Font v1 data,
6152506Simp>2	byte&0x01	0		256 characters,
62140749Simp>2	byte&0x01	!0		512 characters,
63166788Simp>2	byte&0x02	0		no directory,
64140749Simp>2	byte&0x02	!0		Unicode directory,
65140749Simp>3	byte		>0		8x%d
66140749Simp0	string		\x72\xb5\x4a\x86\x00\x00 Linux/i386 PC Screen Font v2 data,
67149869Simp>16	lelong		x		%d characters,
68149869Simp>12	lelong&0x01	0		no directory,
69149561Simp>12	lelong&0x01	!0		Unicode directory,
70166787Simp>24	lelong		x		%d
71166787Simp>28	lelong		x		\bx%d
72166787Simp
73166787Simp# Linux swap file, from Daniel Quinlan <quinlan@yggdrasil.com>
74149869Simp4086	string		SWAP-SPACE	Linux/i386 swap file
75149869Simp# From: Jeff Bailey <jbailey@ubuntu.com>
7652506Simp# Linux swap file with swsusp1 image, from Jeff Bailey <jbailey@ubuntu.com>
77140793Simp4076	string		SWAPSPACE2S1SUSPEND	Linux/i386 swap file (new style) with SWSUSP1 image
78189680Simp# From: James Hunt <james.hunt@ubuntu.com>
79140793Simp4076    string          SWAPSPACE2LINHIB0001    Linux/i386 swap file (new style) (compressed hibernate)
8058545Simp# according to man page of mkswap (8) March 1999
8152506Simp# volume label and UUID Russell Coker
8265039Simp# http://etbe.coker.com.au/2008/07/08/label-vs-uuid-vs-device/
8365039Simp4086	string		SWAPSPACE2	Linux/i386 swap file (new style),
84149869Simp>0x400	long		x		version %d (4K pages),
8552506Simp>0x404	long		x		size %d pages,
86140793Simp>1052	string		\0		no label,
87149869Simp>1052	string		>\0		LABEL=%s,
88149869Simp>0x40c	belong		x		UUID=%08x
89149869Simp>0x410	beshort		x		\b-%04x
90149869Simp>0x412	beshort		x		\b-%04x
91149869Simp>0x414	beshort		x		\b-%04x
92149869Simp>0x416	belong		x		\b-%08x
93149869Simp>0x41a	beshort		x		\b%04x
94149869Simp# From Daniel Novotny <dnovotny@redhat.com>
95149869Simp# swap file for PowerPC
96140793Simp65526	string		SWAPSPACE2	Linux/ppc swap file
9752506Simp16374	string		SWAPSPACE2	Linux/ia64 swap file
9852506Simp#
9952506Simp# Linux kernel boot images, from Albert Cahalan <acahalan@cs.uml.edu>
10052506Simp# and others such as Axel Kohlmeyer <akohlmey@rincewind.chemie.uni-ulm.de>
10158545Simp# and Nicolas Lichtmaier <nick@debian.org>
10252506Simp# All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
10386455Simp# Linux kernel boot images (i386 arch) (Wolfram Kleff)
10479270Simp514	string		HdrS		Linux kernel
105107359Snon!:strength + 55
10652506Simp>510	leshort		0xAA55		x86 boot executable
10786269Simp>>518	leshort		>0x1ff
10886455Simp>>>529	byte		0		zImage,
109119225Simp>>>529	byte		1		bzImage,
11052506Simp>>>526	lelong		>0
111140749Simp>>>>(526.s+0x200) string	>\0	version %s,
11286455Simp>>498	leshort		1		RO-rootFS,
11358545Simp>>498	leshort		0		RW-rootFS,
114104854Simp>>508	leshort		>0		root_dev 0x%X,
115140886Simp>>502	leshort		>0		swap_dev 0x%X,
11652506Simp>>504	leshort		>0		RAMdisksize %u KB,
11786455Simp>>506	leshort		0xFFFF		Normal VGA
11852506Simp>>506	leshort		0xFFFE		Extended VGA
11986455Simp>>506	leshort		0xFFFD		Prompt for Videomode
12053813Simp>>506	leshort		>0		Video mode %d
121148141Simp# This also matches new kernels, which were caught above by "HdrS".
122100213Simp0		belong	0xb8c0078e	Linux kernel
12358545Simp>0x1e3		string	Loading		version 1.3.79 or older
12489945Simp>0x1e9		string	Loading		from prehistoric times
12584514Simp
126147872Simp# System.map files - Nicolas Lichtmaier <nick@debian.org>
12758545Simp8	search/1	\ A\ _text	Linux kernel symbol map text
128119234Simp
12969138Speter# LSM entries - Nicolas Lichtmaier <nick@debian.org>
130118634Simp0	search/1	Begin3	Linux Software Map entry text
131149561Simp0	search/1	Begin4	Linux Software Map entry text (new format)
132172572Sremko
13352506Simp# From Matt Zimmerman, enhanced for v3 by Matthew Palmer
13458545Simp0	belong	0x4f4f4f4d	User-mode Linux COW file
135140837Simp>4	belong	<3		\b, version %d
136140793Simp>>8	string	>\0		\b, backing file %s
137140793Simp>4	belong	>2		\b, version %d
138147872Simp>>32	string	>\0		\b, backing file %s
139140793Simp
140176868Srink############################################################################
14158545Simp# Linux kernel versions
14265039Simp
14392471Simp0		string		\xb8\xc0\x07\x8e\xd8\xb8\x00\x90	Linux
144140793Simp>497		leshort		0		x86 boot sector
145116207Simp>>514		belong		0x8e	of a kernel from the dawn of time!
14684514Simp>>514		belong		0x908ed8b4	version 0.99-1.1.42
14779270Simp>>514		belong		0x908ed8b8	for memtest86
148140793Simp
149190476Simp>497		leshort		!0		x86 kernel
15079270Simp>>504		leshort		>0		RAMdisksize=%u KB
151117438Simp>>502		leshort		>0		swap=0x%X
152117602Simp>>508		leshort		>0		root=0x%X
153148141Simp>>>498		leshort		1		\b-ro
154118895Simp>>>498		leshort		0		\b-rw
155119240Simp>>506		leshort		0xFFFF		vga=normal
156119240Simp>>506		leshort		0xFFFE		vga=extended
157119240Simp>>506		leshort		0xFFFD		vga=ask
158119240Simp>>506		leshort		>0		vga=%d
15993620Simp>>514		belong		0x908ed881	version 1.1.43-1.1.45
16086455Simp>>514		belong		0x15b281cd
161119240Simp>>>0xa8e	belong		0x55AA5a5a	version 1.1.46-1.2.13,1.3.0
162119240Simp>>>0xa99	belong		0x55AA5a5a	version 1.3.1,2
163119240Simp>>>0xaa3	belong		0x55AA5a5a	version 1.3.3-1.3.30
164119240Simp>>>0xaa6	belong		0x55AA5a5a	version 1.3.31-1.3.41
165119240Simp>>>0xb2b	belong		0x55AA5a5a	version 1.3.42-1.3.45
166140793Simp>>>0xaf7	belong		0x55AA5a5a	version 1.3.46-1.3.72
167119240Simp>>514		string		HdrS
168141122Simp>>>518		leshort		>0x1FF
169141122Simp>>>>529		byte		0		\b, zImage
170141122Simp>>>>529		byte		1		\b, bzImage
171141122Simp>>>>(526.s+0x200) string 	>\0		\b, version %s
172141122Simp
173141122Simp# Linux boot sector thefts.
174141122Simp0		belong		0xb8c0078e	Linux
175141122Simp>0x1e6		belong		0x454c4b53	ELKS Kernel
176145247Sdamien>0x1e6		belong		!0x454c4b53	style boot sector
177141122Simp
178119240Simp############################################################################
179119240Simp# Linux S390 kernel image
180140792Simp# Created by: Jan Kaluza <jkaluza@redhat.com>
181140792Simp8 string \x02\x00\x00\x18\x60\x00\x00\x50\x02\x00\x00\x68\x60\x00\x00\x50\x40\x40\x40\x40\x40\x40\x40\x40 Linux S390
182141122Simp>0x00010000 search/b/4096 \x00\x0a\x00\x00\x8b\xad\xcc\xcc
183119240Simp# 64bit
184190429Simp>>&0 string \xc1\x00\xef\xe3\xf0\x68\x00\x00 Z10 64bit kernel
185140793Simp>>&0 string \xc1\x00\xef\xc3\x00\x00\x00\x00 Z9-109 64bit kernel
18686455Simp>>&0 string \xc0\x00\x20\x00\x00\x00\x00\x00 Z990 64bit kernel
18786455Simp>>&0 string \x00\x00\x00\x00\x00\x00\x00\x00 Z900 64bit kernel
18889945Simp# 32bit
189149869Simp>>&0 string \x81\x00\xc8\x80\x00\x00\x00\x00 Z10 32bit kernel
19053813Simp>>&0 string \x81\x00\xc8\x80\x00\x00\x00\x00 Z9-109 32bit kernel
191189679Simp>>&0 string \x80\x00\x20\x00\x00\x00\x00\x00 Z990 32bit kernel
19271279Simp>>&0 string \x80\x00\x00\x00\x00\x00\x00\x00 Z900 32bit kernel
19371283Simp
194113667Ssanpei# Linux ARM compressed kernel image
19553813Simp# From: Kevin Cernekee <cernekee@gmail.com>
19652506Simp36	lelong	0x016f2818	Linux kernel ARM boot executable zImage (little-endian)
197140793Simp36	belong	0x016f2818	Linux kernel ARM boot executable zImage (big-endian)
198140792Simp
199107359Snon############################################################################
20071283Simp# Linux 8086 executable
20152506Simp0	lelong&0xFF0000FF 0xC30000E9	Linux-Dev86 executable, headerless
20252506Simp>5	string		.		
20386269Simp>>4	string		>\0		\b, libc version %s
20486269Simp
20552506Simp0	lelong&0xFF00FFFF 0x4000301	Linux-8086 executable
20653813Simp>2	byte&0x01	!0		\b, unmapped zero page
20752506Simp>2	byte&0x20	0		\b, impure
20865039Simp>2	byte&0x20	!0
20986269Simp>>2	byte&0x10	!0		\b, A_EXEC
21086269Simp>2	byte&0x02	!0		\b, A_PAL
21186269Simp>2	byte&0x04	!0		\b, A_NSYM
212135002Semax>2	byte&0x08	!0		\b, A_STAND
21386269Simp>2	byte&0x40	!0		\b, A_PURE
21452506Simp>2	byte&0x80	!0		\b, A_TOVLY
21552506Simp>28     long            !0              \b, not stripped
21652506Simp>37	string		.		
217180314Simp>>36	string		>\0		\b, libc version %s
21886455Simp
21984514Simp# 0	lelong&0xFF00FFFF 0x10000301	ld86 I80386 executable
22052506Simp# 0	lelong&0xFF00FFFF 0xB000301	ld86 M68K executable
221104854Simp# 0	lelong&0xFF00FFFF 0xC000301	ld86 NS16K executable
222180314Simp# 0	lelong&0xFF00FFFF 0x17000301	ld86 SPARC executable
22394461Simp
22486269Simp# SYSLINUX boot logo files (from 'ppmtolss16' sources)
22586269Simp# http://www.syslinux.org/wiki/index.php/SYSLINUX#Display_graphic_from_filename:
22686269Simp# file extension .lss .16
227147872Simp0	lelong	=0x1413f33d		SYSLINUX' LSS16 image data
22886269Simp# syslinux-4.05/mime/image/x-lss16.xml
22986269Simp!:mime image/x-lss16
23086269Simp>4	leshort	x			\b, width %d
23186269Simp>6	leshort	x			\b, height %d
23286269Simp
23386269Simp0	string	OOOM			User-Mode-Linux's Copy-On-Write disk image
234117614Simp>4	belong	x			version %d
235151226Simp
236151226Simp# SE Linux policy database
237117614Simp# From: Mike Frysinger <vapier@gentoo.org>
23886269Simp0	lelong	0xf97cff8c		SE Linux policy
23986269Simp>16	lelong	x			v%d
24086269Simp>20	lelong	1			MLS
241140793Simp>24	lelong	x			%d symbols
242140793Simp>28	lelong	x			%d ocons
243140793Simp
244180314Simp# Linux Logical Volume Manager (LVM) 
245140793Simp# Emmanuel VARAGNAT <emmanuel.varagnat@guzu.net>
24686455Simp#
247180314Simp# System ID, UUID and volume group name are 128 bytes long
24886455Simp# but they should never be full and initialized with zeros...
249116207Simp#
250116207Simp# LVM1
251116207Simp#
252117438Simp0x0	string	HM\001		LVM1 (Linux Logical Volume Manager), version 1
253180314Simp>0x12c	string	>\0		, System ID: %s
254117438Simp
25586269Simp0x0	string	HM\002		LVM1 (Linux Logical Volume Manager), version 2
25686269Simp>0x12c	string	>\0		, System ID: %s
25786269Simp
25886269Simp#  LVM2
259180314Simp#
26086269Simp# It seems that the label header can be in one the four first sector
26187757Simp# of the disk... (from _find_labeller in lib/label/label.c of LVM2)
262180314Simp#
26387757Simp# 0x200 seems to be the common case
26486455Simp
26586455Simp0x218           string  LVM2\ 001      LVM2 PV (Linux Logical Volume Manager)
26686455Simp# read the offset to add to the start of the header, and the header
267119231Simp# start in 0x200
268147872Simp>&(&-12.l-0x21) byte    x
269190473Simp# display UUID in LVM format + display all 32 bytes (instead of max string length: 31)
270147872Simp>>&0x0          string  >\x2f          \b, UUID: %.6s
271119231Simp>>&0x6          string  >\x2f          \b-%.4s
272147956Simp>>&0xa          string  >\x2f          \b-%.4s
273119231Simp>>&0xe          string  >\x2f          \b-%.4s
274119231Simp>>&0x12         string  >\x2f          \b-%.4s
27586269Simp>>&0x16         string  >\x2f          \b-%.4s
276147872Simp>>&0x1a         string  >\x2f          \b-%.6s
277180314Simp>>&0x20         lequad  x              \b, size: %lld
278147872Simp
27986269Simp0x018           string  LVM2\ 001      LVM2 PV (Linux Logical Volume Manager)
280109455Sshiba>&(&-12.l-0x21) byte    x
281151226Simp# display UUID in LVM format + display all 32 bytes (instead of max string length: 31)
282180314Simp>>&0x0          string  >\x2f          \b, UUID: %.6s
28387044Simp>>&0x6          string  >\x2f          \b-%.4s
28486269Simp>>&0xa          string  >\x2f          \b-%.4s
28565039Simp>>&0xe          string  >\x2f          \b-%.4s
28686269Simp>>&0x12         string  >\x2f          \b-%.4s
287147872Simp>>&0x16         string  >\x2f          \b-%.4s
28865039Simp>>&0x1a         string  >\x2f          \b-%.6s
28965039Simp>>&0x20         lequad  x              \b, size: %lld
29052506Simp
29186455Simp0x418           string  LVM2\ 001      LVM2 PV (Linux Logical Volume Manager)
29252506Simp>&(&-12.l-0x21) byte    x
293147872Simp# display UUID in LVM format + display all 32 bytes (instead of max string length: 31)
294147872Simp>>&0x0          string  >\x2f          \b, UUID: %.6s
29552506Simp>>&0x6          string  >\x2f          \b-%.4s
29686269Simp>>&0xa          string  >\x2f          \b-%.4s
29786269Simp>>&0xe          string  >\x2f          \b-%.4s
298180314Simp>>&0x12         string  >\x2f          \b-%.4s
29953813Simp>>&0x16         string  >\x2f          \b-%.4s
30052506Simp>>&0x1a         string  >\x2f          \b-%.6s
30152506Simp>>&0x20         lequad  x              \b, size: %lld
30252506Simp
30352506Simp0x618           string  LVM2\ 001      LVM2 PV (Linux Logical Volume Manager)
30452506Simp>&(&-12.l-0x21) byte    x              
30552506Simp# display UUID in LVM format + display all 32 bytes (instead of max string length: 31)
30652506Simp>>&0x0          string  >\x2f          \b, UUID: %.6s
307119225Simp>>&0x6          string  >\x2f          \b-%.4s
308119225Simp>>&0xa          string  >\x2f          \b-%.4s
309119225Simp>>&0xe          string  >\x2f          \b-%.4s
310119225Simp>>&0x12         string  >\x2f          \b-%.4s
31186455Simp>>&0x16         string  >\x2f          \b-%.4s
31286455Simp>>&0x1a         string  >\x2f          \b-%.6s
31386455Simp>>&0x20         lequad  x              \b, size: %lld
31489945Simp
315180314Simp# LVM snapshot
316180314Simp# from Jason Farrel
31789945Simp0	string	SnAp	LVM Snapshot (CopyOnWrite store)
31871279Simp>4	lelong	!0	- valid,
31971279Simp>4	lelong	0	- invalid,
32071279Simp>8	lelong	x	version %d,
32186269Simp>12	lelong	x	chunk_size %d
322100213Simp
323182251Simp# SE Linux policy database
324151322Simp0	lelong	0xf97cff8c		SE Linux policy
325147579Simp>16	lelong	x			v%d
32671279Simp>20	lelong	1			MLS
32786269Simp>24	lelong	x			%d symbols
32886269Simp>28	lelong	x			%d ocons
32986269Simp
33089945Simp# LUKS: Linux Unified Key Setup, On-Disk Format, http://luks.endorphin.org/spec
33189945Simp# Anthon van der Neut (anthon@mnt.org)
33289945Simp0	string	LUKS\xba\xbe	LUKS encrypted file,
33386269Simp>6	beshort x		ver %d
33486269Simp>8	string	x		[%s,
33586269Simp>40	string	x		%s,
33652506Simp>72	string	x		%s]
337139963Simp>168	string	x		UUID: %s
33852506Simp
33986269Simp
34053813Simp# Summary: Xen saved domain file
341120330Simp# Created by: Radek Vokal <rvokal@redhat.com>
34253813Simp0	string		LinuxGuestRecord	Xen saved domain
343100213Simp>20	search/256	(name			
344100213Simp>>&1	string		x			(name %s)
345100213Simp
346151839Simp# Type: Xen, the virtual machine monitor
347190795Simp# From: Radek Vokal <rvokal@redhat.com>
348151839Simp0	string		LinuxGuestRecord	Xen saved domain
349151839Simp#>2	regex		\(name\ [^)]*\)		%s
350140886Simp>20	search/256	(name			(name
351147872Simp>>&1	string		x			%s...)
352140887Simp
353140886Simp# Systemd journald files
354189680Simp# See http://www.freedesktop.org/wiki/Software/systemd/journal-files/.
355189680Simp# From: Zbigniew Jedrzejewski-Szmek <zbyszek@in.waw.pl>
356189680Simp
35792471Simp# check magic
35892471Simp0	string	LPKSHHRH
35992471Simp# check that state is one of known values
36052506Simp>16		ubyte&252	0
36171279Simp# check that each half of three unique id128s is non-zero
36265039Simp>>24		ubequad		>0
36365039Simp>>>32		ubequad		>0
36465039Simp>>>>40		ubequad		>0
36565039Simp>>>>>48		ubequad		>0
36687044Simp>>>>>>56	ubequad		>0
36765039Simp>>>>>>>64	ubequad		>0	Journal file
36852506Simp!:mime application/octet-stream
36965039Simp# provide more info
37089103Simp>>>>>>>>184	leqdate		0	empty
37153813Simp>>>>>>>>16	ubyte		0	\b, offline
37252506Simp>>>>>>>>16	ubyte		1	\b, online
37365039Simp>>>>>>>>16	ubyte		2	\b, archived
37486269Simp>>>>>>>>8	ulelong&1	1	\b, sealed
37565039Simp>>>>>>>>12	ulelong&1	1	\b, compressed
376121960Simp
377129164Simp# BCache backing and cache devices
37865039Simp# From: Gabriel de Perthuis <g2p.code@gmail.com>
379119213Simp0x1008		lequad		8
380127422Simp>0x1018		string		\xc6\x85\x73\xf6\x4e\x1a\x45\xca\x82\x65\xf5\x7f\x48\xba\x6d\x81	BCache
381140520Simp>>0x1010	ulequad		0	cache device
382140520Simp>>0x1010	ulequad		1	backing device
383140520Simp>>0x1010	ulequad		3	cache device
384119213Simp>>0x1010	ulequad		4	backing device
38552506Simp>>0x1048	string		>0	\b, label "%.32s"
38679270Simp>>0x1028	ubelong		x	\b, uuid %08x
387117764Simp>>0x102c	ubeshort	x	\b-%04x
38852506Simp>>0x102e	ubeshort	x	\b-%04x
38986269Simp>>0x1030	ubeshort	x	\b-%04x
39086269Simp>>0x1032	ubelong		x	\b-%08x
391147872Simp>>0x1036	ubeshort	x	\b%04x
39265039Simp>>0x1038	ubelong		x	\b, set uuid %08x
39386269Simp>>0x103c	ubeshort	x	\b-%04x
39486269Simp>>0x103e	ubeshort	x	\b-%04x
39586269Simp>>0x1040	ubeshort	x	\b-%04x
39658545Simp>>0x1042	ubelong		x	\b-%08x
39771279Simp>>0x1046	ubeshort	x	\b%04x
39858545Simp
39952506Simp# Linux device tree:
40086269Simp# File format description can be found in the Linux kernel sources at 
40158545Simp# Documentation/devicetree/booting-without-of.txt
40252506Simp# From Christoph Biedl
40352506Simp0		belong		0xd00dfeed
40452506Simp# structure and strings must be within blob
40586269Simp>&(8.L)		byte		x
40686269Simp>>&(12.L)	byte		x
407148141Simp>>>20		belong		>1	Device Tree Blob version %d
408148141Simp>>>>4		belong		x	\b, size=%d
40986269Simp>>>>20		belong		>1
41086269Simp>>>>>28		belong		x	\b, boot CPU=%d
41186269Simp>>>>20		belong		>2
412107359Snon>>>>>32		belong		x	\b, string block size=%d
41386269Simp>>>>20		belong		>16
414140749Simp>>>>>36		belong		x	\b, DT structure block size=%d
415140749Simp
416140749Simp