Multi boot and USB booting with ODROID-C4

Post Reply
User avatar
tobetter
Posts: 6130
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 285 times
Been thanked: 795 times
Contact:

Multi boot and USB booting with ODROID-C4

Post by tobetter »

Testing the mock-up copy and seeing some bugs for a certain OS still...but basically it works like ODROID-N2.

How it works?
Unlike ODROID-N2, ODROID-C4 does not have SPI flash memory and there is no method to boot without an eMMC or SD card that has been flashed with a certain OS image includes the bootloader and OS platform. So the idea of supporting the Petitboot on ODROID-C4 is to copy the Petitboot image file ODROIDBIOS.BIN to the first partition along with the installed OS image and letting new version of U-boot loads the Petitboot image file on power cycle. The installation steps would be a bit confusing for some users who may be not familiar with the boot priority.

How can I install the Petitboot image?
The Petitboot image ODROIDBIOS.BIN must be copied to:
[1] eMMC when it's attached along with SD card or not.
[2] SD card only when it's attached without eMMC.

Can I boot from USB storage without an eMMC or SD card?
No, since ODROID-C4 is not possible to boot without a bootloader from an eMMC or SD card since it does not have on-board booting device. In order to boot from USB storage through the Petitboot, you will need a small SD card that is bootable from ODROID-C4.

Known issues:
  • The first version 20200717 would be unstable.
  • Certain OS version in the SD card won't appear in the menu list after rebooting, please let me know if you have the same issue.
  • After OS update and it overwrite U-boot, multiboot support would not supported since the change for multiboot I made is not merged to official U-boot yet. In case this happens, U-boot must be flashed back if my change is not merged to official U-boot.

    Screenshot from 2020-07-17 00-40-37.png
    Screenshot from 2020-07-17 00-40-37.png (257.35 KiB) Viewed 3342 times
These users thanked the author tobetter for the post (total 5):
istanbulls (Fri Jul 17, 2020 1:57 am) • odroid (Fri Jul 17, 2020 9:15 am) • superpowter77 (Sat Jul 18, 2020 7:07 am) • emk2203 (Wed Jul 22, 2020 7:27 pm) • Cobble123 (Thu Jul 23, 2020 1:50 am)

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

Re: Can ODROID-C4 select OS and boot from USB storage like ODROID-N2?

Post by tobetter »

Part #1 - CoreELEC on SD card

The reason why I explain the instruction to have multiboot support for CoreELEC first is I've studied from the ODROID-N2 that many users who want multiboot use CoreELEC on SD card and Android on eMMC. Because of the boot priority between eMMC and SD card, this video will install the multiboot firmware to SD card along with CoreELEC on SD card and next video will introduce you to how the firmware can be installed to eMMC when Android installed on it. You can install the firmware in the CoreELEC itself as instructed or from Linux box.

1. Access to the shell of CoreELEC using SSH if you do not have USB-to-Serial cable.
2. Download the multiboot package from http://ppa.linuxfactory.or.kr/images/pe ... /odroidc4/
3. Extract the package and install U-boot with 'dd' command, dd if=u-boot.bin of=/dev/mmcblk1 bs=512 seek=1 conv=fsync. Please be aware of giving correct command otherwise installed CoreELEC will be disappeared.
4. Copy ODROIDBIOS.BIN to the directory '/flash' which is the first partition of the memory card.
5. Done.

These users thanked the author tobetter for the post:
emk2203 (Wed Jul 22, 2020 7:26 pm)

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

Re: Can ODROID-C4 select OS and boot from USB storage like ODROID-N2?

Post by tobetter »

Part #2 - Android on eMMC

This video will introduce how multiboot firmware can be installed with Android on eMMC. Basically your Android must be rooted to install the firmware as it's instructed in the video, or if you dislike to rooting your ODROID-C4, you can flash U-boot from Linux box using 'dd' command, not Etcher.

1. Rooting the Android on ODROID-C4.
2. Download the multiboot firmware package from http://ppa.linuxfactory.or.kr/images/pe ... /odroidc4/.
3. Extract the package and flash 'u-boot.bin' to bootloader partition using 'dd if=u-boot.bin of=/dev/block/bootloader'.
4. Copy ODROIDBIOS.BIN to '/odm' directory which is the first partition of eMMC.
5. Done.

These users thanked the author tobetter for the post:
emk2203 (Wed Jul 22, 2020 7:26 pm)

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

Re: Can ODROID-C4 select OS and boot from USB storage like ODROID-N2?

Post by tobetter »

Part #3 - For Linux users

Installing the multibooting firmware to the Linux box would be simple, that's why there is no video. :)

