Browse Source

cfgfs: search for GPT partition as fallback

Waldemar Brodkorb 1 year ago
parent
commit
9a9f72a7d6

+ 2 - 2
package/cfgfs/Makefile

@@ -4,8 +4,8 @@
 include ${ADK_TOPDIR}/rules.mk
 
 PKG_NAME:=		cfgfs
-PKG_VERSION:=		1.0.10
-PKG_RELEASE:=		4
+PKG_VERSION:=		1.0.11
+PKG_RELEASE:=		1
 PKG_DESCR:=		compressed config filesystem
 PKG_SECTION:=		base/adk
 PKG_URL:=		http://www.openadk.org/

+ 9 - 2
package/cfgfs/src/fwcf.sh

@@ -1,7 +1,7 @@
 #!/bin/sh
 # Copyright (c) 2006-2007
 #	Thorsten Glaser <tg@mirbsd.de>
-# Copyright (c) 2009-2017
+# Copyright (c) 2009-2023
 #	Waldemar Brodkorb <wbx@openadk.org>
 #
 # Provided that these terms and disclaimer and all copyright notices
@@ -43,7 +43,7 @@
 export PATH=/bin:/sbin:/usr/bin:/usr/sbin
 wd=$(pwd)
 cd /
-what='Configuration Filesystem Utility (cfgfs), Version 1.10'
+what='Configuration Filesystem Utility (cfgfs), Version 1.11'
 
 who=$(id -u)
 if [ $who -ne 0 ]; then
@@ -140,6 +140,13 @@ if [ -f .cfgfs ]; then
 fi
 if [ -z $part ]; then
 	part=$(fdisk -l /dev/sda 2>/dev/null|awk '{if ($2=="*")  { print $1" "$9} else {print $1" "$8}}'|grep '^/dev.*88.*'|tail -1|awk '{ print $1 }')
+	# find GPT partition
+	if [ -z $part ]; then
+		partnum=$(gdisk -l /dev/sda 2>/dev/null|fgrep "cfgfs"|awk '{ print $1 }')
+		if [ ! -z $partnum ]; then
+			part=/dev/sda${partnum}
+		fi
+	fi
 	if [ -z $part ]; then
 		# otherwise search for MTD device with name cfgfs
 		part=/dev/mtd$(fgrep '"cfgfs"' /proc/mtd 2>/dev/null | sed 's/^mtd\([^:]*\):.*$/\1/')ro

+ 3 - 1
package/gptfdisk/Makefile

@@ -9,8 +9,10 @@ PKG_RELEASE:=		1
 PKG_HASH:=		864c8aee2efdda50346804d7e6230407d5f42a8ae754df70404dd8b2fdfaeac7
 PKG_DESCR:=		utilities to create gpt partition tables
 PKG_SECTION:=		sys/fs
-PKG_BUILDDEP:=		util-linux popt
+PKG_DEPENDS:=		libncurses libuuid
+PKG_BUILDDEP:=		util-linux popt ncurses
 HOST_BUILDDEP:=		util-linux-host popt-host
+PKG_NEEDS:=		c++
 PKG_URL:=		http://www.rodsbooks.com/gdisk/
 PKG_SITES:=		${MASTER_SITE_SOURCEFORGE:=gptfdisk/}
 

+ 5 - 3
target/x86_64/qemu-x86_64/genimage-efi.cfg

@@ -3,9 +3,6 @@ image efi-part.vfat {
     file EFI {
       image = "efi-part/EFI"
     }
-    file kernel {
-      image = "kernel"
-    }
   }
   size = 32M
 }
@@ -28,4 +25,9 @@ image disk.img {
     image = "rootfs.ext"
   }
 
+  partition cfgfs {
+    partition-type-uuid = 44479540-f297-41b2-9af7-d131d5f0458a
+    image = "cfgfs.img"
+  }
+
 }