Skip to content

Conversation

@no1wudi
Copy link
Contributor

@no1wudi no1wudi commented Sep 5, 2024

Summary

This commit is to fix the issue that the third-party hal is removed each time the project is distclean, then we can skip cloning the third-party hal if the commit id is the same to speed up the compilation.

Impact

riscv based esp32

Testing

local machine

@simbit18
Copy link
Contributor

simbit18 commented Sep 5, 2024

Hi @no1wudi
I was working on this approach to speed up the compilation and reduce download errors on github and locally. Basically I added a storage folder. Now as an example it is used for esp32 and esp32s2.
I only need to finish logical flags to clean the folder.

master...simbit18:nuttx:simbit18-speed

@no1wudi
Copy link
Contributor Author

no1wudi commented Sep 5, 2024

@simbit18 I'm fine with both approach.

@simbit18
Copy link
Contributor

simbit18 commented Sep 5, 2024

@no1wudi the two approaches if I am not mistaken can coexist.

This commit is to fix the issue that the third-party hal is removed each
time the project is distclean, then we can skip cloning the third-party
hal if the commit id is the same to speed up the compilation.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
@no1wudi
Copy link
Contributor Author

no1wudi commented Sep 5, 2024

@simbit18 It seems can not handle this by my current apporach:

ifeq ($(CONFIG_ESP_WIRELESS),y)
$(Q) echo "Espressif HAL for 3rd Party Platforms: initializing submodules..."
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO) submodule --quiet update --init $(GIT_DEPTH_PARAMETER) components/mbedtls/mbedtls components/esp_phy/lib components/esp_wifi/lib components/esp_coex/lib
$(Q) git -C chip/$(ESP_HAL_3RDPARTY_REPO)/components/mbedtls/mbedtls reset --quiet --hard
$(Q) echo "Applying patches..."
$(Q) cd chip/$(ESP_HAL_3RDPARTY_REPO)/components/mbedtls/mbedtls && git apply ../../../nuttx/patches/components/mbedtls/mbedtls/*.patch
endif

I'll close this PR, can you submit your changes?

@no1wudi no1wudi closed this Sep 5, 2024
@simbit18
Copy link
Contributor

simbit18 commented Sep 5, 2024

@no1wudi sure I am finalizing the PR I hope in the day.

@tmedicci
Copy link
Contributor

tmedicci commented Sep 5, 2024

Hi @no1wudi and @simbit18 , thanks for the suggestions of improvement. Please tag me whenever you release your PRs: I will test it in our internal CI ;)

Just sharing some thoughts: please note that the HAL folder becomes "dirty" after cloned because we need to apply some patches (esp-hal-3rdparty/nuttx/patches). So, if adopting the temp folder approach, I recommend keeping the temp folder "clean" and reapplying the patches only in the final location.

I'm curious about how the mechanics of the temp folder would work. When would it be cleaned/created?

@simbit18
Copy link
Contributor

simbit18 commented Sep 5, 2024

Hi @no1wudi and @tmedicci see PR #13301

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants