Commit graph

1072 commits

Author SHA1 Message Date
Linux Build Service Account
1e42f2b6b8 Merge "sysupgrade : fix UNINIT.STACK.MIGHT KW error" 2024-01-29 21:09:33 -08:00
Vijay Balaji
980dfed53b sysupgrade : fix UNINIT.STACK.MIGHT KW error
This change fixes the UNINIT.STACK.MIGHT KW issue
in sysupgrade code.

Change-Id: I70760b3ecd331218408ec92a09961f552dc6be24
Signed-off-by: Vijay Balaji <quic_vijbal@quicinc.com>
2024-01-25 06:17:33 -08:00
Linux Build Service Account
e34c5c9329 Merge "tools: add support to convert elf to mbn" 2024-01-24 11:41:02 -08:00
Ram Kumar D
2e0ccbbaa5 tools: add support to convert elf to mbn
Change-Id: I3caca1f0a7f7bea61ea29186fdb04becb8ef0b37
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2024-01-23 11:02:18 +05:30
Vijay Balaji
3f84414cde sysupgrade-helper : Fix KW issues and warnings for sysupgrade
Here we are adding support to fix several warnings and
NPD.FUNC.MUST, ABV.GENERAL, INCORRECT.ALLOC_SIZE KW issues
in sysupgrade source code.

Change-Id: If8053878696494c1425ebd20840d17d9c6a74524
Signed-off-by: Vijay Balaji <quic_vijbal@quicinc.com>
2024-01-11 13:12:58 +05:30
Rajkumar Ayyasamy
881cdd8aa0 pack_v2: fix wifi fw packing of norplusemmc image
Change-Id: I131e9ca0c3bd512f5f16363bf0ae5836a4601c8c
Signed-off-by: Rajkumar Ayyasamy <quic_arajkuma@quicinc.com>
2023-09-29 19:04:30 -07:00
Timple Raj M
b2c1ec334d pack_v2: Update the image_type condition check for 0:WIFIFW
This patch updates the image_type condition check
for 0:WIFIFW since emmc-partition.xml each partition
information is parsed in single xml tag but for other
partition.xml files each partition information is
mentioned in multiple xml tags

For Example

ipq5332/flash_partition/tiny-nor-partition.xml

<partition>
        <name length="16" type="string">0:WIFIFW</name>
        <size_kb length="4">5500</size_kb>
        <pad_kb length="2">0</pad_kb>
        <which_flash length="2">0</which_flash>
        <attr>0xFF</attr>
        <attr>0xFF</attr>
        <attr>0x00</attr>
        <attr>0xFF</attr>
        <img_name image_type="hlos" optional="true" type="string"
wififw_type="1">wifi_fw_ipq5332_qcn6432_squashfs.img </img_name>
</partition>

ipq5332/flash_partition/emmc-partition.xml

<partition
        label="0:WIFIFW"
        size_in_kb="12288"
        type="888d8069-8d27-40a8-95a9-6006e1ce9b3b"
        bootable="false"
        readonly="false"
        image_type = "hlos"
        optional="true"
        filename="wifi_fw_ipq5332_qcn9224_v2_single_dualmac_squashfs.img"
        />

Change-Id: I1b5835b0835f2c05958924ad6ce5f403e934aac4
Signed-off-by: Timple Raj M <quic_timple@quicinc.com>
2023-09-29 07:27:55 -07:00
Linux Build Service Account
e2a8fa4112 Merge "tools: pack_v2: fix wififw image flashing script" 2023-09-28 06:40:09 -07:00
Linux Build Service Account
ad66d83448 Merge "sysupgrade-helper : Fix warnings during compilation" 2023-09-27 18:09:26 -07:00
Gokul Sriram Palanisamy
f52ebe8b10 tools: pack_v2: fix wififw image flashing script
tiny-nor was using ubi volume name "wifi_fw" instead
of partition name "0:WIFIFW". This change fixes the same.

Change-Id: I55dc83a2cc40178ffffdfa25fe20a739f21040ad
Signed-off-by: Gokul Sriram Palanisamy <quic_gokulsri@quicinc.com>
2023-09-27 19:22:42 +05:30
Vijay Balaji
04a18622dd sysupgrade-helper : Fix warnings during compilation
This change will fix warnings occurred during
compilation of sysupgrade source files

