From cb91b51c52c2dbdb3e063238293c41425b739d41 Mon Sep 17 00:00:00 2001 From: lovyan03 <42724151+lovyan03@users.noreply.github.com> Date: Fri, 26 Nov 2021 21:04:23 +0900 Subject: [PATCH 1/2] bugfix: Conflicting declaration error with include, and Unified secure_boot.h include guard to "pragma once". --- components/esp_rom/include/esp32/rom/secure_boot.h | 5 +---- components/esp_rom/include/esp32c3/rom/secure_boot.h | 8 +------- components/esp_rom/include/esp32h2/rom/secure_boot.h | 8 +------- components/esp_rom/include/esp32s2/rom/secure_boot.h | 8 +------- components/esp_rom/include/esp32s3/rom/secure_boot.h | 3 --- components/esp_rom/include/esp8684/rom/secure_boot.h | 8 +------- 6 files changed, 5 insertions(+), 35 deletions(-) diff --git a/components/esp_rom/include/esp32/rom/secure_boot.h b/components/esp_rom/include/esp32/rom/secure_boot.h index 1eb69e2537..004d1591c5 100644 --- a/components/esp_rom/include/esp32/rom/secure_boot.h +++ b/components/esp_rom/include/esp32/rom/secure_boot.h @@ -14,8 +14,7 @@ #include "sdkconfig.h" -#ifndef _ROM_SECURE_BOOT_H_ -#define _ROM_SECURE_BOOT_H_ +#pragma once #include #include "ets_sys.h" @@ -128,5 +127,3 @@ bool ets_use_secure_boot_v2(void); #ifdef __cplusplus } #endif - -#endif /* _ROM_SECURE_BOOT_H_ */ diff --git a/components/esp_rom/include/esp32c3/rom/secure_boot.h b/components/esp_rom/include/esp32c3/rom/secure_boot.h index 71cf7250d2..d773089b4c 100644 --- a/components/esp_rom/include/esp32c3/rom/secure_boot.h +++ b/components/esp_rom/include/esp32c3/rom/secure_boot.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ROM_SECURE_BOOT_H_ -#define _ROM_SECURE_BOOT_H_ +#pragma once #include #include @@ -24,9 +23,6 @@ extern "C" { #endif -struct ets_secure_boot_sig_block; -struct ets_secure_boot_signature_t; - typedef struct ets_secure_boot_sig_block ets_secure_boot_sig_block_t; typedef struct ets_secure_boot_signature ets_secure_boot_signature_t; typedef struct ets_secure_boot_key_digests ets_secure_boot_key_digests_t; @@ -127,5 +123,3 @@ struct ets_secure_boot_key_digests { #ifdef __cplusplus } #endif - -#endif /* _ROM_SECURE_BOOT_H_ */ diff --git a/components/esp_rom/include/esp32h2/rom/secure_boot.h b/components/esp_rom/include/esp32h2/rom/secure_boot.h index 71cf7250d2..d773089b4c 100644 --- a/components/esp_rom/include/esp32h2/rom/secure_boot.h +++ b/components/esp_rom/include/esp32h2/rom/secure_boot.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ROM_SECURE_BOOT_H_ -#define _ROM_SECURE_BOOT_H_ +#pragma once #include #include @@ -24,9 +23,6 @@ extern "C" { #endif -struct ets_secure_boot_sig_block; -struct ets_secure_boot_signature_t; - typedef struct ets_secure_boot_sig_block ets_secure_boot_sig_block_t; typedef struct ets_secure_boot_signature ets_secure_boot_signature_t; typedef struct ets_secure_boot_key_digests ets_secure_boot_key_digests_t; @@ -127,5 +123,3 @@ struct ets_secure_boot_key_digests { #ifdef __cplusplus } #endif - -#endif /* _ROM_SECURE_BOOT_H_ */ diff --git a/components/esp_rom/include/esp32s2/rom/secure_boot.h b/components/esp_rom/include/esp32s2/rom/secure_boot.h index 8e88081786..173b95aa03 100644 --- a/components/esp_rom/include/esp32s2/rom/secure_boot.h +++ b/components/esp_rom/include/esp32s2/rom/secure_boot.h @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef _ROM_SECURE_BOOT_H_ -#define _ROM_SECURE_BOOT_H_ +#pragma once #include #include "ets_sys.h" @@ -23,9 +22,6 @@ extern "C" { #endif -struct ets_secure_boot_sig_block; -struct ets_secure_boot_signature_t; - typedef struct ets_secure_boot_sig_block ets_secure_boot_sig_block_t; typedef struct ets_secure_boot_signature ets_secure_boot_signature_t; typedef struct ets_secure_boot_key_digests ets_secure_boot_key_digests_t; @@ -126,5 +122,3 @@ struct ets_secure_boot_key_digests { #ifdef __cplusplus } #endif - -#endif /* _ROM_SECURE_BOOT_H_ */ diff --git a/components/esp_rom/include/esp32s3/rom/secure_boot.h b/components/esp_rom/include/esp32s3/rom/secure_boot.h index e720697b3e..0b3b6751cf 100644 --- a/components/esp_rom/include/esp32s3/rom/secure_boot.h +++ b/components/esp_rom/include/esp32s3/rom/secure_boot.h @@ -23,9 +23,6 @@ extern "C" { #endif -struct ets_secure_boot_sig_block; -struct ets_secure_boot_signature_t; - typedef struct ets_secure_boot_sig_block ets_secure_boot_sig_block_t; typedef struct ets_secure_boot_signature ets_secure_boot_signature_t; typedef struct ets_secure_boot_key_digests ets_secure_boot_key_digests_t; diff --git a/components/esp_rom/include/esp8684/rom/secure_boot.h b/components/esp_rom/include/esp8684/rom/secure_boot.h index 1b21ee8f11..3dcaf6f09c 100644 --- a/components/esp_rom/include/esp8684/rom/secure_boot.h +++ b/components/esp_rom/include/esp8684/rom/secure_boot.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#ifndef _ROM_SECURE_BOOT_H_ -#define _ROM_SECURE_BOOT_H_ +#pragma once #include #include @@ -16,9 +15,6 @@ extern "C" { #endif -struct ets_secure_boot_sig_block; -struct ets_secure_boot_signature_t; - typedef struct ets_secure_boot_sig_block ets_secure_boot_sig_block_t; typedef struct ets_secure_boot_signature ets_secure_boot_signature_t; typedef struct ets_secure_boot_key_digests ets_secure_boot_key_digests_t; @@ -119,5 +115,3 @@ struct ets_secure_boot_key_digests { #ifdef __cplusplus } #endif - -#endif /* _ROM_SECURE_BOOT_H_ */ From f667b1039b0faa3c7a6e1809725b7b62697ed5d5 Mon Sep 17 00:00:00 2001 From: Mahavir Jain Date: Tue, 30 Nov 2021 22:25:33 +0530 Subject: [PATCH 2/2] Fix copyright headers for few include files --- .../esp_rom/include/esp32/rom/secure_boot.h | 18 +++++------------- .../esp_rom/include/esp32c3/rom/secure_boot.h | 18 +++++------------- .../esp_rom/include/esp32h2/rom/secure_boot.h | 18 +++++------------- .../esp_rom/include/esp32s2/rom/secure_boot.h | 18 +++++------------- .../esp_rom/include/esp32s3/rom/secure_boot.h | 18 +++++------------- tools/ci/check_copyright_ignore.txt | 5 ----- 6 files changed, 25 insertions(+), 70 deletions(-) diff --git a/components/esp_rom/include/esp32/rom/secure_boot.h b/components/esp_rom/include/esp32/rom/secure_boot.h index 004d1591c5..50a3fcd494 100644 --- a/components/esp_rom/include/esp32/rom/secure_boot.h +++ b/components/esp_rom/include/esp32/rom/secure_boot.h @@ -1,16 +1,8 @@ -// Copyright 2015-2016 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. +/* + * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include "sdkconfig.h" diff --git a/components/esp_rom/include/esp32c3/rom/secure_boot.h b/components/esp_rom/include/esp32c3/rom/secure_boot.h index d773089b4c..a9d417283b 100644 --- a/components/esp_rom/include/esp32c3/rom/secure_boot.h +++ b/components/esp_rom/include/esp32c3/rom/secure_boot.h @@ -1,16 +1,8 @@ -// 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. +/* + * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once diff --git a/components/esp_rom/include/esp32h2/rom/secure_boot.h b/components/esp_rom/include/esp32h2/rom/secure_boot.h index d773089b4c..36a490d858 100644 --- a/components/esp_rom/include/esp32h2/rom/secure_boot.h +++ b/components/esp_rom/include/esp32h2/rom/secure_boot.h @@ -1,16 +1,8 @@ -// 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. +/* + * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once diff --git a/components/esp_rom/include/esp32s2/rom/secure_boot.h b/components/esp_rom/include/esp32s2/rom/secure_boot.h index 173b95aa03..a0fcecfd3c 100644 --- a/components/esp_rom/include/esp32s2/rom/secure_boot.h +++ b/components/esp_rom/include/esp32s2/rom/secure_boot.h @@ -1,16 +1,8 @@ -// 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. +/* + * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once diff --git a/components/esp_rom/include/esp32s3/rom/secure_boot.h b/components/esp_rom/include/esp32s3/rom/secure_boot.h index 0b3b6751cf..a372517b7a 100644 --- a/components/esp_rom/include/esp32s3/rom/secure_boot.h +++ b/components/esp_rom/include/esp32s3/rom/secure_boot.h @@ -1,16 +1,8 @@ -// Copyright 2015-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. +/* + * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once diff --git a/tools/ci/check_copyright_ignore.txt b/tools/ci/check_copyright_ignore.txt index 6370119c6f..e22d9344fe 100644 --- a/tools/ci/check_copyright_ignore.txt +++ b/tools/ci/check_copyright_ignore.txt @@ -748,7 +748,6 @@ components/esp_rom/include/esp32/rom/md5_hash.h components/esp_rom/include/esp32/rom/miniz.h components/esp_rom/include/esp32/rom/rsa_pss.h components/esp_rom/include/esp32/rom/rtc.h -components/esp_rom/include/esp32/rom/secure_boot.h components/esp_rom/include/esp32/rom/sha.h components/esp_rom/include/esp32/rom/spi_flash.h components/esp_rom/include/esp32/rom/tbconsole.h @@ -772,7 +771,6 @@ components/esp_rom/include/esp32c3/rom/miniz.h components/esp_rom/include/esp32c3/rom/rom_layout.h components/esp_rom/include/esp32c3/rom/rsa_pss.h components/esp_rom/include/esp32c3/rom/rtc.h -components/esp_rom/include/esp32c3/rom/secure_boot.h components/esp_rom/include/esp32c3/rom/sha.h components/esp_rom/include/esp32c3/rom/spi_flash.h components/esp_rom/include/esp32c3/rom/tjpgd.h @@ -795,7 +793,6 @@ components/esp_rom/include/esp32h2/rom/miniz.h components/esp_rom/include/esp32h2/rom/rom_layout.h components/esp_rom/include/esp32h2/rom/rsa_pss.h components/esp_rom/include/esp32h2/rom/rtc.h -components/esp_rom/include/esp32h2/rom/secure_boot.h components/esp_rom/include/esp32h2/rom/sha.h components/esp_rom/include/esp32h2/rom/spi_flash.h components/esp_rom/include/esp32h2/rom/tjpgd.h @@ -816,7 +813,6 @@ components/esp_rom/include/esp32s2/rom/miniz.h components/esp_rom/include/esp32s2/rom/opi_flash.h components/esp_rom/include/esp32s2/rom/rsa_pss.h components/esp_rom/include/esp32s2/rom/rtc.h -components/esp_rom/include/esp32s2/rom/secure_boot.h components/esp_rom/include/esp32s2/rom/sha.h components/esp_rom/include/esp32s2/rom/spi_flash.h components/esp_rom/include/esp32s2/rom/uart.h @@ -847,7 +843,6 @@ components/esp_rom/include/esp32s3/rom/miniz.h components/esp_rom/include/esp32s3/rom/opi_flash.h components/esp_rom/include/esp32s3/rom/rom_layout.h components/esp_rom/include/esp32s3/rom/rsa_pss.h -components/esp_rom/include/esp32s3/rom/secure_boot.h components/esp_rom/include/esp32s3/rom/sha.h components/esp_rom/include/esp32s3/rom/spi_flash.h components/esp_rom/include/esp32s3/rom/tjpgd.h