[PATCH 02/14] tegra: rename generic subtarget to armv7

Tomasz Maciej Nowak tmn505 at terefe.re
Tue Oct 29 08:46:55 PDT 2024


From: Tomasz Maciej Nowak <tmn505 at gmail.com>

Preparation for new subtarget addition. Additionally drop BOOT_SCRIPT
variable, since there's only single bootscript.

Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
 package/boot/uboot-tegra/Makefile               |  2 +-
 target/linux/tegra/Makefile                     |  9 ++-------
 target/linux/tegra/armv7/target.mk              |  9 +++++++++
 target/linux/tegra/generic/target.mk            |  1 -
 target/linux/tegra/image/Makefile               | 17 ++++-------------
 target/linux/tegra/image/armv7.mk               |  9 +++++++++
 .../{generic-bootscript => bootscript.txt}      |  0
 7 files changed, 25 insertions(+), 22 deletions(-)
 create mode 100644 target/linux/tegra/armv7/target.mk
 delete mode 100644 target/linux/tegra/generic/target.mk
 create mode 100644 target/linux/tegra/image/armv7.mk
 rename target/linux/tegra/image/{generic-bootscript => bootscript.txt} (100%)

diff --git a/package/boot/uboot-tegra/Makefile b/package/boot/uboot-tegra/Makefile
index a90008bbd1d3..11104920ffe4 100644
--- a/package/boot/uboot-tegra/Makefile
+++ b/package/boot/uboot-tegra/Makefile
@@ -20,7 +20,7 @@ include $(INCLUDE_DIR)/package.mk
 
 define U-Boot/Default
   BUILD_TARGET := tegra
-  BUILD_SUBTARGET := generic
+  BUILD_SUBTARGET := armv7
   HIDDEN := y
 endef
 
diff --git a/target/linux/tegra/Makefile b/target/linux/tegra/Makefile
index b917ea909d66..433510e23d6a 100644
--- a/target/linux/tegra/Makefile
+++ b/target/linux/tegra/Makefile
@@ -1,23 +1,18 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
-# Copyright (C) 2017-2019 Tomasz Maciej Nowak <tmn505 at gmail.com>
+# Copyright (C) 2017-2024 Tomasz Maciej Nowak <tmn505 at gmail.com>
 
 include $(TOPDIR)/rules.mk
 
-ARCH := arm
 BOARD := tegra
 BOARDNAME := NVIDIA Tegra
 FEATURES := audio boot-part display ext4 fpu gpio pci pcie rootfs-part rtc squashfs usb
-CPU_TYPE := cortex-a9
-CPU_SUBTYPE := vfpv3-d16
-SUBTARGETS := generic
+SUBTARGETS := armv7
 
 KERNEL_PATCHVER := 6.6
 
 include $(INCLUDE_DIR)/target.mk
 
-KERNELNAME := zImage dtbs
-
 DEFAULT_PACKAGES += e2fsprogs mkf2fs partx-utils
 
 define Target/Description
diff --git a/target/linux/tegra/armv7/target.mk b/target/linux/tegra/armv7/target.mk
new file mode 100644
index 000000000000..ab7572f6eb15
--- /dev/null
+++ b/target/linux/tegra/armv7/target.mk
@@ -0,0 +1,9 @@
+ARCH := arm
+BOARDNAME := NVIDIA Tegra ARMv7
+CPU_TYPE := cortex-a9
+CPU_SUBTYPE := vfpv3-d16
+KERNELNAME := zImage dtbs
+
+define Target/Description
+	Build firmware image for NVIDIA Tegra ARMv7 SoC devices.
+endef
diff --git a/target/linux/tegra/generic/target.mk b/target/linux/tegra/generic/target.mk
deleted file mode 100644
index f5cb1fb19b94..000000000000
--- a/target/linux/tegra/generic/target.mk
+++ /dev/null
@@ -1 +0,0 @@
-BOARDNAME:=Generic
diff --git a/target/linux/tegra/image/Makefile b/target/linux/tegra/image/Makefile
index 96b095e64929..3b38fcdde684 100644
--- a/target/linux/tegra/image/Makefile
+++ b/target/linux/tegra/image/Makefile
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
-# Copyright (C) 2017-2019 Tomasz Maciej Nowak <tmn505 at gmail.com>
+# Copyright (C) 2017-2024 Tomasz Maciej Nowak <tmn505 at gmail.com>
 
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
@@ -14,7 +14,7 @@ define Build/tegra-sdcard
 		$(CP) $(DEVICE_DTS_DIR)/*.dtb $@.boot)
 	mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
 		-n '$(DEVICE_TITLE) OpenWrt bootscript' \
-		-d $(BOOT_SCRIPT) \
+		-d bootscript.txt \
 		$@.boot/boot.scr
 	$(CP) $@ $@.rootfs
 
@@ -28,10 +28,9 @@ define Build/tegra-sdcard
 	$(if $(UBOOT),dd if=$(STAGING_DIR_IMAGE)/$(UBOOT).img of=$@ bs=512 skip=1 seek=1 conv=notrunc)
 endef
 
-DEVICE_VARS += BOOT_SCRIPT UBOOT
+DEVICE_VARS += UBOOT
 
 define Device/Default
-  BOOT_SCRIPT := generic-bootscript
   DEVICE_DTS_DIR := $$(DTS_DIR)/nvidia
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := append-rootfs | pad-extra 128k | tegra-sdcard | gzip | append-metadata
@@ -40,14 +39,6 @@ define Device/Default
   PROFILES := Default
 endef
 
-define Device/compulab_trimslice
-  DEVICE_VENDOR := CompuLab
-  DEVICE_MODEL := TrimSlice
-  DEVICE_DTS := tegra20-trimslice
-  DEVICE_PACKAGES := kmod-leds-gpio kmod-r8169 kmod-rt2800-usb \
-	kmod-rtc-em3027 kmod-usb-hid kmod-usb-storage wpad-basic-mbedtls
-  UBOOT := trimslice-mmc
-endef
-TARGET_DEVICES += compulab_trimslice
+include $(SUBTARGET).mk
 
 $(eval $(call BuildImage))
diff --git a/target/linux/tegra/image/armv7.mk b/target/linux/tegra/image/armv7.mk
new file mode 100644
index 000000000000..24e8e7c14233
--- /dev/null
+++ b/target/linux/tegra/image/armv7.mk
@@ -0,0 +1,9 @@
+define Device/compulab_trimslice
+  DEVICE_VENDOR := CompuLab
+  DEVICE_MODEL := TrimSlice
+  DEVICE_DTS := tegra20-trimslice
+  DEVICE_PACKAGES := kmod-leds-gpio kmod-r8169 kmod-rt2800-usb \
+	kmod-rtc-em3027 kmod-usb-hid kmod-usb-storage wpad-basic-mbedtls
+  UBOOT := trimslice-mmc
+endef
+TARGET_DEVICES += compulab_trimslice
diff --git a/target/linux/tegra/image/generic-bootscript b/target/linux/tegra/image/bootscript.txt
similarity index 100%
rename from target/linux/tegra/image/generic-bootscript
rename to target/linux/tegra/image/bootscript.txt
-- 
2.47.0




More information about the openwrt-devel mailing list