added upload uboot

This commit is contained in:
wt
2026-03-14 06:38:19 +07:00
parent febecf4dd9
commit 844f839c51
5 changed files with 215 additions and 27 deletions
+8
View File
@@ -15,6 +15,7 @@ document.addEventListener("DOMContentLoaded", function () {
const mountStatus = document.getElementById("mount-status");
const extlinuxEditor = document.getElementById("extlinux-editor");
const editorStatus = document.getElementById("editor-status");
const uploadHint = document.getElementById("upload-hint");
// Tab buttons
const tabBtns = document.querySelectorAll(".tab-btn");
@@ -32,6 +33,13 @@ document.addEventListener("DOMContentLoaded", function () {
this.classList.add("active");
uploadType.value = this.dataset.type;
hideResult();
// Show/hide U-Boot warning
if (this.dataset.type === "uboot_bin") {
uploadHint.classList.add("visible");
} else {
uploadHint.classList.remove("visible");
}
});
});
+8
View File
@@ -56,6 +56,9 @@
<button class="tab-btn" data-type="uboot">
U-Boot Environment
</button>
<button class="tab-btn" data-type="uboot_bin">
U-Boot Binary (SPL)
</button>
</div>
<div class="upload-area">
@@ -81,6 +84,11 @@
<span class="file-name" id="file-name"></span>
</label>
</div>
<div class="upload-hint" id="upload-hint">
⚠️ U-Boot Binary will be written to SPI NOR
(/dev/mtd0) and SD card at 8KB offset (/dev/mmcblk1
+8KB)
</div>
<button type="submit" class="upload-btn">Upload</button>
</form>
+15
View File
@@ -146,6 +146,21 @@ h2 {
text-align: center;
}
.upload-hint {
margin: 15px 0;
padding: 12px;
background: rgba(255, 165, 0, 0.15);
border: 1px solid rgba(255, 165, 0, 0.5);
border-radius: 8px;
color: #ffa500;
font-size: 0.9rem;
display: none;
}
.upload-hint.visible {
display: block;
}
.file-input-wrapper {
margin-bottom: 20px;
}