**** BEGIN LOGGING AT Sat May 11 02:59:57 2019 May 11 08:37:42 Hey folks, how the hell can i trippleboot the gemini PDA with Sailfish OS / Android / Linux? I guess I tried all possible variations on http://support.planetcom.co.uk/partitionTool.html but I just cant select all of them. This is definetly possible or at least was possible as you can see in this vid: https://www.youtube.com/watch?v=PEeet-7aSO4 any ideas? May 11 08:38:22 I have the X27 if it helps May 11 17:04:45 Update #71 a bit thin on news. May 11 17:05:35 chrissly90: agreeing with all your observations, but unable to help. May 11 17:30:09 Hi, is it possible to use to TWRP to boot Linux kernel on the Gemini, ideally by uploading the kernel via USB (or ethernet, I have the hub-ethernet gizmo too), and control that entire process remotely ? May 11 17:30:21 I'd like to be able to automate the kernel build-test process May 11 17:45:12 hmm... twrp provides a adb shell - so you can either dd it to the partiton, or try a kexec May 11 17:49:00 mifritscher: kexec takes too long May 11 17:49:10 although, twrp is a linux userspace application too ? May 11 17:49:22 then kexec could work, good idea May 11 17:56:46 Marex: someone has kexec via usb working on mainline kernel- https://github.com/Jasu/gemini-pda-buildroot#running-the-kernel-without-flashing May 11 17:56:55 maybe u can adapt this for vendor kernel May 11 17:57:23 grw: mainline is even better May 11 17:59:59 cool- very little works ATM but it is good news if you are planning to work on it :) May 11 18:00:49 I cannot promise anything, the gemini I have is basically catching dust and I'm already overloaded by other stuff May 11 18:51:30 hum, can the USB-to-UART (which I just built and attached) be used to control the bootloader ? May 11 19:21:46 yes, twrp is linux + userland including adb May 11 19:22:52 right, so I installed it and I cannot use the USB-to-UART console, it won't attach a prompt to it May 11 19:22:58 let's see if I can adjust the kernel bootargs May 11 19:24:20 hm, I guess not May 11 21:04:07 oh, uh, that android 8.1 update means I cannot dual-boot debian due to some extra security stuff, bah May 11 21:35:56 Marex, which extra security? May 11 21:36:31 TheKit: that's a valid point, given the security disaster the gemini is May 11 21:36:45 TheKit: it seems the new image needs some extra signatures on some of the blobs May 11 21:36:52 could be I'm wrong though May 11 21:37:08 it shouldn't break dual-boot, but you probably flashed single-boot bootloader with it May 11 21:37:12 the gemini wiki claims the android 8.1 image is not multiboot-capable yet May 11 21:37:19 TheKit: could be May 11 21:37:39 TheKit: what I would like is some easy way to boot custom kernel May 11 21:37:50 without having to boot either the android or debian userspace(s) May 11 21:38:14 I guess I can set debian as primary system and replace it with some /bin/sh and then kexec out of it ... May 11 21:38:30 or is there some less crude way ? May 11 21:38:37 Marex, do you want to try mainline or boot custom 3.18 kernel? May 11 21:38:47 TheKit: mainline May 11 21:39:00 TheKit: if I could avoid the vendorkernel disaster, that'd be nice May 11 21:39:38 are you going to pick up Jasu_M's work in this case or? May 11 21:39:55 TheKit: I guess that looks like a good starting point ? May 11 21:40:09 I think kexec is best option probably, though it can bring its own issues due to unclean hardware state May 11 21:40:51 TheKit: well, can the bootloader on the board boot Linux uploaded via USB / ethernet ? May 11 21:41:18 you can have fastboot, but it won't work given you need UART as well May 11 21:42:07 and the USB port on the right side is just for show I guess ? May 11 21:42:28 is there schematic of the gemini and datasheet for the mt6797 chip ? May 11 21:43:28 yes, it is USB 2.0 host. Not for Gemini, but you can find information about mt6797 from 96Boards May 11 21:45:44 TheKit: just found that board too May 11 21:46:10 TheKit: of course, no sensible bootloader on it, I was hoping it might be possible to get U-Boot running, which would allow the other USB to be used for USB-ethernet adapter and then easy Linux porting May 11 21:46:15 I guess I was naive May 11 21:46:49 it is *possible*, but kind of chicken and egg problem May 11 21:47:25 if there was working USB with mainline, it could be possibly ported to uboot as well May 11 21:47:49 if it's EHCI, should be trivial May 11 21:48:02 DTTO for xhci, but anyway ... May 11 21:49:30 TheKit: is the mt6797 datasheet available ? full one ? May 11 21:49:54 I could only find https://www.96boards.org/documentation/consumer/mediatekx20/additional-docs/docs/MT6797_Functional_Specification_V1_0.pdf May 11 21:55:39 https://github.com/u-boot/u-boot/blob/master/doc/README.mediatek - MediaTek implemented u-boot for MT7623n and MT7629, ideally parts of it could be adapted for MT6797 and u-boot chainloaded either from preloader or lk May 11 21:56:34 TheKit: right, the UART looks to be the same across the entire lineup May 11 21:57:14 TheKit: and I guess it should be initialized enough by the time ATF hands control over to the next stage that we can just write data to the UART and it would come out ? May 11 21:57:40 UART is initialized by preloader May 11 21:57:46 TheKit: there we go May 11 21:57:54 TheKit: might actually make sense to grab the 96boards kit May 11 22:00:28 well, I'm currently testing kernel just with reflashing over SSH + Wi-Fi, not pretty, but the time it takes is still less compared to time for making changes May 11 22:01:28 (*reflashing another boot partition) May 11 22:03:15 TheKit: hmmmm, is there some way for me to flash custom stuff of that fourth boot partition ? If I could avoid the vendor flashtool, I'd be happy, but mayby that's not possible May 11 22:03:32 TheKit: if I could prepare a custom image for that fourth boot partition, flash it in and knew where in RAM it ends up (and what's the DRAM mapping in PA space), I could experiment with U-Boot May 11 22:03:53 dd if=boot.img of=/dev/disk/by-partlabel/boot3? May 11 22:06:25 where does it end up is controlled by abootimg parameters, it has e.g. kernel_addr = 0x40080000 ramdisk_addr = 0x45000000 May 11 22:07:41 beware that bootloader is looking for appended dtb to kernel image and tries to modify it, I suppose just extracting one from normal kernel and appending it to uboot image should trick the bootloader May 11 22:08:03 https://github.com/96boards/documentation/tree/master/consumer/mediatekx20/additional-docs/docs there's the register table May 11 22:12:23 https://github.com/dguidipc/gemini-lk/blob/Gemini_x27_12062018/lk/app/mt_boot/mt_boot.c#L1500 - it can be possible to modify that logic to load plain blob from boot3 and jump into it if you want May 11 22:13:30 TheKit: I guess I can live with the android image for now May 11 22:13:51 TheKit: is there some command line tool to reflash the boot3 or do I have to suffer with the GUI tool ? May 11 22:14:03 and do I have to shuffle the cable ? May 11 22:14:16 shuffle? May 11 22:14:44 between UART and USB ; I guess that's a given May 11 22:14:53 easiest (and quickiest) is to reflash from running OS May 11 22:14:55 but maybe there's some better tool to easily reflash the boot3 ? May 11 22:15:02 TheKit: I guess so May 11 22:16:14 there is xflash tool, which can enter Android fastboot mode, and fastboot can flash partitions, but xflash booting is flaky for some reason May 11 22:16:58 oh ok May 11 22:17:22 TheKit: well, can I reboot into this boot3 from debian without pressing any of the buttons ? May 11 22:17:59 no, I linked the relevant bootloader code, it simply checks for key presses :( May 11 22:18:22 bah May 11 22:30:45 I can recompile lk with some modifications to make testing easier if you need (unfortunately Planet dropped the source code, but not the tooling, it is normally compiled inside MediaTek's Android tree) May 11 22:32:18 TheKit: dont worry about it, I'll probably experiment with the gemini for a bit May 11 22:32:21 on my own May 11 22:33:35 ok. What I'm currently trying myself is to get newer 4.9 kernel from MediaTek running to get an idea, but I'm bad with hardware knowledge May 11 22:34:28 the MTK tree has like 3 M custom lines of code , doesnt it ? May 11 22:34:31 sounds horrible to me May 11 22:35:24 yes, but the idea is that they probably don't rewrite 3 M lines of code for each new SoC May 11 22:39:13 they should just upstream the stuff and be done with it May 11 22:39:32 they probably tweak the gunk , crank out the SoC and then move on, never looking back May 11 22:39:44 in this fast mobile SoC business, that's probably how it is May 11 22:39:55 TheKit: btw did you ever look into this usb2jtag bit ? May 11 22:40:18 no, I didn't, maybe people from postmarketOS-lowlevel have more idea May 11 22:41:48 but yes, for some reason, they mostly mainlined their router SoCs (e. g. the one in Banana Pi R2) and adding support for two ones used in Chromebooks, but mobile SoCs don't get much love except initial dts/clocks support May 11 22:43:47 because their life expectancy is in months May 11 23:31:13 hm, actually lk inits pretty substantial part of hardware, like display controller, MMC, USB controller and what else - https://github.com/dguidipc/gemini-lk/tree/Gemini_x27_12062018/lk/platform/mt6797 May 11 23:32:35 TheKit: doesn't surprise me at all May 11 23:32:46 TheKit: and the kernel probably controls all kinds of clock/power stuff through PSCI May 12 02:07:08 well uh, OK, U-Boot came up all right, but it's still hung somewhere around DRAM printout May 12 02:32:14 er, OK, I have shell, but some WDT is poking me May 12 02:41:39 http://paste.debian.net/1083550/ this **** ENDING LOGGING AT Sun May 12 03:00:31 2019