LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 09-25-2014, 05:04 AM   #1
ayyasprings
Member
 
Registered: Aug 2014
Posts: 118

Rep: Reputation: Disabled
is it needed to flash kernel image and rootfs image separately in embedded board?


Is it enough to flash the rootfs image after flashing the bootloader image?
the rootfs image contains kernel image within / directory.

Please help!
 
Old 09-27-2014, 09:50 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,008

Rep: Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276
It depends on your setup.
Android systems can have 5 or so memory blocks, and it only makes sense to flash them separately. You are correct everything appears under /; where else could it appear? but each separate mount is best flashed separately. Otherwise you have an image too big for the drive. Any sane system will call a halt to that early on.
 
Old 09-29-2014, 04:17 AM   #3
ayyasprings
Member
 
Registered: Aug 2014
Posts: 118

Original Poster
Rep: Reputation: Disabled
If I have an image too big for my drive, do I have to place the kernel image in some other physical location other than rootfs image and place the symbolic/hard link to kernel image in / directory? If so how to practically do this? And if you are saying that too big image is a problem for flashing only at the same time and it is going to reside in the same drive for kernel and rootfs image, how to calculate the offset to flash the kernel image in / directory as the bootloader we can only supply the physical address as arguments and not the directory location as argument.( I m going to use Uboot bootloader).

Please help either by explaining here or giving me the references if it is extensive to explain this!
 
Old 09-30-2014, 09:31 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,008

Rep: Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276
Since the days of elementary OSes, the system checks if there's space before copying. My wife's iPad was updated recently. What you suggest does not deserve to work.

/etc and /tmp need space, as does /var. OTOH, you can use a squashfs to save storage space. If you give us the full picture, we can suggest something.
 
Old 10-09-2014, 07:27 AM   #5
ayyasprings
Member
 
Registered: Aug 2014
Posts: 118

Original Poster
Rep: Reputation: Disabled
Hi business_kid,

Sorry I was off for few days.I am not clear with your explanation.

I am not getting clear for say "Otherwise you have an image too big for the drive. Any sane system will call a halt to that early on." what actually happens in detail?

And I didnot get how to calculate the offset to flash the kernel image in / directory as the bootloader we can only supply the physical address as arguments and not the directory location as argument when kernel image and rootfs image are going to be flashed separately?( I m going to use Uboot bootloader but a generic answer is needed for my learning to calculate offset address of / directory where kernel image has to placed)

And dont I need to place kernel image in / directory in file system hierarchy before building rootfs image in host environment as both images are going to be flashed separately?

Please reply!
 
Old 10-10-2014, 04:30 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,008

Rep: Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276
From post #3
Quote:
If I have an image too big for my drive
Most operating systems will not copy that. They will do the basic check: "Does it fit?" The answer will ne "No." so the process will get the middle finger.

Even when you have a / drive, you need space on it. Some parts of the system are written to - /etc, /tmp, & /var are examples out of a linux system.
 
Old 10-13-2014, 07:05 AM   #7
ayyasprings
Member
 
Registered: Aug 2014
Posts: 118

Original Poster
Rep: Reputation: Disabled
Hi business_kid,

if my bootloader has the capability for extracting the kernel from my filesystem type and there is enough space in my drive, is it ok to place kernel image in /directory or / boot directory and then build rootfs image and flash the rootfs image containing the kernel image within itself at the same time?

Please reply!
 
Old 10-14-2014, 03:44 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,008

Rep: Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276
If your kernel has the ability to extract, for example, gzips, and you have /kernel.gz, that should work.
If you have image.gz containing kernel and a lot more besides, you are definitely off the map. How is the few lines of code that loads the kernel going to know what the kernel is?
 
Old 10-14-2014, 04:21 AM   #9
ayyasprings
Member
 
Registered: Aug 2014
Posts: 118

Original Poster
Rep: Reputation: Disabled
Hi business_kid,

Actually i am saying capability of bootloader to extract the kernel image within the rootfs image. for example rootfs image of jffs2 filesystem type which has kernel image within it and my bootloader is Uboot which has capability to understand and extract kernel image from Jffs2 filesystem type i think.And do the kernel image i generated as zImage will be of .gz format?

Got confused! please clarify!
 
Old 10-15-2014, 04:30 AM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,008

Rep: Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276
OK - zimage.

It's your setup - I just chose gz as an example. But this is your project. And you sound like you're not enjoying it, so I imagine it's your qualification also. I don't want to do all the work for you.
 
Old 10-15-2014, 07:43 AM   #11
ayyasprings
Member
 
Registered: Aug 2014
Posts: 118

Original Poster
Rep: Reputation: Disabled
Hi business_kid,

I am a newbie in linux without any initial formal training. It will be helpful if your answers are straight forward explaining technical content alone.
I got confused with your phrases like "so the process will get the middle finger.","OTOH, you can use a squashfs to save storage space."as I dont know what you mean by this in your region and i didnot get enough clarity for my experience level and I asked repeated questions.

Thanks for your help!
 
Old 10-16-2014, 10:31 AM   #12
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,008

Rep: Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276Reputation: 2276
Sorry. I am incomprehensible at the best of times.

A standard boot process will not extract a kernel from a file with other files. These days, most kernels come compressed, and get extracted. So you gain nothing by trying to compress them again.

Have you only one memory block? I would like to see a minimum of 4
boot (small)
swap - for your memory overflow.
/ for your system
/home for user files

You may decide to run without swap, if you have ram enough to cope with everything. /home is something that may not be much needed either, if the user has no files.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
clarification in building rootfs image with kernel image ayyasprings Linux - Embedded & Single-board computer 0 09-24-2014 11:44 AM
[SOLVED] Inserting image and saving doodling separately waddles Linux - Software 1 08-13-2013 06:25 AM
Tie kernel and rootfs builded separately valdez151 Linux - Embedded & Single-board computer 0 11-18-2012 07:29 AM
Merging kernel image and rootfs jaepi Linux - Embedded & Single-board computer 3 03-22-2011 11:29 AM
Will rfs change when kernel image is built(for a target board) LN85 Linux - Kernel 3 07-04-2007 04:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 03:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration