Petitboot, yet another bootloader based on KEXEC

User avatar
tobetter
Posts: 3791
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: 29 times
Been thanked: 130 times
Contact:

Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Tue Feb 19, 2019 3:25 pm

This thread is to port the Petitboot to ODROID-N2, please visit the link if you want to read more detail about the **Petitboot**.
http://ftp.cvut.cz/kernel/people/geoff/ ... tboot.html

Background
ODROID-N2, new SBC from Hardkernel, has the onboard 8MiB SPI flash memory which can directly boot from the CPU, S922X.
What's the major expectation with Petitboot for ODROID-N2 are:
  • Multiple OS boot management
  • Basic functional test of the board (ex: network, gpio, i2c and so on)
  • Firmware update and installation
  • Technically, due to the limit of SPI memory size and new features, we expect to use and implement them using Petitboot Plugin
The Petitboot POC has been started on N1 by @joy and had many interesting from many users.
viewtopic.php?f=155&t=32659

Current status
  • Hardkernel has released the batch of engineering samples and the first build of Petitboot is shipped with them. So you can directly boot from ODROID-N2 without eMMC or MicroSD card.
  • This link would briefly explain to you how the boot order is when Petitboot is involved.
Kknown issues
  • OS in the memory card can boot from Petitboot if the type of the root file system is ext2/3/4. Other file systems are not been tested yet or ramdisk based root file system is not able to be booted and this is not resolved yet.
  • Network boot from Petitboot is disabled. This is because of the Linux kernel size that with network stack, we couldn't fit the kernel image into 8MB SPI flash memory along with other components. Later we have customized the kernel configuration in order to enable IPv4 but have not been tested with Petitboot yet.
  • And other many features are not yet tested
  • Boot setting cannot be stored into SPI flash memory. This is because of the SPI flash memory shares the bus with eMMC which might contain the OS images. In order to access eMMC once Linux kernel up, SPI flash memory has to be off, not success to dynamically switch the devices - eMMC and SPI. This could be a problem that every single time, Petitboot will block the booting since it does not know which OS needs to be up.
We are very welcome if you join this project to improve Petitboot features for ODROID-N2 and can support many users to use the board easily.

Image

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Tue Feb 19, 2019 10:01 pm

Here are some nice resources about petitboot and booting faster:
https://www.youtube.com/watch?v=4JbDb4bRBK4
https://www.youtube.com/watch?v=fTLsS_QZ8us

It's nice that IBM is kind of behind it.

aradralami
Posts: 2
Joined: Sun Feb 24, 2019 12:04 am
languages_spoken: english
Location: Wells
Has thanked: 0
Been thanked: 0
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by aradralami » Sun Feb 24, 2019 1:04 am

mad_ady wrote:
Tue Feb 19, 2019 10:01 pm
Here are some nice resources about petitboot and booting faster:
https://www.youtube.com/watch?v=4JbDb4bRBK4
https://www.youtube.com/watch?v=fTLsS_QZ8us

It's nice that IBM is kind of behind it.
In the age of clustering... caring about the boot time of an individual server is a literal waste of time.
An interesting tech corner no doubt... but no real value in it.

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Sun Feb 24, 2019 1:36 am

I'm guessing there's value for those developing the boot code - the faster it runs, the faster they can test it and the more work they can get done.

brad
Posts: 963
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 H2 (64 bit ftw)
Location: Australia
Has thanked: 15 times
Been thanked: 31 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by brad » Sun Feb 24, 2019 9:08 am

Hi tobetter,
im new to petitboot and doing some reading at the moment. I would like to setup a boot config to select different kernels on boot. ie a standard kernel + a WIP dev kernel. I would like to be able to modify in petitboot:

- 1 or more kernels selectable for boot (either HDMI, console or a gpio button to select)
- Optional kernel parameters selectable (ie kernel parameters selectable such as debug, single CPU mode, etc)
- Ability to log console messages (kernel boot) for later review

Is there any sample configurations for this on N2?

Thanks,
Brad.

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by rooted » Sun Feb 24, 2019 9:11 am

I would just like to be able to use petitboot at all, I get no output on my 4K display.

brad
Posts: 963
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 H2 (64 bit ftw)
Location: Australia
Has thanked: 15 times
Been thanked: 31 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by brad » Sun Feb 24, 2019 9:19 am

rooted wrote:
Sun Feb 24, 2019 9:11 am
I would just like to be able to use petitboot at all, I get no output on my 4K display.
I found my display resolution changes as soon after I select the image to boot from the petitboot menu.

To see how it impacts your display (flying blind), try to press the up arrow 7 times and then enter (if you only have emmc plugged in it should boot the OS on emmc)

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Sun Feb 24, 2019 2:40 pm

Petitboot should read either /etc/kboot.conf or partition1/kboot.conf.
Sample files are in my N1 ubuntu image, though I haven't tried it on N2 yet.

User avatar
tobetter
Posts: 3791
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: 29 times
Been thanked: 130 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Mon Feb 25, 2019 1:05 am

@brad, as @mad_ady mentioned, you can add your own 'kboot.conf' in a file system. Technically, according to the code of Petitboot, it also supports various type of configuration like grub.cfg. So you must be able to have another option to use those but you would manually make them. I have not tested those format except 'kboot.conf' and 'boot.ini'.

SlappyMcPhee
Posts: 85
Joined: Fri Aug 18, 2017 2:09 pm
languages_spoken: english
ODROIDs: XU4 (3 of them)
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by SlappyMcPhee » Tue Feb 26, 2019 5:29 am

