Jump to content
wahaha

how to modify uboot bootargs to allow for initramfs location

Recommended Posts

I am trying to load initramfs into a dedicated partition, instead of packaging it together with kernel.

My understanding is that I will need to define the location within uboot (so that it can be loaded into memory together with kernel as 2 separate objects).

Within the kernel i will then need to make this change:

General setup  --->
    () Initramfs source file(s)
    [*]   Support initial ramdisk/ramfs compressed using gzip 
    [ ]   Support initial ramdisk/ramfs compressed using bzip2
    [ ]   Support initial ramdisk/ramfs compressed using LZMA 
    [ ]   Support initial ramdisk/ramfs compressed using XZ   
    [ ]   Support initial ramdisk/ramfs compressed using LZO  
    [ ]   Support initial ramdisk/ramfs compressed using LZ4

My question is, within `uboot`, how do i specify that i have placed the `initramfs.cpio.gz` file into partition 5 of my SD Card?

Share this post


Link to post
Share on other sites

hello @wahaha

unfortunately there's no specific config to define ramdisk partition. verifying and loading kernel and ramfs both by default start from fit image. to load ramfs only you will need to use a command such as ex2load or fatload manually. 

Share this post


Link to post
Share on other sites

Hi @tooz,

Ah okay. Because I see that within uboot `make menuconfig`, there is

[*]  Enable boot arguements
()		Boot arguements

Even if I specify the location within `Boot arguements` by part-UUID to tell it which partition ramfs is located at It won't work?

Thank you

Share this post


Link to post
Share on other sites

hello @wahaha

bootargs can specify the location of the ramdisk (initrd); however, for initramfs, you need to load the initramfs into memory and pass its address to the kernel. If the initramfs is built into the kernel image, then there is no need for separate loading or bootargs configuration

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...