Skip to contentSkip to conversation

New: raspberrypi3_defconfig: "Inappropriate ioctl for device" almost at end when sdcard.img is created

Buildroot bugzilla at busybox.net 1 participant 17 messages Aug 10, 2020 – Aug 12, 2020

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=13146

Bug ID: 13146
Summary: raspberrypi3_defconfig: "Inappropriate ioctl for
device" almost at end when sdcard.img is created
Product: buildroot
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: marie.maurer at mmeacs.de
CC: buildroot at uclibc.org
Target Milestone: ---

Buildroot 2020-08-rc1 (make raspberrypi3_defconfig) All default settings, on Ubuntu 20.04 LTS

?

Creating regular file /home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rootfs.ext2

64-bit filesystem support is not enabled. The larger fields afforded by this feature enable full-strength checksumming. Pass -O 64bit to rectify.

Creating filesystem with 122880 1k blocks and 30720 inodes

Filesystem UUID: c2097238-7b0a-451c-b38f-efe1a3cb7ebc

Superblock backups stored on blocks:

        8193, 24577, 40961, 57345, 73729

Allocating group tables: done

Writing inode tables: done

Creating journal (4096 blocks): done

Copying files into the device: done

Writing superblocks and filesystem accounting information: done

ln -sf rootfs.ext2 /home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rootfs.ext4

Quoted 1 line
Quoted 1 line
Quoted 1 line

Executing post-image script board/raspberrypi3/post-image.sh

board/raspberrypi3/genimage-raspberrypi3.cfg:34: no sub-section title/index for 'config'

INFO: cmd: "mkdir -p "/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/genimage.tmp"" (stderr):

INFO: cmd: "rm -rf "/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/genimage.tmp"/*" (stderr):

INFO: cmd: "mkdir -p "/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/genimage.tmp"" (stderr):

INFO: cmd: "cp -a "/tmp/tmp.gaxNr8y31f" "/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/genimage.tmp/root"" (stderr):

INFO: cmd: "find '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/genimage.tmp/root' -depth -type d -printf '%P\0' | xargs -0 -I {} touch -r '/tmp/tmp.gaxNr8y31f/{}' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/genimage.tmp/root/{}'" (stderr):

INFO: cmd: "mkdir -p "/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images"" (stderr):

INFO: vfat(boot.vfat): cmd: "dd if=/dev/zero of="/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat" seek=33554432 count=0 bs=1 2>/dev/null" (stderr):

INFO: vfat(boot.vfat): cmd: "mkdosfs '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat'" (stderr):

INFO: vfat(boot.vfat): adding file 'bcm2710-rpi-3-b.dtb' as 'bcm2710-rpi-3-b.dtb' ...

INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/bcm2710-rpi-3-b.dtb' '::'" (stderr):

INFO: vfat(boot.vfat): adding file 'bcm2710-rpi-3-b-plus.dtb' as 'bcm2710-rpi-3-b-plus.dtb' ...

INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/bcm2710-rpi-3-b-plus.dtb' '::'" (stderr):

INFO: vfat(boot.vfat): adding file 'bcm2710-rpi-cm3.dtb' as 'bcm2710-rpi-cm3.dtb' ...

INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/bcm2710-rpi-cm3.dtb' '::'" (stderr):

INFO: vfat(boot.vfat): adding file 'rpi-firmware/bootcode.bin' as 'rpi-firmware/bootcode.bin' ...

INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rpi-firmware/bootcode.bin' '::'" (stderr):

INFO: vfat(boot.vfat): adding file 'rpi-firmware/cmdline.txt' as 'rpi-firmware/cmdline.txt' ...

INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rpi-firmware/cmdline.txt' '::'" (stderr):

INFO: vfat(boot.vfat): adding file 'rpi-firmware/config.txt' as 'rpi-firmware/config.txt' ...

INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rpi-firmware/config.txt' '::'" (stderr):

INFO: vfat(boot.vfat): adding file 'rpi-firmware/fixup.dat' as 'rpi-firmware/fixup.dat' ...

INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rpi-firmware/fixup.dat' '::'" (stderr):

INFO: vfat(boot.vfat): adding file 'rpi-firmware/start.elf' as 'rpi-firmware/start.elf' ...

INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rpi-firmware/start.elf' '::'" (stderr):

INFO: vfat(boot.vfat): adding file 'rpi-firmware/overlays' as 'rpi-firmware/overlays' ...

INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rpi-firmware/overlays' '::'" (stderr):

INFO: vfat(boot.vfat): adding file 'zImage' as 'zImage' ...

INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/zImage' '::'" (stderr):

INFO: hdimage(sdcard.img): adding partition 'boot' (in MBR) from 'boot.vfat'
...

ERROR: hdimage(sdcard.img): fiemap /home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat:
25 Inappropriate ioctl for device

ERROR: hdimage(sdcard.img): failed to write image partition 'boot'

INFO: hdimage(sdcard.img): cmd: "rm -f "/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/sdcard.img"" (stderr):

ERROR: hdimage(sdcard.img): failed to generate sdcard.img

make: *** [Makefile:835: target-post-image] Error 1

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#1 lore raw

[Buildroot] [Bug 13146] raspberrypi3_defconfig: "Inappropriate ioctl for device" almost at end when sdcard.img is created

https://bugs.busybox.net/show_bug.cgi?id=13146

--- Comment #1 from Peter Seiderer <[email protected]> ---
Does not happen here (openSUSE Tumbleweed, ext4 filesystem), which filesystem do you use?

The fiemap feature was introduces lately in genimage (see [1]), and there is a fallback in case the fiemap ioctl fails (see [2]):

        /* If failure is due to no filesystem support, return a single extent
*/
        if (ret == -EOPNOTSUPP)
                return whole_file_exent(size, extents, extent_count);

You can try to extend this check for ENOTTY (25) like the following:

        if (ret == -EOPNOTSUPP || ret == -ENOTTY)

or more correct (as 'ret = -errno;' some lines above):

        if (ret == EOPNOTSUPP || ret == ENOTTY)

and/or fallback to an earlier version of genimage in buildroot by reverting the latest version bump commit [3]...

[1]
https://github.com/pengutronix/genimage/commit/1b98d6fadfca76cc0202a2df3debc67a8fe0ee1a
[2] https://github.com/pengutronix/genimage/blob/master/util.c#L390
[3]
https://git.buildroot.net/buildroot/commit/?id=677b0d9f574e2860cd22cb36022e5c059b4e6af5

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#2 lore raw

[Buildroot] [Bug 13146] raspberrypi3_defconfig: "Inappropriate ioctl for device" almost at end when sdcard.img is created

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13146

--- Comment #2 from Marie Maurer <[email protected]> --- Some additional information:

I compiled in WSL (Ubuntu 20.04 LTS) under Windows 10:

marie at 2020L009:~$ mount
rootfs on / type lxfs (rw,noatime)
none on /dev type tmpfs (rw,noatime,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,gid=5,mode=620) none on /run type tmpfs (rw,nosuid,noexec,noatime,mode=755)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,noatime) none on /run/shm type tmpfs (rw,nosuid,nodev,noatime)
none on /run/user type tmpfs (rw,nosuid,nodev,noexec,noatime,mode=755) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime) tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755) cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
C:\ on /mnt/c type drvfs (rw,noatime,uid=1000,gid=1000,case=off) marie at 2020L009:~$ pwd
/home/marie

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#3 lore raw

[Buildroot] [Bug 13146] raspberrypi3_defconfig: "Inappropriate ioctl for device" almost at end when sdcard.img is created

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13146

--- Comment #3 from Marie Maurer <[email protected]> --- I added second suggested line and called "make" again. Now I get the following output:

Quoted 1 line
Quoted 1 line
Quoted 1 line

Generating filesystem image rootfs.ext2

mkdir -p /home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images rm -rf /home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/ext2 mkdir -p /home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/ext2 rsync -auH --exclude=/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM /home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/target/ /home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/ext2/target echo '#!/bin/sh' > /home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/ext2/fakeroot echo "set -e" >> /home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/ext2/fakeroot echo "chown -h -R 0:0 /home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/ext2/target"

Quoted 1 line
Quoted 1 line

/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/ext2/fakeroot PATH="/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/host/bin:/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_2004.2020.424.0_x64__79rhkp1fndgsc:/mnt/c/Program
Files (x86)/Common
Files/Oracle/Java/javapath:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/TortoiseGit/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/Nordic
Semiconductor/nrf-command-line-tools/bin/:/mnt/c/Program Files
(x86)/STMicroelectronics/STM32 ST-LINK Utility/ST-LINK Utility:/mnt/c/Users/marie.maurer/AppData/Local/Microsoft/WindowsApps:/mnt/c/util:/mnt/c/users/marie.maurer/appdata/local/programs/python/python38/Scripts:/snap/bin" /home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/support/scripts/mkusers
/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/full_users_table.txt
/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/ext2/target

Quoted 1 line
Quoted 1 line

/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/ext2/fakeroot echo
"/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/host/bin/makedevs
-d /home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/full_devices_table.txt /home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/ext2/target"

Quoted 1 line
Quoted 1 line

/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/ext2/fakeroot
printf ' \n' >>
/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/ext2/fakeroot
printf ' rm -f
/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rootfs.ext2\n

/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/host/sbin/mkfs.ext4
-d
/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/ext2/target
-r 1 -N 0 -m 5 -L "rootfs" -O ^64bit
/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rootfs.ext2
"120M" || { ret=$?; echo "*** Maybe you need to increase the filesystem size
(BR2_TARGET_ROOTFS_EXT2_SIZE)" 1>&2; exit $ret; }\n' >>
/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/ext2/fakeroot
chmod a+x
/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/ext2/fakeroot PATH="/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/host/bin:/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_2004.2020.424.0_x64__79rhkp1fndgsc:/mnt/c/Program
Files (x86)/Common
Files/Oracle/Java/javapath:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/TortoiseGit/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/Nordic
Semiconductor/nrf-command-line-tools/bin/:/mnt/c/Program Files
(x86)/STMicroelectronics/STM32 ST-LINK Utility/ST-LINK Utility:/mnt/c/Users/marie.maurer/AppData/Local/Microsoft/WindowsApps:/mnt/c/util:/mnt/c/users/marie.maurer/appdata/local/programs/python/python38/Scripts:/snap/bin"
FAKEROOTDONTTRYCHOWN=1
/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/host/bin/fakeroot
--
/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/ext2/fakeroot
rootdir=/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/ext2/target table='/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/buildroot-fs/full_devices_table.txt'
mke2fs 1.45.6 (20-Mar-2020)
Creating regular file
/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rootfs.ext2
64-bit filesystem support is not enabled. The larger fields afforded by this
feature enable full-strength checksumming. Pass -O 64bit to rectify.
Creating filesystem with 122880 1k blocks and 30720 inodes
Filesystem UUID: c81809b4-af64-4851-83b9-838060850343
Superblock backups stored on blocks:

        8193, 24577, 40961, 57345, 73729

Allocating group tables: done
Writing inode tables: done
Creating journal (4096 blocks): done
Copying files into the device: done
Writing superblocks and filesystem accounting information: done

ln -sf rootfs.ext2 /home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rootfs.ext4

Quoted 1 line
Quoted 1 line
Quoted 1 line

Executing post-image script board/raspberrypi3/post-image.sh

board/raspberrypi3/genimage-raspberrypi3.cfg:34: no sub-section title/index for 'config'
INFO: cmd: "mkdir -p "/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/genimage.tmp"" (stderr):
INFO: cmd: "rm -rf "/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/genimage.tmp"/*" (stderr):
INFO: cmd: "mkdir -p "/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/genimage.tmp"" (stderr):
INFO: cmd: "cp -a "/tmp/tmp.gpxMoEOrt8" "/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/genimage.tmp/root"" (stderr):
INFO: cmd: "find '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/genimage.tmp/root' -depth -type d -printf '%P\0' | xargs -0 -I {} touch -r
'/tmp/tmp.gpxMoEOrt8/{}' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/genimage.tmp/root/{}'" (stderr):
INFO: cmd: "mkdir -p "/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images"" (stderr):
INFO: vfat(boot.vfat): cmd: "dd if=/dev/zero of="/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat" seek=33554432 count=0 bs=1 2>/dev/null" (stderr):
INFO: vfat(boot.vfat): cmd: "mkdosfs '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat'" (stderr):
INFO: vfat(boot.vfat): adding file 'bcm2710-rpi-3-b.dtb' as
'bcm2710-rpi-3-b.dtb' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/bcm2710-rpi-3-b.dtb' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'bcm2710-rpi-3-b-plus.dtb' as 'bcm2710-rpi-3-b-plus.dtb' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/bcm2710-rpi-3-b-plus.dtb' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'bcm2710-rpi-cm3.dtb' as
'bcm2710-rpi-cm3.dtb' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/bcm2710-rpi-cm3.dtb' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'rpi-firmware/bootcode.bin' as 'rpi-firmware/bootcode.bin' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rpi-firmware/bootcode.bin' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'rpi-firmware/cmdline.txt' as 'rpi-firmware/cmdline.txt' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rpi-firmware/cmdline.txt' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'rpi-firmware/config.txt' as 'rpi-firmware/config.txt' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rpi-firmware/config.txt' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'rpi-firmware/fixup.dat' as 'rpi-firmware/fixup.dat' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rpi-firmware/fixup.dat' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'rpi-firmware/start.elf' as 'rpi-firmware/start.elf' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rpi-firmware/start.elf' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'rpi-firmware/overlays' as 'rpi-firmware/overlays' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rpi-firmware/overlays' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'zImage' as 'zImage' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/zImage' '::'" (stderr):
INFO: hdimage(sdcard.img): adding partition 'boot' (in MBR) from 'boot.vfat'
...
ERROR: hdimage(sdcard.img): fiemap /home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat:
25 Inappropriate ioctl for device
ERROR: hdimage(sdcard.img): failed to write image partition 'boot'
INFO: hdimage(sdcard.img): cmd: "rm -f "/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/sdcard.img"" (stderr):
ERROR: hdimage(sdcard.img): failed to generate sdcard.img
make: *** [Makefile:835: target-post-image] Error 1

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#4 lore raw

[Buildroot] [Bug 13146] raspberrypi3_defconfig: "Inappropriate ioctl for device" almost at end when sdcard.img is created

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13146

--- Comment #4 from Marie Maurer <[email protected]> --- (In reply to Marie Maurer from comment #3)

Wrong log output in previous comment, sorry!

Here is the right one:

Quoted 1 line
Quoted 1 line
Quoted 1 line

Executing post-image script board/raspberrypi3/post-image.sh

board/raspberrypi3/genimage-raspberrypi3.cfg:34: no sub-section title/index for 'config'
INFO: cmd: "mkdir -p "/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/genimage.tmp"" (stderr):
INFO: cmd: "rm -rf "/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/genimage.tmp"/*" (stderr):
INFO: cmd: "mkdir -p "/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/genimage.tmp"" (stderr):
INFO: cmd: "cp -a "/tmp/tmp.gpxMoEOrt8" "/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/genimage.tmp/root"" (stderr):
INFO: cmd: "find '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/genimage.tmp/root' -depth -type d -printf '%P\0' | xargs -0 -I {} touch -r
'/tmp/tmp.gpxMoEOrt8/{}' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/build/genimage.tmp/root/{}'" (stderr):
INFO: cmd: "mkdir -p "/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images"" (stderr):
INFO: vfat(boot.vfat): cmd: "dd if=/dev/zero of="/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat" seek=33554432 count=0 bs=1 2>/dev/null" (stderr):
INFO: vfat(boot.vfat): cmd: "mkdosfs '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat'" (stderr):
INFO: vfat(boot.vfat): adding file 'bcm2710-rpi-3-b.dtb' as
'bcm2710-rpi-3-b.dtb' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/bcm2710-rpi-3-b.dtb' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'bcm2710-rpi-3-b-plus.dtb' as 'bcm2710-rpi-3-b-plus.dtb' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/bcm2710-rpi-3-b-plus.dtb' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'bcm2710-rpi-cm3.dtb' as
'bcm2710-rpi-cm3.dtb' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/bcm2710-rpi-cm3.dtb' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'rpi-firmware/bootcode.bin' as 'rpi-firmware/bootcode.bin' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rpi-firmware/bootcode.bin' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'rpi-firmware/cmdline.txt' as 'rpi-firmware/cmdline.txt' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rpi-firmware/cmdline.txt' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'rpi-firmware/config.txt' as 'rpi-firmware/config.txt' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rpi-firmware/config.txt' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'rpi-firmware/fixup.dat' as 'rpi-firmware/fixup.dat' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rpi-firmware/fixup.dat' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'rpi-firmware/start.elf' as 'rpi-firmware/start.elf' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rpi-firmware/start.elf' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'rpi-firmware/overlays' as 'rpi-firmware/overlays' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/rpi-firmware/overlays' '::'" (stderr):
INFO: vfat(boot.vfat): adding file 'zImage' as 'zImage' ...
INFO: vfat(boot.vfat): cmd: "MTOOLS_SKIP_CHECK=1 mcopy -bsp -i '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat' '/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/zImage' '::'" (stderr):
INFO: hdimage(sdcard.img): adding partition 'boot' (in MBR) from 'boot.vfat'
...
ERROR: hdimage(sdcard.img): fiemap /home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/boot.vfat:
25 Inappropriate ioctl for device
ERROR: hdimage(sdcard.img): failed to write image partition 'boot'
INFO: hdimage(sdcard.img): cmd: "rm -f "/home/marie/buildroot-2020.08-rc1/buildroot-2020.08-rc1/output/images/sdcard.img"" (stderr):
ERROR: hdimage(sdcard.img): failed to generate sdcard.img
make: *** [Makefile:835: target-post-image] Error 1

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#5 lore raw

[Buildroot] [Bug 13146] raspberrypi3_defconfig: "Inappropriate ioctl for device" almost at end when sdcard.img is created

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13146

--- Comment #5 from Marie Maurer <[email protected]> --- I had to use this line to get it working:

if (ret == -EOPNOTSUPP || ret == -ENOTTY)

Now a sdcard.img was generated. No more error message.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#6 lore raw

[Buildroot] [Bug 13146] raspberrypi3_defconfig: "Inappropriate ioctl for device" almost at end when sdcard.img is created

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13146

Yann E. MORIN <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

                 CC|                            |yann.morin.1998 at free.fr
         Resolution|---                         |WORKSFORME
             Status|NEW                         |RESOLVED

--- Comment #6 from Yann E. MORIN <[email protected]> --- I've just given a test-build in Ubuntu 20.04, on augfs over ext4 (in docker), and the build succeeds without issue (as ;aready reported by Peter).

Can you provide more info on your running environment:
- what distribution?
- what filesystem?
- are you running in WSL (windows Subsystem for Linux)? What version?

Note that running under WSL1 is not guaranteed to work. WSL2 is also very very seldom tested.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#7 lore raw

[Buildroot] [Bug 13146] raspberrypi3_defconfig: "Inappropriate ioctl for device" almost at end when sdcard.img is created

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13146

--- Comment #7 from Marie Maurer <[email protected]> --- I compiled in WSL (Ubuntu 20.04 LTS) under Windows 10. I think since yesterday it updated to 20.04.1?
I don't know WSL version. How to get it?

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#9 lore raw

[Buildroot] [Bug 13146] raspberrypi3_defconfig: "Inappropriate ioctl for device" almost at end when sdcard.img is created

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13146

--- Comment #9 from Peter Seiderer <[email protected]> --- (In reply to Marie Maurer from comment #5)

Thanks for feedback, good to hear it now works for you (the version without the minus sign was definitely wrong, did read the code wrong yesterday)...

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#10 lore raw

[Buildroot] [Bug 13146] raspberrypi3_defconfig: "Inappropriate ioctl for device" almost at end when sdcard.img is created

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13146

--- Comment #10 from Peter Seiderer <[email protected]> --- (In reply to Yann E. MORIN from comment #6)

Is resolved/worksforme not a little harsh as there is definitely a existing problem (and a fix for it) and not yet determined if it is caused by the filesystem and/or a WSL?

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#11 lore raw

[Buildroot] [Bug 13146] raspberrypi3_defconfig: "Inappropriate ioctl for device" almost at end when sdcard.img is created

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13146

--- Comment #11 from Peter Seiderer <[email protected]> --- (In reply to Marie Maurer from comment #5)

Mind to suggest the patch/fix upstream (pengutronix/genimage)?

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#12 lore raw

[Buildroot] [Bug 13146] raspberrypi3_defconfig: "Inappropriate ioctl for device" almost at end when sdcard.img is created

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13146

--- Comment #12 from Yann E. MORIN <[email protected]> --- (In reply to Peter Seiderer from comment #10)

Quoted 3 lines

Is resolved/worksforme not a little harsh as there is definitely a existing problem (and a fix for it) and not yet determined if it is caused by the filesystem and/or a WSL?

genimage does not work on WSL1 (from a previous IRC discussion some weeks ago); WSL1 was too limited to be really workable anyway. It *might* work on WSL2 (WSL2 is usually much better since it is in fact just a VM in disguise).

And yes, "works for me", because, yes, it works for me on a *real* Linux machine, and that's what Buildroot is made to run on:

https://buildroot.org/manual.html#requirement

Quoting: "Buildroot is designed to run on Linux systems."

If it works on other systems, all the better. If it does not and you can come with a non-invasive fix, good, please send it. Otherwise, meh.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#13 lore raw

[Buildroot] [Bug 13146] raspberrypi3_defconfig: "Inappropriate ioctl for device" almost at end when sdcard.img is created

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13146

--- Comment #13 from Yann E. MORIN <[email protected]> --- (In reply to Marie Maurer from comment #7)

Quoted 1 line

I compiled in WSL (Ubuntu 20.04 LTS) under Windows 10.

Please my reply in #12.

Quoted 1 line

I don't know WSL version. How to get it?

I have absolutely no idea, I have not used Windows for the past 18 years or so... But fortunately:

https://lmgtfy.com/?q=how+can+I+know+the+version+of+WSL+I+use+%3F&s=d

Regards.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#14 lore raw

[Buildroot] [Bug 13146] raspberrypi3_defconfig: "Inappropriate ioctl for device" almost at end when sdcard.img is created

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13146

--- Comment #14 from Marie Maurer <[email protected]> --- This is the info I got under Linux:

marie at 2020L009:~$ uname -a
Linux 2020L009 4.4.0-19041-Microsoft #1-Microsoft Fri Dec 06 14:06:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux

This is the info I got under Windows (partly Powershell):

PS C:\WINDOWS\system32> wsl -l -v

  NAME      STATE           VERSION
* Ubuntu    Stopped         1

PS C:\WINDOWS\system32>

C:\tmp>ver

Microsoft Windows [Version 10.0.19041.450]

C:\tmp>systeminfo.exe

Betriebssystemversion: 10.0.19041 Nicht zutreffend Build 19041

=> I assume it is WSL 1

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#15 lore raw

[Buildroot] [Bug 13146] raspberrypi3_defconfig: "Inappropriate ioctl for device" almost at end when sdcard.img is created

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=13146

--- Comment #15 from Peter Seiderer <[email protected]> --- Fix/workaround posted upstream, see [1].

[1] https://github.com/pengutronix/genimage/pull/116

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.