How Dual Boot Works on Firefly RK3288

Can any one explain the way Dual Boot works on Firefly RK3288?
I assume the existing ‘Linux app’ or ‘Android app’ replaces the boot and kernel images to switch between Android and Linux OSs.
If this is the case, is there any source code for Android or Linux switching app to see how they swap the images to boot to other OS?

I compiled UBoot to be able to get into the U-Boot prompt.
It only works if I load Android and for Linux this option will be disabled as apparently the U-Boot image replaced at the time. So where is the U-Boot source or GIT for Linux?!

Where can I find the source of “bootrk” script used in ‘bootcmd’ command in UBoot to see what is does?!
Any help will be appreciated!

Thanks

The Android SDK has the u-boot direcotory which contains the full source code of U-Boot.

Some dual boot resource:

  1. Dual boot on Firefly-RK3288
    http://bbs.t-firefly.com/forum.php?mod=viewthread&tid=263&highlight=dual
  2. Boot from SD card - dual boot either Android or Linux
    http://bbs.t-firefly.com/forum.php?mod=viewthread&tid=41&highlight=dual

Thanks busybee,
It well explained so I understand the process now.

Just a quick question.
As ‘linuxroot’ is the Linux RootFS file system , the content of recovery partition is Linux Kernel (with or without initram), is that right?
So where we point to “parameter” partition appears as “/dev/blobk/mmcblk0p1” when we boot to Linux???
Is it hard-coded to device or the kernel does that?
Where we set this, if the kernel does?
Can you please explain?

Many thanks…

The content of recovery partition is Linux Kernel with initramfs.

The parameter partition (flashed with parameter image, a wrapper for parameter file) contains the partition info,
which is loaded by U-Boot and passed to kernel as command line parameter.

You can see the kernel command line parameter by:
$ cat /proc/cmdline

then the partition info within the command line is parsed and hence paritions are created.

Therefore, if you need to change the parition, just modify parameter file and flash it back to the storage.

busybee Posted at 7/27/2015 09:45
The content of recovery partition is Linux Kernel with initramfs.

The parameter partition (flashe …

Fantastic mate,
You are the Guru and helped me a lot.
Now I am getting to know my Firefly device better and better…

Thanks again.

Reading this article has given me new plans for my career development. I’m offering the Latest SPHR exam online test for free today, as it helped me earn a promotion and raise!

I really appreciate your article, it had a profound effect on me. Free Authorized AP-217 exam dumps resources are here—good luck to all!

That article was nothing short of a masterpiece in terms of knowledge. The Valid test NS0-528 questions and answers test papers are now available for free. Wishing you all the best!

This article is phenomenal, I’m grateful for your sharing. About to face the Valid Workday-Pro-Talent-and-Performance exam tips exam – hoping for good results!