Jump to content

Recommended Posts

Posted

Hi (and happy new year everyone!),

 

I recently put a SSD in my Cubietruck and installed the Cubietruck Vanilla Image (with Kernel 4.x) on it.

This is working fine, but what bugs me is the fact that I still need to have a microSD-card installed.

 

As far as I understood, the bootloader cannot directly boot to SATA (missing drivers). How does the bare Image on the microSD-card achieve this?

And even more important: How can I move the 'important' part (which does the bootloading and SATA drivers) to NAND so I can boot without a microSD-card installed?

 

Thanks in advance!

Posted

Here is what I have so far:

- a working system with Kernel 3.4 on NAND

- a working system with Kernel 4.x on SATA (SSD)

 

I can boot into the NAND system without an sdcard and it does see the SSD.

But how do I tell the NAND system to run the system on the SSD? (InitRamDisk?)

Posted

Kernel 4.x does not support NAND ... but in theory it could be possible to load recent u-boot even it does not have NAND support. Recent uboot support booting directly from SATA. It might work but since I haven't try this, I can't tell you how.

Posted

Kernel 4.x does not support NAND

I know, I don't need to be able to read/write from NAND on the the second system (SSD) once it is booted.

 

I thought this is possible because the documentation says under "How to install to NAND, SATA & USB?":

You can create up to three scenarios:

  • boot from SD, system on SATA / USB
  • boot from NAND, system on NAND
  • boot from NAND, system on SATA / USB

[1] http://www.armbian.com/documentation/

 

EDIT:

Maybe to clarify my question:

What does the (Vanilla) SD-Card image [2] do to boot from SATA and how can I duplicate this behaviour on NAND?

 

[2] http://mirror.igorpecovnik.com/Armbian_4.5_Cubietruck_Debian_jessie_4.2.3.zip

Posted

"up to" :)

 

The problem is u-boot which is required to properly load mainline kernel. When you achieve that it loads from NAND, than you can do whatever.

Posted

Could I just rip the first few MBs (or however much) from the SD-Card Image and write that to NAND? (Massive over-simplification)

Posted

Not sure. Also possible that you just put a properly prepared u-boot.img to the first FAT partition on the NAND ... I haven't research this topic much :(

Posted

What I tried now was exchanging "nand_root=/dev/nand2" with "nand_root=/dev/sda1" in the /boot/uEnv.txt on /dev/nand1.

It did definitely work (identified by hostname), however it complains about missing kernel modules (e.g. not being able to type any input, but ethernet was working).

 

Could you tell me what happens on the SD-card when I run sata-install (Vanilla kernel)? Because afterwards the SD-card obviously only boots to SATA (if present), whereas before it launches its own OS.

Posted

Could you tell me what happens on the SD-card when I run sata-install 

 

https://github.com/igorpecovnik/lib/blob/master/scripts/nand-sata-install/usr/lib/nand-sata-install/nand-sata-install.sh

Check the script. What you are trying to accomplish is more complex than understanding this. I can answer to any "why" from the script but I can't tell you how to boot vanilla kernel with help from NAND. If I had that answer it would already be in the script.

Posted

https://github.com/igorpecovnik/lib/blob/master/scripts/nand-sata-install/usr/lib/nand-sata-install/nand-sata-install.sh

Check the script. What you are trying to accomplish is more complex than understanding this. I can answer to any "why" from the script but I can't tell you how to boot vanilla kernel with help from NAND. If I had that answer it would already be in the script.

I have seen that script online, but it is not the same as on the most recent version of the Cubietruck Vanilla image.

https://paste.teknik.io/2664

 

But I managed to find what I was looking for:

# if we have boot script
if [ -f /boot/boot.cmd ]; then
    sed -e 's,root=\/dev\/mmcblk0p.,root=/dev/'"$DESTPART"',g' -i /boot/boot.cmd
    mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
fi

Which basically translates to "in /boot/boot.cmd set root=/dev/sda" (and then update the image)

 

If I understand correctly, the hardware could (theoretically) read a bootloader from NAND, right?

Couldn't I then just copy the SD-card image onto NAND?

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

Important Information

Terms of Use - Privacy Policy - Guidelines