mirror of
https://github.com/lingble/meta-tegra.git
synced 2025-10-29 03:22:36 +00:00
tegra-flash-init: add erase-nvme command
to allow the user to wipe an attached NVMe drive if switching back to booting from internal storage during initrd flashing. Signed-off-by: Matt Madison <matt@madison.systems>
This commit is contained in:
committed by
Matt Madison
parent
d6ac070b6c
commit
ee3094f7bc
@@ -158,6 +158,13 @@ else
|
||||
echo "/dev/mmcblk0 does not exist, skipping" > /tmp/flashpkg/flashpkg/logs/erase-mmc.log
|
||||
fi
|
||||
;;
|
||||
erase-nvme)
|
||||
if [ -b /dev/nvme0n1 ]; then
|
||||
blkdiscard -f /dev/nvme0n1 2>&1 > /tmp/flashpkg/flashpkg/logs/erase-nvme.log
|
||||
else
|
||||
echo "/dev/nvme0n1 does not exist, skipping" > /tmp/flashpkg/flashpkg/logs/erase-nvme.log
|
||||
fi
|
||||
;;
|
||||
export-devices)
|
||||
for dev in $args; do
|
||||
if setup_usb_export /dev/$dev $dev 2>&1 > /tmp/flashpkg/flashpkg/logs/export-$dev.log; then
|
||||
|
||||
Reference in New Issue
Block a user