[openwrt/openwrt] target/metadata: set OpenWrt One as the default menuconfig target/profile

LEDE Commits lede-commits at lists.infradead.org
Mon Dec 2 04:58:10 PST 2024


blogic pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5c12fe45b98d9edab88b580b23dbe3528b025fd5

commit 5c12fe45b98d9edab88b580b23dbe3528b025fd5
Author: John Crispin <john at phrozen.org>
AuthorDate: Fri Nov 29 09:13:52 2024 +0100

    target/metadata: set OpenWrt One as the default menuconfig target/profile
    
    Signed-off-by: John Crispin <john at phrozen.org>
---
 include/target.mk                       |  1 +
 scripts/metadata.pm                     |  1 +
 scripts/target-metadata.pl              | 10 +++++++++-
 target/linux/mediatek/filogic/target.mk |  1 +
 4 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/include/target.mk b/include/target.mk
index 02ea68b15c..a4428efab7 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -375,6 +375,7 @@ define BuildTargets/DumpCurrent
 	 echo 'Target-Description:'; \
 	 echo "$$$$DESCRIPTION"; \
 	 echo '@@'; \
+	 $(if $(DEFAULT_PROFILE),echo 'Target-Default-Profile: $(DEFAULT_PROFILE)';) \
 	 echo 'Default-Packages: $(DEFAULT_PACKAGES) $(call extra_packages,$(DEFAULT_PACKAGES))'; \
 	 $(DUMPINFO)
 	$(if $(CUR_SUBTARGET),$(SUBMAKE) -r --no-print-directory -C image -s DUMP=1 SUBTARGET=$(CUR_SUBTARGET))
diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index ecfe42c0bc..dec9e62dff 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -136,6 +136,7 @@ sub parse_target_metadata($) {
 		/^Linux-Kernel-Arch:\s*(.+)\s*$/ and $target->{karch} = $1;
 		/^Default-Subtarget:\s*(.+)\s*$/ and $target->{def_subtarget} = $1;
 		/^Default-Packages:\s*(.+)\s*$/ and $target->{packages} = [ split(/\s+/, $1) ];
+		/^Target-Default-Profile:\s*(.+)\s*$/ and $target->{default_profile} = $1;
 		/^Target-Profile:\s*(.+)\s*$/ and do {
 			$profile = {
 				id => $1,
diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl
index 0c17e2e327..ce96d1e7d5 100755
--- a/scripts/target-metadata.pl
+++ b/scripts/target-metadata.pl
@@ -179,7 +179,7 @@ EOF
 	print <<EOF;
 choice
 	prompt "Target System"
-	default TARGET_ath79
+	default TARGET_mediatek
 	reset if !DEVEL
 	
 EOF
@@ -219,6 +219,14 @@ choice
 EOF
 	foreach my $target (@target) {
 		my $profile = $target->{profiles}->[0];
+		foreach my $p (@{$target->{profiles}}) {
+			last unless $target->{default_profile};
+			my $name = $p->{id};
+			$name =~ s/^DEVICE_//;
+			next unless $name eq $target->{default_profile};
+			$profile = $p;
+			last;
+		}
 		$profile or next;
 		print <<EOF;
 	default TARGET_$target->{conf}_$profile->{id} if TARGET_$target->{conf} && !BUILDBOT
diff --git a/target/linux/mediatek/filogic/target.mk b/target/linux/mediatek/filogic/target.mk
index d1637e06af..52ce25de1e 100644
--- a/target/linux/mediatek/filogic/target.mk
+++ b/target/linux/mediatek/filogic/target.mk
@@ -4,6 +4,7 @@ BOARDNAME:=Filogic 8x0 (MT798x)
 CPU_TYPE:=cortex-a53
 DEFAULT_PACKAGES += fitblk kmod-phy-aquantia kmod-crypto-hw-safexcel wpad-basic-mbedtls uboot-envtools
 KERNELNAME:=Image dtbs
+DEFAULT_PROFILE:=openwrt_one
 
 define Target/Description
 	Build firmware images for MediaTek Filogic ARM based boards.




More information about the lede-commits mailing list