Optimize Boot time to lower than 5 seconds

This question on behalf of @lsionzon, who is working with Toradex for a customer looking to make a smaller and a faster booting Colibri iMX6ULL BSP. Together we could port poky-tiny to make it boot to around just 4-5 seconds, which is one of the customer requirements. The minimum hardware/driver requirements are the following:

  • LCD Display (RGB)
  • Resistive Touch
  • USB (HOST/OTG)
  • Bluetooth
  • SD Card
  • I2C/SPI
  • UART
  • PWM
  • A/D Converter
  • CAN1/2
  • GPIO
  • Watchdog

Hi @jaski.tx ,

I forgot to inform that I’m already using poky-tiny. The quickboot guide was really helpful. The ether is just giving us a hard time.

Hi
Thanks for your Input.
So does this means, you are using Bsp 3.0? If not you should use this?

Best regards,
Jaski

Hi Jaski, I believe they are not: They are using 2.8b6 at most, no 3.0 (The customer was actually using 2.8b3 but we are slowly moving towards 2.8b6. Moving to 3.0 would be overcomplicating).

@lsionzon , as for the “Quickboot guide” do you mean the Word file I sent you or the one in our blog about optimization?

Kind regards,
Alvaro.

Hi,

@jaski.tx We are using 2.8b6.

@alvaro.tx yes, we are using the word file you sent as guide.

Hi @jaski.tx, @alvaro.tx: So what is the issue now?

I forgot to inform that I’m already using poky-tiny.

So which image exactly did you build? Could you provide some information about this?

Best regards,
Jaski

Hi @jaski.tx , we used the core-image-minimal.

I believe that the issue is that we cannot disable the Ethernet driver (and reduce the size of the binary) from the kernel without a kernel panic (@lsionzon correct me if I’m wrong).

@lsionzon:

Have you tried disabling the fec2 node without disabling the kernel driver? Do you see the same behaviour that Jaski’s?

Did you also tried doing so disabling the kernel driver and still get the kernel panic? Can I recommend you removing settings in the menuconfig one by one to try to find the culprit of the kernel panic?

Thanks for your Input.

we used the core-image-minimal.

Which kernel/OpenEmbedded branch did you compile?
Could you share the dmesg log for the core-image-minimal?

Thanks.

@jaski.tx , Sorry for not mentioning this but we are compiling the kernel outside of OE. They are using current toradex_4.9-2.3.x-imx. The kernel binary and the DTB is then later substituted/added to the TEZI image we are using, nothing too crazy.

What we are mostly using poky-tiny (rocko, since it is 2.8) just to create the RFS with a lot of removed stuff.

This was basically a personal decision of starting from the very bottom (poky-tiny) rather than start removing stuff from our Angstrom. Almost everything works except a couple of extra stuff that we are currently solving with the customer.

@lsionzon:

Have you tried disabling the fec2 node without disabling the kernel driver? Do you see the same behaviour that Jaski’s?

Did you also tried doing so disabling the kernel driver and still get the kernel panic? Can I recommend you removing settings in the menuconfig one by one to try to find the culprit of the kernel panic?

Please also share the complete dmesg with us with the kernel panic (not sure if you already did)

@alvaro.tx

I will answer in behalf of @lsionzon

Have you tried disabling the fec2 node
without disabling the kernel driver?
Do you see the same behaviour that
Jaski’s?
→ Yes I have tried to disable fec2 node in imx6ull-colibri.dtsi and set the status = disabled and I am still getting the kernel panic.

Did you also tried doing so disabling
the kernel driver and still get the
kernel panic? Can I recommend you
removing settings in the menuconfig
one by one to try to find the culprit
of the kernel panic?
→ Yes I’ve also tried disabling only the kernel driver and fec2 remains enabled.

Below is the kernel configuration that I modified:

Networking support →
Networking option →
TCP/IP networking
802.1d Ethernet Bridging [ ]
802.1Q/802.lad VLAN Support [ ]
DNS REsolver support < >

Device drivers --> 					
	Network device support -->				
		Network core driver support [ ]			
		Ethernet driver support [ ]			

With both changes, I’m still getting the kernel panic.
I’ve attached the dmesg text file.

link text

Thanks for the update @rsatina .

Can you test if this is also happening with our standard 2.8b6 RFS image? To make sure it is a kernel/DTB issue and not from the poky-tiny image.

Regards,
Alvaro.

Hi @rsatina, although not sure why you are using the older kernel version recipe name, instead of creating a new recipe, you made the proper changes inside.

However, I don’t mean that. I mean: Get the 2.8b6 TEZI default image, change the kernel binary and device tree that fails and check if that fails as well in the default image to confirm that it is not a poky-tiny issue with the kernel. That way we will be able to better help you as we don’t know the details of poky-tiny. If it also fails, then it is an issue with the kernel drivers, etc.

If possible, you should be checking if the kernel changes are working in our own RFS to see if it is merely an issue of the kernel or from poky-tiny.

link text
@alvaro.tx

I have attached the kernel recipe bb file that we are currently using. I think that it is using the standard 2.8b6 RFS.

-RC

@alvaro.tx

I used the Colibiri iMX6ULL and replace the binary and device tree but I did not disable the fec2 from the device tree though. I only disabled the driver from the kernel configuration. I think the same result if I will also disable it from the device tree.

I’ve attached the logs and I am still getting the kernel panic issue.

-RC

link text

@alvaro.tx

I used the Colibiri iMX6ULL and replace the binary and device tree but I did not disable the fec2 from the device tree though. I only disabled the driver from the kernel configuration. I think the same result if I will also disable it from the device tree.

I’ve attached the logs and I am still getting the kernel panic issue.

-RC

link text

Hi @rsatina, please check my comments sent by mail: I believe there are different versions going around, because I tested disabling the options you mentioned and I didn’t even have the warnings…

Hi @rsatina,

can you explain the procedure to build a Poky-Tiny image for Colibri iMX6ULL please?
Did you follow the guide on Toradex blog?
And which layers did you add to Poky to build the image?

Dear @gvnn , welcome to the Toradex Community!

I was helpìng @rsatina with this and I believe he used the following document I drafted as reference (and mentioned they found it useful). Yes, I did use that blog guide mainly, and used Poky-tiny with Poky rocko repositories with some extra changes so that it would also work with Qt. It is not super easy and you would need some knowledge of how the repo and the layers are used and distributed but not heavy changes are needed apart from adding the machine definitions from us and using them.

I hope to have a proper update of the blog myself and post with proper steps but this document it is what I have right now.

It is quite the literature (and never expected to give this or show this to anyone!), but it covers some of the steps I did to get this done. @rsatina used this as base and then added the backports to the image so that they could use WiFi and Bluetooth.

Hope you find it useful. Kind regards, Alvaro.

Thank you very much!
I try to do it right now.

Perfect. Let us know your results.

Best regards,
Jaski