All of lore.kernel.org
 help / color / mirror / Atom feed
* Bundling initramfs with uImage
@ 2014-08-21 20:18 Crast, Nicholas
  2014-08-25  5:34 ` Khem Raj
  0 siblings, 1 reply; 7+ messages in thread
From: Crast, Nicholas @ 2014-08-21 20:18 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1445 bytes --]

All,

I am currently working in an embedded environment, struggling to get the entire system running in RAM, so that everything is fresh after a reboot. I can currently use the initramfs-live-boot functionality to generate a .cpio.gz file, but I am lost on how to get this to 'bundle' with the uImage. The uImage will be stored on an SD card and we are using u-boot.

I see mentions of the CONFIG_INITRAMFS_SOURCE kernel option, but I am unsure if I need to change this.

Can someone help me? I've been googling all day and haven't gotten much further.

-Nick

----------------------------------------
Nick Crast
Associate Software Engineer
Saab Sensis Corporation
Phone: 315-445-5703
Email: Nicholas.Crast@saabsensis.com<mailto:Nicholas.Crast@saabsensis.com>


This message is intended only for the addressee and may contain information that is company confidential or privileged. Any technical data in this message may be exported only in accordance with the U.S. International Traffic in Arms Regulations (22 CFR Parts 120-130) or the Export Administration Regulations (15 CFR Parts 730-774). Unauthorized use is strictly prohibited and may be unlawful. If you are not the intended recipient, or the person responsible for delivering to the intended recipient, you should not read, copy, disclose or otherwise use this message. If you have received this email in error, please delete it, and advise the sender immediately.

[-- Attachment #2: Type: text/html, Size: 3744 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bundling initramfs with uImage
  2014-08-21 20:18 Bundling initramfs with uImage Crast, Nicholas
@ 2014-08-25  5:34 ` Khem Raj
  2014-08-25 19:33   ` Crast, Nicholas
  2014-08-26 18:41   ` Using uboot to boot a large uimage Crast, Nicholas
  0 siblings, 2 replies; 7+ messages in thread
From: Khem Raj @ 2014-08-25  5:34 UTC (permalink / raw)
  To: Crast, Nicholas; +Cc: yocto

On 14-08-21 20:18:41, Crast, Nicholas wrote:
> All,
> 
> I am currently working in an embedded environment, struggling to get the entire system running in RAM, so that everything is fresh after a reboot. I can currently use the initramfs-live-boot functionality to generate a .cpio.gz file, but I am lost on how to get this to 'bundle' with the uImage. The uImage will be stored on an SD card and we are using u-boot.
> 
> I see mentions of the CONFIG_INITRAMFS_SOURCE kernel option, but I am unsure if I need to change this.
> 
> Can someone help me? I've been googling all day and haven't gotten much further.

if you add 

INITRAMFS_IMAGE_BUNDLE = "1"
INITRAMFS_IMAGE = "<name of your initramfs-image>"

in you local.conf that should help it to create uImage with everything
in it.

-Khem



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bundling initramfs with uImage
  2014-08-25  5:34 ` Khem Raj
@ 2014-08-25 19:33   ` Crast, Nicholas
  2014-08-25 21:33     ` Khem Raj
  2014-08-26 18:41   ` Using uboot to boot a large uimage Crast, Nicholas
  1 sibling, 1 reply; 7+ messages in thread
From: Crast, Nicholas @ 2014-08-25 19:33 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto

Thanks,

This seems like a clean way to do what I want to do. So this means whenever I do a build, it will 

1.) Build the kernel
2.) Build the filesystem (initramfs)
3.) Rebuild the kernel with the bundled intramfs

Correct?

-Nick

----------------------------------------
Nick Crast
Associate Software Engineer
Saab Sensis Corporation
Phone: 315-445-5703
Email: Nicholas.Crast@saabsensis.com


-----Original Message-----
From: Khem Raj [mailto:raj.khem@gmail.com] 
Sent: Monday, August 25, 2014 1:32 AM
To: Crast, Nicholas
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] Bundling initramfs with uImage

On 14-08-21 20:18:41, Crast, Nicholas wrote:
> All,
> 
> I am currently working in an embedded environment, struggling to get the entire system running in RAM, so that everything is fresh after a reboot. I can currently use the initramfs-live-boot functionality to generate a .cpio.gz file, but I am lost on how to get this to 'bundle' with the uImage. The uImage will be stored on an SD card and we are using u-boot.
> 
> I see mentions of the CONFIG_INITRAMFS_SOURCE kernel option, but I am unsure if I need to change this.
> 
> Can someone help me? I've been googling all day and haven't gotten much further.

if you add 

INITRAMFS_IMAGE_BUNDLE = "1"
INITRAMFS_IMAGE = "<name of your initramfs-image>"

in you local.conf that should help it to create uImage with everything in it.

-Khem

-
This message is intended only for the addressee and may contain information that is company confidential or privileged.  Any technical data in this message may be exported only in accordance with the U.S. International Traffic in Arms Regulations (22 CFR Parts 120-130) or the Export Administration Regulations (15 CFR Parts 730-774). Unauthorized use is strictly prohibited and may be unlawful. If you are not the intended recipient, or the person responsible for delivering to the intended recipient, you should not read, copy, disclose or otherwise use this message. If you have received this email in error, please delete it, and advise the sender immediately. 
-          

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Bundling initramfs with uImage
  2014-08-25 19:33   ` Crast, Nicholas
@ 2014-08-25 21:33     ` Khem Raj
  0 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2014-08-25 21:33 UTC (permalink / raw)
  To: Crast, Nicholas; +Cc: yocto

On 14-08-25 19:33:44, Crast, Nicholas wrote:
> Thanks,
> 
> This seems like a clean way to do what I want to do. So this means whenever I do a build, it will 
> 
> 1.) Build the kernel
> 2.) Build the filesystem (initramfs)
> 3.) Rebuild the kernel with the bundled intramfs
> 
> Correct?

yes


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Using uboot to boot a large uimage
  2014-08-25  5:34 ` Khem Raj
  2014-08-25 19:33   ` Crast, Nicholas
@ 2014-08-26 18:41   ` Crast, Nicholas
  2014-08-26 20:03     ` Khem Raj
  1 sibling, 1 reply; 7+ messages in thread
From: Crast, Nicholas @ 2014-08-26 18:41 UTC (permalink / raw)
  To: yocto

I am currently attempting to boot with an initramfs built into my uimage using uboot. 

However, I cannot get it to boot correctly. If I make the uimage totally bare-bones, and just use core-image-minimal-initramfs, then it hangs huring init at the waiting for devices... printout. Going and gutting the init script, I can get to single user mode and it looks like the filesystem is there.

I want a more full system, so I included core-image-boot and core-image-basic. I figured this would initialize better. When I do this, my uImage jumps up to ~50MB. U-boot then hangs at "starting kernel..."

I don't think that the uimage is clobbering the device tree, because the device tree is loaded at 0x100, and the uimage is loaded at 0x8000. 

Any ideas?

----------------------------------------
Nick Crast
Associate Software Engineer
Saab Sensis Corporation
Phone: 315-445-5703
Email: Nicholas.Crast@saabsensis.com

-
This message is intended only for the addressee and may contain information that is company confidential or privileged.  Any technical data in this message may be exported only in accordance with the U.S. International Traffic in Arms Regulations (22 CFR Parts 120-130) or the Export Administration Regulations (15 CFR Parts 730-774). Unauthorized use is strictly prohibited and may be unlawful. If you are not the intended recipient, or the person responsible for delivering to the intended recipient, you should not read, copy, disclose or otherwise use this message. If you have received this email in error, please delete it, and advise the sender immediately. 
-          

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Using uboot to boot a large uimage
  2014-08-26 18:41   ` Using uboot to boot a large uimage Crast, Nicholas
@ 2014-08-26 20:03     ` Khem Raj
  2014-08-26 21:10       ` Crast, Nicholas
  0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2014-08-26 20:03 UTC (permalink / raw)
  To: Crast, Nicholas; +Cc: yocto

On 14-08-26 18:41:22, Crast, Nicholas wrote:
> I am currently attempting to boot with an initramfs built into my uimage using uboot. 
> 
> However, I cannot get it to boot correctly. If I make the uimage totally bare-bones, and just use core-image-minimal-initramfs, then it hangs huring init at the waiting for devices... printout. Going and gutting the init script, I can get to single user mode and it looks like the filesystem is there.
> 
> I want a more full system, so I included core-image-boot and core-image-basic. I figured this would initialize better. When I do this, my uImage jumps up to ~50MB. U-boot then hangs at "starting kernel..."
> 

core-image-minimal should boot you into shell console. That should have
been enough

> I don't think that the uimage is clobbering the device tree, because the device tree is loaded at 0x100, and the uimage is loaded at 0x8000. 
> 

make sure that memory is not overlapping and is initiaized



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Using uboot to boot a large uimage
  2014-08-26 20:03     ` Khem Raj
