Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

otptool: Define value_start in rev_id path #18

Merged
merged 1 commit into from Aug 16, 2023

Conversation

amboar
Copy link
Contributor

@amboar amboar commented Aug 14, 2023

Fixes:

Traceback (most recent call last):
  File "/usr/bin/otptool", line 29, in <module>
    tool.run(sys.argv)
  File "/usr/lib/python3.11/site-packages/socsec/otptool.py", line 2127, in run
    args.func(args)
  File "/usr/lib/python3.11/site-packages/socsec/otptool.py", line 2130, in make_otp_image
    self.otp.make_otp_image(args.config,
  File "/usr/lib/python3.11/site-packages/socsec/otptool.py", line 1335, in make_otp_image
    config_region, config_region_ignore = self.make_config_region(
                                          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/socsec/otptool.py", line 1042, in make_config_region
    offset_value = int(value, 16) - value_start
                                    ^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'value_start' where it is not associated with a value

@Neal-liu Neal-liu changed the base branch from master to develop August 14, 2023 07:18
@Neal-liu
Copy link
Contributor

Looks good to me. Please apply:
Reviewed-by: Neal Liu neal_liu@aspeedtech.com

Fixes:

```
Traceback (most recent call last):
  File "/usr/bin/otptool", line 29, in <module>
    tool.run(sys.argv)
  File "/usr/lib/python3.11/site-packages/socsec/otptool.py", line 2127, in run
    args.func(args)
  File "/usr/lib/python3.11/site-packages/socsec/otptool.py", line 2130, in make_otp_image
    self.otp.make_otp_image(args.config,
  File "/usr/lib/python3.11/site-packages/socsec/otptool.py", line 1335, in make_otp_image
    config_region, config_region_ignore = self.make_config_region(
                                          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/socsec/otptool.py", line 1042, in make_config_region
    offset_value = int(value, 16) - value_start
                                    ^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'value_start' where it is not associated with a value
```

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Reviewed-by: Neal Liu neal_liu@aspeedtech.com
@amboar
Copy link
Contributor Author

amboar commented Aug 16, 2023

I've now added your Reviewed-by tag :)

@Neal-liu Neal-liu merged commit d011dc7 into AspeedTech-BMC:develop Aug 16, 2023
1 check passed
geissonator pushed a commit to openbmc/openbmc that referenced this pull request Sep 1, 2023
There's a bug in socsec that prevents the IBM's configuration from
successfully building an OTP image.

I have got the fix merged upstream:

AspeedTech-BMC/socsec#18

However, Aspeed do not plan on doing a release until October:

> [ 17:51 ] arj: @troy Lee any chance Neal can tag a new socsec release so we can bump it in OpenBMC and pick up some recent fixes?
> [ 18:25 ] Troy Lee: Current schedule is October.

https://discord.com/channels/775381525260664832/922871693008068638/1144547174286377062

For now, fix otptool using a recipe patch, in violation of the usual
guidelines.

I prefer we do this over switching to a "git" version for the recipe as
instability with these tools really cannot be tolerated.

Change-Id: I65b1992b5479ea257cfa65fd8b3cfc021b7d3dea
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
rfrandse pushed a commit to ibm-openbmc/openbmc that referenced this pull request Mar 28, 2024
There's a bug in socsec that prevents the IBM's configuration from
successfully building an OTP image.

I have got the fix merged upstream:

AspeedTech-BMC/socsec#18

However, Aspeed do not plan on doing a release until October:

> [ 17:51 ] arj: @troy Lee any chance Neal can tag a new socsec release so we can bump it in OpenBMC and pick up some recent fixes?
> [ 18:25 ] Troy Lee: Current schedule is October.

https://discord.com/channels/775381525260664832/922871693008068638/1144547174286377062

For now, fix otptool using a recipe patch, in violation of the usual
guidelines.

I prefer we do this over switching to a "git" version for the recipe as
instability with these tools really cannot be tolerated.

Change-Id: I65b1992b5479ea257cfa65fd8b3cfc021b7d3dea
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants