Jump to content

SriLK

Members
  • Posts

    10
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. SriLK

    NanoPI M4

    Yes! you can mount Armbian with the real info provided by fdisk -l, as it should be... and if you have automount, the system will mount it automatically and correctly without even the necessity to multiply the start sector * bytes per sector . But not at those non-standard raw images from friendlyarm ubuntu OS the fdisk -l offsets are informed incorrectly (as said)... but well, with the info at previous post the real offsets are now known and the rootfs can be mounted easily. In the other hand Armbian emmc has no recovery available so you can not use rkflashkit. BUT: we don't need that shit because we already got GOD mode!
  2. SriLK

    NanoPI M4

    I recovered all the files from my unbootable M4 EMMC and got my server back on with same functionality as before. Once done I wanted to know why I couldn't mount the raw image partitions backed up with friendlyarm's eflasher utility (or directly with dd from my Linux box of the eMMC connected with the USB-EMMC interface supplied by Friendlyarm)... that had been much easier! After some investigation, the secret here WAS that there is a extra 4MB offset to add to the informed offsets. This is the calculations done rkflashkit log: uboot (0x00002000 @ 0x00002000) 4 MiB trust (0x00002000 @ 0x00004000) 4 MiB misc (0x00002000 @ 0x00006000) 4 MiB resource (0x00006000 @ 0x00008000) 12 MiB kernel (0x00010000 @ 0x0000E000) 32 MiB boot (0x00010000 @ 0x0001E000) 32 MiB rootfs (0x01CEF000 @ 0x00030000) 14814 MiB Offsets once mounted as recovery. Hexs are in 512 Byte blocks, so: 0x00030000 = 196608 = x*1024*1024/512; x= 96Mb = 100663296 B rootfs actual offset at raw image: 0x6400000 = 104857600 B = 100 MB So, for rootfs: sudo mount -o loop,offset=104857600 -t ext4 friendlycore-bionic-4.4.raw.img /media/img/ Diff offset to add to the informed offset by recovery = 4mb example for partition boot: 0x0001E000 = 122880 = x*1024*1024/512; x= 60Mb raw image real offset for boot = 60 + 4 = 64Mb = 67108864 B Summarizing: for mounting the rootsfs partition contained in the raw image (containing a Friendlyarm distributed linux OS), what is needed to do is: sudo mount -o loop,offset=104857600 -t ext4 friendlycore-bionic-4.4.raw.img /media/img/ I thought that somebody might be in the same situation as the one I was in my 1st post. AND, if that somebody is not able to enter recovery mode by shorting the ADC_IN1 (R35) point to GND while connecting the USB Type-C, them, might prefer to extract the files by mounting the rootfs partition. Or even make changes directly there. Thats all!
  3. SriLK

    NanoPI M4

    I said I do it, and I do it... no matter what... those files were too much valuable for m, and now they are back under my control:-) And well, I got some tricks for soldering: solder paste (something like Sn42/Bi57.6/Ag0.4), Hot air SMD solder and big magnifier lens.... with that, solding skills are not so important. Not expensive eigther!
  4. SriLK

    NanoPI M4

    It worked! Shorting the recovery (ADC_IN1) point to GND entered successfully into recovery. rkflashkit inmediately got the device and partitions got populated to the program. Backup-ed rootfs and then I extracted the files. Here the ADC_IN1 point to short to GND (GND can be found easily in the board at the public FriendlyCore published photos). I identified the correct side in the R35 for ADC_IN1 by measuring the voltage: around 1.72V, while the other side's reading was exactly 1.8V (what is was suppossed to have the VCCA1V8_S3) BTW, if anyone want to solder that... beware, It is very very small and needs special tools/hands. It took to me 30 minutes just the preparation, before even applying any heat to the union of the wire/resistor ending. anyway... with a needle connected to a wire (which is connected to GND in the other side) would be easier. Touching ADC_IN1 with the end of the needle while powering up seems to be not so difficult (a magnifier lens will help also) I also connected the Header pins 1 (EMMC_D0) for boot and pin 12 (EMMC_CLKO) for maskrom. Maskrom didn't work so well as told yesterday. And since recovery worked, Boot I haven't even tried. if anyone interested in feedback about this point/switch, then just ask! Happy ending! From now my NanoPC M4 will stay in the bright side of life: Armbian Thanks everyone, specially pfry who is the one bringing the recovery (ADC_IN1) info and chwe for clear and straight forward mind :-)
  5. SriLK

    NanoPI M4

    Yesterday I connected two wires, one to GND and another to eMMC header base's pin EMMC_CLKO. After that, shorting them as I connect USB-C and releasing in couple of seconds showed the device in the rkflashkit, but curiously eMMC partitions didn't get populated to the rkflashkit. I tried several shorting times at boot with no difference... So, what you say in the edit might be true. Tested that eMMc and yes, it works with Armbian fresh installation, and it looked good, so no damage done. Anyway, I will try now shorting EMMC_D0 to GND. Found the R35 at board (at top layer -> top-right from WIFI-BT chip). Only thing now is to find out which side is connected to ADC_IN1 and which one to VCCA1V8_S3. I see that there are many capacitors connected to VCCA1V8_S3... but looking directly to the PCB I find none. I wonder if I can find a good CAD file for the actual PCB with symbols for the NanoPi M4. I tried this one: http://wiki.friendlyarm.com/wiki/images/e/e4/NanoPi-M4-1807_Drawing(dxf).zip but it looks not very detailed to me (maybe my CAD software is not good enough for opening this format version??), It doesn't seem to contain much more info than the one at http://wiki.friendlyarm.com/wiki/images/4/41/NanoPi_M4_1807_Drawing.png . Does anybody knows if/where I can find the full CAD file for PCB with the symbols for the NanoPi M4? Well, I'll keep informed and post some photos if I achieve any goal here... I mean, maybe the photos with the actual solding of the switches (Boot, Recovery, maskrom). Maskrom switch I have already, in place but... worthless, as said at the start. Thanks for help BTW, when I was buying this M4 I was deciding if to buy M4 or T4... price was mostly the same for the configuration chosen. I decided to go for M4 because of the detachable eMMC and the writer/reader interface to USB. This make things much easier and in theory you would not need recovery, boot or maskrom ever. But... friendly arm had this "surprise" waiting for me: I could not mount easily the partitions contained in my eMMC. My mistake and lesson learned: Armbian does not do those NASTY things and does things as should be done: partitions at eMMC are standard and fdisk -l , so they mount ok and image reports also correct information and can be mounted on loop mode in any system. So, happy that I bought M4... still, I need my old files from Friendly core ubuntu installation :-)
  6. SriLK

    NanoPI M4

    Thank you for your comment, chwe. You know how to motivate :-) I just installed latest stable Armbian (debian stretch) to my M4 and work very nicely. Easy installation, no need sdcard since it flashes directly to emmc. And much easier everything. Emmc can be mounted exactly as it is (read or read/write) in any Linux box supporting ext4 at any time with no complications/investigations. Indeed this is the way to go. I really don't understand why friendlyarm needed to complicate things so badly with the ubuntu-core emmc partition scheme. I will continue with Armbian for now on. Still, I have important files at my previous installation since it was a home server which I would like to migrate. And so, I'm still very interested in solution for this post: Mostly about entering MASKROM mode or RECOVERY mode, short-ing the correct points. My plan now is to extract old friendlyarm ubuntu core rootfs partition with rkflashkit, mount it, get the important/needed files and feed them to the M4 running Armbian Debian Stretch. Can anyone with this? :-)
  7. SriLK

    NanoPI M4

    I get your point. So, I can not mount the emmc image from backup because of the partition scheme. With armbian I could mount the partitions without any issue directly from the emmc image backup if I understand you correctly. That's good to know! Indeed this weird friendlyarm partition scheme is pain in the ass. (Solutions still welcome, tho) Anyway: MASKROM question is what I am much more interested :-)
  8. SriLK

    NanoPI M4

    Exactly with that converter (connecting the emmc to my PC) I have taken the backup with dd at my linux box... But, as said in the previous posts, the problem is that I can not mount the image produced while backing the emmc. Also, this is not about friendlyarm crafted images, but about MASKROM mode on the M4 and/or extract partitions from emmc image backups generated by final users (friendlyarm image is just anecdotical fact). Explanation/solutions will work for all users whatever OS. Thanks!
  9. SriLK

    NanoPI M4

    Btw, here http://wiki.friendlyarm.com/wiki/images/7/7a/NanoPi-M4-4GB-1807-Schematic.pdf I could see the MASKROM points... I guess the one to short is the one at page 7 of 25 under the symbol: EMMC_CLKO, right on R194 33R or R0201. Before in this thread it has been hinted that it would be eMMC_RST (with point at C349) shown at page 25 of 25, but it looks more likely to me (after reading about the MASKROM mode) that EMMC_CLKO is the one to put to GND while boot (shorting for 3 or 4 seconds just after connecting the USB-C) No matter which ones are the correct ones, my question is: where they would be in the board? :-)
  10. SriLK

    NanoPI M4

    Hello I am a new user here! weeee :-) I have some questions, 1st one: Have anybody discover what are the points to short in order to enter MASKROM mode? I have enter it booting the M4 without sdcard or emmc, just to test that I can connect to the M4 via rkflashkit through the USB-C bus... and it does. So, I would need to to the same but with the emmc connected to the M4 and short the EMMC_CLK to GND (I guess). Have anybody discovered these points in the M4 PCB and willing to show them at hi-res image? :-) This would help a lot, since I could backup directly the rootfs partitions with rkflashkit, mount it in my linux box, modify it and flash it back to the emmc again with rkflashkit. Very straight forward! But, If these MASKROM points are too complicated for trying even with 2 needles (connected with wire) then I will explain further my problem. Since maybe there is another solution to my problem. Some time ago I have flashed to the M4 the image rk3399-eflasher-friendlydesktop-bionic-4.4-arm64-20181219 to my emmc (16GB) and well... M4 is still with Ubuntu Core OS I have 1 external HD connected to the nanopi M4 and added to /etc/fstab (by UUID) for automount on boot (sadly I didn't add the param nofail). HD now died. Boot process gets stuck. No matter how much I wait, I get permanent blank screen, no sshd, nor any other way to interact with the OS (tried pushing every key in the keyboard with any change). Ok, 1st thing I backed emmc to an image (dd) Then I started to try to access the rootfs partition, in order to modify the /etc/fstab ... without success! The emmc should have this structure: FIRMWARE_VER: 6.0.1 MACHINE_MODEL: RK3399 MACHINE_ID: 007 MANUFACTURER: RK3399 MAGIC: 0x5041524B ATAG: 0x00200800 MACHINE: 3399 CHECK_MASK: 0x80 PWR_HLD: 0,0,A,0,1 #KERNEL_IMG: 0x00280000 #FDT_NAME: rk-kernel.dtb #RECOVER_KEY: 1,1,0,20,0 #in section; per section 512(0x200) bytes CMDLINE: root=/dev/mmcblk1p7 rw rootfstype=ext4 mtdparts=rk29xxnand: 0x00002000@0x00002000(uboot), 0x00002000@0x00004000(trust), 0x00002000@0x00006000(misc), 0x00006000@0x00008000(resource), 0x00010000@0x0000e000(kernel), 0x00010000@0x0001e000(boot), -@0x00030000(rootfs) consoleblank=0 So, I tried mounting from backup image: mount -t ext4 m4-image /media/img/ -o loop,offset=100663296 (offset for rootfs should be 0x30000 * 512) and fails with "wrong fs type" then I list the image's structure with: fdisk -l m4-image Device Boot Start End Sectors Size Id Type m4-image1 3342336 15234373 11892038 5.7G 83 Linux m4-image2 196608 3342335 3145728 1.5G 83 Linux So... I try m4-image1 partition instead: mount -t ext4 m4-image /media/img/ -o loop,offset=1811939328 (offset for rootfs should be 3342336 * 512 + 0x30000 * 512, in case rootfs is inside m4-image1 partition?) same error as before, "wrong fs type" This make me think that I would need some kind of tool for extracting the data from m4-image. Here is my 2nd question: Does that tool exists, can I download from somewhere? ..or the reason for these mount failures is that I am calculating wrongly the offsets? if so, what the correct offset for rootfs in m4-image is? I have also tried entering the M4 with the original rk3399-eflasher-friendlydesktop-bionic-4.4-arm64-20181219 image flashed the sdcard (and booting from sdcard. so, emmc as storage). I connect to sshd (user:root/pass:fa) I can access the device. But, what I see there is: root@NanoPi-M4:/dev# ls -al | grep mmc brw-rw---- 1 root disk 179, 128 Apr 14 08:54 mmcblk0 brw-rw---- 1 root disk 179, 129 Apr 14 08:54 mmcblk0p1 <--- mounted at /mnt/sdcard brw-rw---- 1 root disk 179, 130 Apr 14 08:54 mmcblk0p2 <--- mounted at / brw-rw---- 1 root disk 179, 0 Apr 14 08:54 mmcblk1 brw-rw---- 1 root disk 179, 32 Apr 14 08:54 mmcblk1boot0 brw-rw---- 1 root disk 179, 64 Apr 14 08:54 mmcblk1boot1 brw-rw---- 1 root disk 179, 1 Apr 14 08:54 mmcblk1p1 <--- this seems to be same as m4-image1 backed up with dd brw-rw---- 1 root disk 179, 2 Apr 14 08:54 mmcblk1p2 <--- this seems to be same as m4-image2 backed up with dd brw-rw---- 1 root disk 179, 96 Apr 14 08:54 mmcblk1rpmb I can not see the other mmcblk devices, So, I am missing the devices that actually I would know how to mount. These are the devices when Ubuntu Core OS (flashed with image rk3399-eflasher-friendlydesktop-bionic-4.4-arm64-20181219) is booted: root@NanoPi-M4:/dev# ls -al | grep mmc brw-rw---- 1 root disk 179, 0 Jan 28 2018 mmcblk1 brw-rw---- 1 root disk 179, 32 Jan 28 2018 mmcblk1boot0 brw-rw---- 1 root disk 179, 64 Jan 28 2018 mmcblk1boot1 brw-rw---- 1 root disk 179, 1 Jan 28 2018 mmcblk1p1 <--- uboot (Not the same as when booted with eflasher sdcard image) brw-rw---- 1 root disk 179, 2 Jan 28 2018 mmcblk1p2 <--- trust (Not the same as when booted with eflasher sdcard image) brw-rw---- 1 root disk 179, 3 Jan 28 2018 mmcblk1p3 <--- misc brw-rw---- 1 root disk 179, 4 Jan 28 2018 mmcblk1p4 <--- resource brw-rw---- 1 root disk 179, 5 Jan 28 2018 mmcblk1p5 <--- kernel brw-rw---- 1 root disk 179, 6 Jan 28 2018 mmcblk1p6 <--- boot brw-rw---- 1 root disk 179, 7 Jan 28 2018 mmcblk1p7 <--- rootfs *** This one I'd like to mount brw-rw---- 1 root disk 179, 96 Jan 28 2018 mmcblk1rpmb So, my 3rd question, Is there a way to populate mmcblk1p7 from eflasher so I can mount it, so I can modify the /etc/fstab? Any reply to any of the 3 questions would help greatly. For more explanations the 3 questions could be be answered, that would be awesome. I am very interested in the info about the MASKROM mode points :-) Thanks!
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines