Skip to content

Commit

Permalink
add nvme_all build-in command
Browse files Browse the repository at this point in the history
  • Loading branch information
nxpfrankli committed Nov 1, 2022
1 parent af7f242 commit 03bcd4c
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 1 deletion.
14 changes: 13 additions & 1 deletion msvc/uuu.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ echo )####^" >> $(SolutionDir)\..\uuu\emmc_burn_loader.clst
echo R^"####( > $(SolutionDir)\..\uuu\qspi_burn_loader.clst
type $(SolutionDir)\..\uuu\qspi_burn_loader.lst >> $(SolutionDir)\..\uuu\qspi_burn_loader.clst
echo )####^" >> $(SolutionDir)\..\uuu\qspi_burn_loader.clst
echo R^"####( > $(SolutionDir)\..\uuu\nvme_burn_all.clst
type $(SolutionDir)\..\uuu\nvme_burn_all.lst >> $(SolutionDir)\..\uuu\nvme_burn_all.clst
echo )####^" >> $(SolutionDir)\..\uuu\nvme_burn_all.clst
echo R^"####( > $(SolutionDir)\..\uuu\sd_burn_loader.clst
type $(SolutionDir)\..\uuu\sd_burn_loader.lst >> $(SolutionDir)\..\uuu\sd_burn_loader.clst
echo )####^" >> $(SolutionDir)\..\uuu\sd_burn_loader.clst
Expand Down Expand Up @@ -174,6 +177,9 @@ echo )####^" >> $(SolutionDir)\..\uuu\emmc_burn_loader.clst
echo R^"####( > $(SolutionDir)\..\uuu\qspi_burn_loader.clst
type $(SolutionDir)\..\uuu\qspi_burn_loader.lst >> $(SolutionDir)\..\uuu\qspi_burn_loader.clst
echo )####^" >> $(SolutionDir)\..\uuu\qspi_burn_loader.clst
echo R^"####( > $(SolutionDir)\..\uuu\nvme_burn_all.clst
type $(SolutionDir)\..\uuu\nvme_burn_all.lst >> $(SolutionDir)\..\uuu\nvme_burn_all.clst
echo )####^" >> $(SolutionDir)\..\uuu\nvme_burn_all.clst
echo R^"####( > $(SolutionDir)\..\uuu\sd_burn_loader.clst
type $(SolutionDir)\..\uuu\sd_burn_loader.lst >> $(SolutionDir)\..\uuu\sd_burn_loader.clst
echo )####^" >> $(SolutionDir)\..\uuu\sd_burn_loader.clst
Expand Down Expand Up @@ -229,6 +235,9 @@ echo )####^" >> $(SolutionDir)\..\uuu\emmc_burn_loader.clst
echo R^"####( > $(SolutionDir)\..\uuu\qspi_burn_loader.clst
type $(SolutionDir)\..\uuu\qspi_burn_loader.lst >> $(SolutionDir)\..\uuu\qspi_burn_loader.clst
echo )####^" >> $(SolutionDir)\..\uuu\qspi_burn_loader.clst
echo R^"####( > $(SolutionDir)\..\uuu\nvme_burn_all.clst
type $(SolutionDir)\..\uuu\nvme_burn_all.lst >> $(SolutionDir)\..\uuu\nvme_burn_all.clst
echo )####^" >> $(SolutionDir)\..\uuu\nvme_burn_all.clst
echo R^"####( > $(SolutionDir)\..\uuu\sd_burn_loader.clst
type $(SolutionDir)\..\uuu\sd_burn_loader.lst >> $(SolutionDir)\..\uuu\sd_burn_loader.clst
echo )####^" >> $(SolutionDir)\..\uuu\sd_burn_loader.clst
Expand Down Expand Up @@ -284,6 +293,9 @@ echo )####^" >> $(SolutionDir)\..\uuu\emmc_burn_loader.clst
echo R^"####( > $(SolutionDir)\..\uuu\qspi_burn_loader.clst
type $(SolutionDir)\..\uuu\qspi_burn_loader.lst >> $(SolutionDir)\..\uuu\qspi_burn_loader.clst
echo )####^" >> $(SolutionDir)\..\uuu\qspi_burn_loader.clst
echo R^"####( > $(SolutionDir)\..\uuu\nvme_burn_all.clst
type $(SolutionDir)\..\uuu\nvme_burn_all.lst >> $(SolutionDir)\..\uuu\nvme_burn_all.clst
echo )####^" >> $(SolutionDir)\..\uuu\nvme_burn_all.clst
echo R^"####( > $(SolutionDir)\..\uuu\sd_burn_loader.clst
type $(SolutionDir)\..\uuu\sd_burn_loader.lst >> $(SolutionDir)\..\uuu\sd_burn_loader.clst
echo )####^" >> $(SolutionDir)\..\uuu\sd_burn_loader.clst
Expand Down Expand Up @@ -313,4 +325,4 @@ echo )####^" &gt;&gt; $(SolutionDir)\..\uuu\nand_burn_loader.clst</Command>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
1 change: 1 addition & 0 deletions uuu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ set(LSTS
spl_boot.lst
sd_burn_all.lst
nand_burn_loader.lst
nvme_burn_all.lst
)

link_directories(${CMAKE_CURRENT_SOURCE_DIR}/libuuu ${LIBUSB_LIBRARY_DIRS} ${LIBZSTD_LIBRARY_DIRS} ${LIBZ_LIBRARY_DIRS})
Expand Down
5 changes: 5 additions & 0 deletions uuu/buildincmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,11 @@ static constexpr BuiltInScriptRawData g_builtin_cmd[] =
#include "spl_boot.clst"
,"boot spl and uboot"
},
{
"nvme_all",
#include "nvme_burn_all.clst"
,"burn whole image io nvme storage"
},
{
nullptr,
nullptr,
Expand Down
34 changes: 34 additions & 0 deletions uuu/nvme_burn_all.lst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
uuu_version 1.4.149

# @_flash.bin | bootloader, which can extract from wic image
# @_image [_flash.bin] | wic image burn to emmc.


# This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ
SDP: boot -f _flash.bin -scanlimited 0x800000

# This command will be run when ROM support stream mode
# i.MX8QXP, i.MX8QM
SDPS: boot -scanterm -f _flash.bin -scanlimited 0x800000

# These commands will be run when use SPL and will be skipped if no spl
# SDPU will be deprecated. please use SDPV instead of SDPU
# {
SDPU: delay 1000
SDPU: write -f _flash.bin -offset 0x57c00
SDPU: jump -scanlimited 0x800000
# }

# These commands will be run when use SPL and will be skipped if no spl
# if (SPL support SDPV)
# {
SDPV: delay 1000
SDPV: write -f _flash.bin -skipspl -scanterm -scanlimited 0x800000
SDPV: jump -scanlimited 0x800000
# }

FB: ucmd pci
FB: ucmd nvme scan
FB: ucmd setenv fastboot_buffer ${loadaddr}
FB: write -format "nvme write ${fastboot_buffer} @off @size" -blksz 512 -f _image
FB: done

0 comments on commit 03bcd4c

Please sign in to comment.