Halium / projectmanagement

142 stars 32 forks source link

mountpoint fixup script does not get any input to fix #24

Closed Flohack74 closed 7 years ago

Flohack74 commented 7 years ago
halium/hybris-boot/fixup-mountpoints "endeavoru" "/home/florian/halium-5.1/out/target/product/endeavoru/obj/ROOT/hybris-boot_intermediates/init"
Fixing mount-points for device endeavoru
target thumb C: static_busybox <= external/busybox/archival/bzip2.c
sed: Keine Eingabedateien
halium/hybris-boot/Android.mk:153: die Regel für Ziel „/home/florian/halium-5.1/out/target/product/endeavoru/obj/ROOT/hybris-boot_intermediates/init“ scheiterte
make: *** [/home/florian/halium-5.1/out/target/product/endeavoru/obj/ROOT/hybris-boot_intermediates/init] Fehler 4
make: *** Datei „/home/florian/halium-5.1/out/target/product/endeavoru/obj/ROOT/hybris-boot_intermediates/init“ wird gelöscht
make: *** Auf noch nicht beendete Prozesse wird gewartet …
  CHK     include/linux/version.h
make[1]: Verzeichnis „/home/florian/halium-5.1/kernel/htc/endeavoru“ wird verlassen
make: *** wait: Keine Kind-Prozesse.  Schluss.

#### make failed to build some targets (10 seconds) ####

Sorry for the German text in between, what it says is that sed does not get any input data/files. Remaining text is just make hiccup...

doniks commented 7 years ago

You give pretty little context. It looks like your tree is set up for a device called endeavoru, but looking at this source https://github.com/Halium/hybris-boot/blob/master/fixup-mountpoints this device does not seem to be included. I don't know how this could lead to a sed error, but I'm pretty sure that you need to fix this script yourself for your device: https://github.com/Halium/docs/blob/master/porting/index.md#include-your-device-in-fixup-mountpoints-script

If that doesn't help, I suggest that you give more context, e.g., local_manifest, etc

Flohack74 commented 7 years ago

I added all my mountpoints according the script´s structure. It seems the script is called, but then fails to receive its input. Can I somehow debug the input to the fixup script? What does it acutally process?

doniks commented 7 years ago

maybe post your edited script somewhere?!

When I add

echo "$@"
exit 1

to my script, which otherwise works fine for deb, it says:

[ 66% 6/9] build /media/peter/share2/data/halium/out/target/product/deb/obj/ROOT/hybris-boot_intermediates/init
FAILED: /bin/bash -c "(sed -e 's %DATA_PART% /dev/block/platform/msm_sdcc.1/by-name/userdata g'       -e 's %BOOTLOGO%  g'    -e 's %DEFAULT_OS% sailfishos g'    -e 's %ALWAYSDEBUG%  g' halium/hybris-boot/init-script > /media/peter/share2/data/halium/out/target/product/deb/obj/ROOT/hybris-boot_intermediates/init ) && (halium/hybris-boot/fixup-mountpoints \"deb\" \"/media/peter/share2/data/halium/out/target/product/deb/obj/ROOT/hybris-boot_intermediates/init\" ) && (chmod +x /media/peter/share2/data/halium/out/target/product/deb/obj/ROOT/hybris-boot_intermediates/init )"
Fixing mount-points for device deb
/media/peter/share2/data/halium/out/target/product/deb/obj/ROOT/hybris-boot_intermediates/init
ninja: build stopped: subcommand failed.

Edit: Ok, so I guess that means, it reads out/target/product/deb/obj/ROOT/hybris-boot_intermediates/init (NB: deb is my device name) and checking grep fixup-mountpoints * which points to Android.mk which actually works on the input: BOOT_RAMDISK_INIT_SRC := $(LOCAL_PATH)/init-script

Flohack74 commented 7 years ago

out/target/product/xxxxyyyy/obj/ROOT/hybris-boot_intermediates/init does not exist for me, I guess this is the problem...

doniks commented 7 years ago

well, remember, as I said: "deb" is most likely not your device name, replace "deb" with your filename for the file you're looking for. Again, without you giving any context, it's hard to help.

Line 154 https://github.com/Halium/hybris-boot/blob/master/Android.mk#L154 seems to be producing the file the script is supposed to work on. You can add @echo lines in there debug what's happening

Flohack74 commented 7 years ago

Are you doing this on halium-7.1 or 5.1? Plus of course I used my device name... (fixed in my previous comment)

doniks commented 7 years ago

7.1

z3ntu commented 7 years ago

The Halium version shouldn't matter as the same repository with the same branch is being used.

Flohack74 commented 7 years ago

Here is the new part I have added to the script

       ;;
    "endeavoru")
        sed -i \
            -e 's block/platform/sdhci-tegra.3/by-name/APP mmcblk0p12 ' \
            -e 's block/platform/sdhci-tegra.3/by-name/CAC mmcblk0p13 ' \
            -e 's block/platform/sdhci-tegra.3/by-name/RCA mmcblk0p3 ' \
            -e 's block/platform/sdhci-tegra.3/by-name/RFS mmcblk0p18 ' \
            -e 's block/platform/sdhci-tegra.3/by-name/DLG mmcblk0p19 ' \
            -e 's block/platform/sdhci-tegra.3/by-name/ISD mmcblk0p14 ' \
            -e 's block/platform/sdhci-tegra.3/by-name/UDA mmcblk0p15 ' \
        ;;
    *)
    cat <<EOF

Just noticed I forgot the trailing "$@" to give sed some input ;)