On Tue, Mar 19, 2019 at 11:57:06PM +0100, Eugeniu Rosca wrote: [..] > - fastboot_fail("failed to set partition", response); > + fastboot_okay("raw", response); [..]
Checking recent upstream fastboot implementation [1], I can see [2] that returning success or failure on calling 'partition-type:<part-name>' makes an impact on the internal fastboot code paths, so unfortunately I have to NAK my own patch. One idea could be calling fastboot_fail() (not fastboot_okay as this patch proposed) with an updated error message. Please, skip the patch for now. [1] https://android.googlesource.com/platform/system/core/+/eac1220fba2c [2] core (eac1220fba2c) git grep -C 1 partition-type fastboot/constants.h-#define FB_VAR_PARTITION_SIZE "partition-size" fastboot/constants.h:#define FB_VAR_PARTITION_TYPE "partition-type" fastboot/constants.h-#define FB_VAR_SLOT_SUCCESSFUL "slot-successful" -- fastboot/fastboot.cpp- fastboot/fastboot.cpp: if (fb->GetVar("partition-type:" + partition, &partition_type) != fastboot::SUCCESS) { fastboot/fastboot.cpp- errMsg = "Can't determine partition type.\n"; -- fastboot/fastboot.cpp- std::string partition_type; fastboot/fastboot.cpp: if (fb->GetVar("partition-type:" + partition, &partition_type) == fastboot::SUCCESS && fastboot/fastboot.cpp- fs_get_generator(partition_type) != nullptr) { -- fastboot/fastboot.cpp- std::string partition_type; fastboot/fastboot.cpp: if (fb->GetVar("partition-type:" + partition, &partition_type) != fastboot::SUCCESS) { fastboot/fastboot.cpp- continue; -- fastboot/fuzzy_fastboot/main.cpp- std::string partition_type; fastboot/fuzzy_fastboot/main.cpp: // getvar partition-type:super must fail for retrofit devices because the fastboot/fuzzy_fastboot/main.cpp- // partition does not exist. fastboot/fuzzy_fastboot/main.cpp: if (fb->GetVar("partition-type:super", &partition_type) == SUCCESS) { fastboot/fuzzy_fastboot/main.cpp- std::string is_logical; -- fastboot/fuzzy_fastboot/main.cpp- std::string resp; fastboot/fuzzy_fastboot/main.cpp: EXPECT_EQ(fb->GetVar("partition-type:" + part, &resp), SUCCESS); fastboot/fuzzy_fastboot/main.cpp: EXPECT_NE(allowed.find(resp), allowed.end()) << "getvar:partition-type:" + part << " was '" fastboot/fuzzy_fastboot/main.cpp- << resp << "' this is not a valid type"; -- fs_mgr/tests/adb-remount-test.sh- if [ -n "${scratch_paritition}" ]; then fs_mgr/tests/adb-remount-test.sh: fastboot_getvar partition-type:${scratch_partition} raw || fs_mgr/tests/adb-remount-test.sh- ( fastboot reboot && false) || Best regards, Eugeniu. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot