Petitboot, yet another bootloader based on KEXEC

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

Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

20201101

New Petitboot update image 20201101 is uploaded. In order to update with the new image, please attach HDMI cable and USB keyboard, go for Exit to shell from the Petitboot menu and do run the command pb-update. This will start to update new firmware and will reboot when finished.

Code: Select all

# pb-update
What's improved:
  • OLED will shows the IP address and MAC address
  • Booting issue of ArchLinux (leaded by @jgmdev) is resolved, but need more attetion to fix
In case the Petitboot does not start after updating?
For some reason, the update could fail. In such case, you will need to use the recovery image other than update image. For recovery, download the image from link and flash it to uSD card using dd or Etcher.
http://ppa.linuxfactory.or.kr/images/pe ... 201101.img

In order to start the recovery mode
1) Remove the storages attached and power cable attached to ODROID-HC4.
2) Keep attached HDMI cable to see if the recovery mode is started.
3) Flip the ODROID-HC4 case and pressing the boot select switch on bottom before power up.
4) Keep pressing the switch just until the blue LED lits, no more than it blinks.
5) If the boot select switch is pressed properly, recover mode will start and SPI flash will be updated.

Have fun with your ODROID!!
Attachments
IMG_20201101_1608502.jpg
IMG_20201101_1608502.jpg (112.87 KiB) Viewed 14464 times
These users thanked the author tobetter for the post (total 2):
superpowter77 (Sun Nov 01, 2020 5:27 pm) • istanbulls (Sun Nov 01, 2020 8:38 pm)

User avatar
mad_ady
Posts: 11942
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, N2L, H2, H3+, Go, Go Advance, M1, M1S
Location: Bucharest, Romania
Has thanked: 662 times
Been thanked: 1257 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by mad_ady »

Ha! Are you using the display in petitboot? cool!
These users thanked the author mad_ady for the post:
istanbulls (Sun Nov 01, 2020 8:39 pm)

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

mad_ady wrote:
Sun Nov 01, 2020 4:16 pm
Ha! Are you using the display in petitboot? cool!
Yep, that's from the Petitboot with the very vare minimal information for the network.
These users thanked the author tobetter for the post:
istanbulls (Sun Nov 01, 2020 8:39 pm)

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by istanbulls »

We want an update like this in N2 and C4 !!! :D

i ordered new 1.54 ", 2.42", 1.3 "4 pin i2c displays, i have to try.
1.3 "sh1106 screen broke. :( "uncontrollable power is not power"

User avatar
mad_ady
Posts: 11942
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, N2L, H2, H3+, Go, Go Advance, M1, M1S
Location: Bucharest, Romania
Has thanked: 662 times
Been thanked: 1257 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by mad_ady »

With the risk of being chased around with a baseball bat, do you know what would be cool?
If you could mirror whatever text is selected in the petitboot screen on the oled. Presumably you could do it by writing the selection text to a text file in /tmp (from within petitboot) and have the oled screen read from it periodically.
That would allow you to operate petitboot with just the oled (not sure what possible advantage that would bring, but it would be cool!)

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

20201218

Update version from 20201218 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-20201218.img and copy it to your SD card as spiboot.img.

What's improved:
  • Support Amlogic compressed multi device tree format.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

20201222

Update version from 20201222 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-20201222.img and copy it to your SD card as spiboot.img.

What's improved:
  • Multiple kernel boot entry from 'grub.cfg'
How to apply GRUB multiboot configuration.
Please do not use this feature if you are not familiar with this and use this at your own risk. This could cause the boot failure and not easy to recover if you don't know what to do.

Code: Select all

$ sudo apt update
$ sudo apt install odroid-grub
$ sudo update-grub2 
[sudo] password for tobetter: 
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.10.0-odroid-panfrost-arm64
Found initrd image: /boot/initrd.img-5.10.0-odroid-panfrost-arm64
Found linux image: /boot/vmlinuz-5.10.0-odroid-arm64
Found initrd image: /boot/initrd.img-5.10.0-odroid-arm64
Found linux image: /boot/vmlinuz-5.9.0-odroid-arm64
Found initrd image: /boot/initrd.img-5.9.0-odroid-arm64
Found linux image: /boot/vmlinuz-5.8.0-odroid-arm64
Found initrd image: /boot/initrd.img-5.8.0-odroid-arm64
Found Ubuntu 20.10 (20.10) on /dev/sda2
done
IMG_20201223_2346021.jpg
IMG_20201223_2346021.jpg (166.58 KiB) Viewed 14173 times
These users thanked the author tobetter for the post:
odroid (Thu Dec 24, 2020 10:28 am)

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by istanbulls »

I wanted to enlarge the fonts, I broke Petitboot. The blue led is on steady, I wanted to re-install with the uSD, but the blue led is always on.

I tried pressing the pin under the HC4 but it didn't boot from the uSD.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

istanbulls wrote:
Sat Jan 09, 2021 7:08 pm
I wanted to enlarge the fonts, I broke Petitboot. The blue led is on steady, I wanted to re-install with the uSD, but the blue led is always on.

I tried pressing the pin under the HC4 but it didn't boot from the uSD.
Did you press the button until the blue LED on?

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by istanbulls »

tobetter wrote:
Sat Jan 09, 2021 7:30 pm
istanbulls wrote:
Sat Jan 09, 2021 7:08 pm
I wanted to enlarge the fonts, I broke Petitboot. The blue led is on steady, I wanted to re-install with the uSD, but the blue led is always on.

I tried pressing the pin under the HC4 but it didn't boot from the uSD.
Did you press the button until the blue LED on?
yes, the blue led is not lit.
Where can I find the recovery image. I just found the ones for N2.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

istanbulls wrote:
Sat Jan 09, 2021 7:33 pm
tobetter wrote:
Sat Jan 09, 2021 7:30 pm
istanbulls wrote:
Sat Jan 09, 2021 7:08 pm
I wanted to enlarge the fonts, I broke Petitboot. The blue led is on steady, I wanted to re-install with the uSD, but the blue led is always on.

I tried pressing the pin under the HC4 but it didn't boot from the uSD.
Did you press the button until the blue LED on?
yes, the blue led is not lit.
Where can I find the recovery image. I just found the ones for N2.
Ah...tried N2 image? :) Download the recovery image for HC4.
http://ppa.linuxfactory.or.kr/images/pe ... 222.img.xz

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by istanbulls »

tobetter wrote:
Sat Jan 09, 2021 7:35 pm
istanbulls wrote:
Sat Jan 09, 2021 7:33 pm
tobetter wrote:
Sat Jan 09, 2021 7:30 pm
istanbulls wrote:
Sat Jan 09, 2021 7:08 pm
I wanted to enlarge the fonts, I broke Petitboot. The blue led is on steady, I wanted to re-install with the uSD, but the blue led is always on.

I tried pressing the pin under the HC4 but it didn't boot from the uSD.
Did you press the button until the blue LED on?
yes, the blue led is not lit.
Where can I find the recovery image. I just found the ones for N2.
Ah...tried N2 image? :) Download the recovery image for HC4.
http://ppa.linuxfactory.or.kr/images/pe ... 222.img.xz
Recovery image for N2 is usually 50mb. :)
The image in the link you gave is 8mb. I thought of it as Update image and tried it with Recovery image for N2. :D
I wrote the image in the link you provided to the uSD card, now the update has started :)

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by jnohlgard »

Hi,
Where can I find the sources for the current version of petitboot for HC4 (20201222)?
This repo has not been updated in the last two years https://github.com/tobetter/petitboot

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by jnohlgard »

I have two issues that can be manually worked around, but it is a pain to do it manually on every reboot so I would like to fix it in petitboot.

First issue:

If the size of the uncompressed kernel + compressed initrd image + dtb exceeds 0x5000000 bytes (80 MiB), then the boot will hang after kexec -e because the initrd gets written into the memory region reserved for BL31 (secmon in dtb). I don't have any knowledge about BL31 or what it is for, but simply avoiding that region makes the boot succeed.

Workaround:

Run kexec manually and add

Code: Select all

--mem-min 0x5300000
to the kexec -l command line.

Second issue:

The root= parameter on the kernel command line gets translated from root=UUID=abcdef1234567 into root=/dev/mmcblk1pX, which messes up the boot because for some reason, the SD card slot shows up as /dev/mmcblk1 in the petitboot system, while when I launch my real kernel it will be detected at /dev/mmcblk0, so using UUID to find the partition is just plain better here.

Workaround:

Run kexec manually with the right root= parameter

These two issues makes petitboot pretty useless on my system, except that I don't have to mess with Uboot scripts. I am experienced enough that I can manually launch the kernel via kexec from the command line so at least I have a working system. However, I might have to revert to using uboot on SD card instead to avoid the need for manual typing (or manual copy pasting over serial console) to boot.

Why is the kernel + initrd bigger than 80 MiB?

I am experimenting with running an upstream Fedora kernel (with some small patches for hardware support, but staying close to the upstream config) which has a systemd based initrd with the ignition provisioning system and lots of kernel modules included.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

jnohlgard wrote:
Fri Jan 29, 2021 1:57 am
I have two issues that can be manually worked around, but it is a pain to do it manually on every reboot so I would like to fix it in petitboot.

First issue:

If the size of the uncompressed kernel + compressed initrd image + dtb exceeds 0x5000000 bytes (80 MiB), then the boot will hang after kexec -e because the initrd gets written into the memory region reserved for BL31 (secmon in dtb). I don't have any knowledge about BL31 or what it is for, but simply avoiding that region makes the boot succeed.

Workaround:

Run kexec manually and add

Code: Select all

--mem-min 0x5300000
to the kexec -l command line.
Good to know if you solve the issue with the parameter, can you let me know how the address 0x5300000 is determined?
Second issue:

The root= parameter on the kernel command line gets translated from root=UUID=abcdef1234567 into root=/dev/mmcblk1pX, which messes up the boot because for some reason, the SD card slot shows up as /dev/mmcblk1 in the petitboot system, while when I launch my real kernel it will be detected at /dev/mmcblk0, so using UUID to find the partition is just plain better here.

Workaround:

Run kexec manually with the right root= parameter
There is two issue to use the device node instead of root=UUID=xxxx.
1. Most open source OS team build the image does not change the UUID on the first boot. In case if there is two memory cards flash with same OS image but having different OS setup cannot make boot properly.
2. I do not remember correctly which was, it's been about a year ago. Its initram fs was not able to read UUID of the root file system after the Petitboot. So the Petitboot change the 'root=UUID=xxx' to 'root=/dev/xxx'.
These two issues makes petitboot pretty useless on my system, except that I don't have to mess with Uboot scripts. I am experienced enough that I can manually launch the kernel via kexec from the command line so at least I have a working system. However, I might have to revert to using uboot on SD card instead to avoid the need for manual typing (or manual copy pasting over serial console) to boot.

Why is the kernel + initrd bigger than 80 MiB?

I am experimenting with running an upstream Fedora kernel (with some small patches for hardware support, but staying close to the upstream config) which has a systemd based initrd with the ignition provisioning system and lots of kernel modules included.
I've built new Petitboot for your two issues.
http://ppa.linuxfactory.or.kr/images/pe ... 210129.img

1. KEXEC will run with "--mem-min=0x5300000" as you discovered but I'd like to be sure how 0x5300000 is determined. :)
2. Still need to keep using 'root=/dev/xxx' instead of 'root=UUID=xxx" as I explained. But for your 2nd problem, I've made a change to bypass the 'root=UUID=xxx' as-is if you set the flag to the Petitboot. The flag can be set with this command in the Petitboot and this change will work on next rebooting.

Code: Select all

fw_setenv rootuuid true

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by jnohlgard »

The 0x5300000 comes from the comment in the Linux dts files that show that the secmon reserved section starts at 0x5000000 and is 0x300000 (3 MiB) long. https://github.com/torvalds/linux/blob/ ... i#L98-L102

