Skip to content

Commit

Permalink
Revert "Removing few WA patches"
Browse files Browse the repository at this point in the history
This reverts commit 7643ce3.

Reverting since boot issue was seen on MBL Fab-B board.

Test Done: Base_aaos Image boots on MBL board

Tracked-On: OAM-122801
Signed-off-by: Salini Venate <[email protected]>
  • Loading branch information
SaliniVenate authored and sysopenci committed Jul 30, 2024
1 parent 7643ce3 commit 526fba5
Show file tree
Hide file tree
Showing 5 changed files with 205 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
From 4725c8c7cec68a56f24460091f6b925acdd853ca Mon Sep 17 00:00:00 2001
From: svenate <[email protected]>
Date: Wed, 30 Mar 2022 07:13:54 +0530
Subject: [PATCH] Remove usage of F-string

The usage of F-string is supported only from python 3.6 and
was giving build error:
"SyntaxError: invalid syntax"

Change-Id: I3b5e9dcc4dbf12dfd1459eb7d312517058f6e228
Signed-off-by: svenate <[email protected]>
---
tools/releasetools/common.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index eb7886209a..68eb36f678 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -1765,8 +1765,7 @@ def _BuildBootableImage(image_name, sourcedir, fs_config_file,

BOOT_SIGNATURE_SIZE = 16 * 1024
if len(boot_signature_bytes) > BOOT_SIGNATURE_SIZE:
- raise ValueError(
- f"GKI boot_signature size must be <= {BOOT_SIGNATURE_SIZE}")
+ raise ValueError('GKI boot_signature size must be <= {}'.format(BOOT_SIGNATURE_SIZE))
boot_signature_bytes += (
b'\0' * (BOOT_SIGNATURE_SIZE - len(boot_signature_bytes)))
assert len(boot_signature_bytes) == BOOT_SIGNATURE_SIZE
@@ -2026,11 +2025,11 @@ def _BuildVendorBootImage(sourcedir, partition_name, info_dict=None):
# AVB: if enabled, calculate and add hash.
if info_dict.get("avb_enable") == "true":
avbtool = info_dict["avb_avbtool"]
- part_size = info_dict[f'{partition_name}_size']
+ part_size = info_dict['{}_size'.format(partition_name)]
cmd = [avbtool, "add_hash_footer", "--image", img.name,
"--partition_size", str(part_size), "--partition_name", partition_name]
AppendAVBSigningArgs(cmd, partition_name)
- args = info_dict.get(f'avb_{partition_name}_add_hash_footer_args')
+ args = info_dict.get('avb_{}_add_hash_footer_args'.format(partition_name))
if args and args.strip():
split_args = ResolveAVBSigningPathArgs(shlex.split(args))
cmd.extend(split_args)
--
2.17.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
From af9a3443822537aa259f85f09563291b394562b3 Mon Sep 17 00:00:00 2001
From: svenate <[email protected]>
Date: Wed, 30 Mar 2022 07:13:54 +0530
Subject: [PATCH] Remove usage of F-string

The usage of F-string is supported only from python 3.6 and
was giving build error:
"SyntaxError: invalid syntax"

Change-Id: I3b5e9dcc4dbf12dfd1459eb7d312517058f6e228
Signed-off-by: svenate <[email protected]>
---
tools/releasetools/common.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 696215e475..30a324c671 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -1661,8 +1661,7 @@ def _BuildBootableImage(image_name, sourcedir, fs_config_file, info_dict=None,

BOOT_SIGNATURE_SIZE = 16 * 1024
if len(boot_signature_bytes) > BOOT_SIGNATURE_SIZE:
- raise ValueError(
- f"GKI boot_signature size must be <= {BOOT_SIGNATURE_SIZE}")
+ raise ValueError('GKI boot_signature size must be <= {}'.format(BOOT_SIGNATURE_SIZE))
boot_signature_bytes += (
b'\0' * (BOOT_SIGNATURE_SIZE - len(boot_signature_bytes)))
assert len(boot_signature_bytes) == BOOT_SIGNATURE_SIZE
@@ -1931,11 +1930,11 @@ def _BuildVendorBootImage(sourcedir, partition_name, info_dict=None):
# AVB: if enabled, calculate and add hash.
if info_dict.get("avb_enable") == "true":
avbtool = info_dict["avb_avbtool"]
- part_size = info_dict[f'{partition_name}_size']
+ part_size = info_dict['{}_size'.format(partition_name)]
cmd = [avbtool, "add_hash_footer", "--image", img.name,
"--partition_size", str(part_size), "--partition_name", partition_name]
AppendAVBSigningArgs(cmd, partition_name)
- args = info_dict.get(f'avb_{partition_name}_add_hash_footer_args')
+ args = info_dict.get('avb_{}_add_hash_footer_args'.format(partition_name))
if args and args.strip():
cmd.extend(shlex.split(args))
RunAndCheckOutput(cmd)
--
2.17.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
From f8c841e3fd2f8d7f1c5de4ad1a003e9725d37499 Mon Sep 17 00:00:00 2001
From: Ankit Agrawal <[email protected]>
Date: Thu, 18 May 2023 16:19:38 +0530
Subject: [PATCH] WA-Fixed Build Error Releasetools.

Build error-:
File "build/tools/releasetools/common.py", line 4104
def ParseUpdateEngineConfig(path: str):
^
SyntaxError: invalid syntax

File "build/tools/releasetools/common.py", line 4123
f"{path} is an invalid update_engine config, missing PAYLOAD_MAJOR_VERSION {data}")
^
SyntaxError: invalid syntax

File "build/tools/releasetools/common.py", line 4124
f"{path} is an invalid update_engine config, missing PAYLOAD_MINOR_VERSION {data}")
^
SyntaxError: invalid syntax

Seems due to python version. Above seems not supported in python2.

Tracked-On: OAM-106853
Signed-off-by: Ankit Agrawal <[email protected]>
---
tools/releasetools/common.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 68eb36f678..6db1d14782 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -4101,7 +4101,7 @@ def IsSparseImage(filepath):
return fp.read(4) == b'\x3A\xFF\x26\xED'


-def ParseUpdateEngineConfig(path: str):
+def ParseUpdateEngineConfig(path):
"""Parse the update_engine config stored in file `path`
Args
path: Path to update_engine_config.txt file in target_files
@@ -4117,9 +4117,9 @@ def ParseUpdateEngineConfig(path: str):
major = re.search(r"PAYLOAD_MAJOR_VERSION=(\d+)", data)
if not major:
raise ValueError(
- f"{path} is an invalid update_engine config, missing PAYLOAD_MAJOR_VERSION {data}")
+ "{path} is an invalid update_engine config, missing PAYLOAD_MAJOR_VERSION {data}" + path)
minor = re.search(r"PAYLOAD_MINOR_VERSION=(\d+)", data)
if not minor:
raise ValueError(
- f"{path} is an invalid update_engine config, missing PAYLOAD_MINOR_VERSION {data}")
+ "{path} is an invalid update_engine config, missing PAYLOAD_MINOR_VERSION {data}" + path)
return (int(major.group(1)), int(minor.group(1)))
--
2.17.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From 7f10d411b99d68c7a954030d67f3693e964b51fe Mon Sep 17 00:00:00 2001
From: Tanuj Tekriwal <[email protected]>
Date: Tue, 12 Dec 2023 10:38:32 +0000
Subject: [PATCH] Build external angle by python3

This patch will enable to build generate_registry_tables.py
file to use python3 instead of python2
This patch needs to be reverted when we make python3
as default.

Tests-Done: Build and boot the device.

Tracked-On: OAM-114192
Signed-off-by: Tanuj Tekriwal <[email protected]>
---
.../spirv-tools/src/utils/generate_registry_tables.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/third_party/vulkan-deps/spirv-tools/src/utils/generate_registry_tables.py b/third_party/vulkan-deps/spirv-tools/src/utils/generate_registry_tables.py
index 14d4909fa6..69628faada 100755
--- a/third_party/vulkan-deps/spirv-tools/src/utils/generate_registry_tables.py
+++ b/third_party/vulkan-deps/spirv-tools/src/utils/generate_registry_tables.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) 2016 Google Inc.

# Licensed under the Apache License, Version 2.0 (the "License");
--
2.39.2

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From f4f107df96f7ebfd4916a45e211fc73af481a3e1 Mon Sep 17 00:00:00 2001
From: Ankit Agrawal <[email protected]>
Date: Thu, 18 May 2023 16:32:49 +0530
Subject: [PATCH] WA-Fixed Build Error For Python.

Configuring python2 for now to resolve build issue.

Tracked-On: OAM-OAM-106853
Signed-off-by: Tanuj Tekriwal <[email protected]>
---
path/linux-x86/python | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/path/linux-x86/python b/path/linux-x86/python
index 94246bc..8ec5dcd 120000
--- a/path/linux-x86/python
+++ b/path/linux-x86/python
@@ -1 +1 @@
-../../linux-x86/bin/py3-cmd
\ No newline at end of file
+../../linux-x86/bin/py2-cmd
\ No newline at end of file
--
2.17.1

0 comments on commit 526fba5

Please sign in to comment.