Help Updating my RFS

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

AleFachini
Posts: 17
Joined: Tue May 30, 2017 7:41 pm

Help Updating my RFS

Fri Sep 21, 2018 10:32 pm

Hello Again:

I started some months ago working with embedded Linux on SAM9x35. I'm working with an old version of kernel(2.4) which boots a jffs2 Image.
The time until my APPLICATION is loaded is almost 12 Seconds. I need to reduce this time.
I understand that i could USE the *.ubi RFS insteadm which loads Faster.

My problem is that I cant "know" whats on my kernel because is a binary file that i received precompiled. What i Can do is access console after Linux Booted.

So to the Question:
Is there a way to List all features inside my Kernel and my RFS to produce a new kernel and new RFS image that suport *.ubi?


PD: IF need any clarification more data or whatever for helping me just ASK. Thank you very Much.
blue_z
Location: USA
Posts: 1741
Joined: Thu Apr 19, 2007 10:15 pm

Re: Help Updating my RFS

Sat Sep 22, 2018 1:12 am

AleFachini wrote: I'm working with an old version of kernel(2.4) which boots a jffs2 Image.
Linux kernel version 2.4 on a SAM9?
I find that hard to believe.

AleFachini wrote: The time until my APPLICATION is loaded is almost 12 Seconds. I need to reduce this time.
I understand that i could USE the *.ubi RFS insteadm which loads Faster.
Twelve seconds (from reset) doesn't sound that bad.
UBI/UBIFS could be faster if your NAND chip is large, but it's not the only way to optimize boot time.

AleFachini wrote: Is there a way to List all features inside my Kernel and my RFS to produce a new kernel and new RFS image that suport *.ubi?
A "list (of) all features" is not even sufficient to properly rebuild what you have now.
For the kernel, you need both the .config file and the source code.
Without original source code you don't know what might have been tweaked or added.
Before the Linux4SAM github existed, the 2.6 kernel source from mainline was patched to incorporate the Atmel SoC support.

Regards
AleFachini
Posts: 17
Joined: Tue May 30, 2017 7:41 pm

Re: Help Updating my RFS

Tue Sep 25, 2018 10:24 pm

Hello, corrections about my post:
  • You are right: Linux version 2.6.39_som9x35-1.1.1 (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202) ) #3 Fri Dec 23 11:04:31 ART 2016
  • The reason for wanting faster boot is because a medical requirement for the device
One delay of about 6 seconds is happening between these two lines:
atmel_mci atmel_mci.0: Atmel MCI controller at 0xf0008000 irq 12, 1 slots (DELAY AFTER THIS LINE, about 6 seconds)
Empty flash at 0x03bc8e70 ends at 0x03bc9000(DELAY BEFORE THIS LINE)
VFS: Mounted root (jffs2 filesystem) on device 31:1.(extra line 1)
Freeing init memory: 252K(extra line 2)
  • Can you reccomend a way to reduce this boot time even a bit? If i need sources i'm done for
blue_z
Location: USA
Posts: 1741
Joined: Thu Apr 19, 2007 10:15 pm

Re: Help Updating my RFS

Thu Sep 27, 2018 12:09 am

AleFachini wrote:
Tue Sep 25, 2018 10:24 pm
Can you reccomend a way to reduce this boot time even a bit?
A web search should turn up several well-written tutorials/guides.
Seems like you've already identified one bottleneck & a solution, since the "Empty flash at ..." message is generated by fs/jffs2/scan.c.
So a transition to UBI/UBIFS should improve the mount time for your 248MB rootfs.

The real concern could be the lack of original source code, especially if you have custom hardware.
The only search result for your kernel version string was your previous post.
FWIW the AT91 patches to mainline ended with 2.6.38. So the Linux4SAM github is the likeliest code base.

You could try looking for custom drivers in your old kernel by:

A. Boot with initcall_debug in the kernel command line to get a report of every module/driver initialized. This will also report execution times. Be sure to increase the loglevel, e.g. also specify ignore_loglevel.

B. Manually uncompress the kernel image, and use the strings command to scan for entry points. This assumes that the kernel image was not stripped.

Regards

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 3 guests