Creating SD card in Windows

Hi,
Just finished the yocto build based in this page:

But I have used wsl in windows and I can not attach sdcard.

It is possible to write the build file to sd card?

Thanks.

Hi,
Just finished the yocto build based in this page:
https://github.com/linuxdev-linumiz/meta-stinger96-bsp

But I have used wsl in windows and I can not attach sdcard.

It is possible to write the build file to sd card?

Yes. There are several tools for this but (I’m told) balenaEtcher
can be useful for Windows users.

hi @danielt,
Thank you for your reply, I know this tool, but after yocto build we have several files:


But in the belenaEtcher I can choose 1 file.

What can be done here? Is it possible that after the build we have 1 “iso” file?

Use one of the .wic files. It doesn’t matter which one since one is a shortcut to the other.

Sorry, actually there is also a PS…

PS Please try not to post screenshots of text… it is better to post the real text instead (for example ls combined with copy 'n paste). Posting real text works better with search engines and with the forum’s e-mail bridges.

@danielt , it didn’t worked, somehow this method ruins my sd card to several particions.
Do oyu have other idea? :slight_smile:

Not that many. I don’t have this board and am only really helping you adapt the documentation for Windows.

Using balanaEtcher to write stinger96-image-base-sd-stinger96.wic to the SD card really is just the Windows equivalent of sudo dd if=tmp/deploy/images/stinger96/stinger96-image-base-sd-stinger96.wic of=/dev/sdX iflag=fullblock conv=fsync status=progress bs=8M; sync (which is copied directly from the docs). Nothing more, nothing less.

However, what do you mean by “didn’t worked, somehow this method ruins my sd card to several particions”.

To be clear I would expect writing a .wic file to result in an SD card containing several partitions and, according to the template in sd.wks, none of these partitions would be readable by Windows. In fact Windows might even warn you about corrupt GPT backup tables when you insert the SD card (which is correct but harmless).

1 Like

hi @danielt , I can not use this method, it breaks my sd card.
Try to find solution to have an ISO file at the output like here:

I’m afraid I am totally lost.

Firstly I have no idea what you mean by “it breaks my sd card”. An unclear five word explanation of your problem is unlikely ever to be enough to get much help. You need to explain what you observed, what you expected to observe and why you think the SD card is broken.

Secondly, I cannot find any ISO file at the link you shared.

@danielt web page what I mentioned / Software / Linux image → if you open you can see an iso file.

Please include a little more info with each comment. In this case filenames would be useful and for the previous comments about “breaking/ruining your SD card” you need to share what you actually did, what you expected and what you actually observed to reach that conclusion.

As an example about sharing observations rather than conclusions, if I were to reply with my conclusion, which is that there are no ISO files in the Linux image section, then this isn’t very helpful. It is more helpful if I explain what I mean.

I am guessing (without a filename) that you are describing stinger96_sdcard.img? If so then this is not an ISO file. This is a disk image and is using GPT partitioning rather than raw ISO(9660) format. We can see this using /sbin/gdisk -l:

Found valid GPT with protective MBR; using GPT.
Disk stinger96_sdcard.img: 2252800 sectors, 1.1 GiB
Sector size (logical): 512 bytes
Disk identifier (GUID): 4D8F78F7-EB20-422E-A23E-D596C22E074D
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 2252766
Partitions will be aligned on 2-sector boundaries
Total free space is 0 sectors (0 bytes)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              34             545   256.0 KiB   8300  fsbl1
   2             546            1057   256.0 KiB   8300  fsbl2
   3            1058            5153   2.0 MiB     8300  ssbl
   4            5154          136225   64.0 MiB    8300  bootfs
   5          136226          168993   16.0 MiB    8300  vendorfs
   6          168994         1705857   750.4 MiB   8300  rootfs
   7         1705858         2252766   267.0 MiB   8300  userfs

The file you build using OpenEmbedded is also a GPT file. Use /sbin/gdisk -l and you will see the partitioning is similar (same bootloader partitions, simpler OS structure):

Found valid GPT with protective MBR; using GPT.
Disk tmp/deploy/images/stinger96/stinger96-image-base-sd-stinger96.wic: 365250 sectors, 178.3 MiB
Sector size (logical): 512 bytes
Disk identifier (GUID): EB1CAF1D-D3C9-44F8-A82A-16A5BD2E1F73
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 365216
Partitions will be aligned on 2-sector boundaries
Total free space is 3039 sectors (1.5 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              34             545   256.0 KiB   8301  fsbl1
   2             546            1057   256.0 KiB   8301  fsbl2
   3            1058            5153   2.0 MiB     8301  ssbl
   4            8192          365215   174.3 MiB   8300  rootfs
1 Like

@danielt thank you for your help.
What I meant with “ruins my sd card” is that my windows goes to blue death and recognize that we have a hardware errpr, I can not plug my sd card again.

In all honesty that sounds like a faulty SD card. Software like etcher might reveal faulty SD cards but shouldn’t cause it. Are you running Windows 10? I could write the .wic to an SD card to check.

Just bought yesterday that sd card.
Waiting for support in other place, because I think the only way for me if I build only 1 file. Is it possible to zip the generated files?

Sure, zip stinger96_image.zip tmp/deploy/images/stinger96/stinger96-image-base-sd-stinger96.wic should do it (once you install the zip tool in wsl).