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

Completely Open Source Firmware - Testers needed #575

Closed
EliasKotlyar opened this issue Jul 15, 2018 · 31 comments
Closed

Completely Open Source Firmware - Testers needed #575

EliasKotlyar opened this issue Jul 15, 2018 · 31 comments

Comments

@EliasKotlyar
Copy link
Owner

Hello everyone,

I was able to compile a completely open source firmware. Here is a description how to flash it:
https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks/blob/master/hacks/install_sdcard.md

Unfortunately, its working only for a Dafang. I cannot test it on different hardware. However it should be possible to adapt it also to the other cameras.

It includes a completely open source kernel and a rootfs which was made by copying various files from the dafang firmware. You can use a package manager like optware, and all the paths are writeable.

@Cabalist
Copy link
Contributor

Which other cameras would you like tested? I have a few and no issue cracking them open.

@AustinSaintAubin
Copy link

Wrote Entware Install Guide on Optware/Entware Support #542
Its one way to install Entware/Optware.

@EliasKotlyar
Copy link
Owner Author

Thanks your @AustinSaintAubin !

@Cabalist : For now, only the Dafang is supported. As soon as #573 gets resolved, we can test on different cameras. You can have a look at this issue first.

@EliasKotlyar
Copy link
Owner Author

I have reduced the amount of steps to only 5. Its basically: Create a EXT3 Partition, and clone the git inside it.
Also the Audio is now working again.

@nik0
Copy link
Collaborator

nik0 commented Jul 20, 2018

Hi,
I need help here. I want to have the rootfs on the sdcard. I guess it is possible ?
I have my sdcard formated in fat32 (good idea) ?
I have uenv.txt at the root of the sdcard with
bootargs=console=ttyS1,115200n8 mem=32M@0x0 ispmem=8M@0x2000000 rmem=24M@0x2800000 init=/linuxrc root=/dev/mmcblk0p2 rootwait rootfstype=vfat rw mtdparts=jz_sfc:256k(boot),2048k(kernel),3392k(root),640k(driver),4736k(appfs),2048k(backupk),640k(backupd),2048k(backupa),256k(config),256k(para),-(flag)
I have a 64mo Dafang
When booting the Dafang got the blue led but keep rebooting in loop

Is it the right thing to do?
Is there any way to get the uboot log apart soldering an COM to USB convertor?

Thanks !!
Nik0

@jmtatsch
Copy link
Collaborator

@nik0 I don’t think fat32 is a good idea, we cannot have symlinks that way. Make one ext3 partition only and clone the rootfs to it.

@jmtatsch
Copy link
Collaborator

And yes you get the bootloader log via serial connection.

@nik0
Copy link
Collaborator

nik0 commented Jul 20, 2018

Ok i’ll test with an ext3 ....

@nik0
Copy link
Collaborator

nik0 commented Jul 21, 2018

Ok it works with ext3
Now I have some troubles having an IP from WiFi (interface is up but no ip )
Continue searching...

@EliasKotlyar
Copy link
Owner Author

@nik0 : If you need help - just tell me. You might need a custom bootloader for a Dafang with 64mb. Also: Do you know which wifi driver it uses by default?

@nik0
Copy link
Collaborator

nik0 commented Jul 21, 2018

I used you custom 64mb bootloader that seems to work fine
I also succeeded connecting to my wifi but

  • DHCP does not seem to work (maybe my network configuration fault)
  • I have to set an IP using ifconfig wlan0 IP does all the network/interface stuff works ?

Said that I tried to insert audio.ko module and it says /dsp is already in use. Is the plan using the default audio from linux ? Not anymore the sdk one ?
thanks !

@EliasKotlyar
Copy link
Owner Author

@nik0 : DHCP should be working fine - It is using the same binary. I suppose that you have a different Wifi Module on your Dafang? Can you try to boot into the normal dafang-hacks and check which wifi driver is loaded?

audio.ko is not needed anymore. I have tested sound and it was working fine with the new kernel.

@nik0
Copy link
Collaborator

nik0 commented Jul 21, 2018

Do you think DHCP problem can come from the wifi driver ?
audio is now alsa ? that's it ?

@EliasKotlyar
Copy link
Owner Author

EliasKotlyar commented Jul 21, 2018

Yes, if there is a Problem with wifi-driver, it wont run DHCP - so check the driver first. You can try to insert a USB-Wifi Dongle first to get a connection. Then you can experiment with the drivers.

Audio is still OSS - we can try to switch to ALSA, but i dont think its a good idea because of the memory usage. I suppose that ALSA will use more memory than OSS

@nik0
Copy link
Collaborator

nik0 commented Jul 22, 2018

The wifi driver is OK
I have an ip from dhcp, but it is not set on the interface:
`udhcpc: started, v1.29.0.git
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending select for 192.168.1.33
udhcpc: lease of 192.168.1.33 obtained, lease time 86400

wlan0 Link encap:Ethernet HWaddr 78:11:DC:12:C5:54
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1194 (1.1 KiB) TX bytes:1042 (1.0 KiB)
`
strange ...

@EliasKotlyar
Copy link
Owner Author

I had a similar problem. Can you try to chmod +x the udhcpc.script in /etc? It helped me

@nik0
Copy link
Collaborator

nik0 commented Jul 22, 2018

:-)
So obvious ... Thanks it worked !!

@paumove
Copy link

paumove commented Aug 2, 2018

having the open source bootloader installed, wich method is better to use?

  • "framework_mod" folder into an sdcard with only one FAT32 partition
  • "rootfs" file system into an sdcard with only one EXT3 partition
  • any other

Thanks

@nik0
Copy link
Collaborator

nik0 commented Aug 2, 2018

Roots is finished yet, a lot of features are not working yet (the paths have changed)
So if you want to have all functionalities keep FAT32

@paumove
Copy link

paumove commented Aug 2, 2018

👍 Thanks

@arkhub
Copy link
Contributor

arkhub commented Nov 4, 2018

I've tried the open source firmware, runs perfectly but most function still unavailable due to path problem, is there any new version planned? I volunteer to be the tester. (or if you can hints on where to change the path from fat32 version I think might want to try it).

@jmtatsch
Copy link
Collaborator

jmtatsch commented Nov 4, 2018

@arkhub you may want to try my pull request Dafang-Hacks/rootfs#3 most stuff should work. Or you can have a look at https://github.com/anmaped/openfang promising but not yet fully functional.

@arkhub
Copy link
Contributor

arkhub commented Nov 11, 2018

@arkhub you may want to try my pull request Dafang-Hacks/rootfs#3 most stuff should work. Or you can have a look at https://github.com/anmaped/openfang promising but not yet fully functional.

Thank you, I will try look into your pull request first.

@Swiftnesses
Copy link

Swiftnesses commented Dec 12, 2018

Flashed this to my Xiaofang 1S (Ingenic XBurst T20 SoC) (from the logs). I believe it's 128MB from the original logs.

I used the V2 version, which did flash and the device now boots (more than it did with the latest official release, which prevents booting the hacks!). The issue is I can't get an image from it, the web ui displays 'unable to load image'?

FYI, I worked around the new firmware, by dropping your bootloader on the SD, connecting serial, botting and flashing from the media directory 👍

@jmtatsch
Copy link
Collaborator

You are booting rootfs? Maybe the camera sensor driver does not fit your camera. Which sensor is detected? Does the script load the correct one?

@Swiftnesses
Copy link

I'm booting the hack from the SD? (Sorry, I'm new to this).

I'm not sure tbh what the difference between V1 and V2 is, I assumed as my camera appears to be a recent build (has the firmware that prevents the hack) it was new, hence V2!

@jmtatsch
Copy link
Collaborator

Rootfs from ext3 partition or the mainstream Dafang hacks?

@Swiftnesses
Copy link

the latest Git of Defang hacks loading from micro...

@stale
Copy link

stale bot commented May 19, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 19, 2019
@Cabalist
Copy link
Contributor

Just saw that this got marked stale. What is the status of this? I'd love to see something in the README that consolidated the information on the different options with these cameras. :)

@stale stale bot removed the wontfix label May 19, 2019
@stale
Copy link

stale bot commented Jul 18, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 18, 2019
@stale stale bot closed this as completed Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants