DomenicP / final-project-assignment-DomenicP

CU Boulder ECEA 5307 Final Project
0 stars 0 forks source link

Tegraflash fails to flash SD card for Mender A/B partition scheme #4

Closed DomenicP closed 1 hour ago

DomenicP commented 4 hours ago

Description

Using the ./dosdcard.sh script from the tegraflash bundle fails to create partitions on an SD card with the following error message

$ sudo ./dosdcard.sh /dev/mmcblk0
<tegraflash signing output>
...
About to make an SDcard image on /dev/mmcblk0. OK? yes
Creating partitions
  [01] name=APP start=0 size=63963136 sectors
  [02] name=APP_b start=0 size=63963136 sectors
  [03] name=UDA (fills to end)
ERR: partitioning failed
Could not create partition 2 from 63965184 to 127928319
Could not change partition 2's type code to 8300!
Unable to set partition 2's name to 'APP_b'!
Error encountered; not saving changes.

I traced through the bash scripts and found the sgdisk command that is failing. Creating the first partition is fine, but creating the second and third partition fails.

Details

Reference instructions: https://github.com/OE4T/meta-tegra/wiki/Flashing-the-Jetson-Dev-Kit#writing-an-sdcard meta-tegra branch: kirkstone-l4t-r32.7.x SD card: SanDisk Ultra 64GB Micro SDXC

Attempted the build and flash from two machines:

Definition of Done (DoD)

Blockers

None

DomenicP commented 4 hours ago

Some theories:

DomenicP commented 1 hour ago

False alarm, GB vs. GiB confusion. The SD card advertised as 64GB is in fact smaller

Disk /dev/sdb: 59.49 GiB, 63864569856 bytes, 124735488 sectors