blob: adbdfe71e25dc2796032e480babdfb1a13e00094 [file] [log] [blame] [view]
Nico Huberc0b52db2022-12-15 12:42:32 +00001Manibuilder
2===========
3
4Manibuilder is a set of Dockerfiles for manic build testing, held
5together by some make-foo. Most of the Dockerfiles make use of
6*multiarch* images. This way we can test building on many platforms
7supported by *Qemu*. The idea is to test in environments as close
8as possible to those of potential users, i.e. no cross-compiling
9(with some exceptions).
10
11Make targets
12------------
13
14For each supported target OS/version/architecture exists a *tag*
15target, for instance `alpine:amd64-v3.7`. These targets will
16automatically check for existence of their respective *Docker*
17images (sub target <tag>-check-build), and build them if necessary
Nico Huberc3b02dc2023-08-12 01:13:45 +020018(<tag>-build). Finally, flashprog revision `$(TEST_REVISION)` is
Nico Huberc0b52db2022-12-15 12:42:32 +000019fetched and build tested.
20
21The results will be kept by *Docker* as stopped containers and
22can be accessed with the <tag>-shell target.
23
24There are some additional targets that form sets of the *tag*
25targets:
26
27* default: runs a preselected subset of all supported tags.
28* native: runs all tags native to the host architecture.
29* all: runs all supported tags.
30
31For each of these show-<set> lists the included *tags*.
32
33For preparation of *Qemu* for the *multiarch* images, there is the
34`register` target. It has to be run once per boot, though as it
35uses a privileged *Docker* container, that is kept as a manual step.
36
37Usage example
38-------------
39
40The most common use case may be testing the current upstream
41*master* branch which is the default for `$(TEST_REVISION)`.
42You'll need roughly 20GiB for the *Docker* images. Might look
43like this:
44
45 $ # have to register Qemu first:
46 $ make register
47 [...]
48 $ # run the default target:
Nico Huberd4fbbb42022-12-11 17:02:57 +000049 $ make -j4 -k 2>/dev/null
Nico Huberc0b52db2022-12-15 12:42:32 +000050 debian-debootstrap:mips-stretch: 2
51 debian-debootstrap:mips-sid: 2
52 debian-debootstrap:mips-buster: 2
53 ubuntu-debootstrap:powerpc-xenial: 2
54 djgpp:6.1.0: 2
55
56For each *tag* that returns with a non-zero exit code, the *tag*
57and actual exit code is printed. An exit code of `2` is most likely
58as that is what *make* returns on failure. Other exit codes might
Nico Huberd4fbbb42022-12-11 17:02:57 +000059hint towards a problem in the setup. The `-k` lets *make* continue
60running all *tags* even if one failed. Failing *tags* can then be
Nico Huberc0b52db2022-12-15 12:42:32 +000061investigated individually with the <tag>-shell target, e.g.:
62
63 $ make debian-debootstrap:mips-sid-shell
64 [...]
Nico Huberc3b02dc2023-08-12 01:13:45 +020065 mani@63536fc102a5:~/flashprog$ make
Nico Huberc0b52db2022-12-15 12:42:32 +000066 [...]
Nico Huberc3b02dc2023-08-12 01:13:45 +020067 cc -MMD -Os -Wall -Wshadow -Werror -I/usr/include/libusb-1.0 -D'CONFIG_DEFAULT_PROGRAMMER=PROGRAMMER_INVALID' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS="''"' -D'CONFIG_SERPROG=1' -D'CONFIG_PONY_SPI=1' -D'CONFIG_BITBANG_SPI=1' -D'CONFIG_GFXNVIDIA=1' -D'CONFIG_SATASII=1' -D'CONFIG_ATAVIA=1' -D'CONFIG_IT8212=1' -D'CONFIG_FT2232_SPI=1' -D'CONFIG_USBBLASTER_SPI=1' -D'CONFIG_PICKIT2_SPI=1' -D'HAVE_FT232H=1' -D'CONFIG_DUMMY=1' -D'CONFIG_DRKAISER=1' -D'CONFIG_NICINTEL=1' -D'CONFIG_NICINTEL_SPI=1' -D'CONFIG_NICINTEL_EEPROM=1' -D'CONFIG_OGP_SPI=1' -D'CONFIG_BUSPIRATE_SPI=1' -D'CONFIG_DEDIPROG=1' -D'CONFIG_DEVELOPERBOX_SPI=1' -D'CONFIG_LINUX_MTD=1' -D'CONFIG_LINUX_SPI=1' -D'CONFIG_CH341A_SPI=1' -D'CONFIG_DIGILENT_SPI=1' -D'NEED_PCI=1' -D'NEED_RAW_ACCESS=1' -D'NEED_LIBUSB0=1' -D'NEED_LIBUSB1=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHPROG_VERSION="p1.0-141-g9cecc7e"' -o libflashprog.o -c libflashprog.c
68 libflashprog.c:386:12: error: 'flashprog_layout_parse_fmap' defined but not used [-Werror=unused-function]
69 static int flashprog_layout_parse_fmap(struct flashprog_layout **layout,
Nico Huberc0b52db2022-12-15 12:42:32 +000070 ^~~~~~~~~~~~~~~~~~~~~~~~~~
71 cc1: all warnings being treated as errors
Nico Huberc3b02dc2023-08-12 01:13:45 +020072 make: *** [Makefile:1075: libflashprog.o] Error 1
Nico Huberc0b52db2022-12-15 12:42:32 +000073 $ # uh-huh, might be a problem with big-endian #if foo