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

​Note as expected the linuximage and root.* binaries were regenerated.  (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 
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