Thanks for the binary, but what about the source code? Can I get a copy of the sources somewhere?

amibumping
Posts: 17
Joined: Wed Feb 10, 2021 9:13 pm
languages_spoken: spanish
ODROIDs: HC4
Has thanked: 8 times
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by amibumping »

Hi, yesterday I received my HC4, and I tried to update petitboot, but running the command pb-update does nothing, it says that I should go to an URL: http://ppa.linuxfactory.or.kr/images/pe ... hc4/latest, I finally updated manually to version 20201222.img but I don't know if is the latest stable, or if the command should run.

Thank you.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

amibumping wrote:
Wed Feb 10, 2021 9:16 pm
Hi, yesterday I received my HC4, and I tried to update petitboot, but running the command pb-update does nothing, it says that I should go to an URL: http://ppa.linuxfactory.or.kr/images/pe ... hc4/latest, I finally updated manually to version 20201222.img but I don't know if is the latest stable, or if the command should run.

Thank you.
No worries, you already have the latest one (20201222).

amibumping
Posts: 17
Joined: Wed Feb 10, 2021 9:13 pm
languages_spoken: spanish
ODROIDs: HC4
Has thanked: 8 times
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by amibumping »

tobetter wrote:
amibumping wrote:
Wed Feb 10, 2021 9:16 pm
Hi, yesterday I received my HC4, and I tried to update petitboot, but running the command pb-update does nothing, it says that I should go to an URL: http://ppa.linuxfactory.or.kr/images/pe ... hc4/latest, I finally updated manually to version 20201222.img but I don't know if is the latest stable, or if the command should run.

Thank you.
No worries, you already have the latest one (20201222).
Thank you for the fastest response!

Enviado desde mi Mi 9T mediante Tapatalk


eriwei123
Posts: 2
Joined: Sun Feb 28, 2021 9:40 am
languages_spoken: english
ODROIDs: HC4
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by eriwei123 »

Hi all,

I deleted my petitboot bootloader to fix my missing hdmi output wenn booting armbian from sd card which did not realy work. Now i want to recover petitboot but i´m not succsessful regardless which hc4 recovery image i try. When I write the image to the micro SD card with etcher and then try to start the odroid with the button on the bottom pressed, only the red led lights up, even if wait for a long time keeping the button pressed. I tried two different sandisk cards. Anny suggestions? should i try another card?

P.S. When I try to boot the armbian image, while pressing the button, the blue led starts blinking but I there is no display output. the odroid seems to have a problem with my display now even though it worked fine, when still had petitboot.

User avatar
mad_ady
Posts: 11942
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, N2L, H2, H3+, Go, Go Advance, M1, M1S
Location: Bucharest, Romania
Has thanked: 662 times
Been thanked: 1257 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by mad_ady »

