Age | Commit message (Collapse) | Author |
|
[Cherry-picked from
https://source.codeaurora.org/quic/la/abl/tianocore/edk2/commit/?id=221dc1de0c97e4eb91262e67539908fb0b0f14e3]
When we disable avb feature, calculate the size of the data needed to be
read from the flash completely. Add suport to read the dtb.img
which is present at the end of the boot image in case of the header
version 2. This change is needed because up until header version 2, dtbs
were appended to the kernel and in kernel size, dtbs were included.
Change-Id: Iad055672e473951fc92c4138c98555e67875aeb0
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
|
|
GetSocDtb() match and load the best DTB in dtb.img.
This match is done based on non-upstream DT properties
i.e. qcom,{msm-id/board-id/pmic-id}, which are not
supported on db845c.
Since we do not support multiple DTBs in dtb.img anyway,
we set the current (and only available dtb in dtb.img)
as the best match explicitly.
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
|
|
Skip loading dtb overlay image from dtbo partition
because there isn't any.
In case of missing dtbo image, DTBImgCheckAndAppendDT
assumes that we are booting with appended dtb
(Image.gz-dtb) format and fail to load dtb from
boot.img (boot image header v2 format).
So we fix that by loading dtb from boot.img explicitly
in case of missing DTBO image.
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
|
|
We can already somewhat control the fastboot menu
over the serial UART, as up and down changes action mode.
However, there's no way to select the mode over the UART.
So add some feedback over the UART as to the current mode
and use SCAN_RIGHT as the selection option (equivalent to
the power button).
Signed-off-by: John Stultz <john.stultz@linaro.org>
[AmitP: It is equivalent of using VOL+ (up), VOL- (down)
and POWER keys on db845c to scroll thru or select
fastboot options displayed over HDMI display.]
Tested-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
|
|
mode keys
Pressing <DOWN> over serial UART console will force the
loader to enter fastboot mode, and similarly with <UP> and
<ESC>, so lets make these helpful keys more discoverable
with an explicit message on the serial line.
Signed-off-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Tested-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
|
|
When using community builds, we want to depend as less as possible on
Qualcomm internal builds quirks. This function does a few checks which
are relevant when booting a Qualcomm Android image, but not well
suited for community builds. For example users might choose to remove
system_x partition, in which case the bootloader wouldn't boot
anymore.
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
|
|
gcc-8 (which is part of Fedora 28) enables the new warning
"-Wstringop-truncation" in "-Wall". This warning is documented in detail
at <https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html>; the
introduction says
> Warn for calls to bounded string manipulation functions such as strncat,
> strncpy, and stpncpy that may either truncate the copied string or leave
> the destination unchanged.
It breaks the BaseTools build with:
> EfiUtilityMsgs.c: In function 'PrintMessage':
> EfiUtilityMsgs.c:484:9: error: 'strncat' output may be truncated copying
> between 0 and 511 bytes from a string of length 511
> [-Werror=stringop-truncation]
> strncat (Line, Line2, MAX_LINE_LEN - strlen (Line) - 1);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> EfiUtilityMsgs.c:469:9: error: 'strncat' output may be truncated copying
> between 0 and 511 bytes from a string of length 511
> [-Werror=stringop-truncation]
> strncat (Line, Line2, MAX_LINE_LEN - strlen (Line) - 1);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> EfiUtilityMsgs.c:511:5: error: 'strncat' output may be truncated copying
> between 0 and 511 bytes from a string of length 511
> [-Werror=stringop-truncation]
> strncat (Line, Line2, MAX_LINE_LEN - strlen (Line) - 1);
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The right way to fix the warning would be to implement string concat with
snprintf(). However, Microsoft does not appear to support snprintf()
before VS2015
<https://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010>,
so we just have to shut up the warning. The strncat() calls flagged above
are valid BTW.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Cole Robinson <crobinso@redhat.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
(cherry picked from commit 1d212a83df0eaf32a6f5d4159beb2d77832e0231)
|
|
The runtime test whether the compiler supports arithmetic shift of
negative signed numbers currently relies on undefined behavior in C,
which means that all bets are off regarding whether the condition
that follows passes or fails, regardless of whether the compiler in
fact supports arithmetic shift or not.
Relevant quote from ISO C99 (6.5.7/4)
The result of E1 << E2 is E1 left-shifted E2 bit positions; vacated bits
are filled with zeros. If E1 has an unsigned type, the value of the result
is E1 × 2^E2, reduced modulo one more than the maximum value representable
in the result type. If E1 has a signed type and nonnegative value, and
E1 × 2^E2 is representable in the result type, then that is the resulting
value; otherwise, the behavior is undefined.
For historic purposes, let's keep the test in place (although it is doubtful
we actually need it) but rewrite it in a way that prevents compilers from
this century from doing whacky things with it.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19580 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit b331b99fae1298232cc4ab1e4bfedf79935fe2e6)
|
|
Change-Id: I74cda7c0dbb679631e923caaf11f2a7bf421ef98
|
|
Change-Id: I7427f32b145162f16b9bae11bc51f1a56f1933aa
|
|
Change-Id: I463bbf4c7bbeb0b2c8c35baee29d3ab712096255
|
|
After dynamic partition, vbmeta_system and vbemta_vendor partitions
are added. Therefore, partitions with 'vbmeta' prefix should be treated
as vbmeta partition.
This makes libavb avoid locating avb footer from the end of vbmeta_*
partitions. And will not emit the following error message, which could
be confusing even if the following read of vbmeta succeeds from the
beginning of the partition.
Run the following test case will show different results after this
change.
$ ./out/host/linux-x86/nativetest64/libavb_host_unittest/libavb_host_unittest
--gtest_filter=AvbSlotVerifyTest.HashDescriptorInOtherVBMetaPartition
Before this change
-------------------------------------------------------------------------------
[ RUN ] AvbSlotVerifyTest.HashDescriptorInOtherVBMetaPartition
avb_slot_verify.c:678: DEBUG: Loading vbmeta struct from partition 'vbmeta'.
avb_footer.c:41: ERROR: Footer magic is incorrect.
avb_slot_verify.c:650: DEBUG: vbmeta_google: No footer detected.
avb_slot_verify.c:678: DEBUG: Loading vbmeta struct from partition
'vbmeta_google'.
[ OK ] AvbSlotVerifyTest.HashDescriptorInOtherVBMetaPartition (960 ms)
After this change
-------------------------------------------------------------------------------
[ RUN ] AvbSlotVerifyTest.HashDescriptorInOtherVBMetaPartition
avb_slot_verify.c:683: DEBUG: Loading vbmeta struct from partition 'vbmeta'.
avb_slot_verify.c:683: DEBUG: Loading vbmeta struct from partition 'vbmeta_google'.
[ OK ] AvbSlotVerifyTest.HashDescriptorInOtherVBMetaPartition (961ms)
Bug: b/134989217
Test: device launch, verify vbmeta, vbmeta_system, vbmeta_vendor.
Test: m libavb_host_unittest -j8 && \
./out/host/linux-x86/nativetest64/libavb_host_unittest/libavb_host_unittest
Change-Id: Ib0c2cd56197508fef8c12985e8cc0cd79469556c
|
|
|
|
|
|
abl objects are completely removed/cleaned for every compilation.
Do no clean abl compiled objects as it increases the time for
incremental build with or without any changes.
Change-Id: I3416c2d491ac8b5f1cbc6709fd2a6a7f8f8d57b4
|
|
Add getvar variable to query the status of the parallel download flash
in the fastboot mode.
Change-Id: If4082474cee4444574c233ca1d7f6931b8af9084
|
|
Fix the check for Update Rollback syscall returned
from TZ.
Change-Id: I2ed86277b2f150a569c4425f65cacc756470f77d
|
|
|
|
|
|
|
|
GetFastbootDeviceData"
|
|
Add max row check when chosening the font scale factor. Base on the
max support row and the character number per line to chosen the best
font scale factor.
Change-Id: I261782574826cf487c0bdbeb66bd6364f8793c3b
|
|
Add NOTICE files to add license's as the code is taken
from other repository and adding to bootloader code.
Change-Id: If5e755b279af5a929e64a57d4f28c927a4fc18d4
|
|
When AVB_VBMETA_IMAGE_FLAGS_VERIFICATION_DISABLED is set,
AvbSlotVerifyData->cmdline should be a NUL-terminated string instead of
NULL.
Bug: 119551429
Test: atest libavb_host_unittest
Git-repo: https://source.codeaurora.org/quic/la/platform/external/avb
Git-Commit: 9ba3b6613b4e5130fa01a11d984c6b5f0eb3af05
Change-Id: If9cc5feb4f59b0f6b73b577fbff84bb34e514304
|
|
On devices with dynamic partitions, 'system' partition might not exist.
Therefore, we should not add root=$(ANDROID_SYSTEM_PARTUUID) in kernel
cmdline and resolve it for devices without system partition.
Bug: 119551429
Test: m libavb_host_unittest &&
../../out/host/linux-x86/nativetest64/libavb_host_unittest/libavb_host_unittest
Git-repo: https://source.codeaurora.org/quic/la/platform/external/avb
Git-Commit: 5abd6bc2578968d24406d834471adfd995a0c2e9
Change-Id: I767fb1b18182663d8401cf0e8d19930d45c4b83a
|
|
|
|
|
|
Set the number of CPUs present in the target.
Change-Id: I4640dddee68d90f298c836b86f9d6f2cfca15b71
Signed-off-by: Saranya Chidura <schidura@codeaurora.org>
|
|
Fixed markings issue
Change-Id: I71157ccc5d34251c577e08876b6e9ce062edb08d
|
|
For eMMC device, it will be treated as UFS device if the parameter
is got from PC is not correct that will cause the GPT partition update
fail.
Change-Id: I8b2d0757be2646b2e0c8611efb9aae28b33a9e03
|
|
|
|
|
|
|
|
Add new nodes device tree nodes to the table.
Change-Id: I2d7ce33957a2220388cdc0e16b3b7f9732a8aa68
|
|
Move updating of partial nodes inside update device tree.
Search for nodes only if it is defective.
Add support for adding a property to disable defective node.
Change-Id: Ic9a7d5c6bb43395a2739aebb2259bcdff5db4acf
|
|
There are many recursive functions in FdtLib and LibUfdt,
if the stack size of abl is too small, it maybe cause the
thread pointer corrupted.
Change-Id: Iee5c9774df453c66f44bb465566100fdb1c04e3a
|
|
Update chip info header files to be in sync with uefi.
Change-Id: I77fa41df35d92e23567eb820c68288dd66c87a04
|
|
|
|
|
|
Bootimage header version v2 changes the way dtb's are appended. Boot
image with header version v2 will not have kernel Image appended dtb but
it is added to boot.img at an offset. It requires a new version to
maintain backward compatibility of images.
Change-Id: I8be2f4fe881180eaf7e60f998ed389a72f3a3b1c
|
|
Removing an extra space in the string which adds DtboIdx to the CmdLine
Change-Id: I9e38aa8b6cfbe1ba118a4e8e095bda00040b7ec9
|
|
In getddrinfo function ddr type is getting updated even after call has failed.
This is unnecessary remove it.
Change-Id: I06ef8d1d1aec247b57b6a9cefcb9c4cccb9672cf
|
|
Right now memory node for granule is queried before querying the hardware.
This is not required if hardware doesn't supports it and is expensive operation.
Move it so that it is queried only if hardware support is present.
Change-Id: I02cf31f2894f1609a6a23f4b652d76859bc339ad
|
|
|
|
|
|
|
|
Read the value of boot security patch containing
date information, from the property com.android.
build.boot.security_patch in vbmeta data and send
it to keymaster TA. This new patch value contains
date information as well. If the property is not
defined or keymaster TA is not updated, send the
security patch value read from boot image header
as before.
Change-Id: I82e0894a178927e9fa2f884896fbaf14724e4f13
|
|
Update rollback version using new TZ syscall when
one of the slots has a higher image version.
Change-Id: I0cff3771f932e4af7d965501fbd25eb7b91a308f
|
|
There is stack smashing issue when return the whole structure in
GetFastbootDeviceData. Return pointer instead of the whole structure
to make compiler easy refer to stack usage.
Change-Id: Ia4893e8b2a712fa340afdc85772876a390f2e3dd
|
|
To support dynamic partition, disable firmware entries in fstab nodes.
Partitions will be mounted as part of super partition.
Change-Id: Iffc22005c2b7d8b64bf10687049a720bd891b59c
|