Skip to content

Commit

Permalink
Experimental support for hi3536dv100 (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorxda authored Jan 26, 2025
1 parent 51eeb20 commit 8324c68
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ hisi: version.h
$(eval LIB = -ldnvqe -lmpi -lsecurec -lupvqe -lVoiceEngine)
$(BUILD)

hi3536: version.h
$(eval SDK = ./sdk/hi3536dv100)
$(eval CFLAGS += -D__GOKE__ -D__HI3536__)
$(eval LIB = -lm -ldnvqe -lmpi -ljpeg -lupvqe -lVoiceEngine)
$(BUILD)

star6b0: version.h
$(eval SDK = ./sdk/infinity6)
$(eval CFLAGS += -D__SIGMASTAR__ -D__INFINITY6__ -D__INFINITY6B0__)
Expand Down
14 changes: 14 additions & 0 deletions bmp/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ extern "C" {
#define PIXEL_FORMAT_2BPP PIX_FMT_0RGB
#define PIXEL_FORMAT_8888 PIX_FMT_ARGB
#define PIXEL_FORMAT_I4 E_MI_RGN_PIXEL_FORMAT_I4

#elif __HI3536__
#include "hi_common.h"
#include "hi_math.h"
#include "mpi_region.h"

#define IO_BASE 0x12000000
#define IO_SIZE 0x100000
#define PIXEL_FORMAT_4444 PIXEL_FORMAT_RGB_4444
#define PIXEL_FORMAT_1555 PIXEL_FORMAT_RGB_1555
#define PIXEL_FORMAT_2BPP PIXEL_FORMAT_RGB_2BPP
#define PIXEL_FORMAT_8888 PIXEL_FORMAT_RGB_8888
#define PIXEL_FORMAT_I4 3

#else
#include "hi_common.h"
#include "hi_math.h"
Expand Down
2 changes: 1 addition & 1 deletion bmp/region.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ int create_region(int *handle, int x, int y, int width, int height) {
stChnAttr.unChnAttr.stOverlayChn.stQpInfo.bQpDisable = 0;
stChnAttr.unChnAttr.stOverlayChn.stQpInfo.bAbsQp = 0;
stChnAttr.unChnAttr.stOverlayChn.stQpInfo.s32Qp = 0;
#ifndef __16CV300__
#ifndef __HI3536__
stChnAttr.unChnAttr.stOverlayChn.u16ColorLUT[0] = 0x3e0;
stChnAttr.unChnAttr.stOverlayChn.u16ColorLUT[1] = 0x7FFF;
stChnAttr.unChnAttr.stOverlayChn.enAttachDest = ATTACH_JPEG_MAIN;
Expand Down
7 changes: 6 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
DL="https://github.com/OpenIPC/firmware/releases/download/toolchain/toolchain"

if [ "$#" -ne 1 ]; then
echo "Usage: $0 [goke|hisi|star6b0|star6e|star6c|native]"
echo "Usage: $0 [goke|hisi|hi3536|star6b0|star6e|star6c|native]"
exit 1
fi

Expand All @@ -16,6 +16,8 @@ elif [[ "$1" == *"goke" ]]; then
CC=goke-gk7205v200
elif [[ "$1" == *"hisi" ]]; then
CC=hisilicon-hi3516ev200
elif [[ "$1" == *"hi3536" ]]; then
CC=hisilicon-hi3536dv100
fi

GCC=$PWD/toolchain/$CC/bin/arm-linux-gcc
Expand All @@ -41,6 +43,9 @@ if [ "$1" = "goke" ]; then
elif [ "$1" = "hisi" ]; then
DRV=$PWD/firmware/general/package/hisilicon-osdrv-hi3516ev200/files/lib
make -B CC=$GCC DRV=$DRV TOOLCHAIN=$PWD/toolchain/$CC OUTPUT=$OUT $1
elif [ "$1" = "hi3536" ]; then
DRV=$PWD/firmware/general/package/hisilicon-osdrv-hi3536dv100/files/lib
make -B CC=$GCC DRV=$DRV TOOLCHAIN=$PWD/toolchain/$CC OUTPUT=$OUT $1
elif [ "$1" = "star6b0" ]; then
DRV=$PWD/firmware/general/package/sigmastar-osdrv-infinity6b0/files/lib
make -B CC=$GCC DRV=$DRV TOOLCHAIN=$PWD/toolchain/$CC OUTPUT=$OUT $1
Expand Down

0 comments on commit 8324c68

Please sign in to comment.