Petitboot, yet another bootloader based on KEXEC

Post Reply
loznic89
Posts: 28
Joined: Tue May 07, 2019 8:01 am
languages_spoken: spanish
ODROIDs: Odroid N2
Has thanked: 19 times
Been thanked: 5 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by loznic89 »

tobetter wrote:
Thu Jan 21, 2021 4:04 am
loznic89 wrote:
Thu Jan 21, 2021 4:01 am
andy5macht wrote:
Tue Dec 29, 2020 12:11 am
@tobetter:
eMMC still not detected with 20201222
same with same version in N2, emmc not detected with lineage OS installed
Not detected always?
Can you check if there some error message in the command line of the Petitboot with dmesg?
only detected in first boot after upgrade petitboot.when I restart never detect it again.

later will do dmesg i am seeing football and dont have keyboard here hahaa

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

loznic89 wrote:
Thu Jan 21, 2021 4:07 am
tobetter wrote:
Thu Jan 21, 2021 4:04 am
loznic89 wrote:
Thu Jan 21, 2021 4:01 am
andy5macht wrote:
Tue Dec 29, 2020 12:11 am
@tobetter:
eMMC still not detected with 20201222
same with same version in N2, emmc not detected with lineage OS installed
Not detected always?
Can you check if there some error message in the command line of the Petitboot with dmesg?
only detected in first boot after upgrade petitboot.when I restart never detect it again.

later will do dmesg i am seeing football and dont have keyboard here hahaa
Thanks, no rush... :)

loznic89
Posts: 28
Joined: Tue May 07, 2019 8:01 am
languages_spoken: spanish
ODROIDs: Odroid N2
Has thanked: 19 times
Been thanked: 5 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by loznic89 »

tobetter wrote:
Thu Jan 21, 2021 4:10 am
loznic89 wrote:
Thu Jan 21, 2021 4:07 am
tobetter wrote:
Thu Jan 21, 2021 4:04 am
loznic89 wrote:
Thu Jan 21, 2021 4:01 am
andy5macht wrote:
Tue Dec 29, 2020 12:11 am
@tobetter:
eMMC still not detected with 20201222
same with same version in N2, emmc not detected with lineage OS installed
Not detected always?
Can you check if there some error message in the command line of the Petitboot with dmesg?
only detected in first boot after upgrade petitboot.when I restart never detect it again.

later will do dmesg i am seeing football and dont have keyboard here hahaa
Thanks, no rush... :)
I am doing dmesg ....... any way to get the log file out?

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

loznic89 wrote:
Thu Jan 21, 2021 6:02 pm
tobetter wrote:
Thu Jan 21, 2021 4:10 am
loznic89 wrote:
Thu Jan 21, 2021 4:07 am
tobetter wrote:
Thu Jan 21, 2021 4:04 am
loznic89 wrote:
Thu Jan 21, 2021 4:01 am
andy5macht wrote:
Tue Dec 29, 2020 12:11 am
@tobetter:
eMMC still not detected with 20201222
same with same version in N2, emmc not detected with lineage OS installed
Not detected always?
Can you check if there some error message in the command line of the Petitboot with dmesg?
only detected in first boot after upgrade petitboot.when I restart never detect it again.

later will do dmesg i am seeing football and dont have keyboard here hahaa
Thanks, no rush... :)
I am doing dmesg ....... any way to get the log file out?
Well, it would be fine if you let me know you see a suspicious log or kernel panic when eMMC is not recognized.

Sav
Posts: 258
Joined: Mon Sep 02, 2019 2:33 am
languages_spoken: english
ODROIDs: odroid-n2
Has thanked: 81 times
Been thanked: 26 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Sav »

I have the same problem. To switch from SD to emmc and vice versa I have to unplug the power cord, change the spi switch and boot again

Sav
Posts: 258
Joined: Mon Sep 02, 2019 2:33 am
languages_spoken: english
ODROIDs: odroid-n2
Has thanked: 81 times
Been thanked: 26 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Sav »

I solved the issue: I run pboot-rescan, the system freezed. Then I unplugged the power cord, then plugged again and then andorid on emmc was recognized.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

Sav wrote:
Thu Jan 28, 2021 6:26 pm
I solved the issue: I run pboot-rescan, the system freezed. Then I unplugged the power cord, then plugged again and then andorid on emmc was recognized.
Do you have to keep doing the same every boot?

Sav
Posts: 258
Joined: Mon Sep 02, 2019 2:33 am
languages_spoken: english
ODROIDs: odroid-n2
Has thanked: 81 times
Been thanked: 26 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Sav »

I can't tell. I did it on time, then went to bed.
Today I will do more tests. I'll keep you updated.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

Sav wrote:
Thu Jan 28, 2021 6:33 pm
I can't tell. I did it on time, then went to bed.
Today I will do more tests. I'll keep you updated.
Thanks, sorry for the bug...still it's not resolved ... ;(
These users thanked the author tobetter for the post:
loznic89 (Fri Jan 29, 2021 2:34 am)

jnohlgard
Posts: 4
Joined: Thu Jan 21, 2021 11:59 pm
languages_spoken: english
ODROIDs: HC4
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by jnohlgard »

Is there a git repo somewhere with the ODROID version of petitboot?
The repos that I have found on Github have not been updated in a few years.
I have run into a few issues that I probably will be able to fix myself if I only could find the sources somewhere.
These users thanked the author jnohlgard for the post:
m_ueberall (Sun Jan 31, 2021 12:35 am)

Sav
Posts: 258
Joined: Mon Sep 02, 2019 2:33 am
languages_spoken: english
ODROIDs: odroid-n2
Has thanked: 81 times
Been thanked: 26 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Sav »

tobetter wrote:
Thu Jan 28, 2021 6:35 pm
Sav wrote:
Thu Jan 28, 2021 6:33 pm
I can't tell. I did it on time, then went to bed.
Today I will do more tests. I'll keep you updated.
Thanks, sorry for the bug...still it's not resolved ... ;(
I can confirm that my workaround doesn't work: I rebooted the N2 -> petitboot showed only CoreElec on the sd card and didn't recognize android on emmc -> I exited on the shell prompt and run pb-discover -> the system freezed -> after ctrl+alt+del still no android.

Sav
Posts: 258
Joined: Mon Sep 02, 2019 2:33 am
languages_spoken: english
ODROIDs: odroid-n2
Has thanked: 81 times
Been thanked: 26 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Sav »

Here some screenshots of dmesg
Image

Image

schrackin
Posts: 3
Joined: Tue Feb 09, 2021 6:21 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by schrackin »

Hi Folks,
I just installed the latest 20201222 petitboot on my odroid n2, but i can't remember and find out how can i navigate in the menu to install and use an android build from the SD card. I've plugged in a standard usb keyboard, but it seems it doesn't work at boot from any of the ports at the back side. But the KB is fully functional when i use it at coreelec 9.2.5 from the mmc card. Could you please tell me, what should i do to fix the problem?

screenshot link: https://www.dropbox.com/s/kdvlyouvj5xu4 ... .jpeg?dl=0

Sav
Posts: 258
Joined: Mon Sep 02, 2019 2:33 am
languages_spoken: english
ODROIDs: odroid-n2
Has thanked: 81 times
Been thanked: 26 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Sav »

Have you tried the remote?

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

schrackin wrote:
Tue Feb 09, 2021 6:32 am
Hi Folks,
I just installed the latest 20201222 petitboot on my odroid n2, but i can't remember and find out how can i navigate in the menu to install and use an android build from the SD card. I've plugged in a standard usb keyboard, but it seems it doesn't work at boot from any of the ports at the back side. But the KB is fully functional when i use it at coreelec 9.2.5 from the mmc card. Could you please tell me, what should i do to fix the problem?

screenshot link: https://www.dropbox.com/s/kdvlyouvj5xu4 ... .jpeg?dl=0
Are you able to start Android from SD card without the Petitboot? Will you let me know the vendor/model of your USB keyboard?

Sav
Posts: 258
Joined: Mon Sep 02, 2019 2:33 am
languages_spoken: english
ODROIDs: odroid-n2
Has thanked: 81 times
Been thanked: 26 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Sav »

Hi tobetter,
Did you have a chance to look in the android-emmc bug?
I posted some logs above.
Do you need more infos?

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

Sav wrote:
Tue Feb 09, 2021 5:08 pm
Hi tobetter,
Did you have a chance to look in the android-emmc bug?
I posted some logs above.
Do you need more infos?
Sorry @Sav, I think it's completely fixed yet even I am looking into the issue whenever I have a chance. It still happens to me and I guess it's caused my last update to support DVI display. So I am still looking into it, if I am not able to resolve it...I would need to find out a workaround which I am testing.

schrackin
Posts: 3
Joined: Tue Feb 09, 2021 6:21 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by schrackin »

tobetter wrote:
Tue Feb 09, 2021 9:00 am
schrackin wrote:
Tue Feb 09, 2021 6:32 am
Hi Folks,
I just installed the latest 20201222 petitboot on my odroid n2, but i can't remember and find out how can i navigate in the menu to install and use an android build from the SD card. I've plugged in a standard usb keyboard, but it seems it doesn't work at boot from any of the ports at the back side. But the KB is fully functional when i use it at coreelec 9.2.5 from the mmc card. Could you please tell me, what should i do to fix the problem?

