Skip to contentSkip to conversation

fastboot: Remove "slot-suffixes" variable

PATCH Superseded Sam Protsenko 3 participants 7 messages Jun 18, 2019 – Jun 19, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 fastboot: Remove "slot-suffixes" variable

"slot-suffixes" variable was dropped in fastboot tool (in [1]). Let's track AOSP/master and drop this variable in U-Boot as well.

[1] https://android.googlesource.com/platform/system/core/+/42b18a518bac85c3eea14206f6cbafbd1e98a31f

---
Changes in v3:
- rebase on top of this merged patch (v1):
"[PATCH] fastboot: Fix slot names reported by getvar"
Changes in v2:
- add this patch to patch series
- drop slot-suffix variable instead of returning "a,b"

 drivers/fastboot/fb_getvar.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/fastboot/fb_getvar.c +0 -8
index bf957e8326..c15b4f8fca 100644
@@ -64,9 +64,6 @@ static const struct {
 	}, {
 		.variable = "current-slot",
 		.dispatch = getvar_current_slot
-	}, {
-		.variable = "slot-suffixes",
-		.dispatch = getvar_slot_suffixes
 #if CONFIG_IS_ENABLED(FASTBOOT_FLASH)
 	}, {
 		.variable = "has-slot",
@@ -182,11 +179,6 @@ static void getvar_current_slot(char *var_parameter, char *response)
 	fastboot_okay("a", response);
 }
 
-static void getvar_slot_suffixes(char *var_parameter, char *response)
-{
-	fastboot_okay("a,b", response);
-}
-
 #if CONFIG_IS_ENABLED(FASTBOOT_FLASH)
 static void getvar_has_slot(char *part_name, char *response)
 {
Signature · 1 line
2.20.1
#1 lore raw

PATCH v3 1/1 fastboot: Remove "slot-suffixes" variable

Hi Marek,

As you mentioned USB PR is now open, please apply this patch in u-boot-usb.

Thanks!

Quoted 47 lines · Sam Protsenko

"slot-suffixes" variable was dropped in fastboot tool (in [1]). Let's track AOSP/master and drop this variable in U-Boot as well.

[1] https://android.googlesource.com/platform/system/core/+/42b18a518bac85c3eea14206f6cbafbd1e98a31f

---
Changes in v3:
- rebase on top of this merged patch (v1):
"[PATCH] fastboot: Fix slot names reported by getvar"
Changes in v2:
- add this patch to patch series
- drop slot-suffix variable instead of returning "a,b"

 drivers/fastboot/fb_getvar.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/fastboot/fb_getvar.c +0 -9
index bf957e8326..c15b4f8fca 100644
@@ -64,9 +64,6 @@ static const struct {
        }, {
                .variable = "current-slot",
                .dispatch = getvar_current_slot
-       }, {
-               .variable = "slot-suffixes",
-               .dispatch = getvar_slot_suffixes
 #if CONFIG_IS_ENABLED(FASTBOOT_FLASH)
        }, {
                .variable = "has-slot",
@@ -182,11 +179,6 @@ static void getvar_current_slot(char *var_parameter, char *response)
        fastboot_okay("a", response);
 }
 
-static void getvar_slot_suffixes(char *var_parameter, char *response)
-{
-       fastboot_okay("a,b", response);
-}
-
 #if CONFIG_IS_ENABLED(FASTBOOT_FLASH)
 static void getvar_has_slot(char *part_name, char *response)
 {
--

2.20.1

#2 lore raw

PATCH v3 1/1 fastboot: Remove "slot-suffixes" variable

Quoted 3 lines · Sam Protsenko

Hi Marek,

As you mentioned USB PR is now open, please apply this patch in u-boot-usb.

Fastboot is gadget stuff, so that's up to Lukasz.
Is this a bugfix ?

Also, please stop top-posting.

Quoted 56 lines

Thanks!

Quoted 45 lines · Sam Protsenko

"slot-suffixes" variable was dropped in fastboot tool (in [1]). Let's track AOSP/master and drop this variable in U-Boot as well.

[1] https://android.googlesource.com/platform/system/core/+/42b18a518bac85c3eea14206f6cbafbd1e98a31f

---
Changes in v3:
- rebase on top of this merged patch (v1):
"[PATCH] fastboot: Fix slot names reported by getvar"
Changes in v2:
- add this patch to patch series
- drop slot-suffix variable instead of returning "a,b"

 drivers/fastboot/fb_getvar.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/fastboot/fb_getvar.c +0 -9
index bf957e8326..c15b4f8fca 100644
@@ -64,9 +64,6 @@ static const struct {
        }, {
                .variable = "current-slot",
                .dispatch = getvar_current_slot
-       }, {
-               .variable = "slot-suffixes",
-               .dispatch = getvar_slot_suffixes
 #if CONFIG_IS_ENABLED(FASTBOOT_FLASH)
        }, {
                .variable = "has-slot",
@@ -182,11 +179,6 @@ static void getvar_current_slot(char *var_parameter, char *response)
        fastboot_okay("a", response);
 }
 
-static void getvar_slot_suffixes(char *var_parameter, char *response)
-{
-       fastboot_okay("a,b", response);
-}
-
 #if CONFIG_IS_ENABLED(FASTBOOT_FLASH)
 static void getvar_has_slot(char *part_name, char *response)
 {
--
Quoted 2 lines

2.20.1

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

Signature · 2 lines
Best regards,
Marek Vasut
#3 lore raw

PATCH v3 1/1 fastboot: Remove "slot-suffixes" variable

Quoted 9 lines · Marek Vasut
Quoted 3 lines · Sam Protsenko

Hi Marek,

As you mentioned USB PR is now open, please apply this patch in u-boot-usb.

Fastboot is gadget stuff, so that's up to Lukasz.
Is this a bugfix ?

No, this is not a bugfix. In this topic:

[U-Boot] [PULL] u-boot-usb/master

you mentioned to me:

"Please do, the USB PR is now in."

Maybe I misunderstood you, but I though I had to re-send V2 (which is not a bugfix, and won't applied to v2019.07) on top of V1 (which is already applied). So basically this patch is not for v2019.07, but for later release (should be applied when merge window opens). Sorry for confusion.

Quoted 2 lines

Also, please stop top-posting.

Right. Didn't think of that when replying to myself :)

Quoted 61 lines
Quoted 40 lines

Thanks!

Quoted 36 lines · Sam Protsenko

"slot-suffixes" variable was dropped in fastboot tool (in [1]). Let's track AOSP/master and drop this variable in U-Boot as well.

[1] https://android.googlesource.com/platform/system/core/+/42b18a518bac85c3eea14206f6cbafbd1e98a31f

---
Changes in v3:
- rebase on top of this merged patch (v1):
"[PATCH] fastboot: Fix slot names reported by getvar"
Changes in v2:
- add this patch to patch series
- drop slot-suffix variable instead of returning "a,b"

 drivers/fastboot/fb_getvar.c | 8 --------
 1 file changed, 8 deletions(-)
drivers/fastboot/fb_getvar.c +0 -3
index bf957e8326..c15b4f8fca 100644
@@ -64,9 +64,6 @@ static const struct {
        }, {
                .variable = "current-slot",
                .dispatch = getvar_current_slot
-       }, {
-               .variable = "slot-suffixes",
-               .dispatch = getvar_slot_suffixes
 #if CONFIG_IS_ENABLED(FASTBOOT_FLASH)
        }, {
                .variable = "has-slot",
@@ -182,11 +179,6 @@ static void getvar_current_slot(char *var_parameter, char *response)
        fastboot_okay("a", response);
 }
 
Quoted 16 lines
Quoted 11 lines
drivers/fastboot/fb_getvar.c +0 -6
-static void getvar_slot_suffixes(char *var_parameter, char *response)
-{
-       fastboot_okay("a,b", response);
-}
-
 #if CONFIG_IS_ENABLED(FASTBOOT_FLASH)
 static void getvar_has_slot(char *part_name, char *response)
 {
--

2.20.1

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

--
Best regards,
Marek Vasut

#4 lore raw

PATCH v3 1/1 fastboot: Remove "slot-suffixes" variable

Quoted 17 lines · Sam Protsenko
Quoted 9 lines · Marek Vasut
Quoted 3 lines · Sam Protsenko

Hi Marek,

As you mentioned USB PR is now open, please apply this patch in u-boot-usb.

Fastboot is gadget stuff, so that's up to Lukasz.
Is this a bugfix ?

No, this is not a bugfix. In this topic:

[U-Boot] [PULL] u-boot-usb/master

you mentioned to me:

Quoted 7 lines

"Please do, the USB PR is now in."

Maybe I misunderstood you, but I though I had to re-send V2 (which is not a bugfix, and won't applied to v2019.07) on top of V1 (which is already applied). So basically this patch is not for v2019.07, but for later release (should be applied when merge window opens). Sorry for confusion.

The v1 is in, shall it be reverted then ? I am quite confused myself now.

Signature · 2 lines
Best regards,
Marek Vasut
#5 lore raw

PATCH v3 1/1 fastboot: Remove "slot-suffixes" variable

Quoted 21 lines · Marek Vasut
Quoted 19 lines · Sam Protsenko
Quoted 9 lines · Marek Vasut
Quoted 3 lines · Sam Protsenko

Hi Marek,

As you mentioned USB PR is now open, please apply this patch in u-boot-usb.

Fastboot is gadget stuff, so that's up to Lukasz.
Is this a bugfix ?

No, this is not a bugfix. In this topic:

[U-Boot] [PULL] u-boot-usb/master

you mentioned to me:

"Please do, the USB PR is now in."

Quoted 8 lines
Quoted 5 lines

Maybe I misunderstood you, but I though I had to re-send V2 (which is not a bugfix, and won't applied to v2019.07) on top of V1 (which is already applied). So basically this patch is not for v2019.07, but for later release (should be applied when merge window opens). Sorry for confusion.

The v1 is in, shall it be reverted then ? I am quite confused myself now.

Shortly: IMHO, leave it all as is, and please apply V3 when merge window opens :)

Details:
1. It was never my intention to get this patch merged into v2019.07
exactly (even V1). I just sent it because I found out that this should be done to make U-Boot's fastboot work with AOSP/master, when user have partitions like ("boot_a", "system_a") in the partition table. But right now there are none users like this in U-Boot (grep shows it instantly). And also A/B switching algorithm is not implemented in U-Boot yet (we are working on it right now). So it doesn't matter, if we apply this patch for v2019.07 or for the next release. Basically this is a preparation for the near future, when we we'll have slotted partitions ("boot_a", "boot_b") for Android devices in U-Boot.
2. This patch (merged V1 and this V3) can break U-Boot compatibility
with old fastboot tools, but it fixes U-Boot w.r.t. new fastboot tool. I don't see any sane (automatic) way to provide backward compatibility right now, as fastboot basically lacks of protocol version. But again, I don't think that's an issue, as I don't see any A/B users in upstream U-Boot right now.
3. All that said, I think that either way of merging this is fine.
So if V1 is already merged, I suggest keeping it merged, and when merge window opens, let's merge V3. Just to spare any extra work. Because *right now* it doesn't break and doesn't fix anything.

Later I'm gonna send another patch-series for adding new fastboot variables, which was recently added in fastboot tool. Seems like Google undergoes some changes w.r.t. fastboot protocol, because of new "dynamic partitions" requirements, but they forget to keep versioning in sync. So maybe later I will add some compat mechanism, like variable or config option. But that will be done for the next release, of course.

Hope now it's clear. Sorry for any confusion induced.

Another (more general) question is: should I wait for merge window to open before sending any patches, if those are not fixes? If no, should I indicate somehow that some particular patch should be / shouldn't be merge into -rc?

Thanks!

Quoted 3 lines

--
Best regards,
Marek Vasut

#6 lore raw

PATCH v3 1/1 fastboot: Remove "slot-suffixes" variable

Quoted 28 lines · Sam Protsenko
Quoted 27 lines · Marek Vasut
Quoted 24 lines · Sam Protsenko
Quoted 9 lines · Marek Vasut
Quoted 3 lines · Sam Protsenko

Hi Marek,

As you mentioned USB PR is now open, please apply this patch in u-boot-usb.

Fastboot is gadget stuff, so that's up to Lukasz.
Is this a bugfix ?

No, this is not a bugfix. In this topic:

[U-Boot] [PULL] u-boot-usb/master

you mentioned to me:

"Please do, the USB PR is now in."

Maybe I misunderstood you, but I though I had to re-send V2 (which is not a bugfix, and won't applied to v2019.07) on top of V1 (which is already applied). So basically this patch is not for v2019.07, but for later release (should be applied when merge window opens). Sorry for confusion.

Quoted 5 lines
Quoted 2 lines

The v1 is in, shall it be reverted then ? I am quite confused myself now.

Shortly: IMHO, leave it all as is, and please apply V3 when merge window opens :)

Good, that's what I want to know. I'll delegate the rest to Lukasz.

Quoted 42 lines

Details:
1. It was never my intention to get this patch merged into v2019.07
exactly (even V1). I just sent it because I found out that this should be done to make U-Boot's fastboot work with AOSP/master, when user have partitions like ("boot_a", "system_a") in the partition table. But right now there are none users like this in U-Boot (grep shows it instantly). And also A/B switching algorithm is not implemented in U-Boot yet (we are working on it right now). So it doesn't matter, if we apply this patch for v2019.07 or for the next release. Basically this is a preparation for the near future, when we we'll have slotted partitions ("boot_a", "boot_b") for Android devices in U-Boot.
2. This patch (merged V1 and this V3) can break U-Boot compatibility
with old fastboot tools, but it fixes U-Boot w.r.t. new fastboot tool. I don't see any sane (automatic) way to provide backward compatibility right now, as fastboot basically lacks of protocol version. But again, I don't think that's an issue, as I don't see any A/B users in upstream U-Boot right now.
3. All that said, I think that either way of merging this is fine.
So if V1 is already merged, I suggest keeping it merged, and when merge window opens, let's merge V3. Just to spare any extra work. Because *right now* it doesn't break and doesn't fix anything.

Later I'm gonna send another patch-series for adding new fastboot variables, which was recently added in fastboot tool. Seems like Google undergoes some changes w.r.t. fastboot protocol, because of new "dynamic partitions" requirements, but they forget to keep versioning in sync. So maybe later I will add some compat mechanism, like variable or config option. But that will be done for the next release, of course.

Hope now it's clear. Sorry for any confusion induced.

Another (more general) question is: should I wait for merge window to open before sending any patches, if those are not fixes? If no, should I indicate somehow that some particular patch should be / shouldn't be merge into -rc?

Thanks!

Quoted 3 lines

--
Best regards,
Marek Vasut

Signature · 2 lines
Best regards,
Marek Vasut