-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for bk7238 #23
Comments
When I connect CEN to GND for short time, I receive these errors
|
I have never heard of this chip before. There's a pending update here: Please post the verbose output of running bk7231tools from this branch. |
Reading flash in working on this branch:
|
@kuba2k2 Writing to flash emits error:
|
@kuba2k2 SoC info is here: https://www.bekencorp.com/en/goods/detail/cid/42.html |
Try adding the flash ID somewhere here: b"\x85\x60\x17": 2,
+ b"\x85\x42\x15": 2,
b"\xC2\x23\x14": 2, |
@kuba2k2 New error
Patch: diff --git a/bk7231tools/serial/cmd_hl_flash.py b/bk7231tools/serial/cmd_hl_flash.py
index d78b075..efe0f92 100644
--- a/bk7231tools/serial/cmd_hl_flash.py
+++ b/bk7231tools/serial/cmd_hl_flash.py
@@ -23,6 +23,7 @@ class BK7231SerialCmdHLFlash(BK7231SerialInterface):
b"\x51\x40\x13": 1,
b"\x51\x40\x14": 1,
b"\x5E\x40\x14": 1,
+ b"\x85\x42\x15": 2,
b"\x85\x60\x13": 2,
b"\x85\x60\x14": 2,
b"\x85\x60\x16": 2, |
@kuba2k2 Is it possible to make a quick fix here? Sorry for pushing. I'm trying to decide which way to go on my working task — wait for fix here or continue to look for another options to work with bk7238 SoC. BTW, thank you for your tool and for you help! |
I don't know, really. Maybe instead of |
diff --git a/bk7231tools/serial/cmd_hl_flash.py b/bk7231tools/serial/cmd_hl_flash.py
index d78b075..cf5718d 100644
--- a/bk7231tools/serial/cmd_hl_flash.py
+++ b/bk7231tools/serial/cmd_hl_flash.py
@@ -23,6 +23,7 @@ class BK7231SerialCmdHLFlash(BK7231SerialInterface):
b"\x51\x40\x13": 1,
b"\x51\x40\x14": 1,
b"\x5E\x40\x14": 1,
+ b"\x85\x42\x15": 1,
b"\x85\x60\x13": 2,
b"\x85\x60\x14": 2,
b"\x85\x60\x16": 2, @kuba2k2 It worked! Also I needed to connect CEN to GND one-time. |
|
Actually, no. |
@kuba2k2 When are you planning to release this branch? |
Can you share the stock firmware dump of that device? I need to add the bootloader parameters to bk7231tools first. |
Also, I would need a ROM dump of that chip made with ltchiptool. |
@kuba2k2 I've got another SoC Beken BK7238, with different flash ID: I added it like this: diff --git a/bk7231tools/serial/cmd_hl_flash.py b/bk7231tools/serial/cmd_hl_flash.py
index 1e6c322..045af62 100644
--- a/bk7231tools/serial/cmd_hl_flash.py
+++ b/bk7231tools/serial/cmd_hl_flash.py
@@ -23,6 +23,7 @@ class BK7231SerialCmdHLFlash(BK7231SerialInterface):
b"\x51\x40\x13": 1,
b"\x51\x40\x14": 1,
b"\x5E\x40\x14": 1,
+ b"\x85\x20\x15": 2,
b"\x85\x42\x15": 1,
b"\x85\x60\x13": 2,
b"\x85\x60\x14": 2, But got this error trying to flash binary:
How it could be fixed?
Could you provide a command, how to make it?
Do you need only a bootloader binary? Could you DM me at https://telegram.me/arikon, I can provide you some. |
Patch: diff --git a/bk7231tools/serial/cmd_hl_flash.py b/bk7231tools/serial/cmd_hl_flash.py
index 1e6c322..0ca1528 100644
--- a/bk7231tools/serial/cmd_hl_flash.py
+++ b/bk7231tools/serial/cmd_hl_flash.py
@@ -23,6 +23,7 @@ class BK7231SerialCmdHLFlash(BK7231SerialInterface):
b"\x51\x40\x13": 1,
b"\x51\x40\x14": 1,
b"\x5E\x40\x14": 1,
+ b"\x85\x20\x15": 1,
b"\x85\x42\x15": 1,
b"\x85\x60\x13": 2,
b"\x85\x60\x14": 2, Result:
Patch: diff --git a/bk7231tools/serial/cmd_hl_flash.py b/bk7231tools/serial/cmd_hl_flash.py
index 1e6c322..0ca1528 100644
--- a/bk7231tools/serial/cmd_hl_flash.py
+++ b/bk7231tools/serial/cmd_hl_flash.py
@@ -23,6 +23,7 @@ class BK7231SerialCmdHLFlash(BK7231SerialInterface):
b"\x51\x40\x13": 1,
b"\x51\x40\x14": 1,
b"\x5E\x40\x14": 1,
+ b"\x85\x20\x15": 2,
b"\x85\x42\x15": 1,
b"\x85\x60\x13": 2,
b"\x85\x60\x14": 2, Result:
|
I don't think I know.
I see you use bk7231tools directly. To make a ROM dump (or any other kind of firmware dump), install
A whole firmware dump would help, but if you can't share it, the bootloader itself will do too. If you read from 0x0 to 0x11000 you will get the bootloader only.
You can, just pack it into a ZIP file. |
@kuba2k2 Here are all the bootloaders I have, not only for bk7238. Here is rom.
|
Are these bootloaders taken from some SDK? They look like they don't come from a flash chip of the BK7238. If you could dump the bootloader (it might be a bit different than the ones from SDK) it would be helpful. |
@kuba2k2 Yes.
You can use this one. And other bootloaders to add support for them, if you like. |
@kuba2k2 Here is dumped from flash bootloader: PS: You were right, it is different from the one from SDK. |
@kuba2k2 Could you tell, please, is it possible to add support for BK7238 to |
It supports Bk7238 already, you've been able to flash a few devices before. |
@kuba2k2 Okay =) Is it possible to add support for BK7238 with different flash? |
If what you've tried doesn't work, then you either modified the wrong file (e.g. your changes weren't installed in the version you tested) or the flash chip requires something different. I can't possibly test every flash chip ever made. You can, however, try ltchiptool-ft232-flasher, which can connect to BK72xx using an FT232 adapter. You first need to install the libusbK driver using Zadig. The tool can show more information, such as the Status Registers. |
@arikon im curious about what devices you have that contain BK7238s. if you have links to exact items please that would be useful. thanks! this is the only one I have at present https://discord.com/channels/967863521511608370/1261030204508209243 |
Is it possible to use
bk7231tools
withbk7238
SoC?I tried with no luck on macOS:
The text was updated successfully, but these errors were encountered: