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:
@@ -347,6 +347,25 @@ xlog_tic_add_region(xlog_ticket_t *tic, uint len, uint type)
|
||||
tic->t_res_num++;
|
||||
}
|
||||
|
||||
bool
|
||||
xfs_log_writable(
|
||||
struct xfs_mount *mp)
|
||||
{
|
||||
/*
|
||||
* Never write to the log on norecovery mounts, if the block device is
|
||||
* read-only, or if the filesystem is shutdown. Read-only mounts still
|
||||
* allow internal writes for log recovery and unmount purposes, so don't
|
||||
* restrict that case here.
|
||||
*/
|
||||
if (mp->m_flags & XFS_MOUNT_NORECOVERY)
|
||||
return false;
|
||||
if (xfs_readonly_buftarg(mp->m_log->l_targ))
|
||||
return false;
|
||||
if (XFS_FORCED_SHUTDOWN(mp))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Replenish the byte reservation required by moving the grant write head.
|
||||
*/
|
||||
@@ -746,6 +765,9 @@ xfs_log_mount_finish(
|
||||
if (readonly)
|
||||
mp->m_flags |= XFS_MOUNT_RDONLY;
|
||||
|
||||
/* Make sure the log is dead if we're returning failure. */
|
||||
ASSERT(!error || (mp->m_log->l_flags & XLOG_IO_ERROR));
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
@@ -886,15 +908,8 @@ xfs_log_unmount_write(
|
||||
{
|
||||
struct xlog *log = mp->m_log;
|
||||
|
||||
/*
|
||||
* Don't write out unmount record on norecovery mounts or ro devices.
|
||||
* Or, if we are doing a forced umount (typically because of IO errors).
|
||||
*/
|
||||
if (mp->m_flags & XFS_MOUNT_NORECOVERY ||
|
||||
xfs_readonly_buftarg(log->l_targ)) {
|
||||
ASSERT(mp->m_flags & XFS_MOUNT_RDONLY);
|
||||
if (!xfs_log_writable(mp))
|
||||
return;
|
||||
}
|
||||
|
||||
xfs_log_force(mp, XFS_LOG_SYNC);
|
||||
|
||||
@@ -3198,14 +3213,13 @@ out_error:
|
||||
}
|
||||
|
||||
static int
|
||||
__xfs_log_force_lsn(
|
||||
struct xfs_mount *mp,
|
||||
xlog_force_lsn(
|
||||
struct xlog *log,
|
||||
xfs_lsn_t lsn,
|
||||
uint flags,
|
||||
int *log_flushed,
|
||||
bool already_slept)
|
||||
{
|
||||
struct xlog *log = mp->m_log;
|
||||
struct xlog_in_core *iclog;
|
||||
|
||||
spin_lock(&log->l_icloglock);
|
||||
@@ -3238,8 +3252,6 @@ __xfs_log_force_lsn(
|
||||
if (!already_slept &&
|
||||
(iclog->ic_prev->ic_state == XLOG_STATE_WANT_SYNC ||
|
||||
iclog->ic_prev->ic_state == XLOG_STATE_SYNCING)) {
|
||||
XFS_STATS_INC(mp, xs_log_force_sleep);
|
||||
|
||||
xlog_wait(&iclog->ic_prev->ic_write_wait,
|
||||
&log->l_icloglock);
|
||||
return -EAGAIN;
|
||||
@@ -3277,25 +3289,29 @@ out_error:
|
||||
* to disk, that thread will wake up all threads waiting on the queue.
|
||||
*/
|
||||
int
|
||||
xfs_log_force_lsn(
|
||||
xfs_log_force_seq(
|
||||
struct xfs_mount *mp,
|
||||
xfs_lsn_t lsn,
|
||||
xfs_csn_t seq,
|
||||
uint flags,
|
||||
int *log_flushed)
|
||||
{
|
||||
struct xlog *log = mp->m_log;
|
||||
xfs_lsn_t lsn;
|
||||
int ret;
|
||||
ASSERT(lsn != 0);
|
||||
ASSERT(seq != 0);
|
||||
|
||||
XFS_STATS_INC(mp, xs_log_force);
|
||||
trace_xfs_log_force(mp, lsn, _RET_IP_);
|
||||
trace_xfs_log_force(mp, seq, _RET_IP_);
|
||||
|
||||
lsn = xlog_cil_force_lsn(mp->m_log, lsn);
|
||||
lsn = xlog_cil_force_seq(log, seq);
|
||||
if (lsn == NULLCOMMITLSN)
|
||||
return 0;
|
||||
|
||||
ret = __xfs_log_force_lsn(mp, lsn, flags, log_flushed, false);
|
||||
if (ret == -EAGAIN)
|
||||
ret = __xfs_log_force_lsn(mp, lsn, flags, log_flushed, true);
|
||||
ret = xlog_force_lsn(log, lsn, flags, log_flushed, false);
|
||||
if (ret == -EAGAIN) {
|
||||
XFS_STATS_INC(mp, xs_log_force_sleep);
|
||||
ret = xlog_force_lsn(log, lsn, flags, log_flushed, true);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user