1. How to compile your first (unusable) firmware - GrumpyMeow/XiaomiXiaofangFirmware GitHub Wiki
Locate the VirtualBox appliance file "SN986-buildenv-x86.ova"
Install VirtualBox
Import the appliance file
Modify the settings of the imported virtual machine
Start the VM
Login
- login as dev (or root), password "devel"
Modify the keyboard layout (if needed)
- Click "Applications Menu" > "Administration" > "Keyboard"
- Change keyboard layout to "US International"
Disable the screen saver
- Click "Applications Menu" > "Settings" > "Screen saver"
- Disable the screen saver.
Make a firmware using the already present SDK
- execute: "cd SN986_1.50_037a_20151022_1049"
- execute: "cd snx_sdk"
- execute: "cd buildscript"
- execute: "make sn98660_402mhz_sf_defconfig"
- execute: "make" This will result in an error "isp3: No such file or directory.". This is caused by that the isp3 folder is missing at: "/home/dev/SN986_1.50_037a_20151022_1049/snx_sdk/driver/video/ko/isp3". The fix is to modify: /home/dev/SN986_1.50_037a_20151022_1049/snx_sdk/driver/video/ko/Makefile Line 10: "ISP2 = isp3" > "ISP2 = isp2" Do this also for: /home/dev/SN986_1.50_037a_20151022_1049/snx_sdk/driver/video/ko_rescue/Makefile Do this also for: /home/dev/SN986_1.50_037a_20151022_1049/snx_sdk/driver/iq/ko/Makefile Do this also for: /home/dev/SN986_1.50_037a_20151022_1049/snx_sdk/driver/iq/ko_rescue/Makefile
- re-execute: "make"
- execute: "make install"
Result
In the folder /snx_sdk/image there should now be some file which can be used to flash the compiled firmware. Be aware though: this firmware is not compatible with the Xiaomi Xiaofang camera! The reason is that the Xiaofang uses a SmartSens SC2135 optical sensor. Unfortunatly this driver is not present in this VM. Also there seems no sourcecode available for this sensor.