Wind River Support Network

HomeDefectsLIN9-6879
Fixed

LIN9-6879 : create-sdcard.sh script fails on modern distros

Created: May 16, 2018    Updated: Apr 20, 2020
Resolved Date: May 27, 2018
Found In Version: 9.0.0.15
Fix Version: 9.0.0.16
Severity: Standard
Applicable for: Wind River Linux 9
Component/s: BSP

Description

The layers/nxp-imx6/bootloader/create-sdcard.sh script uses the sfdisk command with deprecated arguments and fails to prepare the SD card.

Workaround

Manually create 2 partitions (FAT32 and EXT3) on the SD card

Steps to Reproduce

On Ubuntu 16.04:

layers/nxp-imx6/bootloader$ sudo ./create-sdcard.sh /dev/sdc
################################################################################

This script will create a bootable SD card for wrlinux bsp fsl-imx6

The script must be run with root permissions

Example:
 $ sudo ./create-sdcard.sh /dev/sde

################################################################################

NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sdc      8:32   1  7,4G  0 disk 
├─sdc2   8:34   1  7,3G  0 part /media/nmarguet/root
└─sdc1   8:33   1   33M  0 part /media/nmarguet/BOOT
Would you like to re-partition the drive anyways for /dev/sdc [y/n] : y

Are you sure for formating /dev/sdc [y/n] : y

Now partitioning  ...
Unmounting the /dev/sdc drives
umount /dev/sdc2
umount /dev/sdc1
1024+0 records in
1024+0 records out
1048576 bytes (1,0 MB, 1,0 MiB) copied, 0,238792 s, 4,4 MB/s
DISK SIZE - 7906263040 bytes
sfdisk: invalid option -- 'D'
Live chat
Online