If you've erased petitboot you don't need to press the button anymore. Try booting the recovery sd normally and leave it on (even if display doesn't work) for at least 10 minutes.

eriwei123
Posts: 2
Joined: Sun Feb 28, 2021 9:40 am
languages_spoken: english
ODROIDs: HC4
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by eriwei123 »

@mad_ady: Thanks for the advise but this seems not to work. I now have found an old monitor which works with the hc4 but the recovery doesn´t seem to work. Could it be, that the recovery only works with certain sd cards?
??

brad
Posts: 1619
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 C4 HC4 N1 N2 N2+ H2 H2+ M1 (64 bit ftw)
Location: Australia
Has thanked: 187 times
Been thanked: 256 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by brad »

Wondering about Petitboot on the C4, can we run it off an sd card?

I'm doing some testing with an adapter I made to get sd working on the SDIO port. At this stage I suspect the amlogic bl1 firmware does not allow boot from sd attached to sdio port on the GPIO's, but I suspect uboot and kernel will see it fine.

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

brad wrote:
Wed Mar 30, 2022 4:13 pm
Wondering about Petitboot on the C4, can we run it off an sd card?

I'm doing some testing with an adapter I made to get sd working on the SDIO port. At this stage I suspect the amlogic bl1 firmware does not allow boot from sd attached to sdio port on the GPIO's, but I suspect uboot and kernel will see it fine.
Actually the bootstrap code in SoC looks for the BL firmware from eMMC and SD card on ODROID-C4, so SDIO on GPIO pin header does not work.
These users thanked the author tobetter for the post:
brad (Wed Mar 30, 2022 4:34 pm)

User avatar
mad_ady
Posts: 11942
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4 (HC1, HC2), C1+, C2, C4 (HC4), N1, N2, N2L, H2, H3+, Go, Go Advance, M1, M1S
Location: Bucharest, Romania
Has thanked: 662 times
Been thanked: 1257 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by mad_ady »

brad wrote:
Wed Mar 30, 2022 4:13 pm
Wondering about Petitboot on the C4, can we run it off an sd card?

I'm doing some testing with an adapter I made to get sd working on the SDIO port. At this stage I suspect the amlogic bl1 firmware does not allow boot from sd attached to sdio port on the GPIO's, but I suspect uboot and kernel will see it fine.
Yes, it can. See this thread: viewtopic.php?f=206&t=39608 for a special petitboot build for C4.
These users thanked the author mad_ady for the post (total 2):
tobetter (Wed Mar 30, 2022 5:57 pm) • brad (Wed Mar 30, 2022 6:13 pm)

brad
Posts: 1619
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 C4 HC4 N1 N2 N2+ H2 H2+ M1 (64 bit ftw)
Location: Australia
Has thanked: 187 times
Been thanked: 256 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by brad »

mad_ady wrote:
Wed Mar 30, 2022 5:56 pm
Yes, it can. See this thread: viewtopic.php?f=206&t=39608 for a special petitboot build for C4.
Excellent mad_ady thank you for the link and thank you for confirming cpu boot tobetter

As the cpu wont boot an sd card on the sdio port I just now need to test if I can

- cpu boot to emmc
- emmc uboot takes on sd connected sdio (/boot partition) for petitboot launch

My test connector for sdio only supports 1 lane transfers (so will be slower) but the C4 has 4 lanes exposed on the 40 pin :)

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

brad wrote:
Wed Mar 30, 2022 6:13 pm
mad_ady wrote:
Wed Mar 30, 2022 5:56 pm
Yes, it can. See this thread: viewtopic.php?f=206&t=39608 for a special petitboot build for C4.
Excellent mad_ady thank you for the link and thank you for confirming cpu boot tobetter

As the cpu wont boot an sd card on the sdio port I just now need to test if I can

- cpu boot to emmc
- emmc uboot takes on sd connected sdio (/boot partition) for petitboot launch

My test connector for sdio only supports 1 lane transfers (so will be slower) but the C4 has 4 lanes exposed on the 40 pin :)
I am also wondering how SDIO on GPIO header can work to access a file system. :)

brad
Posts: 1619
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 C4 HC4 N1 N2 N2+ H2 H2+ M1 (64 bit ftw)
Location: Australia
Has thanked: 187 times
Been thanked: 256 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by brad »

tobetter wrote:
Wed Mar 30, 2022 6:20 pm
I am also wondering how SDIO on GPIO header can work to access a file system. :)
Apparently old me tested this with a c2 but forgot most of it :lol: - viewtopic.php?p=243691#p243691 I just need to find that adapter rather than my home made one

that was mainline linux / uboot but I suspect it can work on c4 uboot/petitboot
These users thanked the author brad for the post:
tobetter (Wed Mar 30, 2022 10:03 pm)

garcea
Posts: 9
Joined: Fri May 21, 2021 4:16 pm
languages_spoken: english
ODROIDs: C4; HC4
Has thanked: 3 times
Been thanked: 2 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by garcea »

Hi @tobetter! Had some issue with the latest petitboot for HC4 - cannot manage to update through pb-update: spiboot-20221228.img latest version I managed to get by copying to the root of sd card. Is it a special build made for some kernels and should I revert to spiboot-20220317.img?

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

garcea wrote:
Tue Mar 07, 2023 12:24 am
Hi @tobetter! Had some issue with the latest petitboot for HC4 - cannot manage to update through pb-update: spiboot-20221228.img latest version I managed to get by copying to the root of sd card. Is it a special build made for some kernels and should I revert to spiboot-20220317.img?
If you mean you cannot upgrade to 20221228 vis pb-update, it's normal. Since it was testing version for some request but you can keep running it if you do not have an issue.

garcea
Posts: 9
Joined: Fri May 21, 2021 4:16 pm
languages_spoken: english
ODROIDs: C4; HC4
Has thanked: 3 times
Been thanked: 2 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by garcea »

Ok, thanks for the info! Until now I didnt see anything weird. If things go akward I will downgrade.
These users thanked the author garcea for the post:
tobetter (Tue Mar 07, 2023 12:36 am)

Melab
Posts: 46
Joined: Thu Feb 09, 2023 12:06 am
languages_spoken: English
Has thanked: 0
Been thanked: 2 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Melab »

tobetter wrote:
Tue Mar 07, 2023 12:29 am
garcea wrote:
Tue Mar 07, 2023 12:24 am
Hi @tobetter! Had some issue with the latest petitboot for HC4 - cannot manage to update through pb-update: spiboot-20221228.img latest version I managed to get by copying to the root of sd card. Is it a special build made for some kernels and should I revert to spiboot-20220317.img?
If you mean you cannot upgrade to 20221228 vis pb-update, it's normal. Since it was testing version for some request but you can keep running it if you do not have an issue.
Is the up-to-date source code available?

jtmpush18
Posts: 2
Joined: Wed Feb 24, 2021 5:06 am
languages_spoken: english
ODROIDs: H2+, OH4
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by jtmpush18 »

I am having difficulty in booting up my Odroid HC4. No netboot/petitboot, nothing.
I have tried to flash a SD card (via Balena Etcher) with:
ODROIDBIOS.BIN
spiboot<date>.img

I have tried without holding down the black button and with.
Nothing seems to work.
Please, what am I doing wrong?

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

jtmpush18 wrote:
Wed Sep 27, 2023 1:11 am
I am having difficulty in booting up my Odroid HC4. No netboot/petitboot, nothing.
I have tried to flash a SD card (via Balena Etcher) with:
ODROIDBIOS.BIN
spiboot<date>.img

I have tried without holding down the black button and with.
Nothing seems to work.
Please, what am I doing wrong?
You have to flash this image to SD card,
http://ppa.linuxfactory.or.kr/images/pe ... 222.img.xz

And copy this file as spiboot.img to the first partition in the same SD card flash with above image.
http://ppa.linuxfactory.or.kr/images/pe ... 220317.img

Then try to reboot with the SD card.

Mark1250
Posts: 43
Joined: Fri Jan 09, 2015 1:26 am
languages_spoken: english
ODROIDs: U3, XU4, C1+, C2, N2
Has thanked: 3 times
Been thanked: 3 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Mark1250 »

I have an HC4 with a SPI memory issue. The board keeps losing the spi data and doesn't boot - no blue light. After I install the spi via the spiupdate image the board will boot. Then after some days, I'll reboot the board and it won't boot again until I reflash the SPI memory. - I'm in a bind as this HC4 is our mail server and would like to get it back online for a few more days while I wait for a new HC4. I'd like to boot from the SD card and then use my root filesystem that is on an SSD plugged into one of the SATA ports.

Now I just reflashed the SPI memory and my Ubuntu 22.04 install shows in Petitboot, but then I end up in a busybox shell as it can't find the root filesystem. When I do a blkid the SSD does not show in the output. And if I do a reboot -f from busybox there is no Ubuntu 22.04 install showing in Petitboot.

I've tweaked the boot.ini of a "stock" HC4 Ubuntu image to point to the root filesystem on the SSD and that works. But it is using a 4.9.x kernel and I have a partition on the SSD that is BTRFS, and there is not btrfs module in this stock kernel.

Any ideas how I can use the SD card to boot my Ubuntu 22.04 install on the SSD?

Thanks for any assistance.

Mark

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

Re: Petitboot, yet another bootloader based on KEXEC

Post by tobetter »

Mark1250 wrote:
Sat Oct 21, 2023 3:52 am
I have an HC4 with a SPI memory issue. The board keeps losing the spi data and doesn't boot - no blue light. After I install the spi via the spiupdate image the board will boot. Then after some days, I'll reboot the board and it won't boot again until I reflash the SPI memory. - I'm in a bind as this HC4 is our mail server and would like to get it back online for a few more days while I wait for a new HC4. I'd like to boot from the SD card and then use my root filesystem that is on an SSD plugged into one of the SATA ports.

Now I just reflashed the SPI memory and my Ubuntu 22.04 install shows in Petitboot, but then I end up in a busybox shell as it can't find the root filesystem. When I do a blkid the SSD does not show in the output. And if I do a reboot -f from busybox there is no Ubuntu 22.04 install showing in Petitboot.

I've tweaked the boot.ini of a "stock" HC4 Ubuntu image to point to the root filesystem on the SSD and that works. But it is using a 4.9.x kernel and I have a partition on the SSD that is BTRFS, and there is not btrfs module in this stock kernel.

Any ideas how I can use the SD card to boot my Ubuntu 22.04 install on the SSD?

Thanks for any assistance.

Mark
Can you try the image in the link with your SD card?
http://ppa.linuxfactory.or.kr/images/raw/arm64/jammy/

Mark1250
Posts: 43
Joined: Fri Jan 09, 2015 1:26 am
languages_spoken: english
ODROIDs: U3, XU4, C1+, C2, N2
Has thanked: 3 times
Been thanked: 3 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Mark1250 »

tobetter wrote:
Sat Oct 21, 2023 4:24 am
Mark1250 wrote:
Sat Oct 21, 2023 3:52 am
I have an HC4 with a SPI memory issue. The board keeps losing the spi data and doesn't boot - no blue light. After I install the spi via the spiupdate image the board will boot. Then after some days, I'll reboot the board and it won't boot again until I reflash the SPI memory. - I'm in a bind as this HC4 is our mail server and would like to get it back online for a few more days while I wait for a new HC4. I'd like to boot from the SD card and then use my root filesystem that is on an SSD plugged into one of the SATA ports.

Now I just reflashed the SPI memory and my Ubuntu 22.04 install shows in Petitboot, but then I end up in a busybox shell as it can't find the root filesystem. When I do a blkid the SSD does not show in the output. And if I do a reboot -f from busybox there is no Ubuntu 22.04 install showing in Petitboot.

I've tweaked the boot.ini of a "stock" HC4 Ubuntu image to point to the root filesystem on the SSD and that works. But it is using a 4.9.x kernel and I have a partition on the SSD that is BTRFS, and there is not btrfs module in this stock kernel.

Any ideas how I can use the SD card to boot my Ubuntu 22.04 install on the SSD?

Thanks for any assistance.

Mark
Can you try the image in the link with your SD card?
http://ppa.linuxfactory.or.kr/images/raw/arm64/jammy/
Thanks tobetter for the link and all the work you do.

Apparently there is more wrong with the HC4 than just the SPI memory, as I've booted from the SD card and now I don't see the SSD when I run blkid. - It's there sometimes and as the board boots it disappears.

Time for plan C as both plans A & B have failed :--))(

Mark

Mark1250
Posts: 43
Joined: Fri Jan 09, 2015 1:26 am
languages_spoken: english
ODROIDs: U3, XU4, C1+, C2, N2
Has thanked: 3 times
Been thanked: 3 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Post by Mark1250 »

Plan C (A new HC4) has also failed. - See the comments I have added to the HDD not recognized thread viewtopic.php?f=205&t=44134

Plan D, an M1 with a 5 port SATA x M.2 card with the rootfs on eMMC and my data on 2 SSD's is working great. But definitely more expensive than the HC4.

I'm going to try some older version's of Petitboot when I get some time.

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest