added upload uboot
This commit is contained in:
@@ -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");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user