| 1 | // SPDX-FileCopyrightText: 2020 - 2022 UnionTech Software Technology Co., Ltd. |
| 2 | // |
| 3 | // SPDX-License-Identifier: GPL-3.0-only |
| 4 | |
| 5 | #include "qtmipsinstaller.h" |
| 6 | |
| 7 | #include <XSys> |
| 8 | #include <QDebug> |
| 9 | |
| 10 | QtMipsInstaller::QtMipsInstaller(QObject *parent) : QtBaseInstaller (parent) |
| 11 | { |
| 12 | |
| 13 | } |
| 14 | |
| 15 | bool QtMipsInstaller::installBootload() |
| 16 | { |
| 17 | qInfo() << "begin install bootloader on" << m_strPartionName; |
| 18 | m_progressStatus = INSTALLBOOTLOADER; |
| 19 | |
| 20 | QString strDisk = XSys::DiskUtil::GetPartitionDisk(m_strPartionName); |
| 21 | |
| 22 | if (strDisk.isEmpty()) { |
| 23 | return false; |
| 24 | } |
| 25 | |
| 26 | if (!XSys::DiskUtil::SetActivePartion(strDisk, m_strPartionName)) { |
| 27 | return false; |
| 28 | } |
| 29 | |
| 30 | XSys::DiskUtil::SetPartionLabel(m_strPartionName, m_strImage); |
| 31 | return true; |
| 32 | } |