summaryrefslogtreecommitdiff
path: root/pkg/u-boot/gen.lua
blob: 430420796a44cd7cd289a6990849ef6565cc5fc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
cflags{
	'-D USE_HOSTCC',
	'-I $dir',
	'-I $srcdir/tools',
	'-isystem $builddir/pkg/linux-headers/include',
	'-idirafter $srcdir/include',
	'-include $srcdir/include/compiler.h',
}

pkg.deps = {
	'pkg/linux-headers/headers',
}

-- XXX: missing imximage.c and fdtdec_common.c, but seems to build without them
local objs = objects[[
	tools/(
		aisimage.c
		atmelimage.c
		default_image.c
		imagetool.c
		imx8image.c
		imx8mimage.c
		kwbimage.c
		lpc32xximage.c
		mxsimage.c
		omapimage.c
		os_support.c
		pblimage.c
		pbl_crc32.c
		vybridimage.c
		stm32image.c
		rkcommon.c
		rkimage.c
		rksd.c
		rkspi.c
		socfpgaimage.c
		ublimage.c
		zynqimage.c
		zynqmpimage.c
		zynqmpbif.c
		gpimage.c
		gpimage-common.c
		mtk_image.c
	)
	common/(
		bootm.c
		image.c
		hash.c
	)
	lib/(
		crc16.c
		crc32.c
		fdtdec.c
		md5.c
		rc4.c
		sha1.c
		sha256.c
	)
]]

exe('mkimage', {'tools/mkimage.c', objs})
file('bin/mkimage', '755', '$outdir/mkimage')

exe('dumpimage', {'tools/dumpimage.c', objs})
file('bin/dumpimage', '755', '$outdir/dumpimage')

fetch 'curl'