Is the only supported input method a keyboard?

Sent from my XT1635-01 using Tapatalk

Owner The Retro Arena and Odroid Retro Arena

User avatar
tobetter
Posts: 3791
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: 29 times
Been thanked: 130 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Tue Feb 26, 2019 5:33 am

SlappyMcPhee wrote:
Tue Feb 26, 2019 5:29 am
Is the only supported input method a keyboard?

Sent from my XT1635-01 using Tapatalk
Do you mean by supporting a mouse? No, as of now, only text-based due to the lack of space of SPI flash memory.

SlappyMcPhee
Posts: 85
Joined: Fri Aug 18, 2017 2:09 pm
languages_spoken: english
ODROIDs: XU4 (3 of them)
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by SlappyMcPhee » Tue Feb 26, 2019 5:38 am

Was curious if the Odroid remote works mainly. Thanks for the speedy response. The bulk of our users would use a dual boot scenario where they would have an install of Elec for media consumption and then our build for retrogaming. We'd also most likely give them the ability in a triple where they could also boot to desktop. Of course for the triple boot people would have a keyboard anyway, but in the dual boot scenario it would be hit or miss as many users do not run emulation that requires a keyboard.

Sent from my XT1635-01 using Tapatalk

Owner The Retro Arena and Odroid Retro Arena

User avatar
tobetter
Posts: 3791
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: 29 times
Been thanked: 130 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Tue Feb 26, 2019 10:01 am

SlappyMcPhee wrote:Was curious if the Odroid remote works mainly. Thanks for the speedy response. The bulk of our users would use a dual boot scenario where they would have an install of Elec for media consumption and then our build for retrogaming. We'd also most likely give them the ability in a triple where they could also boot to desktop. Of course for the triple boot people would have a keyboard anyway, but in the dual boot scenario it would be hit or miss as many users do not run emulation that requires a keyboard.

Sent from my XT1635-01 using Tapatalk
Hahaha, as I mentioned due to the lack of size of the SPI flash memory the firmware is not able to support many features. The current status is that if you have different OS on eMMC or SD card, you can select one of them from Petitboot menu. I guess multiple OS in a single memory card case would work as well.

Tapatalk wishes you to have fun with ODROID.


elatllat
Posts: 1438
Joined: Tue Sep 01, 2015 8:54 am
languages_spoken: english
ODROIDs: XU4, N1, N2
Has thanked: 13 times
Been thanked: 28 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by elatllat » Tue Feb 26, 2019 11:04 am

One could put Petitboot on the sdcard with more features... but likely better to just have everything in one OS.

User avatar
tobetter
Posts: 3791
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: 29 times
Been thanked: 130 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Tue Feb 26, 2019 11:54 am

elatllat wrote:
Tue Feb 26, 2019 11:04 am
One could put Petitboot on the sdcard with more features... but likely better to just have everything in one OS.
+1 good to have for XU4 or C2 when Petitboot is built well

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Tue Feb 26, 2019 2:16 pm

Hmm, I wonder if one could make ir work via plugins... E.g. package a lirc plugin that gets downloaded/enabled on boot that would make the menu react to ir events shortly after... Of course, the kernel needs ir support - not sure how much that costs...
CEC might be a thing as well...

User avatar
tobetter
Posts: 3791
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: 29 times
Been thanked: 130 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Tue Feb 26, 2019 2:33 pm

mad_ady wrote:
Tue Feb 26, 2019 2:16 pm
Hmm, I wonder if one could make ir work via plugins... E.g. package a lirc plugin that gets downloaded/enabled on boot that would make the menu react to ir events shortly after... Of course, the kernel needs ir support - not sure how much that costs...
CEC might be a thing as well...
HK stock IR works as is, but LIRC is little bit different story. :)

sky4490
Posts: 9
Joined: Fri Feb 24, 2017 5:43 pm
languages_spoken: english
ODROIDs: odroid xu4
odroid n2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by sky4490 » Sun Apr 07, 2019 3:36 pm

i have a question: 1. Does that mean we can just use petitboot without uboot to boot n2 system ? or we still need u-boot to initial boot system ?

2. While i compiler uboot for n2, i found that the script sd_fusing.sh just write u-boot.bin to storage device. On odroid-XU4 experience , we also need to write bl1.bin , bl2.bin and tzsw.bin into storage device. When we compiler n2 u-boot there still got u-boot.bin.sd.bin , u-boot.bin.usb.bl2 and u-boot.bin.usb.tpl. So , is that any bug on sd_fusing.sh ?

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Sun Apr 07, 2019 5:05 pm

1. Uboot (from SPI flash) loads a minimal linux kernel and the petitboot userspace program that kexecs into a new kernel/userspace

User avatar
tobetter
Posts: 3791
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: 29 times
Been thanked: 130 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Sun Apr 07, 2019 5:10 pm


sky4490 wrote:i have a question: 1. Does that mean we can just use petitboot without uboot to boot n2 system ? or we still need u-boot to initial boot system ?

2. While i compiler uboot for n2, i found that the script sd_fusing.sh just write u-boot.bin to storage device. On odroid-XU4 experience , we also need to write bl1.bin , bl2.bin and tzsw.bin into storage device. When we compiler n2 u-boot there still got u-boot.bin.sd.bin , u-boot.bin.usb.bl2 and u-boot.bin.usb.tpl. So , is that any bug on sd_fusing.sh ?
1. U-boot is required to boot from SD or eMMC, and SPI has U-boot already. If N2 system requires to boot once Petitboot, no need to care about U-boot.
2. BL1, BL2 and TZSW.bin are for Exynos based ODROID, so not related at all. N2 also have such blobs, they are all combined into single image which is sdcard/u-boot.bin and it can be flashed by sd_fuse.sh.

