]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
pcm052: fix MTD partitioning
authorAlbert ARIBAUD \(3ADEV\) <albert.aribaud@3adev.fr>
Mon, 26 Sep 2016 07:08:03 +0000 (09:08 +0200)
committerStefano Babic <sbabic@denx.de>
Thu, 6 Oct 2016 07:06:16 +0000 (09:06 +0200)
Merge 'spare' into 'bootloader' partition
Use same partition for ramdisk and rootfs boot scenarios.
Remove 'ramdisk' partition, use 'rootfs' for ramdisk
(ramdisk and nand boot scenarios are mutually exclusive).
Expand last partition to end of actual NAND size.
Adjust UBIFS rootfs boot kernel arguments.

Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
include/configs/pcm052.h

index a70c9887e75d0ce17dfe1f5013da23f4f0620489..0f7498888962863316c09f2e0305563df08fe0e0 100644 (file)
 #define CONFIG_MTD_PARTITIONS
 #define CONFIG_MTD_DEVICE
 #define MTDIDS_DEFAULT                 "nand0=NAND"
-#define MTDPARTS_DEFAULT               "mtdparts=NAND:256k(spare)"\
-                                       ",384k(bootloader)"\
+#define MTDPARTS_DEFAULT               "mtdparts=NAND:640k(bootloader)"\
                                        ",128k(env1)"\
                                        ",128k(env2)"\
                                        ",128k(dtb)"\
                                        ",6144k(kernel)"\
-                                       ",65536k(ramdisk)"\
-                                       ",450944k(root)"
+                                       ",-(root)"
 #endif
 
 #define CONFIG_MMC
        "bootargs_net=setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp " \
                "nfsroot=${serverip}:${nfs_root},v3,tcp\0" \
        "bootargs_nand=setenv bootargs ${bootargs} " \
-               "ubi.mtd=6 rootfstype=ubifs root=ubi0:rootfs\0" \
+               "ubi.mtd=5 rootfstype=ubifs root=ubi0:rootfs\0" \
        "bootargs_ram=setenv bootargs ${bootargs} " \
                "root=/dev/ram rw initrd=${ram_addr}\0" \
        "bootargs_mtd=setenv bootargs ${bootargs} ${mtdparts}\0" \
        "bootcmd_ram=run bootargs_base bootargs_ram bootargs_mtd; " \
                "nand read ${fdt_addr} dtb; " \
                "nand read ${kernel_addr} kernel; " \
-               "nand read ${ram_addr} ramdisk; " \
+               "nand read ${ram_addr} root; " \
                "bootz ${kernel_addr} ${ram_addr} ${fdt_addr}\0" \
        "update_bootloader_from_tftp=mtdparts default; " \
                "nand read ${blsec_addr} bootloader; " \
                "ubi write ${sys_addr} rootfs ${filesize}; fi\0" \
        "update_ramdisk_from_tftp=if tftp ${ram_addr} ${tftpdir}${ram_file}; " \
                "then mtdparts default; " \
-               "nand erase.part ramdisk; " \
-               "nand write ${ram_addr} ramdisk ${filesize}; fi\0"
+               "nand erase.part root; " \
+               "nand write ${ram_addr} root ${filesize}; fi\0"
 
 /* Miscellaneous configurable options */
 #define CONFIG_SYS_LONGHELP            /* undef to save memory */