Commit Graph

10 Commits

Author SHA1 Message Date
David Brown 0bae965fd8 Zephyr: Use mbed TLS allocator
Instead of the overly-simplistic allocator in Zephyr, use the still
simplistic allocator in mbed TLS.

On K64f, this saves 848 bytes of text, 44 bytes of data, and 208 bytes
of bss.

Signed-off-by: David Brown <david.brown@linaro.org>
2017-10-30 22:33:08 -06:00
Marti Bolivar f4d0e1adf2 zephyr: turn off I2C
Upstream Zephyr is making a habit of enabling subsystems on any board
that supports them. That's a potential security risk if any of those
allow interference with the running bootloader, and is currently
exceeding mcuboot's flash allowance on some STM32 targets,
e.g. 96b_carbon. Turn off I2C to restore the build for those.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-08-31 08:29:53 -06:00
Marti Bolivar d9072bc3c8 zephyr: s/BLUETOOTH/BT/
Upstream has made a breaking namespace change. Keep up.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-08-09 15:43:09 -06:00
David Brown 0d1b0b952e zephyr: Enable MPU flash writing
Recent Zephyr trees require this config option to be set in order to be
able to write to the flash device.  Without it, targets with an MPU
enabled will abort during startup, usually before even printing a
message to the UART.

Signed-off-by: David Brown <david.brown@linaro.org>
2017-07-26 18:42:29 -06:00
Ricardo Salveti 8e4d44d1e4 zephyr: disable clock before reset
Avoid clock related interrupts before jumping into the first image. Safe
to disable as the first application will enable the clock/timer again
once booted.

Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2017-03-17 15:12:17 -04:00
Andrew Boie 240ac64e83 zephyr: disable multithreading
The bootloader is just using Zephyr as a HAL and doesn't require
thread scheduling. Build Zephyr in single-threaded mode and gain
some footprint savings.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-03-15 10:16:17 -07:00
Ricardo Salveti 7cf3d9ec91 zephyr: use SYS_LOG instead of printk
Easier to manage and can be easily disabled via config.

Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2017-01-19 19:51:35 -02:00
Ricardo Salveti 3dbf2229e6 boot/zephyr/prj.conf: disable bluetooth support by default
Bluetooth is enabled by default with some boards, so just make sure that
it gets disabled here to avoid having a large bootloader firmware.

Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2017-01-19 19:51:01 -02:00
Ricardo Salveti 43fc2cd556 boot/zephyr/prj.conf: remove SOC_FLASH_STM32F4, make it generic
Make it generic and let the SoC itself handle the FLASH driver support
as part of the Zephyr build system.

Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
2017-01-19 19:51:01 -02:00
David Brown 299245d7de zephyr: Move code under 'boot' directory
The Zephyr build systems makes some assumptions about the directory
layout, and encounters problems if the necessary path contains "../..".
To help this, place the zephyr directory next to the bootutil directory
so that the Makefile can just refer to "../bootutil".  This keeps all of
the build artifacts under the proper top-level directory.
2017-01-10 09:49:47 -07:00