Can't create the SD-Card for my appalis imx6

Hello,

I try to create the flash SD-Card from my yocto qt5 build.

I get the foaling message, if i run the update script:

./update.sh -o /media/bimmermann/appalis/
Apalis iMX6 rootfs detected

Creating MBR file and do the partitioning
0+0 Datensätze ein
0+0 Datensätze aus
0 bytes copied, 7,5129e-05 s, 0,0 kB/s
Modell:  (file)
Festplatte  /home/Apa/apalis-imx6_bin/mbr.bin:  7168000s
Sektorgröße (logisch/physisch): 512B/512B
Partitionstabelle: msdos
Disk-Flags: 

Nummer  Anfang  Ende      Größe     Typ      Dateisystem  Flags
 1      8192s   40959s    32768s    primary               LBA
 2      40960s  7127039s  7086080s  primary


Creating VFAT partition image with the kernel
mkfs.fat 3.0.28 (2015-05-16)
mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows

Creating rootfs partition image
1041+0 Datensätze ein
1041+0 Datensätze aus
1091567616 bytes (1,1 GB, 1,0 GiB) copied, 0,347246 s, 3,1 GB/s
mke2fs 1.42.13 (17-May-2015)
Geräteblöcke werden verworfen: erledigt                        
Ein Dateisystems mit 266496 (4k) Blöcken und 66672 Inodes wird erzeugt.
UUID des Dateisystems: a8804f2b-a6c8-416b-9489-37ecf03e4e17
Superblock-Sicherungskopien gespeichert in den Blöcken: 
	32768, 98304, 163840, 229376

beim Anfordern von Speicher für die Gruppentabellen: erledigt                        
Inode-Tabellen werden geschrieben: erledigt                        
Das Journal (8192 Blöcke) wird angelegt: erledgt
Die Superblöcke und die Informationen über die Dateisystemnutzung werden
geschrieben: erledigt

tune2fs 1.42.13 (17-May-2015)
Die maximale Anzahl von Einhängungen wird auf -1 gesezt
Der Abstand zwischen den Prüfläufen wird auf 0 Sekunden gesetzt
umount: mnt/tdx-rootfs: not mounted
cp: Fehler beim Schreiben von 'mnt/tdx-rootfs/usr/libexec/gcc/arm-angstrom-linux-gnueabi/6.2.1/cc1plus': Auf dem Gerät ist kein Speicherplatz mehr verfügbar
cp: Fehler beim Schreiben von 'mnt/tdx-rootfs/usr/libexec/gcc/arm-angstrom-linux-gnueabi/6.2.1/lto1': Auf dem Gerät ist kein Speicherplatz mehr verfügbar
cp: das Verzeichnis 'mnt/tdx-rootfs/usr/libexec/gstreamer-0.10' kann nicht angelegt werden: Auf dem Gerät ist kein Speicherplatz mehr verfügbar
cp: das Verzeichnis 'mnt/tdx-rootfs/usr/libexec/awk' kann nicht angelegt werden: Auf dem Gerät ist kein Speicherplatz mehr verfügbar
cp: das Verzeichnis 'mnt/tdx-rootfs/usr/sbin' kann nicht angelegt werden: Auf dem Gerät ist kein Speicherplatz mehr verfügbar
cp: das Verzeichnis 'mnt/tdx-rootfs/var' kann nicht angelegt werden: Auf dem Gerät ist kein Speicherplatz mehr verfügbar
Copying the rootfs failed.
Check for error messages from cp
Script aborted unexpectedly...

I don’t get it. I have 32GB space on the SD-Card that should/must be enough. I have more then 120GB free on my normal hard-drive. I have format the SD-Card in fat16 and fat 32, but that changes nothing. What I make wrong?

Have a nice day.

After a long search I have finally found the error.

I must increase the MIN_PARTITION_FREE_SIZE to 990 in the update.sh .
Maybe you should update the MIN_PARTITION_FREE_SIZE to a higher number then 200.

Can you please give me some detailed information about MIN_PARTITION_FREE_SIZE?
I think it only adds more space to the rootfs or?

Have a nice day.

Hi

With our traditional update script we try to minimize the initial size of the rootfs and then resize after first boot to the full size of the partition.
This is to minimize the time needed to flash modules.

The following heuristic is used to decide on the initial size:

  • using ‘sudo du -DsB1 rootfs’ to find the sum of all file sizes fsize
  • counting the number of files f and add 512 bytes per file (to account for partly used blocks) ‘sudo find ${ROOTFSPATH} | wc -l’
  • assume a file system overhead of 4% (journaling, directory size …)
  • add a constant MIN_PARTITION_FREE_SIZE (to adjust for wrong assumptions and not do a first boot with a full filesystem)

size = (fsize + f*512) * 1.04 + MIN_PARTITION_FREE_SIZE

If you deviate a lot from our standard image (e.g. way bigger, lots of very small files …) it is possible that the rootfs does not fit.

One way out is to increase the MIN_PARTITION_FREE_SIZE as you already did.
Another would probably be to increase the size added per file, e.g. from 512 to 1024 bytes.

Max