The variable "s" is passed as NULL(i.e 0) When g_dnl_set_serialnumber()
is called from hdelete_r() originally.
The memory 0~1M is secure for ATF on rockchip arm64 platforms,
so the strncpy() accesses 0 address and causes a data-abort.
This issue occurs on deleting env "serial#".
Change-Id: Idbf76d26809ab8b195ff4f8193e2eeac99692289
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Some SoC may missing this config, this is need by all the SoC, so set it
at higher level.
Change-Id: I16e935635cce61d02d6641992483baf98f9fe71b
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Because the UART2 IOs are mux with SDcard, in order to use SDCard,
we need to use UART5(on evb RPi connector) instead of UART2M0
Change-Id: Ibeab51636eb748f389d9211193c0b5682c266c9e
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Regulator uclass takes over this job, avoid to init twice.
Change-Id: Idea56143bd7008742936d3bbe1ebadb00c683a47
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Need to pass androidboot.force_normal_boot=1 instead of
skip_initramfs when A/B supporting dynamic partition.
Change-Id: I1748690d04d4ef16e121d8dc88f69745a3cbb77d
Signed-off-by: Dayao Ji <jdy@rock-chips.com>
According to rkcommon.h, when back to bootrom from ddr
initializing, the next payload size is defined RK_MAX_BOOT_SIZE,
which is 512KB.
So we disable some cmd module here.
Current u-boot-dtb.bin is 508KB.
Change-Id: I1ff97907c19fd33f428627a6de66ec790514599a
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
sync from linux kernel develop-3.10:
"ARM: dts: rk1108: increase sdmmc's drive strength to 8ma"
(sha1: 90ac5cb61aabf2e344c10b4c55954d6a3f41bd55)
Change-Id: Ifd38ced2b0a9cada25e9348f455454c9edbc7bd8
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Rockchip platforms defines BCB message at the 16KB offset of
misc partition while the Google defines it at 0x0 offset.
From Android-Q, the 0x0 offset is mandary on Google VTS, so this
patch is a compatibility according to android image 'os_version'.
Android os version >= 10 is at 0x0 offset, otherwise at 16KB offset.
Change-Id: I54a7674e2dc2e0c29fc624f17b4453663c9ea462
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Rockchip platforms defines BCB message at the 16KB offset of
misc partition while the Google defines it at 0x0 offset.
From Android-Q, the 0x0 offset is mandary on Google VTS.
Change-Id: Iac36d421ed605684353c30bfe0e9982bdd5de065
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
- Add "reboot" command as alias of "reset";
- Support command like: reboot loader/bootloader/recovery, etc.
Change-Id: I9748664aeca052a775a3f88f7fdf9b3923941026
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Support command like: reboot loader/bootloader/recovery, etc.
It depends on the node whose compatible is "syscon-reboot-mode".
Change-Id: I3ef497c6a4355a0d8be9a277bd77bbee43df57fb
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Merge all codes into resource_tool.c
Sync from kernel-4.4:
(0787850 rk: scripts/resource_tool: add sha1 for file entry)
Change-Id: Iff379458086f1623e7e5126dcb532b178d94c684
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Use the same SPL_STACK_R_ADDR in Kconfig instead of each board config;
default to 0x4000000(64MB) instead of 0x80000(512KB) for this address
can support all the SoCs including those may have only 64MB memory, and
also reserve enough space for atf, kernel(in falcon mode) loading.
After the ATF entry move to 0x40000, the stack from 0x80000 may be override
when loading ATF bl31.
Change-Id: I9bb524ee0762e908bd390393168f30ca197e2a52
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
We are using DRAM offset 0~0x40000 as SPL text size, Note that BSS,
STACK and MALLOC may using separate space.
Change-Id: I1d9128b339140569e427fad44dc0a2f3058deaf0
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Remove CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x50000 and it will default to
0. No need to reserve the space for we move the bl31 entry to 0x40000
and limit the size of SPL at 0~0x40000.
Change-Id: I39a69f2ee03a93b4556cc29ab41f62c344f28a02
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Remove CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x50000 and it will default to
0. No need to reserve the space for we move the bl31 entry to 0x40000
and limit the size of SPL at 0~0x40000.
Change-Id: I76385fcb3524eb16c19c3006c59954edc2f3531e
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Remove CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x50000 and it will default to
0. No need to reserve the space for we move the bl31 entry to 0x40000
and limit the size of SPL at 0~0x40000.
Change-Id: Iff502eec2a38bfe112b5cadc22d772fded39c4ed
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Make sure there is enough memory when more nodes are
enabled in u-boot.dtb.
Change-Id: Ieb204daa41c04035b86064962569b08152375124
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
So that we can add "u-boot,dm-pre-reloc" to node "sdmmc_pin"
in rk3308-u-boot.dtsi to control the sdmmc iomux in spl.
Change-Id: I867927c37dd20f1b586a62676a195dbf52dca44d
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Let's rk3368-px5-evb-u-boot.dtsi include rk3368-u-boot.dtsi.
Note: px5 evb use uart4 as debug console.
Change-Id: Icca1fe00f95fb956abd41d34202af380b18f3c34
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This issue happens on the SDK version < 8.1. The reason is we don't
read enough blocks from storage for kernel compressed type validation.
ANDROID_ROCKCHIP_LEGACY_PAGE_SIZE(16KB) is defined by rockchip legacy
mkboot tool(SDK version < 8.1) and larger than Google defined.
To compatible this, we malloc enough buffer but only read android
header and kernel image(1 block) from storage.
Change-Id: I9800e4150985adcd5dbd78c28c471604eb403eae
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Fixed-regulator maybe the first device probed by regulators_enable_boot_on(),
its failure ends up the other regulator traverse(e.g. PMIC regulator), we hope
to get this information.
Change-Id: I2f1f67232dbb8a1b72dc8dfec75f1f6414b2abb9
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
The uc_pdata->name is from property "regulator-name" which
is more accuracy to descript this regulator.
Change-Id: I813604ff528b757a1f9b9191dbdd4472f838a367
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This is important and necessary for U-disk firmware upgrade to
avoid loading the bad kernel dtb to init USB driver.
Also helpful for normal boot.
Change-Id: I81629991547ccb2930312278295e9737f4827945
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
At this moment, we just load file entries but not really load file.
Change-Id: I550e6bd90bcdf81f866c0d5f5c6b71faa0ecde19
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Only a few developers need this feature, disable it by default.
Change-Id: I074594c8e47c34a05324e363d11613383f3528a7
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
The mode AVB_HASHTREE_ERROR_MODE_RESTART_AND_INVALIDATE will add
"androidboot.vbmeta.invalidate_on_error=yes" to cmdline, and kernel
will invalidate vbmeta if verified fail. This will modify the vbmeta.img
head and make uboot verify vbmeta.img fail in avb system. And in avb & ab
system, we can use the retry-count to change slot if verify fail without
modify the vbmeta. So just use the mode AVB_HASHTREE_ERROR_MODE_RESTART.
Change-Id: I98d60683d5365b996fcca2e85d4847d4a6df2ef6
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
- the partition disk layer takes over the responsibility of slot suffix
appending, we remove relative code to make file clean;
- put android a/b code together and name them to be eary understood,
this makes file esay to read.
Change-Id: Id8c838da682ce6098bd7192d7d7c64269f4e86ba
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
The partition disk layer takes over the responsibility of
slot suffix appending.
Change-Id: Ia02f5b8635676d49ec60eec7d3930740f2ba5ee4
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>