From b35cb43caf2ffb381069d2c93f39a9ea3b055aa3 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Fri, 25 Sep 2020 15:30:36 +1000 Subject: [PATCH] bootloader_support: Add dummy ESP32-S3 RNG support --- .../subproject/main/ld/esp32s3/bootloader.ld | 1 + components/bootloader_support/component.mk | 3 +- .../src/bootloader_random_esp32s3.c | 28 +++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 components/bootloader_support/src/bootloader_random_esp32s3.c diff --git a/components/bootloader/subproject/main/ld/esp32s3/bootloader.ld b/components/bootloader/subproject/main/ld/esp32s3/bootloader.ld index cfef023bf9..312ceaa531 100644 --- a/components/bootloader/subproject/main/ld/esp32s3/bootloader.ld +++ b/components/bootloader/subproject/main/ld/esp32s3/bootloader.ld @@ -29,6 +29,7 @@ SECTIONS *libbootloader_support.a:bootloader_common.*(.literal .text .literal.* .text.*) *libbootloader_support.a:bootloader_flash.*(.literal .text .literal.* .text.*) *libbootloader_support.a:bootloader_random.*(.literal .text .literal.* .text.*) + *libbootloader_support.a:bootloader_random*.*(.literal.bootloader_random_disable .text.bootloader_random_disable) *libbootloader_support.a:bootloader_efuse_esp32s3.*(.literal .text .literal.* .text.*) *libbootloader_support.a:bootloader_utility.*(.literal .text .literal.* .text.*) *libbootloader_support.a:bootloader_sha.*(.literal .text .literal.* .text.*) diff --git a/components/bootloader_support/component.mk b/components/bootloader_support/component.mk index 17645261e3..5afe25f669 100644 --- a/components/bootloader_support/component.mk +++ b/components/bootloader_support/component.mk @@ -27,7 +27,8 @@ COMPONENT_OBJEXCLUDE += src/bootloader_flash_config_esp32s2.o \ src/bootloader_flash_config_esp32s3.o \ src/bootloader_efuse_esp32s2.o \ src/bootloader_efuse_esp32s3.o \ - src/bootloader_random_esp32s2.o + src/bootloader_random_esp32s2.o \ + src/bootloader_random_esp32s3.o ifndef CONFIG_SECURE_SIGNED_APPS_ECDSA_SCHEME ifndef CONFIG_SECURE_SIGNED_APPS_RSA_SCHEME diff --git a/components/bootloader_support/src/bootloader_random_esp32s3.c b/components/bootloader_support/src/bootloader_random_esp32s3.c new file mode 100644 index 0000000000..a7f6b7e45a --- /dev/null +++ b/components/bootloader_support/src/bootloader_random_esp32s3.c @@ -0,0 +1,28 @@ +// Copyright 2020 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#include "sdkconfig.h" +#include "bootloader_random.h" +#include "esp_log.h" + +static const char *TAG = "bootloader_random"; + +void bootloader_random_enable(void) +{ + ESP_LOGW(TAG, "RNG for ESP32-S3 not currently supported"); // IDF-1878 +} + +void bootloader_random_disable(void) +{ + ESP_LOGW(TAG, "RNG for ESP32-S3 not currently supported"); // IDF-1878 +}