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>
This commit is contained in:
		 Shiji Yang
					Shiji Yang
				
			
				
					committed by
					
						 Hauke Mehrtens
						Hauke Mehrtens
					
				
			
			
				
	
			
			
			 Hauke Mehrtens
						Hauke Mehrtens
					
				
			
						parent
						
							a7d8b54f86
						
					
				
				
					commit
					6361a952af
				
			| @@ -16,6 +16,7 @@ | |||||||
| 	}; | 	}; | ||||||
|  |  | ||||||
| 	chosen { | 	chosen { | ||||||
|  | 		bootargs = "console=ttyS0,115200"; | ||||||
| 		bootargs-override = "console=ttyS0,115200"; | 		bootargs-override = "console=ttyS0,115200"; | ||||||
| 	}; | 	}; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -38,15 +38,13 @@ define Build/h3c-blank-header | |||||||
| endef | endef | ||||||
|  |  | ||||||
| define Build/haier-sim_wr1800k-factory | define Build/haier-sim_wr1800k-factory | ||||||
|   -[ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) ] && \ |   mkdir -p "$@.tmp" | ||||||
|   mkdir -p "$(1).tmp" && \ |   mv "$@" "$@.tmp/UploadBrush-bin.img" | ||||||
|   $(CP) $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) "$(1).tmp/UploadBrush-bin.img" && \ |   $(MKHASH) md5 "$@.tmp/UploadBrush-bin.img" | head -c32 > "$@.tmp/check_MD5.txt" | ||||||
|   $(MKHASH) md5 "$(1).tmp/UploadBrush-bin.img" | head -c32 > "$(1).tmp/check_MD5.txt" && \ |   $(TAR) -czf "$@.tmp.tgz" -C "$@.tmp" UploadBrush-bin.img 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 "$@.tmp.tgz" -out "$@" -k QiLunSmartWL | ||||||
|   $(STAGING_DIR_HOST)/bin/openssl aes-256-cbc -e -salt -in $(1).tmp.tgz -out "$(1)" -k QiLunSmartWL && \ |   printf %32s $(DEVICE_MODEL) >> "$@" | ||||||
|   printf %32s "$(DEVICE_MODEL)" >> "$(1)" && \ |   rm -rf "$@.tmp" "$@.tmp.tgz" | ||||||
|   rm -rf "$(1).tmp" $(1).tmp.tgz && \ |  | ||||||
|   $(CP) $(1) $(BIN_DIR)/ |  | ||||||
| endef | endef | ||||||
|  |  | ||||||
| define Build/iodata-mstc-header | define Build/iodata-mstc-header | ||||||
| @@ -904,8 +902,11 @@ define Device/haier-sim_wr1800k | |||||||
|   KERNEL_LOADADDR := 0x82000000 |   KERNEL_LOADADDR := 0x82000000 | ||||||
|   KERNEL := kernel-bin | relocate-kernel 0x80001000 | lzma | \ |   KERNEL := kernel-bin | relocate-kernel 0x80001000 | lzma | \ | ||||||
| 	fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb | 	fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb | ||||||
|   KERNEL_INITRAMFS := $$(KERNEL) | \ | ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) | ||||||
| 	haier-sim_wr1800k-factory $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.bin |   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 |   IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata | ||||||
|   DEVICE_PACKAGES := kmod-mt7915e uboot-envtools |   DEVICE_PACKAGES := kmod-mt7915e uboot-envtools | ||||||
| endef | endef | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user