mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-31 18:38:10 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			64 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			64 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From 8b71b30bb2bb5c6a98ae16b358887826246c444a Mon Sep 17 00:00:00 2001
 | |
| From: John Crispin <john@phrozen.org>
 | |
| Date: Sat, 15 Jul 2023 10:44:03 +0200
 | |
| Subject: [PATCH 03/43] scripts/ubinize-image.sh: allow setting the rootfs name
 | |
| 
 | |
| This patch allows us to use a different rootfs name. Some QCA boards will
 | |
| require the in ubi rfs to be called ubi_rootfs.
 | |
| 
 | |
| Signed-off-by: John Crispin <john@phrozen.org>
 | |
| ---
 | |
|  include/image-commands.mk | 1 +
 | |
|  scripts/ubinize-image.sh  | 9 ++++++++-
 | |
|  2 files changed, 9 insertions(+), 1 deletion(-)
 | |
| 
 | |
| diff --git a/include/image-commands.mk b/include/image-commands.mk
 | |
| index dc6ee6e7c1..08adbb6454 100644
 | |
| --- a/include/image-commands.mk
 | |
| +++ b/include/image-commands.mk
 | |
| @@ -137,6 +137,7 @@ define Build/append-ubi
 | |
|  	sh $(TOPDIR)/scripts/ubinize-image.sh \
 | |
|  		$(if $(UBOOTENV_IN_UBI),--uboot-env) \
 | |
|  		$(if $(KERNEL_IN_UBI),--kernel $(IMAGE_KERNEL)) \
 | |
| +		$(if $(ROOTFSNAME_IN_UBI),--rootfs_name $(ROOTFSNAME_IN_UBI)) \
 | |
|  		$(foreach part,$(UBINIZE_PARTS),--part $(part)) \
 | |
|  		--rootfs $(IMAGE_ROOTFS) \
 | |
|  		$@.tmp \
 | |
| diff --git a/scripts/ubinize-image.sh b/scripts/ubinize-image.sh
 | |
| index 323eae547a..6af035c1b1 100755
 | |
| --- a/scripts/ubinize-image.sh
 | |
| +++ b/scripts/ubinize-image.sh
 | |
| @@ -7,6 +7,7 @@ ubootenv=""
 | |
|  ubinize_param=""
 | |
|  kernel=""
 | |
|  rootfs=""
 | |
| +rootfs_name="rootfs"
 | |
|  outfile=""
 | |
|  err=""
 | |
|  ubinize_seq=""
 | |
| @@ -77,7 +78,7 @@ ubilayout() {
 | |
|  			rootsize="$( round_up "$( stat -c%s "$2" )" 1024 )"
 | |
|  			;;
 | |
|  		esac
 | |
| -		ubivol $vol_id rootfs "$2" "$autoresize" "$rootsize"
 | |
| +		ubivol $vol_id $rootfs_name "$2" "$autoresize" "$rootsize"
 | |
|  
 | |
|  		vol_id=$(( $vol_id + 1 ))
 | |
|  		[ "$rootfs_type" = "ubifs" ] || ubivol $vol_id rootfs_data "" 1
 | |
| @@ -109,6 +110,12 @@ while [ "$1" ]; do
 | |
|  		shift
 | |
|  		continue
 | |
|  		;;
 | |
| +	"--rootfs_name")
 | |
| +		rootfs_name="$2"
 | |
| +		shift
 | |
| +		shift
 | |
| +		continue
 | |
| +		;;
 | |
|  	"--part")
 | |
|  		parts="$parts $2"
 | |
|  		shift
 | |
| -- 
 | |
| 2.34.1
 | |
| 
 | 
