From patchwork Wed Jan 20 16:15:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Danzberger X-Patchwork-Id: 570755 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2A16F1402EC for ; Thu, 21 Jan 2016 03:15:56 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=dd-wrt.com header.i=@dd-wrt.com header.b=JDK0LoK+; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 86097280850; Wed, 20 Jan 2016 17:15:05 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 47BA5280314 for ; Wed, 20 Jan 2016 17:14:59 +0100 (CET) X-policyd-weight: using cached result; rate:hard: -8.5 Received: from webmail.newmedia-net.de (nm.newmedia-net.de [217.113.179.122]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Wed, 20 Jan 2016 17:14:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dd-wrt.com; s=mikd; h=Subject:Content-Type:MIME-Version:Date:Message-ID:To:From; bh=XfoCrhQF1PooDBiAUOfzHJ0aTvf5edy67CPr9AL10eM=; b=JDK0LoK+Np60dVcs/nr3hMvA4XC/qldphHhkLbqOFZ/oK/vLsqFLJOE8e9y2SKWX5WCoOAH1qw090WGOvflZTGlT5sMLfjH9Zvt0zllfI2jsqAgMIhwDFtqZsIy2ZcCekqqCYkEMao6fx1iStfIE3wohiH1MO/CyqQvnSu2bamM=; From: daniel To: openwrt-devel@lists.openwrt.org X-Enigmail-Draft-Status: N1110 Message-ID: <569FB2A9.2060505@dd-wrt.com> Date: Wed, 20 Jan 2016 17:15:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 172.27.0.241 X-SA-Exim-Mail-From: daniel@dd-wrt.com X-SA-Exim-Version: 4.2.1 (built Thu, 26 May 2011 15:22:33 +0200) X-SA-Exim-Scanned: Yes (on webmail.newmedia-net.de) X-NMN-MailScanner-Information: Please contact the ISP for more information X-NMN-MailScanner-ID: 1aLvQ1-0001GE-P5 X-NMN-MailScanner: Found to be clean X-NMN-MailScanner-From: daniel@dd-wrt.com X-Received: from [172.27.0.241] by webmail.newmedia-net.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.72) (envelope-from ) id 1aLvQ1-0001GE-P5 for openwrt-devel@lists.openwrt.org; Wed, 20 Jan 2016 17:15:38 +0100 Subject: [OpenWrt-Devel] [PATCH] Ubnt EdgeRouter: Use mmcblk0p3 as ext4 rootfs for default ? X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" 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 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