DFU::isUbootDfuRunning(uint32_t msTimeout) - does not work for STM32MP1 devices with closed_device bit set in OTP
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- cpp
- Domain
- embedded-iot
Research direction
Start by locating DFU::isUbootDfuRunning(uint32_t msTimeout) and inspect how it parses the DFU listing with the OTP regex. Reproduce the listing on an STM32MP1 device with the closed_device OTP bit set, then verify detection using the exposed @FlashLayout entry or another reliable DFU indicator. Confirm that detection still works for unlocked devices.
Written by the indexing model from the issue text.
Description
After a long debugging session I have tracked down the cause for an issue that prevented me from flashing my STM32MP1 devices via fastboot using the STM32PRG-TOOLBOX. My devices have the OTP bit closed_device set to '1'. It seems this causes the device to restrict OTP exposure via DFU.
Routine DFU::isUbootDfuRunning(uint32_t msTimeout) checks for the regex std::regex pattern("name=(\"@OTP([^\\\"]*)\")"); to identify whether U-Boot has enabled the devices DFU after programming TF-A + FIP. However the locked devices do not expose the OTP here. For example my locked devices only expose the following:
Found DFU: [0483:df11] ver=0200, devnum=123, cfg=1, intf=0, path="1-1", alt=2, name="@PMIC/0xf4/1*8Be", serial="002300433231510331333437"
Found DFU: [0483:df11] ver=0200, devnum=123, cfg=1, intf=0, path="1-1", alt=1, name="@virtual/0xf1/1*512Be", serial="002300433231510331333437"
Found DFU: [0483:df11] ver=0200, devnum=123, cfg=1, intf=0, path="1-1", alt=0, name="@FlashLayout/0x00/1*256Ke", serial="002300433231510331333437"
As you can see, there is no OTP entry, that is only available for unlocked devices.
I suggest to change the routine to scan for something else e.g. std::regex pattern("name=(\"@FlashLayout([^\\\"]*)\")"); regex or use some entirely other means to determine whether the DFU is available.
- Dominant language
- C++
- Stars
- 13
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
Invalid-MissingHash/Commit/NotAC
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
azerothcore/azerothcore-wotlk#28636 ·
Maintainers usually reply within 1 day
-
(S1 - Need confirmation)
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
CleverRaven/Cataclysm-DDA#89829 ·
Maintainers usually reply within 1 day
-
comp-documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ClickHouse/ClickHouse#136277 ·
Maintainers usually reply within 1 day
-
Flow Needs: Triage :mag:
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
react/react-native#60447 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day