Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddin9 committed Dec 29, 2024
1 parent 663c9fe commit 4be0b1e
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 15 deletions.
2 changes: 0 additions & 2 deletions devices/common/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ sed -i 's/max_requests 3/max_requests 20/g' package/network/services/uhttpd/file
#rm -rf ./feeds/packages/lang/{golang,node}
sed -i "s/tty\(0\|1\)::askfirst/tty\1::respawn/g" target/linux/*/base-files/etc/inittab

sed -i 's/$$(call concat_cmd,$$(KERNEL_INITRAMFS))/-$$(call concat_cmd,$$(KERNEL_INITRAMFS))/' include/image.mk

date=`date +%m.%d.%Y`
sed -i -e "/\(# \)\?REVISION:=/c\REVISION:=$date" -e '/VERSION_CODE:=/c\VERSION_CODE:=$(REVISION)' include/version.mk

Expand Down
30 changes: 23 additions & 7 deletions devices/common/patches/imagebuilder.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/include/image.mk
+++ b/include/image.mk
@@ -623,7 +621,7 @@ define Device/Build/kernel
@@ -717,7 +717,7 @@ define Device/Build/kernel
endef

define Device/Build/image
Expand All @@ -9,7 +9,15 @@
$$(_TARGET): $(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \
$(BUILD_DIR)/json_info_files/$(call DEVICE_IMG_NAME,$(1),$(2)).json, \
$(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2))$$(GZ_SUFFIX))
@@ -761,6 +761,7 @@ define Device/DumpInfo
@@ -755,6 +755,7 @@ define Device/Build/image
FILE_TYPE=$(word 1,$(subst ., ,$(2))) \
FILE_FILESYSTEM="$(1)" \
DEVICE_IMG_PREFIX="$(DEVICE_IMG_PREFIX)" \
+ IMAGE_SIZE="$$(( $(call exp_units,$(IMAGE_SIZE)) / 1024 ))" \
DEVICE_VENDOR="$(DEVICE_VENDOR)" \
DEVICE_MODEL="$(DEVICE_MODEL)" \
DEVICE_VARIANT="$(DEVICE_VARIANT)" \
@@ -861,6 +862,7 @@ define Device/DumpInfo
Target-Profile: DEVICE_$(1)
Target-Profile-Name: $(DEVICE_DISPLAY)
Target-Profile-Packages: $(DEVICE_PACKAGES)
Expand All @@ -18,6 +26,17 @@
Target-Profile-SupportedDevices: $(SUPPORTED_DEVICES)
$(if $(BROKEN),Target-Profile-Broken: $(BROKEN))

--- a/scripts/json_add_image_info.py
+++ b/scripts/json_add_image_info.py
@@ -72,6 +72,7 @@ def get_titles():
"device_packages": getenv("DEVICE_PACKAGES").split(),
"supported_devices": getenv("SUPPORTED_DEVICES").split(),
"titles": get_titles(),
+ "image_size": getenv("IMAGE_SIZE"),
}
},
}

--- a/scripts/target-metadata.pl
+++ b/scripts/target-metadata.pl
@@ -437,6 +437,7 @@ ()
Expand Down Expand Up @@ -71,7 +90,7 @@

--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -142,6 +142,36 @@ BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel)
@@ -142,6 +142,33 @@ BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel)
# "-pkgname" in the package list means remove "pkgname" from the package list
BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES))
BUILD_PACKAGES:=$(USER_PACKAGES) $(BUILD_PACKAGES)
Expand All @@ -90,14 +109,11 @@
+ endif
+endif
+ifeq ($(SMALL_FLASH),true)
+ ifeq ($(XSMALL_FLASH),true)
+ BUILD_PACKAGES += -coremark -htop -bash -openssh-sftp-server
+ endif
+ ifeq ($(shell grep -q small_flash $(TOPDIR)/repositories.conf || echo "not_found"),not_found)
+ $(shell echo "`grep kwrt_kiddin9 $(TOPDIR)/repositories.conf | sed -e 's/kiddin9/small_flash/g'`" >>$(TOPDIR)/repositories.conf)
+ endif
+ ifneq ($(findstring /data/bcache/,$(BIN_DIR)),)
+ BUILD_PACKAGES += -luci-app-homeproxy -luci-app-istorex -luci-theme-argon
+ BUILD_PACKAGES += -luci-app-homeproxy -luci-app-istorex -luci-theme-argon -htop -bash -openssh-sftp-server -luci-ssl-nginx luci-ssl
+ endif
+else
+ $(shell sed -i "/small_flash/d" $(TOPDIR)/repositories.conf)
Expand Down
28 changes: 22 additions & 6 deletions devices/qualcommax_ipq50xx/patches/imagebuilder.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/include/image.mk
+++ b/include/image.mk
@@ -623,7 +621,7 @@ define Device/Build/kernel
@@ -717,7 +717,7 @@ define Device/Build/kernel
endef

define Device/Build/image
Expand All @@ -9,7 +9,15 @@
$$(_TARGET): $(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \
$(BUILD_DIR)/json_info_files/$(call DEVICE_IMG_NAME,$(1),$(2)).json, \
$(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2))$$(GZ_SUFFIX))
@@ -761,6 +761,7 @@ define Device/DumpInfo
@@ -755,6 +755,7 @@ define Device/Build/image
FILE_TYPE=$(word 1,$(subst ., ,$(2))) \
FILE_FILESYSTEM="$(1)" \
DEVICE_IMG_PREFIX="$(DEVICE_IMG_PREFIX)" \
+ IMAGE_SIZE="$$(( $(call exp_units,$(IMAGE_SIZE)) / 1024 ))" \
DEVICE_VENDOR="$(DEVICE_VENDOR)" \
DEVICE_MODEL="$(DEVICE_MODEL)" \
DEVICE_VARIANT="$(DEVICE_VARIANT)" \
@@ -861,6 +862,7 @@ define Device/DumpInfo
Target-Profile: DEVICE_$(1)
Target-Profile-Name: $(DEVICE_DISPLAY)
Target-Profile-Packages: $(DEVICE_PACKAGES)
Expand All @@ -18,6 +26,17 @@
Target-Profile-SupportedDevices: $(SUPPORTED_DEVICES)
$(if $(BROKEN),Target-Profile-Broken: $(BROKEN))

--- a/scripts/json_add_image_info.py
+++ b/scripts/json_add_image_info.py
@@ -72,6 +72,7 @@ def get_titles():
"device_packages": getenv("DEVICE_PACKAGES").split(),
"supported_devices": getenv("SUPPORTED_DEVICES").split(),
"titles": get_titles(),
+ "image_size": getenv("IMAGE_SIZE"),
}
},
}

--- a/scripts/target-metadata.pl
+++ b/scripts/target-metadata.pl
@@ -437,6 +437,7 @@ ()
Expand Down Expand Up @@ -71,7 +90,7 @@

--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -142,6 +142,36 @@ BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel)
@@ -142,6 +142,33 @@ BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel)
# "-pkgname" in the package list means remove "pkgname" from the package list
BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES))
BUILD_PACKAGES:=$(USER_PACKAGES) $(BUILD_PACKAGES)
Expand All @@ -90,9 +109,6 @@
+ endif
+endif
+ifeq ($(SMALL_FLASH),true)
+ ifeq ($(XSMALL_FLASH),true)
+ BUILD_PACKAGES += -coremark -htop -bash -openssh-sftp-server
+ endif
+ ifeq ($(shell grep -q small_flash $(TOPDIR)/repositories.conf || echo "not_found"),not_found)
+ $(shell echo "`grep kwrt_kiddin9 $(TOPDIR)/repositories.conf | sed -e 's/kiddin9/small_flash/g'`" >>$(TOPDIR)/repositories.conf)
+ endif
Expand Down

0 comments on commit 4be0b1e

Please sign in to comment.