aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShiji Yang <yangshiji66@qq.com>2022-12-12 11:25:45 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2022-12-17 21:08:14 +0100
commit6361a952afa4827eb5e9d5221b9bb4b54a2019d5 (patch)
treeed2d66c19d720993662d080d0058c29e14c23a36
parenta7d8b54f86f572409b40c7ab4ad3982a1eabfdfe (diff)
downloadupstream-6361a952afa4827eb5e9d5221b9bb4b54a2019d5.tar.gz
upstream-6361a952afa4827eb5e9d5221b9bb4b54a2019d5.tar.bz2
upstream-6361a952afa4827eb5e9d5221b9bb4b54a2019d5.zip
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@qq.com>
-rw-r--r--target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi1
-rw-r--r--target/linux/ramips/image/mt7621.mk23
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