diff mbox series

[5/6] rb532: use vendor_model scheme

Message ID 20200822110752.32600-6-freifunk@adrianschmutzler.de
State Not Applicable
Delegated to: Adrian Schmutzler
Headers show
Series rb532: update to kernel 5.4 | expand

Commit Message

Adrian Schmutzler Aug. 22, 2020, 11:07 a.m. UTC
This applies the vendor_model scheme used in most targets to rb532.

Also update the board name based on how a matching compatible would
look like.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
---
 target/linux/rb532/base-files/lib/preinit/01_sysinfo | 2 +-
 target/linux/rb532/image/Makefile                    | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/target/linux/rb532/base-files/lib/preinit/01_sysinfo b/target/linux/rb532/base-files/lib/preinit/01_sysinfo
index 4c932fde19..d74f160935 100644
--- a/target/linux/rb532/base-files/lib/preinit/01_sysinfo
+++ b/target/linux/rb532/base-files/lib/preinit/01_sysinfo
@@ -4,7 +4,7 @@  get_model_rb532() {
 
 do_sysinfo_rb532() {
 	mkdir -p /tmp/sysinfo
-	echo rb532 > /tmp/sysinfo/board_name
+	echo "mikrotik,routerboard-532" > /tmp/sysinfo/board_name
 	get_model_rb532 > /tmp/sysinfo/model
 }
 
diff --git a/target/linux/rb532/image/Makefile b/target/linux/rb532/image/Makefile
index a6f8a6beaf..ab0dd77aa3 100644
--- a/target/linux/rb532/image/Makefile
+++ b/target/linux/rb532/image/Makefile
@@ -35,20 +35,19 @@  define Build/lzma-loader-elf
 	rm -rf $@.loader
 endef
 
-define Device/nand
+define Device/mikrotik_routerboard-532
   DEVICE_VENDOR := MikroTik
   DEVICE_MODEL := RouterBOARD 532
   CMDLINE := ubi.mtd=1 ubi.block=0,rootfs root=/dev/ubiblock0_1
   BOARD_NAME := rb532
-  SUPPORTED_DEVICES := rb532
+  SUPPORTED_DEVICES := $(subst _,$(comma),$(1)) rb532
   KERNEL_INITRAMFS := append-kernel | patch-cmdline | lzma | lzma-loader-elf
   KERNEL := $$(KERNEL_INITRAMFS) | kernel2minor -s 2048 -i 0 -c
   IMAGES := sysupgrade.bin
   FILESYSTEMS := squashfs
   IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
 endef
-
-TARGET_DEVICES := nand
+TARGET_DEVICES := mikrotik_routerboard-532
 
 define Build/Clean
 	$(MAKE) -C $(GENERIC_PLATFORM_DIR)/image/lzma-loader $(LOADER_MAKEOPTS) clean