Discussion:
[Ltib] ltib config for memory map
Rajesh Tiru
2014-06-23 13:34:30 UTC
Permalink
Hi,

I am a bit new to the ltib. 
I've a custom LogicPD omap board based on ARM AM3703 with 256 MB ram and NAND 1GB.

My current bootargs is
nand-ecc=hw console=ttyO2,115200n8 mem=***@0x80000000 mpurate=600 i2c_bus=3,100 displ
ay=15 ignore_loglevel early_printk no_console_suspend mtdparts=omap2-nand.0:512k(x-loader),1664k(u-boot),384k(u-boot-env),5m(kernel),20m(ramdisk),-(fs) root=/dev/ram rw ramdisk_size=64000

and the mtd partitions are 
mtd0: 00080000 00020000 "x-loader"
mtd1: 001a0000 00020000 "u-boot"
mtd2: 00060000 00020000 "u-boot-env"
mtd3: 00500000 00020000 "kernel"
mtd4: 01400000 00020000 "ramdisk"
mtd5: 1e480000 00020000 "fs"

I am trying to increase the rootfs partition to be 30mb and the ramdisk size to 128k as my rootfs is increased.

When I changed the bootargs, the board failed to boot-up and complains about writing beyond.

Can one you pl shed some light on how can I increase the partitions..?

Also, while, running, if I make any changes to any of the linux rootfs ( for ex, a new library or a change to a rc script), I am loosing those changes on the reboot. Is there a way to make the changes persists accros the reboots..?

Thanks in advance and much appreciate any help...

Rajesh
Peter Barada
2014-06-23 15:07:14 UTC
Permalink
Post by Rajesh Tiru
Hi,
I am a bit new to the ltib.
I've a custom LogicPD omap board based on ARM AM3703 with 256 MB ram and NAND 1GB.
My current bootargs is
ay=15 ignore_loglevel early_printk no_console_suspend
mtdparts=omap2-nand.0:512k(x-loader),1664k(u-boot),384k(u-boot-env),5m(kernel),20m(ramdisk),-(fs)
root=/dev/ram rw ramdisk_size=64000
and the mtd partitions are
mtd0: 00080000 00020000 "x-loader"
mtd1: 001a0000 00020000 "u-boot"
mtd2: 00060000 00020000 "u-boot-env"
mtd3: 00500000 00020000 "kernel"
mtd4: 01400000 00020000 "ramdisk"
mtd5: 1e480000 00020000 "fs"
I am trying to increase the rootfs partition to be 30mb and the
ramdisk size to 128k as my rootfs is increased.
When I changed the bootargs, the board failed to boot-up and complains
about writing beyond.
Can one you pl shed some light on how can I increase the partitions..?
Also, while, running, if I make any changes to any of the linux rootfs
( for ex, a new library or a change to a rc script), I am loosing
those changes on the reboot. Is there a way to make the changes
persists accros the reboots..?
Thanks in advance and much appreciate any help...
Rajesh,

0)Your questiosn are more u-boot related (i.e. unrelated to LTIB) but
here's some answers

1) You can change the partition layout in u-boot via "setenv mtdparts
'mtdparts=...' where the <...> is what mtdparts expects. In your case
(assuming you want to size the ramdisk partition to 30MB since I don't
understand exactly what you mean by "rootfs") so the command would be:

setenv mtdparts
'mtdparts=omap2-nand.0:512k(x-loader),1664k(u-boot),384k(u-boot-env),5m(kernel),30m(ramdisk),-(fs)'

Note that this increases the size of the 'ramdisk' partition by 10MB at
the expense of the size of the 'fs' partition. After you'll want to
"savenv" to save the u-boot environment change into NAND so the next
time you boot it remembers that change.

2) Yes, any changes you make to the rootfs when you boot with the
ramdisk rootfs will be lost on reboot. If you want to make changes in
the rootfs that will persist across reboots, I'd highly suggest you
switch to using YAFS2 as the rootfs and burn/boot using that. Logic
provides documentation in its User Guide you should have on how to do
this (as you look to be running Logic's U-boot).

Hope this helps.
--
Peter Barada
***@logicpd.com
Peter Barada
2014-06-23 15:37:17 UTC
Permalink
Post by Rajesh Tiru
Hi,
I am a bit new to the ltib.
I've a custom LogicPD omap board based on ARM AM3703 with 256 MB ram and NAND 1GB.
My current bootargs is
ay=15 ignore_loglevel early_printk no_console_suspend
mtdparts=omap2-nand.0:512k(x-loader),1664k(u-boot),384k(u-boot-env),5m(kernel),20m(ramdisk),-(fs)
root=/dev/ram rw ramdisk_size=64000
and the mtd partitions are
mtd0: 00080000 00020000 "x-loader"
mtd1: 001a0000 00020000 "u-boot"
mtd2: 00060000 00020000 "u-boot-env"
mtd3: 00500000 00020000 "kernel"
mtd4: 01400000 00020000 "ramdisk"
mtd5: 1e480000 00020000 "fs"
I am trying to increase the rootfs partition to be 30mb and the
ramdisk size to 128k as my rootfs is increased.
When I changed the bootargs, the board failed to boot-up and
complains about writing beyond.
I think from your description that the ramdisk you've built is now too
large to fit into the ram set aside for it. Aside from the previous
change to increase the size of the ramdisk partition in NAND to 30MB,
you can increase the amount of reserved kernel memory for it in u-boot by:

setenv ramdisksize 75000

which increases the memory for the ramdisk from ~64MB to ~75MB. Again,
"savenv" after updating ramdisksize will save the change for the next
reboot...
--
Peter Barada
***@logicpd.com
Rajesh Tiru
2014-06-23 16:23:00 UTC
Permalink
Thanks much Peter.. This is exactly what I was looking for...I'll update once I again after trying it out..

Thanks again for the quick response...


________________________________
From: Peter Barada <***@logicpd.com>
To: Peter Barada <***@logicpd.com>; "***@nongnu.org" <***@nongnu.org>; ***@yahoo.com
Sent: Monday, June 23, 2014 11:37 AM
Subject: Re: [Ltib] ltib config for memory map



On 06/23/2014 11:07 AM, Peter Barada wrote:

On 06/23/2014 09:34 AM, Rajesh Tiru wrote:

Hi,
Post by Rajesh Tiru
I am a bit new to the ltib. 
I've a custom LogicPD omap board based on ARM AM3703 with 256 MB ram and NAND 1GB.
My current bootargs is
ay=15 ignore_loglevel early_printk no_console_suspend
mtdparts=omap2-nand.0:512k(x-loader),1664k(u-boot),384k(u-boot-env),5m(kernel),20m(ramdisk),-(fs) root=/dev/ram rw ramdisk_size=64000
Post by Rajesh Tiru
and the mtd partitions are 
mtd0: 00080000 00020000 "x-loader"
mtd1: 001a0000 00020000 "u-boot"
mtd2: 00060000 00020000 "u-boot-env"
mtd3: 00500000 00020000 "kernel"
mtd4: 01400000 00020000 "ramdisk"
mtd5: 1e480000 00020000 "fs"
I am trying to increase the rootfs partition to be 30mb and the ramdisk size to 128k as my rootfs is increased.
When I changed the bootargs, the board failed to boot-up and complains about writing beyond.
I think from your description that the ramdisk you've built is now too large to fit into the ram set aside for it.  Aside from the previous change to increase the size of the ramdisk partition in NAND to 30MB, you can increase the amount of reserved kernel memory for it in u-boot by:

setenv ramdisksize 75000

which increases the memory for the ramdisk from ~64MB to ~75MB. 
Again, "savenv" after updating ramdisksize will save the change for
the next reboot...
--
Peter Barada ***@logicpd.com
Peter Barada
2014-06-23 16:53:37 UTC
Permalink
Post by Rajesh Tiru
Thanks much Peter.. This is exactly what I was looking for...I'll
update once I again after trying it out..
Thanks again for the quick response...
Sure. When you run LTIB, it prints out what it thinks ramdisksize needs
to be. Granted it may be a bit conservative but it does give you a
starting point of how large you ramdisk needs to be. With YAFFS2, this
isn't a problem (per se) as long as you give the YAFFS2 NAND rootfs
partition enough space (including extra empty blocks to save churn due
to garbage collection).
Post by Rajesh Tiru
------------------------------------------------------------------------
*Sent:* Monday, June 23, 2014 11:37 AM
*Subject:* Re: [Ltib] ltib config for memory map
Post by Rajesh Tiru
Hi,
I am a bit new to the ltib.
I've a custom LogicPD omap board based on ARM AM3703 with 256 MB ram and NAND 1GB.
My current bootargs is
ay=15 ignore_loglevel early_printk no_console_suspend
mtdparts=omap2-nand.0:512k(x-loader),1664k(u-boot),384k(u-boot-env),5m(kernel),20m(ramdisk),-(fs)
root=/dev/ram rw ramdisk_size=64000
and the mtd partitions are
mtd0: 00080000 00020000 "x-loader"
mtd1: 001a0000 00020000 "u-boot"
mtd2: 00060000 00020000 "u-boot-env"
mtd3: 00500000 00020000 "kernel"
mtd4: 01400000 00020000 "ramdisk"
mtd5: 1e480000 00020000 "fs"
I am trying to increase the rootfs partition to be 30mb and the
ramdisk size to 128k as my rootfs is increased.
When I changed the bootargs, the board failed to boot-up and
complains about writing beyond.
I think from your description that the ramdisk you've built is now too
large to fit into the ram set aside for it. Aside from the previous
change to increase the size of the ramdisk partition in NAND to 30MB,
setenv ramdisksize 75000
which increases the memory for the ramdisk from ~64MB to ~75MB.
Again, "savenv" after updating ramdisksize will save the change for
the next reboot...
--
Peter Barada
--
Peter Barada
***@logicpd.com
Loading...