diff options
32 files changed, 254 insertions, 60 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 8add9d4c2a..9da0459bf7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -600,13 +600,16 @@ F: cmd/usb_*.c F: common/dfu.c F: common/update.c F: common/usb_storage.c +F: doc/api/dfu.rst F: drivers/dfu/ F: drivers/usb/gadget/ +F: include/dfu.h DRIVER MODEL M: Simon Glass <sjg@chromium.org> S: Maintained T: git https://gitlab.denx.de/u-boot/custodians/u-boot-dm.git +F: doc/driver-model/ F: drivers/core/ F: include/dm/ F: test/dm/ @@ -2729,10 +2729,6 @@ Configuration Settings: regular expression. This allows multiple variables to define the same flags without explicitly listing them for each variable. -- CONFIG_ENV_ACCESS_IGNORE_FORCE - If defined, don't allow the -f switch to env set override variable - access flags. - The following definitions that deal with the placement and management of environment data (variable area); in general, we support the following configurations: diff --git a/arch/Kconfig b/arch/Kconfig index 91e049b322..a11f872938 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -86,6 +86,7 @@ config RISCV config SANDBOX bool "Sandbox" select BOARD_LATE_INIT + select BZIP2 select DM select DM_GPIO select DM_I2C @@ -94,6 +95,7 @@ config SANDBOX select DM_SERIAL select DM_SPI select DM_SPI_FLASH + select GZIP_COMPRESSED select HAVE_BLOCK_DEVICE select LZO select OF_BOARD_SETUP diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c index 7ebcaa21a1..7c31d98a6f 100644 --- a/arch/arm/cpu/armv8/cache_v8.c +++ b/arch/arm/cpu/armv8/cache_v8.c @@ -557,7 +557,7 @@ static u64 set_one_region(u64 start, u64 size, u64 attrs, bool flag, int level) void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size, enum dcache_option option) { - u64 attrs = PMD_ATTRINDX(option); + u64 attrs = PMD_ATTRINDX(option >> 2); u64 real_start = start; u64 real_size = size; diff --git a/cmd/Kconfig b/cmd/Kconfig index f9be1988f6..153864c587 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -810,11 +810,13 @@ config CMD_UNLZ4 config CMD_UNZIP bool "unzip" default y if CMD_BOOTI + select GZIP help Uncompress a zip-compressed memory region. config CMD_ZIP bool "zip" + select GZIP_COMPRESSED help Compress a memory region with zlib deflate method. @@ -7,6 +7,7 @@ #include <common.h> #include <command.h> #include <env.h> +#include <gzip.h> static int do_zip(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { diff --git a/configs/bcm7260_defconfig b/configs/bcm7260_defconfig index afb59ec884..d467e62dee 100644 --- a/configs/bcm7260_defconfig +++ b/configs/bcm7260_defconfig @@ -13,6 +13,7 @@ CONFIG_USE_PREBOOT=y CONFIG_PREBOOT="fdt addr ${fdtcontroladdr};fdt move ${fdtcontroladdr} ${fdtsaveaddr};fdt addr ${fdtsaveaddr};" CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="U-Boot>" +CONFIG_CMD_MMC=y CONFIG_EFI_PARTITION=y CONFIG_OF_PRIOR_STAGE=y CONFIG_ENV_IS_IN_MMC=y diff --git a/configs/bcm7445_defconfig b/configs/bcm7445_defconfig index 0ae0595903..2c71a5efed 100644 --- a/configs/bcm7445_defconfig +++ b/configs/bcm7445_defconfig @@ -14,6 +14,7 @@ CONFIG_USE_PREBOOT=y CONFIG_PREBOOT="fdt addr ${fdtcontroladdr};fdt move ${fdtcontroladdr} ${fdtsaveaddr};fdt addr ${fdtsaveaddr};" CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="U-Boot>" +CONFIG_CMD_MMC=y CONFIG_CMD_SF_TEST=y CONFIG_CMD_SPI=y CONFIG_OF_PRIOR_STAGE=y diff --git a/configs/gurnard_defconfig b/configs/gurnard_defconfig index a5d51ce610..7e394d9aec 100644 --- a/configs/gurnard_defconfig +++ b/configs/gurnard_defconfig @@ -16,6 +16,7 @@ CONFIG_HUSH_PARSER=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_GPIO=y # CONFIG_CMD_LOADS is not set +CONFIG_CMD_MMC=y CONFIG_CMD_NAND=y CONFIG_CMD_PART=y CONFIG_CMD_USB=y diff --git a/configs/imx8mq_evk_defconfig b/configs/imx8mq_evk_defconfig index 1504ecbbd6..7472bad9e6 100644 --- a/configs/imx8mq_evk_defconfig +++ b/configs/imx8mq_evk_defconfig @@ -19,6 +19,7 @@ CONFIG_HUSH_PARSER=y # CONFIG_BOOTM_NETBSD is not set CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y +CONFIG_CMD_MMC=y CONFIG_CMD_CACHE=y CONFIG_CMD_REGULATOR=y CONFIG_CMD_EXT2=y diff --git a/configs/imx8mq_phanbell_defconfig b/configs/imx8mq_phanbell_defconfig index 651940ccf6..045d204897 100644 --- a/configs/imx8mq_phanbell_defconfig +++ b/configs/imx8mq_phanbell_defconfig @@ -21,6 +21,7 @@ CONFIG_HUSH_PARSER=y # CONFIG_BOOTM_NETBSD is not set CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y +CONFIG_CMD_MMC=y CONFIG_CMD_CACHE=y CONFIG_CMD_REGULATOR=y CONFIG_CMD_EXT2=y diff --git a/configs/ls1021aiot_qspi_defconfig b/configs/ls1021aiot_qspi_defconfig index dba33e2a9b..cb73a04b35 100644 --- a/configs/ls1021aiot_qspi_defconfig +++ b/configs/ls1021aiot_qspi_defconfig @@ -12,6 +12,7 @@ CONFIG_MISC_INIT_R=y CONFIG_BOARD_EARLY_INIT_F=y CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPT=y +CONFIG_CMD_MMC=y CONFIG_CMD_DHCP=y CONFIG_CMD_PING=y CONFIG_CMD_EXT2=y diff --git a/configs/ls1021aiot_sdcard_defconfig b/configs/ls1021aiot_sdcard_defconfig index fc6df70db7..10b6930914 100644 --- a/configs/ls1021aiot_sdcard_defconfig +++ b/configs/ls1021aiot_sdcard_defconfig @@ -17,6 +17,7 @@ CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xe8 CONFIG_CMD_BOOTZ=y CONFIG_CMD_GPT=y +CONFIG_CMD_MMC=y CONFIG_CMD_DHCP=y CONFIG_CMD_PING=y CONFIG_CMD_EXT2=y diff --git a/configs/pico-imx8mq_defconfig b/configs/pico-imx8mq_defconfig index 2d68fe152c..470fd3a355 100644 --- a/configs/pico-imx8mq_defconfig +++ b/configs/pico-imx8mq_defconfig @@ -19,6 +19,7 @@ CONFIG_HUSH_PARSER=y # CONFIG_BOOTM_NETBSD is not set CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y +CONFIG_CMD_MMC=y CONFIG_CMD_CACHE=y CONFIG_CMD_REGULATOR=y CONFIG_CMD_EXT2=y diff --git a/configs/s32v234evb_defconfig b/configs/s32v234evb_defconfig index 99720a9193..78450c23d6 100644 --- a/configs/s32v234evb_defconfig +++ b/configs/s32v234evb_defconfig @@ -13,6 +13,7 @@ CONFIG_CMD_BOOTZ=y CONFIG_CMD_MEMTEST=y CONFIG_SYS_MEMTEST_START=0xc0000000 CONFIG_SYS_MEMTEST_END=0xc7c00000 +CONFIG_CMD_MMC=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y diff --git a/doc/README.dfu b/doc/README.dfu index caf1c9998c..4b9f883540 100644 --- a/doc/README.dfu +++ b/doc/README.dfu @@ -48,12 +48,12 @@ Configuration Options: CONFIG_CMD_DFU Environment variables: - the dfu command use 3 environments variables: - "dfu_alt_info" : the DFU setting for the USB download gadget with a comma + the dfu command uses 3 environments variables: + "dfu_alt_info" : the DFU setting for the USB download gadget with a semicolon separated string of information on each alternate: dfu_alt_info="<alt1>;<alt2>;....;<altN>" - when only several device are used, the format is: + when several devices are used, the format is: - <interface> <dev>'='alternate list (';' separated) - each interface is separated by '&' dfu_alt_info=\ @@ -63,7 +63,7 @@ Environment variables: "<interfaceI> <devI>=<altY+1>;....;<altZ>&" "dfu_bufsiz" : size of the DFU buffer, when absent, use - CONFIG_SYS_DFU_DATA_BUF_SIZE (8MiB by default) + CONFIG_SYS_DFU_DATA_BUF_SIZE (8 MiB by default) "dfu_hash_algo" : name of the hash algorithm to use @@ -87,12 +87,21 @@ Commands: "mmc" (for eMMC and SD card) cmd: dfu 0 mmc <dev> each element in "dfu_alt_info" = - <name> raw <offset> <size> raw access to mmc device - <name> part <dev> <part_id> raw acces to partition - <name> fat <dev> <part_id> file in FAT partition - <name> ext4 <dev> <part_id> file in EXT4 partition + <name> raw <offset> <size> [mmcpart <num>] raw access to mmc device + <name> part <dev> <part_id> [mmcpart <num>] raw access to partition + <name> fat <dev> <part_id> [mmcpart <num>] file in FAT partition + <name> ext4 <dev> <part_id> [mmcpart <num>] file in EXT4 partition + + with <partid> being the GPT or DOS partition index, + with <num> being the eMMC hardware partition number. + + A value of environment variable dfu_alt_info for eMMC could be: + + "u-boot raw 0x3e 0x800 mmcpart 1;bl2 raw 0x1e 0x1d mmcpart 1" + + A value of environment variable dfu_alt_info for SD card could be: - with <partid> is the GPT or DOS partition index + "u-boot raw 0x80 0x800;uImage ext4 0 2" "nand" (raw slc nand device) cmd: dfu 0 nand <dev> diff --git a/doc/api/dfu.rst b/doc/api/dfu.rst new file mode 100644 index 0000000000..5bd9e292a5 --- /dev/null +++ b/doc/api/dfu.rst @@ -0,0 +1,7 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +Device firmware update +====================== + +.. kernel-doc:: include/dfu.h + :internal: diff --git a/doc/api/index.rst b/doc/api/index.rst index 2578abd40e..fd3b5bdc82 100644 --- a/doc/api/index.rst +++ b/doc/api/index.rst @@ -6,6 +6,7 @@ U-Boot API documentation .. toctree:: :maxdepth: 2 + dfu efi linker_lists serial diff --git a/drivers/phy/phy-uclass.c b/drivers/phy/phy-uclass.c index 65b5316834..db7f39cd0b 100644 --- a/drivers/phy/phy-uclass.c +++ b/drivers/phy/phy-uclass.c @@ -118,7 +118,7 @@ int generic_phy_init(struct phy *phy) { struct phy_ops const *ops; - if (!phy) + if (!generic_phy_valid(phy)) return 0; ops = phy_dev_ops(phy->dev); @@ -129,7 +129,7 @@ int generic_phy_reset(struct phy *phy) { struct phy_ops const *ops; - if (!phy) + if (!generic_phy_valid(phy)) return 0; ops = phy_dev_ops(phy->dev); @@ -140,7 +140,7 @@ int generic_phy_exit(struct phy *phy) { struct phy_ops const *ops; - if (!phy) + if (!generic_phy_valid(phy)) return 0; ops = phy_dev_ops(phy->dev); @@ -151,7 +151,7 @@ int generic_phy_power_on(struct phy *phy) { struct phy_ops const *ops; - if (!phy) + if (!generic_phy_valid(phy)) return 0; ops = phy_dev_ops(phy->dev); @@ -162,7 +162,7 @@ int generic_phy_power_off(struct phy *phy) { struct phy_ops const *ops; - if (!phy) + if (!generic_phy_valid(phy)) return 0; ops = phy_dev_ops(phy->dev); diff --git a/env/Kconfig b/env/Kconfig index ed94e83ec1..ca7fef682b 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -604,6 +604,13 @@ config DELAY_ENVIRONMENT later by U-Boot code. With CONFIG_OF_CONTROL this is instead controlled by the value of /config/load-environment. +config ENV_ACCESS_IGNORE_FORCE + bool "Block forced environment operations" + default n + help + If defined, don't allow the -f switch to env set override variable + access flags. + if SPL_ENV_SUPPORT config SPL_ENV_IS_NOWHERE bool "SPL Environment is not stored" diff --git a/include/configs/bcmstb.h b/include/configs/bcmstb.h index e58a9510de..5f6bf62524 100644 --- a/include/configs/bcmstb.h +++ b/include/configs/bcmstb.h @@ -130,7 +130,6 @@ extern phys_addr_t prior_stage_fdt_address; #define CONFIG_CMD_ASKENV #define CONFIG_CMD_CACHE #define CONFIG_CMD_EXT2 -#define CONFIG_CMD_MMC /* * Flash configuration. diff --git a/include/configs/imx8mq_evk.h b/include/configs/imx8mq_evk.h index 632c4eaf77..94183269cd 100644 --- a/include/configs/imx8mq_evk.h +++ b/include/configs/imx8mq_evk.h @@ -202,8 +202,6 @@ #define CONFIG_IMX_BOOTAUX -#define CONFIG_CMD_MMC - #define CONFIG_SYS_FSL_USDHC_NUM 2 #define CONFIG_SYS_FSL_ESDHC_ADDR 0 diff --git a/include/configs/imx8mq_phanbell.h b/include/configs/imx8mq_phanbell.h index 4fa48c0578..72edbc74ec 100644 --- a/include/configs/imx8mq_phanbell.h +++ b/include/configs/imx8mq_phanbell.h @@ -193,8 +193,6 @@ #define CONFIG_IMX_BOOTAUX -#define CONFIG_CMD_MMC - #define CONFIG_SYS_FSL_USDHC_NUM 2 #define CONFIG_SYS_FSL_ESDHC_ADDR 0 diff --git a/include/configs/ls1021aiot.h b/include/configs/ls1021aiot.h index 3eff1be023..6e94a2a4c9 100644 --- a/include/configs/ls1021aiot.h +++ b/include/configs/ls1021aiot.h @@ -120,7 +120,6 @@ /* * MMC */ -#define CONFIG_CMD_MMC /* SATA */ #define CONFIG_SCSI_AHCI_PLAT diff --git a/include/configs/pico-imx8mq.h b/include/configs/pico-imx8mq.h index a2f80cdd67..f4da38a7db 100644 --- a/include/configs/pico-imx8mq.h +++ b/include/configs/pico-imx8mq.h @@ -174,8 +174,6 @@ #define CONFIG_IMX_BOOTAUX -#define CONFIG_CMD_MMC - #define CONFIG_SYS_FSL_USDHC_NUM 2 #define CONFIG_SYS_FSL_ESDHC_ADDR 0 diff --git a/include/configs/s32v234evb.h b/include/configs/s32v234evb.h index ba0e506fa0..5821d21688 100644 --- a/include/configs/s32v234evb.h +++ b/include/configs/s32v234evb.h @@ -68,7 +68,6 @@ #define CONFIG_SYS_FSL_ESDHC_ADDR USDHC_BASE_ADDR #define CONFIG_SYS_FSL_ESDHC_NUM 1 -#define CONFIG_CMD_MMC /* #define CONFIG_CMD_EXT2 EXT2 Support */ #if 0 diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index 7fda63f71a..484a15df79 100644 --- a/include/configs/sandbox.h +++ b/include/configs/sandbox.h @@ -114,9 +114,6 @@ BOOTENV \ MEM_LAYOUT_ENV_SETTINGS -#define CONFIG_GZIP_COMPRESSED -#define CONFIG_BZIP2 - #ifndef CONFIG_SPL_BUILD #define CONFIG_SYS_IDE_MAXBUS 1 #define CONFIG_SYS_ATA_IDE0_OFFSET 0 diff --git a/include/configs/snapper9g45.h b/include/configs/snapper9g45.h index 9b95054308..be36e9f586 100644 --- a/include/configs/snapper9g45.h +++ b/include/configs/snapper9g45.h @@ -101,7 +101,6 @@ /* Command line configuration */ #define CONFIG_CMD_MII -#define CONFIG_CMD_MMC #define CONFIG_CMD_CACHE #endif /* __CONFIG_H */ diff --git a/include/dfu.h b/include/dfu.h index 2f0e335ec0..6fa4505936 100644 --- a/include/dfu.h +++ b/include/dfu.h @@ -159,20 +159,139 @@ struct dfu_entity { }; #ifdef CONFIG_SET_DFU_ALT_INFO +/** + * set_dfu_alt_info() - set dfu_alt_info environment variable + * + * If CONFIG_SET_DFU_ALT_INFO=y, this board specific function is called to set + * environment variable dfu_alt_info. + * + * @interface: dfu interface, e.g. "mmc" or "nand" + * @devstr: device number as string + */ void set_dfu_alt_info(char *interface, char *devstr); #endif + +/** + * dfu_alt_init() - initialize buffer for dfu entities + * + * @num: number of entities + * @dfu: on return allocated buffer + * Return: 0 on success + */ int dfu_alt_init(int num, struct dfu_entity **dfu); + +/** + * dfu_alt_add() - add alternate to dfu entity buffer + * + * @dfu: dfu entity + * @interface: dfu interface, e.g. "mmc" or "nand" + * @devstr: device number as string + * @s: string description of alternate + * Return: 0 on success + */ int dfu_alt_add(struct dfu_entity *dfu, char *interface, char *devstr, char *s); + +/** + * dfu_config_entities() - initialize dfu entitities from envirionment + * + * Initialize the list of dfu entities from environment variable dfu_alt_info. + * The list must be freed by calling dfu_free_entities(). This function bypasses + * set_dfu_alt_info(). So typically you should use dfu_init_env_entities() + * instead. + * + * See function :c:func:`dfu_free_entities` + * See function :c:func:`dfu_init_env_entities` + * + * @s: string with alternates + * @interface: interface, e.g. "mmc" or "nand" + * @devstr: device number as string + * Return: 0 on success, a negative error code otherwise + */ int dfu_config_entities(char *s, char *interface, char *devstr); + +/** + * dfu_free_entities() - free the list of dfu entities + * + * Free the internal list of dfu entities. + * + * See function :c:func:`dfu_init_env_entities` + */ void dfu_free_entities(void); + +/** + * dfu_show_entities() - print DFU alt settings list + */ void dfu_show_entities(void); + +/** + * dfu_get_alt_number() - get number of alternates + * + * Return: number of alternates in the dfu entities list + */ int dfu_get_alt_number(void); -const char *dfu_get_dev_type(enum dfu_device_type t); -const char *dfu_get_layout(enum dfu_layout l); + +/** + * dfu_get_dev_type() - get string representation for dfu device type + * + * @type: device type + * Return: string representation for device type + */ +const char *dfu_get_dev_type(enum dfu_device_type type); + +/** + * dfu_get_layout() - get string describing layout + * + * Internally layouts are represented by enum dfu_device_type values. This + * function translates an enum value to a human readable string, e.g. DFU_FS_FAT + * is translated to "FAT". + * + * @layout: layout + * Result: string representation for the layout + */ +const char *dfu_get_layout(enum dfu_layout layout); + +/** + * dfu_get_entity() - get dfu entity for an alternate id + * + * @alt: alternate id + * Return: dfu entity + */ struct dfu_entity *dfu_get_entity(int alt); + char *dfu_extract_token(char** e, int *n); + +/** + * dfu_get_alt() - get alternate id for filename + * + * Environment variable dfu_alt_info defines the write destinations (alternates) + * for different filenames. This function get the index of the alternate for + * a filename. If an absolute filename is provided (starting with '/'), the + * directory path is ignored. + * + * @name: filename + * Return: id of the alternate or negative error number (-ENODEV) + */ int dfu_get_alt(char *name); + +/** + * dfu_init_env_entities() - initialize dfu entitities from envirionment + * + * Initialize the list of dfu entities from environment variable dfu_alt_info. + * The list must be freed by calling dfu_free_entities(). + * @interface and @devstr are used to select the relevant set of alternates + * from environment variable dfu_alt_info. + * + * If environment variable dfu_alt_info specifies the interface and the device, + * use NULL for @interface and @devstr. + * + * See function :c:func:`dfu_free_entities` + * + * @interface: interface, e.g. "mmc" or "nand" + * @devstr: device number as string + * Return: 0 on success, a negative error code otherwise + */ int dfu_init_env_entities(char *interface, char *devstr); + unsigned char *dfu_get_buf(struct dfu_entity *dfu); unsigned char *dfu_free_buf(void); unsigned long dfu_get_buf_size(void); @@ -183,29 +302,79 @@ unsigned long dfu_get_timeout(void); void dfu_set_timeout(unsigned long); #endif +/** + * dfu_read() - read from dfu entity + * + * The block sequence number @blk_seq_num is a 16 bit counter that must be + * incremented with each call for the same dfu entity @de. + * + * @de: dfu entity + * @buf: buffer + * @size: size of buffer + * @blk_seq_num: block sequence number + * Return: 0 for success, -1 for error + */ int dfu_read(struct dfu_entity *de, void *buf, int size, int blk_seq_num); + +/** + * dfu_write() - write to dfu entity + * + * Write the contents of a buffer @buf to the dfu entity @de. After writing + * the last block call dfu_flush(). If a file is already loaded completely + * into memory it is preferable to use dfu_write_from_mem_addr() which takes + * care of blockwise transfer and flushing. + * + * The block sequence number @blk_seq_num is a 16 bit counter that must be + * incremented with each call for the same dfu entity @de. + * + * See function :c:func:`dfu_flush` + * See function :c:func:`dfu_write_from_mem_addr` + * + * @de: dfu entity + * @buf: buffer + * @size: size of buffer + * @blk_seq_num: block sequence number + * Return: 0 for success, -1 for error + */ int dfu_write(struct dfu_entity *de, void *buf, int size, int blk_seq_num); + +/** + * dfu_flush() - flush to dfu entity + * + * This function has to be called after writing the last block to the dfu + * entity @de. + * + * The block sequence number @blk_seq_num is a 16 bit counter that must be + * incremented with each call for the same dfu entity @de. + * + * See function :c:func:`dfu_write` + * + * @de: dfu entity + * @buf: ignored + * @size: ignored + * @blk_seq_num: block sequence number of last write - ignored + * Return: 0 for success, -1 for error + */ int dfu_flush(struct dfu_entity *de, void *buf, int size, int blk_seq_num); /** - * dfu_initiated_callback - weak callback called on DFU transaction start + * dfu_initiated_callback() - weak callback called on DFU transaction start * * It is a callback function called by DFU stack when a DFU transaction is * initiated. This function allows to manage some board specific behavior on * DFU targets. * - * @param dfu - pointer to the dfu_entity, which should be initialized - * + * @dfu: pointer to the dfu_entity, which should be initialized */ void dfu_initiated_callback(struct dfu_entity *dfu); + /** - * dfu_flush_callback - weak callback called at the end of the DFU write + * dfu_flush_callback() - weak callback called at the end of the DFU write * * It is a callback function called by DFU stack after DFU manifestation. * This function allows to manage some board specific behavior on DFU targets * - * @param dfu - pointer to the dfu_entity, which should be flushed - * + * @dfu: pointer to the dfu_entity, which should be flushed */ void dfu_flush_callback(struct dfu_entity *dfu); @@ -217,10 +386,11 @@ void dfu_transaction_cleanup(struct dfu_entity *dfu); * It should be NULL when not used. */ extern struct dfu_entity *dfu_defer_flush; + /** - * dfu_get_defer_flush - get current value of dfu_defer_flush pointer + * dfu_get_defer_flush() - get current value of dfu_defer_flush pointer * - * @return - value of the dfu_defer_flush pointer + * Return: value of the dfu_defer_flush pointer */ static inline struct dfu_entity *dfu_get_defer_flush(void) { @@ -228,9 +398,9 @@ static inline struct dfu_entity *dfu_get_defer_flush(void) } /** - * dfu_set_defer_flush - set the dfu_defer_flush pointer + * dfu_set_defer_flush() - set the dfu_defer_flush pointer * - * @param dfu - pointer to the dfu_entity, which should be written + * @dfu: pointer to the dfu_entity, which should be written */ static inline void dfu_set_defer_flush(struct dfu_entity *dfu) { @@ -238,16 +408,16 @@ static inline void dfu_set_defer_flush(struct dfu_entity *dfu) } /** - * dfu_write_from_mem_addr - write data from memory to DFU managed medium + * dfu_write_from_mem_addr() - write data from memory to DFU managed medium * * This function adds support for writing data starting from fixed memory * address (like $loadaddr) to dfu managed medium (e.g. NAND, MMC, file system) * - * @param dfu - dfu entity to which we want to store data - * @param buf - fixed memory addres from where data starts - * @param size - number of bytes to write + * @dfu: dfu entity to which we want to store data + * @buf: fixed memory address from where data starts + * @size: number of bytes to write * - * @return - 0 on success, other value on failure + * Return: 0 on success, other value on failure */ int dfu_write_from_mem_addr(struct dfu_entity *dfu, void *buf, int size); @@ -324,17 +494,17 @@ static inline int dfu_fill_entity_virt(struct dfu_entity *dfu, char *devstr, #endif /** - * dfu_tftp_write - Write TFTP data to DFU medium + * dfu_tftp_write() - write TFTP data to DFU medium * * This function is storing data received via TFTP on DFU supported medium. * - * @param dfu_entity_name - name of DFU entity to write - * @param addr - address of data buffer to write - * @param len - number of bytes - * @param interface - destination DFU medium (e.g. "mmc") - * @param devstring - instance number of destination DFU medium (e.g. "1") + * @dfu_entity_name: name of DFU entity to write + * @addr: address of data buffer to write + * @len: number of bytes + * @interface: destination DFU medium (e.g. "mmc") + * @devstring: instance number of destination DFU medium (e.g. "1") * - * @return 0 on success, otherwise error code + * Return: 0 on success, otherwise error code */ #if CONFIG_IS_ENABLED(DFU_TFTP) int dfu_tftp_write(char *dfu_entity_name, unsigned int addr, unsigned int len, diff --git a/lib/Kconfig b/lib/Kconfig index c3f694afc0..f18bf3778b 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -424,6 +424,10 @@ config GZIP help This enables support for GZIP compression algorithm. +config GZIP_COMPRESSED + bool + select ZLIB + config BZIP2 bool "Enable bzip2 decompression support" help diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 9b6b45116a..61d025f053 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -415,7 +415,6 @@ CONFIG_ENABLE_36BIT_PHYS CONFIG_ENABLE_MMU CONFIG_ENABLE_MUST_CHECK CONFIG_ENABLE_WARN_DEPRECATED -CONFIG_ENV_ACCESS_IGNORE_FORCE CONFIG_ENV_ADDR_FLEX CONFIG_ENV_CALLBACK_LIST_DEFAULT CONFIG_ENV_CALLBACK_LIST_STATIC @@ -644,8 +643,6 @@ CONFIG_GPIO_LED_STUBS CONFIG_GREEN_LED CONFIG_GURNARD_FPGA CONFIG_GURNARD_SPLASH -CONFIG_GZIP_COMPRESSED -CONFIG_GZIP_COMPRESS_DEF_SZ CONFIG_G_DNL_THOR_PRODUCT_NUM CONFIG_G_DNL_THOR_VENDOR_NUM CONFIG_G_DNL_UMS_PRODUCT_NUM diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h index b60fbfc8f8..78c803c944 100644 --- a/tools/env/fw_env.h +++ b/tools/env/fw_env.h @@ -4,7 +4,6 @@ * Wolfgang Denk, DENX Software Engineering, wd@denx.de. */ -#include <env.h> #include <stdint.h> /* |