From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-yk0-x22d.google.com ([2607:f8b0:4002:c07::22d]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1XF4jA-0004sz-Sv for ptxdist@pengutronix.de; Wed, 06 Aug 2014 19:10:17 +0200 Received: by mail-yk0-f173.google.com with SMTP id 131so1871565ykp.4 for ; Wed, 06 Aug 2014 10:10:10 -0700 (PDT) MIME-Version: 1.0 Date: Wed, 6 Aug 2014 12:10:09 -0500 Message-ID: From: JD Wilson Subject: [ptxdist] how to resolve envfs wrong magic on /dev/mmc2.barebox-enviroment Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1763844182==" Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de --===============1763844182== Content-Type: multipart/alternative; boundary=089e0160c36064952e04fff90b4d --089e0160c36064952e04fff90b4d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable ptxdist group: I am looking for help to resolve this error when booting from a properly formatted SD card. barebox 2013.08.0-PD13.2.3 #3 Tue Jul 1 12:14:56 CDT 2014 [...] Module Revision: 2 Using environment in MMC Flash imx6_ocotp imx6_ocotp: probe failed: Device or resource busy malloc space: 0x2be00000 -> 0x2fdfffff (size 64 MiB) mmc2: registered mmc2 barebox-environment environment-mmc.9: setting default environment path to /dev/mmc2.barebox-environment *envfs: wrong magic on /dev/mmc2.barebox-environment* no valid environment found on /dev/mmc2.barebox-environment. Using default environment running /env/bin/init... barebox@Phytec phyFLEX-i.MX6 Single Carrier-Board:/ This version of barebox and it's environment has been working well since it was last built on 1 Jul 2014. Here what I did to get to this situation: We needed to disable a debug option in the Linux kernel, and this was done through running: $ ptxdist-2012.03.0 kernelconfig and disable the option through the menu for CONFIG_USB_DEBUG Then ran $ ptxdist-2012.03.0 go $ ptxdist-2012.03.0 images and the resulting images are as follows (edited for brevity) and we only need the solo image 16 -rw-r--r-- 1 16352 Jul 1 12:14 barebox-default-environment 356 -rw-r--r-- 1 362703 Jul 1 12:14 barebox-phytec-pbab01s-512mb.img 3796 -rw-r--r-- 1 3886788 Aug 4 10:40 linuximage 350000 -rw-r--r-- 1 358400000 Aug 4 10:46 root.ext2 31476 -rw-r--r-- 1 32230790 Aug 4 10:46 root.tgz 47232 -rw-r--r-- 1 48365568 Aug 4 10:47 root.ubi 45508 -rw-r--r-- 1 46600192 Aug 4 10:47 root.ubifs =E2=80=8BNote as expected the linuximage and root.* binaries were regenerat= ed. (I'm assuming the option to include the kernel config in the rootfs may have caused the rootfs to be re-built. The modified images were then copied to an SD card and then I tried to boot from the SD card to ensure changes worked before flashing NAND (imx6s) This is what resulted in the above message =E2=80=8B mmc2: registered mmc2 barebox-environment environment-mmc.9: setting default environment path to /dev/mmc2.barebox-environment *envfs: wrong magic on /dev/mmc2.barebox-environment* no valid environment found on /dev/mmc2.barebox-environment. Using default environment running /env/bin/init... I have also tried using new SD card and still running into the same error. I have verified that I can use another SD card prior to the change to the Linux kernel and that SD card will boot. Is it possible that the bootloader (barebox) should have been rebuilt? Any help would be much appreciated. Regards, JD --089e0160c36064952e04fff90b4d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
ptxdist group:

I am looking for help to resolve this error when booting from a properly fo= rmatted SD card.

barebox 2013.08.0-PD13.2.3 #3 Tue Jul 1 12:14= :56 CDT 2014

[...]

Module Revision: 2
Using= environment in MMC Flash
i= mx6_ocotp imx6_ocotp: probe failed: Device or resource busy
malloc space: 0x2be00000 -> 0x2fdfff= ff (size 64 MiB)
mmc2: registered mmc2
=
barebox-environment environment-mmc.9: settin= g default environment path to /dev/mmc2.barebox-environment
envfs: wrong magic on /dev/mmc2.bare= box-environment
no valid environment found on /dev/mmc2.= barebox-environment. Using default environment
running /env/bin/init...

barebox@Phytec phyFLEX-i.MX6 Single Carrier-Board= :/=C2=A0

This version of barebox and it's = environment has been working well since it was last built on 1 Jul 2014.

Here what I did to get to this situation:

We needed to disab= le a debug option in the Linux kernel, and this was done through running:

$ ptxdist-2012.03.0 kernelconfig

and disable the option thro= ugh the menu for CONFIG_USB_DEBUG
=C2=A0
Then ran=C2=A0

$ ptxdist-2012.03.0 go
$ ptxdist-2012.03.0 images

=
and the resulting images are as fo= llows (edited for brevity) and we only need the solo image

=C2=A0 =C2=A0 16 -rw-r--r-- =C2=A01 =C2=A0 =C2=A0 =C2= =A016352 Jul =C2=A01 12:14 barebox-default-environment
=C2=A0 =C2=A0356 -rw-r--r-- =C2=A01 =C2=A0 =C2= =A0 362703 Jul =C2=A01 12:14 barebox-phytec-pbab01s-512mb.img
=C2=A0 3796 -rw-r--r-- =C2=A01 =C2=A0 =C2=A03886788 Aug =C2=A04 10:40 = linuximage
350000 = -rw-r--r-- =C2=A01 =C2=A0358400000 Aug =C2=A04 10:46 root.ext2
=
=C2=A031476 -rw-r--r-- =C2=A01 =C2=A0 32230790 = Aug =C2=A04 10:46 root.tgz
=C2=A047= 232 -rw-r--r-- =C2=A01 =C2=A0 48365568 Aug =C2=A04 10:47 root.ubi
=C2=A045508 -rw-r--r-- =C2=A01 =C2=A0= 46600192 Aug =C2=A04 10:47 root.ubifs

=E2= =80=8BNote as expected the linuximage and root.* binaries were regenerated.= =C2=A0(I'm assuming the option to include the kernel config in the roo= tfs may have caused the rootfs to be re-built.

<= /div>
= The modified images were then copied to an SD card and then I tried to boot= from the SD card to ensure changes worked before flashing NAND (imx6s)

<= /div>
= This is what resulted in the above message=C2=A0
=E2=80=8B
<= div class=3D"gmail_default" style=3D"font-family:arial">
mmc2: registered mmc2
barebox-environment e= nvironment-mmc.9: setting default environment path to /dev/mmc2.barebox-env= ironment
envfs: wrong magic= on /dev/mmc2.barebox-environment
no valid environment = found on /dev/mmc2.barebox-environment. Using default environment
running /env/bin/init= ...

I have also tried using new SD car= d and still running into the same error.

=
I hav= e verified that I can use another SD card prior to the change to the Linux = kernel and that SD card will boot.

=
Is it= possible that the bootloader (barebox) should have been rebuilt?

Any help would be much appreciated= .

JD


--089e0160c36064952e04fff90b4d-- --===============1763844182== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- ptxdist mailing list ptxdist@pengutronix.de --===============1763844182==--