Error while building l-loader.bin

Hi,

I am facing below error while building l-loader.bin

snip ...
    + dd if=/dev/zero of=/tmp/aosp-4g.OMLxpz bs=512 count=7471104
    7471104+0 records in
    7471104+0 records out
    3825205248 bytes (3.8 GB) copied, 44.3384 s, 86.3 MB/s
    + sgdisk -U 2CB85345-6A91-4043-8203-723F0D28FBE8 -v /tmp/aosp-4g.OMLxpz
    Creating new GPT entries.

    No problems found. 7471037 free sectors (3.6 GiB) available in 1
    segments, the largest of which is 7471037 (3.6 GiB) in size.
    Problem opening /tmp/aosp-4g.OMLxpz for reading! Error is 1.
    The operation has completed successfully.
    + sgdisk -n 1:0:+1M -t 1:0700 -u 1:496847AB-56A1-4CD5-A1AD-47F4ACF055C9 -c 1:vrl /tmp/aosp-4g.OMLxpz
    Problem opening /tmp/aosp-4g.OMLxpz for reading! Error is 1.
    + sgdisk -n 2:0:+1M -t 2:0700 -u 2:61A36FC1-8EFB-4899-84D8-B61642EFA723 -c 2:vrl_backup /tmp/aosp-4g.OMLxpz
    Problem opening /tmp/aosp-4g.OMLxpz for reading! Error is 1.
    + sgdisk -n 3:0:+1M -t 3:0700 -u 3:65007411-962D-4781-9B2C-51DD7DF22CC3 -c 3:mcuimage /tmp/aosp-4g.OMLxpz
    Problem opening /tmp/aosp-4g.OMLxpz for reading! Error is 1.
    + sgdisk -n 4:0:+8M -t 4:EF02 -u 4:496847AB-56A1-4CD5-A1AD-47F4ACF055C9 -c 4:fastboot /tmp/aosp-4g.OMLxpz
    Problem opening /tmp/aosp-4g.OMLxpz for reading! Error is 1.
    + sgdisk -n 5:0:+2M -t 5:0700 -u 5:00354BCD-BBCB-4CB3-B5AE-CDEFCB5DAC43 -c 5:nvme /tmp/aosp-4g.OMLxpz
    Problem opening /tmp/aosp-4g.OMLxpz for reading! Error is 1.
    + sgdisk -n 6:0:+64M -t 6:EF00 -u 6:5C0F213C-17E1-4149-88C8-8B50FB4EC70E -c 6:boot /tmp/aosp-4g.OMLxpz
    Problem opening /tmp/aosp-4g.OMLxpz for reading! Error is 1.
    + sgdisk -n 7:0:+256M -t 7:0700 -u 7:BED8EBDC-298E-4A7A-B1F1-2500D98453B7 -c 7:reserved /tmp/aosp-4g.OMLxpz
    Problem opening /tmp/aosp-4g.OMLxpz for reading! Error is 1.
    + sgdisk -n 8:0:+256M -t 8:8301 -u 8:A092C620-D178-4CA7-B540-C4E26BD6D2E2 -c 8:cache /tmp/aosp-4g.OMLxpz
    Problem opening /tmp/aosp-4g.OMLxpz for reading! Error is 1.
    + sgdisk -n 9:0:+1536M -t 9:8300 -u 9:FC56E345-2E8E-49AE-B2F8-5B9D263FE377 -c 9:system /tmp/aosp-4g.OMLxpz
    Problem opening /tmp/aosp-4g.OMLxpz for reading! Error is 1.
    + sgdisk -n -E -t 10:8300 -u 10:064111F6-463B-4CE1-876B-13F3684CE164 -c 10:userdata -p /tmp/aosp-4g.OMLxpz
    Problem opening /tmp/aosp-4g.OMLxpz for reading! Error is 1.
    + dd if=/tmp/aosp-4g.OMLxpz of=prm_ptable.img bs=512 count=34
    dd: failed to open ‘/tmp/aosp-4g.OMLxpz’: Operation not permitted
    + dd if=/tmp/aosp-4g.OMLxpz of=sec_ptable.img skip=7471071 bs=512 count=33
    dd: failed to open ‘/tmp/aosp-4g.OMLxpz’: Operation not permitted
    + rm -f /tmp/aosp-4g.OMLxpz
    +-----------------------------------------------------------+
     Input Images:
         primary partition table:       prm_ptable.img
         secondary partition table:     secondary partition table
     Ouput Image:                       ptable-aosp-4g.img
    +-----------------------------------------------------------+

    *** file open error: [Errno 2] No such file or directory: 'prm_ptable.img'

I have checked the permissions of /tmp and it is fine. Previously I was able to build without any issues.

What l-loader branch and command are you currently using ?

I am using below commit from l-loader.git

commit 21666bb9a514208a574b36772c43ca8181503b7c
Merge: 6b784ad e6da66c
Author: Haojian Zhuang haojian.zhuang@linaro.org
Date: Tue Jul 4 11:06:36 2017 +0800

Merge pull request #13 from ubitux/python

build: add PYTHON configuration variable

Command is make BL1=~/hikey/bin/bl1.bin all and I have placed all binaries(mcuimage.bin, nvme.img,u-boot.bin, ATF binaries) in ~/hikey/bin

Weird, what are the permissions for your /tmp dir ?

Could you try manually:
$ mktemp /tmp/test.XXXX
/tmp/test.4GpI
$ echo test > /tmp/test.4GpI
$ cat /tmp/test.4GpI

I tried below

ivid@ivid:~$ mktemp /tmp/test.XXXX
/tmp/test.v3u5
ivid@ivid:~$
ivid@ivid:~$ echo test > /tmp/test.v3u5
ivid@ivid:~$ cat /tmp/test.v3u5
test
ivid@ivid:~$

OK, I don’t really understand what going wrong with your /tmp, maybe a space issue check with df -h if you have enough space remaining for this operation,

Maybe you can to try this branch https://github.com/96boards-hikey/l-loader/commits/testing/hikey960_v1.2, it includes a patch to minimize space usage (sparse dd option).

Hi,

Sorry for late reply. I tried the branch u suggested but same issue occurs. There is about 40gb space left on my system