Commit graph

1052 commits

Author SHA1 Message Date
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
Hariharan K
727c6f32d0 arm: dts: ipq9574: Add new board variant AP.AL02-C18
Same as AP.AL02-C4 RDP, with support for 10G PHY or 10G fiber in UNIPHY0

Change-Id: Ic3935a2cdc0033ed4c7478ae14abd3cf61aef797
Signed-off-by: Hariharan K <quic_harihk@quicinc.com>
2022-10-03 02:05:28 -07:00
Rajkumar Ayyasamy
94dbaae51e pack_v2: use new xtract_n_flash command
xtract_n_flash $imgaddr $filename $partname

The above cmd can be used instead of below set of cmds

imxtract $imgaddr $filename
erase <offset> <size>
write <fileaddr> <offset> <filesize>

This patch also removes padding as it will be taken
care by the flash cmd itself

Change-Id: Id55d844103a97a6a621545e4d62d3da408ffa61c
Signed-off-by: Timple Raj M <quic_timple@quicinc.com>
Signed-off-by: Rajkumar Ayyasamy <quic_arajkuma@quicinc.com>
2022-09-25 22:06:20 -07:00
Kathiravan T
e5f29a66be pack_v2: remove the obselete code
Remove the following support

*) ipq806x / ipq40xx targets
*) nand-audio
*) LK image
*) IPQ807x + QCN9000

Change-Id: I595f868e5b99d481a2110c430c228c2d70112b1e
Signed-off-by: Kathiravan T <quic_kathirav@quicinc.com>
2022-09-20 11:14:52 +05:30
Kathiravan T
c6a4de6d00 pack_v2: remove the unwanted changes
Reverted the changes till the below commit
d84c9f230d ("tools: pack: add new option to select fw based on
machid")

Change-Id: I0578dd5014fbd1d4669065e0bff566c9fc899811
Signed-off-by: Kathiravan T <quic_kathirav@quicinc.com>
2022-09-19 15:39:12 +05:30
Kathiravan T
3f7ad2e752 pack_v2: add the snapshot of pack script
Add the snapshot as of below commit from win.coretech.1.0 branch
9e40b52661 ("tools: pack: Update pack script for IPQ9574")

Change-Id: Iebafae7f827a5ae8bb0b48ca9c899f2672f65fb3
Signed-off-by: Kathiravan T <quic_kathirav@quicinc.com>
2022-09-14 21:13:24 -07:00
Praveenkumar I
9e40b52661 tools: pack: Update pack script for IPQ9574
This patch adds the following changes,

Machine ID check for qcn9224 V1 flashing which will help to
skip this FW flashing if WIFI_FW is 1.

Updated EMMC image append and flash script generation logic
to skip if filename_img<x> is not given inside wififw_type_max
range.

Increased the start activity string length to get the full
WIFI_FW image name in console during flashing.

Change-Id: Ica9552caa219cd1f4be9fa25a4e9a716b789ca48
Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
2022-08-17 16:14:14 +05:30
Praveenkumar I
144fe5efd0 tools: pack: Set default qcn9224_version as 1
If detect_qcn9224 command is not supported in Uboot, qcn9224 V1
image will be flashed.

Change-Id: I36c3b7c5959b4736abe69d218cae2880c20cfad1
Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
2022-08-10 03:19:32 -07:00
Praveenkumar I
724870b677 tools: pack: Update EMMC flash script generation
Change-Id: I26c50de5b94536d32b9c171ff348d8b8e40eb1cd
Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
2022-08-08 17:16:19 -07:00
Praveenkumar I
899d455043 tools: pack: Flash QCN9224 V1 only if qcn9224_version present
Change-Id: Ic75da7f5666f6aacc2acefef7b9bb20d5f6e7120
Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
2022-08-07 20:56:51 +05:30
Linux Build Service Account
4deef50189 Merge "tools: pack: Add support for QCN9224 V1 & V2 flashing" 2022-08-01 08:41:18 -07:00
Praveenkumar I
07af4cfed1 tools: pack: Add support for QCN9224 V1 & V2 flashing
From this change, by default QCN9224 V2 image will be
flashed. If QCN9224 version is V1, then V1 image will be
reflashed.

Change-Id: I205239e1ac4d8136272858aeca784553496e324a
Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
2022-08-01 12:04:55 +05:30
Saahil Tomar
250dfbf658 arm64: dts: ipq9574: Add AL02-C15 & AL02-C16 RDP support
These RDP are based on AL02-C6

Change-Id: I58e5096e09aa2e3fc7bc4494ef91c2f158698977
Signed-off-by: Saahil Tomar <quic_saahtoma@quicinc.com>
2022-07-12 14:46:18 +05:30
Saahil Tomar
abdedad311 arm64: dts: ipq9574: Add AL03-C2 RDP support
This RDP is based on AL03-C1.
The extra feature are WK03.2 – 2G+5GL in Pcie 0 &
WK01.7 – 5GH+6G in Pcie 2.

Change-Id: Ic52c71e98e1a06acf36a825d23f1d184601d153a
Signed-off-by: Saahil Tomar <quic_saahtoma@quicinc.com>
2022-07-05 11:01:47 +05:30
Saahil Tomar
9b01c29b28 arm64: dts: ipq9574: Adding machine ID for WKK RDP
This change addressed the missing AL02_C10 and AL03_C1  machine ids
into pack script.

Change-Id: I77398cbcff8b19efd5550536f5b154f5f36d0638
Signed-off-by: Saahil Tomar <quic_saahtoma@quicinc.com>
2022-07-05 10:58:10 +05:30
Saahil Tomar
ccdbe416f5 arm64: dts: ipq9574: Add AL02-C14 RDP support
This RDP is based on AL02-C8

Change-Id: Ia7a7d128562c888bc7a0dcc6afffa36aef17d826
Signed-off-by: Saahil Tomar <quic_saahtoma@quicinc.com>
2022-06-29 11:31:41 +05:30
Saahil Tomar
6148a349bd arm64: dts: ipq9574: Add AL02-C13 RDP support
This RDP is based on AL02-C4.
The extra feature is QCN90xx on PCIE0

Change-Id: Ic153279dbe18daf9f602bf44f0bf7539f43ba5f8
Signed-off-by: Saahil Tomar <quic_saahtoma@quicinc.com>
2022-06-21 04:10:26 -07:00
Saahil Tomar
f1f8a39e27 arm64: dts: ipq9574: Add AL02-C12 RDP support
This RDP is based on AL02-C6.
The extra feature is W5GL-4 in Pcie 1.
In U-boot, RDP is based on AL02-C4 as Interface enablement
is same as AL02-C12.

Change-Id: If81b5950d02b47c021aea3d52fdf5feb3fcb7035
Signed-off-by: Saahil Tomar <quic_saahtoma@quicinc.com>
2022-06-13 21:42:58 -07:00
Praveenkumar I
a46496cfa5 ipq9574: tools: pack: Fix AL02-C11 machine id
Change-Id: I3d3aeb8f799774116225374a14e41b13717be73a
Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
2022-06-08 11:19:38 +05:30
Praveenkumar I
b5d3586939 ipq9574: Add support for AP-AL02-C11
This is RDP is based on AL02-C4. The extra feature is Alder 2G.

Change-Id: I175938c886c0ebd8f39659ba28be2a946d5b7494
Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
2022-06-07 17:43:09 +05:30
Timple Raj M
12275ca90c meta-tools: add IPQ5332 in pack.py
Change-Id: Ie4430127713f4a9a90852b7958d1643eed237a48
Signed-off-by: Timple Raj M <quic_timple@quicinc.com>
2022-06-01 02:52:05 -07:00