WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit f4b6e0f

Browse files
authored
Merge pull request #851 from opensensor/stable
Fix Smart NVR build size and use latest version
2 parents fb58d3b + 6f94464 commit f4b6e0f

File tree

4 files changed

+26
-6
lines changed

4 files changed

+26
-6
lines changed

buildroot

Submodule buildroot updated 1425 files

configs/cameras/smart_nvr_a1n_eth/smart_nvr_a1n_eth_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ BR2_LINUX_KERNEL_EXT_THINGINO_KOPT_DTS=y
88
BR2_LINUX_KERNEL_EXT_THINGINO_KOPT_DTS_A1_SMART_NVR=y
99
BR2_PACKAGE_E2FSPROGS=y
1010
BR2_PACKAGE_E2FSPROGS_FSCK=y
11+
BR2_PACKAGE_HOST_GO_TARGET_CGO=y
1112
BR2_PACKAGE_GO2RTC=y
1213
BR2_PACKAGE_GPTFDISK=y
1314
BR2_PACKAGE_LIGHTNVR=y

package/go2rtc/go2rtc.mk

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ifeq ($(BR2_PACKAGE_GO2RTC_MINI),y)
77
else
88
GO2RTC_SITE = https://github.com/AlexxIT/go2rtc
99
GO2RTC_SITE_BRANCH = master
10-
GO2RTC_VERSION = d99bf122eae07eccec159e6496f0aea4295597db
10+
GO2RTC_VERSION = be80eb1ac98dd4d11dcf171cbb33e1fdd4974285
1111
# $(shell git ls-remote $(GO2RTC_SITE) $(GO2RTC_SITE_BRANCH) | head -1 | cut -f1)
1212
endif
1313

@@ -17,8 +17,15 @@ GO2RTC_LICENSE_FILES = LICENSE
1717
GO2RTC_INSTALL_TARGET = YES
1818

1919
GO2RTC_DEPENDENCIES = host-upx
20-
GO2RTC_GO_ENV = GOARCH=mipsle
21-
GO2RTC_LDFLAGS = -s -w" -gcflags=all="-l -B
20+
21+
# Disable CGO to avoid V4L2/ALSA C dependencies on MIPS
22+
GO2RTC_GO_ENV = CGO_ENABLED=0 GOARCH=mipsle
23+
24+
# Strip debug symbols (-s -w) for smaller binary
25+
GO2RTC_LDFLAGS = -s -w
26+
27+
# Disable inlining and bounds checking for smaller binary
28+
GO2RTC_BUILD_OPTS = -gcflags=all="-l -B"
2229

2330
define GO2RTC_INSTALL_TARGET_CMDS
2431
$(INSTALL) -D -m 0644 $(GO2RTC_PKGDIR)/files/go2rtc.yaml \

package/lightnvr/lightnvr.mk

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
LIGHTNVR_SITE_METHOD = git
22
LIGHTNVR_SITE = https://github.com/opensensor/lightNVR
33
LIGHTNVR_SITE_BRANCH = main
4-
LIGHTNVR_VERSION = 6e209ff87757c8f4c70a8258b7452a8d950bfabd
4+
LIGHTNVR_VERSION = $(LIGHTNVR_SITE_BRANCH)
55

66
LIGHTNVR_LICENSE = MIT
77
LIGHTNVR_LICENSE_FILES = COPYING
88

99
LIGHTNVR_INSTALL_STAGING = YES
1010

1111
# Dependencies
12-
LIGHTNVR_DEPENDENCIES = thingino-ffmpeg thingino-libcurl sqlite
12+
LIGHTNVR_DEPENDENCIES = thingino-ffmpeg thingino-libcurl sqlite host-nodejs
1313

1414
ifeq ($(BR2_PACKAGE_MBEDTLS),y)
1515
LIGHTNVR_DEPENDENCIES += mbedtls
@@ -28,6 +28,18 @@ LIGHTNVR_CONF_OPTS = \
2828
-DGO2RTC_CONFIG_DIR=/etc/lightnvr/go2rtc \
2929
-DGO2RTC_API_PORT=1984
3030

31+
# Build web assets before CMake configuration
32+
# Web assets are no longer checked into git, so we build them here
33+
define LIGHTNVR_BUILD_WEB_ASSETS
34+
@echo "Building LightNVR web assets..."
35+
cd $(@D)/web && \
36+
npm ci --production=false && \
37+
npm run build
38+
@echo "Web assets built successfully"
39+
endef
40+
41+
LIGHTNVR_PRE_BUILD_HOOKS += LIGHTNVR_BUILD_WEB_ASSETS
42+
3143
# Main application files installation
3244
define LIGHTNVR_INSTALL_APP_FILES
3345
$(INSTALL) -d $(TARGET_DIR)/var/nvr

0 commit comments

Comments
 (0)