Multi Boot

Post Reply
maxycatz
Posts: 20
Joined: Mon Jun 22, 2020 11:04 pm
languages_spoken: english
ODROIDs: C4
Has thanked: 0
Been thanked: 1 time
Contact:

Multi Boot

Post by maxycatz »

Running myself in circles with this....

How do I set up multiboot or access a boot menu on the C4 to switch between SD and eMMC (eg Android and Ubuntu)?

User avatar
tobetter
Posts: 7119
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 380 times
Been thanked: 1044 times
Contact:

Re: Multi Boot

Post by tobetter »

maxycatz wrote:
Sun Jun 28, 2020 2:41 am
Running myself in circles with this....

How do I set up multiboot or access a boot menu on the C4 to switch between SD and eMMC (eg Android and Ubuntu)?
Not like N2, ODROID-C4 does not have SPI flash memory and the Petitboot is not supporting by default. So we cannot switch between SD and eMMC as of now.

maxycatz
Posts: 20
Joined: Mon Jun 22, 2020 11:04 pm
languages_spoken: english
ODROIDs: C4
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Multi Boot

Post by maxycatz »

Yep, kinda got to that impression.

Seem to being thwarted quite a bit with the C4 at the mo'; the risk of being an early adopter I guess.

User avatar
odroid
Site Admin
Posts: 36385
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1431 times
Been thanked: 980 times
Contact:

Re: Multi Boot

Post by odroid »

We have no plan to add a SPI flash memory to the C4 board due to the limited board space.

joy
Posts: 1492
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X
Has thanked: 166 times
Been thanked: 190 times
Contact:

Re: Multi Boot

Post by joy »

This can be an alternate way to run petitboot without SPI Flash for multiboot and I used to use this layout before for development of petitboot spibios without spi flash.
petitboot.jpg
petitboot.jpg (112.62 KiB) Viewed 519 times
Actually, it's a same way as the petitboot flow with SPI Flash,
(1) Booting from SPI flash (2) Run Petitboot (3) Scan available storage candidates (4) Select a storage as 2nd boot media,
except (1) Booting from another storage (like SD card or eMMC).

Example)
- Storage-A : SD card - has Boot loaders to boot C4 / Kernel, dtb, ramdisk for Petitboot / Another Kernel, dtb, uInitrd and rootfs for Image OS-A
- Storage-B : eMMC card - NO BLs to boot C4 / Kernel, dtb, uInitrd and rootfs for Image OS-B
- Storage-C : USB stick - N/A as a boot media / Kernel, dtb, uInitrd and rootfs for Image OS-C

Step1] Booting from Storage-A, SD Card
Step2] U-Boot - Load and Jump to kernel, dtb from vfat of SD Card
Step3] Kernel - Kernel Booting from kernel of SD card (The kernel is configured to run petitboot functions.)
Step4] Init - Start init service from ramdisk in SD Card (The ramdisk from SD Card includes essential packages, libs and services for petitboot.)
Step5] Petitboot - (1) Now start basic services (2) Scan available storage candidates using pb-discover (3) Start petitboot-nc (4) Display candidates
Step6] Petitboot - (5) Select 2nd boot media (6) Configure 2nd Kernel/dtb/uInitrd path and set kernel command based on 'kexec' (7) Jump to 2nd kernel and proceed a new kernel booting
Step7] Kernel of 2nd boot media
Step8] Configure rootfs from 2nd boot media based on new kernel command

From [Step1] to [Step6], resources are loaded from SD Card instead of SPI Flash.
And it's needed to modify u-boot.
Last edited by joy on Tue Jun 30, 2020 6:21 pm, edited 1 time in total.
These users thanked the author joy for the post (total 2):
tobetter (Tue Jun 30, 2020 11:21 am) • kyoumaH (Tue Jun 30, 2020 3:58 pm)

kyoumaH
Posts: 15
Joined: Thu Jun 04, 2020 1:01 pm
languages_spoken: English
ODROIDs: ODROID C4
Has thanked: 6 times
Been thanked: 3 times
Contact:

Re: Multi Boot

Post by kyoumaH »

How would one go about loading petitboot and multibooting that way?

maxycatz
Posts: 20
Joined: Mon Jun 22, 2020 11:04 pm
languages_spoken: english
ODROIDs: C4
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Multi Boot

Post by maxycatz »

kyoumaH,

Is that kinda like a GRUB bootloader setup?

Very mucch a newbie at SBCs

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 1 guest