Monday, 2023-01-09

*** spiiroin_ is now known as spiiroin06:42
*** Ischwitch is now known as Ingvix17:20
T42<edp_17> @TheVancedGamer : Good evening! The androidboot.slot_suffix is _a skip_initramfs :
T42<edp_17> The cat /proc/cmdline | grep "androidboot.slot_suffix" | cut -d '=' -f2 command gives me :
T42<edp_17> The /vendor is missing.21:31
T42<edp_17> I figured that /dev/block/bootdevice/by-name/vendor_a should be mounted to /vendor. I can manually mount but how can I do it automatically?21:35
T42<elros34> why do you care about that cmdline? I am not an expert but isn't it set by bootloader based on what active slot you have currently? About vendor, just add it to fstab and you will get systemd mount unit generated or create it by your self in sparse21:42
T42<edp_17> Yeah, I came across to the same conclusion as adding it into fstab + creating a service similar to system.mount. Although, I don't know what mnt_flags and options I should use. I guess defaults is okay.21:45
T42<edp_17> Can I do this on device to test?21:46
T42<elros34> usually you can find vendor (or other partitions) removed in fstab's commits history so use that if not then you can probably find /vendor entry it in device tree either on device or in kernel directory21:47
T42<elros34> obviously you can do everything on device I can't imagine single change which you can't do on device21:48
T42<elros34> I guess /proc/device-tree/firmware/android/fstab should have vendor parameters21:49
T42<edp_17> Okay, thanks! I'll try to create the fstab entry + vendor.mount service on device.21:51
T42<edp_17> One more question. On host in device/motorola/sdm632-common/rootdir/etc/fstab.qcom there is a mount definition for / (including the mnt_flags). However, on device in /etc/fstab there isn't the same thing. So, where are the entries from fstab.qcom are going into on device?21:56
T42<elros34> /etc/fstab is sailfish's file not used for anything important, forget about it. fstab.qcom + fixupmountpoints are used to generate systemd mount units: /usr/lib/systemd/*.mount (and enabled symlinks)21:58
T42<edp_17> Sorry, my question wasn't clear. Let me try differently.22:04
T42<edp_17> This is for mounting /.22:04
T42<edp_17> So, in fstab.qcom, I have this:
T42<edp_17> In system.mount service, I have this :
T42<elros34> really you had  _a suffix in fstab or you added it?22:06
T42<edp_17> Yes, I did. Then, I got /system mounted correctly.22:06
T42<edp_17> I meant, I added it.22:06
T42<edp_17> So, as you see in system.mount the flags and options at the bottom are only for information purpose as being commented out. Those are not defined in /etc/fstab (obviously as sfos doesn't use that much). However, when the system boots, it knows what flags and options to use for mounting /system.22:08
T42<elros34> /system22:08
T42<elros34> adding _a is pointless but ok.22:08
T42<elros34> but system.mount doesn't mount /system in your case. system_root.mount mounts /system instead22:09
T42<edp_17> So, if I add vendor.mount on device, without modifying fstab.qcom on host and rebuilding hybris-boot, how sailfish will know what flags and options to use mounting /vendor?22:09
T42<edp_17> Or will it enough, if I create a vendor.mount service like this ? :
T42<elros34> system system system... system_root.mount mounts system partition and then system.mount mounts /system directory inside you system partition to /system:)22:10
T42<elros34> so system for your device is totally different than /vendor, use some other partition as a example22:11
T42<elros34> show what you have in /proc/device-tree/firmware/android/fstab22:12
T42<edp_17> Okay.22:12
T42<edp_17> Yes I have vendor in /proc/device-tree/firmware/android/fstab.22:12
T42<edp_17> I'll use system_root.mount as example :
T42<edp_17> Thanks!22:13
T42<elros34> can you show  /proc/device-tree/firmware/android/fstab?22:14
T42<elros34> or /proc/device-tree/firmware/android/fstab/vendor22:15
T42<edp_17> Both:
T42<elros34> so you have mount flags in mnt_flags file22:16
T42<edp_17> Yes.22:17
T42<edp_17> Now I have /vendor mounted, but still stuck on black screen. Telnet 2323 works and I set persistent journal and rebooted. Journal since system started:
T42<elros34> vendor-*.mount fails for some reason22:30
T42<edp_17> Yeah, because there is no /dev/block/bootdevice/by-name/dsp but I do have /dev/block/bootdevice/by-name/dsp_a and /dev/block/bootdevice/by-name/dsp_b :)22:32
T42<edp_17> I am fixing it.22:32
T42<elros34> ee no, most likely you do not had these entries in fixup-mountpoints22:33
T42<elros34> or they were incorrect: all these suffixes you add for unknown reason22:33
T42<elros34> also you must follow instruction and do NOT disable selinux22:34
T42<edp_17> I have this in fixup-mount points :
T42<edp_17> All those suffixes are coming from android side when I did a "ls -l /dev/block/bootdevice/by-name/"22:38
T42<edp_17> Here :
T42<elros34> looks wrong but without fstab/init*rc files is only guess. Where did you get idea to add _a if in hadk-hot there it is explicitly mentioned to not do this?22:39
T42<edp_17> How do you mean add the _a? When I booted up without the _a (like block/bootdevice/by-name/system) the device didn't mount /system partition. Then, I added the _a like it is on the list that the android side outputted and, voila, /system is mounted. Same with /vendor.22:41
T42<elros34> again I can only guess if you do not show me your device repo: fstab/init*rc files22:43
T42<edp_17> motorola_smd632-common:
T42<edp_17> motorola-ocean:
T42<elros34> yeah so all these _a are wrong + your changes in fstab. Additionally this line might but I am not sure break system mount unit creation:
T42<elros34> you need to understand that fixup-mountpoints is all about by-name path from fstab/init*rc files and block device mapping from  ls -l /dev/block/bootdevice/by-name/22:47
T42<elros34> you do  not use  by-name path or partitions name from ls -al  /dev/block/bootdevice/by-name/ ONLY block device22:48
T42<edp_17> I see, so I should change fixup-mountpoints like these two examples:
T42<elros34> yes. On device just replace these by-name paths in mount units with block device22:52
T42<edp_17> Okay!22:52
T42<edp_17> You were right, I replaced the by-name stuff with /dev/mmcblk0pxx in *.mount units and after reboot, I still have /system and /vendor mounted. However, the device is still on black screen. Journal:
T42<edp_17> vendor-dsp.mount crashes.23:11
T42<elros34> search for some strange mount options in this file23:13
T42<elros34> anyway you are still missing most important change: selinux23:14
T42<edp_17> I should use /dev/mmcblk0p24 instead of /dev/mmcblk0p23.23:14
T42<edp_17> Without that selinux change, will the device reboot or stays on?23:14
T42<edp_17> Is it possible to do that selinux change on device?23:15
T42<elros34> no idea what will happen, maybe bootloop:)23:15
T42<edp_17> I see, so better to fix that. :)23:16
T42<elros34> no, it maybe bootloop when you will fix it:) About changing it on device then it depends on how did you disable it but not really worth the effort23:17
T42<edp_17> Okay.23:18
T42<edp_17> On host, should I add /dev/mmcblk0pxx into fstab.qcom?23:30
T42<edp_17> Okay, ignore me. :D23:31
T42<elros34> hm maybe it would work, there is  systemd-fstab-generator:)23:34
T42<edp_17> I just removed the _a from the end. As I fixed fixup_mountpoints to not have that _a, it should be okay. :D23:35
T42<edp_17> I am just trying to enable selinux.23:36
T42<edp_17> At least there is nothing selinux related in /proc/cmdline23:36
T42<edp_17> I have this in : #BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive23:38
T42<edp_17> Is it enough if I enable it?23:38
T42<elros34> no, didn't you disable selinux in kernel config?23:39
T42<edp_17> I have this in defconfig:
T42<elros34> just revert all CONFIG_SECURITY_SELINUX* changes you did23:41
T42<edp_17> Oh, yes. Good idea. :)23:41

Generated by 2.17.1 by Marius Gedminas - find it at!