Change-Id: I0526da607b383064b4c5cea7462fe4c12c669a3b
Signed-off-by: Vijay Balaji <quic_vijbal@quicinc.com>
(cherry picked from commit 6a7c18c463)
2023-09-27 00:16:00 -07:00
Ram Kumar D
8104d45265 tools: pack_v2: resolving wifi fw section name mis-match
This patch resolves the wififw section name mis-match for
the nor flash types.

In image info, wififw-SHA-HASH is used, whereas in the scripts
wifi_fw_ipq5332_qcn6432-SHA-HASH is used. It occur on nor-only build.
For nand/nor+nand, wifi usually in the ubi volume. Incase of
emmc, it is properly taken care.

So, handled all nor-only cases (including tiny-nor) as
similar as emmc case.

Change-Id: I3741a8255da487ad0546d9706933d19f1b1a3a93
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2023-09-25 03:00:54 -07:00
Ram Kumar D
bc38309789 tools: pack_v2: do byte conversion only for python v3
Change-Id: Id72dae43e9612844e8db7d58d2891bf9b2619756
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2023-09-14 12:20:51 +05:30
Linux Build Service Account
999b91a407 Merge "pack_v2: TINY NOR: Update config parameter" 2023-09-13 13:13:42 -07:00
Ram Kumar D
94c5a1490b tools: add python3 compatible support on pack scripts
This patch updates the pack & pack-v2 scripts with python3
compatible support

Change-Id: I2bf9a1cb2dedbdae94355aed4078d9f792fc7ba9
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2023-09-12 22:03:39 +05:30
Gokul Sriram Palanisamy
1fba88362d pack_v2: TINY NOR: Update config parameter
For 'tiny-nor' flash type, new configuration is added.
Update the script to read the new parameter.

Change-Id: I0d0e3e5332dfe6476da735d0defb4b43754f02ee
Signed-off-by: Rajkumar Ayyasamy <quic_arajkuma@quicinc.com>
Signed-off-by: Gokul Sriram Palanisamy <quic_gokulsri@quicinc.com>
2023-09-12 18:20:23 +05:30
Ram Kumar D
18f7f37a94 tools: pack: flash bootconfig only for non-apps image
Update pack script to flash bootconfig only for non-apps
image.

Change-Id: I85be15e48b4e4f3ed40826d0c395f2cc8e5d3f88
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2023-09-12 15:33:43 +05:30
Ram Kumar D
68ae34c1e1 tools: packv1: added support to flash bootcfg based on RDP
This patch adds support to flash the bootconfig based on the
RDPs.

1. To flash bootconfig based on Multi-RDP
   add entry like below in all flash partition xmls

   for non-mmc flash partition:
   <img_name type="string" bootconfig_type="1">file1_name</img_name>
   <img_name type="string" bootconfig_type="2">file2_name</img_name>
   <img_name type="string" bootconfig_type="2">file3_name</img_name>

   for mmc flash partition:
   bootconfig_type_max="2"
   filename_img1="file1_name"
   filename_img2="file2_name"

   and specify which bootconfig to flash on each RDP by adding
   entry like below, in config xml under each RDP nodes.
   <bootconfig_type>1</bootconfig_type>

2. for single bootconfig case, there is no change.
   just add single entry like below in all flash partition xmls
   <img_name type="string">file_name</img_name>

Change-Id: I2ca4d2125c70a7f5176478b3de03b1f6fc98ce08
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2023-08-31 17:31:40 +05:30
Ram Kumar D
0b4ee428fb tools: packv1: align indentation using reindent
Change-Id: I5194e20788a94d88121830ec63c4e8350bdb9387
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2023-08-31 14:38:44 +05:30
Vijay Balaji
f0fa42c10d sysupgrade : corrected typo in rootfs auth message log
We observed a typo in rootfs image authentication
enabled message log and corrected it in this change.

Change-Id: Ie1aa07e0f45fdc3d802d87a03cfe376d7ac43e4e
Signed-off-by: Vijay Balaji <quic_vijbal@quicinc.com>
2023-08-17 11:29:42 +05:30
Vijay Balaji
c9320a61f8 sysupgrade : add support for non-signed rootfs
This change adds support to authenticate signed
rootfs images if rootfs_auth is enabled. It will
authenticate kernel image when rootfs image is not
signed.

