-
Notifications
You must be signed in to change notification settings - Fork 220
Project Setup Hints
Information to collaborate on the project when creating the firmware.
Local Build
sudo apt install build-essential autoconf p7zip p7zip-full p7zip-rar libxml2-utils yui-compressor mtd-utils upx-ucl pkg-config python3 python3-pip
Details about usage
- upx => Ultimate Packer for eXecutables
- yui-compressor => is CSS and JavaScript minifier
- xmllint => libxml2-utils Formarting XML/HTML
- autoconf => automatic configure script builder
- p7zip p7zip-full p7zip-rar => Zip, 7z, Rar Compress
- mtd-utils => Memory Technology Device Utilities
- pkg-config => Get standard api metadata of software
- python => Needed for meson and ninja
Load newest version of meson over Python3 PIP
pip3 install meson ninja
- meson => Build System
- ninja => Small build system with a focus on speed
If meson is not usable on console, attach this to your bashrc, because the installed app can't be found. Make this sure for root user because root is used for build.
export PATH="~/.local/bin/:$PATH"
Helpful
Check the yui-compressor link to right java version. The java wrapper on the yui-compressor bin can be strange on the path building, remove it when not needed. If this is not corrected the css and js is missing on the camera frontend
sudo apt install lib32z1 lib32stdc++6-4.8-dbg u-boot-tools zlib1g-dev libncurses5-dev libncursesw5-dev uuid-dev
On 64Bit OS only the additional 32 Libs are not needed.
Download Hi2518E SDK V1.0.4.0 direct here
Hints for creating home and root files for the specific cameras.
Clone the project to your dev environment
git clone [email protected]:TheCrypt0/yi-hack-v4.git
Add stock firmware that are needed and place them on folder stock_firmware
-
yi_cloud_dome_1080p -> home_y19 and rootfs_y19
-
yi_dome -> home_v201 and rootfs_v201
-
yi_dome_1080p -> home_h20 and rootfs_h20
-
yi_home -> home_y18 and rootfs_y18
-
yi_home_1080p -> home_y20 and rootfs_y20
-
yi_outdoor -> home_h30 and rootfs_h30
Extract all stock firmware and mount them and copy the content
sudo ./scripts/init_sysroot.all.sh
Extract specific stock firmware
sudo ./scripts/init_sysroot.sh yi_cloud_dome_1080p
Make sure the folders of each extracted firmware is linked to the sysroot folder and home and rootfs subfolders are filled with content.
Compile firmwares
./scripts/compile.sh
Make sure there is no compile or dependency error.
Package all firmwares
sudo ./scripts/pack_fw.all.sh
Package specific firmware
sudo ./scripts/pack_fw.sh yi_cloud_dome_1080p
Now on the out folder at root level you can find the packaged firmwares
-
yi_cloud_dome_1080p -> home_y19 and rootfs_y19
-
yi_dome -> home_v201 and rootfs_v201
-
yi_dome_1080p -> home_h20 and rootfs_h20
-
yi_home -> home_y18 and rootfs_y18
-
yi_home_1080p -> home_y20 and rootfs_y20
-
yi_outdoor -> home_h30 and rootfs_h30
You must use a mirco sd card and place the images on the card and put it on the camera. After 30sec of yellow flashing the new firmware is placed. You can remove the images then from the sd card and also the sd card from the camera if not used to save videos or place addtional libs and scripts.
Please ensure the following:
- (1) you have yi camera
- (2) you are using SD card of max 16GB or less
- (3) your SD card is formatted to FAT32
- (4) the file names stored on SD root are exactly "rootfs_xxx" and "home_xxx"
- (5) sometimes if you use Windows computer it tends to rename downloaded files to e.g. "rootfs_xxx (2)" etc. Make sure your files on SD card are named exactly "rootfs_xxx" and "home_xxx"
- (6) Insert the SD card, power cycle the camera and ensure that you don't interrupt the process.
- (7) On the boot up the camera should be yellow blinking
- (8) Firmware should be in place now