FIP position on UFS

I have removed the redundant android partions from UFS running Debian ,
so my W-LUN3 looks like that now

Total free space is 72442 sectors (283.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   2             512            3583   12.0 MiB    0700  fastboot
   4            5120            8191   12.0 MiB    8300  fip
   7           73984           90367   64.0 MiB    EF00  boot
  10           94976         7805946   29.4 GiB    8300  Linux filesystem

I can’t rename fastboot because its name is hardcoded into xloader
(getting rid of xloader is the next project), and i also can’t move FIP,
because its position

root@linaro-developer:~# printf "0x%x\n" $((5120*4096))
0x1400000

is hardcoded into ATF arm-trusted-firmware/plat/hisilicon/hikey960/hikey960_def.h

#define UFS_BASE                        0
/* FIP partition */
#define HIKEY960_FIP_BASE               (UFS_BASE + 0x1400000)

If hardcoding the offset is unavoidable, maybe it’ is a good idea to put FIP at
a zero offset as the first partition ?

If hardcoding the offset is unavoidable, maybe it’ is a good idea to put FIP at
a zero offset as the first partition ?

Hmnnn…

I can’t see any harm in experimenting if you’re using a highly
customized layout anyway.

However I’m not sure we’d want to change the defaults for the sake of a
few megabytes though… post-release changes to partition layouts cause
no end of support problems (since it is hard to tell whether someone has
paired together an incompatible ARM TF and partition table).

I agree with you that 283MB are not worth the support nightmare.
The currently distributed ptable.img has several issues on its own.
gdisk has identified and fixed 4 problems with it, the most critical one was last partition exceeding the UFS block count.