2016-04-03 12:36:00 @kido damn... I tried your img_info and it produces the right offsets 2016-04-03 12:57:07 @kido locusf: maybe you should contact that guy to ask him how he repacked his boot.img http://forum.xda-developers.com/zenwatch/development/kernel-lightly-modified-zenwatch-kernel-t3347924 there shouldn't be anything magic in there... from what I see mkboot with your config produces a correct layout 2016-04-03 12:58:24 @kido it turned out that the "tinykernel" guy made no change to the kernel... http://forum.xda-developers.com/zenwatch/development/tinykernel-t3169754 "As I don't have a bootable modified kernel, I just made some changes to the ramdisk." 2016-04-03 16:03:00 locusf hah 2016-04-03 16:26:30 locusf kido: I wonder whats wrong then 2016-04-03 16:28:14 @kido locusf: do you have a little bit of time ahead of you right now? if you do we can try a bunch of settings until we finaly get it working 2016-04-03 16:28:37 @kido I'm sure it's not much than that, we have to find a way 2016-04-03 16:28:45 @kido much more* 2016-04-03 16:28:47 locusf okay I'll just finish my coffee :) 2016-04-03 16:29:06 @kido great, I prepare my tea :) 2016-04-03 16:33:49 locusf ok lets go 2016-04-03 16:35:10 @kido ok so basicaly I'm pretty confident to say that the way we currently pack your boot.img is wrong so there are several possible point of failures and we should proceed incrementaly to isolate the "root of all evil" 2016-04-03 16:36:13 @kido start by grabbing a working default android boot.img 2016-04-03 16:37:18 @kido make sure you can boot it with "fastboot boot boot.img" if that works we will just unpack it and repack it, there are two ways because there are two tools, if you use "unmkbootimg" you get a bunch of warning and info but I wasn't able to repack it correctly with mkbootimg afterward 2016-04-03 16:37:37 @kido if you use "mkboot" which has an unpack and repack option you might have more chance 2016-04-03 16:38:22 locusf okay 2016-04-03 16:38:50 @kido it is available in your asteroid/build/tmp-glibc/sysroots/x86_64-linux/usr/bin/mkboot 2016-04-03 16:39:59 @kido if you use "mkboot default-boot.img extract-directory/" it will provide you with a img_info file in the extract-directory 2016-04-03 16:40:19 @kido this file should be similar to the one you currently use in OE but well... 2016-04-03 16:40:59 @kido to make sure we can repack the same boot.img with the same tools and same config just swap the two arguments of mkboot like that: "mkboot extract-directory new-boot.img" 2016-04-03 16:41:07 @kido and try to fastboot boot this new-boot.img 2016-04-03 16:41:56 locusf I pushed the current work to my repository 2016-04-03 16:42:11 @kido theoreticaly it should boot, I tried to do that myself and it seemed that the file layout was the same, a hexdiff showed me a few different bytes but let's hope they are not the cause of an issue 2016-04-03 16:42:16 @kido ok 2016-04-03 16:57:46 locusf could my initial naming of athias -> anthias be an issue? 2016-04-03 16:59:19 @kido we will soon see 2016-04-03 16:59:33 @kido does the repacked kernel with the previous instructions work? 2016-04-03 17:02:51 locusf booting, will see 2016-04-03 17:03:16 locusf ejected partitions 2016-04-03 17:04:18 @kido so the default boot.img works but once the exact same files are repacked with mkboot it enters this strange qualcom mode which expose partitions to the host via usb? 2016-04-03 17:05:23 @kido so the problem is mkboot 2016-04-03 17:10:24 locusf yes 2016-04-03 17:10:36 @kido let's try with another tool then 2016-04-03 17:10:43 @kido bitbake abootimg-native 2016-04-03 17:11:03 @kido and then use asteroid/build/tmp-glibc/sysroots/x86_64-linux/usr/bin/abootimg -x default-boot.img 2016-04-03 17:12:37 @kido and fastboot boot new.img 2016-04-03 17:13:04 @kido on G Watch it didn't work because abootimg wasn't supporting the devicetree, you might have the same problem but anyway we can try 2016-04-03 17:15:32 locusf okay trying that after hanging the laundry 2016-04-03 17:15:39 @kido ok 2016-04-03 17:37:38 locusf do I use the asteroid ramdisk? 2016-04-03 17:41:31 @kido no 2016-04-03 17:41:45 @kido we are just trying to find a working tool 2016-04-03 17:43:21 locusf ok 2016-04-03 17:45:44 locusf that worked 2016-04-03 17:48:57 @kido with abootimg? :D 2016-04-03 17:49:21 locusf ASTERROID BOOT LOG o/ 2016-04-03 17:49:30 @kido hell yeah! :D 2016-04-03 17:49:55 locusf but nothing after :p 2016-04-03 17:50:04 @kido what kernel do you use? where do you get those logs? what happens? 2016-04-03 17:50:13 locusf boot logo 2016-04-03 17:50:17 @kido ah logo! 2016-04-03 17:50:19 locusf the selfbuilt kernel 2016-04-03 17:50:21 @kido then you are on the rootfs 2016-04-03 17:50:23 locusf and no logs 2016-04-03 17:50:24 locusf ok 2016-04-03 17:50:31 @kido do you have adb shell? 2016-04-03 17:50:41 locusf nope 2016-04-03 17:50:47 locusf null device 2016-04-03 17:50:57 @kido ok, so we are getting further :) 2016-04-03 17:51:28 @kido first thing first, we have to change your linux-anthias recipe to use abootimg instead of mkboot 2016-04-03 17:51:51 @kido the meta-smartphone layer from SHR provided the tools to use abootimg but I had not to use it in dory 2016-04-03 17:52:11 locusf okay 2016-04-03 17:53:35 @kido you can get inspired by that https://github.com/shr-distribution/meta-smartphone/blob/shr/meta-samsung/recipes-kernel/linux/linux-samsung-tuna_git.bb#L11 2016-04-03 17:54:03 @kido inherit kernel_android instead of boot-img 2016-04-03 17:54:14 locusf it didn't have enable_adb :p 2016-04-03 17:54:23 @kido enable_adb is only used in the ramdisk 2016-04-03 17:54:26 @kido to stop the boot 2016-04-03 17:54:44 @kido adb is enabled in any way in the rootfs 2016-04-03 17:57:54 locusf selinux=0 causes the partition throwup 2016-04-03 17:58:16 @kido mhh 2016-04-03 17:58:28 @kido ok 2016-04-03 18:04:14 locusf if I'd just get developer mode :p 2016-04-03 18:05:19 @kido this will come... :) 2016-04-03 18:05:49 locusf does the first boot take long? 2016-04-03 18:06:01 locusf also there is something odd in init.rc 2016-04-03 18:06:46 @kido nop it doesn't take long 2016-04-03 18:06:51 @kido and what is odd in init.rc ? 2016-04-03 18:07:04 locusf it downclocks the cores 2016-04-03 18:07:52 @kido yep those settings come from the default android wear init.rc from dory 2016-04-03 18:08:36 @kido you might want to remove them though, I saw on xda that someone said that if he downclocked the CPU of zenwatch then he wasn't able to boot (on android) 2016-04-03 18:08:56 @kido I'm currently reading the android wear default init.rc on anthias 2016-04-03 18:10:59 locusf ok 2016-04-03 18:14:17 locusf hmm 2016-04-03 18:14:20 locusf resolution is wrong 2016-04-03 18:14:48 @kido in psplash? 2016-04-03 18:14:52 locusf no 2016-04-03 18:14:55 locusf in machine.conf 2016-04-03 18:15:06 @kido in fact the resolution here is not used 2016-04-03 18:15:13 @kido you can remove the values 2016-04-03 18:15:19 locusf oh 2016-04-03 18:15:28 @kido there seems to be something to do with "/sys/devices/platform/msm_hsusb/gadget/wakeup" 2016-04-03 18:20:31 locusf so whats next 2016-04-03 18:22:06 @kido we gotta find why usb is not working, I believe that our best friend here will be adb shell inside android and tweaking the usb related values inside /sys/ 2016-04-03 18:22:57 @kido the /init.asus.usb.rc and /init.asus.usb.sh will also be useful to read 2016-04-03 18:24:03 @kido then you will have to modify your src/meta-anthias-hybris/recipes/core/initrdscripts/initramfs-boot-android/init.sh 2016-04-03 18:24:43 @kido to make usb work correctly 2016-04-03 18:25:28 @kido so the current goal is to get a shell 2016-04-03 18:26:03 @kido once you will have a shell you will be able to get back to the standard things you know from sfos porting... :) 2016-04-03 18:26:14 locusf yes 2016-04-03 18:28:20 locusf I can't get root anymore :/ 2016-04-03 18:28:22 locusf on android 2016-04-03 18:28:51 @kido su is not working? 2016-04-03 18:28:57 locusf nope 2016-04-03 18:28:58 locusf it hangs 2016-04-03 18:29:11 @kido mhhh, then try to root once again, but asteroid should have nothing to do with that 2016-04-03 18:29:20 locusf yeah ok 2016-04-03 18:29:24 @kido strange 2016-04-03 18:30:12 @kido ahah I'm sorry to have told you that porting asteroid to zenwatch would be easy peasy, since it is the same SoC as the currently working devices I thought you would have less issues 2016-04-03 18:32:02 locusf heheh :) 2016-04-03 18:33:41 locusf chown -h root.system /sys/devices/platform/msm_hsusb/gadget/wakeup 2016-04-03 18:33:41 locusf chmod -h 220 /sys/devices/platform/msm_hsusb/gadget/wakeup 2016-04-03 18:33:50 locusf that looks ... odd 2016-04-03 18:34:06 locusf it is others write only by default 2016-04-03 18:34:49 @kido yep chown and chmod shouldn't make usb work but maybe you would have to echo 1 > to the file or something in the directory 2016-04-03 18:36:48 locusf ok 2016-04-03 18:36:51 @kido locusf: ok, before evrything else try to add CONFIG_USB_ANDROID to your defconfig 2016-04-03 18:36:57 @kido I'm not sure why it isn't in check-config 2016-04-03 18:37:13 @kido I think this is mandatory 2016-04-03 18:37:51 locusf okay 2016-04-03 18:38:01 locusf kernel recompiling doesn't take too long 2016-04-03 18:38:35 @kido mhh actualy it seems that it was CONFIG_USB_G_ANDROID which is already enabled 2016-04-03 18:41:19 @kido there might also be a problem with OE trying to "simplify" the defconfig and sometime getting rid of important CONFIG_ values (yes, I know, this is really shitty) 2016-04-03 18:41:32 Nokius locusf: yeah! 2016-04-03 18:41:38 @kido so try to grep CONFIG_USB_G_ANDROID asteroid/build/tmp-glibc/work/athias-oe-linux-gnueabi/linux-athias/3.10+lollipop-r0/git/.config 2016-04-03 18:42:44 locusf nothing found 2016-04-03 18:43:19 @kido ok then this is the source of your problem 2016-04-03 18:43:22 @kido I already met that 2016-04-03 18:43:41 @kido I know this is hard to believe but your defconfig is actually missing... comments 2016-04-03 18:44:00 @kido so make a backup of your current asteroid/build/tmp-glibc/work/athias-oe-linux-gnueabi/linux-athias/3.10 2016-04-03 18:44:07 @kido +lollipop-r0/git/.config 2016-04-03 18:44:29 @kido then add CONFIG_USB_G_ANDROID inside the .config 2016-04-03 18:45:06 @kido run asteroid/build/tmp-glibc/work/athias-oe-linux-gnueabi/linux-athias/3.10+lollipop-r0/temp/run.do_compile and it should generate you a new .config that should differe from your backup from two or three comments (use diff here) 2016-04-03 18:45:42 @kido those comments are important so add them inside the defconfig of your meta-athias-hybris 2016-04-03 18:47:34 locusf gotta fee my cat :) 2016-04-03 18:47:35 locusf brb 2016-04-03 18:48:22 @kido :) 2016-04-03 18:54:31 locusf nothing .. 2016-04-03 18:54:32 locusf on boot 2016-04-03 18:56:54 @kido ? 2016-04-03 18:57:27 locusf with new config 2016-04-03 18:57:29 locusf and image 2016-04-03 18:57:35 locusf I see the asteroid bootlogo 2016-04-03 18:57:39 locusf but nothing appears in dmesg 2016-04-03 18:59:06 @kido did you use bitbake or run.compile to rebuild the kernel? 2016-04-03 18:59:33 locusf run.compile 2016-04-03 19:00:30 @kido and where did you get your boot.img from? 2016-04-03 19:00:34 @kido or kernel 2016-04-03 19:01:24 @kido run.compile doesn't install the kernel in build/deploy, it only brings you a new arch/arm/boot/zImage-dtb 2016-04-03 19:01:53 locusf ah 2016-04-03 19:01:57 locusf that explains it 2016-04-03 19:11:46 locusf partition throwup wtf ... 2016-04-03 19:12:22 @kido :| 2016-04-03 19:34:15 locusf W T F 2016-04-03 19:36:24 @kido what's going on? 2016-04-03 19:37:17 locusf still barfs partitions 2016-04-03 19:37:18 locusf wtf 2016-04-03 19:38:40 locusf even though I rolled back the config 2016-04-03 19:40:52 @kido this is strange 2016-04-03 19:41:08 @kido at least we now know that it *can* work 2016-04-03 19:42:24 locusf yes 2016-04-03 19:48:30 locusf it was the .sh commands in usb initialization 2016-04-03 19:48:39 locusf which did the barfing 2016-04-03 19:49:12 @kido you mean the chmod and chown on /sys/devices/platform/msm_hsusb/gadget/wakeup ? 2016-04-03 19:49:17 locusf yeah 2016-04-03 19:49:22 locusf also the echo 1 2016-04-03 19:49:32 @kido ok 2016-04-03 19:49:50 @kido so do you have a kernel with CONFIG_USB_G_ANDROID running? 2016-04-03 19:50:49 locusf nope 2016-04-03 20:08:35 locusf my arse and back started to hurt, will continue sometime later 2016-04-03 20:08:53 locusf thanks for the awesome help so far kido :) 2016-04-03 20:09:15 @kido alright, you're welcome :)