Change-Id: I5f9da1c033c5530ebce4bff9f0fb4f69aaca9213
Signed-off-by: Vijay Balaji <quic_vijbal@quicinc.com>
2023-08-02 11:29:29 +05:30
Saahil Tomar
1acea54708 ipq9574: Add support for RDP467
RDP467 is same as AL02-C4 with PCIE0 enabled with
wkk support.

Change-Id: If6ba645b7c62a3320139a7c86e0b89ec525a0fb7
Signed-off-by: Saahil Tomar <quic_saahtoma@quicinc.com>
Signed-off-by: Hariharan K <quic_harihk@quicinc.com>
2023-07-24 03:06:22 -07:00
Vijay Balaji
91b4536719 sysupgrade : removed unused code
We want to extract rootfs image from ubi without any
changes, as we are traversing through the rootfs image
for 0xdeadc0de in extract_rootfs_binary() to extract
the image till 0xdeadc0de offset.

Change-Id: Iefeec6db72b65310310d74835b68ec3d22144608
Signed-off-by: Vijay Balaji <quic_vijbal@quicinc.com>
2023-07-21 06:17:36 -07:00
Vijay Balaji
6814dfbb98 sysupgrade : add support to extract rootfs binary
This change adds support to extract rootfs binary
till correct data-block offset and replaces the
binary for image authentication in both
EMMC and Nand flashtypes.

Change-Id: Ib56228a620ffc5bcfae8b51682377b68e273484f
Signed-off-by: Vijay Balaji <quic_vijbal@quicinc.com>
2023-07-18 10:15:22 -07:00
Vijay Balaji
acfb230049 sysupgrade: Use ubi volume name instead of volume id
We observed that ubi_rootfs volume id is different for ipq807x
and ipq95xx, so we use volume name instead of volume id for
rootfs extraction from ubi.

Change-Id: I0b536fbceae47279b81d76f8108ca8640c09657c
Signed-off-by: Vijay Balaji <quic_vijbal@quicinc.com>
2023-06-26 19:19:55 +05:30
Linux Build Service Account
383a1fcbca Merge "pack_v2: remove the mibib_reload sequence for nand apps img" 2023-06-22 16:38:41 -07:00
Saahil Tomar
d8c716c263 pack_v2: remove the mibib_reload sequence for nand apps img
Change-Id: I846700d480a5ef0577a8f279fcd1932d2463d38c
Signed-off-by: Saahil Tomar <quic_saahtoma@quicinc.com>
2023-06-20 20:18:00 +05:30
Timple Raj M
fcfcac8c34 pack_v2: Add NAND 64M flash support
This patch adds the NAND 64M flash support and adds
the new param --flash_size to denote the flash size

Change-Id: I101cf75d2f1d177475052b8f90cb0cdf30731a20
Signed-off-by: Timple Raj M <quic_timple@quicinc.com>
2023-06-16 02:41:03 -07:00
Linux Build Service Account
500b086449 Merge "arm: dts: ipq9574: Add AL05 & AL06 RDP support" 2023-06-12 05:56:06 -07:00
Saahil Tomar
f2ae718b2a arm: dts: ipq9574: Add AL05 & AL06 RDP support
This RDP is based on AL02-C4, with changes in ethernet for GPON enablement

Change-Id: Ic25d9009e685d8646564bda582305fbf1bce2be6
Signed-off-by: Saahil Tomar <quic_saahtoma@quicinc.com>
2023-06-09 10:27:54 +05:30
Vijay Balaji
4a1f60a52b Sysupgrade-helper : Rootfs Authentication during sysupgrade
This change will add support for rootfs Authentication in all
flashtypes (Nor, Nand, Emmc and norplusnand) during sysupgrade.
Here we are adding support to sign rootfs image with sha384.
The rootfs metadata is available at the end of kernel image.
This change adds supports to extract rootfs metadata from
kernel image and stores in /tmp/metadata.bin.
It also calculates sha384 of rootfs binary and stores in /tmp/sha384_keyXXXXXX 
After this we use below command to authenticate rootfs metadata:
echo -n "0x17 /tmp/metadata.bin /tmp/sha384_keyXXXXXX" > /sys/sec_upgrade/sec_auth

Change-Id: Iaf304d5edcd3bfff849fcb3705f5342f4c354b5b
Signed-off-by: Vijay Balaji <quic_vijbal@quicinc.com>
2023-05-25 00:38:16 -07:00
Hariharan K
cd5362a218 pack_v2: Append flupdate commands
If flash image type is emmc, switch the flash
type to emmc from nor in norplusemmc board using
the flupdate commands. Once the image is flashed
switch back the flash type to nor using the same
flupdate commands.

This change is to support the below Change-Id
Ib328cc1fea0b37f27e6479d55fce08365fbfcf69

Change-Id: Ia5f75923d7bdfd313a986826f1ac2f7f571c414a
Signed-off-by: Hariharan K <quic_harihk@quicinc.com>
2023-04-18 00:54:59 -07:00
Linux Build Service Account
8a2e7c630f Merge "tools: pack: Waikiki V1 support removal" 2023-04-13 06:05:31 -07:00
Saahil Tomar
db31f148ec tools: pack: Add check constraint for CDT_1
This change checks if 0:CDT_1 partition exists and then flashes cdt.bin.
Previously, check existed only for 0:CDT. The change allows for creation
of single image with proper cdt_1 name and appends it to the single image.
With this, we can successfully use the CDT_1 alternate partition for images.

Change-Id: I100dc789b54805c699ba6f30d5cb1b74734b1bd9
Signed-off-by: Saahil Tomar <quic_saahtoma@quicinc.com>
2023-04-06 22:27:26 -07:00
Linux Build Service Account
bb16cf6d0c Merge "pack_v2: pack: added soc_hw_version for IPQ5332 1.1" 2023-03-29 14:14:24 -07:00
Gurumoorthy Santhakumar
3dbe745100 pack_v2: pack: added soc_hw_version for IPQ5332 1.1
Change-Id: Ib2a156f1e75cc8fdf256b117328fcd80b280988b
Signed-off-by: Gurumoorthy Santhakumar <quic_gsanthak@quicinc.com>
2023-03-28 19:52:43 +05:30
Saahil Tomar
c544cb9693 tools: pack: Waikiki V1 support removal
This patch removes WKK V1 support. Alder + qcn9000 + qcn9224 Dual MAC V2
image will be used for all qcn9224 supported RDPs and they will have this FW
as WIFI_FW type 1.

Change-Id: I59ee0e50387d99bfb7f86d54fcee792f3f677048
Signed-off-by: Saahil Tomar <quic_saahtoma@quicinc.com>
2023-03-17 13:19:00 +05:30
Ram Chandra Jangir
14023645dd sysupgrade: Consider minimum metadata size as 0x1000
When we use root certificate count as four, then metadata
is generated with size as 0x4000, but for single root
certificate, metadata size will be less than 0x4000, hence
consider minimum metadata size as 0x1000

Change-Id: Ib713e5fd4bcfe493cf482efda54d20ca1604939b
Signed-off-by: Ram Chandra Jangir <quic_rjangir@quicinc.com>
2023-03-14 22:24:11 -07:00
Linux Build Service Account
f7147676d3 Merge "board: qca: ipq9574: Added support for RDP469 AL02-C17 variant" 2023-02-27 10:26:19 -08:00
Saahil Tomar
0110877a49 board: qca: ipq9574: Added support for RDP469 AL02-C17 variant
AL02-C17 is based on AL02-C4. This variant
enables PCie0 and PCie2.

Change-Id: I67aa500bd13ec661a43b17c4cbcd56c9a6db8abc
Signed-off-by: Saahil Tomar <quic_saahtoma@quicinc.com>
2023-02-23 11:43:39 +05:30
Ram Chandra Jangir
90c4bba23c sysupgrade: Add support to authenticate rootfs image
Add rootfs section to authenticate signed rootfs image
Parse the hlos elf header and get the rootfs metadata offset
Reads metadata available at the end of hlos image and write to /tmp/metadata.bin
Calculate sha384 and write to /tmp/sha384_XXXXX file
Use /tmp/metadata.bin and /tmp/sha384_XXXXX to get rootfs auth by TZ

