Author Topic: Android image build trouble with "dragon" tool  (Read 11400 times)

Offline sv12k

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
    • View Profile
Android image build trouble with "dragon" tool
« on: January 10, 2014, 09:40:00 am »
Does anyone knows what to do with that error?
Code: [Select]
[root@cb2imagebuild android42]# pack
INFO: Packing for android
>>> script_parse 0.9.1
>>> check sys_config line format
>>> done.
>>> check partition config
>>> done.
>>> script_parse 0.9.1
>>> check sys_config line format
>>> done.
>>> check mainkey unique
>>> done.
>>> check module rule
>>> not implement yet
cp /build/ct-droid1/lichee/out/android/common/u-boot.bin bootfs/linux/ [OK]
script sys_config.fex [OK]
script sys_partition.fex [OK]
update_mbr sys_partition.bin 4 [OK]
update_boot0 boot0_nand.bin sys_config.bin NAND [OK]
update_boot0 boot0_sdcard.fex sys_config.bin SDMMC_CARD [OK]
update_boot1 boot1_nand.fex sys_config.bin NAND  [Uncheck]
update_boot1 boot1_sdcard.fex sys_config.bin SDMMC_CARD  [Uncheck]
fsbuild bootfs.ini split_xxxx.fex [OK]
dragon image.cfg sys_partition.fex *** stack smashing detected ***: dragon terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x4d)[0x20cf4d]
/lib/libc.so.6(+0xfcefa)[0x20cefa]
dragon[0x804c357]
dragon[0x804d1e1]
dragon[0x804b023]
/lib/libc.so.6(__libc_start_main+0xe6)[0x126d26]
dragon[0x80490a1]
======= Memory map: ========
00110000-002a1000 r-xp 00000000 fd:00 660041                             /lib/libc-2.12.so
002a1000-002a3000 r--p 00191000 fd:00 660041                             /lib/libc-2.12.so
002a3000-002a4000 rw-p 00193000 fd:00 660041                             /lib/libc-2.12.so
002a4000-002a7000 rw-p 00000000 00:00 0
003bc000-003bf000 r-xp 00000000 fd:00 660047                             /lib/libdl-2.12.so
003bf000-003c0000 r--p 00002000 fd:00 660047                             /lib/libdl-2.12.so
003c0000-003c1000 rw-p 00003000 fd:00 660047                             /lib/libdl-2.12.so
003c3000-003eb000 r-xp 00000000 fd:00 660049                             /lib/libm-2.12.so
003eb000-003ec000 r--p 00027000 fd:00 660049                             /lib/libm-2.12.so
003ec000-003ed000 rw-p 00028000 fd:00 660049                             /lib/libm-2.12.so
003fb000-00419000 r-xp 00000000 fd:00 660034                             /lib/ld-2.12.so
00419000-0041a000 r--p 0001d000 fd:00 660034                             /lib/ld-2.12.so
0041a000-0041b000 rw-p 0001e000 fd:00 660034                             /lib/ld-2.12.so
00ab7000-00b96000 r-xp 00000000 fd:00 2901482                            /usr/lib/libstdc++.so.6.0.13
00b96000-00b9a000 r--p 000de000 fd:00 2901482                            /usr/lib/libstdc++.so.6.0.13
00b9a000-00b9b000 rw-p 000e2000 fd:00 2901482                            /usr/lib/libstdc++.so.6.0.13
00b9b000-00ba2000 rw-p 00000000 00:00 0
00c0e000-00c2b000 r-xp 00000000 fd:00 660082                             /lib/libgcc_s-4.4.7-20120601.so.1
00c2b000-00c2c000 rw-p 0001d000 fd:00 660082                             /lib/libgcc_s-4.4.7-20120601.so.1
00e0c000-00e0d000 r-xp 00000000 00:00 0                                  [vdso]
08048000-08052000 r-xp 00000000 fd:00 1182044                            /build/ct-droid1/lichee/tools/pack/pctools/linux/eDragonEx/dragon
08052000-08053000 r--p 0000a000 fd:00 1182044                            /build/ct-droid1/lichee/tools/pack/pctools/linux/eDragonEx/dragon
08053000-08054000 rw-p 0000b000 fd:00 1182044                            /build/ct-droid1/lichee/tools/pack/pctools/linux/eDragonEx/dragon
0a012000-0a033000 rw-p 00000000 00:00 0                                  [heap]
f772c000-f772f000 rw-p 00000000 00:00 0
f7733000-f7735000 rw-p 00000000 00:00 0
fff73000-fff89000 rw-p 00000000 00:00 0                                  [stack]
./pack: line 90:  6521 Aborted                 $@ > $cmdlog
[Failed]

refer to out/pack.log for detail information.

ERROR: Packing Failed.
/build/ct-droid1/android42

The build system is RHEL 6.4 x86_64, I saw similar error described on the Chinese forum with Centos 6 as the build system, however there was no solution for that. I also tried to run dragon.exe on the Windows box separately by hand to make the image, there was no error but the image produced was too small to consider it okay.

Does anyone know if the "dragon" is available as source code?

Offline sv12k

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
    • View Profile
Re: Android image build trouble with "dragon" tool
« Reply #1 on: January 10, 2014, 01:43:08 pm »
I was able to finish the build running dragon on the other host running OpenSuSE 13.1. Now my Logitech k400 partially works... need to figure out what I missed...
« Last Edit: January 10, 2014, 02:25:05 pm by sv12k »

Offline sv12k

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
    • View Profile
Re: Android image build trouble with "dragon" tool
« Reply #2 on: January 15, 2014, 01:17:57 pm »
Finally got it working... after removing all Allwinner patches to libinput.so  >:(

P.S

  • Guest
Re: Android image build trouble with "dragon" tool
« Reply #3 on: January 27, 2014, 05:39:01 pm »
Wow I wish I had the smarts to do that!
Are you going to post your image for other people or is this just for you?
Thanks

Offline sv12k

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
    • View Profile
Re: Android image build trouble with "dragon" tool
« Reply #4 on: January 28, 2014, 02:35:24 am »
Hello P.S.!

I'm surprised that so little people are interested in getting fully functional Android image for cb2. Currently I have Android image based on SDK 1.05 that supports Logitech Unifying Receiver and works fine with keyboard/touchpad composite input devices like Logitech k400. On the other hand I removed support for the touchscreen calibration introduced by the Allwinner guys since I don't need/have it. I will publish a link to the image and patches to SDK 1.05 too if you are interested.

Next problem I faced is more complicated. While software video playback is slow the hardware accelerated CedarX player hidden inside Android media framework is another sample of unfinished/buggy Allwinner code. It has two major issues which make it nearly unusable. First, if it encounters unsupported audio format in video file (dts for example) it simply refuses to play audio. Correct way of handling this is to fall back to non h/w accelerated audio codecs. Second issue is when user clicks "use software codecs for audio" in MX Player or similar software then media framework turns off CedarX completely falling back to software video rendering too. So if you want to watch 1080p MKV file with dts sound you have to choose between slow as hell software rendering with working sound or fast CedarX accelerated renderer without sound. Funny thing that media framework also has audio-only CedarA player which can play hardware accelerated dts.

This one is harder and I still has no time to look at Allwinner media framework changes to figure out if it can be fixed without rewriting tons of code.

P.S

  • Guest
Re: Android image build trouble with "dragon" tool
« Reply #5 on: January 28, 2014, 12:26:44 pm »
I know what you mean. I almost seems like the people that made the cubieboard either don't know how to work with android to make a complete working system or just put a half baked system out there so they can say that it supports Linux and Android. All I know is it fooled me into buying one.
And now its sitting up in my computer room collecting dust till a actually working version comes along.
I will probably sell it some day in the near future and stick with my rooted Acer A500 which is still getting updates to this day after owning it for four years. I just flashed KITKAT on this and it runs awesome. Thee people over at Tegra forums and XDA do magic for android.
Thanks for responding...Great work on what your doing...

Offline sv12k

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
    • View Profile
Re: Android image build trouble with "dragon" tool
« Reply #6 on: January 29, 2014, 02:47:33 am »
Actually Cubieboard is called development board for a reason. This means you'll have to do a lot of development to make something usable :) And Tom Cubie is currently more involved in his new project called Radxa Rock so if your Cubieboard software sucks this is your problem and it's absolutely honest.

P.S

  • Guest
Re: Android image build trouble with "dragon" tool
« Reply #7 on: January 29, 2014, 12:29:59 pm »
Im not implying that anyone was  dishonest. And I do realize that there is a certain amount of work to  make this what we want of it. I think I was expecting things to be like my Raspberry Pi and its not as together with pre development as that. The speed with which these boards are released is fast and the support is a little behind the curve because of that. And about being my problem that is the truth. That is why Im probably going to sell it. It's just not what I expected is all.

Offline mcecilia

  • Newbie
  • *
  • Posts: 28
  • Karma: +0/-0
    • View Profile
Re: Android image build trouble with "dragon" tool
« Reply #8 on: February 11, 2014, 03:49:32 pm »
Hello,
Please, if posible share your findings so me and others could apply to our SDK and learn a bit more.
If needed, by now I have been able to activate other wifi dongles to CB2 and I have change the resolution. I have pending the rotation and the K400 support, at least.
Thanks for your help and understanding.

hambo

  • Guest
Re: Android image build trouble with "dragon" tool
« Reply #9 on: February 12, 2014, 12:16:46 pm »
I'd be interested in knowing how to get my unifying receiver working! I am not a total vegetable, but I have never compiled my own android OS. And I wish I knew what this meant:
http://linux-sunxi.org/Logitech

But if you can offer some kind of mod to get my unifying receiver working I would be jolly grateful!

Offline sv12k

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
    • View Profile
Re: Android image build trouble with "dragon" tool
« Reply #10 on: February 16, 2014, 05:13:55 pm »
Libinput patch on Google drive:
https://drive.google.com/file/d/0B12ezKEQAzmLWDdHRjZqWGdybGM/edit?usp=sharing

Hope you know what to do with patches. This one is against SDK 1.05. I guess there is little adaptation needed for the SDK 1.06 although I didn't tried.

In case you don't know what is it I also shared pre-built libinput.so (SDK 1.05):
https://drive.google.com/file/d/0B12ezKEQAzmLeTBtVGdzeFN2NmM/edit?usp=sharing

You will need to replace it on the running system:
1) Open terminal window
2) Remount /system read-write as root:
$ su -
# mount /system -o remount,rw
3) Move aside old libinput.so:
cd /system/lib
mv libinput.so libinput.so.old
3) Copy new libinput.so in place of old one
cp /sdcard/libinput.so . [I assume new library was in /sdcard folder.]
4) Change file owner and permissions to look similar to old file using chown and chmod.

And one more thing, in order to make Unified receiver work you have to rebuild Kernel with CONFIG_HIDRAW=y, CONFIG_HID_LOGITECH_DJ=y. Let me know if prebuilt kernel needed.

These steps are enough to make it work. The last thing, if you want to make all the 'extra' buttons to work as expected you need to remap them. Read this to get the idea:
http://droid-den.com/guide-how-to-remap-keys-on-a-hardware-keyboard/#.UwE34oVuhD0
« Last Edit: February 16, 2014, 05:16:43 pm by sv12k »

Offline sv12k

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
    • View Profile
Re: Android image build trouble with "dragon" tool
« Reply #11 on: February 17, 2014, 01:10:01 am »

IvanYeung

  • Guest
Re: Android image build trouble with "dragon" tool
« Reply #12 on: March 01, 2014, 12:22:55 am »
Im not implying that anyone was  dishonest. And I do realize that there is a certain amount of work to  make this what we want of it. I think I was expecting things to be like my Raspberry Pi and its not as together with pre development as that. The speed with which these boards are released is fast and the support is a little behind the curve because of that. And about being my problem that is the truth. That is why Im probably going to sell it. It's just not what I expected is all.
Holy cow!!! You got fooled because you were not doing any research??? That's not fooled but dumb!

If you want some canned solution or image, eat your Pi.

cb has no major backing, that's why the support is not as you expected.

Offline asub

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-1
    • View Profile
Re: Android image build trouble with "dragon" tool
« Reply #13 on: March 14, 2014, 05:38:36 am »
Complete image with k400 support (SDK 1.05):
https://drive.google.com/file/d/0B12ezKEQAzmLeTI0NXJZZWItUG8/edit?usp=sharing


hello. K400 keyboard with touchpad part of that image just worked. I can not run keys. How do I run keys. Have img or another?

Offline sv12k

  • Newbie
  • *
  • Posts: 19
  • Karma: +1/-0
    • View Profile
Re: Android image build trouble with "dragon" tool
« Reply #14 on: March 14, 2014, 09:03:29 am »
Hello asub!

I didn't get what you mean by keys. Are you talking about top row keys like volume up/down, rewind/fast forward, etc? If yes then you have to remap keys to their functions using custom key layout file. No need to modify image for that, just add a new layout file, see this link for the guide:

http://droid-den.com/guide-how-to-remap-keys-on-a-hardware-keyboard/#.UyL9U4V-kjd

Yes, this layout file can be added to the image at build time. I didn't do that due to the lack of time.

PS: If ALL keys not working that means I forgot to rebuild image with the patched libinput.so :) There is a link above to libinput.so which I am currently using with k400 as well as the guide how to replace it on running system. It takes only 1-2 minutes to do, reboot afterwards and that's it!
« Last Edit: March 14, 2014, 09:29:51 am by sv12k »