Files
luckfox-pico/sysdrv/source/uboot/u-boot/include/boot_rkimg.h
luckfox-eng29 485f09ece6 Pullrequest mis5001 clear patch 0305 (#242)
* project/app : Add uvc_app_tiny application

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* project/cfg/BoardConfig_IPC/overlay : Add Ubuntu system support for Rockit and RKNN libraries

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* sysdrv/source/kernel/drivers/of : Add support for dynamic device tree

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/source/kernel/drivers/usb/serial : Add CH343 driver support

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/source/kernel/drivers/staging : Disable partial logging of fbtft

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/source/kernel/drivers/pinctrl/pinctrl-rockchip.h : Fix pinctrl configuration failure issue

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/source/kernel/include/dt-bindings/soc/rockchip,boot-mode.h : Add support for the reboot U-Boot command in the BusyBox system

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/source/kernel/drivers/video : Add logo display support for LF40-480480-ARK and LF40-720720-ARK

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/source/kernel/arch/arm/boot/dts : Add device tree files for the Luckfox RV1103/RV1106 series boards

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/source/kernel/arch/arm/configs : Add device tree files for the Luckfox RV1103/RV1106 series boards

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/source/uboot/u-boot/drivers/mmc/mmc.c : Fix the issue where some Micro SD cards fail to boot

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/source/uboot/u-boot/common/image-fit.c : Add U-Boot support for luckfox-config

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/source/uboot/rkbin/bin/rv11 : Add firmware with a serial baud rate of 115200 and back up the original firmware

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/source/uboot/u-boot/arch/arm/dts : Add device tree files for the Luckfox RV1103/RV1106 series boards

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/source/uboot/u-boot/configs : Add defconfig files for the Luckfox RV1103/RV1106 series boards

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/source/uboot/u-boot : Add support for the reboot U-Boot command in the BusyBox system

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/source/kernel/drivers/media/i2c : Add MIS5001 driver support

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/source/kernel/arch/arm : Add default support for MIS5001 on Luckfox RV1106 series boards

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/tools/board : Delete irrelevant overwrite files and patch files

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/drv_ko/insmod_ko.sh : Register mis5001 driver during boot process

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* media/isp/release_camera_engine_rkaiq_rv1106_arm-rockchip830-linux-uclibcgnueabihf/isp_iqfiles : Add mis5001 iqfile

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* project/app/rkipc/rkipc/src/rv1106_ipc : Add rkipc application support for mis5001 sensor

Signed-off-by: eng29 <eng29@luckfox.com>

* project/cfg/BoardConfig_IPC : Enable default retrieval of mis5001 iqfile and include ROCKIT and RKNN libraries of RV1106 series board

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* project/build.sh : Remove operations related to applying and deleting patches

Signed-off-by: eng29 <eng29@luckfox.com>

* project/build.sh : Modify build system menu description; Apply lightweight system processing only during Buildroot and BusyBox system compilation

Signed-off-by: eng29 <eng29@luckfox.com>

* sysdrv/tools/board/buildroot/luckfox_pico_w_defconfig : Add pppd and pgrep for 4G module

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>

* sysdrv/tools/board/kernel/rv1106-luckfox-pico-ultra-ipc.dtsi : Add uart4m1 support for lastest luckfox-config tool

Signed-off-by: eng29 <eng29@luckfox.com>

---------

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
Signed-off-by: eng29 <eng29@luckfox.com>
2025-03-05 17:21:58 +08:00

87 lines
2.2 KiB
C

/*
* (C) Copyright 2017 Rockchip Electronics Co., Ltd
*
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __BOOT_ROCKCHIP_H_
#define __BOOT_ROCKCHIP_H_
/* This is a copy from Android boot loader */
enum _boot_mode {
BOOT_MODE_NORMAL = 0,
BOOT_MODE_RECOVERY,
BOOT_MODE_BOOTLOADER, /* Android: Fastboot mode */
BOOT_MODE_LOADER, /* Rockchip: Rockusb download mode */
BOOT_MODE_CHARGING,
BOOT_MODE_UMS,
BOOT_MODE_BROM_DOWNLOAD,
BOOT_MODE_PANIC,
BOOT_MODE_WATCHDOG,
BOOT_MODE_DFU,
BOOT_MODE_QUIESCENT,
BOOT_MODE_UBOOT_TERMINAL,
BOOT_MODE_UNDEFINE,
};
struct bootloader_message {
char command[32];
char status[32];
char recovery[768];
/*
* The 'recovery' field used to be 1024 bytes. It has only ever
* been used to store the recovery command line, so 768 bytes
* should be plenty. We carve off the last 256 bytes to store the
* stage string (for multistage packages) and possible future
* expansion.
*/
char stage[32];
char slot_suffix[32];
char reserved[192];
};
struct rockchip_image {
uint32_t tag;
uint32_t size;
int8_t image[1];
uint32_t crc;
};
#define RK_BLK_SIZE 512
#define TAG_KERNEL 0x4C4E524B
#define BCB_MESSAGE_BLK_OFFSET (16 * 1024 >> 9)
#define PART_UBOOT "uboot"
#define PART_TRUST "trust"
#define PART_MISC "misc"
#define PART_RESOURCE "resource"
#define PART_KERNEL "kernel"
#define PART_BOOT "boot"
#define PART_VENDOR_BOOT "vendor_boot"
#define PART_RECOVERY "recovery"
#define PART_DTBO "dtbo"
#define PART_LOGO "logo"
#define PART_ROOTFS "rootfs"
#define PART_SYSTEM "system"
#define PART_METADATA "metadata"
#define PART_USERDATA "userdata"
#define PART_META "meta"
struct blk_desc *rockchip_get_bootdev(void);
void rockchip_set_bootdev(struct blk_desc *desc);
void board_run_recovery_wipe_data(void);
void setup_download_mode(void);
int get_bcb_recovery_msg(void);
int rockchip_read_dtb_file(void *fdt_addr);
int rockchip_ram_read_dtb_file(void *img, void *fdt_addr);
int init_kernel_dtb(void);
int fit_write_trusty_rollback_index(u32 trusty_index);
int arch_fpga_init(void);
#ifndef CONFIG_SPL_BUILD
int rockchip_get_boot_mode(void);
#else
int rockchip_get_boot_mode(struct blk_desc *dev_desc, u32 bcb_sector_offset);
#endif
#endif