1. Download the firmware package from http://ppa.linuxfactory.or.kr/images/pe ... /odroidc4/
2. Extract it, then you will have these files.

Code: Select all

$ tar xzvf ODROIDBIOS-20200717.tar.gz 
ODROIDBIOS-20200717/
ODROIDBIOS-20200717/ODROIDBIOS.BIN
ODROIDBIOS-20200717/mmcboot.img
ODROIDBIOS-20200717/sd_fusing.sh
ODROIDBIOS-20200717/u-boot.bin
3. In the directory, here 'ODROIDBIOS-20200717', run the script 'sd_fusing.sh' with the device node of your memory card as an argument.
If you have eMMC (does not matter if you have SD or not)

Code: Select all

$ sudo ./sd_fusing.sh /dev/mmcblk0
If you have SD card only (no eMMC)

Code: Select all

$ sudo ./sd_fusing.sh /dev/mmcblk1
4. Copy ODROIDBIOS.BIN to the first partition of eMMC or SD card, the memory card must be mounted.

Code: Select all

$ sudo cp ODROIDBIOS.BIN <directory/mounted/with/memory/card>
For example, if you are running HK stock Ubuntu image, you must copy ODROIDBIOS.BIN to /media/boot. If you are running Ubuntu 20.04 unofficial image from me or Armbian, copy ODROIDBIOS.BIN to /boot.
These users thanked the author tobetter for the post:
emk2203 (Wed Jul 22, 2020 7:26 pm)

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

Re: Can ODROID-C4 select OS and boot from USB storage like ODROID-N2?

Post by tobetter »

Part #4 - If you like to boot from USB storage

ODROID-C4 does not have on-board booting media, so you must have SD card or eMMC. And you will need a small SD card (50MB+) at least and it should be able to boot from ODROID-C4. If you are allowed to boot from SD card for USB booting, download the firmware package from 'http://ppa.linuxfactory.or.kr/images/pe ... /odroidc4/' and extract it. Flash the file mmcboot.img to the SD card using the Linux command dd or Etcher. This image will boot from the SD card on ODROID-C4 and multiboot menu comes with the OS in the USB storage discovered. Please note that USB storage OS will come a bit slower than eMMC or SD card, it takes longer if the capacity of the storage is large or HDD other than SSD.
These users thanked the author tobetter for the post:
emk2203 (Wed Jul 22, 2020 7:26 pm)

mad_ady
Posts: 8604
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 579 times
Been thanked: 491 times
Contact:

Re: Can ODROID-C4 select OS and boot from USB storage like ODROID-N2?

Post by mad_ady »

I'm going to say Yes!
Congratulations on your hard work!

User avatar
istanbulls
Posts: 306
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID-N2, ODROID C4
Location: Istanbul-Turkey
Has thanked: 196 times
Been thanked: 42 times
Contact:

Re: Can ODROID-C4 select OS and boot from USB storage like ODROID-N2?

Post by istanbulls »

Thanks @tobetter,
I use this on my C4, it works great with Android, Ubuntu 20.04, Ubuntu-Mate and CoreElec.
You are our champion.

superpowter77
Posts: 281
Joined: Mon Sep 09, 2019 9:14 pm
languages_spoken: english,french,spanish
ODROIDs: N2(x2),N2+,C4,HC4
Has thanked: 66 times
Been thanked: 22 times
Contact:

Re: Can ODROID-C4 select OS and boot from USB storage like ODROID-N2?

Post by superpowter77 »

@tobetter, sounds awesome. I was really looking forward to have this feature for my new C4, specially after having son many external USB 3 SSD's lying around instead of having to buy eMMC cards. Please let us know when it's ready for prime time. Hopefully, soon enough!

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

Re: Multi boot and USB booting with ODROID-C4

Post by tobetter »

FYI, I've uploaded the firmware for multiboot and updated the instructions to install the firmware.
These users thanked the author tobetter for the post (total 2):
superpowter77 (Tue Jul 21, 2020 4:59 am) • istanbulls (Thu Jul 23, 2020 12:49 am)

mad_ady
Posts: 8604
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 579 times
Been thanked: 491 times
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by mad_ady »

I know from previous discussions that petitboot for c4 is a personal project of yours and not officially supported by Hardkernel, but I feel there should be a wiki page for in under c4 so that potential buyers know about this feature.

Also, now that you have "limitless" storage for petitboot, what do you think is missing on the n2 because of limited spi space?

Are you building petitboot/userspace from the same tree as n2? So fixes for n2 are available for c4 without extra work?

superpowter77
Posts: 281
Joined: Mon Sep 09, 2019 9:14 pm
languages_spoken: english,french,spanish
ODROIDs: N2(x2),N2+,C4,HC4
Has thanked: 66 times
Been thanked: 22 times
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by superpowter77 »

tobetter wrote:
Tue Jul 21, 2020 1:55 am
FYI, I've uploaded the firmware for multiboot and updated the instructions to install the firmware.
WOW!. Congrats on your hard work. I really appreciate it.

mad_ady
Posts: 8604
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 579 times
Been thanked: 491 times
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by mad_ady »

Ok, installed the 20200717 version to emmc (only linux) and I still report the same issue I reported via PM with my DVI monitor - the petitboot screen is black (without signal) while using a HDMI to DVI adapter. I'm using petitboot.cfg in the root of the first partition with this contents:

Code: Select all

[u-boot]
display_autodetect=false
hdmimode=1440x900p60hz
voutmode=dvi
Here is the xrandr output for the display while connected to my laptop via VGA:

Code: Select all

VGA1 connected 1024x768+1600+0 (normal left inverted right x axis y axis) 400mm x 250mm
   1440x900      59.89 +
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x800      59.81  
   1152x864      75.00  
   1024x768      75.03    60.00* 
   832x624       74.55  
   800x600       75.00    60.32  
   640x480       75.00    59.94  
   720x400       70.08  
I also tried 1280x960 in case it was a problem that the top resolution is not quite 60Hz (though it works ok once booted). I know that petitboot works with DVI on N2 - that's why I was asking earlier how much code they share in common.

Anyway, no biggie - just reported it for reference in case others try it as well.

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

Re: Multi boot and USB booting with ODROID-C4

Post by tobetter »

mad_ady wrote:
Tue Jul 21, 2020 6:13 pm
Ok, installed the 20200717 version to emmc (only linux) and I still report the same issue I reported via PM with my DVI monitor - the petitboot screen is black (without signal) while using a HDMI to DVI adapter. I'm using petitboot.cfg in the root of the first partition with this contents:

Code: Select all

[u-boot]
display_autodetect=false
hdmimode=1440x900p60hz
voutmode=dvi
Here is the xrandr output for the display while connected to my laptop via VGA:

Code: Select all

VGA1 connected 1024x768+1600+0 (normal left inverted right x axis y axis) 400mm x 250mm
   1440x900      59.89 +
   1280x1024     75.02    60.02  
   1280x960      60.00  
   1280x800      59.81  
   1152x864      75.00  
   1024x768      75.03    60.00* 
   832x624       74.55  
   800x600       75.00    60.32  
   640x480       75.00    59.94  
   720x400       70.08  
I also tried 1280x960 in case it was a problem that the top resolution is not quite 60Hz (though it works ok once booted). I know that petitboot works with DVI on N2 - that's why I was asking earlier how much code they share in common.

Anyway, no biggie - just reported it for reference in case others try it as well.
Looks like the boot script for the Petitboot is not fixed on my build, the display issues has been reported by @istanbull with ODROID-N2. So I am sure N2 and C4 are sharing the source tree...Can you share the output of 'cat /proc/cmdline' in the Petitboot shell? You have must 'hdmimode=1080p60hz' whatever you change the value in the 'petitboot.cfg'.

mad_ady
Posts: 8604
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 579 times
Been thanked: 491 times
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by mad_ady »

It seems to get passed correctly, but not displayed:

Code: Select all

root=/dev/ram0 init=/init console=tty0 console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xff803000 ramoops.pstore_en1=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 console=tty0 logo=osd0,loaded,0x3d800000 vout=1080p60hz,enable hdmimode=1080p60hz osd_reverse=0 video_reverse=0 bootdev=/dev/mmcblk0 quiet uboot,hdmimode=custombuilt uboot,modeline=1440,900,106500,55934,60,1440,1520,1672,1904,900,903,909,934,0,1,1 uboot,customwidth=1440 uboot,customheight=900
Or better yet - the parameters are passed to uboot, but not the kernel?

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

Re: Multi boot and USB booting with ODROID-C4

Post by tobetter »

mad_ady wrote:
Tue Jul 21, 2020 7:45 pm
It seems to get passed correctly, but not displayed:

Code: Select all

root=/dev/ram0 init=/init console=tty0 console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xff803000 ramoops.pstore_en1=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 console=tty0 logo=osd0,loaded,0x3d800000 vout=1080p60hz,enable hdmimode=1080p60hz osd_reverse=0 video_reverse=0 bootdev=/dev/mmcblk0 quiet uboot,hdmimode=custombuilt uboot,modeline=1440,900,106500,55934,60,1440,1520,1672,1904,900,903,909,934,0,1,1 uboot,customwidth=1440 uboot,customheight=900
Or better yet - the parameters are passed to uboot, but not the kernel?
Did you put the file petitboot.cfg to uSD or eMMC? It has to be on uSD only.

