diff mbox series

[v3] arm-trusted-firmware-mvebu: CZ.NIC's Secure Firmware bump to v2021.09.07

Message ID MEAPR01MB3574140E649A556BE964A3BEC0DA9@MEAPR01MB3574.ausprd01.prod.outlook.com
State Accepted
Delegated to: Hauke Mehrtens
Headers show
Series [v3] arm-trusted-firmware-mvebu: CZ.NIC's Secure Firmware bump to v2021.09.07 | expand

Commit Message

sean lee Sept. 14, 2021, 8:50 a.m. UTC
bump version and remove patches that have been applied

176d701 wtmi: Wait 1s after putting PHYs INTn pin low
2eeccfe wtmi: Change comment describing reset workaround
e8c94a5 wtmi: Count RAM size from both CS0 and CS1
995979e wtmi: Rename macro
e29eb29 wtmi: soc: Fix start_ap_workaround() for TF-A with debug
81245ed wtmi: Use constant name PLAT_MARVELL_MAILBOX_BASE
18ccb83 wtmi: Do a proper UART reset with clock change as described in spec
15ff106 avs: Validate VDD value from OTP
3f33626 fix: clock: a3700: change pwm clock for 600/600 and 1200/750 preset
fb5e436 wtmi: uart: fix UART baudrate divisor calculation

Signed-off-by: sean lee <ilf@live.com>
---
 .../boot/arm-trusted-firmware-mvebu/Makefile  |  4 +-
 ...ix-UART-baudrate-divisor-calculation.patch | 66 -------------------
 ...change-pwm-clock-for-600-600-and-120.patch | 48 --------------
 .../102-avs-Validate-VDD-value-from-OTP.patch | 52 ---------------
 4 files changed, 2 insertions(+), 168 deletions(-)
 delete mode 100644 package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/100-wtmi-uart-fix-UART-baudrate-divisor-calculation.patch
 delete mode 100644 package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/101-fix-clock-a3700-change-pwm-clock-for-600-600-and-120.patch
 delete mode 100644 package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/102-avs-Validate-VDD-value-from-OTP.patch

Comments

Hauke Mehrtens Sept. 14, 2021, 5:59 p.m. UTC | #1
On 9/14/21 10:50 AM, sean lee wrote:
> bump version and remove patches that have been applied
> 
> 176d701 wtmi: Wait 1s after putting PHYs INTn pin low
> 2eeccfe wtmi: Change comment describing reset workaround
> e8c94a5 wtmi: Count RAM size from both CS0 and CS1
> 995979e wtmi: Rename macro
> e29eb29 wtmi: soc: Fix start_ap_workaround() for TF-A with debug
> 81245ed wtmi: Use constant name PLAT_MARVELL_MAILBOX_BASE
> 18ccb83 wtmi: Do a proper UART reset with clock change as described in spec
> 15ff106 avs: Validate VDD value from OTP
> 3f33626 fix: clock: a3700: change pwm clock for 600/600 and 1200/750 preset
> fb5e436 wtmi: uart: fix UART baudrate divisor calculation
> 
> Signed-off-by: sean lee <ilf@live.com>
> ---
>   .../boot/arm-trusted-firmware-mvebu/Makefile  |  4 +-
>   ...ix-UART-baudrate-divisor-calculation.patch | 66 -------------------
>   ...change-pwm-clock-for-600-600-and-120.patch | 48 --------------
>   .../102-avs-Validate-VDD-value-from-OTP.patch | 52 ---------------
>   4 files changed, 2 insertions(+), 168 deletions(-)
>   delete mode 100644 package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/100-wtmi-uart-fix-UART-baudrate-divisor-calculation.patch
>   delete mode 100644 package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/101-fix-clock-a3700-change-pwm-clock-for-600-600-and-120.patch
>   delete mode 100644 package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/102-avs-Validate-VDD-value-from-OTP.patch
> 

Hi,

This is a little bit unrelated.

Is the source code of image/a3700-utils/wtptp/linux/tbb_linux available 
  somewhere? I wanted to build mvebu/cortex53 on an aarch64 host system 
and this file is only available for x86_64 and the compilation fails.

Building flash image
/bin/sh: 1: 
/home/ubuntu/openwrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/a3700-utils/wtptp/linux/tbb_linux: 
Exec format error
make[4]: *** [plat/marvell/armada/a3k/common/a3700_common.mk:186: 
/home/ubuntu/openwrt/openwrt/build_dir/target-aarch64_cortex-a53_musl/trusted-firmware-a-espressobin-512mb/trusted-firmware-a-2.5/build/a3700/release/flash-image.bin] 
Error 2


ubuntu@instance-20210910-2105:~/openwrt/openwrt$ file 
/home/ubuntu/openwrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/a3700-utils/wtptp/linux/tbb_linux
/home/ubuntu/openwrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/a3700-utils/wtptp/linux/tbb_linux: 
ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically 
linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, 
BuildID[sha1]=8169eedf6eef4b1993a65a180baee3d31660c000, with debug_info, 
not stripped
ubuntu@instance-20210910-2105:~/openwrt/openwrt$ uname -a
Linux instance-20210910-2105 5.11.0-1017-oracle #18~20.04.1-Ubuntu SMP 
Fri Aug 27 11:09:43 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@instance-20210910-2105:~/openwrt/openwrt$

Hauke
Andre Heider Sept. 14, 2021, 6:21 p.m. UTC | #2
On 14/09/2021 19:59, Hauke Mehrtens wrote:
> On 9/14/21 10:50 AM, sean lee wrote:
>> bump version and remove patches that have been applied
>>
>> 176d701 wtmi: Wait 1s after putting PHYs INTn pin low
>> 2eeccfe wtmi: Change comment describing reset workaround
>> e8c94a5 wtmi: Count RAM size from both CS0 and CS1
>> 995979e wtmi: Rename macro
>> e29eb29 wtmi: soc: Fix start_ap_workaround() for TF-A with debug
>> 81245ed wtmi: Use constant name PLAT_MARVELL_MAILBOX_BASE
>> 18ccb83 wtmi: Do a proper UART reset with clock change as described in 
>> spec
>> 15ff106 avs: Validate VDD value from OTP
>> 3f33626 fix: clock: a3700: change pwm clock for 600/600 and 1200/750 
>> preset
>> fb5e436 wtmi: uart: fix UART baudrate divisor calculation
>>
>> Signed-off-by: sean lee <ilf@live.com>
>> ---
>>   .../boot/arm-trusted-firmware-mvebu/Makefile  |  4 +-
>>   ...ix-UART-baudrate-divisor-calculation.patch | 66 -------------------
>>   ...change-pwm-clock-for-600-600-and-120.patch | 48 --------------
>>   .../102-avs-Validate-VDD-value-from-OTP.patch | 52 ---------------
>>   4 files changed, 2 insertions(+), 168 deletions(-)
>>   delete mode 100644 
>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/100-wtmi-uart-fix-UART-baudrate-divisor-calculation.patch 
>>
>>   delete mode 100644 
>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/101-fix-clock-a3700-change-pwm-clock-for-600-600-and-120.patch 
>>
>>   delete mode 100644 
>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/102-avs-Validate-VDD-value-from-OTP.patch 
>>
>>
> 
> Hi,
> 
> This is a little bit unrelated.
> 
> Is the source code of image/a3700-utils/wtptp/linux/tbb_linux available 
>   somewhere? I wanted to build mvebu/cortex53 on an aarch64 host system 
> and this file is only available for x86_64 and the compilation fails.

Yeah, its source is bundled, and actually atf upstream recently switched 
to building it instead of using the checked in binary.

Building it requires cryptocpp though, which doesn't yet exists as 
package. We don't really care about crypto since we're building just an 
untrusted firmware, so I opted to revert to using the binary instead. 
This is on top of the x86_64 binary toolchain too anyway.

See package/boot/arm-trusted-firmware-mvebu/patches/001-imagetool.patch.

If you get rid of that patch and add cryptocpp/host it should build it 
automatically and use that instead. But that still leaves the issue with 
the binary toolchain, no?

> 
> Building flash image
> /bin/sh: 1: 
> /home/ubuntu/openwrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/a3700-utils/wtptp/linux/tbb_linux: 
> Exec format error
> make[4]: *** [plat/marvell/armada/a3k/common/a3700_common.mk:186: 
> /home/ubuntu/openwrt/openwrt/build_dir/target-aarch64_cortex-a53_musl/trusted-firmware-a-espressobin-512mb/trusted-firmware-a-2.5/build/a3700/release/flash-image.bin] 
> Error 2
> 
> 
> ubuntu@instance-20210910-2105:~/openwrt/openwrt$ file 
> /home/ubuntu/openwrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/a3700-utils/wtptp/linux/tbb_linux 
> 
> /home/ubuntu/openwrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/a3700-utils/wtptp/linux/tbb_linux: 
> ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically 
> linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, 
> BuildID[sha1]=8169eedf6eef4b1993a65a180baee3d31660c000, with debug_info, 
> not stripped
> ubuntu@instance-20210910-2105:~/openwrt/openwrt$ uname -a
> Linux instance-20210910-2105 5.11.0-1017-oracle #18~20.04.1-Ubuntu SMP 
> Fri Aug 27 11:09:43 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
> ubuntu@instance-20210910-2105:~/openwrt/openwrt$
> 
> Hauke
Josef Schlehofer Sept. 14, 2021, 6:42 p.m. UTC | #3
On 14. 09. 21 20:21, Andre Heider wrote:
> On 14/09/2021 19:59, Hauke Mehrtens wrote:
>> On 9/14/21 10:50 AM, sean lee wrote:
>>> bump version and remove patches that have been applied
>>>
>>> 176d701 wtmi: Wait 1s after putting PHYs INTn pin low
>>> 2eeccfe wtmi: Change comment describing reset workaround
>>> e8c94a5 wtmi: Count RAM size from both CS0 and CS1
>>> 995979e wtmi: Rename macro
>>> e29eb29 wtmi: soc: Fix start_ap_workaround() for TF-A with debug
>>> 81245ed wtmi: Use constant name PLAT_MARVELL_MAILBOX_BASE
>>> 18ccb83 wtmi: Do a proper UART reset with clock change as described
>>> in spec
>>> 15ff106 avs: Validate VDD value from OTP
>>> 3f33626 fix: clock: a3700: change pwm clock for 600/600 and 1200/750
>>> preset
>>> fb5e436 wtmi: uart: fix UART baudrate divisor calculation
>>>
>>> Signed-off-by: sean lee <ilf@live.com>
>>> ---
>>>   .../boot/arm-trusted-firmware-mvebu/Makefile  |  4 +-
>>>   ...ix-UART-baudrate-divisor-calculation.patch | 66
>>> -------------------
>>>   ...change-pwm-clock-for-600-600-and-120.patch | 48 --------------
>>>   .../102-avs-Validate-VDD-value-from-OTP.patch | 52 ---------------
>>>   4 files changed, 2 insertions(+), 168 deletions(-)
>>>   delete mode 100644
>>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/100-wtmi-uart-fix-UART-baudrate-divisor-calculation.patch
>>>
>>>   delete mode 100644
>>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/101-fix-clock-a3700-change-pwm-clock-for-600-600-and-120.patch
>>>
>>>   delete mode 100644
>>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/102-avs-Validate-VDD-value-from-OTP.patch
>>>
>>>
>>
>> Hi,
>>
>> This is a little bit unrelated.
>>
>> Is the source code of image/a3700-utils/wtptp/linux/tbb_linux
>> available   somewhere? I wanted to build mvebu/cortex53 on an aarch64
>> host system and this file is only available for x86_64 and the
>> compilation fails.
>
> Yeah, its source is bundled, and actually atf upstream recently
> switched to building it instead of using the checked in binary.
TBH, it was outdated, buggy and recent changes were not included in the
bundled library as said here
https://github.com/MarvellEmbeddedProcessors/A3700-utils-marvell/commit/f014428f4bf7feafec1dcc4c37506d847718649a
>
> Building it requires cryptocpp though, which doesn't yet exists as
> package. We don't really care about crypto since we're building just
> an untrusted firmware, so I opted to revert to using the binary
> instead. This is on top of the x86_64 binary toolchain too anyway.

This one:
https://github.com/BKPepe/openwrt/commit/42322bebc5804a99b60a5bb54200eeba0587076d
worked for me. But I didn't send it yet as I didn't do run-time testing
yet. I will do it soon.
>
> See package/boot/arm-trusted-firmware-mvebu/patches/001-imagetool.patch.
>
> If you get rid of that patch and add cryptocpp/host it should build it
> automatically and use that instead. But that still leaves the issue
> with the binary toolchain, no?
>
>>
>> Building flash image
>> /bin/sh: 1:
>> /home/ubuntu/openwrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/a3700-utils/wtptp/linux/tbb_linux:
>> Exec format error
>> make[4]: *** [plat/marvell/armada/a3k/common/a3700_common.mk:186:
>> /home/ubuntu/openwrt/openwrt/build_dir/target-aarch64_cortex-a53_musl/trusted-firmware-a-espressobin-512mb/trusted-firmware-a-2.5/build/a3700/release/flash-image.bin]
>> Error 2
>>
>>
>> ubuntu@instance-20210910-2105:~/openwrt/openwrt$ file
>> /home/ubuntu/openwrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/a3700-utils/wtptp/linux/tbb_linux
>>
>> /home/ubuntu/openwrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/a3700-utils/wtptp/linux/tbb_linux:
>> ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically
>> linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux
>> 2.6.24, BuildID[sha1]=8169eedf6eef4b1993a65a180baee3d31660c000, with
>> debug_info, not stripped
>> ubuntu@instance-20210910-2105:~/openwrt/openwrt$ uname -a
>> Linux instance-20210910-2105 5.11.0-1017-oracle #18~20.04.1-Ubuntu
>> SMP Fri Aug 27 11:09:43 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
>> ubuntu@instance-20210910-2105:~/openwrt/openwrt$
>>
>> Hauke
Hauke Mehrtens Sept. 15, 2021, 12:41 p.m. UTC | #4
On 9/14/21 8:42 PM, Josef Schlehofer wrote:
> 
> On 14. 09. 21 20:21, Andre Heider wrote:
>> On 14/09/2021 19:59, Hauke Mehrtens wrote:
>>> On 9/14/21 10:50 AM, sean lee wrote:
>>>> bump version and remove patches that have been applied
>>>>
>>>> 176d701 wtmi: Wait 1s after putting PHYs INTn pin low
>>>> 2eeccfe wtmi: Change comment describing reset workaround
>>>> e8c94a5 wtmi: Count RAM size from both CS0 and CS1
>>>> 995979e wtmi: Rename macro
>>>> e29eb29 wtmi: soc: Fix start_ap_workaround() for TF-A with debug
>>>> 81245ed wtmi: Use constant name PLAT_MARVELL_MAILBOX_BASE
>>>> 18ccb83 wtmi: Do a proper UART reset with clock change as described
>>>> in spec
>>>> 15ff106 avs: Validate VDD value from OTP
>>>> 3f33626 fix: clock: a3700: change pwm clock for 600/600 and 1200/750
>>>> preset
>>>> fb5e436 wtmi: uart: fix UART baudrate divisor calculation
>>>>
>>>> Signed-off-by: sean lee <ilf@live.com>
>>>> ---
>>>>    .../boot/arm-trusted-firmware-mvebu/Makefile  |  4 +-
>>>>    ...ix-UART-baudrate-divisor-calculation.patch | 66
>>>> -------------------
>>>>    ...change-pwm-clock-for-600-600-and-120.patch | 48 --------------
>>>>    .../102-avs-Validate-VDD-value-from-OTP.patch | 52 ---------------
>>>>    4 files changed, 2 insertions(+), 168 deletions(-)
>>>>    delete mode 100644
>>>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/100-wtmi-uart-fix-UART-baudrate-divisor-calculation.patch
>>>>
>>>>    delete mode 100644
>>>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/101-fix-clock-a3700-change-pwm-clock-for-600-600-and-120.patch
>>>>
>>>>    delete mode 100644
>>>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/102-avs-Validate-VDD-value-from-OTP.patch
>>>>
>>>>
>>>
>>> Hi,
>>>
>>> This is a little bit unrelated.
>>>
>>> Is the source code of image/a3700-utils/wtptp/linux/tbb_linux
>>> available   somewhere? I wanted to build mvebu/cortex53 on an aarch64
>>> host system and this file is only available for x86_64 and the
>>> compilation fails.
>>
>> Yeah, its source is bundled, and actually atf upstream recently
>> switched to building it instead of using the checked in binary.
> TBH, it was outdated, buggy and recent changes were not included in the
> bundled library as said here
> https://github.com/MarvellEmbeddedProcessors/A3700-utils-marvell/commit/f014428f4bf7feafec1dcc4c37506d847718649a
>>
>> Building it requires cryptocpp though, which doesn't yet exists as
>> package. We don't really care about crypto since we're building just
>> an untrusted firmware, so I opted to revert to using the binary
>> instead. This is on top of the x86_64 binary toolchain too anyway.
> 
> This one:
> https://github.com/BKPepe/openwrt/commit/42322bebc5804a99b60a5bb54200eeba0587076d
> worked for me. But I didn't send it yet as I didn't do run-time testing
> yet. I will do it soon.

Thank you, I will build test this out later today.

Hauke
Andre Heider Sept. 15, 2021, 1:21 p.m. UTC | #5
On 14/09/2021 20:42, Josef Schlehofer wrote:
> 
> On 14. 09. 21 20:21, Andre Heider wrote:
>> On 14/09/2021 19:59, Hauke Mehrtens wrote:
>>> On 9/14/21 10:50 AM, sean lee wrote:
>>>> bump version and remove patches that have been applied
>>>>
>>>> 176d701 wtmi: Wait 1s after putting PHYs INTn pin low
>>>> 2eeccfe wtmi: Change comment describing reset workaround
>>>> e8c94a5 wtmi: Count RAM size from both CS0 and CS1
>>>> 995979e wtmi: Rename macro
>>>> e29eb29 wtmi: soc: Fix start_ap_workaround() for TF-A with debug
>>>> 81245ed wtmi: Use constant name PLAT_MARVELL_MAILBOX_BASE
>>>> 18ccb83 wtmi: Do a proper UART reset with clock change as described
>>>> in spec
>>>> 15ff106 avs: Validate VDD value from OTP
>>>> 3f33626 fix: clock: a3700: change pwm clock for 600/600 and 1200/750
>>>> preset
>>>> fb5e436 wtmi: uart: fix UART baudrate divisor calculation
>>>>
>>>> Signed-off-by: sean lee <ilf@live.com>
>>>> ---
>>>>    .../boot/arm-trusted-firmware-mvebu/Makefile  |  4 +-
>>>>    ...ix-UART-baudrate-divisor-calculation.patch | 66
>>>> -------------------
>>>>    ...change-pwm-clock-for-600-600-and-120.patch | 48 --------------
>>>>    .../102-avs-Validate-VDD-value-from-OTP.patch | 52 ---------------
>>>>    4 files changed, 2 insertions(+), 168 deletions(-)
>>>>    delete mode 100644
>>>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/100-wtmi-uart-fix-UART-baudrate-divisor-calculation.patch
>>>>
>>>>    delete mode 100644
>>>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/101-fix-clock-a3700-change-pwm-clock-for-600-600-and-120.patch
>>>>
>>>>    delete mode 100644
>>>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/102-avs-Validate-VDD-value-from-OTP.patch
>>>>
>>>>
>>>
>>> Hi,
>>>
>>> This is a little bit unrelated.
>>>
>>> Is the source code of image/a3700-utils/wtptp/linux/tbb_linux
>>> available   somewhere? I wanted to build mvebu/cortex53 on an aarch64
>>> host system and this file is only available for x86_64 and the
>>> compilation fails.
>>
>> Yeah, its source is bundled, and actually atf upstream recently
>> switched to building it instead of using the checked in binary.
> TBH, it was outdated, buggy and recent changes were not included in the
> bundled library as said here
> https://github.com/MarvellEmbeddedProcessors/A3700-utils-marvell/commit/f014428f4bf7feafec1dcc4c37506d847718649a
>>
>> Building it requires cryptocpp though, which doesn't yet exists as
>> package. We don't really care about crypto since we're building just
>> an untrusted firmware, so I opted to revert to using the binary
>> instead. This is on top of the x86_64 binary toolchain too anyway.
> 
> This one:
> https://github.com/BKPepe/openwrt/commit/42322bebc5804a99b60a5bb54200eeba0587076d
> worked for me. But I didn't send it yet as I didn't do run-time testing
> yet. I will do it soon.

Maybe use a cryptocpp release tarball instead of a git clone? That'll be 
faster and a smaller download.

And I think you also need to bump the a3700-utils version to include the 
build fixes?

>>
>> See package/boot/arm-trusted-firmware-mvebu/patches/001-imagetool.patch.
>>
>> If you get rid of that patch and add cryptocpp/host it should build it
>> automatically and use that instead. But that still leaves the issue
>> with the binary toolchain, no?
>>
>>>
>>> Building flash image
>>> /bin/sh: 1:
>>> /home/ubuntu/openwrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/a3700-utils/wtptp/linux/tbb_linux:
>>> Exec format error
>>> make[4]: *** [plat/marvell/armada/a3k/common/a3700_common.mk:186:
>>> /home/ubuntu/openwrt/openwrt/build_dir/target-aarch64_cortex-a53_musl/trusted-firmware-a-espressobin-512mb/trusted-firmware-a-2.5/build/a3700/release/flash-image.bin]
>>> Error 2
>>>
>>>
>>> ubuntu@instance-20210910-2105:~/openwrt/openwrt$ file
>>> /home/ubuntu/openwrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/a3700-utils/wtptp/linux/tbb_linux
>>>
>>> /home/ubuntu/openwrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/a3700-utils/wtptp/linux/tbb_linux:
>>> ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically
>>> linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux
>>> 2.6.24, BuildID[sha1]=8169eedf6eef4b1993a65a180baee3d31660c000, with
>>> debug_info, not stripped
>>> ubuntu@instance-20210910-2105:~/openwrt/openwrt$ uname -a
>>> Linux instance-20210910-2105 5.11.0-1017-oracle #18~20.04.1-Ubuntu
>>> SMP Fri Aug 27 11:09:43 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
>>> ubuntu@instance-20210910-2105:~/openwrt/openwrt$
>>>
>>> Hauke
> 
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
Hauke Mehrtens Sept. 15, 2021, 3:45 p.m. UTC | #6
On 9/15/21 2:41 PM, Hauke Mehrtens wrote:
> On 9/14/21 8:42 PM, Josef Schlehofer wrote:
>>
>> On 14. 09. 21 20:21, Andre Heider wrote:
>>> On 14/09/2021 19:59, Hauke Mehrtens wrote:
>>>> On 9/14/21 10:50 AM, sean lee wrote:
>>>>> bump version and remove patches that have been applied
>>>>>
>>>>> 176d701 wtmi: Wait 1s after putting PHYs INTn pin low
>>>>> 2eeccfe wtmi: Change comment describing reset workaround
>>>>> e8c94a5 wtmi: Count RAM size from both CS0 and CS1
>>>>> 995979e wtmi: Rename macro
>>>>> e29eb29 wtmi: soc: Fix start_ap_workaround() for TF-A with debug
>>>>> 81245ed wtmi: Use constant name PLAT_MARVELL_MAILBOX_BASE
>>>>> 18ccb83 wtmi: Do a proper UART reset with clock change as described
>>>>> in spec
>>>>> 15ff106 avs: Validate VDD value from OTP
>>>>> 3f33626 fix: clock: a3700: change pwm clock for 600/600 and 1200/750
>>>>> preset
>>>>> fb5e436 wtmi: uart: fix UART baudrate divisor calculation
>>>>>
>>>>> Signed-off-by: sean lee <ilf@live.com>
>>>>> ---
>>>>>    .../boot/arm-trusted-firmware-mvebu/Makefile  |  4 +-
>>>>>    ...ix-UART-baudrate-divisor-calculation.patch | 66
>>>>> -------------------
>>>>>    ...change-pwm-clock-for-600-600-and-120.patch | 48 --------------
>>>>>    .../102-avs-Validate-VDD-value-from-OTP.patch | 52 ---------------
>>>>>    4 files changed, 2 insertions(+), 168 deletions(-)
>>>>>    delete mode 100644
>>>>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/100-wtmi-uart-fix-UART-baudrate-divisor-calculation.patch 
>>>>>
>>>>>
>>>>>    delete mode 100644
>>>>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/101-fix-clock-a3700-change-pwm-clock-for-600-600-and-120.patch 
>>>>>
>>>>>
>>>>>    delete mode 100644
>>>>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/102-avs-Validate-VDD-value-from-OTP.patch 
>>>>>
>>>>>
>>>>>
>>>>
>>>> Hi,
>>>>
>>>> This is a little bit unrelated.
>>>>
>>>> Is the source code of image/a3700-utils/wtptp/linux/tbb_linux
>>>> available   somewhere? I wanted to build mvebu/cortex53 on an aarch64
>>>> host system and this file is only available for x86_64 and the
>>>> compilation fails.
>>>
>>> Yeah, its source is bundled, and actually atf upstream recently
>>> switched to building it instead of using the checked in binary.
>> TBH, it was outdated, buggy and recent changes were not included in the
>> bundled library as said here
>> https://github.com/MarvellEmbeddedProcessors/A3700-utils-marvell/commit/f014428f4bf7feafec1dcc4c37506d847718649a 
>>
>>>
>>> Building it requires cryptocpp though, which doesn't yet exists as
>>> package. We don't really care about crypto since we're building just
>>> an untrusted firmware, so I opted to revert to using the binary
>>> instead. This is on top of the x86_64 binary toolchain too anyway.
>>
>> This one:
>> https://github.com/BKPepe/openwrt/commit/42322bebc5804a99b60a5bb54200eeba0587076d 
>>
>> worked for me. But I didn't send it yet as I didn't do run-time testing
>> yet. I will do it soon.
> 
> Thank you, I will build test this out later today.
> 
> Hauke

With this change it build for me on a Linux host system with aarch64 
architecture.

Hauke
Josef Schlehofer Sept. 15, 2021, 5:11 p.m. UTC | #7
On 15. 09. 21 15:21, Andre Heider wrote:
> On 14/09/2021 20:42, Josef Schlehofer wrote:
>>
>> On 14. 09. 21 20:21, Andre Heider wrote:
>>> On 14/09/2021 19:59, Hauke Mehrtens wrote:
>>>> On 9/14/21 10:50 AM, sean lee wrote:
>>>>> bump version and remove patches that have been applied
>>>>>
>>>>> 176d701 wtmi: Wait 1s after putting PHYs INTn pin low
>>>>> 2eeccfe wtmi: Change comment describing reset workaround
>>>>> e8c94a5 wtmi: Count RAM size from both CS0 and CS1
>>>>> 995979e wtmi: Rename macro
>>>>> e29eb29 wtmi: soc: Fix start_ap_workaround() for TF-A with debug
>>>>> 81245ed wtmi: Use constant name PLAT_MARVELL_MAILBOX_BASE
>>>>> 18ccb83 wtmi: Do a proper UART reset with clock change as described
>>>>> in spec
>>>>> 15ff106 avs: Validate VDD value from OTP
>>>>> 3f33626 fix: clock: a3700: change pwm clock for 600/600 and 1200/750
>>>>> preset
>>>>> fb5e436 wtmi: uart: fix UART baudrate divisor calculation
>>>>>
>>>>> Signed-off-by: sean lee <ilf@live.com>
>>>>> ---
>>>>>    .../boot/arm-trusted-firmware-mvebu/Makefile  |  4 +-
>>>>>    ...ix-UART-baudrate-divisor-calculation.patch | 66
>>>>> -------------------
>>>>>    ...change-pwm-clock-for-600-600-and-120.patch | 48 --------------
>>>>>    .../102-avs-Validate-VDD-value-from-OTP.patch | 52 ---------------
>>>>>    4 files changed, 2 insertions(+), 168 deletions(-)
>>>>>    delete mode 100644
>>>>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/100-wtmi-uart-fix-UART-baudrate-divisor-calculation.patch
>>>>>
>>>>>
>>>>>    delete mode 100644
>>>>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/101-fix-clock-a3700-change-pwm-clock-for-600-600-and-120.patch
>>>>>
>>>>>
>>>>>    delete mode 100644
>>>>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/102-avs-Validate-VDD-value-from-OTP.patch
>>>>>
>>>>>
>>>>>
>>>>
>>>> Hi,
>>>>
>>>> This is a little bit unrelated.
>>>>
>>>> Is the source code of image/a3700-utils/wtptp/linux/tbb_linux
>>>> available   somewhere? I wanted to build mvebu/cortex53 on an aarch64
>>>> host system and this file is only available for x86_64 and the
>>>> compilation fails.
>>>
>>> Yeah, its source is bundled, and actually atf upstream recently
>>> switched to building it instead of using the checked in binary.
>> TBH, it was outdated, buggy and recent changes were not included in the
>> bundled library as said here
>> https://github.com/MarvellEmbeddedProcessors/A3700-utils-marvell/commit/f014428f4bf7feafec1dcc4c37506d847718649a
>>
>>>
>>> Building it requires cryptocpp though, which doesn't yet exists as
>>> package. We don't really care about crypto since we're building just
>>> an untrusted firmware, so I opted to revert to using the binary
>>> instead. This is on top of the x86_64 binary toolchain too anyway.
>>
>> This one:
>> https://github.com/BKPepe/openwrt/commit/42322bebc5804a99b60a5bb54200eeba0587076d
>>
>> worked for me. But I didn't send it yet as I didn't do run-time testing
>> yet. I will do it soon.
>
Hi Andre,

> Maybe use a cryptocpp release tarball instead of a git clone? That'll
> be faster and a smaller download.
>
I was thinking about it too, but I noticed that everything (=
a3700-utils, etc.) we are downloading uses git clone while looking at
the Makefile. This would be exception, so I keep it that way, but I
don't mind git clone/release tarball.
>
> And I think you also need to bump the a3700-utils version to include
> the build fixes?
Yes and no. My idea was to send a single PR with two commits (cryptopp
and update a3700-utils) once I could do run-time testing on Turris MOX
either ESPRESSObin first with cryptopp and then with the update itself
to be sure that it didn't break anything else, but still. We can do it
in two steps, I mean PRs. Both approaches are OK with me.

Josef
>
>>>
>>> See
>>> package/boot/arm-trusted-firmware-mvebu/patches/001-imagetool.patch.
>>>
>>> If you get rid of that patch and add cryptocpp/host it should build it
>>> automatically and use that instead. But that still leaves the issue
>>> with the binary toolchain, no?
>>>
>>>>
>>>> Building flash image
>>>> /bin/sh: 1:
>>>> /home/ubuntu/openwrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/a3700-utils/wtptp/linux/tbb_linux:
>>>>
>>>> Exec format error
>>>> make[4]: *** [plat/marvell/armada/a3k/common/a3700_common.mk:186:
>>>> /home/ubuntu/openwrt/openwrt/build_dir/target-aarch64_cortex-a53_musl/trusted-firmware-a-espressobin-512mb/trusted-firmware-a-2.5/build/a3700/release/flash-image.bin]
>>>>
>>>> Error 2
>>>>
>>>>
>>>> ubuntu@instance-20210910-2105:~/openwrt/openwrt$ file
>>>> /home/ubuntu/openwrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/a3700-utils/wtptp/linux/tbb_linux
>>>>
>>>>
>>>> /home/ubuntu/openwrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/a3700-utils/wtptp/linux/tbb_linux:
>>>>
>>>> ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically
>>>> linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux
>>>> 2.6.24, BuildID[sha1]=8169eedf6eef4b1993a65a180baee3d31660c000, with
>>>> debug_info, not stripped
>>>> ubuntu@instance-20210910-2105:~/openwrt/openwrt$ uname -a
>>>> Linux instance-20210910-2105 5.11.0-1017-oracle #18~20.04.1-Ubuntu
>>>> SMP Fri Aug 27 11:09:43 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
>>>> ubuntu@instance-20210910-2105:~/openwrt/openwrt$
>>>>
>>>> Hauke
>>
>>
>>
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>>
Andre Heider Sept. 15, 2021, 5:54 p.m. UTC | #8
Hi Josef,

On 15/09/2021 19:11, Josef Schlehofer wrote:
> 
> On 15. 09. 21 15:21, Andre Heider wrote:
>> On 14/09/2021 20:42, Josef Schlehofer wrote:
>>>
>>> On 14. 09. 21 20:21, Andre Heider wrote:
>>>> On 14/09/2021 19:59, Hauke Mehrtens wrote:
>>>>> On 9/14/21 10:50 AM, sean lee wrote:
>>>>>> bump version and remove patches that have been applied
>>>>>>
>>>>>> 176d701 wtmi: Wait 1s after putting PHYs INTn pin low
>>>>>> 2eeccfe wtmi: Change comment describing reset workaround
>>>>>> e8c94a5 wtmi: Count RAM size from both CS0 and CS1
>>>>>> 995979e wtmi: Rename macro
>>>>>> e29eb29 wtmi: soc: Fix start_ap_workaround() for TF-A with debug
>>>>>> 81245ed wtmi: Use constant name PLAT_MARVELL_MAILBOX_BASE
>>>>>> 18ccb83 wtmi: Do a proper UART reset with clock change as described
>>>>>> in spec
>>>>>> 15ff106 avs: Validate VDD value from OTP
>>>>>> 3f33626 fix: clock: a3700: change pwm clock for 600/600 and 1200/750
>>>>>> preset
>>>>>> fb5e436 wtmi: uart: fix UART baudrate divisor calculation
>>>>>>
>>>>>> Signed-off-by: sean lee <ilf@live.com>
>>>>>> ---
>>>>>>     .../boot/arm-trusted-firmware-mvebu/Makefile  |  4 +-
>>>>>>     ...ix-UART-baudrate-divisor-calculation.patch | 66
>>>>>> -------------------
>>>>>>     ...change-pwm-clock-for-600-600-and-120.patch | 48 --------------
>>>>>>     .../102-avs-Validate-VDD-value-from-OTP.patch | 52 ---------------
>>>>>>     4 files changed, 2 insertions(+), 168 deletions(-)
>>>>>>     delete mode 100644
>>>>>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/100-wtmi-uart-fix-UART-baudrate-divisor-calculation.patch
>>>>>>
>>>>>>
>>>>>>     delete mode 100644
>>>>>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/101-fix-clock-a3700-change-pwm-clock-for-600-600-and-120.patch
>>>>>>
>>>>>>
>>>>>>     delete mode 100644
>>>>>> package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/102-avs-Validate-VDD-value-from-OTP.patch
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> This is a little bit unrelated.
>>>>>
>>>>> Is the source code of image/a3700-utils/wtptp/linux/tbb_linux
>>>>> available   somewhere? I wanted to build mvebu/cortex53 on an aarch64
>>>>> host system and this file is only available for x86_64 and the
>>>>> compilation fails.
>>>>
>>>> Yeah, its source is bundled, and actually atf upstream recently
>>>> switched to building it instead of using the checked in binary.
>>> TBH, it was outdated, buggy and recent changes were not included in the
>>> bundled library as said here
>>> https://github.com/MarvellEmbeddedProcessors/A3700-utils-marvell/commit/f014428f4bf7feafec1dcc4c37506d847718649a
>>>
>>>>
>>>> Building it requires cryptocpp though, which doesn't yet exists as
>>>> package. We don't really care about crypto since we're building just
>>>> an untrusted firmware, so I opted to revert to using the binary
>>>> instead. This is on top of the x86_64 binary toolchain too anyway.
>>>
>>> This one:
>>> https://github.com/BKPepe/openwrt/commit/42322bebc5804a99b60a5bb54200eeba0587076d
>>>
>>> worked for me. But I didn't send it yet as I didn't do run-time testing
>>> yet. I will do it soon.
>>
> Hi Andre,
> 
>> Maybe use a cryptocpp release tarball instead of a git clone? That'll
>> be faster and a smaller download.
>>
> I was thinking about it too, but I noticed that everything (=
> a3700-utils, etc.) we are downloading uses git clone while looking at
> the Makefile. This would be exception, so I keep it that way, but I
> don't mind git clone/release tarball.

mox-boot-builder is the exception (intentionally btw, a git tree 
backfires there, as it's using submodules and the OpenWrt buildsystem 
fetches all of those), but I don't care too much about what to use for 
cryptocpp here.

>> And I think you also need to bump the a3700-utils version to include
>> the build fixes?
> Yes and no. My idea was to send a single PR with two commits (cryptopp
> and update a3700-utils) once I could do run-time testing on Turris MOX
> either ESPRESSObin first with cryptopp and then with the update itself
> to be sure that it didn't break anything else, but still. We can do it
> in two steps, I mean PRs. Both approaches are OK with me.

Ok, sounds good to me!

> 
> Josef
>>
>>>>
>>>> See
>>>> package/boot/arm-trusted-firmware-mvebu/patches/001-imagetool.patch.
>>>>
>>>> If you get rid of that patch and add cryptocpp/host it should build it
>>>> automatically and use that instead. But that still leaves the issue
>>>> with the binary toolchain, no?
>>>>
>>>>>
>>>>> Building flash image
>>>>> /bin/sh: 1:
>>>>> /home/ubuntu/openwrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/a3700-utils/wtptp/linux/tbb_linux:
>>>>>
>>>>> Exec format error
>>>>> make[4]: *** [plat/marvell/armada/a3k/common/a3700_common.mk:186:
>>>>> /home/ubuntu/openwrt/openwrt/build_dir/target-aarch64_cortex-a53_musl/trusted-firmware-a-espressobin-512mb/trusted-firmware-a-2.5/build/a3700/release/flash-image.bin]
>>>>>
>>>>> Error 2
>>>>>
>>>>>
>>>>> ubuntu@instance-20210910-2105:~/openwrt/openwrt$ file
>>>>> /home/ubuntu/openwrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/a3700-utils/wtptp/linux/tbb_linux
>>>>>
>>>>>
>>>>> /home/ubuntu/openwrt/openwrt/staging_dir/target-aarch64_cortex-a53_musl/image/a3700-utils/wtptp/linux/tbb_linux:
>>>>>
>>>>> ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically
>>>>> linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux
>>>>> 2.6.24, BuildID[sha1]=8169eedf6eef4b1993a65a180baee3d31660c000, with
>>>>> debug_info, not stripped
>>>>> ubuntu@instance-20210910-2105:~/openwrt/openwrt$ uname -a
>>>>> Linux instance-20210910-2105 5.11.0-1017-oracle #18~20.04.1-Ubuntu
>>>>> SMP Fri Aug 27 11:09:43 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
>>>>> ubuntu@instance-20210910-2105:~/openwrt/openwrt$
>>>>>
>>>>> Hauke
>>>
>>>
>>>
>>> _______________________________________________
>>> openwrt-devel mailing list
>>> openwrt-devel@lists.openwrt.org
>>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>>>
> 
>
Andre Heider Oct. 8, 2021, 7:04 a.m. UTC | #9
Hi Josef,

On 14/09/2021 20:42, Josef Schlehofer wrote:
> On 14. 09. 21 20:21, Andre Heider wrote:
>> Building it requires cryptocpp though, which doesn't yet exists as
>> package. We don't really care about crypto since we're building just
>> an untrusted firmware, so I opted to revert to using the binary
>> instead. This is on top of the x86_64 binary toolchain too anyway.
> 
> This one:
> https://github.com/BKPepe/openwrt/commit/42322bebc5804a99b60a5bb54200eeba0587076d
> worked for me. But I didn't send it yet as I didn't do run-time testing
> yet. I will do it soon.

any update on this?

We could update u-boot to the current release and include your patches too.

Cheers,
Andre
diff mbox series

Patch

diff --git a/package/boot/arm-trusted-firmware-mvebu/Makefile b/package/boot/arm-trusted-firmware-mvebu/Makefile
index 2369a193..8836388b 100644
--- a/package/boot/arm-trusted-firmware-mvebu/Makefile
+++ b/package/boot/arm-trusted-firmware-mvebu/Makefile
@@ -149,13 +149,13 @@  define Download/mv-ddr-marvell
 endef
 
 MOX_BB_NAME:=mox-boot-builder
-MOX_BB_RELEASE:=v2021.04.09
+MOX_BB_RELEASE:=v2021.09.07
 MOX_BB_SOURCE:=$(MOX_BB_NAME)-$(MOX_BB_RELEASE).tar.bz2
 
 define Download/mox-boot-builder
   FILE:=$(MOX_BB_SOURCE)
   URL:=https://gitlab.nic.cz/turris/mox-boot-builder/-/archive/$(MOX_BB_RELEASE)
-  HASH:=f0ed4fa25006e36a07d4256f633e3f25d6f8898dbe2e081e578251a182885520
+  HASH:=fd5fe276a3b0dee3177d61c017907a8eb23cd2169478fa78e9a3a836cfe3a4a8
 endef
 
 CM3_GCC_NAME:=gcc-arm