screenshot link: https://www.dropbox.com/s/kdvlyouvj5xu4 ... .jpeg?dl=0
Are you able to start Android from SD card without the Petitboot? Will you let me know the vendor/model of your USB keyboard?
I tried to install android for the first time, i haven't used it yet.
I tried with a Cherry Stream 3.0 and a Logitech K400 Wireless keyboard.

What kind of remote should i try with? I'm using an infrared Logitech Harmony remote to control Coreelec Kodi, it works fine, but i can't use it in the the boot menu.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

schrackin wrote:
Wed Feb 10, 2021 5:07 pm
tobetter wrote:
Tue Feb 09, 2021 9:00 am
schrackin wrote:
Tue Feb 09, 2021 6:32 am
Hi Folks,
I just installed the latest 20201222 petitboot on my odroid n2, but i can't remember and find out how can i navigate in the menu to install and use an android build from the SD card. I've plugged in a standard usb keyboard, but it seems it doesn't work at boot from any of the ports at the back side. But the KB is fully functional when i use it at coreelec 9.2.5 from the mmc card. Could you please tell me, what should i do to fix the problem?

screenshot link: https://www.dropbox.com/s/kdvlyouvj5xu4 ... .jpeg?dl=0
Are you able to start Android from SD card without the Petitboot? Will you let me know the vendor/model of your USB keyboard?
I tried to install android for the first time, i haven't used it yet.
I tried with a Cherry Stream 3.0 and a Logitech K400 Wireless keyboard.

What kind of remote should i try with? I'm using an infrared Logitech Harmony remote to control Coreelec Kodi, it works fine, but i can't use it in the the boot menu.
Due to the limited compability, the Petitboot only works with Hardkernel stock IR remote. Since you have the Harmony remote, would it be possible to program?
https://wiki.odroid.com/accessory/conne ... controller

schrackin
Posts: 3
Joined: Tue Feb 09, 2021 6:21 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by schrackin »

tobetter wrote:
Wed Feb 10, 2021 5:11 pm
schrackin wrote:
Wed Feb 10, 2021 5:07 pm
tobetter wrote:
Tue Feb 09, 2021 9:00 am
schrackin wrote:
Tue Feb 09, 2021 6:32 am
Hi Folks,
I just installed the latest 20201222 petitboot on my odroid n2, but i can't remember and find out how can i navigate in the menu to install and use an android build from the SD card. I've plugged in a standard usb keyboard, but it seems it doesn't work at boot from any of the ports at the back side. But the KB is fully functional when i use it at coreelec 9.2.5 from the mmc card. Could you please tell me, what should i do to fix the problem?

screenshot link: https://www.dropbox.com/s/kdvlyouvj5xu4 ... .jpeg?dl=0
Are you able to start Android from SD card without the Petitboot? Will you let me know the vendor/model of your USB keyboard?
I tried to install android for the first time, i haven't used it yet.
I tried with a Cherry Stream 3.0 and a Logitech K400 Wireless keyboard.

What kind of remote should i try with? I'm using an infrared Logitech Harmony remote to control Coreelec Kodi, it works fine, but i can't use it in the the boot menu.
Due to the limited compability, the Petitboot only works with Hardkernel stock IR remote. Since you have the Harmony remote, would it be possible to program?
https://wiki.odroid.com/accessory/conne ... controller
Thanks for the suggestion, i can control it with hardkernel remote profile.

Sav
Posts: 258
Joined: Mon Sep 02, 2019 2:33 am
languages_spoken: english
ODROIDs: odroid-n2
Has thanked: 81 times
Been thanked: 26 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Sav »

tobetter wrote:
Tue Feb 09, 2021 5:11 pm
Sav wrote:
Tue Feb 09, 2021 5:08 pm
Hi tobetter,
Did you have a chance to look in the android-emmc bug?
I posted some logs above.
Do you need more infos?
Sorry @Sav, I think it's completely fixed yet even I am looking into the issue whenever I have a chance. It still happens to me and I guess it's caused my last update to support DVI display. So I am still looking into it, if I am not able to resolve it...I would need to find out a workaround which I am testing.
It's odd. Yesterday I rebooted several times: sometimes petitboot displayed Android and sometimes not. I didn't do anything on the boot partitions.

zyssai
Posts: 104
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 2Gb
Vu7a+
Has thanked: 30 times
Been thanked: 8 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by zyssai »

Hello,
I'm new odroid user, i use petitboot to flash roms.

