Petitboot, yet another bootloader based on KEXEC

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

mad_ady wrote:
Fri Nov 13, 2020 4:14 pm
Yes! It worked without me setting any resolution/dvi information! It's running in 1024x768.
I haven't tested it with a HDMI monitor though (so that it doesn't break anything).

Great job! I hope you port the changes to the C4 branch as well!

Edit: But wait - it doesn't see the OS on my EMMC (it's HK Ubuntu 20.04)!

Edit 2:

Code: Select all

/ # ls -l /dev/mmcblk0*
brw-------    1 0        0         179,   0 Jan  1 00:00 /dev/mmcblk0
brw-------    1 0        0         179,  32 Jan  1 00:00 /dev/mmcblk0boot0
brw-------    1 0        0         179,  64 Jan  1 00:00 /dev/mmcblk0boot1
brw-------    1 0        0         179,   1 Jan  1 00:00 /dev/mmcblk0p1
brw-------    1 0        0         179,   2 Jan  1 00:00 /dev/mmcblk0p2
brw-------    1 0        0         179,  96 Jan  1 00:00 /dev/mmcblk0rpmb
/ # mount 
rootfs on / type rootfs (rw)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /dev type devtmpfs (rw,relatime,size=1904748k,nr_inodes=476187,mode=755)
/ # blkid
/dev/mmcblk0p2: LABEL="rootfs" UUID="e139ce78-9841-40fe-8823-96a304a09859"
/dev/mmcblk0p1: LABEL="BOOT" UUID="F702-39CB"

Glad to hear your old DVI monitor works with change nothing.
So do you mean that Hardkernel Ubuntu OS does not show to Petitboot menu?

mad_ady
Posts: 8820
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: 586 times
Been thanked: 528 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by mad_ady »

Yes, it doesn't show. Is there any debugging I could do to help you out?

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

mad_ady wrote:
Fri Nov 13, 2020 4:46 pm
Yes, it doesn't show. Is there any debugging I could do to help you out?
Do you know the version of kernel package and 'n2_bootini'?

mad_ady
Posts: 8820
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: 586 times
Been thanked: 528 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by mad_ady »

I don't have that package on my n2 (it's the minimal image if it helps), but:

Code: Select all

root@odroid:~# uname -a
Linux odroid 4.9.236-103 #1 SMP PREEMPT Wed Nov 4 19:44:48 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
root@odroid:~# dpkg -l | grep boot
ii  bootini                          20201013-108                       arm64        boot.ini and System Tweaks for ODROID-N2
ii  klibc-utils                      2.0.7-1ubuntu5                     arm64        small utilities built with klibc for early boot
ii  u-boot                           20200709-6774884-101               arm64        ODROID-N2 U-Boot 2015.01
ii  u-boot-tools                     2019.07+dfsg-1ubuntu6              arm64        companion tools for Das U-Boot bootloader
root@odroid:~# pastebinit /media/boot/boot.ini
https://paste.ubuntu.com/p/d9M2nt4v7V/
root@odroid:~# pastebinit /media/boot/config.ini
https://paste.ubuntu.com/p/rcC4yzsvz7/
root@odroid:~# 


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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

mad_ady wrote:
Fri Nov 13, 2020 4:56 pm
I don't have that package on my n2 (it's the minimal image if it helps), but:

Code: Select all

root@odroid:~# uname -a
Linux odroid 4.9.236-103 #1 SMP PREEMPT Wed Nov 4 19:44:48 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
root@odroid:~# dpkg -l | grep boot
ii  bootini                          20201013-108                       arm64        boot.ini and System Tweaks for ODROID-N2
ii  klibc-utils                      2.0.7-1ubuntu5                     arm64        small utilities built with klibc for early boot
ii  u-boot                           20200709-6774884-101               arm64        ODROID-N2 U-Boot 2015.01
ii  u-boot-tools                     2019.07+dfsg-1ubuntu6              arm64        companion tools for Das U-Boot bootloader
root@odroid:~# pastebinit /media/boot/boot.ini
https://paste.ubuntu.com/p/d9M2nt4v7V/
root@odroid:~# pastebinit /media/boot/config.ini
https://paste.ubuntu.com/p/rcC4yzsvz7/
root@odroid:~# 

Thanks, I think that's faire enough to debug. Let me do this later since I am sorting out the new kernel packages.

mad_ady
Posts: 8820
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: 586 times
Been thanked: 528 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by mad_ady »

In the mean time I've upgraded the kernel to -104, but it behaves the same way...

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

mad_ady wrote:
Fri Nov 13, 2020 5:26 pm
In the mean time I've upgraded the kernel to -104, but it behaves the same way...
Actually, the kernel version is not a matter. The matter is the boot.ini or boot.scr.

peppoonline
Posts: 36
Joined: Fri Nov 13, 2020 5:48 pm
languages_spoken: english
ODROIDs: HC4
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by peppoonline »

I think I messed up the SPI of my HC4.... i tried the recovery image from https://wiki.odroid.com/odroid-n2/os_images/petitboot but it doesn't get recognized. Flashed two different cards, with either Etcher or Win32 Disk Imager.
I push the button on the bottom, plugin the power and only the red LED is on... no blue LED.
If I do the same procedure with like an Ubuntu 20.04 image on SDcard, it works.

Could you push me in the right direction? :)

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

peppoonline wrote:
Fri Nov 13, 2020 9:07 pm
I think I messed up the SPI of my HC4.... i tried the recovery image from https://wiki.odroid.com/odroid-n2/os_images/petitboot but it doesn't get recognized. Flashed two different cards, with either Etcher or Win32 Disk Imager.
I push the button on the bottom, plugin the power and only the red LED is on... no blue LED.
If I do the same procedure with like an Ubuntu 20.04 image on SDcard, it works.

Could you push me in the right direction? :)
Since you are saying ODROID-HC4, you must use different SPI image.
http://ppa.linuxfactory.or.kr/images/pe ... odroidhc4/

peppoonline
Posts: 36
Joined: Fri Nov 13, 2020 5:48 pm
languages_spoken: english
ODROIDs: HC4
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by peppoonline »

Ahhh okay...since I didn't find it in the odroid WIKI, I assumed I have to take the N2 ones :)
Thanks for clarification :)

Sav
Posts: 226
Joined: Mon Sep 02, 2019 2:33 am
languages_spoken: english
ODROIDs: odroid-n2
Has thanked: 59 times
Been thanked: 22 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Sav »

tobetter wrote:
Wed Nov 11, 2020 3:02 am
Sav wrote:
Tue Nov 10, 2020 4:44 pm
Hi folks.
After a very long time I was able to update my n2.
I switched from ubuntu to arch (I became addicted to the "rolling release" idea) and installed the latest gnome image from jgmedv, with panfrost drivers.
I have now android on emmc and linux on sd card, with the latest petitboot.
After Petitboot, are you able to see that Linux (Arch) boots properly but the video output does not work?
Can you share the brand/model of your display and share the output cat /proc/cmdline?
TV is LG 47LW650G and the output of /proc/cmdline (booting with the switch on mmc) is

Code: Select all

root=/dev/mmcblk1p2 rootwait rw mitigations=off console=ttyAML0,115200n8 console=tty1  logo=osd0,loaded no_console_suspend fsck.repair=yes net.ifnames=0 cma=800M clk_ignore_unused video=HDMI-A-1:1920x1080@60

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

Sav wrote:
Sat Nov 14, 2020 10:06 pm
tobetter wrote:
Wed Nov 11, 2020 3:02 am
Sav wrote:
Tue Nov 10, 2020 4:44 pm
Hi folks.
After a very long time I was able to update my n2.
I switched from ubuntu to arch (I became addicted to the "rolling release" idea) and installed the latest gnome image from jgmedv, with panfrost drivers.
I have now android on emmc and linux on sd card, with the latest petitboot.
After Petitboot, are you able to see that Linux (Arch) boots properly but the video output does not work?
Can you share the brand/model of your display and share the output cat /proc/cmdline?
TV is LG 47LW650G and the output of /proc/cmdline (booting with the switch on mmc) is

Code: Select all

root=/dev/mmcblk1p2 rootwait rw mitigations=off console=ttyAML0,115200n8 console=tty1  logo=osd0,loaded no_console_suspend fsck.repair=yes net.ifnames=0 cma=800M clk_ignore_unused video=HDMI-A-1:1920x1080@60
Can you try without video=HDMI-A-1:1920x1080@60?

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

20201112

Update version from 20201112 is uploaded. The firmware can be updated in the Petitboot itself by running the command 'pb-update', or you can download firmware file from spiboot-20201112.img and copy it to your SD card as spiboot.img.

What's improved:
  • Petitboot display issue with DVI display device is been improved.
  • Display resolution for the Petitboot menu is limited up to 1024x768. This will help to read the screen with a high resolution display device.
Note:
If you do not have any issue to display Petitboot menu with your display device, please stay with the version 20201020.
These users thanked the author tobetter for the post:
jonathon (Mon Nov 16, 2020 12:22 am)

Sav
Posts: 226
Joined: Mon Sep 02, 2019 2:33 am
languages_spoken: english
ODROIDs: odroid-n2
Has thanked: 59 times
Been thanked: 22 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Sav »

tobetter wrote:
Sun Nov 15, 2020 12:16 pm
Sav wrote:
Sat Nov 14, 2020 10:06 pm
tobetter wrote:
Wed Nov 11, 2020 3:02 am
Sav wrote:
Tue Nov 10, 2020 4:44 pm
Hi folks.
After a very long time I was able to update my n2.
I switched from ubuntu to arch (I became addicted to the "rolling release" idea) and installed the latest gnome image from jgmedv, with panfrost drivers.
I have now android on emmc and linux on sd card, with the latest petitboot.
After Petitboot, are you able to see that Linux (Arch) boots properly but the video output does not work?
Can you share the brand/model of your display and share the output cat /proc/cmdline?
TV is LG 47LW650G and the output of /proc/cmdline (booting with the switch on mmc) is

Code: Select all

root=/dev/mmcblk1p2 rootwait rw mitigations=off console=ttyAML0,115200n8 console=tty1  logo=osd0,loaded no_console_suspend fsck.repair=yes net.ifnames=0 cma=800M clk_ignore_unused video=HDMI-A-1:1920x1080@60
Can you try without video=HDMI-A-1:1920x1080@60?
Nothing changed. I don't think it boots completely, because I see the blue led blinking but the Ethernet isn't working, so I can't log via ssh.

jonathon
Posts: 68
Joined: Fri Oct 30, 2020 4:40 am
languages_spoken: English
ODROIDs: N2+
Has thanked: 24 times
Been thanked: 17 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by jonathon »

tobetter wrote:
Sun Nov 15, 2020 2:39 pm
Update version from 20201112 is uploaded.
Just wondering whether you've thought about compressing the recovery images for download? The 50MB image only contains ~8MB of data so will compress down significantly:

Code: Select all

  52M Nov 13 01:16 spiupdate_odroidn2_20201112.img
  15M Nov 13 01:16 spiupdate_odroidn2_20201112.img.bz2
  15M Nov 13 01:16 spiupdate_odroidn2_20201112.img.gz
  15M Nov 15 15:30 spiupdate_odroidn2_20201112.img.zip
 7.3M Nov 13 01:16 spiupdate_odroidn2_20201112.img.zst
 7.2M Nov 13 01:16 spiupdate_odroidn2_20201112.img.xz
--
N2+ 4GB - Arch Linux ARM - MATE - Xorg - Kernel 5.9 - Desktop use
<sangy>,"jonathon: big fan, happy to see you back"

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

jonathon wrote:
Mon Nov 16, 2020 12:32 am
tobetter wrote:
Sun Nov 15, 2020 2:39 pm
Update version from 20201112 is uploaded.
Just wondering whether you've thought about compressing the recovery images for download? The 50MB image only contains ~8MB of data so will compress down significantly:

Code: Select all

  52M Nov 13 01:16 spiupdate_odroidn2_20201112.img
  15M Nov 13 01:16 spiupdate_odroidn2_20201112.img.bz2
  15M Nov 13 01:16 spiupdate_odroidn2_20201112.img.gz
  15M Nov 15 15:30 spiupdate_odroidn2_20201112.img.zip
 7.3M Nov 13 01:16 spiupdate_odroidn2_20201112.img.zst
 7.2M Nov 13 01:16 spiupdate_odroidn2_20201112.img.xz
Obviously I know it redeuces the size, just being like that since day 1 for no reason. :lol:
These users thanked the author tobetter for the post:
jonathon (Mon Nov 16, 2020 1:14 am)

Psiborg
Posts: 12
Joined: Fri Nov 06, 2020 1:18 am
languages_spoken: english
ODROIDs: N2+ 4GB
Has thanked: 2 times
Been thanked: 6 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Psiborg »

