1 # SPDX-License-Identifier: GPL-2.0+
2 # Copyright 2022 Google LLC
10 # Define a base ITS which we can adjust using % and a dictionary
15 description = "Example kernel";
19 data = /incbin/("%(kernel)s");
25 compression = "%(compression)s";
28 compatible = "vbe,random-rand";
33 compatible = "vbe,aslr-move";
34 vbe,align = <0x100000>;
37 compatible = "vbe,aslr-rand";
40 compatible = "vbe,efi-runtime-rand";
43 compatible = "vbe,wibble";
49 data = /incbin/("%(fdt)s");
52 load = <%(fdt_addr)#x>;
53 compression = "%(compression)s";
66 # Define a base FDT - currently we don't use anything in this
76 # This is the U-Boot script that is run for each test. First load the FIT,
77 # then run the 'bootm' command, then run the unit test which checks that the
78 # working tree has the required things filled in according to the OS requests
79 # above (random, aslr2, etc.)
81 host load hostfs 0 %(fit_addr)x %(fit)s
83 bootm start %(fit_addr)x
88 ut bootstd -f vbe_test_fixup_norun
91 @pytest.mark.boardspec('sandbox_flattree')
92 @pytest.mark.requiredtool('dtc')
93 def test_vbe(u_boot_console):
95 kernel = fit_util.make_kernel(cons, 'vbe-kernel.bin', 'kernel')
96 fdt = fit_util.make_dtb(cons, base_fdt, 'vbe-fdt')
97 fdt_out = fit_util.make_fname(cons, 'fdt-out.dtb')
106 'fdt_addr' : 0x80000,
109 'compression' : 'none',
111 mkimage = cons.config.build_dir + '/tools/mkimage'
112 fit = fit_util.make_fit(cons, mkimage, base_its, params, 'test-vbe.fit',
115 cmd = base_script % params
117 with cons.log.section('Kernel load'):
118 output = cons.run_command_list(cmd.splitlines())
120 assert 'failures: 0' in output[-1]