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

ppsMmcTool.txt #1

Closed
guino opened this issue Nov 17, 2020 · 2 comments
Closed

ppsMmcTool.txt #1

guino opened this issue Nov 17, 2020 · 2 comments

Comments

@guino
Copy link

guino commented Nov 17, 2020

I have a similar camera with anyka uboot (password protected) and you can make uboot read ppsMmcTool preparing it with 'mkimage':

$ mkimage -A arm -O linux -T script -C none -n ppsMmcTool -a 0x42000000 -d inputFile ppsMmsTool.txt

I used 'script' as type above but it doesn't seem to be looking for a script, instead it seems to be directly executing the binary loaded at that address. The problem is that it can't be a very big code as it will only load around 4Kb of data, so it seems like a way for them to execute some code that uses the already loaded u-boot functions OR it self loads from mmc/network/etc.

Here's the output I got -- notice it doesn't show 'magic err' or 'shorter than offset + len' during that startup:

hisi-sdhci: 0
PPS:Mar 18 2020 19:07:17 meari_c5    0
button
cmd:fatload mmc 0 0x42000000 ppsMmcTool.txt 1020
reading ppsMmcTool.txt
4128 bytes read in 3 ms (1.3 MiB/s)
data abort
pc : [<43f7fbb8>]          lr : [<d3ed8f15>]
reloc pc : [<4080bbb8>]    lr : [<d0764f15>]
sp : 43f33da8  ip : 43fb095c     fp : 00000018
r10: 43f35dd8  r9 : 43f33ee0     r8 : 00000000
r7 : 00000000  r6 : 43f45c28     r5 : 43f35e60  r4 : 00000001
r3 : 43f35e40  r2 : 00000000     r1 : 00000428  r0 : 56190527
Flags: nzCv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...

Obviously it is crashing the CPU because I only put in u-boot script commands (text) in the file hoping that it would load/execute the script, but doesn't seem to be the case.

I don't want to go writing code just to get access to this thing but I may invest in a hardware SPI reader (which I can use on this and other boards) to read/write the onboard flash chip directly to gain access, but I am still wondering if it's worth the effort.

@DeltaTangoLima
Copy link
Owner

Hey @guino - thanks for this. Another piece of the puzzle. I hadn't gone back to this li'l side project for a while, but I may try a few things when I get some spare time over the next few weeks or so, see if I can get somewhere with it. Cheers!

@guino
Copy link
Author

guino commented Dec 5, 2020

Figured it out:
guino/BazzDoorbell#2

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

2 participants