[Huawei P30 Pro Guides, News, & Discussion] ph03n!x:
[MENTION=7530018]oslo83[/MENTION] I have attached the mkfs.erofs binary using this git source to the first post.

Please go through the README for this - I built this binary for the x64 architecture, and for lz4-1.9.0

The command options are -

mkfs.erofs 0.1
usage: [options] FILE DIRECTORY

Generate erofs image from DIRECTORY to FILE, and [options] are:
-zX[,Y] X=compressor (Y=compression level, optional)
-d# set output message level to # (maximum 9)

Note that the system.img that comes within UPDATE.APP is a root file system - here is a structure.

drwxr-xr-x. 2 root root 0 Aug 7 2018 3rdmodem
drwxr-xr-x. 2 root root 0 Aug 7 2018 3rdmodemnvm
drwxr-xr-x. 2 root root 0 Aug 7 2018 3rdmodemnvmbkp
drwxr-xr-x. 2 root root 0 Aug 7 2018 acct
lrw-r--r--. 1 root root 11 Aug 7 2018 bin -> /system/bin
lrw-r--r--. 1 root root 50 Aug 7 2018 bugreports -> /data/user_de/0/com.android.shell/files/bugreports
drwxrwx---. 2 ph03n1x 2001 0 Aug 7 2018 cache
lrw-r--r--. 1 root root 13 Aug 7 2018 charger -> /sbin/charger
dr-xr-xr-x. 2 root root 0 Aug 7 2018 config
drwxr-xr-x. 2 root root 0 Aug 7 2018 cust
lrw-r--r--. 1 root root 17 Aug 7 2018 d -> /sys/kernel/debug
drwxrwx--x. 2 ph03n1x ph03n1x 0 Aug 7 2018 data
drwxrwx--x. 2 ph03n1x ph03n1x 0 Aug 7 2018 data_old
lrw-------. 1 root root 23 Aug 7 2018 default.prop -> system/etc/prop.default
drwxr-xr-x. 2 root root 0 Aug 7 2018 dev
drwxr-xr-x. 2 root root 35 Aug 7 2018 dload
drwxr-xr-x. 2 root root 0 Aug 7 2018 eng
lrw-r--r--. 1 root root 11 Aug 7 2018 etc -> /system/etc
-rw-r-----. 1 root 2000 423 Aug 7 2018 fstab.zram1024m
-rw-r-----. 1 root 2000 423 Aug 7 2018 fstab.zram1280m
-rw-r-----. 1 root 2000 423 Aug 7 2018 fstab.zram1536m
-rw-r-----. 1 root 2000 422 Aug 7 2018 fstab.zram2240m
-rw-r-----. 1 root 2000 422 Aug 7 2018 fstab.zram256m
-rw-r-----. 1 root 2000 422 Aug 7 2018 fstab.zram4096m
-rw-r-----. 1 root 2000 422 Aug 7 2018 fstab.zram512m
-rw-r-----. 1 root 2000 422 Aug 7 2018 fstab.zram768m
-?????????? ? ? ? ? ? init
-rwxr-x---. 1 root 2000 1717 Aug 7 2018 init.environ.rc
-?????????? ? ? ? ? ? init.rc
-?????????? ? ? ? ? ? init.usb.configfs.rc
-?????????? ? ? ? ? ? init.usb.rc
-rwxr-x---. 1 root 2000 580 Aug 7 2018 init.zygote32.rc
-rwxr-x---. 1 root 2000 1042 Aug 7 2018 init.zygote64_32.rc
lrw-r--r--. 1 root root 8 Aug 7 2018 log -> /splash2
drwxr-xr-x. 2 root ph03n1x 0 Aug 7 2018 mnt
drwxr-xr-x. 2 root root 0 Aug 7 2018 modem_log
drwxr-xr-x. 2 root root 0 Aug 7 2018 odm
drwxr-xr-x. 2 root root 0 Aug 7 2018 oem
drwxr-xr-x. 6 root root 71 Aug 7 2018 patch
drwxr-xr-x. 2 root root 0 Aug 7 2018 patch_hw
drwxr-xr-x. 2 root root 0 Aug 7 2018 preload
drwxr-xr-x. 2 root root 0 Aug 7 2018 proc
drwxr-xr-x. 2 root root 0 Aug 7 2018 product
drwxr-xr-x. 2 root root 47 Aug 7 2018 res
-rw-r--r--. 1 root root 32 Aug 7 2018 resetFactory.cfg
drwxr-xr-x. 2 root root 0 Aug 7 2018 root
drwxr-x---. 2 root 2000 183 Aug 7 2018 sbin
lrw-r--r--. 1 root root 21 Aug 7 2018 sdcard -> /storage/self/primary
drwxr-xr-x. 2 root root 0 Aug 7 2018 sec_storage
drwxr-xr-x. 2 root root 0 Aug 7 2018 splash2
drwxr-x--x. 2 root 1028 0 Aug 7 2018 storage
drwxr-xr-x. 2 root root 0 Aug 7 2018 sys
drwxr-xr-x. 23 root root 478 Aug 7 2018 system
-?????????? ? ? ? ? ? ueventd.rc
drwxr-xr-x. 2 root 2000 0 Aug 7 2018 vendor
-rw-r--r--. 1 root root 524 Aug 7 2018 verity_key
drwxr-xr-x. 2 root root 0 Aug 7 2018 version

It would be good if you spend time with the system.img, vendor.img, product.img and understand how the structures are inter-linked. Happy hunting!