znoxx Posted April 2, 2017 Posted April 2, 2017 Hello everyone I own some noname chinese Android stick, which has Allwinner A20 CPU. Unfortunately, long time ago seller cheated me and device has 512 MB ram instead of 1GB (4 gigabit chips..). It has some "Android" firmware (which shows 1GB), but I cannot find nor backup, neither upgrade firmware. Not a big deal, since device not in active use. I tried Armbian Cubeiboard2 and pcDuino3 builds - everything working like a charm, desktop starts, so I want to run sata-nand install for Armbian for legacy kernel - /dev/nand is here, and I can even dump a "backup" of NAND to have it "just in case". Some help is really appreciated (some questions): I run "sata-nand-install" or whatever it called - it will erase/repartition nand and install the system... Is there a catch ? Assuming NAND is detected, working and writable - what bad things can happen ? If (1) will run smoothly, can I prepare system on microSD (like replace firefox to something more robust, enable ZRAM, etc) and will settings/applications will be transferred to NAND via install script ? I tried only Cubieboard 2 and pcDuino3 - but there are more devices A20 in download section. May be some other device image is more suitable for such experiments ? How I can disable ethernet - via editing script.bin or should I recompile kernel ? pcDuino build tries to enable gmac, fails and I can continue, but Cubieboard2 builds keeps probing until I will say "ifdown eth0". I tried sunxi kernels longtime ago (before active Armbian development) and script.bin patching helped... If script.bin is good way to do this, please point me please to armbian-style-compatible tutorail Thanks a lot for your answers in advance.
zador.blood.stained Posted April 2, 2017 Posted April 2, 2017 3 minutes ago, znoxx said: I run "sata-nand-install" or whatever it called - it will erase/repartition nand and install the system... Is there a catch ? Assuming NAND is detected, working and writable - what bad things can happen ? Android->Linux switching may requre writing a Linux image with PhoenixSuit/LiveSuite first 4 minutes ago, znoxx said: If (1) will run smoothly, can I prepare system on microSD (like replace firefox to something more robust, enable ZRAM, etc) and will settings/applications will be transferred to NAND via install script ? Yes. 5 minutes ago, znoxx said: I tried only Cubieboard 2 and pcDuino3 - but there are more devices A20 in download section. May be some other device image is more suitable for such experiments ? The only differences are u-boot compile-time configuration and script.bin, so it doesn't matter much 6 minutes ago, znoxx said: How I can disable ethernet - via editing script.bin or should I recompile kernel ? pcDuino build tries to enable gmac, fails and I can continue, but Cubieboard2 builds keeps probing until I will say "ifdown eth0". I tried sunxi kernels longtime ago (before active Armbian development) and script.bin patching helped... If script.bin is good way to do this, please point me please to armbian-style-compatible tutorail script.bin editing should be enough, but the only way to say for sure would be checking the kernel code or actually trying to fiddle with script.bin https://linux-sunxi.org/Fex_Guide and in general just bin2fex, edit, fex2bin it back. Please note that you may want to remove Armbian repository from /etc/apt/sources.list.d or pin some packages to prevent upgrades from overwriting your changes. And in general upgrading kernel on NAND is not recommended as it is prone to breaking the system. 1
znoxx Posted April 2, 2017 Author Posted April 2, 2017 Quote Android->Linux switching may requre writing a Linux image with PhoenixSuit/LiveSuite first Yes, I have seen it in Cubieboard2 description... Just curious - does pcDuino have same issue ? For the rest - good news anyway, will give a try someday. Thanks for all your efforts for making this project brilliant!
calhemp Posted April 3, 2017 Posted April 3, 2017 Hi znoxx, I'm running Armbian in a different device a mele a2000, and for luck of me, my device , uboot or the dts is suported in mainline, and I was able to build a image for my device with armbian script with minimal changes, you can check if your device is at wiki of linux-sunxi.org and if there are some uboot mainline support. http://linux-sunxi.org/Category:Devices or if not exists, you can add it at the list http://linux-sunxi.org/New_Device_howto or compare your script.bin in your android image with the cubieboard or pcuino what are the differences. its a great wiki to check allwinner socs and boards, and it helps others with the same problem.
znoxx Posted April 3, 2017 Author Posted April 3, 2017 @calhemp, thanks! Looks like i successfully disabled sata and emac in script bin and changed to 720p resolution, and no errors so far. But since device is 512mb only, my only choice is Midori as a browser (and qupzilla sometimes). Looks like DTS approach (mainline) is not for me, since I'm chasing hardware acceleration for mpv... Time for may be stupid question - if I will install to NANd successfully, does it mean I won't need an SD ? I mean bootloader will be also installed to NAND ?
zador.blood.stained Posted April 3, 2017 Posted April 3, 2017 12 minutes ago, znoxx said: Time for may be stupid question - if I will install to NANd successfully, does it mean I won't need an SD ? I mean bootloader will be also installed to NAND ? Yes
znoxx Posted July 29, 2017 Author Posted July 29, 2017 Digging my old topic. I successfully patched script.bin for my legacy kernel - no problem with this. Now I'm looking into "mainline". Looks like I found dtb file for my device - sun7i-a20-mk808c.dtb The only thing that bugs me with using "cubieboard2" image - I'm getting errors about eth0 (since well, android stick does not have eth0 So I edited armbianEnv.txt and added this: fdtfile=sun7i-a20-mk808c.dtb Looks like it's now working correctly! My question: Is it right approach ? Or I must change device type somehow differently ? And what to read if I want to build my own dtb ?
zador.blood.stained Posted July 29, 2017 Posted July 29, 2017 7 minutes ago, znoxx said: My question: Is it right approach ? It's more a hack. The correct approach would be to use the correct mainline u-boot config for this device - MK808C_defconfig
znoxx Posted July 29, 2017 Author Posted July 29, 2017 So I need to build my own uboot from source ? Or it can be applied somehow without recompilation ?
zador.blood.stained Posted July 29, 2017 Posted July 29, 2017 Just now, znoxx said: So I need to build my own uboot from source ? Yes. Also a "community supported" configuration can be added to the build system to automate image building. 1
znoxx Posted July 29, 2017 Author Posted July 29, 2017 Thanks! I will get familiar with build system.
Recommended Posts