diff mbox

[OpenWrt-Devel] Ubnt EdgeRouter: Use mmcblk0p3 as ext4 rootfs for default ?

Message ID 569FB2A9.2060505@dd-wrt.com
State Changes Requested
Headers show

Commit Message

Daniel Danzberger Jan. 20, 2016, 4:15 p.m. UTC
The UBNT EdgeRouter has an internal mmc flash card.
(unlike the EdgeRouter Lite)

The factory mmc flash card layout is:

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk0p1 *        63   17135   17073  8.3M 83 Linux
/dev/mmcblk0p2       17199  149183  131985 64.5M 83 Linux
/dev/mmcblk0p3      149247 2246831 2097585    1G 83 Linux

This patch edits the kernel command line to use the the 3rd partition
as rootfs (ext4).
I think this makes sense for a default configuration when installing
openwrt on the mmc flash card of the EdgeRouter.

What do you think ?

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>

Comments

John Crispin Jan. 21, 2016, 7:57 a.m. UTC | #1
On 20/01/2016 17:15, daniel wrote:
> The UBNT EdgeRouter has an internal mmc flash card.
> (unlike the EdgeRouter Lite)
> 
> The factory mmc flash card layout is:
> 
> Device         Boot  Start     End Sectors  Size Id Type
> /dev/mmcblk0p1 *        63   17135   17073  8.3M 83 Linux
> /dev/mmcblk0p2       17199  149183  131985 64.5M 83 Linux
> /dev/mmcblk0p3      149247 2246831 2097585    1G 83 Linux
> 
> This patch edits the kernel command line to use the the 3rd partition
> as rootfs (ext4).
> I think this makes sense for a default configuration when installing
> openwrt on the mmc flash card of the EdgeRouter.
> 
> What do you think ?
> 
> Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
> 
> 
>

we use block2mtd so that sysupgrade works. your patch technically is
fine but will break at least sysupgrade on this target.


> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
diff mbox

Patch

diff --git a/target/linux/octeon/image/Makefile b/target/linux/octeon/image/Makefile
index e74b06d..ab81eb0 100644
--- a/target/linux/octeon/image/Makefile
+++ b/target/linux/octeon/image/Makefile
@@ -23,7 +23,7 @@  define Image/BuildKernel/Initramfs/Template
        $(STAGING_DIR_HOST)/bin/patch-cmdline $(BIN_DIR)/$(IMG_PREFIX)-$(1)-vmlinux-initramfs.elf '$(strip $(2))'
 endef
 
-ER_CMDLINE:=-mtdparts=phys_mapped_flash:640k(boot0)ro,640k(boot1)ro,64k(eeprom)ro block2mtd.block2mtd=/dev/mmcblk0p2,65536,rootfs,5 root=/dev/mtdb
+ER_CMDLINE:=-mtdparts=phys_mapped_flash:640k(boot0)ro,640k(boot1)ro,64k(eeprom)ro root=/dev/mmcblk0p3 rootfstype=ext4 rootwait
 ERLITE_CMDLINE:=-mtdparts=phys_mapped_flash:512k(boot0),512k(boot1),64k@1024k(eeprom) block2mtd.block2mtd=/dev/sda2,65536,rootfs,5 root=/dev/mtdbl
 
 define Image/BuildKernel