[openwrt/openwrt] ramips: improve support for SIM SIMAX1800T and Haier HAR-20S2U1
LEDE Commits
lede-commits at lists.infradead.org
Sat Dec 17 12:09:01 PST 2022
hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/6361a952afa4827eb5e9d5221b9bb4b54a2019d5
commit 6361a952afa4827eb5e9d5221b9bb4b54a2019d5
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Mon Dec 12 11:25:45 2022 +0000
ramips: improve support for SIM SIMAX1800T and Haier HAR-20S2U1
1. Use ARTIFACTS to build factory image. This change allows users to
generate initramfs factory image using OpenWrt ImageBuilder.
2. Override the default bootargs property defined in "mt7621.dtsi".
Although we use the "bootargs-override" property to set bootargs,
the default "bootargs" property will still be written into the
device tree, so it is better to override it.
Tested on SIM SIMAX1800T
Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
.../linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi | 1 +
target/linux/ramips/image/mt7621.mk | 23 +++++++++++-----------
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi b/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi
index 32d42fe813..a272d1ad75 100644
--- a/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi
+++ b/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi
@@ -16,6 +16,7 @@
};
chosen {
+ bootargs = "console=ttyS0,115200";
bootargs-override = "console=ttyS0,115200";
};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index fd99fa22c2..75022f9708 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -38,15 +38,13 @@ define Build/h3c-blank-header
endef
define Build/haier-sim_wr1800k-factory
- -[ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) ] && \
- mkdir -p "$(1).tmp" && \
- $(CP) $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) "$(1).tmp/UploadBrush-bin.img" && \
- $(MKHASH) md5 "$(1).tmp/UploadBrush-bin.img" | head -c32 > "$(1).tmp/check_MD5.txt" && \
- $(TAR) -czf $(1).tmp.tgz -C "$(1).tmp" UploadBrush-bin.img check_MD5.txt && \
- $(STAGING_DIR_HOST)/bin/openssl aes-256-cbc -e -salt -in $(1).tmp.tgz -out "$(1)" -k QiLunSmartWL && \
- printf %32s "$(DEVICE_MODEL)" >> "$(1)" && \
- rm -rf "$(1).tmp" $(1).tmp.tgz && \
- $(CP) $(1) $(BIN_DIR)/
+ mkdir -p "$@.tmp"
+ mv "$@" "$@.tmp/UploadBrush-bin.img"
+ $(MKHASH) md5 "$@.tmp/UploadBrush-bin.img" | head -c32 > "$@.tmp/check_MD5.txt"
+ $(TAR) -czf "$@.tmp.tgz" -C "$@.tmp" UploadBrush-bin.img check_MD5.txt
+ $(STAGING_DIR_HOST)/bin/openssl aes-256-cbc -e -salt -in "$@.tmp.tgz" -out "$@" -k QiLunSmartWL
+ printf %32s $(DEVICE_MODEL) >> "$@"
+ rm -rf "$@.tmp" "$@.tmp.tgz"
endef
define Build/iodata-mstc-header
@@ -904,8 +902,11 @@ define Device/haier-sim_wr1800k
KERNEL_LOADADDR := 0x82000000
KERNEL := kernel-bin | relocate-kernel 0x80001000 | lzma | \
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
- KERNEL_INITRAMFS := $$(KERNEL) | \
- haier-sim_wr1800k-factory $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.bin
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+ ARTIFACTS := initramfs-factory.bin
+ ARTIFACT/initramfs-factory.bin := append-image-stage initramfs-kernel.bin | \
+ haier-sim_wr1800k-factory
+endif
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
DEVICE_PACKAGES := kmod-mt7915e uboot-envtools
endef
More information about the lede-commits
mailing list