I forgot to answer on the new Petitboot, sorry. Yes, it does work now on old VGA/DVI monitors with adapters. Shimmers just a bit but that does not matter, works!! Thank you!

Joe_90
Posts: 26
Joined: Tue Aug 11, 2020 1:24 am
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Joe_90 »

I have been testing some N2 images (on uSD card) on the new kernel from Libreelec on my N2+. Most things working but to ensure my petitboot was current I ran pb-update and downloaded the last update 20201112. I noticed afterwards that the petitboot menu on my TV screen was much larger than usual (lower resolution) and I couldn't see the left hand side of the data. I also noticed that my N2 Libreelec uSD cards were no longer booting for some reason. This is with the eMMC card removed (this contains Coreelec). I though maybe that the petitboot update had messed things up so I downloaded the last 20200816 update (which was built for N2+) and ran the update. Afterwards petitboot would no longer boot - just the HardKernel logo. I downloaded the recovery image and burned the image onto uSD card using the create bootable USB disk on my main PC which runs linux mint. When I put the uSD (with eMMC removed) into the N2+ and powered up the device would not boot from uSD, so I can't recover SPI. Is it possible that the last update has somehow disabled the uSD boot?

Further update - the uSD socket is actually working as I can see the recovery image uSD files when I boot Coreelec from eMMC. To eliminate my desktop PC as a possible source of the problem, I downloaded Etcher on my Win10 laptop and burned the recovery image there. Still won't boot from it on the N2+ when I remove the eMMC.
Last edited by Joe_90 on Wed Nov 25, 2020 12:06 am, edited 1 time in total.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

Joe_90 wrote:
Tue Nov 24, 2020 11:19 pm
I have been testing some N2 images (on uSD card) on the new kernel from Libreelec on my N2+. Most things working but to ensure my petitboot was current I ran pb-update and downloaded the last update 20201112. I noticed afterwards that the petitboot menu on my TV screen was much larger than usual (lower resolution) and I couldn't see the left hand side of the data. I also noticed that my N2 Libreelec uSD cards were no longer booting for some reason. This is with the eMMC card removed (this contains Coreelec). I though maybe that the petitboot update had messed things up so I downloaded the last 20200816 update (which was built for N2+) and ran the update. Afetrwards petitboot would no longer boot - just the HardKernel logo. I downloaded the recovery image and burned the image onto uSD card using the create bootable USB disk on my main PC which runs linux mint. When I put the uSD (with eMMC removed) into the N2+ and powered up the device would not boot from uSD, so I can't recover SPI. Is it possible that the last update has somehow disabled the uSD boot?
Did you flip the boot select switch to "MMC" and reattach the DC adapter?
Does the LibreELEC boot with the previous Petiboot version and it does not boot after the Petitboot is updated? Can you let me know the exact image file name of the LibreELEC image?

Joe_90
Posts: 26
Joined: Tue Aug 11, 2020 1:24 am
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Joe_90 »

tobetter wrote:
Tue Nov 24, 2020 11:44 pm

Did you flip the boot select switch to "MMC" and reattach the DC adapter?
Does the LibreELEC boot with the previous Petiboot version and it does not boot after the Petitboot is updated? Can you let me know the exact image file name of the LibreELEC image?
Yes, I had flipped the select switch to MMC and removed the eMMC card and re-attached the DC adapter. See my edit on my original post to eliminate my desktop PC as an issue when burning the uSD card. I used Etcher on Win 10 and still nothing. The actual uSD slot is working on the N2+ as I can see files on cards.
The LibreELEC did boot with the previous Petitboot (which was 20200816), but won't now. Petitboot shouldn't really be relevant as I'm trying to boot with the switch in the eMMC position, so it's not involved.

Joe_90
Posts: 26
Joined: Tue Aug 11, 2020 1:24 am
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Joe_90 »

The actual filename of the image which booted was LibreELEC-AMLGX.arm-9.80.7-odroid-n2.img.gz

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

Joe_90 wrote:
Wed Nov 25, 2020 12:14 am
The actual filename of the image which booted was LibreELEC-AMLGX.arm-9.80.7-odroid-n2.img.gz
Where can I download this file from? Not able to find the link from libreelec.tv.

Joe_90
Posts: 26
Joined: Tue Aug 11, 2020 1:24 am
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Joe_90 »


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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

Joe_90 wrote:
Wed Nov 25, 2020 12:27 am
Here - https://chewitt.libreelec.tv/testing/9.80/
Thanks, let me test the image on uSD and CoreELEC on eMMC with the latest Petitboot.

EDIT: I don't think LibreELEC image didn't boot by the Petitboot since the image does not 'boot.ini' or 'boot.scr' in VFAT partition, instead it has 'extlinux.conf' which is not supported format and never been supported. Probably their image from SD or eMMC without the Petitboot would boot if they use upstream U-boot.

Code: Select all

drwxr-xr-x 3 root     root         16384 Jan  1  1970 .
drwxr-xr-x 3 tobetter tobetter      4096 Nov 25 00:39 ..
-rwxr-xr-x 1 root     root      11183703 Nov 15 11:49 KERNEL
-rwxr-xr-x 1 root     root            48 Nov 15 11:49 KERNEL.md5
-rwxr-xr-x 1 root     root     100691968 Nov 15 11:49 SYSTEM
-rwxr-xr-x 1 root     root            48 Nov 15 11:49 SYSTEM.md5
drwxr-xr-x 2 root     root          8192 Nov 15 11:49 extlinux
-rwxr-xr-x 1 root     root         51891 Nov 15 11:49 meson-g12b-odroid-n2-plus.dtb
-rwxr-xr-x 1 root     root         51759 Nov 15 11:49 meson-g12b-odroid-n2.dtb
$ ls extlinux/
extlinux.conf
$ cat extlinux/extlinux.conf 
LABEL LibreELEC
  LINUX /KERNEL
  FDT /meson-g12b-odroid-n2.dtb
  APPEND boot=LABEL=LIBREELEC disk=LABEL=STORAGE quiet systemd.debug_shell=ttyAML0 console=ttyAML0,115200n8 console=tty0
These users thanked the author tobetter for the post:
Joe_90 (Wed Nov 25, 2020 12:42 am)

Joe_90
Posts: 26
Joined: Tue Aug 11, 2020 1:24 am
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Joe_90 »

Ok - thanks. I don't think that the uSD will boot unless you remove the eMMC with CoreELEC on it. I had to remove the eMMC to get the uSD to boot when I was testing first. There is also an n2 image from balbes150 on - https://yadi.sk/d/8vNYuuxynz1L0w/20201120 which is what I was trying to test just after I had run pb-update. That doesn't boot either.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

Joe_90 wrote:
Wed Nov 25, 2020 12:42 am
Ok - thanks. I don't think that the uSD will boot unless you remove the eMMC with CoreELEC on it. I had to remove the eMMC to get the uSD to boot when I was testing first. There is also an n2 image from balbes150 on - https://yadi.sk/d/8vNYuuxynz1L0w/20201120 which is what I was trying to test just after I had run pb-update. That doesn't boot either.
I've edited my previous post, please check. Please note, I didn't attach eMMC with CoreELEC yet when testing the LibreELEC on SD, still it didn't boot from the Petitboot.

Joe_90
Posts: 26
Joined: Tue Aug 11, 2020 1:24 am
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Joe_90 »

I wasn't actually trying to boot any of the uSD images from within Petitboot. I had the switch pointing to MMC and removed the actual eMMC and it booted. I don't know what you mean by "upstream U-boot".
This doesn't solve the problem whereby the recovery SPI image won't boot either? That presumably is a standalone build which doesn't depend on anything else?

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

Joe_90 wrote:
Wed Nov 25, 2020 12:54 am
I wasn't actually trying to boot any of the uSD images from within Petitboot. I had the switch pointing to MMC and removed the actual eMMC and it booted. I don't know what you mean by "upstream U-boot".
This doesn't solve the problem whereby the recovery SPI image won't boot either? That presumably is a standalone build which doesn't depend on anything else?
Obviously, the recovery SPI image must boot from uSD when the boot select switch is at MMC and DC power adapter is physically reattached. eMMC also has to be removed for sure. Which image did you plash to your SD card?

Does this "I wasn't actually trying to boot any of the uSD images from within Petitboot. I had the switch pointing to MMC and removed the actual eMMC and it booted." mean you have booted LibreELEC 9.80 image? And have you tried to boot any version of LibreELEC from the Petitboot?

Joe_90
Posts: 26
Joined: Tue Aug 11, 2020 1:24 am
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Joe_90 »

I booted the Libreelec 9.80 image yesterday. I had no eMMC card in the N2 and the selector switch was pointing to MMC. I was able to run Kodi and access my NAS etc. Afterwards I updated Petitboot from the command line (for no reason other than to have the latest version). After that I had the issue with different resolution on Petitboot menu. Also. uSD card would not boot afterwards with switch set to MMC.
Now, N2 will boot from eMMC card with CoreELEC. But won't boot SPI recovery image (spiupdate_odroidn2_20200816.img) or either of the LibreELEC images from uSD with the switch pointing to MMC and the eMMC card removed.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

Joe_90 wrote:
Wed Nov 25, 2020 1:09 am
I booted the Libreelec 9.80 image yesterday. I had no eMMC card in the N2 and the selector switch was pointing to MMC. I was able to run Kodi and access my NAS etc. Afterwards I updated Petitboot from the command line (for no reason other than to have the latest version). After that I had the issue with different resolution on Petitboot menu. Also. uSD card would not boot afterwards with switch set to MMC.
Now, N2 will boot from eMMC card with CoreELEC. But won't boot SPI recovery image (spiupdate_odroidn2_20200816.img) or either of the LibreELEC images from uSD with the switch pointing to MMC and the eMMC card removed.
If SPIUPDATE image and LibreELEC does not boot from uSD, I suspect your uSD might by faulty. Please check the blue LED if it turns on or flash the CoreELEC to uSD and see if it boots. And for the version of the Petitboot, you can flash any of Petitboot image after 20200816 if you like to test LibreELEC images from the two links you shared. Let me explain this after we figure out your SPI flash memory.

By any chance, do you have USB-to-Serial USB cable? If so, can you please capture the serial logs from your N2 when booting from uSD after removing eMMC?

Do you test with ODROID-N2 or ODROID-N2Plus or both?

Joe_90
Posts: 26
Joined: Tue Aug 11, 2020 1:24 am
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Joe_90 »

tobetter wrote:
Wed Nov 25, 2020 1:25 am

If SPIUPDATE image does and LibreELEC does not boot from uSD, I suspect your uSD defects. Please check the blue LED if it turns on or flash the CoreELEC to uSD and see if it boots. And for the version of the Petitboot, you can flash any of Petitboot image after 20200816 if you like to test LibreELEC images from the two links you shared. Let me explain this after we figure out your SPI flash memory.

By any chance, do you have USB-to-Serial USB cable? If so, can you please capture the serial logs from your N2 when booting from uSD after removing eMMC?

Do you test with ODROID-N2 or ODROID-N2Plus or both?
I don't have the serial cable to USB adapter (I presume you mean the 4 pin header on the board?).
The SPIUPDATE image does NOT boot.
I tested with ODROID-N2Plus only.

EDIT - correction - when I boot with switch in MMC position and no eMMC card installed, but uSD card installed I get a red LED, followed by blue LED and the HARDKERNEL logo appears on tv screen.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

Joe_90 wrote:
Wed Nov 25, 2020 1:37 am
tobetter wrote:
Wed Nov 25, 2020 1:25 am

If SPIUPDATE image does and LibreELEC does not boot from uSD, I suspect your uSD defects. Please check the blue LED if it turns on or flash the CoreELEC to uSD and see if it boots. And for the version of the Petitboot, you can flash any of Petitboot image after 20200816 if you like to test LibreELEC images from the two links you shared. Let me explain this after we figure out your SPI flash memory.

By any chance, do you have USB-to-Serial USB cable? If so, can you please capture the serial logs from your N2 when booting from uSD after removing eMMC?

Do you test with ODROID-N2 or ODROID-N2Plus or both?
I don't have the serial cable to USB adapter (I presume you mean the 4 pin header on the board?).
Yes....but...OK...hmmm....
The SPIUPDATE image does NOT boot. I don't see any blue LED when the N2+ is powered up without eMMC installed.
I tested with ODROID-N2Plus only.
If the blue LED does not appear on the board, 1) uSD is not flashed correctly, maybe the boot loader does not loaded but uSD would not faulty since you have checked already. 2) 3.3V power rail is faulty, please check the 3.3V at pin #1 with DMM on the GPIO pin header.
https://wiki.odroid.com/_detail/odroid- ... connectors

Have you tried other SD card as well to flash SPIUPDATE image?

I've tested the images from LibreELEC, I am sure the image from balbes150 won't boot from your N2Plus with continuous reset on boot loader. It boots from N2 only. I haven't tested with 9.80.7, I suspect it will be same since as I said they use the upstream U-boot 2020.10 which is not from Hardkernel.

Also I have no idea which version of LibreELEC had booted on ODROID-N2/Plus so far, have not been requested or heard it had booted with the Petitboot. Anyway the both images won't boot by any version of the Petitboot since they have unsupported boot script never been supported by the Petitboot, maybe previous LibreELEC version had booted but don't know which version.

Joe_90
Posts: 26
Joined: Tue Aug 11, 2020 1:24 am
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Joe_90 »

Ok - have read your last post. Just to correct that I edited my post to say that the blue LED was lit on the SPIUPDATE image, but it would not boot.

However!!! - I flashed a CoreELEC 9.2.5 image to the same uSD card and it boots!

I only tested the LibreELEC images because @chewitt said his N2 and N2+ were working. It was his image (9.80) which I flashed and booted successfully yesterday, but now it won't boot.

Now that I have established that the N2+ will boot from uSD CoreELEC, I need to find some way to restore the broken Petitboot presumably? I will try the 20201020 image. Maybe i have a bunch of faulty uSD cards?


UPDATE - I flashed an old 4GB uSD card with the 20201020 recovery image and it booted and flashed the SPI. I'm now back to correctly sized menu on-screen!

Thanks for all the help!!! I think I'll leave LibreELEC images alone for the time being!

I am having a few issues with CoreELEC on the 4.9 kernel, though. I have a lot of high res music including SACD which Kodi is playing back at too high a resolution (384kHz) instead of the 192kHz which was the usual in older kernels. My amplifier is limited to 32kHz - 192kHz. I'll chase it up with the CoreELEC team.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

Joe_90 wrote:
Wed Nov 25, 2020 2:12 am
Ok - have read your last post. Just to correct that I edited my post to say that the blue LED was lit on the SPIUPDATE image, but it would not boot.

However!!! - I flashed a CoreELEC 9.2.5 image to the same uSD card and it boots!
This is good since at least your SD hardware is not faulty.
I only tested the LibreELEC images because @chewitt said his N2 and N2+ were working. It was his image (9.80) which I flashed and booted successfully yesterday, but now it won't boot.
Ok, I've not tested 9.80 as I said but again balbes150's image does not boot from N2Plus.
Now that I have established that the N2+ will boot from uSD CoreELEC, I need to find some way to restore the broken Petitboot presumably? I will try the 20201020 image. Maybe i have a bunch of faulty uSD cards?
Would be nice if you try a couple of uSD to flash SPI flash memory. The best image ever is, IMO, 20201112 but if you hesitate to use the version due to the resolution? No worries, as long as you can boot with it, the resolution can be fixed as your preference.

Joe_90
Posts: 26
Joined: Tue Aug 11, 2020 1:24 am
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Joe_90 »

You missed a couple of my edits!


UPDATE - I flashed an old 4GB uSD card with the 20201020 recovery image and it booted and flashed the SPI. I'm now back to correctly sized menu on-screen!

Thanks for all the help!!! I think I'll leave LibreELEC images alone for the time being!

I am having a few issues with CoreELEC on the 4.9 kernel, though. I have a lot of high res music including SACD which Kodi is playing back at too high a resolution (384kHz) instead of the 192kHz which was the usual in older kernels. My amplifier is limited to 32kHz - 192kHz. I'll chase it up with the CoreELEC team.

If I flash the 20201112 update, how do I change the resolution? I'm limited to an RF remote which has a tiny keyboard. Can I telnet/ssh in to the petitboot?

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

Joe_90 wrote:
Wed Nov 25, 2020 2:48 am
You missed a couple of my edits!


UPDATE - I flashed an old 4GB uSD card with the 20201020 recovery image and it booted and flashed the SPI. I'm now back to correctly sized menu on-screen!

Thanks for all the help!!! I think I'll leave LibreELEC images alone for the time being!
Ok, I was too hurry or you are very behind. :D
Anyway glad to know if SPI flash memory is back.
If I flash the 20201112 update, how do I change the resolution? I'm limited to an RF remote which has a tiny keyboard. Can I telnet/ssh in to the petitboot?
If you flash the 20201112 image, create a file petitboot.cfg with this in your uSD and boot from SPI flash memory. Then the Petitboot will read the file petitboot.cfg. I am assuming that you have 1920x1080 resolution and the previous Petitboot use the same resolution.

Code: Select all

hdmimode=1080p60hz
vga=1080p60hz
If this makes your display shows decent resolution your prefer, go fo "Exit to shell" and run these commands.

Code: Select all

fw_setenv hdmimode 1080p60hz
fw_setenv vga 1080p60hz
Once these command runs without an error, reboot after remove uSD so that 'petitboot.cfg' won't load again but use the config from SPI flash memory.
These users thanked the author tobetter for the post:
Joe_90 (Wed Nov 25, 2020 3:20 am)

Joe_90
Posts: 26
Joined: Tue Aug 11, 2020 1:24 am
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Joe_90 »

Excellent, thanks @tobetter

Joe_90
Posts: 26
Joined: Tue Aug 11, 2020 1:24 am
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Joe_90 »

Interesting. I updated using the 20201112 image and subsequently tried the petitboot.cfg as you suggested. This did not change the resolution on next boot. I also noticed that this image did not connect to my router (no IP address and no DHCP request shown in router log). Are you sure this image is built for the N2+? I've gone back to the 20201020 image.

jonathon
Posts: 68
Joined: Fri Oct 30, 2020 4:40 am
languages_spoken: English
ODROIDs: N2+
Has thanked: 24 times
Been thanked: 17 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by jonathon »

Joe_90 wrote:
Wed Nov 25, 2020 6:16 am
Are you sure this image is built for the N2+? I've gone back to the 20201020 image.
20201112 is working fine for me on my N2+.
--
N2+ 4GB - Arch Linux ARM - MATE - Xorg - Kernel 5.9 - Desktop use
<sangy>,"jonathon: big fan, happy to see you back"

Joe_90
Posts: 26
Joined: Tue Aug 11, 2020 1:24 am
languages_spoken: english
ODROIDs: Odroid N2+
Has thanked: 6 times
Been thanked: 2 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Joe_90 »

jonathon wrote:
Thu Nov 26, 2020 7:02 am
Joe_90 wrote:
Wed Nov 25, 2020 6:16 am
Are you sure this image is built for the N2+? I've gone back to the 20201020 image.
20201112 is working fine for me on my N2+.
It's very odd. When I update to this version, the menu on screen changes resolution such that it doesn't fit. I can't see left hand edge of menu, nor the bottom, so I can't see what I'm typing if I exit to shell. It also won't connect to my router even though the MAC looks to be the same in both versions. My router log shows no attempt at a connection even though the N2+ is hard wired.

Vezir
Posts: 1
Joined: Mon Nov 30, 2020 6:58 am
languages_spoken: english
ODROIDs: Odroid XU4, Odroid N2, Odroid Go-Advance
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Vezir »

Hello All,

now that I have an eMMC card for my N2, I'd like set up the board to use multi boot with CoreElec 9.2.5 on the eMMC and Ubuntu on the SD Card.
I have managed to write CoreElec to the eMMC and flash the SD card with Ubuntu.

Now I can boot CoreElec from eMMC when no SD card presents and the switch is set to eMMC. However, if I insert the SD card, CoreElec fails to boot and Ubuntu starts from the SD card.
If I set the switch to SPI mode, only the SD card is recognised, so I can only boot Ubuntu. I have the latest Petiboot installed.

I would appreciate any help to figure out what went wrong.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

Vezir wrote:
Mon Nov 30, 2020 7:11 am
Hello All,

now that I have an eMMC card for my N2, I'd like set up the board to use multi boot with CoreElec 9.2.5 on the eMMC and Ubuntu on the SD Card.
I have managed to write CoreElec to the eMMC and flash the SD card with Ubuntu.

Now I can boot CoreElec from eMMC when no SD card presents and the switch is set to eMMC. However, if I insert the SD card, CoreElec fails to boot and Ubuntu starts from the SD card.
If I set the switch to SPI mode, only the SD card is recognised, so I can only boot Ubuntu. I have the latest Petiboot installed.

I would appreciate any help to figure out what went wrong.
Can you try Hardkernel stock Android with eMMC if it boots with the Petitboot when SD card with Ubuntu is attached? I need to test CoreELEC 9.2.5 whether boot file is changed or not.

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest