Jump to content

Recommended Posts

Posted

As the other thread is getting a bit cluttered I thought I'd start a new one. Thanks to the good work of @pask and others we now have a working image for the M4 v2. However, despite following instructions to the letter. I can't get the board to boot from the eMMC card, in fact I don't think the board even recognizes the card ( I've tried different ones ) Also not being able to connect via a serial cable is hampering my attempts at debugging the boot process. Cany anyone put up a Muppets guide on the steps required to achieve this ?

 

Posted
31 minutes ago, NicoD said:

Have you tried burning the image directly to eMMC and then apply the patch of pask?
 

Hi Nico, I've burnt the image directly to eMMC using Win32 disk imager ( which is what I always do with the original M4's and they just boot ) but on the v2 I can only access the eMMC card via USB - putting it in the slot doesn't make it accessible - I suspected a problem with the EMMC card itself but I've tried with 3 now and same result - if I dd the patch via USB wouldn't that wipe the card ?

 

Posted

Burn the image to the eMMC. Run your m4 and put the eMMC in the USB, and do the trick of pask on there. 
 

Quote

Basically, I extracted the working bootloader from the Armbian_5.99.191102_Rockpi-4b_Debian_buster_dev_5.3.0 image (which boots, but doesn't works well on the nanopi-m4 v2) and I burnt it to the https://dl.armbian.com/nanopim4/Debian_buster_default_desktop.7z image.

I have prepared a patched image you can try. At the moment, I've tested it only with an SD card, but I guess It'll work on the emmc too.

Download it from https://drive.google.com/open?id=1LaJIywiZnZUkLDZ9HkWrRtc0PyfiYGOL

 

You can also apply the patch by yourself:

 

1) download buster desktop image for nanoPi M4 (version 1) from Armbian's web site https://dl.armbian.com/nanopim4/Debian_buster_default_desktop.7z

2) extract and burn it to an SD card

3) apply the patch I have shared at the link above using the following command, changing sdX with the correct device:
 

sudo dd if=8M_after64ibs_uboot_working_rockpi4image_on_nanopim4v2.dd of=/dev/sdX seek=64

 

You can also download his prepared image an burn it directly to eMMC. 
You'll probably also need Martin's trick to make wifi work. Copy his files to  /lib/firmware/brcm/

You can do this also with bionic, default or dev's. I hope that helps. 

You can't copy the files with winows since it can't rea the linux partitions, so good you've got a normal M4. 
Check the correct disk-name (sda, sdb, ...) and replace the sdx. You need to go to the directory of the file. 

Posted
38 minutes ago, NicoD said:

Burn the image to the eMMC. Run your m4 and put the eMMC in the USB, and do the trick of pask on there. 
 

You can also download his prepared image an burn it directly to eMMC. 
You'll probably also need Martin's trick to make wifi work. Copy his files to  /lib/firmware/brcm/

You can do this also with bionic, default or dev's. I hope that helps. 

You can't copy the files with winows since it can't rea the linux partitions, so good you've got a normal M4. 
Check the correct disk-name (sda, sdb, ...) and replace the sdx. You need to go to the directory of the file. 

Tried it Nico and no good still no boot do I need to dd the patch to /dev/sdb or /deb/sdb1 ?

Posted
1 hour ago, pkfox said:

Tried it Nico and no good still no boot do I need to dd the patch to /dev/sdb or /deb/sdb1 ?

to sdb

Posted
10 hours ago, pkfox said:

As the other thread is getting a bit cluttered I thought I'd start a new one. Thanks to the good work of @pask and others we now have a working image for the M4 v2. However, despite following instructions to the letter. I can't get the board to boot from the eMMC card, in fact I don't think the board even recognizes the card ( I've tried different ones ) Also not being able to connect via a serial cable is hampering my attempts at debugging the boot process. Cany anyone put up a Muppets guide on the steps required to achieve this ?

 

@pkfox

 

1- be sure to connect the usb2ttl dongle to the NanoPi-M4v2 correctly: only rx tx and gnd have to be connected

2 - use "picocom --baud 1500000 /dev/ttyUSB0" to start the serial console (thanks to @martinayotte for recommending a good tool to use)

3 - boot from sd card while keeping the emmc card disconnected. During the boot process, keep a key pressed: the u-boot loader will stop just before launching the kernel

4 - carefully insert the emmc card (pay attention to connect it in the right way!)  (thanks to @martinayotte for this smart&fast method)

5 - write command "boot" in the  console. The kernel will boot, hopefully recognizing the emmc card and creating the proper device (in my case mmcblk2)

6 - sudo nand-sata-install to launch the armbian tool for transferring the sd content to the emmc card in the proper way. At the end of the transfer, DO NOT reboot, but exit to the console

7 - patch the new emmc install to replace the not-yet-working bootloader: sudo dd if=8M_after64ibs_uboot_working_rockpi4image_on_nanopim4v2.dd of=/dev/mmcblk2 seek=64

 

Enjoy your armbian running from the emmc card

 

(tested on buster and the dev kernel)

Posted
35 minutes ago, pask said:

@pkfox

 

1- be sure to connect the usb2ttl dongle to the NanoPi-M4v2 correctly: only rx tx and gnd have to be connected

2 - use "picocom --baud 1500000 /dev/ttyUSB0" to start the serial console (thanks to @martinayotte for recommending a good tool to use)

3 - boot from sd card while keeping the emmc card disconnected. During the boot process, keep a key pressed: the u-boot loader will stop just before launching the kernel

4 - carefully insert the emmc card (pay attention to connect it in the right way!)  (thanks to @martinayotte for this smart&fast method)

5 - write command "boot" in the  console. The kernel will boot, hopefully recognizing the emmc card and creating the proper device (in my case mmcblk2)

6 - sudo nand-sata-install to launch the armbian tool for transferring the sd content to the emmc card in the proper way. At the end of the transfer, DO NOT reboot, but exit to the console

7 - patch the new emmc install to replace the not-yet-working bootloader: sudo dd if=8M_after64ibs_uboot_working_rockpi4image_on_nanopim4v2.dd of=/dev/mmcblk2 seek=64

 

Enjoy your armbian running from the emmc card

 

(tested on buster and the dev kernel)

Thanks @pask I'll give it a go in the morning - I use putty from Windows though

Posted
13 hours ago, pask said:

 

Quote

 

 

Quote

I don't have a choice on what is connected as I have a block connector - but don't see this as a problem as I know the cable works

 

1- be sure to connect the usb2ttl dongle to the NanoPi-M4v2 correctly: only rx tx and gnd have to be connected

Is the M4 powered up at this point ? I presume not

During the boot process, keep a key pressed: the u-boot loader will stop just before launching the kernel

If I press a key the process appears to stop and if I release it and start typing boot I get the login prompt - confused

Posted
3 hours ago, pkfox said:

If I press a key the process appears to stop and if I release it and start typing boot I get the login prompt - confused

Press several times <spacebar> until u-boot stop and provide a command prompt.

Posted
3 hours ago, martinayotte said:

Press several times <spacebar> until u-boot stop and provide a command prompt.

Still no joy @martinayotte - to make sure I'm doing things in the correct order this is what I do

1) Make sure the M4 board is powered off and remove the power cable

2) Connect the serial cable

3) Start a terminal on my Linux laptop

4) enter picocom --baud 115200 /dev/ttyUSB0 -- I tried pasks 1500000 and got invalid baud rate error

Get this ouput

 

picocom v1.7

port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 115200
parity is      : none
databits are   : 8
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv
imap is        :
omap is        :
emap is        : crcrlf,delbs,

Terminal ready

 

5) Apply power to the M4 and immediately press the <spacebar> repeatedly

 

Result is garbage on screen and no command prompt

 

Posted
14 minutes ago, pkfox said:

enter picocom --baud 115200 /dev/ttyUSB0

...

19 hours ago, pask said:

2 - use "picocom --baud 1500000 /dev/ttyUSB0" to start the serial console (thanks to @martinayotte for recommending a good tool to use)

 

 

or also shown here:

 

 

Posted

well you need a device able to go to this baudrate.. otherwise you'll only get garbage out. as describen in the topic I linked, if all things go wrong.. you can even ssh into a SBC use its UART to connect to another one, called the silly approach (and if you love the insane approach, you can then even uart back to the first one.. :D).

IMG_20180925_214716.JPG

Posted
5 minutes ago, chwe said:

well you need a device able to go to this baudrate.. otherwise you'll only get garbage out. as describen in the topic I linked, if all things go wrong.. you can even ssh into a SBC use its UART to connect to another one, called the silly approach (and if you love the insane approach, you can then even uart back to the first one.. :D).

IMG_20180925_214716.JPG

4 minutes ago, chwe said:

well you need a device able to go to this baudrate.. otherwise you'll only get garbage out. as describen in the topic I linked, if all things go wrong.. you can even ssh into a SBC use its UART to connect to another one, called the silly approach (and if you love the insane approach, you can then even uart back to the first one.. :D).

IMG_20180925_214716.JPG

But I use this cable/adapter on all my other M4 boards without any problems @115200

Posted
9 hours ago, martinayotte said:

This is because you have an old version of picocom, you can build more recent one using https://github.com/npat-efault/picocom

Right finally I am getting somewhere thanks to yours and others help. I downloaded and compiled the latest version of picocom and was able to use the baudrate stated in pask's post. Powered up the board and no rubbish this time all plain English text. Hit any key and was rewarded with ( I presume ) the uboot prompt of =>. Inserted the eMMC card and entered "boot". Logged in all ok except there was still only one entry in /dev/ for mmcblk*. Tried again with another eMMC card but no good. I'm starting to think both my cards are f****d. But they can't be because I can dd images to both of them.

Posted
2 hours ago, pkfox said:

Right finally I am getting somewhere thanks to yours and others help. I downloaded and compiled the latest version of picocom and was able to use the baudrate stated in pask's post. Powered up the board and no rubbish this time all plain English text. Hit any key and was rewarded with ( I presume ) the uboot prompt of =>. Inserted the eMMC card and entered "boot". Logged in all ok except there was still only one entry in /dev/ for mmcblk*. Tried again with another eMMC card but no good. I'm starting to think both my cards are f****d. But they can't be because I can dd images to both of them.

@pkfox

Are you sure you inserted the emmc in the right way?

The emmc socket is mechanically symmetrical, not electrically

Posted
38 minutes ago, pask said:

@pkfox

Are you sure you inserted the emmc in the right way?

The emmc socket is mechanically symmetrical, not electrically

Hi Pask, yes definitely in the right way with the long part over the top of the HDMI socket

Posted
37 minutes ago, pkfox said:

Hi Pask, yes definitely in the right way with the long part over the top of the HDMI socket

@pkfox

The long part of my emmc card has an hole for a screw: this part has to be aligned to the screw holder, in the opposite side with respect to the hdmi. Il you buyed the emmc for the first version of the m4, I suspect yours does not have the hole. Try to place as if it had.

Posted
1 hour ago, pkfox said:

Hi Pask, yes definitely in the right way with the long part over the top of the HDMI socket

 

50 minutes ago, pask said:

The long part of my emmc card has an hole for a screw:

Jup, they changed the direction of eMMC on M4V2. Now it has the screw hole on the other side. The M4 was over the hdmi.  The pictures on FriendlyElec their site clearly show this. 
But they should have adjusted the pinout on the wiki too. It's still the same, it should be turned upside down. 

Posted
7 hours ago, pkfox said:

still only one entry in /dev/ for mmcblk*

You probably need to decompile M4v2 DT, and after having commented the "mmc-hs400-1_8v;" and "mmc-hs400-enhanced-strobe;" and recompiled DTB,

Posted
4 hours ago, pask said:

@pkfox

The long part of my emmc card has an hole for a screw: this part has to be aligned to the screw holder, in the opposite side with respect to the hdmi. Il you buyed the emmc for the first version of the m4, I suspect yours does not have the hole. Try to place as if it had.

So you are saying I'm putting the card in the wrong way around ? I'm at work at the moment will try the other way when I get home - thanks guys

Posted

Finally got this new board to boot from eMMC - a huge thanks to all on here who guided me. The final missing link was the manufacturer of the board decided to reverse the eMMC connection ( thank you @pask ) It's been a good learning curve though - Big tip of the hat to @pask who built the working image and @martinayotte for sussing the WiFi and other stuff. Now if only someone could get a HiFiBerry DAC hat working on one of these :-)

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines