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

NOT READY TO MERGE: Updated scripts #4

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

djwillis
Copy link
Contributor

Not ready to merge but wanted to flag these changes up.

Added support for turning on and off the built in FTP service and a few other bits and bobs.

Example metadata about the ONVIF device_service endpoint the camera seems to try and send up in one of its payloads to the remote servers. 

Gives us a few clues on what may be possible with ONVIF as the device_service endpoint can be used for control including PTZ but at the moment the actual web server running on 80 does not return anything when you try and call the service locally.
Also set to toggle RED for a root account, GREEN for a normal user.
@djwillis
Copy link
Contributor Author

I should also mention that this installs all the busybox symlinks and runs the 'hacked' stuff from /home with links to survive reboots. My plan is to rework this into 2 scripts, one that installs the hacks and one that runs them from the NAND on each boot.

@ant-thomas
Copy link
Owner

Great work. Let me know if/when you're ready to merge or if you want me to test anything.
I have an untouched still boxed camera I was going to try the current script on with an added line for copying wpa_supplicant.conf over to avoid even registering the camera via the app.

@ant-thomas
Copy link
Owner

Not tried on an unconfigured camera yet, but on my configured camera copying a wpa_supplicant.conf file from sd to home (or symlinking would likely also work) via debug_cmd.sh allows you to change the WiFi connection. debug_cmd.sh certainly runs before the WiFi connects.

@djwillis
Copy link
Contributor Author

It will be a day or so before I can clean it up some more, the wpa_supplicant.conf stuff seems to work so will commit that tomorrow :). Building a few tools for the device, dropbear, latest wpa_supplicant etc.

Keeping my spare camera boxed until I have worked on this a little more.

Not sure how far I will go beyond this script, have asked Goke for the kernel source, not holding out much hope but no harm trying.

@deorder
Copy link
Contributor

deorder commented Oct 31, 2017

You should als Goke for the SDK instead. The following file: GK710X_LinuxSDK_v1.1.0.tar.7z. It is a modified buildroot that includes the source of the drivers etc., which I think are proprietary.

@djwillis
Copy link
Contributor Author

@deorder thanks, i'll ask, I was really mainly interested in the GPL side of the kernel so it could be shared/hosted. That said, lets see what they provide, if anything.

Working but really untidy.

TODO: Split the scripts up into one on the device and one 'hack' script to bootstrap things.
@ant-thomas
Copy link
Owner

If you're looking for a dropbear binary I "borrowed" one from here
https://github.com/samtap/fang-hacks/blob/0d2913f11b6bcf471f97e7bb29e6d4b5777c1dbf/sbin/dropbearmulti

It works on the ZS-GX1. You need to start it with -R and the /etc/dropbear/ folder needs to exist. -R is required to generate the key but if you can then copy the key to the SD card it would enable retaining the key between reboots, which is obviously preferred, and only using -R if the key doesn't exist.

@djwillis
Copy link
Contributor Author

djwillis commented Nov 5, 2017

Thanks, I'll take a look.

I went back to basics and just built up a uclibc toolchain so anything that was needed could be built for the device. Got distracted sorting that out ;).

@deorder
Copy link
Contributor

deorder commented Nov 7, 2017

My buildroot config. Just backup your ".config" and replace it with the following file:

goke.buildroot.config.txt

It will build most of what is required for goke using buildroot. You can select / deselect packages as needed. Also look into creating static builds and/or setting LD_LIBRARY_PATH if you require to run commands outside of a chroot.

Sadly the memory is too limited to load another kernel using kexec. May be that you can manage this?
I tried "switch_root" to run my custom "init", but it should run with PID 1 which is already taken by the official "init". This one cannot be killed.

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

Successfully merging this pull request may close these issues.

3 participants