mad_ady
Posts: 8604
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 579 times
Been thanked: 491 times
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by mad_ady »

No, I only have the emmc connected. Will try with an sd tomorrow

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

Re: Multi boot and USB booting with ODROID-C4

Post by tobetter »

20200721
Updated version from 20200717 is uploaded. Please download the firmware package ODROIDBIOS-20200721.tar.gz . If you have not installed to your ODROID-C4 yet, please refer to the installation guide. If you already have installed and the Petitboot can boot up, just replace the file ODROIDBIOS.BIN from the package to your memory card, eMMC or Sd card.

What's improved:

Custom display setting for the Petitboot is fixed.
1080P is the default resolution to draw the Petitboot menus. If your display does not support 1080P or want to change the resolution, you can create a file petitboot.cfg in the uSD card. The Petitboot will read it and apply the resolution in it. For example, if you like to have low resolution and annoying the small characters with 1080P, put this to 'petitboot.cfg'. For example, your display is a monitor, you used to change the value of 'voutmode' to 'dvi' in the boot.ini:

Code: Select all

[u-boot]
hdmimode=480p60hz
voutmode=dvi
Thanks...
These users thanked the author tobetter for the post (total 3):
odroid (Wed Jul 22, 2020 9:34 am) • emk2203 (Wed Jul 22, 2020 7:28 pm) • istanbulls (Thu Jul 23, 2020 12:54 am)

Cobble123
Posts: 11
Joined: Tue Jul 14, 2020 1:47 am
languages_spoken: english
Has thanked: 5 times
Been thanked: 3 times
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by Cobble123 »

Thanks for this. I’ve just used it to wipe an eMMC and install Armbian from a system running from an SD card.

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

Re: Multi boot and USB booting with ODROID-C4

Post by tobetter »

Cobble123 wrote:
Thu Jul 23, 2020 1:49 am
Thanks for this. I’ve just used it to wipe an eMMC and install Armbian from a system running from an SD card.
Good to know it helps.

Cobble123
Posts: 11
Joined: Tue Jul 14, 2020 1:47 am
languages_spoken: english
Has thanked: 5 times
Been thanked: 3 times
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by Cobble123 »

tobetter wrote:
Thu Jul 23, 2020 1:56 am
Cobble123 wrote:
Thu Jul 23, 2020 1:49 am
Thanks for this. I’ve just used it to wipe an eMMC and install Armbian from a system running from an SD card.
Good to know it helps.
I wasn’t able to get it to boot Armbian from the SD card with the eMMC attached, so I had to install the official Ubuntu Mate to the SD card. Once I’d done that I was able to bypass the eMMC and boot into Mate, from which I wiped the eMMC and flashed my Armbian image.

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

Re: Multi boot and USB booting with ODROID-C4

Post by tobetter »

Cobble123 wrote:
Thu Jul 23, 2020 2:04 am
tobetter wrote:
Thu Jul 23, 2020 1:56 am
Cobble123 wrote:
Thu Jul 23, 2020 1:49 am
Thanks for this. I’ve just used it to wipe an eMMC and install Armbian from a system running from an SD card.
Good to know it helps.
I wasn’t able to get it to boot Armbian from the SD card with the eMMC attached, so I had to install the official Ubuntu Mate to the SD card. Once I’d done that I was able to bypass the eMMC and boot into Mate, from which I wiped the eMMC and flashed my Armbian image.
So...you have Ubuntu Mate on SD card and Armbian on eMMC, also copied 'ODROIDBIOS.BIN' to eMMC along with Armbian to manage the two OS using the Petitboot. Right? This must be good use case using the Petitboot.

Cobble123
Posts: 11
Joined: Tue Jul 14, 2020 1:47 am
languages_spoken: english
Has thanked: 5 times
Been thanked: 3 times
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by Cobble123 »

tobetter wrote:
Thu Jul 23, 2020 2:36 am
Cobble123 wrote:
Thu Jul 23, 2020 2:04 am
tobetter wrote:
Thu Jul 23, 2020 1:56 am
Cobble123 wrote:
Thu Jul 23, 2020 1:49 am
Thanks for this. I’ve just used it to wipe an eMMC and install Armbian from a system running from an SD card.
Good to know it helps.
I wasn’t able to get it to boot Armbian from the SD card with the eMMC attached, so I had to install the official Ubuntu Mate to the SD card. Once I’d done that I was able to bypass the eMMC and boot into Mate, from which I wiped the eMMC and flashed my Armbian image.
So...you have Ubuntu Mate on SD card and Armbian on eMMC, also copied 'ODROIDBIOS.BIN' to eMMC along with Armbian to manage the two OS using the Petitboot. Right? This must be good use case using the Petitboot.
Kinda.

