martinayotte Posted August 21, 2017 Posted August 21, 2017 I have a NanoPi-K2 sitting in the dust since awhile. I decided to try some images from @balbes150, such as Armbian_5.32_S9xxx_Ubuntu_xenial_3.14.29_server_20170820.img.xz or even some other such Armbian_5.27_S9xxx_Debian_jessie_4.13.0-next-20170731+_server.img.xz, but none of them is even starting to load u-boot ... It is only producing such output on debug serial : GXBB:BL1:08dafd:0a8993;FEAT:EDFC318C;POC:3;RCY:0;EMMC:800;NAND:81;SD:0;READ:0;CHK:F3;USB:8;LOOP:1;EMMC:800;NAND:81;SD:0;READ:0;CHK:F3;USB:8;LOOP:2;EMMC:800;NAND:81;SD:0;READ:0;CHK:F3;USB:8; I don't know much about Amlogic, what I'm missing ?
zador.blood.stained Posted August 21, 2017 Posted August 21, 2017 AFAIK most Amlogic devices supported by @balbes150 are TV boxes with eMMC storage and on Amlogic devices eMMC has higher boot priority compared to SD. So most likely those images don't have u-boot at all and rely on stock u-boot in eMMC. You can try comparing official FriendlyELEC images and these images in a hex editor.
martinayotte Posted August 21, 2017 Author Posted August 21, 2017 Ah ! Ok ! That would means that I've to overwrite the u-boot with one that is working ? I will try that, I've just downloaded this one : nanopi-k2_ubuntu_core_xenial-20170718.img.zip
zador.blood.stained Posted August 21, 2017 Posted August 21, 2017 16 minutes ago, martinayotte said: That would means that I've to overwrite the u-boot with one that is working ? Yes, and most likely find/grab a proper Device Tree file or point the u-boot to the proper one.
Igor Posted August 21, 2017 Posted August 21, 2017 It's possible to boot Armbian image but with manual boot commands. U-boot needs some fixing.
zador.blood.stained Posted August 21, 2017 Posted August 21, 2017 And since it is S905 based it may be possible to rely on pure mainline u-boot using Odroid C2 config with some patches. http://git.denx.de/?p=u-boot.git;a=blob;f=board/amlogic/odroid-c2/README;h=b407c049526c334b983b5397c752c6486832746c;hb=HEAD
martinayotte Posted August 21, 2017 Author Posted August 21, 2017 Grrrrr ! Even this FriendlyELEC nanopi-k2_ubuntu_core_xenial-20170718.img.zip image just enter in a boot loop for awhile, but after several trys, I've finally got the prompt ... Thanks, Zador for the hints, I will take a lot at that ! Unfortunately, I think it will take a lot of efforts ... EDIT : Grrrrr ! After a reboot, the boot loop came back again ...
Igor Posted August 21, 2017 Posted August 21, 2017 6 minutes ago, zador.blood.stained said: And since it is S905 based it may be possible to rely on pure mainline u-boot using Odroid C2 config with some patches. Yes, that is worth trying ... but u-boot needs to be pushed in the ass first
zador.blood.stained Posted August 21, 2017 Posted August 21, 2017 5 minutes ago, Igor said: Yes, that is worth trying ... but u-boot needs to be pushed in the ass first You mean something like this? https://lists.denx.de/pipermail/u-boot/2017-May/291439.html Since it's a new device we can experiment all we want (compared to XU4 where unfortunately we already have mainline based images marked as "stable" with the legacy u-boot). Also since I don't see mainline images for C2 marked as "stable" we can probably use the mainline u-boot for C2 next/dev branches too.
martinayotte Posted August 21, 2017 Author Posted August 21, 2017 Let see : I'm currently building an image for C2, then I will try it out ...
TonyMac32 Posted August 21, 2017 Posted August 21, 2017 @zador.blood.stained hit it on the head, there is no u-boot in balbes images. If you still get the loop with a custom image, the u-boot blob isn't being written to the correct position on the card, so the first stage bootloader isn't seeing it. Now I don't know why you might be able to get to a u-boot prompt "after a while". That doesn't sound healthy. I have the u-boot source from the June Amlogic sources, what board is the K2 most like, maybe I can build a blob for you that will work.
martinayotte Posted August 21, 2017 Author Posted August 21, 2017 40 minutes ago, TonyMac32 said: If you still get the loop with a custom image, the u-boot blob isn't being written to the correct position on the card, so the first stage bootloader isn't seeing it. Now I don't know why you might be able to get to a u-boot prompt "after a while". That doesn't sound healthy The boot loop wasn't with balbes image, but with FriendlyELEC image ... So, not stable enough, I decided to build a C2, and will report back if it is working better.
balbes150 Posted August 22, 2017 Posted August 22, 2017 13 hours ago, zador.blood.stained said: AFAIK most Amlogic devices supported by @balbes150 are TV boxes with eMMC storage and on Amlogic devices eMMC has higher boot priority compared to SD. So most likely those images don't have u-boot at all and rely on stock u-boot in eMMC. You can try comparing official FriendlyELEC images and these images in a hex editor. 13 hours ago, martinayotte said: I decided to try some images from @balbes150, such as Armbian_ Further in the subject have the right information on how to start Armbian on this model.
martinayotte Posted August 22, 2017 Author Posted August 22, 2017 Thanks, @balbes150 ! Using @kicker22004 patches, I got the Armbian_5.32_S9xxx_Ubuntu_xenial_3.14.29_server_20170820.img.xz image booting ! But unfortunately, on-board WiFi not detected ... Trying some Mainline images didn't lead to some success, staying stuck at "Starting kernel ..." ! EDIT : even the Armbian_5.32_S9xxx_Ubuntu_xenial_3.14.29_server_20170820.img.xz start doing some reboot loop now. I think my board is simply defective, FriendlyArm maybe simply send me this sample from "rejected" one ... (It will return in the drawer to collect dust )
balbes150 Posted August 22, 2017 Posted August 22, 2017 You have tried to load manually the module Wi-Fi (in all the latest my images the WiFi module is NOT enabled by default) ?
martinayotte Posted August 22, 2017 Author Posted August 22, 2017 Unfortunately, with Armbian_5.32_S9xxx_Ubuntu_xenial_3.14.29_server_20170820.img.xz, there is no modules for AP6212, either it is part of kernel or not present at all, although the /lib/firmware/ap6212 is present. "dmesg" doesn't reveal much. Anyway, with the intermittent reboots and boot loops occurring in the middle of some apt-get I had this morning, I'm convince that this board is probably defective.
TonyMac32 Posted August 22, 2017 Posted August 22, 2017 Is it overheating? (Dumb question I know, but thought I'd ask anyhow)
Tido Posted August 22, 2017 Posted August 22, 2017 1 hour ago, martinayotte said: intermittent reboots I had once a bad power connector (barrel jack) and it took me a while to find out it was this and not the software that forced the reboots Doesn't this board have to ways to power it ?
martinayotte Posted August 22, 2017 Author Posted August 22, 2017 1 hour ago, TonyMac32 said: Is it overheating? I can almost not feeling any heat, probably only a bit higher than room temp ... EDIT : it seems to be 44oC
martinayotte Posted August 22, 2017 Author Posted August 22, 2017 25 minutes ago, Tido said: Doesn't this board have to ways to power it ? Since the center pin of the barrel is bigger than the one from OPi, I didn't have any jack for it, so I've powered the board directly from 5V pin of the header. BTW, I've finally recover the bad apt-get without reboot, but I don't know when things will go bad again, maybe it is a bad DRAM and crash when hitting bad region.
debianxfce Posted August 23, 2017 Posted August 23, 2017 5 hours ago, martinayotte said: Since the center pin of the barrel is bigger than the one from OPi, I didn't have any jack for it, so I've powered the board directly from 5V pin of the header. BTW, I've finally recover the bad apt-get without reboot, but I don't know when things will go bad again, maybe it is a bad DRAM and crash when hitting bad region. You can test the RAM by installing the memtester package and run: sudo memtester 1024 5 This should allocate 1024MB of memory, and repeat the test 5 times.
balbes150 Posted August 23, 2017 Posted August 23, 2017 10 hours ago, martinayotte said: Unfortunately, with Armbian_5.32_S9xxx_Ubuntu_xenial_3.14.29_server_20170820.img.xz, there is no modules for AP6212, either it is part of kernel or not present at all, although the /lib/firmware/ap6212 is present. "dmesg" doesn't reveal much. Anyway, with the intermittent reboots and boot loops occurring in the middle of some apt-get I had this morning, I'm convince that this board is probably defective. modprobe dhd or modprobe wifi_dummy PS In order to better understand the features of these images Armbian (they have a number of differences from the official versions), I recommend to read the latest pages of the topic. 1
martinayotte Posted August 23, 2017 Author Posted August 23, 2017 Thanks, @balbes150 ! I so used to play with Mainline, that I feel like a newbie and playing with Legacy ... The "modprobe dhd" worked. 1
martinayotte Posted September 4, 2017 Author Posted September 4, 2017 Wishing to having a Mainline running on this NanoPi-K2, I gave second tried using Armbian_5.32_S9xxx_Ubuntu_xenial_4.13.0-rc7-next-20170901_mate.img.xz and then dts.img copied and ran ./fusing.sh /dev/sdx. Still no chance : still stuck at "Starting kernel ...". About trying using a OrdoidC2 build, but they have some protection in their u-boot/bl1.bin.hardkernel, producing the following error : ***** Warning!! ***************************************************** * This board have not been autorized or product keys are not valid. * * Please contact with Hardkernel or your distributor * *********************************************************************
TonyMac32 Posted September 4, 2017 Posted September 4, 2017 Mainline built with Armbian runs on Le Potato with no issues, have you tried to build it yourself? I did have to play with the boot script due to some device names moving around. The nanopi is basically a Meson-gxbb, correct?
martinayotte Posted September 4, 2017 Author Posted September 4, 2017 Do you means that you've used a OdroidC2 build to run on LePotato and you didn't face the protection I've mentioned ? I will try to build a LePotato image and try to boot it on K2 ... Thanks ! EDIT : Unfortunately, a LePotato image doesn't work, it produce the same boot loop I've originally mentioned few weeks ago. GXBB:BL1:08dafd:0a8993;FEAT:EDFC318C;POC:3;RCY:0;EMMC:800;NAND:81;SD:0;READ:0;CHK:F3;USB:8;LOOP:1;EMMC:800;NAND:81;SD:0;READ:0;CHK:F3;USB:8;LOOP:2;EMMC:800;NAND:81;SD:0;READ:0;CHK:F3;USB:8; And of course, fusing the crappy k2uboot.bin was waste of time, because it require a FAT boot partition. I think I'm missing a lot of knowledge on those AmLogic (I'm too fluent with AllWinner).
TonyMac32 Posted September 4, 2017 Posted September 4, 2017 Right, sorry I was vague. The bootloader is the difference (s905x versus the s905), I don't have a K2 to experiment with to build it, but if you clone https://github.com/Tonymac32/Amlogic-u-boot And get the toolchain it calls out in the makefile (I haven't tried with others, I stuck with what worked since I didn't want to get lost in the woods), you should be able to modify the proper board the K2 is most similar to to pull the boot.scr from ext4 (example) Make sure EXT4 is enabled Makes sure ext4 commands are enabled And, using @balbes150's excellent work as a guide, set it up to look for boot script on various devices. The new "file loader" command: bloader going to the root of the working directory run "./mk <boardname>", go to the "fip" directory, and burn the "u-boot.bin" to SD: dd if=u-boot.bin of=<your SD Card> bs=512 seek=1 conv=fsync Le Potato Boot script (reference) Device numbers may vary. At present the boot blob I made for Le Potato successfully handles EXT4 without complaint. There are some grumblings from routines I haven't squashed that are looking for early dtb loading for 3.x kernels using FAT, but that won't bother mainline.
martinayotte Posted September 4, 2017 Author Posted September 4, 2017 Thanks @TonyMac32 ! Unfortunately, still doesn't work ! Boot loop mentioned above still there an u-boot never started ... You u-boot build successfully, I've only had to change the CROSS_COMPILER path in the Makefile. The "make sure" you've mentioned were already present, so I've "dd" the resulting "u-boot.bin". It looks like it doesn't even load that u-boot. What those means exectly ? GXBB:BL1:08dafd:0a8993;FEAT:EDFC318C;POC:3;RCY:0;EMMC:800;NAND:81;SD:0;READ:0;CHK:F3;USB:8;LOOP:1; Some thing look strange to me : doing "strings u-boot.bin" doesn't show any default variables like it used too with any other u-boot. EDIT : btw, are you sure about "bs=512 seek=1" ? It seems to be pretty low compare to AllWinner where u-boot is usually placed at "bs=1024 seek=8"
TonyMac32 Posted September 4, 2017 Posted September 4, 2017 Yeah, it's not finding the bootloader. Hmm, which board did you use as template? There is an offset of some sort between the two, when using an S905 image on S905X you get the same result. Another good example of needing all the cousin boards, I'll have to get my hands on a K2 and a C2. Yes, that is the dd command, I've been using it almost daily. ;-) I'll make sure the S905 is the same, why it wouldn't be I don't know
martinayotte Posted September 5, 2017 Author Posted September 5, 2017 I did "./mk gxl_libretech_cc" I must admit that I'm a bit lost with this board, compared with all the the work I've done with Allwinner ones.
Recommended Posts