Tapatalk wishes you to have fun with ODROID.


sky4490
Posts: 9
Joined: Fri Feb 24, 2017 5:43 pm
languages_spoken: english
ODROIDs: odroid xu4
odroid n2
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by sky4490 » Mon Apr 08, 2019 3:32 pm

tobetter wrote:
Sun Apr 07, 2019 5:10 pm
sky4490 wrote:i have a question: 1. Does that mean we can just use petitboot without uboot to boot n2 system ? or we still need u-boot to initial boot system ?

2. While i compiler uboot for n2, i found that the script sd_fusing.sh just write u-boot.bin to storage device. On odroid-XU4 experience , we also need to write bl1.bin , bl2.bin and tzsw.bin into storage device. When we compiler n2 u-boot there still got u-boot.bin.sd.bin , u-boot.bin.usb.bl2 and u-boot.bin.usb.tpl. So , is that any bug on sd_fusing.sh ?
1. U-boot is required to boot from SD or eMMC, and SPI has U-boot already. If N2 system requires to boot once Petitboot, no need to care about U-boot.
2. BL1, BL2 and TZSW.bin are for Exynos based ODROID, so not related at all. N2 also have such blobs, they are all combined into single image which is sdcard/u-boot.bin and it can be flashed by sd_fuse.sh.

Tapatalk wishes you to have fun with ODROID.
So if i wan to build an devuan OS on n2 , i still need to copy u-boot.bin.sd.bin to micro sd card (by modify sd_fusing.sh use u-boot.sd.bin replace u-boot.bin) , right?

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Mon Apr 08, 2019 4:41 pm

Just as a FYI - I flashed the N2 Mate image on an old SSD which is connected via USB to the N2 and booted just fine to it via petitboot.

User avatar
tobetter
Posts: 3791
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: 29 times
Been thanked: 130 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Mon Apr 08, 2019 6:18 pm

Guys, please give me a half day to sort out the boot issue. I've found an issue which caused by me and trying to solve out and hope to be done in 12 hours with the right instruction.
Thank you for your understanding and sorry for making a problem. :cry:

phaseshifter
Posts: 3464
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 37 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Mon Apr 08, 2019 6:54 pm

could you please make this a sticky and we can all collaborate on a single thread...???? somehow make it known.... just like you have thread topics in your menus..???
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

User avatar
tobetter
Posts: 3791
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: 29 times
Been thanked: 130 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Mon Apr 08, 2019 7:47 pm

Please find the update note for Petitboot (dev-20190408),
https://wiki.odroid.com/odroid-n2/os_im ... _petitboot

There is no significant update but kindly recommend to update with new Petitboot.
There are two methods to update Petitboot and instructed how SPI flash memory can be updated in the Wiki, please don't hesitate to scold me if anything wrong.

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Mon Apr 08, 2019 7:53 pm

Oh, so that I don't forget - the autoresize script /aafirstboot only looks for mmcblk when doing its resizing, so it left me with an unresized rootfs.

Code: Select all

root@odroid:~# fdisk -l /dev/sda
Disk /dev/sda: 46.6 GiB, 50020540416 bytes, 97696368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x03823826

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sda1         2048   264191   262144  128M  c W95 FAT32 (LBA)
/dev/sda2       264192 12920831 12656640    6G 83 Linux

root@odroid:~# p2_start=`fdisk -l /dev/sda | grep sda2 | awk '{print $2}'`
root@odroid:~# p2_finish=`fdisk -l /dev/sda | grep sectors | awk '{print $5}'`
root@odroid:~# echo $p2_start
264192
root@odroid:~# echo $p2_finish
50020540416 *

root@odroid:~# fdisk /dev/sda

Welcome to fdisk (util-linux 2.31.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): p
Disk /dev/sda: 46.6 GiB, 50020540416 bytes, 97696368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x03823826

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sda1         2048   264191   262144  128M  c W95 FAT32 (LBA)
/dev/sda2       264192 12920831 12656640    6G 83 Linux

Command (m for help): d
Partition number (1,2, default 2): 2

Partition 2 has been deleted.

Command (m for help): n
Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (264192-97696367, default 264192): 264192
Last sector, +sectors or +size{K,M,G,T,P} (264192-97696367, default 97696367): 

Created a new partition 2 of type 'Linux' and of size 46.5 GiB.
Partition #2 contains a ext4 signature.

Do you want to remove the signature? [Y]es/[N]o: n

Command (m for help): p

Disk /dev/sda: 46.6 GiB, 50020540416 bytes, 97696368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x03823826

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sda1         2048   264191   262144  128M  c W95 FAT32 (LBA)
/dev/sda2       264192 97696367 97432176 46.5G 83 Linux

Command (m for help): w
The partition table has been altered.
Syncing disks.

root@odroid:~# resize2fs /dev/sda2
resize2fs 1.44.1 (24-Mar-2018)
Filesystem at /dev/sda2 is mounted on /media/usb0; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 3
The filesystem on /dev/sda2 is now 12179022 (4k) blocks long.

root@odroid:~# df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        46G  4.6G   40G  11% /

User avatar
tobetter
Posts: 3791
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: 29 times
Been thanked: 130 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Mon Apr 08, 2019 7:57 pm

phaseshifter wrote:
Mon Apr 08, 2019 6:54 pm
could you please make this a sticky and we can all collaborate on a single thread...???? somehow make it known.... just like you have thread topics in your menus..???
I do not have the permission, maybe odroid will do that if he agrees.

brad
Posts: 963
Joined: Tue Mar 29, 2016 1:22 pm
languages_spoken: english
ODROIDs: C2 N1 N2 H2 (64 bit ftw)
Location: Australia
Has thanked: 15 times
Been thanked: 31 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by brad » Mon Apr 08, 2019 8:00 pm

tobetter wrote:
Mon Apr 08, 2019 7:47 pm

There are two methods to update Petitboot and instructed how SPI flash memory can be updated in the Wiki, please don't hesitate to scold me if anything wrong.
@tobetter, I strongly support your efforts for petitboot and its development so far. I think we all need to be a little patient and understand its a new feature which will take some time for full up bring and to harness its full capabilities.

Keep up the good work!

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Mon Apr 08, 2019 8:57 pm

Ok, I flashed the SPI update SD image and ran the update process. It goes in a loop (probably keeps flashing SPI). The thing is - boot happens fast, not sure if SPI got updated:

Code: Select all

reset...
G12B:BL:6e7c85:7898ac;FEAT:E0F83180:2000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:0;READ:0;0.4
                                                                                           bl2_stage_init 0x01
bl2_stage_init 0x81
hw id: 0x0000 - pwm id 0x01
bl2_stage_init 0xc1
bl2_stage_init 0x02

no sdio debug board detected
L0:00000000
L1:00000703
L2:00008067
L3:04000000
B2:00002000
B1:e0f83180

TE: 148977

BL2 Built : 10:47:19, Jan 14 2019. g12b g152d217 - guotai.shen@droid11-sz

Board ID = 3
Set A53 clk to 24M
Set A73 clk to 24M
Set clk81 to 24M
A53 clk: 1200 MHz
A73 clk: 1200 MHz
CLK81: 166.6M
smccc: 00028e82
DDR driver_vesion: LPDDR4_PHY_V_0_1_11 build time: Jan 14 2019 10:47:15
board id: 3
Load FIP HDR from SD, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0
fw parse done
Load ddrfw from SD, src: 0x00030200, des: 0xfffd0000, size: 0x0000c000, part: 0
Load ddrfw from SD, src: 0x0002c200, des: 0xfffd0000, size: 0x00004000, part: 0
PIEI prepare done
Cfg max: 2, cur: 1. Board id: 255. Force loop cfg
DDR4 probe
ddr clk to 1320MHz
Load ddrfw from SD, src: 0x00014200, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of read enable training
INFO : End of fine write leveling
INFO : End of read dq deskew training
INFO : End of MPR read delay center optimization
INFO : End of Write leveling coarse delay
INFO : End of write delay center optimization
INFO : End of read delay center optimization
INFO : End of max read latency training
INFO : Training has run successfully!
1D training succeed
Load ddrfw from SD, src: 0x00020200, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of 2D read delay Voltage center optimization
INFO : End of 2D write delay Voltage center optimization
INFO : Training has run successfully!

R0_RxClkDly_Margin==82 ps 7
R0_TxDqDly_Margi==94 ps 8


R1_RxClkDly_Margin==0 ps 0
R1_TxDqDly_Margi==0 ps 0

 dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0001

 ddr scramble enable
2D training succeed
auto size-- 65535DDR cs0 size: 2048MB
DDR cs1 size: 2048MB
DMC_DDR_CTRL: 00600024DDR size: 3928MB
cs0 DataBus test pass
cs1 DataBus test pass
cs0 AddrBus test pass
cs1 AddrBus test pass
 pre test  bdlr_100_average==491 bdlr_100_min==491 bdlr_100_max==491 bdlr_100_cur==491
 aft test  bdlr_100_average==491 bdlr_100_min==491 bdlr_100_max==491 bdlr_100_cur==491
100bdlr_step_size ps== 485
result report
boot times 6Enable ddr reg access
Load FIP HDR from SD, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 0
FIP HDR CHK: 0xffffff9e ADDR 0x01700000
reset...
G12B:BL:6e7c85:7898ac;FEAT:E0F83180:2000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:0;READ:0;0.4
                                                                                           bl2_stage_init 0x01

Edit: it didn't seem to be updated (it still had the random MAC issue I reported a while ago). Is there a way to flash it to SPI with dd from within linux (booted from SD/HDD)?

Code: Select all

root@odroid:~# cat /proc/mtd  
dev:    size   erasesize  name
Or is this not possible since emmc disabled spi even if there is no emmc attached?

User avatar
tobetter
Posts: 3791
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: 29 times
Been thanked: 130 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Mon Apr 08, 2019 9:14 pm

mad_ady wrote:
Mon Apr 08, 2019 8:57 pm
Ok, I flashed the SPI update SD image and ran the update process. It goes in a loop (probably keeps flashing SPI). The thing is - boot happens fast, not sure if SPI got updated:

Code: Select all

reset...
G12B:BL:6e7c85:7898ac;FEAT:E0F83180:2000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:0;READ:0;0.4
                                                                                           bl2_stage_init 0x01
bl2_stage_init 0x81
hw id: 0x0000 - pwm id 0x01
bl2_stage_init 0xc1
bl2_stage_init 0x02

no sdio debug board detected
L0:00000000
L1:00000703
L2:00008067
L3:04000000
B2:00002000
B1:e0f83180

TE: 148977

BL2 Built : 10:47:19, Jan 14 2019. g12b g152d217 - guotai.shen@droid11-sz

Board ID = 3
Set A53 clk to 24M
Set A73 clk to 24M
Set clk81 to 24M
A53 clk: 1200 MHz
A73 clk: 1200 MHz
CLK81: 166.6M
smccc: 00028e82
DDR driver_vesion: LPDDR4_PHY_V_0_1_11 build time: Jan 14 2019 10:47:15
board id: 3
Load FIP HDR from SD, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0
fw parse done
Load ddrfw from SD, src: 0x00030200, des: 0xfffd0000, size: 0x0000c000, part: 0
Load ddrfw from SD, src: 0x0002c200, des: 0xfffd0000, size: 0x00004000, part: 0
PIEI prepare done
Cfg max: 2, cur: 1. Board id: 255. Force loop cfg
DDR4 probe
ddr clk to 1320MHz
Load ddrfw from SD, src: 0x00014200, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of read enable training
INFO : End of fine write leveling
INFO : End of read dq deskew training
INFO : End of MPR read delay center optimization
INFO : End of Write leveling coarse delay
INFO : End of write delay center optimization
INFO : End of read delay center optimization
INFO : End of max read latency training
INFO : Training has run successfully!
1D training succeed
Load ddrfw from SD, src: 0x00020200, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of 2D read delay Voltage center optimization
INFO : End of 2D write delay Voltage center optimization
INFO : Training has run successfully!

R0_RxClkDly_Margin==82 ps 7
R0_TxDqDly_Margi==94 ps 8


R1_RxClkDly_Margin==0 ps 0
R1_TxDqDly_Margi==0 ps 0

 dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0001

 ddr scramble enable
2D training succeed
auto size-- 65535DDR cs0 size: 2048MB
DDR cs1 size: 2048MB
DMC_DDR_CTRL: 00600024DDR size: 3928MB
cs0 DataBus test pass
cs1 DataBus test pass
cs0 AddrBus test pass
cs1 AddrBus test pass
 pre test  bdlr_100_average==491 bdlr_100_min==491 bdlr_100_max==491 bdlr_100_cur==491
 aft test  bdlr_100_average==491 bdlr_100_min==491 bdlr_100_max==491 bdlr_100_cur==491
100bdlr_step_size ps== 485
result report
boot times 6Enable ddr reg access
Load FIP HDR from SD, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 0
FIP HDR CHK: 0xffffff9e ADDR 0x01700000
reset...
G12B:BL:6e7c85:7898ac;FEAT:E0F83180:2000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:0;READ:0;0.4
                                                                                           bl2_stage_init 0x01

Edit: it didn't seem to be updated (it still had the random MAC issue I reported a while ago). Is there a way to flash it to SPI with dd from within linux (booted from SD/HDD)?

Code: Select all

root@odroid:~# cat /proc/mtd  
dev:    size   erasesize  name
Or is this not possible since emmc disabled spi even if there is no emmc attached?
I guess somehow the updating is failed. If updating procedure is correct, you should have this logs and you must be able to see the progress in HDMI display.
$ sudo dd if=spiupdate_odroidn2_20190408+85.img of=/dev/disk/by-id/usb-TS-RDF5_SD_Transcend_000000000039-0\:0 conv=fsync
[sudo] password for tobetter:
47376+0 records in
47376+0 records out
24256512 bytes (24 MB, 23 MiB) copied, 4.6861 s, 5.2 MB/s

Code: Select all

G12B:BL:6e7c85:7898ac;FEAT:E0F83180:2000;POC:F;RCY:0;EMMC:800;NAND:81;SD?:0;SD:0;READ:0;0.4
                                                                                                    bl2_stage_ini1
bl2_stage_init 0x81
hw id: 0x0000 - pwm id 0x01
bl2_stage_init 0xc1
bl2_stage_init 0x02

no sdio debug board detected 
L0:00000000
L1:00000703
L2:00008067
L3:04000000
B2:00002000
B1:e0f83180

TE: 371840

BL2 Built : 10:47:19, Jan 14 2019. g12b g152d217 - guotai.shen@droid11-sz

Board ID = 3
Set A53 clk to 24M
Set A73 clk to 24M
Set clk81 to 24M
A53 clk: 1200 MHz
A73 clk: 1200 MHz
CLK81: 166.6M
smccc: 0005f511
DDR driver_vesion: LPDDR4_PHY_V_0_1_11 build time: Jan 14 2019 10:47:15
board id: 3
Load FIP HDR from SD, src: 0x00010200, des: 0xfffd0000, size: 0x00004000, part: 0
fw parse done
Load ddrfw from SD, src: 0x00030200, des: 0xfffd0000, size: 0x0000c000, part: 0
Load ddrfw from SD, src: 0x0002c200, des: 0xfffd0000, size: 0x00004000, part: 0
PIEI prepare done
Cfg max: 2, cur: 1. Board id: 255. Force loop cfg
DDR4 probe
ddr clk to 1320MHz
Load ddrfw from SD, src: 0x00014200, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of read enable training
INFO : End of fine write leveling
INFO : End of read dq deskew training
INFO : End of MPR read delay center optimization
INFO : End of Write leveling coarse delay
INFO : End of write delay center optimization
INFO : End of read delay center optimization
INFO : End of max read latency training
INFO : Training has run successfully!
1D training succeed
Load ddrfw from SD, src: 0x00020200, des: 0xfffd0000, size: 0x0000c000, part: 0
Check phy result
INFO : End of initialization
INFO : End of 2D read delay Voltage center optimization
INFO : End of 2D write delay Voltage center optimization
INFO : Training has run successfully!

R0_RxClkDly_Margin==94 ps 8
R0_TxDqDly_Margi==106 ps 9


R1_RxClkDly_Margin==0 ps 0
R1_TxDqDly_Margi==0 ps 0

 dwc_ddrphy_apb_wr((0<<20)|(2<<16)|(0<<12)|(0xb0):0001 

 ddr scramble enable 
2D training succeed
auto size-- 65535DDR cs0 size: 2048MB
DDR cs1 size: 2048MB
DMC_DDR_CTRL: 00600024DDR size: 3928MB
cs0 DataBus test pass
cs1 DataBus test pass
cs0 AddrBus test pass
cs1 AddrBus test pass
 pre test  bdlr_100_average==461 bdlr_100_min==461 bdlr_100_max==461 bdlr_100_cur==461
 aft test  bdlr_100_average==461 bdlr_100_min==461 bdlr_100_max==461 bdlr_100_cur==461
100bdlr_step_size ps== 467
result report
boot times 0Enable ddr reg access
Load FIP HDR from SD, src: 0x00010200, des: 0x01700000, size: 0x00004000, part: 0
Load BL3X from SD, src: 0x0003c200, des: 0x0172c000, size: 0x00098000, part: 0
0.0;M3 CHK:0;cm4_sp_mode 0
E30HDR
MVN_1=0x00000000
MVN_2=0x00000000
[Image: g12b_v1.1.3375-8f9c8a7 2019-01-24 10:44:46 guotai.shen@droid11-sz]
OPS=0x40
ring efuse init
chipver efuse init
29 0a 40 00 01 03 17 00 00 19 34 37 57 4e 4b 50 
[0.019924 Inits done]
secure task start!
high task start!
low task start!
run into bl31
NOTICE:  BL31: v1.3(release):ab8811b
NOTICE:  BL31: Built : 15:03:31, Feb 12 2019
NOTICE:  BL31: G12A normal boot!
NOTICE:  BL31: BL33 decompress pass
ERROR:   Error initializing runtime service opteed_fast


U-Boot 2015.01 (Apr 08 2019 - 03:40:07)

DRAM:  3.5 GiB
Relocation Offset is: d6ef5000
spi_post_bind(spifc): req_seq = 0
register usb cfg[0][1] = 00000000d7f86728
MMC:   aml_priv->desc_buf = 0x00000000d3ee57c0
aml_priv->desc_buf = 0x00000000d3ee7b00
SDIO Port C: 0, SDIO Port B: 1
card in
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 40000000
aml_sd_retry_refix[983]:delay = 0x0,gadjust =0x12000
[mmc_startup] mmc refix success
[mmc_init] mmc init success
In:    serial
Out:   serial
Err:   serial
vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters
vpu: clk_level = 7
vpu: set clk: 666667000Hz, readback: 666666667Hz(0x100)
vpu: vpu_clk_gate_init_off finish
vpp: vpp_init
vpp: g12a/b osd1 matrix rgb2yuv ..............
vpp: g12a/b osd2 matrix rgb2yuv..............
vpp: g12a/b osd3 matrix rgb2yuv..............
cvbs_config_hdmipll_g12a
cvbs_set_vid2_clk
reading boot-logo.bmp.gz
** Unable to read file boot-logo.bmp.gz **
reading boot-logo.bmp
** Unable to read file boot-logo.bmp **
movi: not registered partition name, logo
movi - Read/write command from/to SD/MMC for ODROID board

Usage:
movi <read|write> <partition|sector> <offset> <address> [<length>]
    - <read|write>  the command to access the storage
    - <offset>  the offset from the start of given partiton in lba
    - <address>  the memory address to load/store from/to the storage device
    - [<length>]  the size of the block to read/write in bytes
    - all parameters must be hexa-decimal only

[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]set initrd_high: 0x3d800000
[OSD]fb_addr for logo: 0x3d800000
[OSD]check dts: FDT_ERR_BADMAGIC, load default fb_addr parameters
[OSD]fb_addr for logo: 0x3d800000
[OSD]VPP_OFIFO_SIZE:0xfff01fff
[CANVAS]canvas init
[CANVAS]addr=0x3d800000 width=5760, height=2160
[OSD]wait_vsync_wakeup exit
cvbs: outputmode[1080p60hz] is invalid
vpp: vpp_matrix_update: 2
set hdmitx VIC = 16
config HPLL = 5940000 frac_rate = 1
HPLL: 0x3b3a04f7
HPLL: 0x1b3a04f7
HPLLv1: 0xdb3a04f7
config HPLL done
j = 6  vid_clk_div = 1
hdmitx phy setting done
hdmitx: set enc for VIC: 16
enc_vpu_bridge_reset[1312]
rx version is 1.4 or below  div=10
Net:   dwmac.ff3f0000
Hit Enter or space or Ctrl+C key to stop autoboot -- :  0 
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
co-phase 0x3, tx-dly 0, clock 400000
emmc/sd response timeout, cmd8, status=0x1ff2800
emmc/sd response timeout, cmd55, status=0x1ff2800
emmc/sd response timeout, cmd1, status=0x1ff2800
** Bad device mmc 0 **
## Executing script at 01000000
Wrong image format for "source" command
reading boot.ini
995 bytes read in 4 ms (242.2 KiB/s)
## Executing script at 01000000
reading uImage
3615093 bytes read in 203 ms (17 MiB/s)
reading rootfs.cpio.uboot
2904681 bytes read in 164 ms (16.9 MiB/s)
reading meson64_odroidn2_spibios.dtb
68307 bytes read in 10 ms (6.5 MiB/s)
ee_gate_off ...
## Booting kernel from Legacy Image at 04000000 ...
   Image Name:   
   Image Type:   AArch64 Linux Kernel Image (gzip compressed)
   Data Size:    3615029 Bytes = 3.4 MiB
   Load Address: 01080000
   Entry Point:  01080000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 03080000 ...
   Image Name:   
   Image Type:   AArch64 Linux RAMDisk Image (uncompressed)
   Data Size:    2904617 Bytes = 2.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
load dtb from 0x1000000 ......
## Flattened Device Tree blob at 01000000
   Booting using the fdt blob at 0x1000000
   Uncompressing Kernel Image ... OK
   kernel loaded at 0x01080000, end = 0x01903808
   reserving fdt memory region: addr=1000000 size=11000
   Loading Ramdisk to 3d53a000, end 3d7ff229 ... OK
   Loading Device Tree to 000000001ffec000, end 000000001fffffff ... OK

Starting kernel ...

uboot time: 7694995 us


phaseshifter
Posts: 3464
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 37 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Mon Apr 08, 2019 11:41 pm

you should maybe have a look at @maddy`s posts and my posts for the n-1...we were flashing ..it has to be done in 2K chunks from memory ..look`s like your getting there though..

i think we used sd fuse or something...
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Tue Apr 09, 2019 12:11 am

@phaseshifter - I don't think the tests we did on the N1 are still relevant for the N2...
I'll try again tomorrow (was using an old 64M card for tests)

phaseshifter
Posts: 3464
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 37 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Tue Apr 09, 2019 7:04 am

oh ok ..i was more leaning towards the sd-fuse or what ever the program we used to actually flash the spi chip with..
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Tue Apr 09, 2019 3:42 pm

@tobetter: I reflashed the same image to a 16G SD (as opposed to 64MB as I used yesterday) and now the update process worked fine. I could see progress over HDMI. Would be nice if you could echo some messages to serial as well during the update process. You don't need to send the whole progress bar, just some start/stop messages would be nice. Though, to use petitboot you need to use HDMI anyway, so, nevermind :D

P.S. The non-sticking MAC address bug is now fixed :)
These users thanked the author mad_ady for the post:
tobetter (Tue Apr 09, 2019 3:54 pm)

User avatar
tobetter
Posts: 3791
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: 29 times
Been thanked: 130 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Tue Apr 09, 2019 3:55 pm

mad_ady wrote:
Tue Apr 09, 2019 3:42 pm
@tobetter: I reflashed the same image to a 16G SD (as opposed to 64MB as I used yesterday) and now the update process worked fine. I could see progress over HDMI. Would be nice if you could echo some messages to serial as well during the update process. You don't need to send the whole progress bar, just some start/stop messages would be nice. Though, to use petitboot you need to use HDMI anyway, so, nevermind :D

P.S. The non-sticking MAC address bug is now fixed :)
Yay!!!

phaseshifter
Posts: 3464
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 37 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Wed Apr 10, 2019 5:06 pm

i flashed the spi chip ..it still wont boot my ssd..anyway ...i then flashed an 8Gb usb stick petitboot foune the stick so i went ahead..but before i did that i added to the boot arg`s in boot,ini file console-tty0..but i am yet to see the dmesg at start up..anyway it booted it never expanded the rootfs but it did boot..i only have very old usb stics very slow.. ...so i loaded up gparted exp`d the rootfs.. now i`m waiting for the apt update to finish.. almost there 2 hours later..just finished now i will reboot it..booted well 5-8 mins later..but it does boot and i have mate desktop on my screen but it is extremly slow to do anything..i await spare parts as to say bit`s and pieces ...phase
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Wed Apr 10, 2019 7:41 pm

@phaseshifter - if you plugin your ssd after usb boot are you able to access it correctly?

phaseshifter
Posts: 3464
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 37 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Wed Apr 10, 2019 8:21 pm

i think so not 100% shore..but it wont boot from it ..stand alone..i can get it to boot from well read the rootfs along side any media and it will read the rootfs of the ssd and write to it ..it will not resize it though

did you mean after booting from usb try boot the ssd along/next instead of the usb stick..??
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

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

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by mad_ady » Wed Apr 10, 2019 8:26 pm

Not instead of the USB stick, along side - just to make sure the odroid can access it correctly.

phaseshifter
Posts: 3464
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 37 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Wed Apr 10, 2019 8:27 pm

oh it can i have had it read and write to it..give me 5 pls i`ll hook it up

yes i can read it
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

indium
Posts: 93
Joined: Thu May 28, 2015 2:27 pm
languages_spoken: english, ukrainian
Location: Ukraine
Has thanked: 0
Been thanked: 1 time
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by indium » Thu Apr 18, 2019 6:13 am

I am wondering, is this petitboot thing a sign, that Amlogic does nothing in the UEFI direction? I mean, don't you know, do they work on edk2 porting to their SoCs? I understand, I'm addressing the question the wrong way, but they don't answer anyway. :D It's pitty, that they don't (work on edk2 porting). Because honestly, all these half assed "yet other loaders" is a strong PITA (for both developers and users). more room for other projects on the bright side. :D By the way, does uboot, provided by hardkernel, have UEFI support (at least that one, it can)? does 'bootefi' command show up?

User avatar
tobetter
Posts: 3791
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: 29 times
Been thanked: 130 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Thu Apr 18, 2019 10:53 am

indium wrote:
Thu Apr 18, 2019 6:13 am
I am wondering, is this petitboot thing a sign, that Amlogic does nothing in the UEFI direction? I mean, don't you know, do they work on edk2 porting to their SoCs? I understand, I'm addressing the question the wrong way, but they don't answer anyway. :D It's pitty, that they don't (work on edk2 porting). Because honestly, all these half assed "yet other loaders" is a strong PITA (for both developers and users). more room for other projects on the bright side. :D By the way, does uboot, provided by hardkernel, have UEFI support (at least that one, it can)? does 'bootefi' command show up?
Petitboot is not relevant with AMLogic at all, it's choice of Hardkernel for the demand of ODROID users since ODROID-N1.
I guess AMlogic is not working on EDK2 as of today, but I am also wondering...so I would check if they do. Or one from BayLibre could response on this?
We have not tested UEFI with the current U-boot which is based on the version 2015.01, and it is the earlier version supporting UEFI 64 bit my understanding is that UEFI is supported since 2016. Correct me if I am wrong. The command bootefi is missing in the U-boot source tree.

phaseshifter
Posts: 3464
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 37 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Fri Apr 19, 2019 6:18 pm

is the hdd issue related to size ...because with the emmc usb reader card and 16 Gb chip petitboot see`s the emmc module as an hdd sda1/2 etc..
and i can boot from it a as sda1 it resizes even but none of my hdd`s are working with petitboot ..i`m lost...
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

User avatar
tobetter
Posts: 3791
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: 29 times
Been thanked: 130 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Fri Apr 19, 2019 6:22 pm

phaseshifter wrote:
Fri Apr 19, 2019 6:18 pm
is the hdd issue related to size ...because with the emmc usb reader card and petitboot see`s the emmc module as an hdd sda1/2 etc..
I don't think it's the size matter. eMMC with USB card reader is treated as regular USB storage while HDD with SATA bridge is more than USB storage which implies that SATA bridge is not working with the kernel. Maybe a driver is missing? What's the version of your Petitboot today?

phaseshifter
Posts: 3464
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 37 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Fri Apr 19, 2019 6:27 pm

this one 0417.95........i have new hardware arriving soon Easter holiday`s to factor into it... :cry:

ok what i was also trying to say that it can read "sda1,sda2 etc.. it does not seem to differentiate or care what kind of partition type it is being "sda" etc..and mmcblk0p1...for instance...
Last edited by phaseshifter on Fri Apr 19, 2019 6:39 pm, edited 1 time in total.
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

User avatar
tobetter
Posts: 3791
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: 29 times
Been thanked: 130 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Fri Apr 19, 2019 6:39 pm

phaseshifter wrote:
Fri Apr 19, 2019 6:27 pm
this one 0417.95........i have new hardware arriving soon Easter holiday`s to factor into it... :cry:
Would you try the new version 20190417??
https://wiki.odroid.com/odroid-n2/os_im ... ev20190417

Also would be able to capture your SSD bridge chipset and post here?

phaseshifter
Posts: 3464
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 37 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Fri Apr 19, 2019 6:44 pm

how do i do that dmesg some where..?? sozz noob question..
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

phaseshifter
Posts: 3464
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 37 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Fri Apr 19, 2019 7:01 pm

Code: Select all

*-usb                   
       description: Mass storage device
       product: USB to ATA/ATAPI Bridge
       vendor: JMicron
       physical id: 2
       bus info: usb@9:2
       logical name: scsi5
       version: 0.00
       serial: 000012345678
       capabilities: usb-3.00 scsi
       configuration: driver=uas maxpower=8mA speed=5000Mbit/s
     *-disk

Code: Select all

*-disk
          description: SCSI Disk
          product: Pyro
          vendor: Patriot
          physical id: 0.0.0
          bus info: scsi@5:0.0.0
          logical name: /dev/sdc
          version: 0100
          serial: 000012345678
          size: 111GiB (120GB)
          capabilities: partitioned partitioned:dos
          configuration: ansiversion=6 logicalsectorsize=512 sectorsize=4096 signature=03823826
Last edited by phaseshifter on Fri Apr 19, 2019 7:02 pm, edited 1 time in total.
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

User avatar
tobetter
Posts: 3791
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: 29 times
Been thanked: 130 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by tobetter » Fri Apr 19, 2019 7:02 pm

phaseshifter wrote:
Fri Apr 19, 2019 6:44 pm
how do i do that dmesg some where..?? sozz noob question..
In Petitboot? No way...why...because KMSG feature is off in the Linux kernel for Petitboot in order to fit the Linux image into 8MB memory with ramdisk.

phaseshifter
Posts: 3464
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: U-2,U3+,,XU-3,,XU3-LITE,,XU-4
C1+,,C-2,,,
N-1,,N-2,...other odroid acc`s as well
Has thanked: 37 times
Been thanked: 42 times
Contact:

Re: Petitboot, yet another bootloader based on KEXEC

Unread post by phaseshifter » Fri Apr 19, 2019 7:10 pm

is that what you wanted..??
Build It And They Will Come...Be Bold And Mighty Forces Will Come To Your Aid..!!!

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 0 guests