Petitboot, yet another bootloader based on KEXEC

User avatar
mad_ady
Posts: 6796
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 216 times
Been thanked: 166 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Sun Sep 22, 2019 5:23 am

Ok, what is the exact armbian image you're using?

dapimp011
Posts: 9
Joined: Thu Aug 15, 2019 11:28 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by dapimp011 » Sun Sep 22, 2019 5:33 am

mad_ady wrote:
Sun Sep 22, 2019 5:23 am
Ok, what is the exact armbian image you're using?
Armbian_5.95_Odroidn2_Ubuntu_bionic_default_4.9.190_desktop

felipejfc
Posts: 3
Joined: Tue Sep 17, 2019 11:04 pm
languages_spoken: english
ODROIDs: n2
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by felipejfc » Sun Sep 22, 2019 6:25 am

felipejfc wrote:
Tue Sep 17, 2019 11:30 pm
tobetter wrote:
Tue Sep 17, 2019 11:21 pm
felipejfc wrote:
Tue Sep 17, 2019 11:19 pm
I'm trying to dual boot with the following setup:

emmc - CoreElec
usd - Ubuntu (latest hardkernel image)
petitboot - 201907 RC1

I can boot coreelec fine but when I select usd (ubuntu) in petitboot I see only a black screen (blue light is flashing in the board)... any help?
Have you success to boot with Ubuntu natively without Petitboot?
I have!
For that I needed to take off the emmc from the board, for some reason if I boot with emmc(coreelec 9.2) and usd plugged then I get stuck in coreelec splash image...
But yes, when I removed the emmc I was able to boot with only usd (ubuntu) attached to the board...

One thing that might worth mentioning is that when I select ubuntu on petitboot I see my TV's HDR symbol like it sent some display information to the TV but then I get no image at all...
about this, if I boot with petitboot using usd "Ubuntu 18.04.3 (MATE DESKTOP)" without the emmc (coreelec installed) plugged into the odroid n2 it boots fine, maybe the problem is with ubuntu image, not petitboot?

UPDATE
======

I did a apt full-upgrade and now it works 🤔

dapimp011
Posts: 9
Joined: Thu Aug 15, 2019 11:28 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by dapimp011 » Sun Sep 22, 2019 7:20 am

Ok, I finally made petitboot let me choose (and boot) both Armbian and Android.
First, I moved boot.ini of Armbian from /boot/boot.ini to /boot.ini and added just line at the start of boot.ini - setenv bootlabel "Armbian"
Than on sdcard boot.ini I added same setenv bootlabel "Armbian"

Now everything works perfect. This thread is huge help :)

Patjutzu
Posts: 12
Joined: Sun Mar 24, 2013 4:47 pm
languages_spoken: German
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by Patjutzu » Sat Sep 28, 2019 2:49 pm

Good morning
Is it possible to have CoreElec on emmc and boot Android on USB media ?

The other way around I tried that.

Greetings

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Sat Sep 28, 2019 3:58 pm

Patjutzu wrote:
Sat Sep 28, 2019 2:49 pm
Good morning
Is it possible to have CoreElec on emmc and boot Android on USB media ?

The other way around I tried that.

Greetings
No, since Android is pretty much implemented to run only on eMMC or MMC card currently.

Patjutzu
Posts: 12
Joined: Sun Mar 24, 2013 4:47 pm
languages_spoken: German
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by Patjutzu » Sat Sep 28, 2019 6:25 pm

Thanks @tobetter

For your great work.
Too bad that it goes with android on emmc.

Greetings

minoccio
Posts: 10
Joined: Thu Sep 12, 2019 3:20 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by minoccio » Sun Sep 29, 2019 12:13 am

It works with coreelec on emmc and Android on microSD card

xabolcs
Posts: 68
Joined: Fri Jun 22, 2018 6:37 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 86 times
Been thanked: 2 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by xabolcs » Sun Sep 29, 2019 5:39 pm

tobetter wrote:
Sat Sep 28, 2019 3:58 pm
No, since Android is pretty much implemented to run only on eMMC or MMC card currently.
It is possible to dualboot Android and Linux from eMMC?
Sure, I could have a microSD to contain Linux' BOOT partition.

User avatar
mad_ady
Posts: 6796
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 216 times
Been thanked: 166 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Sun Sep 29, 2019 7:10 pm

That should work - as long as the boot.ini on the sd card and the linux fstab point to the same partition. You coulc resize the last android partition and create a new one for linux (warning: not sure how many partitions android uses, but if it already has 4 primary partitions, you won't be able to create a 5th partition. Not sure if you can convert userdata to be extended...)

xabolcs
Posts: 68
Joined: Fri Jun 22, 2018 6:37 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 86 times
Been thanked: 2 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by xabolcs » Mon Sep 30, 2019 7:23 am

Looks like Android has more than 4 partitions, and fortunately the last partition is the user data.
Sounds good. Will try this Android + Linux on eMMC setup sometime.

User avatar
mad_ady
Posts: 6796
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 216 times
Been thanked: 166 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Mon Sep 30, 2019 1:45 pm

Let us know how it goes.

Patjutzu
Posts: 12
Joined: Sun Mar 24, 2013 4:47 pm
languages_spoken: German
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by Patjutzu » Tue Oct 01, 2019 7:53 pm

Hey, guys
how do i save my settings in the Petitboot ?
After restart everything is on default again

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Tue Oct 01, 2019 7:59 pm

Patjutzu wrote:Hey, guys
how do i save my settings in the Petitboot ?
After restart everything is on default again
At the momoment, you need to attached a formated uSD card and the configuration will be stored as a file "petitboot.cfg" in it.

"Tapatalk wishes you to have fun with ODROID"

These users thanked the author tobetter for the post:
xabolcs (Tue Oct 01, 2019 10:46 pm)

Patjutzu
Posts: 12
Joined: Sun Mar 24, 2013 4:47 pm
languages_spoken: German
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by Patjutzu » Tue Oct 01, 2019 8:10 pm

so all I have to do is format a sdcard to fat32 and plug it in?

That's all I have to do ?

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Tue Oct 01, 2019 8:17 pm

Patjutzu wrote:
Tue Oct 01, 2019 8:10 pm
so all I have to do is format a sdcard to fat32 and plug it in?

That's all I have to do ?
Yes and try to change the configuration, then try to reboot it. If your change keeps, it works. I am still working on not to use another storage to store the configuration.

Patjutzu
Posts: 12
Joined: Sun Mar 24, 2013 4:47 pm
languages_spoken: German
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by Patjutzu » Tue Oct 01, 2019 8:22 pm

Thank you, you're doing great support.
I will test it right now

loznic89
Posts: 13
Joined: Tue May 07, 2019 8:01 am
languages_spoken: spanish
ODROIDs: Odroid N2
Has thanked: 10 times
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by loznic89 » Wed Oct 02, 2019 8:01 pm

minoccio wrote:
Sun Sep 29, 2019 12:13 am
It works with coreelec on emmc and Android on microSD card
trying but dont working android on sd card, dont appear in petitboot

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Wed Oct 02, 2019 8:13 pm

loznic89 wrote:
Wed Oct 02, 2019 8:01 pm
minoccio wrote:
Sun Sep 29, 2019 12:13 am
It works with coreelec on emmc and Android on microSD card
trying but dont working android on sd card, dont appear in petitboot
Please check if your Petitboot is the version 20190705. Otherwise, you need to update it.
https://wiki.odroid.com/odroid-n2/os_im ... ev20190705
These users thanked the author tobetter for the post:
loznic89 (Fri Oct 04, 2019 10:31 pm)

loznic89
Posts: 13
Joined: Tue May 07, 2019 8:01 am
languages_spoken: spanish
ODROIDs: Odroid N2
Has thanked: 10 times
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by loznic89 » Thu Oct 03, 2019 6:16 am

tobetter wrote:
Wed Oct 02, 2019 8:13 pm
loznic89 wrote:
Wed Oct 02, 2019 8:01 pm
minoccio wrote:
Sun Sep 29, 2019 12:13 am
It works with coreelec on emmc and Android on microSD card
trying but dont working android on sd card, dont appear in petitboot
Please check if your Petitboot is the version 20190705. Otherwise, you need to update it.
https://wiki.odroid.com/odroid-n2/os_im ... ev20190705
yes, today updating to Petitboot 20190705 and dont working

now i have coreelec in SSD and android in emmc but dont working too.only run coreelec. display black, white and colours screens when run android

I'm probably skipping some step thanks for reply,regards

loznic89
Posts: 13
Joined: Tue May 07, 2019 8:01 am
languages_spoken: spanish
ODROIDs: Odroid N2
Has thanked: 10 times
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by loznic89 » Fri Oct 04, 2019 10:31 pm

tobetter wrote:
Wed Oct 02, 2019 8:13 pm
loznic89 wrote:
Wed Oct 02, 2019 8:01 pm
minoccio wrote:
Sun Sep 29, 2019 12:13 am
It works with coreelec on emmc and Android on microSD card
trying but dont working android on sd card, dont appear in petitboot
Please check if your Petitboot is the version 20190705. Otherwise, you need to update it.
https://wiki.odroid.com/odroid-n2/os_im ... ev20190705
Today reflasing spiboot.img from sdcard with ubuntu as wiki and now all working,nicely

Image

thanks again, good support!!

minoccio
Posts: 10
Joined: Thu Sep 12, 2019 3:20 pm
languages_spoken: english
ODROIDs: N2
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by minoccio » Tue Oct 08, 2019 4:01 pm

Isn't it possible to use a custom ir remote in petitboot? Mine, that works correctly in coreelec and android, doesn't work in petitboot and doesn't wake-up N2 when spi boot is selected

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Tue Oct 08, 2019 6:17 pm

minoccio wrote:
Tue Oct 08, 2019 4:01 pm
Isn't it possible to use a custom ir remote in petitboot? Mine, that works correctly in coreelec and android, doesn't work in petitboot and doesn't wake-up N2 when spi boot is selected
The custom IR, which is not HK stock remote, does not work with Petitboot since there is no way to use register and manage the custom remote yet.
These users thanked the author tobetter for the post:
minoccio (Wed Oct 09, 2019 3:38 pm)

alpe
Posts: 67
Joined: Sat Apr 12, 2014 1:21 pm
languages_spoken: portuguese, english
ODROIDs: C1, N2 4GB
Location: Rio de Janeiro, Brazil
Has thanked: 12 times
Been thanked: 5 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by alpe » Mon Oct 14, 2019 7:49 am

When using armbian on an sdcard petitboot saves it's configuration without problem? Out of curiosity, where?

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Mon Oct 14, 2019 8:51 am

alpe wrote:When using armbian on an sdcard petitboot saves it's configuration without problem? Out of curiosity, where?
It won't break it and will be saved in the first partition of SD card.

"Tapatalk wishes you to have fun with ODROID"


alpe
Posts: 67
Joined: Sat Apr 12, 2014 1:21 pm
languages_spoken: portuguese, english
ODROIDs: C1, N2 4GB
Location: Rio de Janeiro, Brazil
Has thanked: 12 times
Been thanked: 5 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by alpe » Tue Oct 15, 2019 7:53 am

tobetter wrote:
Mon Oct 14, 2019 8:51 am
alpe wrote:When using armbian on an sdcard petitboot saves it's configuration without problem? Out of curiosity, where?
It won't break it and will be saved in the first partition of SD card.

"Tapatalk wishes you to have fun with ODROID"
Thanks. Do you know in what folder or file? Curiosity.

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Tue Oct 15, 2019 8:33 am

alpe wrote:
tobetter wrote:
Mon Oct 14, 2019 8:51 am
alpe wrote:When using armbian on an sdcard petitboot saves it's configuration without problem? Out of curiosity, where?
It won't break it and will be saved in the first partition of SD card.

"Tapatalk wishes you to have fun with ODROID"
Thanks. Do you know in what folder or file? Curiosity.
It's "petitboot.cfg" in the root directory of the first partition in SD card.

FYI, I would have an update to store the configuration into SPI flash memory itself without SD card, the version could be released at the very early Nov with other minor fixes.

"Tapatalk wishes you to have fun with ODROID"

These users thanked the author tobetter for the post:
mad_ady (Tue Oct 15, 2019 1:30 pm)

User avatar
mad_ady
Posts: 6796
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 216 times
Been thanked: 166 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Tue Oct 15, 2019 1:31 pm

Yay! Congrats on figuring out how to store the config in flash!

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Tue Oct 15, 2019 1:31 pm

mad_ady wrote:
Tue Oct 15, 2019 1:31 pm
Yay! Congrats on figuring out how to store the config in flash!
Thanks, it's a bit tricky but looks like working...I am testing time to time at home. Also, the network will up and DHCP will run by default. Other changes are very minor other than two things.

User avatar
mad_ady
Posts: 6796
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 216 times
Been thanked: 166 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Tue Oct 15, 2019 2:09 pm

May I suggest, if possible, spawning a shell on the serial port as well?

jackinho
Posts: 12
Joined: Mon May 06, 2019 12:09 am
languages_spoken: english, german
ODROIDs: XU4, N2
Has thanked: 5 times
Been thanked: 3 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by jackinho » Tue Oct 15, 2019 4:07 pm

Tried it several times, but it seems that petitboot doesn't like my Apple keyboard … :( Is it a driver issue?

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Tue Oct 15, 2019 5:54 pm

jackinho wrote:
Tue Oct 15, 2019 4:07 pm
Tried it several times, but it seems that petitboot doesn't like my Apple keyboard … :( Is it a driver issue?
It is, it will be fixed...sorry for the inconvenience.
These users thanked the author tobetter for the post:
jackinho (Wed Oct 16, 2019 3:10 am)

cobric
Posts: 13
Joined: Wed Oct 16, 2019 7:19 am
languages_spoken: english
ODROIDs: Odroid N2 4GB
Has thanked: 5 times
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by cobric » Wed Oct 16, 2019 7:30 am

Hi all!
I just received my new Odroid N2 4GB CoreELEC edition board, and unfortunately I was too happy to try petitboot and use dual boot CoreELEC and Android and broke my board by updating petitboot :( What I did is not reading instruction carefully, and put spiboot.img (latest update) to my eMMC. Not only that, but I turned it upside-down and connect it to my board wrong way... After plugging in, board start to smell and smoke came out, I immediately plug it out but I think it was too late. Now, the board works generally, it boots in CoreELEC from SD Card but as soon as I plug in eMMC or USB (even dongle for keyboard) my Ethernet stops working. I can't even put OS on eMMC because Ethernet isn't working then :(
I know I can't claim warranty because it was my fault, but does anybody knows if there is some kind of solution? Maybe to detect and replace broken chip?
Thank you all for suggestions.

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Wed Oct 16, 2019 7:24 pm

cobric wrote:
Wed Oct 16, 2019 7:30 am
Hi all!
I just received my new Odroid N2 4GB CoreELEC edition board, and unfortunately I was too happy to try petitboot and use dual boot CoreELEC and Android and broke my board by updating petitboot :( What I did is not reading instruction carefully, and put spiboot.img (latest update) to my eMMC. Not only that, but I turned it upside-down and connect it to my board wrong way... After plugging in, board start to smell and smoke came out, I immediately plug it out but I think it was too late. Now, the board works generally, it boots in CoreELEC from SD Card but as soon as I plug in eMMC or USB (even dongle for keyboard) my Ethernet stops working. I can't even put OS on eMMC because Ethernet isn't working then :(
I know I can't claim warranty because it was my fault, but does anybody knows if there is some kind of solution? Maybe to detect and replace broken chip?
Thank you all for suggestions.
Sorry about your bad luck.
Can you share the photo of your board and eMMC in high resolution as much as you can?
These users thanked the author tobetter for the post:
cobric (Fri Oct 18, 2019 6:44 am)

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Wed Oct 16, 2019 7:26 pm

mad_ady wrote:
Tue Oct 15, 2019 2:09 pm
May I suggest, if possible, spawning a shell on the serial port as well?
"if possible"...right?

User avatar
mad_ady
Posts: 6796
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 216 times
Been thanked: 166 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Wed Oct 16, 2019 8:32 pm

I'm not sure what init system you're using in the initramfs. If it's system-v based, something like

Code: Select all

s0:2345:respawn:/sbin/getty -L 115200 ttyS0 vt102
in /etc/inittab should do the trick.

If you don't have an init system and are just starting programs, if you have getty already (if not, not sure how big it is), you could do:

Code: Select all

getty -L 115200 ttyS0 vt102
at the end of your init script.

Ideas from here: https://superuser.com/questions/1335796 ... l-on-linux
Hopefully all the bits are already in your system and won't take up additional space...

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Wed Oct 16, 2019 8:40 pm

Thanks, I know kind of them. Peititboot for N2 does not have inittab and not sure getty can be imported due to the size which would be a challenge for me. Let try it out sometime. ;)

"Tapatalk wishes you to have fun with ODROID"


User avatar
mad_ady
Posts: 6796
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 216 times
Been thanked: 166 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Wed Oct 16, 2019 9:16 pm

There is a hardcore way of starting a shell, since the serial port is already initialized and you don't need getty. I'll play with it tomorrow a bit - something like /bin/sh >/dev/ttyUSB0 </dev/ttyUSB0 2>&1 &

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Wed Oct 16, 2019 9:20 pm

mad_ady wrote:
Wed Oct 16, 2019 9:16 pm
There is a hardcore way of starting a shell, since the serial port is already initialized and you don't need getty. I'll play with it tomorrow a bit - something like /bin/sh >/dev/ttyUSB0 </dev/ttyUSB0 2>&1 &
Let me cross my finger for you!!

EDIT: I am able to open a shell to serial port using getty. Fortunately, it's already in the root file system. So I added one line below before launching the Petitboot executable.

Code: Select all

/sbin/getty -L ttyS0 115200 vt100 -n -l /bin/sh &
Which I am not figured out is to run Petitboot simultaneously runs on HDMI display as well as on the serial port. But you can run petitboot-nc in the serial terminal and can run the same functionality. I think this is not a major issue for generic users.
These users thanked the author tobetter for the post:
mad_ady (Thu Oct 17, 2019 4:03 pm)

IskyNetFree
Posts: 4
Joined: Tue Aug 27, 2019 11:23 pm
languages_spoken: english
ODROIDs: ODROID N2
Has thanked: 2 times
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by IskyNetFree » Thu Oct 17, 2019 3:35 pm

Petitboot 20190705 -rc1 is excellent, but It's has a problem with TV which has
resolution lower than 1080P. It's not show anything on screen.
Could someone advice me how to config this excellent petitboot auto resolution from 1080P to 1080I resolution for any TV which has resolution lower than 1080P.

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Thu Oct 17, 2019 3:38 pm

IskyNetFree wrote:
Thu Oct 17, 2019 3:35 pm
Petitboot 20190705 -rc1 is excellent, but It's has a problem with TV which has
resolution lower than 1080P. It's not show anything on screen.
Could someone advice me how to config this excellent petitboot auto resolution from 1080P to 1080I resolution for any TV which has resolution lower than 1080P.
Currently, Petitboot uses 1080P by default and I am working to let user can set the resolution in case a display does not come or want to change the default resolution like your case. I hope it can be released by early Nov that I am planning.
These users thanked the author tobetter for the post (total 2):
rooted (Thu Oct 17, 2019 5:29 pm) • IskyNetFree (Thu Oct 17, 2019 5:59 pm)

User avatar
mad_ady
Posts: 6796
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 216 times
Been thanked: 166 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Thu Oct 17, 2019 4:03 pm

Sounds great @tobetter!

cobric
Posts: 13
Joined: Wed Oct 16, 2019 7:19 am
languages_spoken: english
ODROIDs: Odroid N2 4GB
Has thanked: 5 times
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by cobric » Thu Oct 17, 2019 4:48 pm

tobetter wrote:
Wed Oct 16, 2019 7:24 pm
cobric wrote:
Wed Oct 16, 2019 7:30 am
Hi all!
I just received my new Odroid N2 4GB CoreELEC edition board, and unfortunately I was too happy to try petitboot and use dual boot CoreELEC and Android and broke my board by updating petitboot :( What I did is not reading instruction carefully, and put spiboot.img (latest update) to my eMMC. Not only that, but I turned it upside-down and connect it to my board wrong way... After plugging in, board start to smell and smoke came out, I immediately plug it out but I think it was too late. Now, the board works generally, it boots in CoreELEC from SD Card but as soon as I plug in eMMC or USB (even dongle for keyboard) my Ethernet stops working. I can't even put OS on eMMC because Ethernet isn't working then :(
I know I can't claim warranty because it was my fault, but does anybody knows if there is some kind of solution? Maybe to detect and replace broken chip?
Thank you all for suggestions.
Sorry about your bad luck.
Can you share the photo of your board and eMMC in high resolution as much as you can?
Hi! Thank you for your answer and your help.
Here are photos:

I think I found burned part, because there was smoke coming from that part of the board - It's in this picture IMG_20191017_084553.jpg (first one in album) clearly visible above C148 component. I don't know if anything can be done to replace it, and what it is?

I currently use workaround that is working pretty solid - CoreELEC on SD card and network with USB3 -> Ethernet adapter. I had luck that main parts - CPU, memory survived :) Unfortunately I can't use eMMC and onboard gigabit Ethernet, but I should be lucky with what I have.

UPDATE: I did a little research and this must be transistor (https://learn.sparkfun.com/tutorials/transistors/all) as it's marked as Q on the board and has 3 pins. Does anyone with more knowledge know what it's used for and can it be replaced by buying new one and soldering it to board?

Thank you again!

User avatar
cdu13a
Posts: 193
Joined: Tue Jan 20, 2015 3:33 pm
languages_spoken: english
ODROIDs: C1, C2, XU4, HC1, N2
Has thanked: 0
Been thanked: 14 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by cdu13a » Fri Oct 18, 2019 3:54 am

cobric wrote:
Thu Oct 17, 2019 4:48 pm

I think I found burned part, because there was smoke coming from that part of the board - It's in this picture IMG_20191017_084553.jpg (first one in album) clearly visible above C148 component. I don't know if anything can be done to replace it, and what it is?

I currently use workaround that is working pretty solid - CoreELEC on SD card and network with USB3 -> Ethernet adapter. I had luck that main parts - CPU, memory survived :) Unfortunately I can't use eMMC and onboard gigabit Ethernet, but I should be lucky with what I have.

UPDATE: I did a little research and this must be transistor (https://learn.sparkfun.com/tutorials/transistors/all) as it's marked as Q on the board and has 3 pins. Does anyone with more knowledge know what it's used for and can it be replaced by buying new one and soldering it to board?

Thank you again!
@cobric Q1 is a FTK3407. Bottom right corner on page 14 of the schematics https://dn.odroid.com/S922X/ODROID-N2/S ... 190307.pdf
There is a thread here where a user replaced it, that might be useful to take a look at. viewtopic.php?t=35304&p=258708

Depending on your soldering skills you may be able to replace the part. Though it's a fairly small part with a few even smaller parts right beside it so if you have a friend that can solder better then you and has better soldering equipment then it may be a good idea to ask them for help.

Edit: It may also be a good idea to start a new thread about your problem. It's more likely that somebody that can answer your questions may see it then, and it won't clutter up this thread with something that has gone beyond being about petitboot. Maybe in the Odroid-N2/Issues section of the forum.
These users thanked the author cdu13a for the post:
cobric (Fri Oct 18, 2019 6:44 am)

cobric
Posts: 13
Joined: Wed Oct 16, 2019 7:19 am
languages_spoken: english
ODROIDs: Odroid N2 4GB
Has thanked: 5 times
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by cobric » Fri Oct 18, 2019 6:06 am

cdu13a wrote:
Fri Oct 18, 2019 3:54 am
@cobric Q1 is a FTK3407. Bottom right corner on page 14 of the schematics https://dn.odroid.com/S922X/ODROID-N2/S ... 190307.pdf
There is a thread here where a user replaced it, that might be useful to take a look at. viewtopic.php?t=35304&p=258708

Depending on your soldering skills you may be able to replace the part. Though it's a fairly small part with a few even smaller parts right beside it so if you have a friend that can solder better then you and has better soldering equipment then it may be a good idea to ask them for help.

Edit: It may also be a good idea to start a new thread about your problem. It's more likely that somebody that can answer your questions may see it then, and it won't clutter up this thread with something that has gone beyond being about petitboot. Maybe in the Odroid-N2/Issues section of the forum.
Thank you, I see now other thread and same problem as mine, and glad to see that I'm not only one to which same thing happen :) I'll ask in that thread for further help if I need one so thank you all for your help!

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Sun Oct 20, 2019 11:26 pm

20191020-rc1
I was able to manage the new version with some major changes. Actually I planned to share the version a couple of weeks after having some tests, but the feature changing display resolution would need to be tested by more people. So I share the new image and willing to get more feedback.
Click spiboot-20191020-rc1.img to download. The file must be copied as spiboot.img to the first partition in your SD card, not eMMC. In order to update properly, the boot select switch must be placed to SPI and must do a power cycle, unless ODROID-N2 will keep boot MMC cards.
https://wiki.odroid.com/odroid-n2/os_im ... grade_mode

Please enjoy the new version and welcome your feedback.

What's improved:
  • Petitboot can store its configuration to SPI flash memory, so you won't need to keep attaching the SD card anymore in order to keep your own configuration of Petitboot. This will refresh the boot entry menu shortly whenever the new configuration is changed.
  • Default display mode can be changeable. It's a bit complicated, so please read a note in the bottom half of this post.
  • Fixed to read boot.ini in subdirectory, Armbian OS user won't need to copy boot.ini to root directory.
  • Peitboot can access through debugging port, thanks to @mad_ady for the suggestion. Petitboot will show to the HDMI display only, but you can run Petitboot with petitboot-nc in the command line through the debugging port. This will help you to run Petitboot when you are not able to use an HDMI display.
  • DHCP client is enabled by default.
  • Hardkernel booting logo is added.
  • Minor bugs are fixed.
Notes:
Changing the default display mode
By default, the display mode for Petitboot is 1080p60hz and this is stored in the SPI flash memory as a key hdmimode. In order to access the U-boot configuration, USB-to-serial debugging tool is necessary and have to run a couple of commands. Due to the difficulty of using U-boot commands, I offer two methods (1) Using petitboot.cfg and (2) Change hdmimode using a command line tool. Please note this resolution change won't to affect your OS.

1) Using petitboot.cfg in SD card.
The file petitboot.cfg was used to set Petitboot configuration, in this version it's being used to help U-boot to change the display mode by adding this anywhere in your petitboot.cfg if you already have or can create a file with it.

Code: Select all

[u-boot]
#hdmimode=800x480p60hz
#hdmimode=800x600p60hz
#hdmimode=1280x1024p60hz
hdmimode=480p60hz
#hdmimode=1080p50hz
#hdmimode=1080p60hz
overwrite=false
I've listed the display resolutions what I tested with my display and you would be able to use other display modes which works for your OS running on ODROID-N2. The file petitboot.cfg is loaded by U-boot in SPI flash memory and use the given display resolution but it won't store until the overwrite= is true. So please keep trying to change the value of hdmimode until you meet a decent display mode, then change false to true to overwrite. Once it's done, remove petitboot.cfg or revert true to false. Otherwise, U-boot will keep updating SPI flash memory every boot which wears it. :)

2) Changin hdmimode using a command line tool.
Since this version, Petitboot can store its configuration into SPI flash memory itself. While making this, I had to make Linux kernel allows us to access SPI flash memory from a user space, two commands tools - fw_printenv (to read U-boot environment) and fw_setenv (to change U-boot environment) are also added, but SPI flash or eMMC must exclusively be enabled using a script - /usr/sbin/spimmc.sh.
In order to run such commands, you must exit from Petitboot or can access directly through USB-to-serial port. For example, if you like to change the display mode to 480p60hz which support 720x480 resolution:

Code: Select all

# spimmc.sh 
# fw_printenv hdmimode
hdmimode=1080p60hz
# fw_setenv hdmimode 480p60hz
# fw_printenv hdmimode
hdmimode=480p60hz
Once you confirm the new display resoltuion is changed, you can reboot your ODROID-N2. Or if you like to back to Petitboot boot entry after changing U-boot environment, you must run spimmc.sh again so that Petitboot can access eMMC or MMC.
Last edited by tobetter on Wed Nov 06, 2019 1:29 am, edited 3 times in total.
These users thanked the author tobetter for the post (total 6):
jackinho (Mon Oct 21, 2019 2:23 am) • mad_ady (Mon Oct 21, 2019 2:53 am) • rooted (Mon Oct 21, 2019 6:17 am) • odroid (Mon Oct 21, 2019 9:31 am) • alpe (Tue Oct 22, 2019 6:57 am) • xabolcs (Sun Nov 03, 2019 3:44 am)

jackinho
Posts: 12
Joined: Mon May 06, 2019 12:09 am
languages_spoken: english, german
ODROIDs: XU4, N2
Has thanked: 5 times
Been thanked: 3 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by jackinho » Mon Oct 21, 2019 2:23 am

Apple keyboard is now recognized by Petitboot. Many thanks @tobetter! Great work!

User avatar
mad_ady
Posts: 6796
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 216 times
Been thanked: 166 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Mon Oct 21, 2019 3:01 am

I'll give it a try tomorrow, tobetter, thanks!
Only problem I can see is the release date.., 2010 was way back when we were younger and healthier... :)

User avatar
rooted
Posts: 6777
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 220 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by rooted » Mon Oct 21, 2019 6:18 am

That's some great changes @tobetter, I look forward to trying them.

woodyl
Posts: 16
Joined: Mon Aug 05, 2019 2:04 am
languages_spoken: english
ODROIDs: Odroid N2
Has thanked: 3 times
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by woodyl » Mon Oct 21, 2019 11:49 am

I haven't installed this latest Petitiboot version, but I was testing fw_printenv. I get an error with fw_env.config. Is fw_printenv supposed to work with earlier versions of Petitboot? What parameters should be set in fw_env.config?

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 0 guests