BL602: import WiFi/device config injected into firmware image#2150
Open
kruzer wants to merge 1 commit into
Open
BL602: import WiFi/device config injected into firmware image#2150kruzer wants to merge 1 commit into
kruzer wants to merge 1 commit into
Conversation
Adds an embedded config block (.rodata, magic "OBKCFG1" + CRC32) that can be patched into a firmware .bin before OTA/flash. On boot, CFG_InitAndLoad imports the SSID/password/device name into EasyFlash config, but only if: - the block is marked valid and its CRC32 matches - no WiFi SSID is already configured - this exact block (by CRC) was not already imported This lets a provisioning tool bake credentials into the image without a serial console or web setup step. No-op on other platforms.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an embedded config block in
.rodata(magicOBKCFG1+ CRC32) that a provisioning tool can patch into a firmware.binbefore OTA/flash. On boot,CFG_InitAndLoad()imports the SSID / password / device name into the EasyFlash config — but only if:This lets credentials be baked into the image without a serial console or web setup step. No-op on other platforms (guarded by
PLATFORM_BL602).Files
src/hal/bl602/hal_ota_config_bl602.c/.h— the embedded block, CRC check and import logicsrc/new_cfg.c— callsOBK_OtaConfig_TryImport()at the end ofCFG_InitAndLoad()Test plan
make OpenBL602(canonical build)OtaCfg: not marked valid (flags=0x00), skipand boots normally