11 Apr, 2016
2 commits
-
Partition name change from slotmeta to misc.
Read/write raw data on partition misc, not use ext4 file system.Store meta in bootloader_message.slot_suffix, as defined in
bootable/recovery/bootloader.hThe first 4 bytes of boot_ctl are defined as magic number.
Also, modify code to remove warning in drivers/usb/gadget/bootctrl.c
warning: implicit declaration of function 'do_read'Signed-off-by: fang hui
-
brillo need bootlader support boot control.
bootlader can choose which slot(partition) to boot based on
it's tactic.
The commit support boot control for evk6ulSigned-off-by: fang hui
04 Mar, 2016
17 commits
-
When using ft_system_setup, the return value fdt_ret is not assigned,
so the fdt_strerror(fdt_ret) uses a uninitialized value.Signed-off-by: Ye Li
-
The fdt command "fdt systemsetup" can't work because the do_fdt check the
start char 's' for command "fdt set". So the fdt systemsetup will also go into
the "fdt set" in fault. Fix this problem by checking the whole word "set" for
"fdt set" command.Signed-off-by: Ye Li
-
We support max 16 endpoints, but endpoint starts from 0.
So we need to use >= 16 but not > 16 to check whether we
already reach max endpoints or not.Coverity ID 17955:
Out-of-bounds read (OVERRUN)
37. overrun-local: Overrunning array dev->config.if_desc[ifno].ep_desc of 16
9-byte elements at element index 16 (byte offset 144) using index epno
(which evaluates to 16).Signed-off-by: Peng Fan
-
We should use ARRAY_SIZE, but not directly sizeof, otherwise
we may access memory that is not belong the array env_flags_varaccess_mask.Coverity ID: 17949
Signed-off-by: Peng Fan
-
Report Coverity log:
Destination buffer too small (STRING_OVERFLOW)
string_overflow: You might overrun the 1024 byte destination string
lastcommand by writing 1025 bytes from console_bufferSigned-off-by: Peng Fan
-
Reported by coverity ID: 17900 17902
Using uninitialized value e. Field e.flags is uninitialized when calling hsearch_rSigned-off-by: Peng Fan
-
Before calling hsearch_r, initialize callback entry to NULL.
Coverity log:
"
Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value e.
Field e.callback is uninitialized when calling hsearch_r.
"Reported-by: Coverity
Signed-off-by: Peng Fan
Cc: Tom Rini
Cc: Simon Glass
(cherry picked from commit 5a6894397a657edec5d0cf4e20968cc66a368c51) -
Use snprintf to replace sprintf.
Coverity log:
"
Unbounded source buffer (STRING_SIZE)
string_size: Passing string init_val of unknown size to sprintf.
"Reported-by: Coverity
Signed-off-by: Peng Fan
Cc: Tom Rini
Cc: Simon Glass
Reviewed-by: Joe Hershberger
(cherry picked from commit 5d49b4cdf9417b88476567c8ec78ff185d84b10f) -
Whether CONFIG_SYS_HUSH_PARSER is defined or not, should always
check to free 'buff' to avoid memory leak.Signed-off-by: Peng Fan
Cc: Tom Rini
Cc: Masahiro Yamada
Cc: Simon Glass
(cherry picked from commit 09a788624dbe32aeeb0d74c97c0965303eb96d8c) -
Need to free memory avoid memory leak, when error.
Signed-off-by: Peng Fan
Reviewed-by: Simon Glass
Cc: Simon Glass
Cc: Tom Rini
(cherry picked from commit c6bb23c819b5dcbc5c3491673f5e408c0b9c38b3) -
The following code will alloc memory for new_dev and ldev:
"
new_dev = mdio_alloc();
ldev = malloc(sizeof(*ldev));
"
Either new_dev or ldev is NULL, directly return, but this may leak memory.
So before return, using free(ldev) and mdio_free(new_dev) to avoid
leaking memory, also free can handle NULL pointer.Signed-off-by: Peng Fan
Cc: Joe Hershberger
Cc: Simon Glass
Cc: Bin Meng
Reviewed-by: Bin Meng
Acked-by: Joe Hershberger
(cherry picked from commit 746da1bd42aa5ecc47898399514c9c76d0329706) -
"enable" is unsigned char type and its value will not be
negative, so discard "enable < 0".Signed-off-by: Peng Fan
Cc: Diego Santa Cruz
Cc: Pantelis Antoniou
Cc: Andrew Gabbasov
Cc: Simon Glass
Cc: Stefano Babic
Cc: Tom Rini
Reviewed-by: Simon Glass
(cherry picked from commit 678e9316d48f78d162f705846b6f6eeab4aa5dd0) -
The entry name of mii_dev is an array not pointer, so
no need to check.Signed-off-by: Peng Fan
Cc: Joe Hershberger
Cc: Simon Glass
Cc: Bin Meng
Reviewed-by: Simon Glass
Acked-by: Joe Hershberger
Reviewed-by: Bin Meng
(cherry picked from commit d39449b110c8da47bf5b8dc372bd5cd1c33a1a67) -
If condition of "(load == image_start || load == image_data)" is true,
should use "fdt_addr = load;", but not "fdt_blob = (char *)image_data;",
or fdt_blob will be overridden by "fdt_blob = map_sysmem(fdt_addr, 0);"
at the end of the switch case.Signed-off-by: Peng Fan
Cc: Simon Glass
Cc: Joe Hershberger
Cc: Max Krummenacher
Cc: Marek Vasut
Cc: Suriyan Ramasami
Cc: Paul Kocialkowski
Cc: Tom Rini
Reviewed-by: Simon Glass
(cherry picked from commit 2ea47be02f356ff275fa5c50392ea510ddb4a96c) -
Condition "(value == NULL && ++value == NULL)" actully will
always return false.Instead, use condition "(value == NULL || *(value + 1) == 0)" to detect
such expression "c=". To "c=", *(value + 1) is 0, so directly return -1,
but not continue.Signed-off-by: Peng Fan
Cc: Rabin Vincent
Cc: Simon Glass
Cc: Tom Rini
Reviewed-by: Simon Glass
(cherry picked from commit aa722529635c16c52d9d609122fecc96ec8d03e4) -
Currently there is no API to uninitialize mdio. Add two APIs for this.
Signed-off-by: Bin Meng
Acked-by: Joe Hershberger
(cherry picked from commit cb6baca77bca0ef999203a7ed73bd123e7da062e) -
This reverts commit 24356fe059abbc9eae1b192f7af8a46f204a36f4.
Conflicts:
common/image-android.cConflicts:
common/image-android.c
06 Nov, 2015
1 commit
-
The ota update script will set selinux label with set_metadata when do nand ota update.
The root cause is set_metadata will fail if disable selinux in recovery mode.
This patch is a workaround which will enable selinux in recovery mode,
even if have disable selinux in commandline.Signed-off-by: zhang sanshan
13 Aug, 2015
1 commit
-
…change it to other values(sabresd dq and auto 6qp 0812 daily build)
Correct the bootargs which is printed.
It should be newbootargs rather than bootimage's bootargs.Signed-off-by: zhang sanshan <b51434@freescale.com>
28 Jul, 2015
1 commit
-
The bootargs is not set correctly.
The final bootargs consist of uboot's bootargs and bootimg's bootargs.
This patch set bootimg's bootargs as final bootargs if uboot's bootargs is not set.
And take uboot's bootargs as final bootargs if uboot's bootargs is set.Signed-off-by: zhang sanshan
14 Jul, 2015
1 commit
-
For USB boot, eg, mfgtool programming case, some laptops/pcs
may not work properly if the board do not disconnect until
linux kernel usb driver initialization process, finishes the
ROM code connection at u-boot can fix this problem, and this
was the original work flow when mfgtool flow was introduced at
u-boot.Tested-by: Spring Zhang
Tested-by: Zhang Sanshan
Signed-off-by: Peter Chen
13 Jul, 2015
1 commit
-
1. Replace the UDC driver with community's USB gadget d_dnl driver.
2. Integrate the FSL SD/SATA/NAND flash operations, since the GPT and
EFI partitions are not support by i.MX.
3. Add FDT support to community's android image.
4. Change the booti command to boota, due to the booti has been used for
ARM64 image boot.
5. Modify boota implementation to load ramdisk and fdt to their loading
addresses specified in boot.img header, while bootm won't do it for
android image.
6. Modify the android image HAB implementation. Authenticate the boot.img
on the "load_addr" for both SD and NAND.
7. Enable new configuration CONFIG_FSL_FASTBOOT for Freescale's fastboot
with relevant header file "fsl_fastboot.h". While disabling the
configuration, the community fastboot is used.
8. Use community's way to combine cmdline in boot.img and u-boot environment,
not overwrite the cmdline in boot.imgSigned-off-by: Ye.Li
01 Jul, 2015
1 commit
-
Fix build warning:
common/lcd.c: In function 'lcd_clear':
common/lcd.c:166:6: warning: variable 'bg_color' set but not used [-Wunused-but-set-variable]
int bg_color;
^
common/lcd.c: In function 'lcd_setmem':
common/lcd.c:296:2: warning: format '%d' expects argument of type 'int', but argument 2 has type 'u_long' [-Wformat=]
debug("LCD panel info: %d x %d, %d bit/pix\n", panel_info.vl_col,
^
common/lcd.c:296:2: warning: format '%d' expects argument of type 'int', but argument 3 has type 'u_long' [-Wformat=]Signed-off-by: Peng Fan
29 Apr, 2015
11 commits
-
Remove the authentication size to be a fixed size, due to
recovery.img may be much bigger than the boot.img
Add signature size to boot or recovery image size, which is
added by boot_signer in android build processSigned-off-by: guoyin.chen
(cherry picked from commit d59b24fefcd56d085c4010643ca9f6522a3cc58a) -
boot.img includes kernel image, ramdisk img, dtb, and bootargs.
All are critical for android security. Protect the whole boot.img
with HAB.Signed-off-by: guoyin.chen
(cherry picked from commit 8a49e53c5b518677b46cada5df153306161f29ac) -
Add udc and fastboot support
We did not use the upstream way.
Currently use CI_UDC and USB_GAGDET of upstream can make fastboot work,
but lack of flash operation, so we still use our way.Signed-off-by: Peng Fan
Signed-off-by: Nitin Garg
Signed-off-by: Ye.Li -
LCD_MONOCHROME is removed in commit f4469f50b0367820121ef2d313517d422ed70e1d.
Add related code back to support epdc.
In this patch, also include crm_regs.h in mx6slevk.c to make epdc code
be compiled ok.COLOR_MASK is also added from commit a7de2953f51e70754190d3516167d58d27d17219
Signed-off-by: Peng Fan
-
Add SECURE BOOT in bootm
Signed-off-by: Peng Fan
-
Since the zImage is used at default, add the HAB image authentication
support in bootz to authenticate zImage.Signed-off-by: Ye.Li
(cherry picked from commit 591100eec569dd1d54f61e9f49fe995f56a021eb)
Signed-off-by: Peng Fan -
Add sata command
Signed-off-by: Peng Fan
-
This patch add the support to load/save env to the slot which
was used as the boot media by dynamic detection.Signed-off-by: Jason Liu
Signed-off-by: Ye.Li
Signed-off-by: Peng Fan -
If boot from usb, reset environment to default value.
Auto apply mfgtools setting and boot mfgtools kernel.Signed-off-by: Frank Li
Signed-off-by: Nitin Garg
Signed-off-by: Peng FanSigned-off-by: Peng Fan
-
Add new function "arch_auxiliary_core_check_up" to check whether M4
is already up. Therefore, avoid starting M4 again when it is running.Signed-off-by: Ye.Li
(cherry picked from commit 54a0803b29c5ab459bedfb2c68c1e94b89866aa1)
Signed-off-by: Peng Fan -
To boot a auxiliary core in asymmetric multicore system, introduce the
new command "bootaux" to do it.Example of boot auxliary core from 0x70000000 where stores the boot head
information that should be parsed by each core.
"bootaux 0x70000000"Signed-off-by: Ye.Li
(cherry picked from commit fd00c322d058e02953a336517547174edaf2c573)
Signed-off-by: Peng Fan
10 Apr, 2015
4 commits
-
The ARM reference designs all use a special flash image format
that stores a footer (two versions exist) at the end of the last
erase block of the image in flash memory.Version one of the footer is indicated by the magic number
0xA0FFFF9F at 12 bytes before the end of the flash block and
version two is indicated by the magic number 0x464F4F54 0x464C5348
(ASCII for "FLSHFOOT") in the very last 8 bytes of the erase block.This command driver implements support for both versions of the
AFS images (the name comes from the Linux driver in drivers/mtd/afs.c)
and makes it possible to list images and load an image by name into
the memory with these commands:afs - lists flash contents
afs load - loads image to address indicated in the image
afs load - loads image to a specified addressThis image scheme is used on the ARM Integrator family, ARM
Versatile family, ARM RealView family (not yet supported in U-Boot)
and ARM Versatile Express family up to and including the new
Juno board for 64 bit development.Reviewed-by: Tom Rini
Signed-off-by: Linus Walleij -
The ubi check command is expected to not fail and just check whether
a volume exist or not. Currently, when a volume does not exist, the
command fails which leads to an error:
"exit not allowed from main input shell."Use 1 to indicate that a volume does not exist. This allows to use
ubi check in an if statement, e.g.
if ubi check rootfs; then; echo "exists"; else; echo "not there"; fi -
introduce CONFIG_SPL_PANIC_ON_RAW_IMAGE.
An SPL which define this will panic() if the
image it has loaded does not have a mkimage
signature.Signed-off-by: Albert ARIBAUD (3ADEV)