Skip to content

Commit

Permalink
Merge pull request #60 from aws-samples/develop
Browse files Browse the repository at this point in the history
board: add support for FH8626V100
  • Loading branch information
codingspirit authored Apr 22, 2022
2 parents 5e91db9 + d55d593 commit dc964f7
Show file tree
Hide file tree
Showing 13 changed files with 884 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,33 @@ jobs:

- name: Test
run: ctest -C ${{ env.BUILD_TYPE }}

fullhan:
environment: ECR
needs: ecr-prepare
runs-on: ubuntu-latest
strategy:
matrix:
container: [ "482862934379.dkr.ecr.us-east-1.amazonaws.com/fullhan:6.5.0" ]
container:
image: ${{ matrix.container }}
credentials:
username: ${{ secrets.ECR_USERNAME }}
password: ${{ secrets.ECR_PASSWORD }}

steps:
- name: Git checkout
uses: actions/checkout@v2

- name: Prepare board SDK
run: |
cp -r /FH8626V100/* ${GITHUB_WORKSPACE}/3rdparty/FH8626V100/
- name: Configure CMake
run: cmake -B ${{ github.workspace }}/build -DBOARD=FH8626V100 -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DBUILD_WEBRTC_SAMPLES=ON -DBUILD_KVS_SAMPLES=ON -DBUILD_SAVE_FRAME_SAMPLES=ON

- name: Build
run: cmake --build ${{ github.workspace }}/build --config ${{ env.BUILD_TYPE }} --parallel 4

- name: Test
run: ctest -C ${{ env.BUILD_TYPE }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
3rdparty/T31/
3rdparty/V4L2/
3rdparty/FH8626V100/
build/
Empty file added 3rdparty/FH8626V100/.gitkeep
Empty file.
11 changes: 11 additions & 0 deletions 3rdparty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,14 @@ T31/
|-- libimp-samples
`-- libsysutils-samples
```

# FH8626V100

User need to put FH8626V100 board SDK under [3rdparty/FH8626V100/](3rdparty/FH8626V100/):

```
FH8626V100/
├── common
├── include
└── lib
```
57 changes: 57 additions & 0 deletions CMake/FH8626V100.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
if(BOARD STREQUAL "FH8626V100")
add_compile_definitions(__LINUX_OS__)
add_compile_definitions(CONFIG_ARCH_FH8626V100)

if(NOT SENSOR OR SENSOR STREQUAL "")
message(STATUS "No SENSOR was selected. Use jxf37_mipi by default.")
set(SENSOR "jxf37_mipi")
endif()

set(BOARD_SDK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/${BOARD})

set(BOARD_SRCS
${BOARD_SDK_DIR}/common/components/libpes/src/libpes.c
${BOARD_SDK_DIR}/common/sample_common/isp/src/start_sensor/start_sensor_v1.c
${BOARD_SDK_DIR}/common/sample_common/isp/src/start_sensor/start_sensor_v2.c
)

aux_source_directory(${BOARD_SDK_DIR}/common/sample_common/isp/src BOARD_SRCS)
aux_source_directory(${BOARD_SDK_DIR}/common/sample_common/dsp/src BOARD_SRCS)
aux_source_directory(${BOARD_SDK_DIR}/common/sample_common/bgm/src BOARD_SRCS)
aux_source_directory(${BOARD_SDK_DIR}/common/components/libdbi_over_tcp/src BOARD_SRCS)
aux_source_directory(${BOARD_SDK_DIR}/common/components/libmisc/src BOARD_SRCS)
aux_source_directory(${BOARD_SDK_DIR}/common/vlcview BOARD_SRCS)

set(BOARD_INCS_DIR
${BOARD_SDK_DIR}/include/
${BOARD_SDK_DIR}/include/dsp/
${BOARD_SDK_DIR}/include/dsp_ext/
${BOARD_SDK_DIR}/include/isp/
${BOARD_SDK_DIR}/include/isp_ext/
${BOARD_SDK_DIR}/include/linux/
${BOARD_SDK_DIR}/include/types/
${BOARD_SDK_DIR}/common/
${BOARD_SDK_DIR}/common/components/
${BOARD_SDK_DIR}/common/components/libdbi_over_tcp/include/
${BOARD_SDK_DIR}/common/sample_common/
${BOARD_SDK_DIR}/common/vlcview/
)

set(USE_MUCLIBC ON)
set(BOARD_DESTINATION_PLATFORM arm-unknown-linux-uclibc)

link_directories(${BOARD_SDK_DIR}/lib/static ${BOARD_SDK_DIR}/lib/dynamic)

set(BOARD_LIBS_SHARED
pthread rt m
advapi dsp isp ispcore dbi dci ${SENSOR}
vmm vlcview mipi
acw_mpi audio_codec
)
set(BOARD_LIBS_STATIC
pthread rt m
libadvapi.a libdsp.a libisp.a libispcore.a libdbi.a libdci.a lib${SENSOR}.a
libvmm.a libvlcview.a libmipi.a
libacw_mpi.a libaudio_codec.a
)
endif()
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ elseif(BOARD STREQUAL "V4L2")
message(STATUS "Selected board V4L2")
elseif(BOARD STREQUAL "T31")
message(STATUS "Selected board T31")
elseif(BOARD STREQUAL "FH8626V100")
message(STATUS "Selected board FH8626V100")
else()
message(FATAL "${BOARD} is not implemented yet.")
endif()
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- x86/x64(By selecting board `V4L2` or `FILE`)
- RPi(By selecting board `V4L2` or `FILE`)
- T31(By selecting board `T31` or `FILE`)
- FH8626V100(By selecting board `FH8626V100` or `FILE`)

## Getting started with out-of-box KVS WebRTC sample

Expand Down
8 changes: 8 additions & 0 deletions samples/kvs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ ExternalProject_Add(kvs-producer
TEST_COMMAND ""
)

include(CheckIncludeFiles)
check_include_files(signal.h HAVE_SIGNAL_H)

set(KVS_SAMPLE_SRCS
${CMAKE_CURRENT_LIST_DIR}/source/kvsappcli.c
${CMAKE_CURRENT_LIST_DIR}/source/option_configuration.c)
Expand Down Expand Up @@ -60,3 +63,8 @@ add_dependencies(kvsproducer-static kvs-producer embedded-media-static)
target_include_directories(kvsproducer-static PRIVATE ${AWS_DEPENDENCIES_DIR}/kvs/include/ ${EMBEDDED_MEDIA_INCLUDES_DIR})
target_link_directories(kvsproducer-static PRIVATE ${AWS_DEPENDENCIES_DIR}/kvs/lib/ ${EMBEDDED_MEDIA_LINK_DIR})
target_link_libraries(kvsproducer-static embedded-media-static ${KVS_SDK_LIBS_STATIC} ${BOARD_LIBS_STATIC})

if(HAVE_SIGNAL_H)
target_compile_definitions(kvsproducer-shared PRIVATE HAVE_SIGNAL_H)
target_compile_definitions(kvsproducer-static PRIVATE HAVE_SIGNAL_H)
endif()
2 changes: 1 addition & 1 deletion samples/kvs/source/kvsappcli.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#define ERRNO_NONE 0
#define ERRNO_FAIL __LINE__

#define VIDEO_FRAME_BUFFER_SIZE_BYTES (128 * 1024UL)
#define VIDEO_FRAME_BUFFER_SIZE_BYTES (160 * 1024UL)
#if ENABLE_AUDIO_TRACK
#if USE_AUDIO_G711
#define AUDIO_FRAME_BUFFER_SIZE_BYTES (320UL)
Expand Down
Loading

0 comments on commit dc964f7

Please sign in to comment.