I just have a simple question, when balenaetcher finish to flash, the only way i found to reboot is to disconnect power cord.
I tried shutdown or reboot command but none of these works.

Is there another way ?

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

zyssai wrote:
Tue Feb 16, 2021 4:53 am
Hello,
I'm new odroid user, i use petitboot to flash roms.

I just have a simple question, when balenaetcher finish to flash, the only way i found to reboot is to disconnect power cord.
I tried shutdown or reboot command but none of these works.

Is there another way ?
If you have flashed roms in the Petitboot using USB cable to connect with your desktop, you can simply press Ctrl-Alt-Del after flashing.

jgmdev
Posts: 348
Joined: Tue Jan 28, 2020 2:28 pm
languages_spoken: english, spanish
ODROIDs: U2, N2, N2+, C4, HC4
Has thanked: 141 times
Been thanked: 248 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by jgmdev »

Hi tobetter,

Today I was reading your write up on https://docs.linuxfactory.or.kr/guides/kmsdrm.html about edid files and how to use predefined ones from that github repo you shared and I finally was able to make my display work when booting from petitboot by forcing the edid information. I was wondering if you could pass an environment variable named "petitboot_active" set to "1" (or whatever other name you think is appropriate) when parsing the boot.ini files found on connected storage's so I could for example add this to the boot.ini and force the edid resolution when running a mainline kernel only when booting from petitboot:

Code: Select all

# Video Output
## preferred_resolution
## set to your preferred resolution using the format:
##     {width}x{heigth}@{hertz}
##     example: 1920x1080@60
setenv preferred_resolution "1920x1080@60"

## overwrite_edid
## if you experience issues of display not showing any
## image when using petitboot you can use this setting
## to overwrite the default display edid information.
## A valid value for this option can be:
##  800x600, 1024x768, 1280x720, 1280x1024, 1600x1200, 
##  1680x1050, 1920x1080, 2560x1440, 2880x1800, 3840x2160
setenv overwrite_edid "1920x1080"

if test "${overwrite_edid}" != "" && test "${petitboot_active}" = "1"; then
    setenv voutput "drm_kms_helper.edid_firmware=HDMI-A-1:edid/${overwrite_edid}.bin"
elif test "${preferred_resolution}" != ""; then
    setenv voutput "video=HDMI-A-1:${preferred_resolution}"
fi
I guess this would help the people that are having display issues (due to I guess the kernel shipped with petitboot using an older hdmi driver). Mainline kernel when not booting from petitboot does a pretty nice job properly detecting display resolutions (except for the other reported issue of purple colors on some resolutions), so that is why I'm asking if adding this environment variable would be possible.
Last edited by jgmdev on Tue Feb 16, 2021 1:57 pm, edited 1 time in total.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

jgmdev wrote:
Tue Feb 16, 2021 10:00 am
Hi tobetter,

Today I was reading your write up on https://docs.linuxfactory.or.kr/guides/kmsdrm.html about edid files and how to use predefined ones from that github repo you shared and I finally was able to make my display work when booting from petitboot by forcing the edid information. I was wondering if you could pass an environment variable named "petitboot_active" set to "1" (or whatever other name you think is appropriate) when parsing the boot.ini files found on connected storage's so I could for example add this to the boot.ini and force the edid resolution when running a mainline kernel only when booting from petitboot:

Code: Select all

# Video Output
## preferred_resolution
## set to your preferred resolution using the format:
##     {width}x{heigth}@{hertz}
##     example: 1920x1080@60
setenv preferred_resolution "1920x1080@60"

## overwrite_edid
## if you experience issues of display not showing any
## image when using petitboot you can use this setting
## to overwrite the default display edid information.
## A valid value for this option can be:
##  800x600, 1024x768, 1280x720, 1280x1024, 1600x1200, 
##  1680x1050, 1920x1080, 2560x1440, 2880x1800, 3840x2160
setenv overwrite_edid "1920x1080"

if test "${overwrite_edid}" != "" && test ${petitboot_active} = "1"; then
    setenv voutput "drm_kms_helper.edid_firmware=HDMI-A-1:edid/${overwrite_edid}.bin"
elif test "${preferred_resolution}" != ""; then
    setenv voutput "video=HDMI-A-1:${preferred_resolution}"
fi
I guess this would help the people that are having display issues (due to I guess the kernel shipped with petitboot using an older hdmi driver). Mainline kernel when not booting from petitboot does a pretty nice job properly detecting display resolutions (except for the other reported issue of purple colors on some resolutions), so that is why I'm asking if adding this environment variable would be possible.
Thank you for your suggestion, ler me add the flag and share the test image before Tudesday morning in your time. :)
These users thanked the author tobetter for the post:
jgmdev (Tue Feb 16, 2021 11:27 am)

zyssai
Posts: 104
Joined: Wed Jan 27, 2021 6:42 pm
languages_spoken: english, french
ODROIDs: Odroid N2+ 2Gb
Vu7a+
Has thanked: 30 times
Been thanked: 8 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by zyssai »

tobetter wrote:
Tue Feb 16, 2021 9:17 am
If you have flashed roms in the Petitboot using USB cable to connect with your desktop, you can simply press Ctrl-Alt-Del after flashing.
Simple as this, thanks you !!

CtrlC-Root
Posts: 1
Joined: Wed Feb 17, 2021 4:04 am
languages_spoken: English, Romanian
ODROIDs: XU4, N2
Location: United States
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by CtrlC-Root »

@tobetter I'm trying to build the SPI image from sources by following the instructions on this page:
https://wiki.odroid.com/odroid-n2/softw ... _buildroot

I'm using the odroidn2_bios_release configuration and it's asking me to authenticate when it gets to the uboot-parser package:

Code: Select all

>>> uboot-parser master Downloading
Username for 'https://github.com':
This is because the uboot-parser package at buildroot//boot/uboot-parser is configured to download the source from the GItHub repository at https://github.com/tobetter/uboot-parser which either no longer exists or is not public. Unfortunately this is preventing me from building the SPI image. Is there somewhere I can get the source for that package? I'd like to customize the SPI image and while I could probably work around this issue by modifying the configuration I had hoped to start by reproducing the images published on the wiki at https://wiki.odroid.com/odroid-n2/os_images/petitboot so I can start from a known working image.

This might also be useful so other people can troubleshoot, debug, and try to fix the eMMC and HDMI boot issues. Right now I've been unpacking and modifying the published image files by hand but it would be great if I could build the image from source instead.

User avatar
m_ueberall
Posts: 37
Joined: Thu Jul 23, 2020 6:13 pm
languages_spoken: english, german
ODROIDs: N2+
Location: Hanau, Germany
Has thanked: 32 times
Been thanked: 11 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by m_ueberall »

tobetter wrote:
Tue Feb 19, 2019 3:25 pm
Testing version : 20201222
I wonder whether there's a way to blacklist/ignore/filter boot partitions/options (e.g. by type) detected by Petitboot or to explicitly specify which of all Petitboot entries to choose (either by identifier or by absolute menu item number)?

Thanks to the ability to parse GRUB boot menu entries, I can manually select which kernel to use; but unfortunately, I did not manage to ensure that the system below will reboot without manual intervention as the default option—explicitly selected below, hence the asterisk in column 1—won't work when using ZFS (because required command line options specified in the GRUB menu entries are missing):

Code: Select all

Petitboot (dev.20201222)
-------------------------------------------------------------------
 [Disk: sda3 / 07068e2f-0305-46a1-a578-740692f92b77]
*  Ubuntu 20.04.2 LTS
 [Disk: sda1 / A2C8-E210]
   Ubuntu 20.04 LTS, with Linux 5.9.0-odroid-arm64
   Ubuntu 20.04 LTS, with Linux 5.9.0-odroid-arm64 (recovery mode)
   Ubuntu 20.04 LTS, with Linux 5.10.0-odroid-arm64
   Ubuntu 20.04 LTS, with Linux 5.10.0-odroid-arm64 (recovery mode)
Partition /dev/sda3 is typed accordingly, of course—although it uses an ext4 filesystem for the time being—but I'd rather not change the suggested partition type for this setup to get it ignored if possible:

Code: Select all

# sfdisk --list /dev/sda | grep -E "sda[0-9]"
/dev/sda1     2048   1050623   1048576   512M EFI System
/dev/sda2  1050624   5244927   4194304     2G Linux swap
/dev/sda3  5244928   9439231   4194304     2G Solaris boot
/dev/sda4  9439232 838860766 829421535 395,5G Solaris root
/dev/sda5       48      2047      2000  1000K BIOS boot
# df -T /boot
Filesystem     Type 1K-blocks   Used Available Use% Mounted on
/dev/sda3      ext4   1998672 176524   1805764   9% /boot
#
In case changing the partition type is the only option—are there any suggestions which one to choose in conjunction with Petitboot? Thanks in advance!

mad_ady
Posts: 9373
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: 599 times
Been thanked: 659 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by mad_ady »

Maybe it could be implemented by checking if there is a .ignore_by_petitboot file in the partition's root...
These users thanked the author mad_ady for the post:
m_ueberall (Sat Mar 13, 2021 10:32 pm)

User avatar
m_ueberall
Posts: 37
Joined: Thu Jul 23, 2020 6:13 pm
languages_spoken: english, german
ODROIDs: N2+
Location: Hanau, Germany
Has thanked: 32 times
Been thanked: 11 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by m_ueberall »

mad_ady wrote:
Sat Mar 13, 2021 9:14 pm
Maybe it could be implemented by checking if there is a .ignore_by_petitboot file in the partition's root...
That's an idea, although I'd suggest to explicitly choose a name which would semantically reflect that Petitboot is not meant to create a boot menu item for it. Entirely ignoring the partition is not an option as it really holds the boot images (while the GRUB related files including the boot menu entries parsed by Petitboot reside on /dev/sda1). :)

ced1442
Posts: 4
Joined: Sat Mar 13, 2021 11:59 pm
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by ced1442 »

Hi,
I just bought my odroid N2 for home assistant. My plan was to directly boot hassio from an SSD on USB (emmc too expensive and SD card less robust).
After reading some topics I thought it will be possible with SPI boot and petitboot, but unfortunatly it is not working and I don't understand why..
From what I understant petitboot is mounting the usb drive and then search for boot.ini or boot.scr.
On the root directory /sda1 there is this boot.scr

Code: Select all

root@DietPi:/mnt/B134-8015# ls
boot.scr  cmdline.txt  meson-g12b-odroid-n2-plus.dtb  meson-g12b-odroid-n2.dtb
If I edit the boot.scr I get this:
[pastebin]https://pastebin.com/R7jQjF39[/pastebin]
Do you know what is wrong and how I can fix that ?

Boot from sd is ok with the same image.

Thanks if you can help

mad_ady
Posts: 9373
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: 599 times
Been thanked: 659 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by mad_ady »

You can't edit boot.scr, since it's a binary file. You need to recreate it from boot.txt

ced1442
Posts: 4
Joined: Sat Mar 13, 2021 11:59 pm
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by ced1442 »

I don't want to edit this file. I want to know why it is not working compared to other system.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

ced1442 wrote:
Sun Mar 14, 2021 5:12 am
I don't want to edit this file. I want to know why it is not working compared to other system.
HomeAssistant itself is very likely solid OS and it has its own implementation on the boot loader and update system, AFAIK. Especially their semaless system update and firmware management is tied to MMC, I've managed to change the boot script very earlier in order to boot from USB stick but no luck.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

m_ueberall wrote:
Sat Mar 13, 2021 10:29 pm
mad_ady wrote:
Sat Mar 13, 2021 9:14 pm
Maybe it could be implemented by checking if there is a .ignore_by_petitboot file in the partition's root...
That's an idea, although I'd suggest to explicitly choose a name which would semantically reflect that Petitboot is not meant to create a boot menu item for it. Entirely ignoring the partition is not an option as it really holds the boot images (while the GRUB related files including the boot menu entries parsed by Petitboot reside on /dev/sda1). :)
What if to change the boot order in System Configuration, so only to add /dev/sda1 to boot from?
These users thanked the author tobetter for the post:
m_ueberall (Mon Mar 15, 2021 5:43 pm)

User avatar
m_ueberall
Posts: 37
Joined: Thu Jul 23, 2020 6:13 pm
languages_spoken: english, german
ODROIDs: N2+
Location: Hanau, Germany
Has thanked: 32 times
Been thanked: 11 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by m_ueberall »

tobetter wrote:
Mon Mar 15, 2021 7:08 am
m_ueberall wrote:
Sat Mar 13, 2021 10:29 pm
mad_ady wrote:
Sat Mar 13, 2021 9:14 pm
Maybe it could be implemented by checking if there is a .ignore_by_petitboot file in the partition's root...
That's an idea, although I'd suggest to explicitly choose a name which would semantically reflect that Petitboot is not meant to create a boot menu item for it. Entirely ignoring the partition is not an option as it really holds the boot images (while the GRUB related files including the boot menu entries parsed by Petitboot reside on /dev/sda1). :)
What if to change the boot order in System Configuration, so only to add /dev/sda1 to boot from?
Thanks a lot, that is perfect for my use case—I totally forgot about that important menu! :mrgreen:
As all of my disks use the same layout, I don't need to touch this ever again. With this, Petitboot will always use the first GRUB menu item found; and since I control the order of those items, it's the same as modifying GRUB_DEFAULT (if need be).
These users thanked the author m_ueberall for the post:
tobetter (Mon Mar 15, 2021 7:34 pm)

ced1442
Posts: 4
Joined: Sat Mar 13, 2021 11:59 pm
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by ced1442 »

tobetter wrote:
Mon Mar 15, 2021 7:00 am
ced1442 wrote:
Sun Mar 14, 2021 5:12 am
I don't want to edit this file. I want to know why it is not working compared to other system.
HomeAssistant itself is very likely solid OS and it has its own implementation on the boot loader and update system, AFAIK. Especially their semaless system update and firmware management is tied to MMC, I've managed to change the boot script very earlier in order to boot from USB stick but no luck.
Thanks for your answer, I found a temporary solution by booting on a debian and install home assistant as supervisor. It does the job very well.
Home Assistant developpment team is now promoting the N2+ instead of rapsberry pi 4. I will not be the only one to have this request. It is for me a regression compared to raspberry which allow booting Hassio from USB. I'll post an improvement request for that, let's see how it goes.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

ced1442 wrote:
Wed Mar 17, 2021 5:04 am
tobetter wrote:
Mon Mar 15, 2021 7:00 am
ced1442 wrote:
Sun Mar 14, 2021 5:12 am
I don't want to edit this file. I want to know why it is not working compared to other system.
HomeAssistant itself is very likely solid OS and it has its own implementation on the boot loader and update system, AFAIK. Especially their semaless system update and firmware management is tied to MMC, I've managed to change the boot script very earlier in order to boot from USB stick but no luck.
Thanks for your answer, I found a temporary solution by booting on a debian and install home assistant as supervisor. It does the job very well.
Home Assistant developpment team is now promoting the N2+ instead of rapsberry pi 4. I will not be the only one to have this request. It is for me a regression compared to raspberry which allow booting Hassio from USB. I'll post an improvement request for that, let's see how it goes.
Hmmm...I didn't think of installing H/A on top of Debian and glad to know it works. Can you let me know which image you have flashed and how you've installed H/A on it? If you post the request to their forum, please let me have the link so I will see if I can help.

mad_ady
Posts: 9373
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: 599 times
Been thanked: 659 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by mad_ady »

Unfortunately, the "supervised" method (Debian with HA on top) isn't the preferred/recommended way to install HA. It works, but it's not the way HA devs want you to do stuff. So their hassio image should be supported, but it may require changes on their end too.

ced1442
Posts: 4
Joined: Sat Mar 13, 2021 11:59 pm
languages_spoken: english
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by ced1442 »

For Home Assistant in supervised mode I choose the dietpi distribution, it seems to be a very light debian and compatible with petitboot.
Once dietpi installed on my usb ssd and booted, there is few step to setup it. I didn't install any software from the GUI.
To install Home Assistant there is few package needed:

Code: Select all

apt-get install network-manager apparmor docker jq dbus
Then install docker:

Code: Select all

curl -fsSL get.docker.com | sh
Finally Home Assistant:

Code: Select all

curl -Lo installer.sh https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh
bash installer.sh --machine odroid-n2
If all goes well, you can connect to home assistant here : http://odroid_ip:8123

From what I read, we only need to connect and update the system once a month for security patch:

Code: Select all

apt update && apt upgrade -y && apt autoremove –y
These users thanked the author ced1442 for the post:
tobetter (Thu Mar 18, 2021 12:05 pm)

miroshi
Posts: 26
Joined: Wed Mar 17, 2021 2:52 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by miroshi »

HI,
sorry if someone already ask this, but have the following problem when boot via SPI and select my mmc Android installation I always go into Android recovery mode.
Any ideas how to boot in the Android and not in the recovery?

Regards!

PS - I am with Petitboot 20201020, and can see my CoreElec, Android 9 Pie and Ubuntu Mate installations. I can boot CE i UM, but not my Android.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

miroshi wrote:
Sun Mar 21, 2021 8:01 pm
HI,
sorry if someone already ask this, but have the following problem when boot via SPI and select my mmc Android installation I always go into Android recovery mode.
Any ideas how to boot in the Android and not in the recovery?

Regards!

PS - I am with Petitboot 20201020, and can see my CoreElec, Android 9 Pie and Ubuntu Mate installations. I can boot CE i UM, but not my Android.
Have you ever finished Android installation without the Petitboot?

miroshi
Posts: 26
Joined: Wed Mar 17, 2021 2:52 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by miroshi »

tobetter wrote:
Mon Mar 22, 2021 3:55 am
miroshi wrote:
Sun Mar 21, 2021 8:01 pm
HI,
sorry if someone already ask this, but have the following problem when boot via SPI and select my mmc Android installation I always go into Android recovery mode.
Any ideas how to boot in the Android and not in the recovery?

Regards!

PS - I am with Petitboot 20201020, and can see my CoreElec, Android 9 Pie and Ubuntu Mate installations. I can boot CE i UM, but not my Android.
Have you ever finished Android installation without the Petitboot?
Yes. I did the first boot and the install booting directly the mmc, because of the same problem.
Even now, to boot the Android I switch to mmc mode.

g0ran
Posts: 2
Joined: Sat Mar 27, 2021 4:27 am
languages_spoken: english
ODROIDs: N2+
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by g0ran »

Hi!
I have N2+ with 32GB eMMC and following issue:
Petitboot dev.20201222 (last one?)
SD card with Coreelec (tried several cards)
eMMC with Ubuntu

SPI switch: Petitboot recognizes and list both devices but neither of them boot after selected. (black screen with solid red and blinking blue)

When switch to MMC Ubuntu loads normaly. (If eMMC removed Coreelec boots normaly)

What I am missing? Why wont boot using Petitboot?
Tnx.

Sav
Posts: 258
Joined: Mon Sep 02, 2019 2:33 am
languages_spoken: english
ODROIDs: odroid-n2
Has thanked: 81 times
Been thanked: 26 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Sav »

Hi,
I just realized that the ethernet interface is down in petitboot (20201222).
I have to manually execute ifup eth0

dm2912
Posts: 5
Joined: Tue Apr 06, 2021 2:39 am
languages_spoken: english
ODROIDs: N2+
Has thanked: 1 time
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by dm2912 »

I am having the same issue with black screen on booting with switch set to spi on the n2+. Have tried multiple versions of Petitboot (20201222, 20201112, and 20201020).

With both CoreElec and EmuElec, its driving me nuts :D

Have tried:

1) boot.ini (coreelec) - switching autodetect to both true and false, switching between 1080p50/60

2) petitboot.cfg - suggested elsewhere, tried booting sp1 with that on sd card and appeared to do nothing.

Code: Select all

hdmimode=1080p60hz
vga=1080p60hz
Also tried 720, 480, and it didn't seem to have any effect, it didnt even change the resolution of petitboot :S

3) full recovery flash of petitboot as per this post, but the original 2019 one flat out refused to flash. did a full recovery flash from 082020 but that didnt help

viewtopic.php?f=182&t=33873&p=316318&hi ... en#p316318

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

dm2912 wrote:
Tue Apr 06, 2021 4:09 am
I am having the same issue with black screen on booting with switch set to spi on the n2+. Have tried multiple versions of Petitboot (20201222, 20201112, and 20201020).

With both CoreElec and EmuElec, its driving me nuts :D

Have tried:

1) boot.ini (coreelec) - switching autodetect to both true and false, switching between 1080p50/60

2) petitboot.cfg - suggested elsewhere, tried booting sp1 with that on sd card and appeared to do nothing.

Code: Select all

hdmimode=1080p60hz
vga=1080p60hz
Also tried 720, 480, and it didn't seem to have any effect, it didnt even change the resolution of petitboot :S

3) full recovery flash of petitboot as per this post, but the original 2019 one flat out refused to flash. did a full recovery flash from 082020 but that didnt help

viewtopic.php?f=182&t=33873&p=316318&hi ... en#p316318
Can you share the vendor/model of your display?
What OS are you running other than CoreELEC?

Sholander
Posts: 168
Joined: Wed Jun 05, 2019 1:02 am
languages_spoken: english
ODROIDs: ODROID N2
Has thanked: 0
Been thanked: 19 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Sholander »

Is there a simple way to force permanently 1080p/60 resolution? I'm using an older version (spiboot-20201020) since on all 3 newer Petitboot versions open in a low SD resolution. I'd prefer HD res if possible on my big screen :)

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

Sholander wrote:
Tue Apr 06, 2021 7:08 pm
Is there a simple way to force permanently 1080p/60 resolution? I'm using an older version (spiboot-20201020) since on all 3 newer versions Petitboot opens in a low SD resolution. I'd prefer HD res if possible on my big screen :)
Please try to use petitboot.cfg in SD card with these line.

Code: Select all

[u-boot]
hdmimode=1080p60hz
vga=1080p60hz
If these lines make the Petitboot in 1080P resolution as you expected, run these commands in the command line of the Petitboot, new resolution 1080p60hz should be applied on the next boot with the petitboot.cfg.

Code: Select all

fw_setenv hdmimode 1080p60hz
fw_setenv vga 1080p60hz

Sholander
Posts: 168
Joined: Wed Jun 05, 2019 1:02 am
languages_spoken: english
ODROIDs: ODROID N2
Has thanked: 0
Been thanked: 19 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Sholander »

Tnx, will try tonight and report.

Edit: it works as expected. Latest version Petitboot (20201222) starts again in 1080p resolution :)

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest