Problem to update new version uboot and rootfs

I’m updating the BSP in my project and need some help with an issue.

From:
uboot: 2015.04
kernel: 4.4.107

Updated to:
uboot: 2016.11-toradex
rootfs: Colibri-VF_Console-Image_2.8.6
kernel: 4.4.177

We keep the same changes we did in the rootfs and kernel from the last version, and in the uboot some defines was in colibri_vf.h and in the new version I just moved to colibri_vf_defconig. Now, when I update the board and load the new version of uboot I got some issues when start the kernel.

[    2.658876] ubi0: good PEBs: 4075, bad PEBs: 5, corrupted PEBs: 0                                          
[    2.665034] ubi0: user volume: 8, internal volumes: 1, max. volumes count: 128                             
[    2.672351] ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 0                
[    2.680776] ubi0: available PEBs: 550, total reserved PEBs: 3525, PEBs reserved for bad PEB handling: 75   
[    2.690367] ubi0: background thread "ubi_bgt0d" started, PID 57                                            
[    2.696804] hctosys: unable to open rtc device (rtc0)                                                      
[    2.762703] UBIFS (ubi0:5): UBIFS: mounted UBI device 0, volume 5, name "rootfs_b", R/O mode               
[    2.771266] UBIFS (ubi0:5): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bys
[    2.781326] UBIFS (ubi0:5): FS size: 199987200 bytes (190 MiB, 1575 LEBs), journal size 9023488 bytes (8 M)
[    2.792137] UBIFS (ubi0:5): reserved for root: 0 bytes (0 KiB)                                             
[    2.798060] UBIFS (ubi0:5): media format: w4/r0 (latest is w4/r0), UUID 9218ED84-3F8D-423C-AB08-C8C322CDA9l
[    2.810678] VFS: Mounted root (ubifs filesystem) readonly on device 0:13.                                  
[    2.817661] devtmpfs: error mounting -2                                                                    
[    2.822419] Freeing unused kernel memory: 216K                                                             
Failed to mount sysfs at /sys: No such file or directory                                                      
Failed to mount proc at /proc: No such file or directory                                                      
Failed to mount devtmpfs at /dev: No such file or directory                                                   
Freezing execution. 

I already set:

CONFIG_CMD_EXT3=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_PROC=y
CONFIG_PROC_MOUNT=y
CONFIG_SYSFS=y
CONFIG_SYSFS_MOUNT=y

Hi @Danilo

Could you provide the hardware version of your module? Which carrier board are you using?

We keep the same changes we did in the rootfs and kernel from the last version,

What changes have you done?
Please share your kernel .config?

and in the uboot some defines was in colibri_vf.h and in the new version I just moved to colibri_vf_defconig.

Which defines?

Best regards,
Jaski

In the colibri_vf_defconfig we changed the defines:

CONFIG_BOOTDELAY=15
CONFIG_SYS_PROMPT="TCX22-HX # 

and add this to try to fix this issue:

+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_PROC=y
+CONFIG_PROC_MOUNT=y
+CONFIG_SYSFS=y
+CONFIG_SYSFS_MOUNT=y

This is kernel config file.

The board: Colibri VF61 256MB V1.2B
To load the code we are using our own board.

When I update just the kernel it works, but when update the rootfs and the uboot this issue appears.

In the rootfs the changes was deleted the same files that we deleted in the last version:

rm $BUILD_DIR/src/README
rm $BUILD_DIR/src/colibri-vf_bin/flash_blk.img
rm $BUILD_DIR/src/colibri-vf_bin/flash_blk.scr
rm $BUILD_DIR/src/colibri-vf_bin/flash_eth.img
rm $BUILD_DIR/src/colibri-vf_bin/flash_eth.scr
rm $BUILD_DIR/src/colibri-vf_bin/fwd_blk.img
rm $BUILD_DIR/src/colibri-vf_bin/fwd_blk.scr
rm $BUILD_DIR/src/colibri-vf_bin/fwd_eth.img
rm $BUILD_DIR/src/colibri-vf_bin/fwd_eth.scr
rm $BUILD_DIR/src/colibri-vf_bin/fwd_mmc.img
rm $BUILD_DIR/src/colibri-vf_bin/fwd_mmc.scr
rm $BUILD_DIR/src/colibri-vf_bin/mk-u-boot-scripts.sh
rm $BUILD_DIR/src/colibri-vf_bin/u-boot-colibri-vf-2016.11+gitAUTOINC+83a53c1c0c-r0.imx
rm $BUILD_DIR/src/colibri-vf_bin/u-boot-nand.imx
rm $BUILD_DIR/src/colibri-vf_bin/u-boot.imx
rm $BUILD_DIR/src/colibri-vf_bin/zImage
rm $BUILD_DIR/src/colibri-vf_bin/zImage--4.4+git0+6f01eb5bf8-r0-colibri-vf-20190401113202.bin
rm $BUILD_DIR/src/colibri-vf_bin/zImage--4.4+git0+6f01eb5bf8-r0-vf500-colibri-eval-v3-20190401113202.dtb
rm $BUILD_DIR/src/colibri-vf_bin/zImage--4.4+git0+6f01eb5bf8-r0-vf610-colibri-eval-v3-20190401113202.dtb
rm $BUILD_DIR/src/colibri-vf_bin/zImage-vf500-colibri-eval-v3.dtb
rm $BUILD_DIR/src/colibri-vf_bin/zImage-vf610-colibri-eval-v3.dtb
rm $BUILD_DIR/src/format_sd.sh
rm $BUILD_DIR/src/update.sh
rm $BUILD_DIR/src/vf_flash/imx_uart
rm $BUILD_DIR/src/vf_flash/mkfs.ubifs
rm $BUILD_DIR/src/vf_flash/vybrid_usb_work.conf

I did other test.
I updated the uboot and kernel. Kept the old version of rootfs and it worked. This issue appears when I update the rootfs to the new version.

HI @Danilo

Did the update process go well? Can you provide a log?

Which kernel version were you using before?
What changes have you done to the rootfs?

No, it’s not working well. When I update the rootfs this issue appears.
The changes we did in the rootfs was remove some files that I described above. This is the same change we did in the old version. These are unnecessary files to the project.

The old version is: uboot: 2015.04 / kernel: 4.4.107

And trying to update to: /uboot: 2016.11-toradex / rootfs: Colibri-VF_Console-Image_2.8.6 / kernel: 4.4.177

I kept all the files in the rootfs, without any change, and it doesn’t work also. Does anyone know what can generate this issue : devtmpfs: error mounting -2 ? Can be something in the uboot?

Hi @Danilo

So this means, if you update to Bsp 2.8b6 without any changes, then it did not work.

Could you post the the log of the update process to a regular Bsp 2.8b6 without any changes and boot log after updating?

Thanks and best regards,
Jaski

In the rootfs there are some files without permission to move or copy when I’m creating my precompiled image.
I gave permission +x to rootfs/etc/profile.d and 644 to src/rootfs/etc/shadow
I dont know why, but it worked

Now I have others problems like:

Failed to start Load Kernel Modules.
Failed to start Network Time Synchronization
Failed to start Load default USB gadget schema g1.schema.
Failed to start Run pending postinsts.
Failed to start First Boot
Failed to start Configure Partitions.
Failed to start Reset board components
watchdog watchdog0: watchdog did not stop!
Failed to start Device Setup.
Failed to start CAN Network Setup.
Failed to start Network Setup.
Failed to start Network VLAN Setup.

In the rootfs there are some files without permission to move or copy when I’m creating my precompiled image. I gave permission +x to rootfs/etc/profile.d and 644 to src/rootfs/etc/shadow I dont know why, but it worked

How are you creating your pre-compiled image?
Usually you don’t have to touch anything, when you build an image.

Does the installation of the Bsp 2.8b6 without any changes works or not?

Best regards,
Jaski