mirror of
https://github.com/LuckfoxTECH/luckfox-pico.git
synced 2026-01-19 17:59:18 +01:00
project:build.sh: Added fastboot support; custom modifications to U-Boot and kernel implemented using patches.
project:cfg:BoardConfig_IPC: Added fastboot BoardConfig file and firmware post-scripts, distinguishing between the BoardConfigs for Luckfox Pico Pro and Luckfox Pico Max. project:app: Added fastboot_client and rk_smart_door for quick boot applications; updated rkipc app to adapt to the latest media library. media:samples: Added more usage examples. media:rockit: Fixed bugs; removed support for retrieving data frames from VPSS. media:isp: Updated rkaiq library and related tools to support connection to RKISP_Tuner. sysdrv:Makefile: Added support for compiling drv_ko on Luckfox Pico Ultra W using Ubuntu; added support for custom root filesystem. sysdrv:tools:board: Updated Buildroot optional mirror sources, updated some software versions, and stored device tree files and configuration files that undergo multiple modifications for U-Boot and kernel separately. sysdrv:source:mcu: Used RISC-V MCU SDK with RT-Thread system, mainly for initializing camera AE during quick boot. sysdrv:source:uboot: Added support for fastboot; added high baud rate DDR bin for serial firmware upgrades. sysdrv:source:kernel: Upgraded to version 5.10.160; increased NPU frequency for RV1106G3; added support for fastboot. Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
This commit is contained in:
@@ -802,6 +802,7 @@ xfs_ialloc(
|
||||
xfs_buf_t **ialloc_context,
|
||||
xfs_inode_t **ipp)
|
||||
{
|
||||
struct inode *dir = pip ? VFS_I(pip) : NULL;
|
||||
struct xfs_mount *mp = tp->t_mountp;
|
||||
xfs_ino_t ino;
|
||||
xfs_inode_t *ip;
|
||||
@@ -847,18 +848,17 @@ xfs_ialloc(
|
||||
return error;
|
||||
ASSERT(ip != NULL);
|
||||
inode = VFS_I(ip);
|
||||
inode->i_mode = mode;
|
||||
set_nlink(inode, nlink);
|
||||
inode->i_uid = current_fsuid();
|
||||
inode->i_rdev = rdev;
|
||||
ip->i_d.di_projid = prid;
|
||||
|
||||
if (pip && XFS_INHERIT_GID(pip)) {
|
||||
inode->i_gid = VFS_I(pip)->i_gid;
|
||||
if ((VFS_I(pip)->i_mode & S_ISGID) && S_ISDIR(mode))
|
||||
inode->i_mode |= S_ISGID;
|
||||
if (dir && !(dir->i_mode & S_ISGID) &&
|
||||
(mp->m_flags & XFS_MOUNT_GRPID)) {
|
||||
inode->i_uid = current_fsuid();
|
||||
inode->i_gid = dir->i_gid;
|
||||
inode->i_mode = mode;
|
||||
} else {
|
||||
inode->i_gid = current_fsgid();
|
||||
inode_init_owner(inode, dir, mode);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2669,14 +2669,13 @@ xfs_ifree_cluster(
|
||||
}
|
||||
|
||||
/*
|
||||
* This is called to return an inode to the inode free list.
|
||||
* The inode should already be truncated to 0 length and have
|
||||
* no pages associated with it. This routine also assumes that
|
||||
* the inode is already a part of the transaction.
|
||||
* This is called to return an inode to the inode free list. The inode should
|
||||
* already be truncated to 0 length and have no pages associated with it. This
|
||||
* routine also assumes that the inode is already a part of the transaction.
|
||||
*
|
||||
* The on-disk copy of the inode will have been added to the list
|
||||
* of unlinked inodes in the AGI. We need to remove the inode from
|
||||
* that list atomically with respect to freeing it here.
|
||||
* The on-disk copy of the inode will have been added to the list of unlinked
|
||||
* inodes in the AGI. We need to remove the inode from that list atomically with
|
||||
* respect to freeing it here.
|
||||
*/
|
||||
int
|
||||
xfs_ifree(
|
||||
@@ -2694,13 +2693,16 @@ xfs_ifree(
|
||||
ASSERT(ip->i_d.di_nblocks == 0);
|
||||
|
||||
/*
|
||||
* Pull the on-disk inode from the AGI unlinked list.
|
||||
* Free the inode first so that we guarantee that the AGI lock is going
|
||||
* to be taken before we remove the inode from the unlinked list. This
|
||||
* makes the AGI lock -> unlinked list modification order the same as
|
||||
* used in O_TMPFILE creation.
|
||||
*/
|
||||
error = xfs_iunlink_remove(tp, ip);
|
||||
error = xfs_difree(tp, ip->i_ino, &xic);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
error = xfs_difree(tp, ip->i_ino, &xic);
|
||||
error = xfs_iunlink_remove(tp, ip);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
@@ -2754,7 +2756,7 @@ xfs_iunpin(
|
||||
trace_xfs_inode_unpin_nowait(ip, _RET_IP_);
|
||||
|
||||
/* Give the log a push to start the unpinning I/O */
|
||||
xfs_log_force_lsn(ip->i_mount, ip->i_itemp->ili_last_lsn, 0, NULL);
|
||||
xfs_log_force_seq(ip->i_mount, ip->i_itemp->ili_commit_seq, 0, NULL);
|
||||
|
||||
}
|
||||
|
||||
@@ -3152,7 +3154,7 @@ xfs_rename(
|
||||
struct xfs_trans *tp;
|
||||
struct xfs_inode *wip = NULL; /* whiteout inode */
|
||||
struct xfs_inode *inodes[__XFS_SORT_INODES];
|
||||
struct xfs_buf *agibp;
|
||||
int i;
|
||||
int num_inodes = __XFS_SORT_INODES;
|
||||
bool new_parent = (src_dp != target_dp);
|
||||
bool src_is_directory = S_ISDIR(VFS_I(src_ip)->i_mode);
|
||||
@@ -3170,7 +3172,6 @@ xfs_rename(
|
||||
* appropriately.
|
||||
*/
|
||||
if (flags & RENAME_WHITEOUT) {
|
||||
ASSERT(!(flags & (RENAME_NOREPLACE | RENAME_EXCHANGE)));
|
||||
error = xfs_rename_alloc_whiteout(target_dp, &wip);
|
||||
if (error)
|
||||
return error;
|
||||
@@ -3265,6 +3266,30 @@ xfs_rename(
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Lock the AGI buffers we need to handle bumping the nlink of the
|
||||
* whiteout inode off the unlinked list and to handle dropping the
|
||||
* nlink of the target inode. Per locking order rules, do this in
|
||||
* increasing AG order and before directory block allocation tries to
|
||||
* grab AGFs because we grab AGIs before AGFs.
|
||||
*
|
||||
* The (vfs) caller must ensure that if src is a directory then
|
||||
* target_ip is either null or an empty directory.
|
||||
*/
|
||||
for (i = 0; i < num_inodes && inodes[i] != NULL; i++) {
|
||||
if (inodes[i] == wip ||
|
||||
(inodes[i] == target_ip &&
|
||||
(VFS_I(target_ip)->i_nlink == 1 || src_is_directory))) {
|
||||
struct xfs_buf *bp;
|
||||
xfs_agnumber_t agno;
|
||||
|
||||
agno = XFS_INO_TO_AGNO(mp, inodes[i]->i_ino);
|
||||
error = xfs_read_agi(mp, tp, agno, &bp);
|
||||
if (error)
|
||||
goto out_trans_cancel;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Directory entry creation below may acquire the AGF. Remove
|
||||
* the whiteout from the unlinked list first to preserve correct
|
||||
@@ -3317,22 +3342,6 @@ xfs_rename(
|
||||
* In case there is already an entry with the same
|
||||
* name at the destination directory, remove it first.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Check whether the replace operation will need to allocate
|
||||
* blocks. This happens when the shortform directory lacks
|
||||
* space and we have to convert it to a block format directory.
|
||||
* When more blocks are necessary, we must lock the AGI first
|
||||
* to preserve locking order (AGI -> AGF).
|
||||
*/
|
||||
if (xfs_dir2_sf_replace_needblock(target_dp, src_ip->i_ino)) {
|
||||
error = xfs_read_agi(mp, tp,
|
||||
XFS_INO_TO_AGNO(mp, target_ip->i_ino),
|
||||
&agibp);
|
||||
if (error)
|
||||
goto out_trans_cancel;
|
||||
}
|
||||
|
||||
error = xfs_dir_replace(tp, target_dp, target_name,
|
||||
src_ip->i_ino, spaceres);
|
||||
if (error)
|
||||
@@ -3709,16 +3718,16 @@ int
|
||||
xfs_log_force_inode(
|
||||
struct xfs_inode *ip)
|
||||
{
|
||||
xfs_lsn_t lsn = 0;
|
||||
xfs_csn_t seq = 0;
|
||||
|
||||
xfs_ilock(ip, XFS_ILOCK_SHARED);
|
||||
if (xfs_ipincount(ip))
|
||||
lsn = ip->i_itemp->ili_last_lsn;
|
||||
seq = ip->i_itemp->ili_commit_seq;
|
||||
xfs_iunlock(ip, XFS_ILOCK_SHARED);
|
||||
|
||||
if (!lsn)
|
||||
if (!seq)
|
||||
return 0;
|
||||
return xfs_log_force_lsn(ip->i_mount, lsn, XFS_LOG_SYNC, NULL);
|
||||
return xfs_log_force_seq(ip->i_mount, seq, XFS_LOG_SYNC, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user