diff --git a/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/100-wtmi-uart-fix-UART-baudrate-divisor-calculation.patch b/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/100-wtmi-uart-fix-UART-baudrate-divisor-calculation.patch
deleted file mode 100644
index 4bd66f91..00000000
--- a/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/100-wtmi-uart-fix-UART-baudrate-divisor-calculation.patch
+++ /dev/null
@@ -1,66 +0,0 @@ 
-From fb5e436843614f93b30aec0a2a00e5e59a133aab Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Marek=20Beh=C3=BAn?= <marek.behun@nic.cz>
-Date: Sat, 15 May 2021 17:44:24 +0200
-Subject: [PATCH] wtmi: uart: fix UART baudrate divisor calculation
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The UART code uses the xtal clock as parent for UART baudrate
-generation, but it assumes that xtal runs at 25 MHz, which isn't
-necessarily the case for all A3720 boards.
-
-Use get_ref_clk() to determine xtal clock rate.
-
-Use rounding division to compute the divisor value.
-
-Signed-off-by: Marek Behún <marek.behun@nic.cz>
-Suggested-by: Pali Rohár <pali@kernel.org>
----
- wtmi/types.h | 5 +++++
- wtmi/uart.c  | 7 ++++---
- 2 files changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/wtmi/types.h b/wtmi/types.h
-index 7a6c6c6..ea873fc 100644
---- a/wtmi/types.h
-+++ b/wtmi/types.h
-@@ -47,4 +47,9 @@ typedef u32			size_t;
- 
- #define maybe_unused __attribute__((unused))
- 
-+static inline u32 div_round_closest_u32(u32 x, u32 d)
-+{
-+	return (x + d / 2) / d;
-+}
-+
- #endif /* __TYPES_H */
-diff --git a/wtmi/uart.c b/wtmi/uart.c
-index d40633d..75864b5 100644
---- a/wtmi/uart.c
-+++ b/wtmi/uart.c
-@@ -40,8 +40,6 @@
- #include "stdio.h"
- #include "debug.h"
- 
--#define UART_CLOCK_FREQ		25804800
--
- const struct uart_info uart1_info = {
- 	.rx	= 0xc0012000,
- 	.tx	= 0xc0012004,
-@@ -76,8 +74,11 @@ void uart_set_stdio(const struct uart_info *info)
- 
- void uart_reset(const struct uart_info *info, unsigned int baudrate)
- {
-+	u32 parent_rate = get_ref_clk() * 1000000;
-+
- 	/* set baudrate */
--	writel((UART_CLOCK_FREQ / baudrate / 16), info->baud);
-+	writel(div_round_closest_u32(parent_rate, baudrate * 16), info->baud);
-+
- 	/* set Programmable Oversampling Stack to 0, UART defaults to 16X scheme */
- 	writel(0, info->possr);
- 
--- 
-2.30.2
-
diff --git a/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/101-fix-clock-a3700-change-pwm-clock-for-600-600-and-120.patch b/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/101-fix-clock-a3700-change-pwm-clock-for-600-600-and-120.patch
deleted file mode 100644
index 6d74a053..00000000
--- a/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/101-fix-clock-a3700-change-pwm-clock-for-600-600-and-120.patch
+++ /dev/null
@@ -1,48 +0,0 @@ 
-From 3f33626ac7037bd62df9391e899f50e076e58cf7 Mon Sep 17 00:00:00 2001
-From: zachary <zhangzg@marvell.com>
-Date: Wed, 25 Oct 2017 15:50:29 +0800
-Subject: [PATCH] fix: clock: a3700: change pwm clock for 600/600 and 1200/750
- preset
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This patch is to change pwm clock from 100MHz to 50MHz for 600/600 and
-1200/750 preset to align with other presets.
-
-Change-Id: I067e189043be8c776bd3e7015a06f8ddf2590b96
-Signed-off-by: zachary <zhangzg@marvell.com>
-Reviewed-on: http://vgitil04.il.marvell.com:8080/45513
-Tested-by: iSoC Platform CI <ykjenk@marvell.com>
-Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
-Reviewed-by: Hua Jing <jinghua@marvell.com>
-Signed-off-by: Marek Behún <marek.behun@nic.cz>
----
- wtmi/clock.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/wtmi/clock.c b/wtmi/clock.c
-index 97c2825..1a1f0c6 100644
---- a/wtmi/clock.c
-+++ b/wtmi/clock.c
-@@ -447,7 +447,7 @@ static struct clock_cfg clk_cfg_all[] = {\
- 		/* NorthBridge */\
- 		{{TBG_A_S, TBG_B_S, TBG_B_S, TBG_B_S, TBG_A_P, TBG_A_P, TBG_A_P,\
- 		  TBG_B_S, TBG_B_S, TBG_A_P, TBG_B_S, TBG_A_P, TBG_B_S},\
--		 {2, 5, 2, 4, 1, 2, 6, 2},		/* DIV0 */\
-+		 {4, 5, 2, 4, 1, 2, 6, 2},		/* DIV0 */\
- 		 {1, 5, 2, 5, 2, 3, 2, 2, 3},		/* DIV1 */\
- 		 {4, 1, 5, 1, 3, 1, 2, 0, 0, 1} },	/* DIV2 */\
- 		/* SouthBridge */\
-@@ -495,7 +495,7 @@ static struct clock_cfg clk_cfg_all[] = {\
- 		/* NorthBridge */\
- 		{{TBG_B_S, TBG_B_S, TBG_B_S, TBG_B_S, TBG_B_S, TBG_B_S, TBG_B_S,\
- 		  TBG_B_S, TBG_A_S, TBG_B_S, TBG_A_P, TBG_B_S, TBG_A_S},\
--		{3, 4, 3, 4, 1, 1, 5, 1},		/* DIV0 */\
-+		{6, 4, 3, 4, 1, 1, 5, 1},		/* DIV0 */\
- 		{1, 6, 3, 4, 1, 6, 1, 1, 6},		/* DIV1 */\
- 		{4, 1, 6, 1, 3, 1, 3, 0, 0, 1} },	/* DIV2 */\
- 		/* SouthBridge */\
--- 
-2.30.2
-
diff --git a/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/102-avs-Validate-VDD-value-from-OTP.patch b/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/102-avs-Validate-VDD-value-from-OTP.patch
deleted file mode 100644
index d44eb211..00000000
--- a/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/102-avs-Validate-VDD-value-from-OTP.patch
+++ /dev/null
@@ -1,52 +0,0 @@ 
-From 15ff10623c83ee2e626d93d16e022b115dcb608f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali@kernel.org>
-Date: Sat, 10 Apr 2021 16:56:12 +0200
-Subject: [PATCH] avs: Validate VDD value from OTP
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-CPU VDD voltage value for 1.2 GHz frequency on some Espressobin boards is
-not set and raw value 0x00 is returned. In this case init_avs() function
-calculated CPU VDD voltage value to 0x00 + AVS_VDD_BASE = 0.898 V, which is
-too low for any operation and Espressobin board immediately crashed
-init_avs() function set this low value.
-
-This patch fixes above issue by validating returned VDD value from OTP and
-using default VDD value when invalid value is in OTP. With this patch
-init_avs() function does cause CPU crash anymore.
-
-Signed-off-by: Pali Rohár <pali@kernel.org>
-Signed-off-by: Marek Behún <marek.behun@nic.cz>
----
- wtmi/avs.c | 14 ++++++++++----
- 1 file changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/wtmi/avs.c b/wtmi/avs.c
-index 36ca9fa..4624359 100644
---- a/wtmi/avs.c
-+++ b/wtmi/avs.c
-@@ -140,10 +140,16 @@ int init_avs(u32 speed)
- 	}
- 
- 	if (svc_rev >= SVC_REVISION_2) {
--		vdd_otp = ((otp_data[OTP_DATA_SVC_SPEED_ID] >> shift) +
--			   AVS_VDD_BASE) & AVS_VDD_MASK;
--		regval |= (vdd_otp << HIGH_VDD_LIMIT_OFF);
--		regval |= (vdd_otp << LOW_VDD_LIMIT_OFF);
-+		vdd_otp = (otp_data[OTP_DATA_SVC_SPEED_ID] >> shift) &
-+			  AVS_VDD_MASK;
-+		if (!vdd_otp || vdd_otp + AVS_VDD_BASE > AVS_VDD_MASK) {
-+			regval |= (vdd_default << HIGH_VDD_LIMIT_OFF);
-+			regval |= (vdd_default << LOW_VDD_LIMIT_OFF);
-+		} else {
-+			vdd_otp += AVS_VDD_BASE;
-+			regval |= (vdd_otp << HIGH_VDD_LIMIT_OFF);
-+			regval |= (vdd_otp << LOW_VDD_LIMIT_OFF);
-+		}
- 	} else {
- 		regval |= (vdd_default << HIGH_VDD_LIMIT_OFF);
- 		regval |= (vdd_default << LOW_VDD_LIMIT_OFF);
--- 
-2.30.2
-