Petitboot, yet another bootloader based on KEXEC

Post Reply
FrankElectron
Posts: 16
Joined: Sun Oct 04, 2020 6:14 pm
languages_spoken: english german
ODROIDs: C2 HC1 N2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by FrankElectron »

tobetter wrote:
Mon Dec 28, 2020 11:47 pm
FrankElectron wrote:
Mon Dec 28, 2020 11:31 pm
@tobetter Thank you. It is the default Kernel from Void Linux i installed. No CustomBuild.
After installing the Kernel there is a config5.9.16_1:
https://pastebin.com/zmeim46d
I suspect this config for MMC driver, they are set as modules so cannot be loaded before the root file system is mounted unless your initramfs has the driver. I think you have to check if it contains the drivers and loaded on booting.

Code: Select all

CONFIG_MMC_DW=m
CONFIG_MMC_DW_PLTFM=m
I extracted the initramfs with /usr/lib/dracut/skipcpio initramfs-5.9.16_1.img | zcat | cpio -ivd and find this
Image

Should it work? How can i check if the driver is loaded on booting?

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

FrankElectron wrote:
Tue Dec 29, 2020 2:43 am
tobetter wrote:
Mon Dec 28, 2020 11:47 pm
FrankElectron wrote:
Mon Dec 28, 2020 11:31 pm
@tobetter Thank you. It is the default Kernel from Void Linux i installed. No CustomBuild.
After installing the Kernel there is a config5.9.16_1:
https://pastebin.com/zmeim46d
I suspect this config for MMC driver, they are set as modules so cannot be loaded before the root file system is mounted unless your initramfs has the driver. I think you have to check if it contains the drivers and loaded on booting.

Code: Select all

CONFIG_MMC_DW=m
CONFIG_MMC_DW_PLTFM=m
I extracted the initramfs with /usr/lib/dracut/skipcpio initramfs-5.9.16_1.img | zcat | cpio -ivd and find this
Image

Should it work? How can i check if the driver is loaded on booting?
Can you share the file, your initramfs, or would you let me know the link of...Void Linux image?
Is there any intention to use kboot.conf instead of boot.ini/boot.scr?

FrankElectron
Posts: 16
Joined: Sun Oct 04, 2020 6:14 pm
languages_spoken: english german
ODROIDs: C2 HC1 N2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by FrankElectron »

@tobetter there is no prebuild Image for N2, i build by my self like this

viewtopic.php?f=179&t=37873

then i installed the kernel and delet the ArchLinux stuff in /boot minus the dtb of course.
I wrote a Kboot.conf and that it's.

Edit: wait, i have a Dropbpx somewhere

FrankElectron
Posts: 16
Joined: Sun Oct 04, 2020 6:14 pm
languages_spoken: english german
ODROIDs: C2 HC1 N2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by FrankElectron »


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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

FrankElectron wrote:
Tue Dec 29, 2020 3:08 am
@tobetter here is the initramfs
https://www.dropbox.com/s/sd6apzf4mbh9z ... 1.img?dl=0
I've looked into the ramdisk and can find the mmc driver, so it should be fine to boot. Are you able to boot the image without the Petitboot?

FrankElectron
Posts: 16
Joined: Sun Oct 04, 2020 6:14 pm
languages_spoken: english german
ODROIDs: C2 HC1 N2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by FrankElectron »

tobetter wrote:
Tue Dec 29, 2020 10:19 am
FrankElectron wrote:
Tue Dec 29, 2020 3:08 am
@tobetter here is the initramfs
https://www.dropbox.com/s/sd6apzf4mbh9z ... 1.img?dl=0
I've looked into the ramdisk and can find the mmc driver, so it should be fine to boot. Are you able to boot the image without the Petitboot?
I don't know how. Can U-boot boot a vmlinux? If yes, how can i get the loadaddress?
Here is the kernel:
https://www.dropbox.com/s/k75fjjgjr8846 ... .16_1?dl=0

And the rootfs i use you find here
https://alpha.de.repo.voidlinux.org/liv ... 109.tar.xz

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

FrankElectron wrote:
Tue Dec 29, 2020 7:21 pm
tobetter wrote:
Tue Dec 29, 2020 10:19 am
FrankElectron wrote:
Tue Dec 29, 2020 3:08 am
@tobetter here is the initramfs
https://www.dropbox.com/s/sd6apzf4mbh9z ... 1.img?dl=0
I've looked into the ramdisk and can find the mmc driver, so it should be fine to boot. Are you able to boot the image without the Petitboot?
I don't know how. Can U-boot boot a vmlinux? If yes, how can i get the loadaddress?
Here is the kernel:
https://www.dropbox.com/s/k75fjjgjr8846 ... .16_1?dl=0

And the rootfs i use you find here
https://alpha.de.repo.voidlinux.org/liv ... 109.tar.xz
So you mean that Linux kerne have not booted from N2 yet? Then can we start over in your thread regarding to VOID Linux? Let me download the files from the links and see if I can find out any clue why it does not boot or can make it boot up. It could take some time...

FrankElectron
Posts: 16
Joined: Sun Oct 04, 2020 6:14 pm
languages_spoken: english german
ODROIDs: C2 HC1 N2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by FrankElectron »

@tobetter
So you mean that Linux kerne have not booted from N2 yet?
Yes
Then can we start over in your thread regarding to VOID Linux?
Yes
Let me download the files from the links and see if I can find out any clue why it does not boot or can make it boot up. It could take some time...
Thats great. Thank you.

shogsbro
Posts: 1
Joined: Wed Dec 30, 2020 6:54 am
languages_spoken: english
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by shogsbro »

@tobetter,

I was on 20201020 and updated to 20201222 to see whether this would fix an Ethernet issue I've experienced with latest Armbian (Ubuntu) kernel on my N2 (5.9.14-meson64 #20.11.3), and likewise found that after a pb-update (and reboot), PB no longer sees my eMMC system (Armbian Ubuntu). My eMMC is 28.9GB formatted capacity.

If I flick the SPI switch to eMMC, Armbian Ubuntu boots without any issues.

I used 20201020 PB recovery image to return SPI image to that version, and again see my eMMC in the PB discovery log. I however cannot boot the system from PB, and guess from your recent comments here that this is related to upstream changes. Since /boot/.next exists, /boot/boot.ini invokes bootm for mainline kernel.

For the record, the Ethernet issue I experienced manifests itself as network transmit issues, meaning DHCP request is never sent. After disabling EEE ("ethtool --set-eee eth0 eee off") network transmit again works (without a coldboot).

karlshea
Posts: 3
Joined: Thu Aug 27, 2020 7:27 am
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by karlshea »

Hello, how can I completely disable all CEC functionality? The odroid is making ARC non-functional with my TV unless I unplug/plug all the HDMI cables when the TV is turned on, and when it's unplugged everything works fine.

liminalsunset
Posts: 8
Joined: Tue Dec 22, 2020 9:18 am
languages_spoken: english
ODROIDs: HC4
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by liminalsunset »

tobetter wrote:
Sun Dec 27, 2020 4:38 pm
liminalsunset wrote:
Sun Dec 27, 2020 3:36 pm
Hi

Just wondering if the support for the pxeboot.cfg is part of the 20201222 update. I did notice that since the last two updates, the HDMI needs to be reconnected after Petitboot start to get any display output. I am using HDMI to VGA adapter, so maybe this is the problem. The display is working fine in the OS though.


Thanks!
Does your display wok ever with the previous Petitboot?
Are you asking about 'pxeboot.cfg' or 'petitboot.cfg'?
The display works perfectly with the version that was shipped. I was referring to the cfg file that would allow the device to internet boot from a particular server, as if it received the config from dhcp.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

liminalsunset wrote:
Thu Dec 31, 2020 9:10 am
tobetter wrote:
Sun Dec 27, 2020 4:38 pm
liminalsunset wrote:
Sun Dec 27, 2020 3:36 pm
Hi

Just wondering if the support for the pxeboot.cfg is part of the 20201222 update. I did notice that since the last two updates, the HDMI needs to be reconnected after Petitboot start to get any display output. I am using HDMI to VGA adapter, so maybe this is the problem. The display is working fine in the OS though.


Thanks!
Does your display wok ever with the previous Petitboot?
Are you asking about 'pxeboot.cfg' or 'petitboot.cfg'?
The display works perfectly with the version that was shipped. I was referring to the cfg file that would allow the device to internet boot from a particular server, as if it received the config from dhcp.
For the network boot if you are willing to set up to load boot files, Linux kernel/DTB/initramfs, you must setup FTP/HTTP server and need an local DHCP server to provide PXE boot. Or your have to create kboot.conf for your boot files.

pxeboot.cfg is the file in your server provide boot files, Petitboot provide the Debian/Ubuntu Netboot Installer using the configurations from here.
http://ppa.linuxfactory.or.kr/installer/pxeboot/arm64/
petitboot.cfg is the file to twerak the Petitboot if necessary.

liminalsunset
Posts: 8
Joined: Tue Dec 22, 2020 9:18 am
languages_spoken: english
ODROIDs: HC4
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by liminalsunset »

So the way I understand this is:

1) If I would like to network boot, simply provide a pxeboot.cfg using DHCP
2) If I would like to point Petitboot to a custom netboot http or ftp target without DHCP, I should create a file petitboot.cfg with the desired target inside it on a SD card?

Thanks! (And happy New Year!)

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

liminalsunset wrote:
Fri Jan 01, 2021 4:01 pm
So the way I understand this is:

1) If I would like to network boot, simply provide a pxeboot.cfg using DHCP
2) If I would like to point Petitboot to a custom netboot http or ftp target without DHCP, I should create a file petitboot.cfg with the desired target inside it on a SD card?

Thanks! (And happy New Year!)
Small correction for 2, you have to provide kboot.cfg and store it to any formatted SD card.

mxmilkb
Posts: 65
Joined: Fri Apr 26, 2019 9:28 am
languages_spoken: English
ODROIDs: N2
Has thanked: 23 times
Been thanked: 21 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by mxmilkb »

How about maybe some more colour in parts of the Petitboot console output? To make different lines easier to pick out, and jazz things up.

mad_ady
Posts: 9067
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: 596 times
Been thanked: 578 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by mad_ady »

mxmilkb wrote:How about maybe some more colour in parts of the Petitboot console output? To make different lines easier to pick out, and jazz things up.
The thing is petitboot comes from a different project (by IBM I think). Reworking the GUI will make it difficult to merge upstream changes. And anyway, It's a bootloader - you're not supposed to be there for longer than 10s.

One thing that *just* might work would be to add ANSI colors to boot labels. Hopefully the terminal will render them, though realistically it might mess up tables.
These users thanked the author mad_ady for the post:
istanbulls (Mon Jan 04, 2021 6:27 am)

User avatar
istanbulls
Posts: 446
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID; N2, C4, XU4, N2+, CH4
Location: Istanbul-Turkey
Has thanked: 278 times
Been thanked: 65 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by istanbulls »

mad_ady wrote:
Mon Jan 04, 2021 2:14 am
mxmilkb wrote:How about maybe some more colour in parts of the Petitboot console output? To make different lines easier to pick out, and jazz things up.
The thing is petitboot comes from a different project (by IBM I think). Reworking the GUI will make it difficult to merge upstream changes. And anyway, It's a bootloader - you're not supposed to be there for longer than 10s.

One thing that *just* might work would be to add ANSI colors to boot labels. Hopefully the terminal will render them, though realistically it might mess up tables.
I might break a few teeth to see it for 10-15 seconds at Petitboot. :D
For the SSD to be active, the min. I wait 30 seconds. This time for boot.scr to boot is sometimes doubled, or quadrupled.
I'm not interested in colors. Like coreelec, like Ubunutu-Mate, it's my dream to see it boot on the first try. :)

wallyz21
Posts: 204
Joined: Thu Apr 04, 2019 11:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 10 times
Been thanked: 19 times
Contact:

20201222 Not seeing any devices

Post by wallyz21 »

Performed a pb-update (to 20201222) and now petiboot doesn't see any device or show any netboot menu if the command

pb-event url@/net/eth0 url=http://ppa.linuxfactory.or.kr/installer ... N2/default

is performed from the shell.

The asterisks which is normal beside a device is on a blank line!
Walter Zambotti
N2 - Ubuntu Mate Desktop

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

Re: 20201222 Not seeing any devices

Post by tobetter »

wallyz21 wrote:
Tue Jan 05, 2021 4:43 pm
Performed a pb-update (to 20201222) and now petiboot doesn't see any device or show any netboot menu if the command

pb-event url@/net/eth0 url=http://ppa.linuxfactory.or.kr/installer ... N2/default

is performed from the shell.

The asterisks which is normal beside a device is on a blank line!
What kind of devices are connected to your N2?
What does this "The asterisks which is normal beside a device is on a blank line" mean?

wallyz21
Posts: 204
Joined: Thu Apr 04, 2019 11:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 10 times
Been thanked: 19 times
Contact:

Re: 20201222 Not seeing any devices

Post by wallyz21 »

tobetter wrote:
Tue Jan 05, 2021 4:45 pm

What kind of devices are connected to your N2?
What does this "The asterisks which is normal beside a device is on a blank line" mean?
An eMMC card.

I tried pluggin in a USB HDD and it recognized sda1.

So I guess it can't see the eMMC card and It can't see any netboot menu!

Under configuration it has the boot order set to:

1. Any network card
2. Any disk device
3. Any USB device

Where the list of bootable devices is normally shown at the top of the screen there is only a blank line (that I can select (using the asterisck))
Walter Zambotti
N2 - Ubuntu Mate Desktop

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

Re: 20201222 Not seeing any devices

Post by tobetter »

wallyz21 wrote:
Tue Jan 05, 2021 10:21 pm
tobetter wrote:
Tue Jan 05, 2021 4:45 pm

What kind of devices are connected to your N2?
What does this "The asterisks which is normal beside a device is on a blank line" mean?
An eMMC card.

I tried pluggin in a USB HDD and it recognized sda1.

So I guess it can't see the eMMC card and It can't see any netboot menu!

Under configuration it has the boot order set to:

1. Any network card
2. Any disk device
3. Any USB device

Where the list of bootable devices is normally shown at the top of the screen there is only a blank line (that I can select (using the asterisck))
If you have an issue with eMMC, you shoud downgrade the version to 20201020, several users reported the same issue but not figured out yet.
http://ppa.linuxfactory.or.kr/images/pe ... /odroidn2/

Netboot menu issue is different, as long as your Petitboot has IP address and can ping to ppa.linuxfactory.or.kr, it will show you the menu after "netboot_default" command.

wallyz21
Posts: 204
Joined: Thu Apr 04, 2019 11:00 am
languages_spoken: english
ODROIDs: N2
Has thanked: 10 times
Been thanked: 19 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by wallyz21 »

Can I down grade to 20201020 using pb-update or will I have to down load the image and place it on a SD card now?
Walter Zambotti
N2 - Ubuntu Mate Desktop

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

wallyz21 wrote:
Tue Jan 05, 2021 10:42 pm
Can I down grade to 20201020 using pb-update or will I have to down load the image and place it on a SD card now?
You have to download the spiboot-* image and copy it as "spiboot.img" to SD card, then it will be updated on the next reboot.

User avatar
istanbulls
Posts: 446
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID; N2, C4, XU4, N2+, CH4
Location: Istanbul-Turkey
Has thanked: 278 times
Been thanked: 65 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by istanbulls »

I dream of installing android and coreelec with netboot-installer. Do I want so many things? :D

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

istanbulls wrote:
Tue Jan 05, 2021 11:49 pm
I dream of installing android and coreelec with netboot-installer. Do I want so many things? :D
Yes. :D

loredin
Posts: 38
Joined: Sat Dec 26, 2015 12:17 am
languages_spoken: english, french, german
ODROIDs: xu4;n2
Has thanked: 7 times
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by loredin »

Hello ,

I just bought a second hand N2, I tried to boot without nothing plugged (no USB, no emmc, no sd card) while the switch is set on SPI.
Nothing showed up on my sony 4K television (plugged via HDMI).

Then I downloaded the recovery image (http://ppa.linuxfactory.or.kr/images/pe ... 201020.img) that I flashed on a SD card using Etcher and I booted the N2 with switch on MMC, the diplay showed up (with some issues since the left side can not be read totally) and I saw some update happening. Then it did a reboot and the petitboot menu displayed (also with same display issue).
I then tried to switch off, set switch on SPI and switch on (with and also without SD card) but nothing shows up.
I also tried then to switch back to MMC (with SD card) and I see the menu here and tried a pb-update from there and reboot and same process as above but not successful.
I saw there was a pb-sos but no clue on how to access the file afterwards.
Is there something I am missing , any possibility to troubleshoot further ?

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

loredin wrote:
Wed Jan 06, 2021 7:56 pm
Hello ,

I just bought a second hand N2, I tried to boot without nothing plugged (no USB, no emmc, no sd card) while the switch is set on SPI.
Nothing showed up on my sony 4K television (plugged via HDMI).

Then I downloaded the recovery image (http://ppa.linuxfactory.or.kr/images/pe ... 201020.img) that I flashed on a SD card using Etcher and I booted the N2 with switch on MMC, the diplay showed up (with some issues since the left side can not be read totally) and I saw some update happening. Then it did a reboot and the petitboot menu displayed (also with same display issue).
I then tried to switch off, set switch on SPI and switch on (with and also without SD card) but nothing shows up.
I also tried then to switch back to MMC (with SD card) and I see the menu here and tried a pb-update from there and reboot and same process as above but not successful.
I saw there was a pb-sos but no clue on how to access the file afterwards.
Is there something I am missing , any possibility to troubleshoot further ?
Can you create a file "petitboot.cfg" in your SD card with following lines,

Code: Select all

hdmimode=1080p60hz
vga=1080p60hz
And boot from SPI flash memory? Place the boot select switch to SPI and replug DC adapter.

loredin
Posts: 38
Joined: Sat Dec 26, 2015 12:17 am
languages_spoken: english, french, german
ODROIDs: xu4;n2
Has thanked: 7 times
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by loredin »

tobetter wrote:
Wed Jan 06, 2021 8:01 pm
loredin wrote:
Wed Jan 06, 2021 7:56 pm
Hello ,

I just bought a second hand N2, I tried to boot without nothing plugged (no USB, no emmc, no sd card) while the switch is set on SPI.
Nothing showed up on my sony 4K television (plugged via HDMI).

Then I downloaded the recovery image (http://ppa.linuxfactory.or.kr/images/pe ... 201020.img) that I flashed on a SD card using Etcher and I booted the N2 with switch on MMC, the diplay showed up (with some issues since the left side can not be read totally) and I saw some update happening. Then it did a reboot and the petitboot menu displayed (also with same display issue).
I then tried to switch off, set switch on SPI and switch on (with and also without SD card) but nothing shows up.
I also tried then to switch back to MMC (with SD card) and I see the menu here and tried a pb-update from there and reboot and same process as above but not successful.
I saw there was a pb-sos but no clue on how to access the file afterwards.
Is there something I am missing , any possibility to troubleshoot further ?
Can you create a file "petitboot.cfg" in your SD card with following lines,

Code: Select all

hdmimode=1080p60hz
vga=1080p60hz
And boot from SPI flash memory? Place the boot select switch to SPI and replug DC adapter.
After creating the petitboot.cfg with the proposed lines (nothing else) , the N2 performed an update at boot on MMC with everything displayed correctly also after the reboot (petiboot menu from MMC). But when switching to SPI I get a black screen . Also not sure if it supposed to be on network but my N2 is not available in SPI mode (but this is the case when on MMC)

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

loredin wrote:
Wed Jan 06, 2021 10:03 pm
tobetter wrote:
Wed Jan 06, 2021 8:01 pm
loredin wrote:
Wed Jan 06, 2021 7:56 pm
Hello ,

I just bought a second hand N2, I tried to boot without nothing plugged (no USB, no emmc, no sd card) while the switch is set on SPI.
Nothing showed up on my sony 4K television (plugged via HDMI).

Then I downloaded the recovery image (http://ppa.linuxfactory.or.kr/images/pe ... 201020.img) that I flashed on a SD card using Etcher and I booted the N2 with switch on MMC, the diplay showed up (with some issues since the left side can not be read totally) and I saw some update happening. Then it did a reboot and the petitboot menu displayed (also with same display issue).
I then tried to switch off, set switch on SPI and switch on (with and also without SD card) but nothing shows up.
I also tried then to switch back to MMC (with SD card) and I see the menu here and tried a pb-update from there and reboot and same process as above but not successful.
I saw there was a pb-sos but no clue on how to access the file afterwards.
Is there something I am missing , any possibility to troubleshoot further ?
Can you create a file "petitboot.cfg" in your SD card with following lines,

Code: Select all

hdmimode=1080p60hz
vga=1080p60hz
And boot from SPI flash memory? Place the boot select switch to SPI and replug DC adapter.
After creating the petitboot.cfg with the proposed lines (nothing else) , the N2 performed an update at boot on MMC with everything displayed correctly also after the reboot (petiboot menu from MMC). But when switching to SPI I get a black screen . Also not sure if it supposed to be on network but my N2 is not available in SPI mode (but this is the case when on MMC)
Again, place the boot select to "SPI" and insert your SD card to N2, replug the DC adapter to boot. Let me know if it shows the Petitboot screen and what's the version of it. Also try "480p60hz" instead of "1080p60hz" to see if they shows different resolutions.

loredin
Posts: 38
Joined: Sat Dec 26, 2015 12:17 am
languages_spoken: english, french, german
ODROIDs: xu4;n2
Has thanked: 7 times
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by loredin »

tobetter wrote:
Wed Jan 06, 2021 10:17 pm
loredin wrote:
Wed Jan 06, 2021 10:03 pm
tobetter wrote:
Wed Jan 06, 2021 8:01 pm
loredin wrote:
Wed Jan 06, 2021 7:56 pm
Hello ,

I just bought a second hand N2, I tried to boot without nothing plugged (no USB, no emmc, no sd card) while the switch is set on SPI.
Nothing showed up on my sony 4K television (plugged via HDMI).

Then I downloaded the recovery image (http://ppa.linuxfactory.or.kr/images/pe ... 201020.img) that I flashed on a SD card using Etcher and I booted the N2 with switch on MMC, the diplay showed up (with some issues since the left side can not be read totally) and I saw some update happening. Then it did a reboot and the petitboot menu displayed (also with same display issue).
I then tried to switch off, set switch on SPI and switch on (with and also without SD card) but nothing shows up.
I also tried then to switch back to MMC (with SD card) and I see the menu here and tried a pb-update from there and reboot and same process as above but not successful.
I saw there was a pb-sos but no clue on how to access the file afterwards.
Is there something I am missing , any possibility to troubleshoot further ?
Can you create a file "petitboot.cfg" in your SD card with following lines,

Code: Select all

hdmimode=1080p60hz
vga=1080p60hz
And boot from SPI flash memory? Place the boot select switch to SPI and replug DC adapter.
After creating the petitboot.cfg with the proposed lines (nothing else) , the N2 performed an update at boot on MMC with everything displayed correctly also after the reboot (petiboot menu from MMC). But when switching to SPI I get a black screen . Also not sure if it supposed to be on network but my N2 is not available in SPI mode (but this is the case when on MMC)
Again, place the boot select to "SPI" and insert your SD card to N2, replug the DC adapter to boot. Let me know if it shows the Petitboot screen and what's the version of it. Also try "480p60hz" instead of "1080p60hz" to see if they shows different resolutions.
I already had also the SD card inside with SPI selected and reboot and nothing showed up, again retired and tried now with 480p60hz and no display when SPI is selected.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

loredin wrote:
Wed Jan 06, 2021 10:45 pm
Again, place the boot select to "SPI" and insert your SD card to N2, replug the DC adapter to boot. Let me know if it shows the Petitboot screen and what's the version of it. Also try "480p60hz" instead of "1080p60hz" to see if they shows different resolutions.
I already had also the SD card inside with SPI selected and reboot and nothing showed up, again retired and tried now with 480p60hz and no display when SPI is selected.
When "SPI" is selected but no screen, does the blue LED blinks? Can you try this in "petitboot.cfg" ? "[u-boot]" is added at the first line.

Code: Select all

[u-boot]
hdmimode=1080p60hz
vga=1080p60hz

loredin
Posts: 38
Joined: Sat Dec 26, 2015 12:17 am
languages_spoken: english, french, german
ODROIDs: xu4;n2
Has thanked: 7 times
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by loredin »

tobetter wrote:
Wed Jan 06, 2021 11:09 pm
loredin wrote:
Wed Jan 06, 2021 10:45 pm
Again, place the boot select to "SPI" and insert your SD card to N2, replug the DC adapter to boot. Let me know if it shows the Petitboot screen and what's the version of it. Also try "480p60hz" instead of "1080p60hz" to see if they shows different resolutions.
I already had also the SD card inside with SPI selected and reboot and nothing showed up, again retired and tried now with 480p60hz and no display when SPI is selected.
When "SPI" is selected but no screen, does the blue LED blinks? Can you try this in "petitboot.cfg" ? "[u-boot]" is added at the first line.

Code: Select all

[u-boot]
hdmimode=1080p60hz
vga=1080p60hz
I also tried with uboot in front, while in SPI the blue led is permanently on, only in MMC it is blinking blue.
I dont know if this is important but the sd card contains the recovery image (with modified petitboot.cfg as per your proposals) that I mentioned in my first post.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

loredin wrote:
Wed Jan 06, 2021 11:56 pm
tobetter wrote:
Wed Jan 06, 2021 11:09 pm
loredin wrote:
Wed Jan 06, 2021 10:45 pm
Again, place the boot select to "SPI" and insert your SD card to N2, replug the DC adapter to boot. Let me know if it shows the Petitboot screen and what's the version of it. Also try "480p60hz" instead of "1080p60hz" to see if they shows different resolutions.
I already had also the SD card inside with SPI selected and reboot and nothing showed up, again retired and tried now with 480p60hz and no display when SPI is selected.
When "SPI" is selected but no screen, does the blue LED blinks? Can you try this in "petitboot.cfg" ? "[u-boot]" is added at the first line.

Code: Select all

[u-boot]
hdmimode=1080p60hz
vga=1080p60hz
I also tried with uboot in front, while in SPI the blue led is permanently on, only in MMC it is blinking blue.
I dont know if this is important but the sd card contains the recovery image (with modified petitboot.cfg as per your proposals) that I mentioned in my first post.
If the blue LED is permanently on with SPI, the Petitboot is failed to start for some reason. You need to recover the SPI flash memory with another one, http://ppa.linuxfactory.or.kr/images/pe ... 200816.img.
Flash this image with Etcher to SD card and preceed to boot for updating. Regardless the screen, the blue LED must blink in SPI mode.
These users thanked the author tobetter for the post (total 2):
istanbulls (Thu Jan 07, 2021 12:07 am) • loredin (Mon Jan 11, 2021 5:50 am)

User avatar
istanbulls
Posts: 446
Joined: Tue May 14, 2019 10:18 pm
languages_spoken: Turkish
ODROIDs: ODROID; N2, C4, XU4, N2+, CH4
Location: Istanbul-Turkey
Has thanked: 278 times
Been thanked: 65 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by istanbulls »

I've had these issues on other non-Plus N2 device. Possibly Petitboot was not installed. I solved my problem with the 20201020 version. I recommend you to try it.
https://wiki.odroid.com/odroid-n2/os_im ... ev20201020
http://ppa.linuxfactory.or.kr/images/pe ... 201020.img

loredin
Posts: 38
Joined: Sat Dec 26, 2015 12:17 am
languages_spoken: english, french, german
ODROIDs: xu4;n2
Has thanked: 7 times
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by loredin »

As I mentionned I proceeded with the recovery with the 20201020 and now I tried also spiupdate_odroidn2_20200816 and LED is not blinking blue but permanent blue.
I had a few USBs plugged meanwhile and I also tried to remove everything but the power plug and also no blinking.
Is there a way to check the SPI chip content or to write something very basic to see if it is working at all ?
I guess that the recovery process would complain if for some reason the spi content could not be written ?

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

loredin wrote:
Thu Jan 07, 2021 1:59 am
As I mentionned I proceeded with the recovery with the 20201020 and now I tried also spiupdate_odroidn2_20200816 and LED is not blinking blue but permanent blue.
I had a few USBs plugged meanwhile and I also tried to remove everything but the power plug and also no blinking.
Is there a way to check the SPI chip content or to write something very basic to see if it is working at all ?
I guess that the recovery process would complain if for some reason the spi content could not be written ?
If recovery process is failed, you whould be able to see some error message while recovering. If you have not noticed any error on the screen, the flashing must be fine. What we can try is that with your SD card which can boot to the Petitboot in MMC mode, go for "Exit to shell" and run "ls /dev/mtd*". Then do erase all the partitions like flash_eraseall /dev/mtd0, if you run several times with /dev/mtd1, /dev/mtd2, and so on...this will completely erase the SPI flash memory. Once this is done, please try the recovery image with 20201020 or 20200816.

EDIT: by any chance, do you have USB-to-SERIAL debugging board?

loredin
Posts: 38
Joined: Sat Dec 26, 2015 12:17 am
languages_spoken: english, french, german
ODROIDs: xu4;n2
Has thanked: 7 times
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by loredin »

Hey tobetter , thx or the extra informations.
In the meantime I had it blinking with dev.20190408 but I had there a display issue, I then copied the upgrade image of the 20201020 to the sdcard and let the upgrade happen in SPI and it was finally able to reboot with proper display :)
I still had one case when no SD Card was present that no display was there, I could try erasing the mtds just to be sure if something similar happens in the future ...
Thx for the kind support (also to istanbullis), next callenge is multiboot (first with all OS on a 32GB emmc) !
Best Regards

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

loredin wrote:
Thu Jan 07, 2021 2:29 am
Hey tobetter , thx or the extra informations.
In the meantime I had it blinking with dev.20190408 but I had there a display issue, I then copied the upgrade image of the 20201020 to the sdcard and let the upgrade happen in SPI and it was finally able to reboot with proper display :)
I still had one case when no SD Card was present that no display was there, I could try erasing the mtds just to be sure if something similar happens in the future ...
Thx for the kind support (also to istanbullis), next callenge is multiboot (first with all OS on a 32GB emmc) !
Best Regards
So now...are you able to see the Petitboot screen with 1920x1080 resolution and have the petitboot.cfg in your SD card? If this is true, please follow the commands in the Petitboot.

Code: Select all

fw_setenv hdmimode 1080p60hz
fw_setenv vga 1080p60hz
Once you run such commands, you can check if the given value is correctly stored in the SPI flash memory like this and they must show 1080p60hz.

Code: Select all

fw_printenv hdmimode
fw_printenv vga
If everything looks ok, remove SD card and replug DC adapter in SPI mode.

loredin
Posts: 38
Joined: Sat Dec 26, 2015 12:17 am
languages_spoken: english, french, german
ODROIDs: xu4;n2
Has thanked: 7 times
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by loredin »

In the dev.20190408 that I flashed on SDCard I didnt have petitboot.cfg present at all nevertheless by using the update process to 20201020 (so while switch was on SPI) it managed to configure the display environment so that I was seeing the petitboot menu properly after a reboot.
I just checked by entering the Petitboot shell the fw variables and hdmimode was set correctly but vga was not present , I then just set it there and performed again a reboot to see that it was still working properly.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

loredin wrote:
Thu Jan 07, 2021 4:51 am
In the dev.20190408 that I flashed on SDCard I didnt have petitboot.cfg present at all nevertheless by using the update process to 20201020 (so while switch was on SPI) it managed to configure the display environment so that I was seeing the petitboot menu properly after a reboot.
I just checked by entering the Petitboot shell the fw variables and hdmimode was set correctly but vga was not present , I then just set it there and performed again a reboot to see that it was still working properly.
So...what's the current version of the Petitboot in SPI flash memory?

loredin
Posts: 38
Joined: Sat Dec 26, 2015 12:17 am
languages_spoken: english, french, german
ODROIDs: xu4;n2
Has thanked: 7 times
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by loredin »

tobetter wrote:
Thu Jan 07, 2021 4:58 am
loredin wrote:
Thu Jan 07, 2021 4:51 am
In the dev.20190408 that I flashed on SDCard I didnt have petitboot.cfg present at all nevertheless by using the update process to 20201020 (so while switch was on SPI) it managed to configure the display environment so that I was seeing the petitboot menu properly after a reboot.
I just checked by entering the Petitboot shell the fw variables and hdmimode was set correctly but vga was not present , I then just set it there and performed again a reboot to see that it was still working properly.
So...what's the current version of the Petitboot in SPI flash memory?
It is 20201020.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

andy5macht wrote:
Tue Dec 29, 2020 12:11 am
@tobetter:
eMMC still not detected with 20201222
Can you please test new Petitboot image for the eMMC issue? Download the image and save it as spiboot.img to your SD card, then it will be updated on the next reboot.
http://ppa.linuxfactory.or.kr/images/pe ... 210112.img
These users thanked the author tobetter for the post:
andy5macht (Thu Jan 14, 2021 6:48 pm)

psifi
Posts: 8
Joined: Fri Aug 14, 2020 8:45 pm
languages_spoken: english, german
ODROIDs: 2x Odroid N2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by psifi »

tobetter wrote:
Wed Jan 13, 2021 1:47 pm
Can you please test new Petitboot image for the eMMC issue? Download the image and save it as spiboot.img to your SD card, then it will be updated on the next reboot.
http://ppa.linuxfactory.or.kr/images/pe ... 210112.img
With that version i get no petitboot menu at all! :evil:
Coreelec 9.2.5 on eMMC starts without any choice regardless of switch position (SPI or MMC).
I had to flash back to older version (using recovery image spiupdate_odroidn2_20201020.img) to get working petitboot menu back again.
Last edited by psifi on Thu Jan 14, 2021 3:51 am, edited 1 time in total.

andy5macht
Posts: 244
Joined: Mon May 16, 2016 5:25 am
languages_spoken: english, german
ODROIDs: U3, C2, N2
Has thanked: 6 times
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by andy5macht »

tobetter wrote:
Wed Jan 13, 2021 1:47 pm
andy5macht wrote:
Tue Dec 29, 2020 12:11 am
@tobetter:
eMMC still not detected with 20201222
Can you please test new Petitboot image for the eMMC issue? Download the image and save it as spiboot.img to your SD card, then it will be updated on the next reboot.
http://ppa.linuxfactory.or.kr/images/pe ... 210112.img
you got it! working fine here.
Booted via Petitboot-Menu:
- CoreELEC 9.2.5 located at eMMC
- CoreELEC 19 Beta located at USB
- Ubuntu located at microSD

thank you!

andy5macht
Posts: 244
Joined: Mon May 16, 2016 5:25 am
languages_spoken: english, german
ODROIDs: U3, C2, N2
Has thanked: 6 times
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by andy5macht »

psifi wrote:
Wed Jan 13, 2021 7:29 pm
tobetter wrote:
Wed Jan 13, 2021 1:47 pm
Can you please test new Petitboot image for the eMMC issue? Download the image and save it as spiboot.img to your SD card, then it will be updated on the next reboot.
http://ppa.linuxfactory.or.kr/images/pe ... 210112.img
With that version i get no petitboot menu at all! :evil:
Coreelec 9.2.5 on eMMC starts without any choice regardless of switch position (SPI or MMC).
I had to flash back to older version (using recovery image spiupdate_odroidn2_20201020.img) to get working petitboot menu back again.
did you power cycle the device? Petitboot working as expected here :?:

psifi
Posts: 8
Joined: Fri Aug 14, 2020 8:45 pm
languages_spoken: english, german
ODROIDs: 2x Odroid N2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by psifi »

andy5macht wrote:
Thu Jan 14, 2021 6:51 pm
did you power cycle the device? Petitboot working as expected here :?:
surely, i power cycle the device after any flash process, i think this is quite normal and also necessary! :x
Additionally after any change of the SPI-MMC-switch and additionally (more than once) when there are problems (like now).
Always the same result as mentioned above - no petitboot-menu with the test-image, instead Coreelec in eMMC is booted regardless the position of the switch.

ikram
Posts: 2
Joined: Thu Jan 14, 2021 8:23 pm
languages_spoken: english
ODROIDs: odroid n2+
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by ikram »

Hi, please how can I write image to SPI flash from USB OTG port on odroid n2+ ?? because my spi memory flash was damaged and i haven't card sd now so is there any other solution to have petitboot again from USB OTG ?? :( :( :(

mad_ady
Posts: 9067
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: 596 times
Been thanked: 578 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by mad_ady »

As far as I know the soc can't boot from any usb, and emmc conflicts with petitboot's spi. You'll need a spare sd to recover spi.

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest