tools's Issues
jh7110-recovery-20221205.bin: CRC error
Sending file jh7110-recovery-20221205.bin to the VisionFive 2 board using Tera Term VT using the XMODEM protocol results in
CRC Error, Try again
Board revision is V1.3B
Document XMODEM behavior with good/bad chips
Hi!
I was playing around with the recovery feature on VisionFive2 and I had no luck getting it to work at all with a TTL-USB converter using this device:
Prolific Technology, Inc. PL2303 Serial Port / Mobile Action MA-8910
This is the errors:
Welcome to minicom 2.8
OPTIONS: I18n
Comp+----------------[xmodem upload - Press CTRL-C to quit]----------------+
Port|Sending jh7110-recovery-20230322.bin, 1291 blocks: Give your local XMO|
|DEM receive command now. |
Pres|Xmodem sectors/kbytes sent: 1192/149kRetry 0: NAK on sector |
| |
CCCC| |
(C)S| |
CCCC| |
+----------------------------------------------------------------------+
However, when I switch to using my trusty Future Technology Devices International, Ltd FT232 Serial (UART) IC
based one the XMODEM inside Minicom worked on the first try. (115200 8N1, No flow control).
Welcome to minicom 2.8
OPTIONS: I18n
Compiled on Jan 19 2023, 00:00:00.
Port /dev/ttyUSB0, 14:01:37
Press CTRL-A Z for help on special keys
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
JH7110 secondboot version: 230322-c514da9
CPU freq: 1250MHz
idcode: 0x1860C8
ddr 0x00000000, 4M test
ddr 0x00400000, 8M test
DDR clk 2133M, size 4GB
*********************************************************
****************** JH7110 program tool ******************
*********************************************************
0: update 2ndboot/SPL in flash
1: update 2ndboot/SPL in emmc
2: update fw_verif/uboot in flash
3: update fw_verif/uboot in emmc
4: update otp, caution!!!!
5: exit
NOTE: current xmodem receive buff = 0x40000000, 'load 0x********' to change.
select the function to test:
Might be worth mentioning on the recovery guide so that people don't pull their hair out trying to debug something that is due to a less-than-ideal TTL-serial-converter.
I repeated this experiement more than three times to ensure it was conclusive and it is. 0% success rate with my PL2303
adapter, 100% success rate with my FT232
one.
Provide source code for jh7110-recovery-20221205.bin
Hi, please accept my thanks for producing such a wonderful and feature rich board.
There are few misunderstandings on my side left as for a new user.
I'm experienced user of VisionFive 1 board, built, customized, modified and installed successfully it's firmware. I've been several times in need to recover it because my U-Boot was misconfigured, but I managed to get out of the situation using recovery.
There's jh7110-recovery-20221205.bin
U-Boot recovery binary in this repo.
I searched all your repositories, but nowhere is a sign of source code for it. I suspect it's upgraded https://github.com/starfive-tech/bootloader_recovery, but that repo does not show activity going towards porting it to VisionFive 2 (no branches related to VF2).
Could you please provide source code for it, point where it can be found, or at least tell why it's not published already?
Thank you.
source code, document behavior
Please provide the source code for and document the header that the tools generate.
The VisionFive 2 is advertised as open source, and here, sources are missing.
Here is what I have reverse engineered. Given a file with the following contents:
$ echo toaster > toaster
$ xxd toaster
00000000: 746f 6173 7465 720a toaster.
This is the output of ./create_sbl toaster 1234
(toaster.normal.out
):
$ hexdump toaster.normal.out
0000000 0240 0000 0000 0020 0000 0000 0000 0000
0000010 0000 0000 0000 0000 0000 0000 0000 0000
*
0000280 0000 0000 04d2 0000 0008 0000 0400 0000
0000290 f685 1a81 0000 0000 0000 0000 0000 0000
00002a0 0000 0000 0000 0000 0000 0000 0000 0000
*
0000400 6f74 7361 6574 0a72
0000408
Note: all entries are little endian
The first two bytes seem to be fixed; I've run the tool over a few other files: 0240
. Same for the 0020
at 0x007
.
Then come many more zero-bytes.
The 04d2 0000
(at 0x0284
) is the hex representation of the version passed, 1234
. I noticed that passing longer numbers gets truncated and only the lowest 32 bits (4 bytes) are preserved.
The 0008 0000
appears to be the file size in bytes.
The 0400 0000
seems to be fixed.
The f685 1a81
is the CRC32 checksum of the file.
At 0x0400
, the actual file starts.
document OTP fuses and secure boot flow
In #1, we discussed the basics of creating a valid header for a simple boot.
Still open is
- what are the semantics behind the OTP cells?
- how does the secure boot flow work exactly?
- where are the OTP cells in MMIO space?
For reference:
- https://forum.rvspace.org/t/bootloader-recovery-tool/3403
- https://doc-en.rvspace.org/JH7110/Datasheet/JH7110_DS/otp.html
I would like to provision my JH7110 SoCs with secure boot and need this documentation.
I can write the tools for that myself and would integrate support in oreboot.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.