From owner-freebsd-mips@freebsd.org Sun Oct 11 19:53:05 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27841A11EEB for ; Sun, 11 Oct 2015 19:53:05 +0000 (UTC) (envelope-from egrosbein@rdtc.ru) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 83B871593 for ; Sun, 11 Oct 2015 19:53:03 +0000 (UTC) (envelope-from egrosbein@rdtc.ru) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221]) by hz.grosbein.net (8.14.9/8.14.9) with ESMTP id t9BJqmF0041337 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sun, 11 Oct 2015 21:52:50 +0200 (CEST) (envelope-from egrosbein@rdtc.ru) X-Envelope-From: egrosbein@rdtc.ru X-Envelope-To: Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id t9BJqcDf028461 for ; Mon, 12 Oct 2015 02:52:38 +0700 (KRAT) (envelope-from egrosbein@rdtc.ru) To: "freebsd-mips@freebsd.org" From: Eugene Grosbein Subject: Some makefs(8) improvements X-Enigmail-Draft-Status: N1110 Message-ID: <561ABE06.60905@rdtc.ru> Date: Mon, 12 Oct 2015 02:52:38 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, T_DATE_IN_FUTURE_96_Q,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on hz.grosbein.net X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Oct 2015 19:53:05 -0000 Hi! While building my own FreeBSD/mips image for device having 8MB flash inly, I've faced two problems with makefs(8) utility. First, there is a bug in makefs: it fails to initialise fs_providersize in a superblock while making UFS file system. This leads to other problems with geom_label. The (trivial) patch is attached to the PR I just submited: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203704 Then, makefs is not quite compatible with mkulzma/geom_uncompress feature: geom_uncompress kernel module reports GEOM provider size rounded up to its compression block size. Generally, this changes original media size and now it fails to match the size of embedded UFS that again leads to problems with geom_label kernel module. This module does not like the mismatch and skips the file system while tasting the GEOM and looking for UFS label. I've added new option "-r" to makefs to round up generated image to specified block size, f.e.: makefs -t ffs -r 65536 -o bsize=4096,fsize=512,label=flash optimization=space fs.img fs geom_uncompress does not change GEOM media size for images rounded that way and geom_label accepts such GEOMs just fine. The patch is attached to another PR I just submited: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203707 Hope there PRs won't hand around for years :-)