Merge branch '2023-11-16-assorted-updates' into next

- squashfs improvements, remove common.h in some places, assorted code
  fixes, fix a few CONFIG symbol names in Kconfig files, bring in
  linux's <linux/time.h> conversion functions, poplar updates, bcb
  improvements.
This commit is contained in:
Tom Rini
2023-11-17 08:38:05 -05:00
71 changed files with 336 additions and 263 deletions

View File

@@ -8,14 +8,69 @@
#ifndef __BCB_H__
#define __BCB_H__
#include <part.h>
enum bcb_field {
BCB_FIELD_COMMAND,
BCB_FIELD_STATUS,
BCB_FIELD_RECOVERY,
BCB_FIELD_STAGE
};
#if IS_ENABLED(CONFIG_CMD_BCB)
int bcb_write_reboot_reason(int devnum, char *partp, const char *reasonp);
int bcb_find_partition_and_load(const char *iface,
int devnum, char *partp);
int bcb_load(struct blk_desc *block_description,
struct disk_partition *disk_partition);
int bcb_set(enum bcb_field field, const char *value);
/**
* bcb_get() - get the field value.
* @field: field to get
* @value_out: buffer to copy bcb field value to
* @value_size: buffer size to avoid overflow in case
* value_out is smaller then the field value
*/
int bcb_get(enum bcb_field field, char *value_out, size_t value_size);
int bcb_store(void);
void bcb_reset(void);
#else
#include <linux/errno.h>
static inline int bcb_write_reboot_reason(int devnum, char *partp, const char *reasonp)
static inline int bcb_load(struct blk_desc *block_description,
struct disk_partition *disk_partition)
{
return -EOPNOTSUPP;
}
static inline int bcb_find_partition_and_load(const char *iface,
int devnum, char *partp)
{
return -EOPNOTSUPP;
}
static inline int bcb_set(enum bcb_field field, const char *value)
{
return -EOPNOTSUPP;
}
static inline int bcb_get(enum bcb_field field, char *value_out)
{
return -EOPNOTSUPP;
}
static inline int bcb_store(void)
{
return -EOPNOTSUPP;
}
static inline void bcb_reset(void)
{
}
#endif
#endif /* __BCB_H__ */

View File

@@ -37,11 +37,11 @@
"env_mmc_blknum=0xf80\0" \
"env_mmc_nblks=0x80\0" \
"kernel_addr_r=0x30000000\0" \
"pxefile_addr_r=0x32000000\0" \
"scriptaddr=0x32000000\0" \
"fdt_addr_r=0x32200000\0" \
"pxefile_addr_r=0x33000000\0" \
"scriptaddr=0x33000000\0" \
"fdt_addr_r=0x33200000\0" \
"fdtfile=hisilicon/hi3798cv200-poplar.dtb\0" \
"ramdisk_addr_r=0x32400000\0" \
"ramdisk_addr_r=0x33400000\0" \
BOOTENV
#endif /* _POPLAR_H_ */

View File

@@ -147,7 +147,7 @@ int ext4fs_create_link(const char *target, const char *fname);
struct ext_filesystem *get_fs(void);
int ext4fs_open(const char *filename, loff_t *len);
int ext4fs_read(char *buf, loff_t offset, loff_t len, loff_t *actread);
int ext4fs_mount(unsigned part_length);
int ext4fs_mount(void);
void ext4fs_close(void);
void ext4fs_reinit_global(void);
int ext4fs_ls(const char *dirname);

View File

@@ -11,6 +11,15 @@
#define _REENT_ONLY
#define MSEC_PER_SEC 1000L
#define USEC_PER_MSEC 1000L
#define NSEC_PER_USEC 1000L
#define NSEC_PER_MSEC 1000000L
#define USEC_PER_SEC 1000000L
#define NSEC_PER_SEC 1000000000L
#define PSEC_PER_SEC 1000000000000LL
#define FSEC_PER_SEC 1000000000000000LL
#define SECSPERMIN 60L
#define MINSPERHOUR 60L
#define HOURSPERDAY 24L