AgeCommit message (Collapse)AuthorFilesLines
2022-05-28squash! ODROID-COMMON: add new git submodule to download 'rkbin/*'odroidm1-v2017.09Dongjin Kim1-1/+1
Fix to use Github URL of '/rkbin'"
2022-04-24ODROID-M1: disk/efi: suppress GPT error if disk is not EFI partitionDongjin Kim1-10/+10
Change-Id: I3434af54aafa6814e7a792e5e9a5554aa04f68a9 Signed-off-by: Dongjin Kim <>
2022-04-24ODROID-M1: Change configs for display subsystemDongjin Kim1-5/+11
Signed-off-by: Dongjin Kim <> Change-Id: Ic0bf78193e724af166ed6c1d16abf9165d2f8cee
2022-04-24ODROID-M1: add DSI lcd panel for 'ODROID-Vu8M'Dongjin Kim1-0/+1
Signed-off-by: Dongjin Kim <> Change-Id: I0115b2b88333e9ba6a8bd97daa5b48a0a6a0eeea
2022-04-24ODROID-M1: load 'panel' environment value for DSI displayDongjin Kim1-2/+38
The value of 'panel' stores a device tree overlay file for a DSI panel, so load it and apply to a kernel device tree. Signed-off-by: Dongjin Kim <> Change-Id: I2020f7048a2bdd38da5cfa472dc11acb1bca2c66
2022-04-22ODROID-M1: load environment from SPI flash at very earlyDongjin Kim1-6/+11
In order to use an environment value at early stage in U-Boot procedure, specifically earlier than a kernel device tree blob is proceed, the environment value must be loaded and imported. Signed-off-by: Dongjin Kim <> Change-Id: I147b2b37f3d1706e22a27083549eff7a8815064e
2022-04-22ODROID-M1: Revert "gpt: return 1 directly when test the mbr sector"Dongjin Kim1-17/+1
This reverts commit 3bdef7e642ae558d0e61ce26438d10b55b26ec9c. This commit blocks to boot from SD card, since it won't check it partition type properly and treats it's always EFI partition type. Change-Id: Ic5ae4fe70fdd61addc5cd8dfdb782928535fabea Signed-off-by: Dongjin Kim <>
2022-04-13ODROID-M1: fix add 'variant' env variable as 'm1'Dongjin Kim1-0/+1
Currently, we have only ODROID-M1 based on RK3568 so use "m1" and change it for others if we have more variant models. Signed-off-by: Dongjin Kim <> Change-Id: I4acacc1d7d6364bade8787de3097d0d270a5e7e3
2022-03-05ODROID-M1: add to load boot splash image from MMCDongjin Kim1-10/+34
A default boot splash image can be stored in a partition of SPI flash memory, but maybe good to load from MMC for testing or larger splash image than the partition size in SPI flash memory. Signed-off-by: Dongjin Kim <> Change-Id: If17010d550be48a72b449cd11e9c5c71a27ae217
2022-03-04ODROID-M1: add to initiate SPI flash memory on bootingDongjin Kim3-2/+33
This patch is to intiate SPI flash memory with default bus and cs on booting, this is only necessary when U-Boot blob is loaded from MMC device. Signed-off-by: Dongjin Kim <> Change-Id: I430ad1d9669329abf4e9acaf4dd2c81fce4b5530
2022-03-04ODROID-M1: reorder boot devices (eMMC -> SD -> SPI)Dongjin Kim1-1/+1
This patch is to load U-Boot blob from eMMC or SD card when it has a partition named 'uboot', this helps to use custom U-Boot blob or debug it rather than load from or reflash SPI flash memory. Signed-off-by: Dongjin Kim <> Change-Id: I934cd139146eb9226ad2e757be8dde4ab38212be
2022-03-04ODROID-M1: add to read 'ODROIDBIOS.BIN' when booted from SD CardDongjin Kim1-9/+23
Signed-off-by: Dongjin Kim <> Change-Id: I2d640db0e6de2efbf78289c486c0d9380164e621
2022-01-27ODROID-M1: add not to apply display fixupDongjin Kim1-0/+6
When a device tree have a bool property 'disable-vop2-fixup', U-Boot wont' apply a device tree fixup for a display device. chosen { disable-vop2-fixup; ... }; Signed-off-by: Dongjin Kim <> Change-Id: I728b6b45799e5ca690693fa074df8fea1f9f65c2
2022-01-03ODROID-M1: remove to use vendor partition feature from RockchipDongjin Kim2-2/+7
ODROID-M1 does not use Rockchip's vendor partition. Signed-off-by: Dongjin Kim <> Change-Id: Ica3ec5a945a4ecb7f9b640de55eb370402875526
2021-12-30ODROID-COMMON: Revert "board_r: skip mmc init when CONFIG_USING_KERNEL_DTB ↵Dongjin Kim1-5/+0
is enabled" This reverts commit 123c920622cc462fd3a11abea7b9647b03f48497. This commit is to initiated MMC hardwares when the kernel device tree is loaded, MMC is not initiated when booting from SPI flash memory. Change-Id: I3a37644e89a57a1ed96579f7626ebd9e14f0f3f4
2021-12-30ODROID-COMMON: Revert "driver: core: reject all mmc device from kernel"Dongjin Kim2-14/+0
This reverts commit 33273e09fd8c70f30afe5da51578283c35910fd7. This patch is to use MMC device from kernel device tree rather than U-Boot. After device tree for kernel is loaded, the phandle of the pin controls for MMC refers to U-Boot one and failed to initiated them when booting from SPI flash memory. Change-Id: I3fb82ac64bd8942da6da12f90c7d83f82bfc9644
2021-12-30ODROID-M1: improve loading splash imageDongjin Kim1-7/+20
Signed-off-by: Dongjin Kim <> Change-Id: I5917556711cf2d0761567d6ced91992f9759a1d5
2021-12-30ODROID-M1: fix incorrect SPI flash accessDongjin Kim3-2/+10
After applying the device tree from Kernel, not built-in one, SPI flash memory is mapped to different bus and this causes to access environmemnt in SPI flash memory due to failure creating MTD device. Change-Id: Ie6047b288093357f09e39fa01c2c02a61d75fe4b
2021-12-30ODROID-COMMON: Revert "rockchip: board: implement board_fdt_chosen_bootargs()"Joseph Chen1-89/+0
This reverts commit d87d52756a1f979d3d3d5ddeba9e873f2889dd6b. This patch is to use the unchanged 'bootargs' from U-Boot environment to the device tree, since Rockchip's patch replaces or merges with something else with given sources. Change-Id: I70187f1112c87867d0eb306920346f35d6e966f4
2021-12-30ODROID-M1: add to load default splash imageDongjin Kim3-0/+108
This patch is to load the default splash image from a dedicated partition in SPI flash memory and use it for a default U-Boot logo image after putting into resource pool. Change-Id: I640b9db5c841ef5dfbb73e72590342b20de4a691 Signed-off-by: Dongjin Kim <>
2021-12-30ODROID-M1: add new board Hardkernel ODROID-M1 based on RK3568Dongjin Kim9-1/+1843
Signed-off-by: Dongjin Kim <> Change-Id: Idfa765d9dfd6943cf2704844d5153d0363b174a0
2021-12-30ODROID-COMMON: arch/arm: fix to add missing headerDongjin Kim1-0/+1
Fix to add missing header file for Android image when booting from SPI device. FIX to "[57504d998f rockchip: spl: support get boot mode]" Change-Id: I84abef71b5f797ce9e994e350df9c37a0dcfee7d
2021-12-30ODROID-COMMON: drivers/mmc: Add support eMMC H/W resetckkim1-0/+29
If emmc rst_n function is not enabled, must execute this command in the u-boot shell. => mmc rst-function 0 1 Signed-off-by: ckkim <> Change-Id: I21a6ac376032cc2b7b699c889bc78d8f58301488
2021-12-11ODROID-COMMON: distro_bootcmd: Removed bootable args.Luke Go1-1/+1
- The odroid placed boot.scr file to the fat fs partition. But -bootable argument doesn't count this. So fat partition can't work with this args. So Removed this option to use distro_bootcmd. Change-Id: Ia42abbe62dc59687ddccacb9c25c6892f92a360c Signed-off-by: Luke Go <>
2021-12-11ODROID-COMMON: cmd/bmp: fix in the function 'gunzip_bmp'Dongjin Kim1-1/+2
This patch is to resolve two issues: 1) Compile error cmd/bmp.c: In function ‘gunzip_bmp’: cmd/bmp.c:61:31: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] bmp = (struct bmp_image *)((((unsigned int)dst + 1) & ~3) + 2); ^ cmd/bmp.c:61:8: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] bmp = (struct bmp_image *)((((unsigned int)dst + 1) & ~3) + 2); ^ 2) Return lenght of decompressed buffer to given arguemnt 'lenp' when decompression is success. Signed-off-by: Dongjin Kim <> Change-Id: I485ab72186f7130997fb6d0793c3b805efaa8b17
2021-12-11ODROID-COMMON: Changed the dtb load method.Luke Go1-0/+3
- The rockchip load dtb file from resource image. but the odroid board load dtb file from the other methods like loading from dtb partition. - So Avoid rockchip's loading method. Before loading rockchip's resource image, check fdt header and avoid it. Change-Id: I2072b2a70939772c06e0319ccd07a21c89c73cce Signed-off-by: Luke Go <>
2021-12-11ODROID-COMMON: include: android_bootloader_message.h: Minimize the diff to AOSPEugeniu Rosca1-37/+114
Perform the following updates: - Relocate the commit id from the file to the description of U-Boot commit. The AOSP commit is c784ce50e8c10eaf70e1f97e24e8324aef45faf5. This is done to avoid stale references in the file itself. The reasoning is in - Minimize the diff to AOSP, to decrease the effort of the next AOSP backports. The background can be found in: - Guard the static_assert() calls by #ifndef __UBOOT__ ... #endif, to avoid compilation failures of files including the header. Signed-off-by: Eugeniu Rosca <> Reviewed-by: Sam Protsenko <> Reviewed-by: Simon Glass <> Change-Id: I48de5bc6d3c44fa27d7874ea60c5bdced3acce84
2021-12-11ODROID-COMMON: renamed and replaced android_bootloader msg stuffs.Luke go7-49/+37
- Rockchip used their's bootloader_message structures instead of original bootloader_message structures. This commit replaced it to original stuffs. Change-Id: I094622d4866287b6e5de1d2805319eb6fffc5aff
2021-12-11ODROID-COMMON: add setbootdev command.Luke go2-0/+29
- On the rockchip chip, boot device discriptor is fixed on boot time. But ODROID-M1 have to change the boot device discriptor. So add new command to change boot device discriptor, 'setbootdev'. Change-Id: I60065e0e69503c03b32f52de1d2f4ec515e1381f
2021-12-11ODROID-COMMON: cmd: bcb: Apply non-functional refinementsEugeniu Rosca1-21/+22
These have been reported by Simon in [1] and fixed in [2]. However, since [1] has already been pushed to u-boot/master, the improvements incorporated in [2] are now extracted and resubmitted. The changes are in the area of coding style and best practices: * s/field/fieldp/, s/size/sizep/, to convey that the variables return an output to the caller * s/err_1/err_read_fail/, s/err_2/err_too_small/, to be more descriptive * Made sure 'static int do_bcb_load' appears on the same line * Placed a `/*` on top of multi-line comment [1] [2] ("[v4,0/4] Add 'bcb' command to read/modify/write Android BCB") Fixes: db7b7a05b267 ("cmd: Add 'bcb' command to read/modify/write BCB fields") Reported-by: Simon Glass <> Signed-off-by: Eugeniu Rosca <> Reviewed-by: Sam Protsenko <> Change-Id: I400d868ee437eff2773d2328b20adad5034f142f
2021-12-11ODROID-COMMON: cmd: bcb: Use strcmp() instead of strncmp() for string literalsEugeniu Rosca1-11/+11
Quote from ----------8<----------- strncmp() is chosen for the sake of paranoid/defensive programming. Indeed, strncmp() is not really needed when comparing a variable with a string literal. We expect strcmp() to behave safely even if the string variable is not NUL-terminated. In the same scenario, Linux v5.2-rc7 uses both strcmp() and strncmp(), but the frequency of strcmp() is higher: $ git --version git version 2.22.0 $ (Linux 5.2-rc7) git grep -En 'strncmp\([^"]*"[[:alnum:]]+"' | wc -l 1066 $ (Linux 5.2-rc7) git grep -En 'strcmp\([^"]*"[[:alnum:]]+"' | wc -l 1968 A quick "strcmp vs strncmp" object size test shows that strcmp() generates smaller memory footprint (gcc-8, x86_64): $ (U-Boot) size cmd/bcb-strncmp.o cmd/bcb-strcmp.o text data bss dec hex filename 3373 400 2048 5821 16bd cmd/bcb-strncmp.o 3314 400 2048 5762 1682 cmd/bcb-strcmp.o So, overall, I agree to use strcmp() whenever variables are compared with string literals. ----------8<----------- Fixes: db7b7a05b267 ("cmd: Add 'bcb' command to read/modify/write BCB fields") Reported-by: Simon Glass <> Signed-off-by: Eugeniu Rosca <> Reviewed-by: Sam Protsenko <> Reviewed-by: Igor Opaniuk <> Change-Id: Icda2c3e9b01821398f1dc8471d7584bb36e4bedd
2021-12-11ODROID-COMMON: cmd: bcb: Fix duplicated handling in two case-branchesEugeniu Rosca1-3/+0
Fix warning V1037 reported by PVS-Studio Static Analyzer: Two or more case-branches perform the same actions. Check lines: 49, 53 Fixes: db7b7a05b267 ("cmd: Add 'bcb' command to read/modify/write BCB fields") Signed-off-by: Eugeniu Rosca <> Reviewed-by: Igor Opaniuk <> Reviewed-by: Sam Protsenko <> Change-Id: Iccbd0208ac69eb181e8412cbdfb53fb896be7064
2021-12-11ODROID-COMMON: cmd: Add 'bcb' command to read/modify/write BCB fieldsEugeniu Rosca3-0/+358
'Bootloader Control Block' (BCB) is a well established term/acronym in the Android namespace which refers to a location in a dedicated raw (i.e. FS-unaware) flash (e.g. eMMC) partition, usually called "misc", which is used as media for exchanging messages between Android userspace (particularly recovery [1]) and an Android-capable bootloader. On higher level, this allows implementing a subset of Android Bootloader Requirements [2], amongst which is the Android-specific bootloader flow [3]. Regardless how the latter is implemented in U-Boot ([3] being the most memorable example), reading/writing/dumping the BCB fields in the development process from inside the U-Boot is a convenient feature. Hence, make it available to the users. Some usage examples of the new command recorded on R-Car H3ULCB-KF ('>>>' is an overlay on top of the original console output): => bcb bcb - Load/set/clear/test/dump/store Android BCB fields Usage: bcb load <dev> <part> - load BCB from mmc <dev>:<part> bcb set <field> <val> - set BCB <field> to <val> bcb clear [<field>] - clear BCB <field> or all fields bcb test <field> <op> <val> - test BCB <field> against <val> bcb dump <field> - dump BCB <field> bcb store - store BCB back to mmc Legend: <dev> - MMC device index containing the BCB partition <part> - MMC partition index or name containing the BCB <field> - one of {command,status,recovery,stage,reserved} <op> - the binary operator used in 'bcb test': '=' returns true if <val> matches the string stored in <field> '~' returns true if <val> matches a subset of <field>'s string <val> - string/text provided as input to bcb {set,test} NOTE: any ':' character in <val> will be replaced by line feed during 'bcb set' and used as separator by upper layers => bcb dump command Error: Please, load BCB first! >>> Users must specify mmc device and partition before any other call => bcb load 1 misc => bcb load 1 1 >>> The two calls are equivalent (assuming "misc" has index 1) => bcb dump command 00000000: 62 6f 6f 74 6f 6e 63 65 2d 73 68 65 6c 6c 00 72 bootonce-shell.r 00000010: 79 00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 y.r............. >>> The output is in binary/string format for convenience >>> The output size matches the size of inspected BCB field >>> (32 bytes in case of 'command') => bcb test command = bootonce-shell && echo true true => bcb test command = bootonce-shell- && echo true => bcb test command = bootonce-shel && echo true >>> The '=' operator returns 'true' on perfect match => bcb test command ~ bootonce-shel && echo true true => bcb test command ~ bootonce-shell && echo true true >>> The '~' operator returns 'true' on substring match => bcb set command recovery => bcb dump command 00000000: 72 65 63 6f 76 65 72 79 00 73 68 65 6c 6c 00 72 00000010: 79 00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 y.r............. >>> The new value is NULL-terminated and stored in the BCB field => bcb set recovery "msg1:msg2:msg3" => bcb dump recovery 00000040: 6d 73 67 31 0a 6d 73 67 32 0a 6d 73 67 33 00 00 msg1.msg2.msg3.. 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ >>> --- snip --- >>> Every ':' is replaced by line-feed '\n' (0xA). The latter is used >>> as separator between individual commands by Android userspace => bcb store >>> Flush/store the BCB structure to MMC [1] [2] [3] ("[U-Boot,5/6] Initial support for the Android Bootloader flow") Signed-off-by: Eugeniu Rosca <> Change-Id: I0b994d6c7c4d3709ae6615924ac97995d6534a23
2021-12-11ODROID-COMMON: add new git submodule to download 'rkbin/*'Dongjin Kim7-6/+12
$ git submodule init $ git submodule update $ ./ Signed-off-by: Dongjin Kim <> Signed-off-by: Luke go <> Change-Id: If9e02fbf73b2f81f461e78ccb738b81bf6c65f2e
2021-11-30ODROID-COMMON: cmd: fix to support 'ini' commandDongjin Kim2-1/+6
Signed-off-by: Dongjin Kim <> Change-Id: I01a6b35cd8d0ad95d2d216f6ca5d84dbd101cbcb
2021-11-30ODROID-COMMON: Revert "cmd: source: update terminal value"Dongjin Kim1-1/+1
This reverts commit 11a331d232dea79e25443776ebc3044cbe91d259. Change-Id: Ida526013969076e5a0792883271ba021d2479608
2021-11-30ODROID-COMMON: mtd: spi-nor-ids: Add Macronix mx25u12832f IDDongjin Kim1-0/+1
Signed-off-by: Dongjin Kim <> Change-Id: I2a9b9a8f6b7b5349e24f6daea9ecad7d6d7260e2
2021-11-30ODROID-COMMON: fix to use local toolchains to build U-bootDongjin Kim1-4/+7
$ export CROSS_COMPILE=/path/of/your/toolchain/bin/aarch-linux-gnu- $ ./ Signed-off-by: Dongjin Kim <> Change-Id: I904624e252fea62bda0ec466ed8fbf63731455e2
2021-11-04mtd: spi-nor-ids: Add support for gd25lb512mJon Lin1-0/+5
Change-Id: I17f7798cf7f51c10bd3527d095fac57c69538784 Signed-off-by: Jon Lin <>
2021-11-03dm: sysreset: do optimiseJoseph Chen4-36/+31
1. use more generic way for psci/syscon-reboot sysreset, fixes compile error: ...... drivers/built-in.o: In function `sysreset_walk': drivers/sysreset/sysreset-uclass.c:49: undefined reference to `_u_boot_list_2_driver_2_psci_sysreset' drivers/built-in.o: In function `reboot': drivers/sysreset/sysreset-uclass.c:102: undefined reference to `_u_boot_list_2_driver_2_sysreset_syscon_reboot' ...... 2. use psci/syscon-reboot sysreset only in U-Boot proper, excluding SPL/TPL/USBPLUG. Signed-off-by: Joseph Chen <> Change-Id: I6908e7e2d7e5143643be3f0cab90cd6009cde254
2021-11-03arm: crt0_64.S: disable arm64 SError for usbplugJoseph Chen1-1/+3
On rk356x platform usbplug mode, we found it occurs SError when rockusb download. Issue dump: ..... Serial: raw, 0xfe660000 dwmmc@fe2b0000: 1, dwmmc@fe2c0000: 2, sdhci@fe310000: 0 Bootdev: mmc 0 RKUSB: LUN 0, dev 0, hwpart 0, sector 0x0, count 0x3a3e000 \"Error" handler, esr 0xbe000011 * Reason: Exception from SError interrupt * PC = 0000000000013c68 * LR = 0000000000010f7c ..... fixes: (617c1bec46 arm: v7/v8: Enable SError/Asynchronous external abort for TPL/SPL/U-Boot) Signed-off-by: Joseph Chen <> Change-Id: I6270bd0a8afdd998ac09242f21598cc8acd200ca
2021-11-03lib: optee_clientApi: data alignment for get_rkss_versionHisping Lin1-1/+1
Change-Id: I351704ef104742d50cb39997db2fda181cf866b6 Signed-off-by: Hisping Lin <>
2021-11-03rockchip: rkimg: support setting NVME as main storageJon Lin1-0/+22
Change-Id: I9332a33b6412452c83170c7390126c4f4be8b9d3 Signed-off-by: Jon Lin <>
2021-11-02rockchip: rk3308bs: correct the nand iomuxJon Lin1-1/+1
The rk3308b and rk3308bs nand flash id has two group iomuxs. The maskrom only config the iomux register in the low address, but the kernel routing to the another one, so configure it in spl early to avoid losing the flash iomux. Change-Id: I95381a8bad9a2f91decb89cd509a9b1977e90186 Signed-off-by: Jon Lin <>
2021-10-27rockchip: board: fix kernel 5.10 arm64 boot address warningJoseph Chen1-3/+34
Fix warning: "[Firmware Bug]: Kernel image misaligned at boot, please fix your bootloader!" Signed-off-by: Joseph Chen <> Change-Id: Ib9e8b7924a413dbd289e37bd52140b8b995d09bd
2021-10-27common: bootm: pass bootm header structure for arch_preboot_os()Joseph Chen3-5/+8
Signed-off-by: Joseph Chen <> Change-Id: Id2735cd4224a0aa04fac2d208757e104ba8e82b0
2021-10-27cmd: tftp_update: add firmware version initial messageJoseph Chen1-0/+1
Signed-off-by: Joseph Chen <> Change-Id: I19ee818cc821ddbfd9563c6539725070cb01c633
2021-10-26configs: rk3568: enable CONFIG_ROCKCHIP_NEW_IDBJoseph Chen3-0/+3
Signed-off-by: Joseph Chen <> Change-Id: Ie08aa77fa8f1c45538dde9e19ab42f71f0d44e8b
2021-10-26rockusb: introduce CONFIG_ROCKCHIP_NEW_IDBJoseph Chen1-1/+1
The IDB header was changed from rk356x. Signed-off-by: Joseph Chen <> Change-Id: I8ac50adfe06da76f725b484681b76faeeb06d907
2021-10-26rockchip: Kconfig: introduce CONFIG_ROCKCHIP_NEW_IDBJoseph Chen1-0/+6
The new IDB header was introduced from RK356X. Signed-off-by: Joseph Chen <> Change-Id: Ib70ec7ec10ec3b6a75d763085faa55aeb5ae6edf