Change-Id: Iaa4bf6b0cfbae4f4a56187f80f2873cb69550051
Signed-off-by: Ram Chandra Jangir <quic_rjangir@quicinc.com>
2023-02-20 13:09:06 +05:30
Timple Raj M
6915087e2a pack_v2: fix for emmc apps image
This patch provides the fix for emmc apps image generation.
The partition variable value has to be marked as null
for the partitions to be skipped in apps image generation.

Change-Id: I0067c527f0de38eb513e27fadfeee2accb69f3d3
Signed-off-by: Timple Raj M <quic_timple@quicinc.com>
2023-01-23 14:17:27 +05:30
Timple Raj M
e35288bf0a tools: pack_v2: ipq5332: Add NOR support for wifi_fw flash
This patch adds the additional conditional check to filter
out wififw images for nor flash type

Change-Id: Iba078721fbfc5ed4cd3bd74689e9ba6352a69130
Signed-off-by: Timple Raj M <quic_timple@quicinc.com>
2023-01-11 01:24:17 -08:00
Timple Raj M
145b49c759 pack_v2: update the mibib_reload sequence
This patch update the mibib_reload sequence by checking 0:MIBIB in
all partitions info instead of using a specific partition index
and this change has some code cleanup

Change-Id: I09b3be3be7a5bfae7dc5ddc5c2ae54f6b06a7333
Signed-off-by: Timple Raj M <quic_timple@quicinc.com>
2022-12-13 03:23:11 -08:00
Ram Kumar D
b74f78bbe5 pack_v2: updated wifi_fw logic for pack script
This patch updates the following things.
1. Simplified the wififw pack script logic
2. Added the multi fw version support with simple changes

i. To add RDP specific fw img, mention the corresponding fw
name under each RDP entry in config.xml like below.

<wififw_name>file-name</wififw_name>

ii. When we migrate to new fw version for a specfic chipset,
add the following entry in the config.xml.

<data type="VERSION_PARAMETER">
	<version_check>chip-set-number</version_check>
	<default_version>base-fw-version</default_version>
</data>

Note: Also, make sure that all the fw names mentioned in the
config.xml are in the base verison.

iii. Once migration is done, remove the entries added in (ii).
and rename the new version fw names in the config.xml as
mentioned in the (i).

Change-Id: I296dab47e9ff321a1ed44130df8fc5cdd8a5bfa5
Signed-off-by: Ram Kumar D <quic_ramd@quicinc.com>
2022-11-29 15:31:03 +05:30
Tom Rini
af3ad1d289 Merge branch '2021-02-15-fix-CVE-2021-27097-CVE-2021-27138'
Fix CVE-2021-27097 and CVE-2021-27138.  For more details see
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-27097 and
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-27138

Change-Id: I8f1f03a7e4b1d0bc9d8db51b6a08219f0c47fc2d
Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
2022-11-24 00:57:50 -08:00
Simon Glass
aea4f25d69 image: Use constants for 'required' and 'key-name-hint'
These are used in multiple places so update them to use a shared #define.

Change-Id: I3cc304f04c56c9d1a22df46e68f601b5acd2b34e
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
2022-11-24 00:57:41 -08:00
Simon Glass
f9b8402471 fit_check_sign: Allow selecting the configuration to verify
This tool always verifies the default configuration. It is useful to be
able to verify a specific one. Add a command-line flag for this and plumb
the logic through.

Change-Id: I6022af77965aa107e4693119ac1a0ab750d3fe24
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
2022-11-24 00:57:32 -08:00
Rajkumar Ayyasamy
425d52cd85 ipq5332: avoid multiple machid for nand/mmc boot
added boot type based nand or emmc flash selection.
So machid based flash selection becomes obsolete.

Change-Id: I96fa43d31d23397fa249e02f62b905d6e4e67770
Signed-off-by: Rajkumar Ayyasamy <quic_arajkuma@quicinc.com>
2022-11-22 22:01:56 -08:00
Nitheesh Sekar
aa9fb4c4fb arm: dts: ipq9574: Add new board variant AP.AL02-C19
This patch adds support for new board variant AL02-C19.
This board variant consists of one internal radio,
Waikiki 5G in pci slot 0, Waikiki 6G in pci slot 2 and
SDX in pci slot 3.

Change-Id: I43e3b5890f6bd8f6d182e4c3acc540a89f9c4a34
Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
2022-11-15 21:45:05 -08:00