I received a 16gb eMMC today from HARDkERNEL. It of course came with the official Ubuntu Mate 20.4, but I wanted to change it to Armbian. But I do not have the eMMC to USB converter, so I was unable to connect it to my computer.

So I installed the ODROIDBIOS.BIN to Mate on the eMMC, also connected my old Armbian SD card, and used Petitboot to bypass the eMMC and boot into my old Armbian SD card. From Armbian I was able to delete Mate from the eMMC and flash a new Armbian image. I then shutdown the C4, unplugged the SD card and booted into the fresh Armbian install on the eMMC.

Basically it’s a workaround to enable us to flash a new image to an eMMC without the need for the eMMC to USB converter.
These users thanked the author Cobble123 for the post (total 2):
tobetter (Thu Jul 23, 2020 2:51 am) • odroid (Thu Jul 23, 2020 9:21 am)

mad_ady
Posts: 8604
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 579 times
Been thanked: 491 times
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by mad_ady »

Hey @tobetter. I updated to the latest petitboot release and retried by monitor. This time I put petitboot.cfg on both the emmc and sd card. Tried to set 480p60Hz and 1440x900. I still don't get anything on my dvi monitor.
Here's how the boot parameters look now (two boots):

Code: Select all

/ # cat /proc/cmdline
root=/dev/ram0 init=/init console=tty0 console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xff803000 ramoops.pstore_en1=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 console=tty0 logo=osd0,loaded,0x3d800000 vout=480p60hz,enable hdmimode=480p60hz voutmode=dvi disablehpd=true osd_reverse=0 video_reverse=0 bootdev=/dev/mmcblk0 quiet uboot,hdmimode=custombuilt uboot,modeline=1440,900,106500,55934,60,1440,1520,1672,1904,900,903,909,934,0,1,1 uboot,customwidth=1440 uboot,customheight=900
/ # cat /proc/cmdline
root=/dev/ram0 init=/init console=tty0 console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xff803000 ramoops.pstore_en1=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 console=tty0 logo=osd0,loaded,0x3d800000 vout=1440x900p60hz,enable hdmimode=1440x900p60hz voutmode=dvi disablehpd=true osd_reverse=0 video_reverse=0 bootdev=/dev/mmcblk0 quiet uboot,hdmimode=custombuilt uboot,modeline=1440,900,106500,55934,60,1440,1520,1672,1904,900,903,909,934,0,1,1 uboot,customwidth=1440 uboot,customheight=900
The monitor remains in sleep during petitboot.

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

Re: Multi boot and USB booting with ODROID-C4

Post by tobetter »

mad_ady wrote:
Fri Jul 24, 2020 4:47 pm
Hey @tobetter. I updated to the latest petitboot release and retried by monitor. This time I put petitboot.cfg on both the emmc and sd card. Tried to set 480p60Hz and 1440x900. I still don't get anything on my dvi monitor.
Here's how the boot parameters look now (two boots):

Code: Select all

/ # cat /proc/cmdline
root=/dev/ram0 init=/init console=tty0 console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xff803000 ramoops.pstore_en1=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 console=tty0 logo=osd0,loaded,0x3d800000 vout=480p60hz,enable hdmimode=480p60hz voutmode=dvi disablehpd=true osd_reverse=0 video_reverse=0 bootdev=/dev/mmcblk0 quiet uboot,hdmimode=custombuilt uboot,modeline=1440,900,106500,55934,60,1440,1520,1672,1904,900,903,909,934,0,1,1 uboot,customwidth=1440 uboot,customheight=900
/ # cat /proc/cmdline
root=/dev/ram0 init=/init console=tty0 console=ttyS0,115200 no_console_suspend earlyprintk=aml-uart,0xff803000 ramoops.pstore_en1=1 ramoops.record_size=0x8000 ramoops.console_size=0x4000 console=tty0 logo=osd0,loaded,0x3d800000 vout=1440x900p60hz,enable hdmimode=1440x900p60hz voutmode=dvi disablehpd=true osd_reverse=0 video_reverse=0 bootdev=/dev/mmcblk0 quiet uboot,hdmimode=custombuilt uboot,modeline=1440,900,106500,55934,60,1440,1520,1672,1904,900,903,909,934,0,1,1 uboot,customwidth=1440 uboot,customheight=900
The monitor remains in sleep during petitboot.
The cmdline looks ok, are you able to have a display out with Ubuntu without the Petitboot when setting the same resolution and dvi set up?

mad_ady
Posts: 8604
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 579 times
Been thanked: 491 times
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by mad_ady »

The screen works fine when booted with petitboot or without, once the main os starts.

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

Re: Multi boot and USB booting with ODROID-C4

Post by tobetter »

mad_ady wrote:
Sat Jul 25, 2020 12:06 am
The screen works fine when booted with petitboot or without, once the main os starts.
Then the Petitboot does not have a picture...strange...since I don't have 1440/DVI display device, I cannot test it. But using another resolution with DVI works for me.

kyoumaH
Posts: 14
Joined: Thu Jun 04, 2020 1:01 pm
languages_spoken: English
ODROIDs: ODROID C4
Has thanked: 5 times
Been thanked: 2 times
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by kyoumaH »

Thanks for building petitboot for the C4. I think it must be specified in the post that you can't install Android in an SSD, I tried troubleshooting it until I noticed that only the recovery partition was being flashed, and not the internal storage itself. Other than that, It works well for CoreELEC.
These users thanked the author kyoumaH for the post:
tobetter (Sun Jul 26, 2020 1:59 pm)

kronos
Posts: 17
Joined: Sat May 07, 2016 7:20 pm
languages_spoken: english
ODROIDs: C2, C4
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by kronos »

Cobble123 wrote:
Thu Jul 23, 2020 2:48 am
tobetter wrote:
Thu Jul 23, 2020 2:36 am
Cobble123 wrote:
Thu Jul 23, 2020 2:04 am
tobetter wrote:
Thu Jul 23, 2020 1:56 am
Cobble123 wrote:
Thu Jul 23, 2020 1:49 am
Thanks for this. I’ve just used it to wipe an eMMC and install Armbian from a system running from an SD card.
Good to know it helps.
I wasn’t able to get it to boot Armbian from the SD card with the eMMC attached, so I had to install the official Ubuntu Mate to the SD card. Once I’d done that I was able to bypass the eMMC and boot into Mate, from which I wiped the eMMC and flashed my Armbian image.
So...you have Ubuntu Mate on SD card and Armbian on eMMC, also copied 'ODROIDBIOS.BIN' to eMMC along with Armbian to manage the two OS using the Petitboot. Right? This must be good use case using the Petitboot.
Kinda.

I received a 16gb eMMC today from HARDkERNEL. It of course came with the official Ubuntu Mate 20.4, but I wanted to change it to Armbian. But I do not have the eMMC to USB converter, so I was unable to connect it to my computer.

So I installed the ODROIDBIOS.BIN to Mate on the eMMC, also connected my old Armbian SD card, and used Petitboot to bypass the eMMC and boot into my old Armbian SD card. From Armbian I was able to delete Mate from the eMMC and flash a new Armbian image. I then shutdown the C4, unplugged the SD card and booted into the fresh Armbian install on the eMMC.

Basically it’s a workaround to enable us to flash a new image to an eMMC without the need for the eMMC to USB converter.
Hi Cobble,
I want to do something very similar. I followed what you did up to "From Armbian I was able to delete Mate from the eMMC and flash a new Armbian image". Can you add a few noob instructions on how you did this step? Thanks.

Cobble123
Posts: 11
Joined: Tue Jul 14, 2020 1:47 am
languages_spoken: english
Has thanked: 5 times
Been thanked: 3 times
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by Cobble123 »

kronos wrote:
Sun Aug 09, 2020 12:02 am
Cobble123 wrote:
Thu Jul 23, 2020 2:48 am
tobetter wrote:
Thu Jul 23, 2020 2:36 am
Cobble123 wrote:
Thu Jul 23, 2020 2:04 am
tobetter wrote:
Thu Jul 23, 2020 1:56 am
Cobble123 wrote:
Thu Jul 23, 2020 1:49 am
Thanks for this. I’ve just used it to wipe an eMMC and install Armbian from a system running from an SD card.
Good to know it helps.
I wasn’t able to get it to boot Armbian from the SD card with the eMMC attached, so I had to install the official Ubuntu Mate to the SD card. Once I’d done that I was able to bypass the eMMC and boot into Mate, from which I wiped the eMMC and flashed my Armbian image.
So...you have Ubuntu Mate on SD card and Armbian on eMMC, also copied 'ODROIDBIOS.BIN' to eMMC along with Armbian to manage the two OS using the Petitboot. Right? This must be good use case using the Petitboot.
Kinda.

I received a 16gb eMMC today from HARDkERNEL. It of course came with the official Ubuntu Mate 20.4, but I wanted to change it to Armbian. But I do not have the eMMC to USB converter, so I was unable to connect it to my computer.

So I installed the ODROIDBIOS.BIN to Mate on the eMMC, also connected my old Armbian SD card, and used Petitboot to bypass the eMMC and boot into my old Armbian SD card. From Armbian I was able to delete Mate from the eMMC and flash a new Armbian image. I then shutdown the C4, unplugged the SD card and booted into the fresh Armbian install on the eMMC.

Basically it’s a workaround to enable us to flash a new image to an eMMC without the need for the eMMC to USB converter.
Hi Cobble,
I want to do something very similar. I followed what you did up to "From Armbian I was able to delete Mate from the eMMC and flash a new Armbian image". Can you add a few noob instructions on how you did this step? Thanks.
Use GParted to wipe the MMC and then flash the new Armbian image to the MMC using the built-in image writer.
These users thanked the author Cobble123 for the post:
kronos (Sun Aug 09, 2020 5:41 pm)

RussianNeuroMancer
Posts: 30
Joined: Sat Mar 30, 2019 1:43 pm
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by RussianNeuroMancer »

Not sure if it's Petitboot bug, but so far I found this:
If I write image from this thread to microSD and trying to boot it with empty or detached eMMC - it boot just fine.
However, if I have Armbian 20.08 legacy installed on eMMC, with Petitboot on top (installed by following this manual), I can't boot image from this thread for some reason - screen just stay black. I also can't connect via network too (no ssh, no ping) but blue light blink. As soon as I disconnect (or wipe) eMMC and trying to boot from exactly same microSD - it boot without issues (besides issues mentioned here).

Petitboot also does not detect microSD with Armbian 20.08 current images as bootable (inserted microSD does not appear in Petitboot bootable partitions list) but this probably should be expected? Or not?

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

Re: Multi boot and USB booting with ODROID-C4

Post by tobetter »

RussianNeuroMancer wrote:
Mon Aug 31, 2020 11:57 pm
Not sure if it's Petitboot bug, but so far I found this:
If I write image from this thread to microSD and trying to boot it with empty or detached eMMC - it boot just fine.
However, if I have Armbian 20.08 legacy installed on eMMC, with Petitboot on top (installed by following this manual), I can't boot image from this thread for some reason - screen just stay black. I also can't connect via network too (no ssh, no ping) but blue light blink. As soon as I disconnect (or wipe) eMMC and trying to boot from exactly same microSD - it boot without issues (besides issues mentioned here).

Petitboot also does not detect microSD with Armbian 20.08 current images as bootable (inserted microSD does not appear in Petitboot bootable partitions list) but this probably should be expected? Or not?
I need to test the Armbian if it boots with the Petitboot, actually I didn't pay attention for long time since I only see that the image has been downloaded lower than 10 times. :?
In addition, 2560x1600 is not the resolution supported by the mainline kernel yet.

RussianNeuroMancer
Posts: 30
Joined: Sat Mar 30, 2019 1:43 pm
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by RussianNeuroMancer »

tobetter wrote:
Tue Sep 01, 2020 12:24 pm
In addition, 2560x1600 is not the resolution supported by the mainline kernel yet.
Could you please provide link where I can look this up in mainline sources?

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

Re: Multi boot and USB booting with ODROID-C4

Post by tobetter »

RussianNeuroMancer wrote:
Tue Sep 01, 2020 4:17 pm
tobetter wrote:
Tue Sep 01, 2020 12:24 pm
In addition, 2560x1600 is not the resolution supported by the mainline kernel yet.
Could you please provide link where I can look this up in mainline sources?
This is the branch I am using to build.
https://github.com/tobetter/linux/tree/odroid-5.7.y

RussianNeuroMancer
Posts: 30
Joined: Sat Mar 30, 2019 1:43 pm
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by RussianNeuroMancer »

tobetter wrote:
Tue Sep 01, 2020 4:49 pm
This is the branch I am using to build.
https://github.com/tobetter/linux/tree/odroid-5.7.y
Unfortunately, I am not familiar with meson drm driver. Where specifically I in source tree or commit history I can see that 2560x1600 is not supported yet? Asking to keep eye on this part of the driver, to know when it finally will be supported.

abuyazan
Posts: 2
Joined: Fri Jul 10, 2020 3:40 pm
languages_spoken: english
ODROIDs: Odroid C4
Has thanked: 0
Been thanked: 0
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by abuyazan »

Thank you for the hard work.

I managed to setup multiboot on my Odroid C4 with Android being on eMMC and EmuELEC on SD card.

Interestingly, after choosing either OS, I would get a black screen. But turning the TV off and on would get video/picture back on!

I tried forcing the resolution through petitboot.cfg to 1080p, but I still get the same results. Maybe the issue is with my TV.

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

Re: Multi boot and USB booting with ODROID-C4

Post by tobetter »

abuyazan wrote:
Tue Sep 22, 2020 5:59 am
Thank you for the hard work.

I managed to setup multiboot on my Odroid C4 with Android being on eMMC and EmuELEC on SD card.

Interestingly, after choosing either OS, I would get a black screen. But turning the TV off and on would get video/picture back on!

I tried forcing the resolution through petitboot.cfg to 1080p, but I still get the same results. Maybe the issue is with my TV.
What's the vendor and model of your TV?
The display resolution in the petitboot.cfg only affects the Petitboot. If you like to change the resolution or display setup, please edit boot.ini of OS image in each memory card respectively.

abuyazan
Posts: 2
Joined: Fri Jul 10, 2020 3:40 pm
languages_spoken: english
ODROIDs: Odroid C4
Has thanked: 0
Been thanked: 0
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by abuyazan »

I have an LED 1080p Sharp TV and the model is lc-32lb370u.
The boot.ini is already set to 1080p hdmimode, which is supported by my TV.
Also, I tried the Odroid C4 on the IPS Acer monitor that I use for my PC and the multi-boot works fine without problems.

OpenSauce
Posts: 3
Joined: Mon Sep 28, 2020 9:50 pm
languages_spoken: english
ODROIDs: C2, C4, XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by OpenSauce »

Hi
I've tried all these methods, only flashing an SD card works for me and is not what I need. The rest just give me a black screen.
Every time I use the script/flash any of the files to exactly where it says to the file system becomes read only and then I cannot add the ODROIDBIOS.BIN file to the bootloader.
I've tried to make it writeable but nothing works. Using Ubuntu Mate 20.04.1
Any tips to get past this?

Thanks

User avatar
istanbulls
Posts: 306
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID-N2, ODROID C4
Location: Istanbul-Turkey
Has thanked: 196 times
Been thanked: 42 times
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by istanbulls »

Hi, @tobetter

I recommended Odroid-C4 to many people around me and they bought it. A friend of mine said he was having a problem with coreelec. I wanted to test with my daughter C4 (my daughter only uses Android). I opened Coreelec (9.2.3) and the system automatically updated (9.2.4.2). The system has restarted but Petitboot hangs.

I have updated with Petitboot "20200721" (replaced with new version ODROIDBIOS.BIN)
I ran Coreelec but the problem persists.
I flashed the old version Coreelec (9.3.2), everything works fine. I updated again (9.2.4.2) Petitboot hangs, there are writings on the screen but there is no operating system listing and the keyboard is not working.

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

Re: Multi boot and USB booting with ODROID-C4

Post by tobetter »

@all,

Sorry for late update for this thread.
Due to the low demand of the Petitboot use with ODROID-C4, based on the downloading count which is less than 20 so far, and busy for some work around me, I've not updated the new firmware. I am updating the code but not releasing the version yet, probably new firmware will be released in a week after ODROID-N2.

Thank you for your understanding...
These users thanked the author tobetter for the post:
istanbulls (Fri Oct 23, 2020 7:58 pm)

mad_ady
Posts: 8604
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 579 times
Been thanked: 491 times
Contact:

Re: Multi boot and USB booting with ODROID-C4

Post by mad_ady »

Out of curiosity - since HC4 has petitboot - is it the same code base and build scripts used for HC4 and C4, simplifying the maintainability?

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

Re: Multi boot and USB booting with ODROID-C4

Post by tobetter »

mad_ady wrote:
Fri Oct 23, 2020 1:04 am
Out of curiosity - since HC4 has petitboot - is it the same code base and build scripts used for HC4 and C4, simplifying the maintainability?
Basically the code base is the same, but build process is slightly different...and while maintain the code for HC4, I was able to sort out the board gap and SPI and non-SPI board. I have to build each image and test them separately which takes more time than coding. I guess the image will for each board will be released at the same time if the fix is not board specific.

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

Re: Multi boot and USB booting with ODROID-C4

Post by tobetter »

20201028

Sorry for late update, I've built new binary and uploaded.
This version also has the improved display issue as well as fixed a couple of issues reported.

Download link : 20201028

If you are new to use this, please follow the instruction in the previous post. If you already had installed and have working Petitboot with ODROID-C4, just overwrite the file ODROIDBIOS.BIN with the one from the update package. The update pakcage contains only 4 files as below.

Code: Select all

ODROIDBIOS.BIN
mmcboot.img
sd_fusing.sh
u-boot.bin
Thank you... :)
These users thanked the author tobetter for the post:
istanbulls (Thu Oct 29, 2020 11:12 pm)

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 2 guests