Multi Boot

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

Multi Boot

Post by maxycatz » 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)?

User avatar
tobetter
Posts: 5206
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea
Has thanked: 175 times
Been thanked: 543 times
Contact:

Re: Multi Boot

Post by tobetter » Mon Jun 29, 2020 6:49 pm

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: 5
Joined: Mon Jun 22, 2020 11:04 pm
languages_spoken: english
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Re: Multi Boot

Post by maxycatz » Mon Jun 29, 2020 8:23 pm

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: 34579
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
ODROIDs: ODROID
Has thanked: 811 times
Been thanked: 703 times
Contact:

Re: Multi Boot

Post by odroid » Tue Jun 30, 2020 9:03 am

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

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

Re: Multi Boot

Post by joy » Tue Jun 30, 2020 10:46 am

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 112 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: 6
Joined: Thu Jun 04, 2020 1:01 pm
languages_spoken: English
ODROIDs: ODROID C4
Has thanked: 2 times
Been thanked: 1 time
Contact:

Re: Multi Boot

Post by kyoumaH » Tue Jun 30, 2020 4:01 pm

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

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

Re: Multi Boot

Post by maxycatz » Tue Jun 30, 2020 5:58 pm

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