如何修改ubi的大小
文章来源:完美体育·(中国)手机网页版科技 发布日期:2019.9.23 浏览次数:7013 次 |
问题:ubi默认分配空间不合适,想把ubi的分配空间扩大点,如何设置?
完美体育·(中国)手机网页版技术支持答:要调整NAND分区需要修改u-boot 和 内核的设备树,二者保持一致。u-boot修改include/configs/myd_c335x.h 里面的NAND.rootfs分区的大小,(NAND.userdata前面的`-`代表剩余的部分全部预留给NAND.userdata)。
508 #define MTDPARTS_DEFAULT "mtdparts=nand.0:" \
509 "512k(NAND.SPL)," \
510 "512k(NAND.SPL.backup1)," \
511 "512k(NAND.SPL.backup2)," \
512 "512k(NAND.SPL.backup3)," \
513 "512k(NAND.u-boot-spl-os)," \
514 "1m(NAND.u-boot)," \
515 "512k(NAND.u-boot-env)," \
516 "512k(NAND.u-boot-env.backup1)," \
517 "8m(NAND.kernel)," \
518 "214m(NAND.rootfs)," \
519 "-(NAND.userdata)"
内核修改设备树文件里面的NAND.rootfs分区和NAND.userdata分区的大小, 将NAND.rootfs的大小0x0D600000增大,同时将NAND.userdata的起始地址0x0E000000 后移。
(NAND.userdata分区size为0代表剩余的空间全部分给NAND.userdata)
...
528 partition@5 {
529 label = "NAND.u-boot";
530 reg = <0x000c0000 0x00100000="">;
531 };
532 partition@6 {
533 label = "NAND.u-boot-env";
534 reg = <0x001c0000 0x00020000="">;
535 };
536 partition@7 {
537 label = "NAND.u-boot-env.backup1";
538 reg = <0x001e0000 0x00020000="">;
539 };
540 partition@8 {
541 label = "NAND.kernel";
542 reg = <0x00200000 0x00800000="">;
543 };
544 partition@9 {
545 label = "NAND.rootfs";
546 reg = <0x00a00000 0x0d600000="">;
547 };
548 partition@10 {
549 label = "NAND.userdata";
550 reg = <0x0e000000 0="">;
551 };
完美体育·(中国)手机网页版技术支持答:要调整NAND分区需要修改u-boot 和 内核的设备树,二者保持一致。u-boot修改include/configs/myd_c335x.h 里面的NAND.rootfs分区的大小,(NAND.userdata前面的`-`代表剩余的部分全部预留给NAND.userdata)。
508 #define MTDPARTS_DEFAULT "mtdparts=nand.0:" \
509 "512k(NAND.SPL)," \
510 "512k(NAND.SPL.backup1)," \
511 "512k(NAND.SPL.backup2)," \
512 "512k(NAND.SPL.backup3)," \
513 "512k(NAND.u-boot-spl-os)," \
514 "1m(NAND.u-boot)," \
515 "512k(NAND.u-boot-env)," \
516 "512k(NAND.u-boot-env.backup1)," \
517 "8m(NAND.kernel)," \
518 "214m(NAND.rootfs)," \
519 "-(NAND.userdata)"
内核修改设备树文件里面的NAND.rootfs分区和NAND.userdata分区的大小, 将NAND.rootfs的大小0x0D600000增大,同时将NAND.userdata的起始地址0x0E000000 后移。
(NAND.userdata分区size为0代表剩余的空间全部分给NAND.userdata)
...
528 partition@5 {
529 label = "NAND.u-boot";
530 reg = <0x000c0000 0x00100000="">;
531 };
532 partition@6 {
533 label = "NAND.u-boot-env";
534 reg = <0x001c0000 0x00020000="">;
535 };
536 partition@7 {
537 label = "NAND.u-boot-env.backup1";
538 reg = <0x001e0000 0x00020000="">;
539 };
540 partition@8 {
541 label = "NAND.kernel";
542 reg = <0x00200000 0x00800000="">;
543 };
544 partition@9 {
545 label = "NAND.rootfs";
546 reg = <0x00a00000 0x0d600000="">;
547 };
548 partition@10 {
549 label = "NAND.userdata";
550 reg = <0x0e000000 0="">;
551 };
本文来自完美体育·(中国)手机网页版科技,原文地址:
/customerService/resource-list.asp?id=531,转载请注明出处。