Add Support for Luckfox Pico Zero (#310)

* sysdrv/source/kernel/arch/arm/boot/dts : Add Luckfox Pico Zero device tree files

Signed-off-by: eng29 <eng29@luckfox.com>

* project/cfg/BoardConfig_IPC : Add Luckfox Pico Zero BoardConfig file

Signed-off-by: eng29 <eng29@luckfox.com>

* project/build.sh : Add the lunch menu item of Luckfox Pico Zero

Signed-off-by: eng29 <eng29@luckfox.com>

* project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-config/usr/bin/luckfox-config : Add support for Luckfox Pico Zero

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/drv_ko/wifi/insmod_wifi.sh : Use the device ID as the basis for loading the AIC8800DC driver

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/source/kernel/drivers/media/i2c : Add the ISG1321 sensor driver

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/source/kernel/drivers/media/i2c/imx415.c : Add 4-lane 15fps mode for Luckfox Pico Zero

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/source/kernel/drivers/media/platform/rockchip/isp/hw.c : Add the "rockchip,unite" parameters

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/source/kernel/arch/arm/configs/luckfox_rv1106_linux_defconfig : Add IMX415 and ISG1321 support

Signed-off-by: eng29 <eng29@luckfox.com>

* project/app/rkipc/rkipc/common/network/network.c : Cancel the status monitoring for wlan0 and usb0

Signed-off-by: eng29 <eng29@luckfox.com>

* project/app/rkipc/rkipc/src/rv1106_ipc : Add IMX415 and ISG1321 support for Luckfox Pico Zero

Signed-off-by: eng29 <eng29@luckfox.com>

* media/isp/release_camera_engine_rkaiq_rv1106_arm-rockchip830-linux-uclibcgnueabihf/isp_iqfiles : Add ISG1321 iqfile

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/drv_ko/insmod_ko.sh : Register ISG1321 driver during boot process

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/tools/board/buildroot/luckfox_pico_defconfig : Add rsync command for backup

Signed-off-by: eng29 <eng29@luckfox.com>

---------

Signed-off-by: eng29 <eng29@luckfox.com>
This commit is contained in:
luckfox-eng29
2025-08-14 14:38:50 +08:00
committed by GitHub
parent e2b0ffa22e
commit 9942437537
20 changed files with 5960 additions and 43 deletions

View File

@@ -696,6 +696,13 @@ int rk_network_get_cable_state() {
ifinfo = NLMSG_DATA(nh);
if_indextoname(ifinfo->ifi_index, name);
if (strcmp(name, "usb0") == 0) {
continue;
}
if (strcmp(name, "wlan0") == 0) {
continue;
}
LOG_INFO("\n[%s] link %s\n", name, (ifinfo->ifi_flags & IFF_LOWER_UP) ? "up" : "down");
memset(cmd1, 0, 32);

View File

@@ -66,6 +66,7 @@ add_executable(${PROJECT_NAME} ${SRCS})
target_link_libraries(${PROJECT_NAME} pthread rockit rockchip_mpp rkaiq rtsp rkaudio_detect aec_bf_process wpa_client m rkmuxer freetype rockiva iconv rknnmrt rga stdc++ rksysutils rkaudio)
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
install(FILES rkipc-mia1321-100w.ini DESTINATION share)
install(FILES rkipc-300w.ini DESTINATION share)
install(FILES rkipc-400w.ini DESTINATION share)
install(FILES rkipc-500w.ini DESTINATION share)

View File

@@ -73,6 +73,10 @@ post_chk() {
default_rkipc_ini=/tmp/rkipc-factory-config.ini
if [ ! -f "/oem/usr/share/rkipc.ini" ]; then
lsmod | grep mia1321
if [ $? -eq 0 ]; then
ln -s -f /oem/usr/share/rkipc-mia1321-100w.ini $default_rkipc_ini
fi
lsmod | grep mis5001
if [ $? -eq 0 ]; then
ln -s -f /oem/usr/share/rkipc-mis5001-500w.ini $default_rkipc_ini
@@ -126,6 +130,24 @@ post_chk() {
rk_mpi_ao_test -i /oem/usr/share/speaker_test.wav --sound_card_name=hw:0,0 --device_ch=2 --device_rate=8000 --input_rate=8000 --input_ch=2 --set_volume 50
fi
csi_unite=$(( $(luckfox-config get_csi_unite) ))
if [ -z csi_unite ]; then
csi_unite=0
fi
if lsmod | grep 'imx415' | awk '{print $3}' | grep -w 1; then
if [ $csi_unite == "0" ]; then
luckfox-config set_csi_unite 1
echo "[rkipc] Set rockchip,unite to 1; rkipc requires a reboot to function properly."
return
fi
else
if [ $csi_unite == "1" ]; then
luckfox-config set_csi_unite 0
echo "[rkipc] Set rockchip,unite to 0; rkipc requires a reboot to function properly."
return
fi
fi
if [ -d "/oem/usr/share/iqfiles" ]; then
rkipc -a /oem/usr/share/iqfiles &
else

View File

@@ -1,5 +1,5 @@
[audio.0]
enable = 1
enable = 0
card_name = hw:0,0
encode_type = G711A
format = S16
@@ -19,14 +19,14 @@ enable_aiq = 1
enable_vo = 0
vo_dev_id = 3 ; 0 is hdmi, 3 is mipi
enable_ivs = 1
enable_jpeg = 1
enable_jpeg = 0
enable_venc_0 = 1
enable_venc_1 = 0
enable_venc_2 = 0
enable_npu = 1
enable_npu = 0
npu_fps = 10
enable_rtsp = 1
enable_rtmp = 1
enable_rtmp = 0
rotation = 0 ; available value:0 90 180 270
[video.0]

View File

@@ -0,0 +1,376 @@
[audio.0]
enable = 0
card_name = hw:0,0
encode_type = G711A
format = S16
sample_rate = 8000
channels = 1
frame_size = 1152
bit_rate = 16000
input = mic_in
volume = 50
enable_aed = 0
enable_bcd = 0
enable_vqe = 1
vqe_cfg = /oem/usr/share/vqefiles/config_aivqe.json
[video.source]
enable_aiq = 1
enable_vo = 0
vo_dev_id = 3 ; 0 is hdmi, 3 is mipi
enable_ivs = 0
enable_jpeg = 0
enable_venc_0 = 1
enable_venc_1 = 0
enable_venc_2 = 0
enable_npu = 0
npu_fps = 0
enable_rtsp = 1
enable_rtmp = 0
rotation = 0 ; available value:0 90 180 270
[video.0]
buffer_size = 691200 ; w * h / 2
buffer_count = 4
enable_refer_buffer_share = 1
stream_type = mainStream
video_type = compositeStream
max_width = 1280
max_height = 1080
width = 1280
height = 1080
rc_mode = CBR
rc_quality = high
src_frame_rate_den = 1
src_frame_rate_num = 60
dst_frame_rate_den = 1
dst_frame_rate_num = 60
target_rate = 0
mid_rate = 2048
max_rate = 4096
min_rate = 0
output_data_type = H.265
smart = close
h264_profile = high
gop = 50
smartp_viridrlen = 25
gop_mode = normalP
stream_smooth = 50
enable_motion_deblur = 1
motion_deblur_strength = 3
enable_motion_static_switch = 0
frame_min_i_qp = 26
frame_min_qp = 28
frame_max_i_qp = 51
frame_max_qp = 51
scalinglist = 0
enable_debreath_effect = 0
debreath_effect_strength = 16
thrd_i = 0,0,0,0,3,3,5,5,8,8,8,15,15,20,25,25
thrd_p = 0,0,0,0,3,3,5,5,8,8,8,15,15,20,25,25
aq_step_i = -8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,7,8
aq_step_p = -8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,7,8
qbias_enable = 1
qbias_i = 171
qbias_p = 85
flt_str_i = 0
flt_str_p = 0
cu_dqp = 1
anti_ring = 2
anti_line = 2
lambds = 4
[video.1]
max_width = 704
max_height = 576
width = 704
height = 576
[video.2]
max_width = 960
max_height = 540
width = 960
height = 540
[ivs]
smear = 0
weightp = 0
md = 1
od = 0
md_sensibility = 3 ;available: 1 2 3,max 3
[video.jpeg]
width = 1280
height = 1080
jpeg_buffer_size = 1048576 ; 1024KB
jpeg_qfactor = 70
enable_cycle_snapshot = 0
snapshot_interval_ms = 1000
[isp]
scenario = normal ; normal or custom1
init_form_ini = 1
normal_scene = day
; isp.0
[isp.0.adjustment]
contrast = 50
brightness = 50
saturation = 50
sharpness = 50
fps = 60
hue = 50
[isp.0.enhancement]
noise_reduce_mode = close
denoise_level = 50
spatial_denoise_level = 50
temporal_denoise_level = 50
dehaze = close
dehaze_level = 0
dis = close
gray_scale_mode = [0-255]
distortion_correction = close
ldch_level = 0
[isp.0.video_adjustment]
image_flip = close
scene_mode = indoor
power_line_frequency_mode = PAL(50HZ)
[storage]
mount_path = /userdata
free_size_del_min = 500; MB
free_size_del_max = 1000; MB
num_limit_enable = 1; limit by file num
[storage.0]
enable = 0
folder_name = video0
file_format = mp4 ; flv,ts
file_duration = 60
video_quota = 30
file_max_num = 300
[storage.1]
enable = 0
folder_name = video1
file_format = mp4 ; flv,ts
file_duration = 60
video_quota = 30
file_max_num = 300
[storage.2]
enable = 0
folder_name = video2
file_format = mp4 ; flv,ts
file_duration = 60
video_quota = 30
file_max_num = 300
[system.device_info]
deivce_name = RK IP Camera
telecontrol_id = 88
model = RK-003
serial_number = RK-003-A
firmware_version = V0.2.6 build 202108
encoder_version = V1.0 build 202108
web_version = V2.12.2 build 202108
plugin_version = V1.0.0.0
channels_number = 1
hard_disks_number = 1
alarm_inputs_number = 0
alarm_outputs_number = 0
firmware_version_info = CP-3-B
manufacturer = Rockchip
hardware_id = c3d9b8674f4b94f6
user_num = 1
[capability.video]
0 = {"disabled":[{"name":"sStreamType","options":{"subStream":{"sSmart":"close"},"thirdStream":{"sSmart":"close"}},"type":"disabled/limit"},{"name":"sRCMode","options":{"CBR":{"sRCQuality":null}},"type":"disabled"},{"name":"sOutputDataType","options":{"H.265":{"sH264Profile":null}},"type":"disabled"},{"name":"unspport","options":{"iStreamSmooth":null,"sVideoType":null},"type":"disabled"}],"dynamic":{"sSmart":{"open":{"iMinRate":{"dynamicRange":{"max":"iMaxRate","maxRate":1,"min":"iMaxRate","minRate":0.125},"type":"dynamicRange"}}},"sStreamType":{"mainStream":{"iMaxRate":{"options":[256,512,1024,2048,3072,4096,6144],"type":"options"},"sResolution":{"options":["2880*1616","1920*1080","1280*720","960*540","640*360","320*240"],"type":"options"}},"subStream":{"iMaxRate"
1 = :{"options":[128,256,512],"type":"options"},"sResolution":{"options":["704*576","640*480","352*288","320*240"],"type":"options"}},"thirdStream":{"iMaxRate":{"options":[256,512],"type":"options"},"sResolution":{"options":["416*416"],"type":"options"}}}},"layout":{"encoder":["sStreamType","sVideoType","sResolution","sRCMode","sRCQuality","sFrameRate","sOutputDataType","sSmart","sH264Profile","sGOPMode","iMaxRate","iGOP","iStreamSmooth"]},"static":{"iGOP":{"range":{"max":400,"min":1},"type":"range"},"iStreamSmooth":{"range":{"max":100,"min":1,"step":1},"type":"range"},"sFrameRate":{"dynamicRange":{"max":"sFrameRateIn","maxRate":1},"options":["1/2","1","2","4","6","8","10","12","14","16","18","20","25","30"],"type":"options/dynamicRange"},"sH264Profile":{"options":["high","main","baseline"],"type":"options"},"sOutputDataType":{"options"
2 = :["H.264","H.265"],"type":"options"},"sRCMode":{"options":["CBR","VBR"],"type":"options"},"sRCQuality":{"options":["lowest","lower","low","medium","high","higher","highest"],"type":"options"},"sGOPMode":{"options":["normalP","smartP"],"type":"options"},"sSmart":{"options":["open","close"],"type":"options"},"sStreamType":{"options":["mainStream","subStream","thirdStream"],"type":"options"},"sVideoType":{"options":["videoStream","compositeStream"],"type":"options"}}}
[capability.image_adjustment]
0 = {"layout":{"image_adjustment":["iBrightness","iContrast","iSaturation","iSharpness","iHue"]},"static":{"iBrightness":{"range":{"max":100,"min":0,"step":1},"type":"range"},"iContrast":{"range":{"max":100,"min":0,"step":1},"type":"range"},"iHue":{"range":{"max":100,"min":0,"step":1},"type":"range"},"iSaturation":{"range":{"max":100,"min":0,"step":1},"type":"range"},"iSharpness":{"range":{"max":100,"min":0,"step":1},"type":"range"}}}
[capability.image_blc]
0 = {"disabled":[{"name":"sHLC","options":{"open":{"sBLCRegion":null}},"type":"disabled"},{"name":"sBLCRegion","options":{"open":{"iDarkBoostLevel":null,"iHLCLevel":null,"sHLC":null}},"type":"disabled"}],"dynamic":{"sBLCRegion":{"open":{"iBLCStrength":{"range":{"max":100,"min":0,"step":1},"type":"range"}}},"sHDR":{"HDR2":{"iHDRLevel":{"options":[1,2,3,4],"type":"options"}},"close":{"sBLCRegion":{"options":["close","open"],"type":"options"},"sHLC":{"options"
1 = :["close","open"],"type":"options"}}},"sHLC":{"open":{"iDarkBoostLevel":{"range":{"max":100,"min":0,"step":1},"type":"range"},"iHLCLevel":{"range":{"max":100,"min":0,"step":1},"type":"range"}}},"sWDR":{"open":{"iWDRLevel":{"range":{"max":100,"min":0,"step":1},"type":"range"}}}},"layout":{"image_blc":["sHDR","iHDRLevel","sBLCRegion","iBLCStrength","sHLC","iHLCLevel"]},"static":{"sHDR":{"options":["close","HDR2"],"type":"options"}}}
[capability.image_enhancement]
0 = {"dynamic":{"sDehaze":{"open":{"iDehazeLevel":{"range":{"max":10,"min":0,"step":1},"type":"range"}}},"sDistortionCorrection":{"FEC":{"iFecLevel":{"range":{"max":100,"min":0,"step":1},"type":"range"}},"LDCH":{"iLdchLevel":{"range":{"max":100,"min":0,"step":1},"type":"range"}}},"sNoiseReduceMode":{"2dnr":{"iSpatialDenoiseLevel":{"range":{"max":100,"min":0,"step":1},"type":"range"}},"3dnr":{"iTemporalDenoiseLevel":{"range":{"max":100,"min":0,"step":1},"type":"range"}},"mixnr":{"iSpatialDenoiseLevel":{"range":{"max":100,"min":0,"step":1},"type":"range"},"iTemporalDenoiseLevel":{"range":{"max":100,"min":0,"step":1},"type":"range"}}}},"layout"
1 = :{"image_enhancement":["sNoiseReduceMode","iSpatialDenoiseLevel","iTemporalDenoiseLevel","sDehaze","iDehazeLevel","sGrayScaleMode","sDistortionCorrection","iLdchLevel","iFecLevel"]},"static":{"sDIS":{"options":["open","close"],"type":"options"},"sDehaze":{"options":["open","close","auto"],"type":"options"},"sDistortionCorrection":{"options":["LDCH","close"],"type":"options"},"sFEC":{"options":["open","close"],"type":"options"},"sGrayScaleMode":{"options":["[0-255]","[16-235]"],"type":"options"},"sNoiseReduceMode":{"options":["close","2dnr","3dnr","mixnr"],"type":"options"}}}
[capability.image_exposure]
0 = {"dynamic":{"sExposureMode":{"auto":{"iAutoIrisLevel":{"range":{"max":100,"min":0,"step":1},"type":"range"}},"manual":{"sExposureTime":{"options":["1","1/3","1/6","1/12","1/25","1/50","1/100","1/150","1/200","1/250","1/500","1/750","1/1000","1/2000","1/4000","1/10000","1/100000"],"type":"options"},"sGainMode":{"options":["auto","manual"],"type":"options"}}},"sGainMode":{"manual":{"iExposureGain":{"range":{"max":100,"min":1,"step":1},"type":"range"}}}},"layout":{"image_exposure":["sExposureMode","sExposureTime","sGainMode","iExposureGain","iFPS"]},"static":{"sExposureMode":{"options":["auto","manual"],"type":"options"},"iFPS":{"range":{"max":30,"min":0,"step":1},"type":"range"}}}
[capability.image_night_to_day]
0 = {"disabled":[{"name":"sNightToDay","options":{"day":{"iLightBrightness":null,"sFillLightMode":null},"night":{"iDarkBoostLevel":null,"iHDRLevel":null,"iHLCLevel":null,"sHDR":null,"sHLC":"close"}},"type":"disabled"}],"dynamic":{"sNightToDay":{"auto":{"iNightToDayFilterLevel":{"options":[0,1,2,3,4,5,6,7],"type":"options"},"iNightToDayFilterTime":{"range":{"max":10,"min":3,"step":1},"type":"range"}},"schedule":{"sDawnTime":{"input":"time","type":"input"},"sDuskTime":{"input":"time","type":"input"}}},"sOverexposeSuppress":{"open"
1 = :{"sOverexposeSuppressType":{"options":["auto","manual"],"type":"options"}}},"sOverexposeSuppressType":{"manual":{"iDistanceLevel":{"range":{"max":100,"min":0,"step":1},"type":"range"}}}},"layout":{"image_night_to_day":["sNightToDay","iNightToDayFilterLevel","iNightToDayFilterTime","sDawnTime","sDuskTime","sFillLightMode","iLightBrightness"]},"static":{"iLightBrightness":{"range":{"max":100,"min":0,"step":10},"type":"range"},"sNightToDay":{"options":["day","night"],"type":"options"},"sFillLightMode":{"type":"options","options":["IR"]}}}
[capability.image_video_adjustment]
0 = {"layout":{"image_video_adjustment":["sPowerLineFrequencyMode","sImageFlip","iImageRotation"]},"static":{"sImageFlip":{"options":["close","flip","mirror","centrosymmetric"],"type":"options"},"sPowerLineFrequencyMode":{"options":["PAL(50HZ)","NTSC(60HZ)"],"type":"options"},"sSceneMode":{"options":["indoor","outdoor"],"type":"options"},"iImageRotation":{"options":[0,90,180,270],"type":"options"}}}
[capability.image_white_blance]
0 = {"dynamic":{"sWhiteBlanceStyle":{"manualWhiteBalance":{"iWhiteBalanceBlue":{"range":{"max":100,"min":0,"step":1},"type":"range"},"iWhiteBalanceGreen":{"range":{"max":100,"min":0,"step":1},"type":"range"},"iWhiteBalanceRed":{"range":{"max":100,"min":0,"step":1},"type":"range"}}}},"layout":{"image_white_blance":["sWhiteBlanceStyle","iWhiteBalanceRed","iWhiteBalanceGreen","iWhiteBalanceBlue"]},"static":{"sWhiteBlanceStyle":{"options":["manualWhiteBalance","autoWhiteBalance","lockingWhiteBalance","fluorescentLamp","incandescent","warmLight","naturalLight"],"type":"options"}}}
[user.0]
user_name = admin
password = YWRtaW4=
user_level = 1 ; administrator=0 operator=1 user=2
[osd.common]
enable_osd = 1
is_presistent_text = 1
attribute = transparent/not-flashing
font_size = 32
font_color_mode = customize
font_color = fff799
alignment = customize
boundary = 0
font_path = /oem/usr/share/simsun_en.ttf
normalized_screen_width = 704
normalized_screen_height = 480
[osd.0]
type = channelName
enabled = 0
position_x = 1104
position_y = 640
display_text = Camera 01
[osd.1]
type = dateTime
enabled = 1
position_x = 16
position_y = 16
date_style = CHR-YYYY-MM-DD
time_style = 24hour
display_week_enabled = 0
[osd.2]
type = character
enabled = 0
position_x = 0
position_y = 0
display_text = null
[osd.3]
type = character
enabled = 0
position_x = 0
position_y = 0
display_text = null
[osd.4]
type = privacyMask
enabled = 0
position_x = 0
position_y = 0
width = 0
height = 0
[osd.5]
type = privacyMask
enabled = 0
position_x = 0
position_y = 0
width = 0
height = 0
[osd.6]
type = image
enabled = 0
position_x = 16
position_y = 640
image_path = /userdata/image.bmp
[event.regional_invasion]
enabled = 1
position_x = 0
position_y = 0
width = 700
height = 560
proportion = 1
sensitivity_level = 90
time_threshold = 1
rockiva_model_type = small ;big medium small
[roi.0]
stream_type = mainStream
id = 1
enabled = 0
name = test
position_x = 0
position_y = 0
width = 0
height = 0
quality_level = 3
[roi.1]
stream_type = mainStream
id = 2
enabled = 0
name = test
position_x = 0
position_y = 0
width = 0
height = 0
quality_level = 3
[roi.2]
stream_type = subStream
id = 1
enabled = 0
name = test
position_x = 0
position_y = 0
width = 0
height = 0
quality_level = 3
[roi.3]
stream_type = subStream
id = 2
enabled = 0
name = test
position_x = 0
position_y = 0
width = 0
height = 0
quality_level = 3
[roi.4]
stream_type = thirdStream
id = 1
enabled = 0
name = test
position_x = 0
position_y = 0
width = 0
height = 0
quality_level = 3
[roi.5]
stream_type = thirdStream
id = 2
enabled = 0
name = test
position_x = 0
position_y = 0
width = 0
height = 0
quality_level = 3
[region_clip.1]
enabled = 0
position_x = 0
position_y = 0
width = 640
height = 480
[network.ntp]
enable = 1
refresh_time_s = 60
ntp_server = 119.28.183.184