mediatek: filogic: don't rely on image preset in flash or sysupgrade
Instead of trying to figure out the actual root device, just use the kernel 'root' cmdline parameter as a hint to decide which device to flash to. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
		| @@ -2,23 +2,20 @@ REQUIRE_IMAGE_METADATA=1 | |||||||
|  |  | ||||||
| platform_do_upgrade() { | platform_do_upgrade() { | ||||||
| 	local board=$(board_name) | 	local board=$(board_name) | ||||||
| 	local file_type=$(identify $1) |  | ||||||
|  |  | ||||||
| 	case "$board" in | 	case "$board" in | ||||||
| 	bananapi,bpi-r3) | 	bananapi,bpi-r3) | ||||||
| 		export_bootdevice | 		case "$(cmdline_get_var root)" in | ||||||
| 		export_partdevice rootdev 0 | 		/dev/mmc*) | ||||||
| 		case "$rootdev" in |  | ||||||
| 		mmc*) |  | ||||||
| 			CI_ROOTDEV="$rootdev" | 			CI_ROOTDEV="$rootdev" | ||||||
| 			CI_KERNPART="production" | 			CI_KERNPART="production" | ||||||
| 			emmc_do_upgrade "$1" | 			emmc_do_upgrade "$1" | ||||||
| 			;; | 			;; | ||||||
| 		mtdblock*) | 		/dev/mtdblock*) | ||||||
| 			PART_NAME="fit" | 			PART_NAME="fit" | ||||||
| 			default_do_upgrade "$1" | 			default_do_upgrade "$1" | ||||||
| 			;; | 			;; | ||||||
| 		ubiblock*) | 		/dev/ubiblock*) | ||||||
| 			CI_KERNPART="fit" | 			CI_KERNPART="fit" | ||||||
| 			nand_do_upgrade "$1" | 			nand_do_upgrade "$1" | ||||||
| 			;; | 			;; | ||||||
| @@ -58,10 +55,8 @@ platform_check_image() { | |||||||
| platform_copy_config() { | platform_copy_config() { | ||||||
| 	case "$(board_name)" in | 	case "$(board_name)" in | ||||||
| 	bananapi,bpi-r3) | 	bananapi,bpi-r3) | ||||||
| 		export_bootdevice | 		case "$(cmdline_get_var root)" in | ||||||
| 		export_partdevice rootdev 0 | 		/dev/mmc*) | ||||||
| 		case "$rootdev" in |  | ||||||
| 		mmc*) |  | ||||||
| 			emmc_copy_config | 			emmc_copy_config | ||||||
| 			;; | 			;; | ||||||
| 		esac | 		esac | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Daniel Golle
					Daniel Golle