From 970aad565cf7e53ac3965efdddbf66180b03c315 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Bruhn Date: Tue, 19 Apr 2022 11:53:03 +0200 Subject: [PATCH] Finish rename --- TODO.md | 1 - codegen/src/linker.rs | 8 ++++---- src/boot/mod.rs | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/TODO.md b/TODO.md index c1393cf..a134b38 100644 --- a/TODO.md +++ b/TODO.md @@ -1,7 +1,6 @@ * Add optional copy which is protected against power failure without spearate flash bank * Implement power-interrupt safe exchange operation with a temporary flash page sdtorage * More hooks? -* Properly rename to moonboot from moonshine/moonboots * Use MPU to protect memory regions from invalid access https://github.com/helium/cortex-mpu * => use pow2::Pow2 for linker scripts? * Implement signature check in Bootloader diff --git a/codegen/src/linker.rs b/codegen/src/linker.rs index c709463..d3ca3ca 100644 --- a/codegen/src/linker.rs +++ b/codegen/src/linker.rs @@ -23,12 +23,12 @@ fn generate_linker_script( MEMORY {{ FLASH : ORIGIN = 0x{flash_origin:08x}, LENGTH = {flash_length} RAM : ORIGIN = 0x{ram_origin:08x}, LENGTH = {ram_length} - MOONSHINE_STATE: ORIGIN = 0x{state_origin:08x}, LENGTH = {state_section_length} + MOONBOOT_STATE: ORIGIN = 0x{state_origin:08x}, LENGTH = {state_section_length} }} - _moonshine_state_crc_start = ORIGIN(MOONSHINE_STATE); - _moonshine_state_len_start = ORIGIN(MOONSHINE_STATE) + {crc_length}; - _moonshine_state_data_start = ORIGIN(MOONSHINE_STATE) + {crc_length} + {data_len_length}; + _moonboot_state_crc_start = ORIGIN(MOONBOOT_STATE); + _moonboot_state_len_start = ORIGIN(MOONBOOT_STATE) + {crc_length}; + _moonboot_state_data_start = ORIGIN(MOONBOOT_STATE) + {crc_length} + {data_len_length}; PROVIDE(_moonboots_pre_jump = __moonboots_default_pre_jump); ", flash_origin = flash_origin, diff --git a/src/boot/mod.rs b/src/boot/mod.rs index dad19e2..3db4df8 100644 --- a/src/boot/mod.rs +++ b/src/boot/mod.rs @@ -67,7 +67,7 @@ impl< /// Execute the update and boot logic of the bootloader pub fn boot(&mut self) -> Result { // TODO: consider error handling - log::info!("Booting with moonshine!"); + log::info!("Booting with moonboot!"); self.processor.setup(&self.config);