mammo0/openwrt-bpi-r2

Error when creating complete images with Docker

mammo0 opened this issue · 1 comments

When performing a full build of the OpenWRT images using the Docker method, currently the build fails during execution of the 3_build_images.sh script:

Creating main image file...
65000+0 records in
65000+0 records out
65000000 bytes (65 MB, 62 MiB) copied, 0.232787 s, 279 MB/s
Checking that no-one is using this disk right now ... OK

Disk /tmp/tmp.MG3cQGakxV/base_img.img: 62 MiB, 64999936 bytes, 126953 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Script header accepted.
>>> Created a new DOS disklabel with disk identifier 0xf04864d5.
/tmp/tmp.MG3cQGakxV/base_img.img1: Created a new partition 1 of type 'W95 FAT32' and of size 9.6 MiB.
/tmp/tmp.MG3cQGakxV/base_img.img2: Created a new partition 2 of type 'Linux' and of size 47.7 MiB.
/tmp/tmp.MG3cQGakxV/base_img.img3: Done.

New situation:
Disklabel type: dos
Disk identifier: 0xf04864d5

Device                            Boot Start    End Sectors  Size Id Type
/tmp/tmp.MG3cQGakxV/base_img.img1       9766  29297   19532  9.6M  b W95 FAT32
/tmp/tmp.MG3cQGakxV/base_img.img2      29298 126952   97655 47.7M 83 Linux

The partition table has been altered.
Syncing disks.
losetup: /tmp/tmp.MG3cQGakxV/base_img.img: failed to set up loop device: No such file or directory
mkfs.vfat: unable to open p1: Device or resource busy
mkfs.fat 4.1 (2017-01-24)

Apparently the loop device can't be created. Will look into this.

Workaround:

Build U-Boot and OpenWRT separately with

  1. docker run -v `pwd`:/out bpi_r2-openwrt uboot and
  2. docker run -v `pwd`:/out bpi_r2-openwrt openwrt

Then copy the resulting files to the artifacts directory. Afterwards run the 3_build_images.sh script manually.

This should be fixed with commit d142059.