Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support different sized flashes #77

Closed
bluecmd opened this issue Oct 3, 2018 · 2 comments
Closed

Support different sized flashes #77

bluecmd opened this issue Oct 3, 2018 · 2 comments
Labels
enhancement New feature or request

Comments

@bluecmd
Copy link
Contributor

bluecmd commented Oct 3, 2018

Right now u-bmc assumes 32MB flash. When putting in a 64MB flash u-boot correctly determined the size:

U-Boot 2016.07-00038-gc7a5629a1c (Sep 30 2018 - 22:40:21 +0200)

DRAM:  120 MiB
WARNING: Caches not enabled
Flash: 64 MiB
Using default environment

But the kernel was a bit more certain it was 32MB still:

[    1.567855] aspeed-smc 1e620000.flash-controller: Using 50 MHz SPI frequency
[    1.582237] aspeed-smc 1e620000.flash-controller: n25q512ax3 (65536 Kbytes)
[    1.596190] aspeed-smc 1e620000.flash-controller: CE0 window [ 0x20000000 - 0x24000000 ] 64MB
[    1.613363] aspeed-smc 1e620000.flash-controller: CE1 window [ 0x24000000 - 0x26000000 ] 32MB
[    1.630430] aspeed-smc 1e620000.flash-controller: read control register: 203b0641
[    2.192007] 2 fixed-partitions partitions found on MTD device bmc
[    2.204200] Creating 2 MTD partitions on "bmc":
[    2.213280] 0x000000000000-0x000000080000 : "u-boot"
[    2.228836] 0x000000080000-0x000002000000 : "ubi"

~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 04000000 00010000 "bmc"
mtd1: 00080000 00010000 "u-boot"
mtd2: 01f80000 00010000 "ubi"
@bluecmd bluecmd added the enhancement New feature or request label Oct 3, 2018
@bluecmd
Copy link
Contributor Author

bluecmd commented Oct 3, 2018

To allow for a wide range of flashes (well, 32MB is probably the lowest we're going to support) but also shorten the flash time, it would be really nice if we could do background expansion of the filesystem on initial boot.

@bluecmd
Copy link
Contributor Author

bluecmd commented Oct 3, 2018

In the example, the ubinize.cfg file tells ubinize to create an UBI image which has a singe 200MiB dynamic volume with ID 0, and name "rootfs". The configuration file also sets the "autoresize" volume flag, which means that the volume will be automatically enlarged by UBI to have the maximum possible size when it runs for the first time.

bluecmd added a commit to bluecmd/u-bmc that referenced this issue Oct 3, 2018
Create a minimal image that will expand to whatever it can get on first
boot.

Fixes u-root#77.

Signed-off-by: Christian Svensson <bluecmd@google.com>
bluecmd added a commit to bluecmd/u-bmc that referenced this issue Oct 3, 2018
Create a minimal image that will expand to whatever it can get on first
boot.

Fixes u-root#77.

Signed-off-by: Christian Svensson <bluecmd@google.com>
bluecmd added a commit that referenced this issue Oct 3, 2018
Create a minimal image that will expand to whatever it can get on first
boot.

Fixes #77.

Signed-off-by: Christian Svensson <bluecmd@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant