DFU::isUbootDfuRunning(uint32_t msTimeout) - does not work for STM32MP1 devices with closed_device bit set in OTP

Đang mở
#2 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
65/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
cpp
Lĩnh vực
embedded-iot

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C++
Star
13
Fork
3
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.