Skip to content
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

unlock gk7605v100 #8

Open
prchal opened this issue Jan 17, 2023 · 17 comments
Open

unlock gk7605v100 #8

prchal opened this issue Jan 17, 2023 · 17 comments

Comments

@prchal
Copy link

prchal commented Jan 17, 2023

Hi,
original u-boot is password locked, so I run u-boot by loading it with burn:
./burn --chip gk7205v300 --file=../u-boot-gk7605v100-universal.bin --break
I get promt:
OpenIPC #
then I can do all commands (unlock, erase and write serial flash) with success:
OpenIPC # sf probe
OpenIPC # sf lock 0
unlock all block.
OpenIPC # sf erase 0x0 0x50000; sf write 0x42000000 0x0 0x50000
Erasing at 0x50000 -- 100% complete.
SF: 327680 bytes @ 0x0 Erased: OK
device 0 offset 0x0, size 0x50000
Writing at 0x50000 -- 100% complete.
SF: 327680 bytes @ 0x0 Written: OK
OpenIPC #
but in flash is still original u-boot (read out and compared).
What I'm doing wrong?
Thanks

@prchal
Copy link
Author

prchal commented Jan 17, 2023

Don't mind, I upgrade it by IPCam_DMS
https://team.openipc.org/ipcam_dms/IPCam_DMS_20201121_EN.zip

@sharad0397
Copy link

@prchal I am facing a similar issue. Can you explain a bit more how you did this?

@dimerr
Copy link
Contributor

dimerr commented Feb 28, 2023

u-boot.zip
Use burn to start this uboot
sf probe 0; sf lock 0

Or just start recent kernel from tftp (it just has to start once, no need rootfs or anything)

@sharad0397
Copy link

Dimerr - can you elaborate more. My uboot is password protected and I have tried to use burn but it never exceeds past initial shell session?

@sharad0397
Copy link

image

@choeflake
Copy link

When writing the data I get a failed message. Anybody an idea? The board is a BLK605V1

`Trying open /dev/tty.usbserial-A50285BI
Welcome to boot-mode

{'name': 'hi3516ev200', 'DDRSTEP0': [4, 224, 45, 229, 36, 0, 159, 229, 36, 16, 159, 229, 0, 16, 128, 229, 32, 0, 159, 229, 32, 16, 159, 229, 4, 16, 128, 228, 0, 224, 128, 229, 4, 240, 157, 228, 239, 190, 173, 222, 239, 190, 173, 222, 239, 190, 173, 222, 60, 1, 2, 18, 120, 86, 52, 18, 64, 1, 2, 18, 117, 106, 105, 122], 'ADDRESS': ['0x04013000', '0x04010500', '0x41000000'], 'FILELEN': ['0x0040', '0x6000'], 'STEPLEN': ['0x0040', '0x0080']}
Sending u-boot/gk7205v300.bin ...
Send DDRSTEP frame...
Send HEAD frame...
Send TAIL frame...
Send HEAD frame...
failedATA frame[ ]0 of 24576
failedATA frame[========== ]1024 of 24576
failedATA frame[==================== ]2048 of 24576
failedATA frame[============================== ]3072 of 24576
failedATA frame[======================================== ]4096 of 24576
failedATA frame[================================================== ]5120 of 24576
failedATA frame[============================================================ ]6144 of 24576
failedATA frame[====================================================================== ]7168 of 24576
failedATA frame[================================================================================ ]8192 of 24576
failedATA frame[========================================================================================== ]9216 of 24576
failedATA frame[==================================================================================================== ]10240 of 24576
failedATA frame[============================================================================================================== ]11264 of 24576`

@widgetii
Copy link
Member

Why are you sending gk7205v300 U-Boot binary to gk7605v100 SoC? Something is wrong here

@choeflake
Copy link

I also tried with u-boot-gk7605v100-universal.bin (downloaded from firmware releases). But even no luck...

@widgetii
Copy link
Member

Please describe step by step what are you doing now while using burn (power off board, etc)

@choeflake
Copy link

The board has a POE module attached to it. I power the POE module with a 12V power supply. Furthermore I have connected:
Board -> Serial-To-USB
GND -> GND
TX0 -> RX
RX0 -> TX

The Serial-to-usb is connected to an Apple conversion cable to USB-C on my macbook. When I use the screen tool, I see the boot sequence. I can intercept the boot sequence to get the login prompt of u-boot. So basically the connection TX and RX seems to be working.

To burn, I start the burn tool. The tool waits for a connection. When I connect power to the camera, the tool starts burning.

Using other json settings file and/or other u-boot binaries, I got the failed errors on different phases (HEAD, TAIL, DATA FRAME etc). But there is also an issue when I connect my laptop to the grid, there are move failed messages. For example the above command will then give a failed message at the HEAD frame.

That pointed me to search for a ground issue, tried to shortcut grond from the board to earth, but that did not help. Ground from board to USB ground is ok (zero ohm). I cannot find a power input on the camera board to power the chip for programming.

@widgetii
Copy link
Member

It seems that everything is right, I'd try burn on Linux machine to check if you still have these errors

@choeflake
Copy link

Using another laptop with Ubuntu Live USB I cloud start and finish the burn process without errors. So thank you for the tip!

But now, installing the OpenIPC firmware failed. As said, I could burn the gk7605v100 universal u-boot file. Then I'm in the u-boot console. Backing up the current firmware over TFTP succeeded. Also I could load the new firmware and save it. But when I reset, the camera still starts with the original u-boot.

The installation instruction describes to intercept the bootloader after entering the reset command. But the bootloader which comes up after the reset is the original one.

@widgetii
Copy link
Member

Check U-Boot from the message now and try to unlock your flash

@choeflake
Copy link

Using that u-boot.bin causes a failed messages on de second DATA frame. Probably I use the wrong json file (the -c parameter of the burn tool). I tried gk7205v300 and hi3616ev200, as there is no gk7605v100.

@lex232
Copy link

lex232 commented May 10, 2023

Hello! I have a similar problem with gk7605v100 soc.
The steps i took:

  1. Connect by UART and determined size of memory - 16mb.
    Unfortunately the bootloader is locked. Next my actions:
  2. Download u-boot-gk7605v100-universal.bin, openipc-gk7605v100-lite-16mb.bin and openipc.gk7605v100-nor-lite.tgz from OpenIPC (generated for 16mb).
  3. by using BURN:
    python burn --chip gk7205v300 --file=u-boot-gk7605v100-universal.bin -p COM4 --break
    got access to boot and firmware backup.
  4. Then i tried from instruction:
setenv ipaddr 192.168.1.10; setenv serverip 192.168.1.254
mw.b 0x42000000 0xff 0x1000000
tftpboot 0x42000000 openipc-gk7605v100-lite-16mb.bin
sf probe 0; sf erase 0x0 0x1000000; sf write 0x42000000 0x0 0x1000000
reset

After reset starting old u-boot with password.
5) Added sf lock 0 to
sf probe 0; sf lock 0, sf erase 0x0 0x1000000; sf write 0x42000000 0x0 0x1000000
-> no result(
6) Tried "Alternatively, flash OpenIPC Firmware by its parts"
-> old bootloader after first reboot (sf lock 0 was added)
7) My last attempt to start kernel after download u-boot:
Download u-boot:

setenv ipaddr 192.168.1.10; setenv serverip 192.168.1.254
mw.b 0x42000000 0xff 0x50000
tftpboot 0x42000000 u-boot-gk7605v100-universal.bin
sf probe 0; sf lock 0; sf erase 0x0 0x50000; sf write 0x42000000 0x0 0x50000

Then in tftp folder i added files: rootfs.squashfs.gk7605v100, rootfs.squashfs.gk7605v100.md5sum, uImage.gk7605v100, uImage.gk7605v100.md5sum from openipc.gk7605v100-nor-lite.tar
And then

run uknor16m; run urnor16m
sf erase 0x750000 0xB0000

And try to start kernel from unbrick instructions:
setenv ipaddr 192.168.1.10; setenv serverip 192.168.1.254; mw.b 0x42000000 0xff 0x1000000; tftpboot 0x42000000 uImage.gk7605v100; bootm 0x42000000

At the end i see message in terminal "starting kernel"
But after reset i also see old bootloader with password(
Please help, which steps are wrong?

P.S. There is another u-boot.bin in this thread, but this file not worked by burn.
Second DATA frame is not transmitted(.

@Damme
Copy link

Damme commented Aug 15, 2023

same issue here, tested u-boot.bin in here too but fails to "burn"-load
gk7605v100, factory u-boot is password is protected. Booting u-boot-gk7605v100-universal.bin does not save anything to spi flash. tried multiple different combinations. flash just refuses to flash.

anyone succeeded to write spi flash from "burn"-tool?

@ofilin
Copy link

ofilin commented Apr 1, 2024

anyone succeeded to write spi flash from "burn"-tool?

no :(

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

No branches or pull requests

8 participants