Jump to content

Recommended Posts

Posted

Hi Folks,

 

did anybody got a working Armbian image for the Nanopi-K2 EMMC version. The SD Version works great, I'm looking for an EMMC version, or a tutorial on how to convert the SD version into an EMMC Version.

I know that there is an EMMC OÌmage at NanoPi Download page, BUT with this version none of the 4 USB Ports is working, and the Kernel is 3.14. and cannot be updated anymore.

 

many thanks for any hint

 

PS: I also try to contact nanopi support but I never get any response from them.

 

wikrie

Posted
10 minutes ago, wikrie said:

did anybody got a working Armbian image for the Nanopi-K2 EMMC version.

I've a K2 board, but unfortunately, I don't have the eMMC module.

But looking at the DT, it seems that eMMC node is present, but not enabled.

Maybe you can simply decompile DTB into DTS, edit the DTS to change node status to "okay" and recompile DTB.

Then, reboot and see if you have it available ... Then, transfer SD to eMMC using "nand-sata-install" ...

Posted

Hi Martinayotte,

 

thanks for your reply, could you please explain this more in details.

I already try to use the nand-sata.install comandbut when I choos to use EMMC it try to delete and copy the SD Card, so the Block Device is the SAME I do not have a EMMC device for the installation.

 

 

Posted
52 minutes ago, wikrie said:

could you please explain this more in details.

First, install DT compiler from http://ftp.debian.org/debian/pool/main/d/device-tree-compiler/device-tree-compiler_1.4.7-3_arm64.deb

Then, do a backup of the DTB here : /boot/dtb/amlogic/meson-gxbb-nanopi-k2.dtb

Decompile it into DTS :

dtc -@ -I dtb -O dts -o meson-gxbb-nanopi-k2.dts /boot/dtb/amlogic/meson-gxbb-nanopi-k2.dtb

Edit the resulting meson-gxbb-nanopi-k2.dts and find the eMMC node "mmc@74000", change it status from "disabled" to "okay" and save.

Recompile the DTB :

dtc -@ -I dts -O dtb -o /boot/dtb/amlogic/meson-gxbb-nanopi-k2.dtb meson-gxbb-nanopi-k2.dts

Then, reboot ...

To check if it is now present do "ls -l /dev/mmc*", if it is now there use again "nand-sata-install" .

Posted
Spoiler

 


Uboot
diff --git a/arch/arm/dts/meson-gxbb-nanopi-k2.dts b/arch/arm/dts/meson-gxbb-nanopi-k2.dts
index cbe99bd4..da98bc02 100644
--- a/arch/arm/dts/meson-gxbb-nanopi-k2.dts
+++ b/arch/arm/dts/meson-gxbb-nanopi-k2.dts
@@ -314,7 +314,7 @@
 
 /* eMMC */
 &sd_emmc_c {
-	status = "disabled";
+	status = "okay";
 	pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
 	pinctrl-1 = <&emmc_clk_gate_pins>;
 	pinctrl-names = "default", "clk-gate";

Kernel      
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
index 80c87e0bb..800a8c2cf 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
@@ -382,7 +382,7 @@
 
 /* eMMC */
 &sd_emmc_c {
-	status = "disabled";
+	status = "okay";
 	pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
 	pinctrl-1 = <&emmc_clk_gate_pins>;
 	pinctrl-names = "default", "clk-gate";

 


eMMC is up after applying patches for u-boot and kernel ... but strangely it doesn't work. After accessing it, it tells I/O error and network falls apart :) ATM I don't know whether my (only) eMMC is just broken or there is something else. 

http://ix.io/1KVW

Update: eMMC works fine on Allwinner H5 K1+

Posted
27 minutes ago, Igor said:

After accessing it, it tells I/O error

What kind of I/O errors ?

 

Maybe you can try with those DT node properties commented :

mmc-ddr-1_8v;
mmc-hs200-1_8v;

 

Posted

That helped but there is no another problem :) Now eMMC is accessible from Linux and u-boot but it looks like different boot loader is needed for eMMC. That't all what's on UART:

08915d0000000000GXBB:BL1:08dafd:0a8993;FEAT:EDFC318C;POC:3;RCY:0;EMMC:0;READ:0;CHK:F3;SD:800;USB:8;

 

Posted
12 minutes ago, Igor said:

Now eMMC is accessible from Linux and u-boot but it looks like different boot loader is needed for eMMC

Do you mean that if you boot from SD and stop u-boot, "mmc part" and "ls mmc" works on eMMC ?

In such case, yes, it is probably bootloader itself...

But I'm not the expert on AmLogic, maybe @TonyMac32 has some idea ?

Posted

I did nand-sata and tried to boot from eMMC as is. I wil proceed tomorow and also hope Tony knows more about this.

Wrote on mobile

Posted

The eMMC bootloader is always installed a little differently on the eMMC than SD. The output Igor is seeing is the first stage loader in the SoC, it's not finding the bootloader where it wants to see it, it's probably just an offset.

Sent from my Pixel using Tapatalk

Posted

help I'm lost, I try to do all the steps you provide to me, but I stil stuck in the problem that I cannot run nand-sata-install correctly, first problem was Input/Outpu error, the I comment the 2 lines out

mmc-ddr-1_8v; mmc-hs200-1_8v;

but after that I still cannot run the nand-sata-installer, now I get the error partiton to small.

I stil cannot edit modify the mmcblk0 device.

I see both devices SD and emmc but I do not have correct access to emmc device.

seams I'm not good enough to fix this issue. so I waisted just 20 bugs for the emmc but thats live.

Maybe somebody has another Idea how to get the emmc running under armbian.

 

 

Posted

─eMMC install────────────────────────┐
│                                                          │  
│ Partition too small. Needed: 1866 MB Avaliable:  MB      │  
 

This is the last message from the installer.

wikrie@nanopik2:~$ lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk0      179:0    0 29,1G  0 disk
├─mmcblk0p1  179:1    0 28,9G  0 part
└─mmcblk0p2  179:2    0  250M  0 part
mmcblk0boot0 179:32   0    4M  1 disk
mmcblk0boot1 179:64   0    4M  1 disk
mmcblk1      179:96   0 28,9G  0 disk
└─mmcblk1p1  179:97   0 28,6G  0 part /
zram0        253:0    0   50M  0 disk /var/log
zram1        253:1    0  247M  0 disk [SWAP]
zram2        253:2    0  247M  0 disk [SWAP]
zram3        253:3    0  247M  0 disk [SWAP]
zram4        253:4    0  247M  0 disk [SWAP]

 

 

mmcblk0 must be my emmc module and mmcblk1 must be my sd card, but I cannot access the emmc card correctly

 

(parted) select /dev/mmcblk0
Using /dev/mmcblk0

(parted) rm 1
Error: Input/output error during write on /dev/mmcblk0

 

there it is again the I/O error

Posted
14 minutes ago, TonyMac32 said:

The last 4-5 posts very clearly say "we're close, please wait".

Sent from my Pixel using Tapatalk
 

Thanks I will check it tomorrow, sleep well!

 

Posted
59 minutes ago, TonyMac32 said:

I unfortunately do not have an eMMC for my K2 to test, but the others here do.

That is my case too, but I've jumped this afternoon to order one : unfortunately, even if choosing China post shipping, the order came to $12.95 + $8.00 shipping ... <_<

Posted
8 hours ago, martinayotte said:

That is my case too, but I've jumped this afternoon to order one : unfortunately, even if choosing China post shipping, the order came to $12.95 + $8.00 shipping ... <_<

I order the same and the delivery for that item was strange, because it was send as per lastname, that means in Germany you have to sign for the delivery, this is mostly used for letter from law or something else important, not for a 20 bucks china delivery ... :-) so if you get a notification to catch it by signing dont worry it is the emmc card from china!! :-) Thatsthe reason why it costs 8 € delivery.

Posted
3 hours ago, wikrie said:

If I could test something with my emmc please tell me what and I will do!

It seems that @Igor have done the commit here : https://github.com/armbian/build/commit/7c73d7a61f0724f9a4465604ffb683bcd18a997d

The only things required is how to push u-boot in eMMC. I presume it is done with help from this (changing $1 to $DIR and $2 to /dev/mmcblk1) :

root@nanopik2:~# cat /usr/lib/u-boot/platform_install.sh 
DIR=/usr/lib/linux-u-boot-dev-nanopik2-s905_5.86_arm64
write_uboot_platform () 
{ 
    dd if=$1/u-boot.bin of=$2 bs=1 count=442 conv=fsync > /dev/null 2>&1;
    dd if=$1/u-boot.bin of=$2 bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1
}

 

Posted

as I wrote bevor I cannot access the emmc in any way from the nanopik2, I just see the emmc.

but everytime I try to access it I get I/O Error. I will try to start this from a clean system. Maybe I do some mistake in the meanwhile.

BTW is the DT compiler version important? I use 1.4 insteaf of 1.4.7-3.

SO I will try it again and send over my feedbacks.

 

Posted

So I was able to run the nand-sata-installer and my emmc flash drive was correctly written, then I also run the platform_installer.sh with the modification shown above. But still the K2 only boots from SD if I try to boot the K2 with emmc only I just see a black screen, I do not see any mistake and/or problem! btw I change the advise from above.

$2 to /dev/mmcblk1

that would be offset my SD Card ?? for that reason I change it to mmcblk0

... but still blakc screen with emmc.

any advise?

Posted
11 hours ago, wikrie said:

Any new Advise?


Wait.


Until we don't solve this and provide an update, study this document to understand how things are in general. This is not a commercial service - support comes in "as is" fashion. We all have own agendas, lives, jobs, ... Next. Forum has some rules of engagement which sadly not many people read - topic bumping is not something we are happy about and can lead to technical prevention of asking questions.

 

A problem you face is just one of many and is not even critical. You can still run a system from SD card and transfer to eMMC after we find enough time to solve this and provide an update which you can install in a simple manner.

Posted

Sorry for my meretriciousness, you are totaly right, and I keep my fingers cross that there will be a solution some day. So far I could try to find out the different between booting DT from Vendor (but no USB) and the DT from us here, maybe I can see the reason why this DT is not booting up.

So have a nice day and it would be great to hear from you again.

 

br wikrie

Posted
5 hours ago, wikrie said:

here will be a solution some day.

Probably ... In my case, I can't work on the issue until I receive the eMMC module that I've just ordered few days ago ...

Posted
On 6/7/2019 at 3:43 AM, wikrie said:

it would be great to hear from you again.

I've received my eMMC module yesterday ! :)

Although @Igor committed this https://github.com/armbian/build/commit/7c73d7a61f0724f9a4465604ffb683bcd18a997d , it doesn't work out-of-the-box ... :(

I've tried to manually place u-boot on eMMC using :

dd if=/usr/lib/linux-u-boot-dev-nanopik2-s905_5.89_arm64/u-boot.bin of=/dev/mmcblk0 bs=1 count=442 conv=fsync
dd if=/usr/lib/linux-u-boot-dev-nanopik2-s905_5.89_arm64/u-boot.bin of=/dev/mmcblk0 bs=512 skip=1 seek=1 conv=fsync

But still no luck ! :(

We need to investigate more ...

Maybe our Meson64 expert here, @TonyMac32 could give us some help here ?

Posted
On 6/21/2019 at 10:32 AM, martinayotte said:

Maybe our Meson64 expert here, @TonyMac32 could give us some help here ?

:lol:

 

If I'm remembering correctly there are multiple binaries created by the u-boot fip process for amlogic, they have different magic. 

 

We should be burning u-boot.bin.sd.bin for SD, for eMMC I believe we need u-boot.bin. (512 bytes smaller than the u-boot.bin.sd.bin)

 

So what's in your resulting SD card is the .bin.sd.bin, not the .bin

 

Also:

 

	write_uboot_platform()
	{
		dd if=$1/u-boot.bin of=$2 bs=1 count=442 conv=fsync > /dev/null 2>&1
		dd if=$1/u-boot.bin of=$2 bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1
	}

This is what our script does to write the bootloader.  I can't find the reference for this at the moment, but,  doing a hexdump, the .sd.bin is identical to the .bin, just starting at offset 0x200.

 

So, we should be able to use the u-boot.bin.sd.bin as long as we skip the first 512 bytes of it and write it to the second sector.

 

So something like only the command below

dd if=$1/u-boot.bin bs=512 skip=1 of=$2 bs=512 skip=1 seek=1 conv=fsync > /dev/null 2>&1

(if I made a silly disk destroyer parameter mistake, please correct me)

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines