Lines Matching +full:- +full:a

2 # Sample multi-part application Makefile
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
33 # signed-hello1.bin: A signed sample.
34 # signed-hello2.bin: An upgrade image, signed and marked for
39 # time, you should see a message about the bootloader not being able
40 # to find a bootable image.
43 # "primary slot". This should boot into this app, print a small message, and
51 # Extra .conf fragments to merge into the MCUboot .config, as a
52 # semicolon-separated list (i.e., a CMake list).
66 SIGNING_KEY ?= ../../root-rsa-2048.pem
69 # CONFIG_TEXT_SECTION_OFFSET. This value needs to be a power of two
98 $(ASSEMBLE) -b $(BUILD_DIR_BOOT) \
99 -z $(ZEPHYR_BASE) \
100 -p signed-hello1.bin \
101 -s signed-hello2.bin \
102 -o full.bin
105 @rm -f signed-hello1.bin
106 @rm -f signed-hello2.bin
107 @rm -f mcuboot.bin
110 @rm -f mcuboot.bin
111 (mkdir -p $(BUILD_DIR_BOOT) && \
113 cmake -DEXTRA_CONF_FILE=$(BOOTLOADER_EXTRA_CONF_FILE) \
114 -G"Ninja" \
115 -DBOARD=$(BOARD) \
121 rm -rf $(BUILD_DIR_BOOT)
125 (mkdir -p $(BUILD_DIR_HELLO1) && \
127 cmake -DFROM_WHO=hello1 \
128 -G"Ninja" \
129 -DBOARD=$(BOARD) \
130 $(SOURCE_DIRECTORY)/hello-world && \
133 --key $(SIGNING_KEY) \
134 --header-size $(BOOT_HEADER_LEN) \
135 --align $(FLASH_ALIGNMENT) \
136 --version 1.2 \
137 --slot-size $(SLOT_SIZE) \
139 signed-hello1.bin
142 rm -rf $(BUILD_DIR_HELLO1)
146 # "--pad" argument. This will also add the trailer that indicates
150 (mkdir -p $(BUILD_DIR_HELLO2) && \
152 cmake -DFROM_WHO=hello2 \
153 -G"Ninja" \
154 -DBOARD=$(BOARD) \
155 $(SOURCE_DIRECTORY)/hello-world && \
158 --key $(SIGNING_KEY) \
159 --header-size $(BOOT_HEADER_LEN) \
160 --align $(FLASH_ALIGNMENT) \
161 --version 1.2 \
162 --slot-size $(SLOT_SIZE) \
163 --pad \
165 signed-hello2.bin
168 rm -rf $(BUILD_DIR_HELLO2)
174 $(PYOCD) flash -e chip -a $(BOOT_ADDR) mcuboot.bin
177 $(PYOCD) flash -a $(IMG0_ADDR) signed-hello1.bin
180 $(PYOCD) flash -a $(IMG1_ADDR) signed-hello2.bin
183 $(PYOCD) flash -e chip -a $(BOOT_ADDR) full.bin
185 # These test- targets reinvoke make with the configuration set to test
189 # Test a good image, with a good upgrade, using RSA signatures.
194 test-good-rsa: clean
196 BOOTLOADER_EXTRA_CONF_FILE=$(PWD)/overlay-rsa.conf \
199 # Test a good image, with a good upgrade, using ECDSA signatures.
204 test-good-ecdsa: clean
206 BOOTLOADER_EXTRA_CONF_FILE=$(PWD)/overlay-ecdsa-p256.conf \
207 SIGNING_KEY=../../root-ec-p256.pem \
210 # Test (with RSA) that overwrite-only works. This should boot,
216 test-overwrite: clean
218 BOOTLOADER_EXTRA_CONF_FILE=$(PWD)/overlay-upgrade-only.conf \
221 # Test that when configured for RSA, a wrong signature in the upgrade
227 test-bad-rsa-upgrade: clean
229 BOOTLOADER_EXTRA_CONF_FILE=$(PWD)/overlay-rsa.conf \
232 BOOTLOADER_EXTRA_CONF_FILE=$(PWD)/overlay-rsa.conf \
233 SIGNING_KEY=../../root-ec-p256.pem \
236 # Test that when configured for ECDSA, a wrong signature in the upgrade
242 test-bad-ecdsa-upgrade: clean
244 BOOTLOADER_EXTRA_CONF_FILE=$(PWD)/overlay-ecdsa-p256.conf \
245 SIGNING_KEY=../../root-ec-p256.pem \
248 BOOTLOADER_EXTRA_CONF_FILE=$(PWD)/overlay-ecdsa-p256.conf \
249 SIGNING_KEY=../../root-rsa-2048.pem \
258 test-no-bootcheck: clean
260 BOOTLOADER_EXTRA_CONF_FILE=$(PWD)/overlay-skip-primary-slot-validate.conf \
261 SIGNING_KEY=../../root-ec-p256.pem \
264 # Test a good image, with a wrong-signature upgrade, using RSA signatures.
269 test-wrong-rsa: clean
271 BOOTLOADER_EXTRA_CONF_FILE=$(PWD)/overlay-rsa.conf \
274 BOOTLOADER_EXTRA_CONF_FILE=$(PWD)/overlay-rsa.conf \
275 SIGNING_KEY=bad-keys/bad-rsa-2048.pem \
278 # Test a good image, with a wrong-signature upgrade, using ECDSA signatures.
283 test-wrong-ecdsa: clean
285 BOOTLOADER_EXTRA_CONF_FILE=$(PWD)/overlay-ecdsa-p256.conf \
286 SIGNING_KEY=../../root-ec-p256.pem \
289 BOOTLOADER_EXTRA_CONF_FILE=$(PWD)/overlay-ecdsa-p256.conf \
290 SIGNING_KEY=bad-keys/bad-ec-p256.pem \
294 @if [ -z "$$ZEPHYR_BASE" ]; then echo "Zephyr environment not set up"; false; fi
295 @if [ -z "$(BOARD)" ]; then echo "You must specify BOARD=<board>"; false; fi