@ 2014-08-26 21:10       ` Crast, Nicholas
  0 siblings, 0 replies; 7+ messages in thread
From: Crast, Nicholas @ 2014-08-26 21:10 UTC (permalink / raw)
  To: Khem Raj; +Cc: yocto

Here is what I am seeing with core-image-minimal

32612024 bytes read in 11244 ms (2.8 MiB/s)
18179 bytes read in 30 ms (590.8 KiB/s)
## Booting kernel from Legacy Image at 00100000 ...
   Image Name:   Linux-3.12.0
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    32611960 Bytes = 31.1 MiB
   Load Address: 00008000
   Entry Point:  00008000
## Flattened Device Tree blob at 00000100
   Booting using the fdt blob at 0x00000100
   Loading Kernel Image ... OK
OK
   Loading Device Tree to 03ff8000, end 03fff702 ... OK

Starting kernel ...


If I make the uBoot image ~3 MB just using core-image-minimal-initramfs, I get different results. Here are the relevant part of my uboot configuration:


fdtaddr=0x00000100
fdtimage=/boot/socfpga_mitysom5csx.dtb
fdtimagesize=0x2000
mmcboot=setenv bootargs console=ttyS0,115200 root=${mmcroot} rw rootwait;bootm ${loadaddr} - ${fdtaddr}
mmcload=mmc rescan;${mmcloadcmd} mmc 0:${mmcloadpart} ${loadaddr} ${bootimage};${mmcloadcmd} mmc 0:${mmcloadpart} ${fdtaddr} ${fdtimage}
mmcloadcmd=ext2load
mmcloadpart=2
mmcroot=/dev/mmcblk0p2

----------------------------------------
Nick Crast
Associate Software Engineer
Saab Sensis Corporation
Phone: 315-445-5703
Email: Nicholas.Crast@saabsensis.com


-----Original Message-----
From: Khem Raj [mailto:raj.khem@gmail.com] 
Sent: Tuesday, August 26, 2014 4:01 PM
To: Crast, Nicholas
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] Using uboot to boot a large uimage

On 14-08-26 18:41:22, Crast, Nicholas wrote:
> I am currently attempting to boot with an initramfs built into my uimage using uboot. 
> 
> However, I cannot get it to boot correctly. If I make the uimage totally bare-bones, and just use core-image-minimal-initramfs, then it hangs huring init at the waiting for devices... printout. Going and gutting the init script, I can get to single user mode and it looks like the filesystem is there.
> 
> I want a more full system, so I included core-image-boot and core-image-basic. I figured this would initialize better. When I do this, my uImage jumps up to ~50MB. U-boot then hangs at "starting kernel..."
> 

core-image-minimal should boot you into shell console. That should have been enough

> I don't think that the uimage is clobbering the device tree, because the device tree is loaded at 0x100, and the uimage is loaded at 0x8000. 
> 

make sure that memory is not overlapping and is initiaized

-
This message is intended only for the addressee and may contain information that is company confidential or privileged.  Any technical data in this message may be exported only in accordance with the U.S. International Traffic in Arms Regulations (22 CFR Parts 120-130) or the Export Administration Regulations (15 CFR Parts 730-774). Unauthorized use is strictly prohibited and may be unlawful. If you are not the intended recipient, or the person responsible for delivering to the intended recipient, you should not read, copy, disclose or otherwise use this message. If you have received this email in error, please delete it, and advise the sender immediately. 
-          

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-08-26 21:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-21 20:18 Bundling initramfs with uImage Crast, Nicholas
2014-08-25  5:34 ` Khem Raj
2014-08-25 19:33   ` Crast, Nicholas
2014-08-25 21:33     ` Khem Raj
2014-08-26 18:41   ` Using uboot to boot a large uimage Crast, Nicholas
2014-08-26 20:03     ` Khem Raj
2014-08-26 21:10       ` Crast, Nicholas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.