OpenIPC / mini

OpenSource Mini IP camera streamer
https://openipc.org
GNU General Public License v3.0
96 stars 51 forks source link

possible to get mini to work on hi3518ev100 (hi3516cv100) #7

Open zerog2k opened 12 months ago

zerog2k commented 12 months ago

I see that this does not compile for hi3518ev100, but wondering if it's possible to make it work, and if so what is needed? Or if not, why?

flyrouter commented 12 months ago

Nast has feedback that on some boards of this group of processors the build goes great and there are videos.

zerog2k commented 12 months ago

can someone share build steps? I have tried, but there are missing libs from hisi-osdrv1

root@59e12064df19:/build/openipc-mini# export PATH=$PATH:/build/openipc-firmware/output/per-package/majestic/host/opt/ext-toolchain/bin/
root@59e12064df19:/build/openipc-mini# cmake -H. -Bbuild     -DCMAKE_BUILD_TYPE=Release     -DPLATFORM_SDK_DIR=glutinium/hisi-osdrv1    -DCMAKE_EXPORT_COMPILE_COMMANDS=ON     -DCMAKE_TOOLCHAIN_FILE=tools/cmake/toolchains/arm-openipc-linux-musleabi.cmake
-- The C compiler identification is GNU 12.2.0
-- Check for working C compiler: /build/openipc-firmware/output/per-package/majestic/host/opt/ext-toolchain/bin/arm-openipc-linux-musleabi-gcc
-- Check for working C compiler: /build/openipc-firmware/output/per-package/majestic/host/opt/ext-toolchain/bin/arm-openipc-linux-musleabi-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
Detected Hi3518 SDK version 1.0.B.0.
Lib: mpi
Found Lib: /build/openipc-mini/glutinium/hisi-osdrv1/lib/libmpi.so
Lib: md
Found Lib: FOUND_LIB_md-NOTFOUND
Lib: _hiae
Found Lib: /build/openipc-mini/glutinium/hisi-osdrv1/lib/lib_hiae.so
Lib: isp
Found Lib: /build/openipc-mini/glutinium/hisi-osdrv1/lib/libisp.so
Lib: ive
Found Lib: FOUND_LIB_ive-NOTFOUND
Lib: _hidehaze
Found Lib: FOUND_LIB__hidehaze-NOTFOUND
Lib: _hidefog
Found Lib: FOUND_LIB__hidefog-NOTFOUND
Lib: _hidrc
Found Lib: FOUND_LIB__hidrc-NOTFOUND
Lib: _hildci
Found Lib: FOUND_LIB__hildci-NOTFOUND
Lib: _hiawb
Found Lib: /build/openipc-mini/glutinium/hisi-osdrv1/lib/lib_hiawb.so
Lib: _hiir_auto
Found Lib: FOUND_LIB__hiir_auto-NOTFOUND
Lib: _hiaf
Found Lib: /build/openipc-mini/glutinium/hisi-osdrv1/lib/lib_hiaf.so
Lib: _hiacs
Found Lib: FOUND_LIB__hiacs-NOTFOUND
Lib: _hicalcflicker
Found Lib: FOUND_LIB__hicalcflicker-NOTFOUND
Lib: upvqe
Found Lib: /build/openipc-mini/glutinium/hisi-osdrv1/lib/libupvqe.so
Lib: dnvqe
Found Lib: /build/openipc-mini/glutinium/hisi-osdrv1/lib/libdnvqe.so
Lib: securec
Found Lib: FOUND_LIB_securec-NOTFOUND
Lib: VoiceEngine
Found Lib: /build/openipc-mini/glutinium/hisi-osdrv1/lib/libVoiceEngine.so
Lib: resampler
Found Lib: /build/openipc-mini/glutinium/hisi-osdrv1/lib/libresampler.so
Lib: aec
Found Lib: /build/openipc-mini/glutinium/hisi-osdrv1/lib/libaec.so
Lib: anr
Found Lib: /build/openipc-mini/glutinium/hisi-osdrv1/lib/libanr.so
Lib: vqev2
Found Lib: /build/openipc-mini/glutinium/hisi-osdrv1/lib/libvqev2.so
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_TOOLCHAIN_FILE

-- Build files have been written to: /build/openipc-mini/build
root@59e12064df19:/build/openipc-mini# cmake --build build
Scanning dependencies of target mini
[  3%] Building C object CMakeFiles/mini.dir/src/mp4/bitbuf.c.o
[  7%] Building C object CMakeFiles/mini.dir/src/mp4/moof.c.o
[ 11%] Building C object CMakeFiles/mini.dir/src/mp4/moov.c.o
[ 15%] Building C object CMakeFiles/mini.dir/src/mp4/mp4.c.o
In file included from /build/openipc-mini/src/mp4/mp4.c:8:
/build/openipc-mini/src/config/sensor_config.h:7:5: error: unknown type name 'raw_data_type_e'
    7 |     raw_data_type_e data_type;
      |     ^~~~~~~~~~~~~~~
/build/openipc-mini/src/config/sensor_config.h:14:5: error: unknown type name 'wdr_mode_t'
   14 |     wdr_mode_t wdr_mode;
      |     ^~~~~~~~~~
/build/openipc-mini/src/config/sensor_config.h:15:5: error: unknown type name 'lvds_sync_mode_t'
   15 |     lvds_sync_mode_t sync_mode;
      |     ^~~~~~~~~~~~~~~~
/build/openipc-mini/src/config/sensor_config.h:16:5: error: unknown type name 'data_type_t'
   16 |     data_type_t raw_data_type;
      |     ^~~~~~~~~~~
/build/openipc-mini/src/config/sensor_config.h:17:5: error: unknown type name 'lvds_bit_endian_t'
   17 |     lvds_bit_endian_t data_endian;
      |     ^~~~~~~~~~~~~~~~~
/build/openipc-mini/src/config/sensor_config.h:18:5: error: unknown type name 'lvds_bit_endian_t'
   18 |     lvds_bit_endian_t sync_code_endian;
      |     ^~~~~~~~~~~~~~~~~
/build/openipc-mini/src/config/sensor_config.h:82:5: error: unknown type name 'COMPRESS_MODE_E'
   82 |     COMPRESS_MODE_E compress_mode;
      |     ^~~~~~~~~~~~~~~
/build/openipc-mini/src/config/sensor_config.h:90:5: error: unknown type name 'WDR_MODE_E'
   90 |     WDR_MODE_E mode;
      |     ^~~~~~~~~~
/build/openipc-mini/src/config/sensor_config.h:94:5: error: unknown type name 'input_mode_t'
   94 |     input_mode_t input_mode;
      |     ^~~~~~~~~~~~
make[2]: *** [CMakeFiles/mini.dir/build.make:102: CMakeFiles/mini.dir/src/mp4/mp4.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/mini.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
root@59e12064df19:/build/openipc-mini# 

https://github.com/search?q=repo%3AZigFisher%2Fglutinium+raw_data_type_e&type=code

definitely stuff missing https://github.com/OpenIPC/mini/blob/master/src/compat.h#L29-L52 like there is no hi_mipi.h in hisi-osdrv1

widgetii commented 12 months ago

You need to adapt source code for this SDK first. Few people did this work on their local setup previously but they never send any PRs