This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

UBI error: ubi_io_read in am335x

Other Parts Discussed in Thread: TMP275, TLV320AIC3106

Hello,

I am using 1GB nand flash in my am335x evm.I am able to boot my u-boot and uImage fron nand boot. while conducting the ubifs link it got error and it is not mounting to my ubi fileystem. I have applied 16-bit ecc in u-boot then only it is taking and booting from default nand.

Find my nand flash parameters and steps followed for creating the ubi.img. How o calculate PEB and LEB others.

Minimum input/output unit size           :           2048 bytes

Sub-page size                                       :            512 bytes

Eraseblock size                                    :            131072 bytes, 128.0 KiB

Amount of eraseblocks                        :            4036 (529006592 bytes, 504.5 MiB)

OOB size                                                :            128 bytes

Booting Error:

[    3.746175] UBI error: ubi_io_read: -74 (ECC error) while reading 64 bytes from PEB 3:0, read 64 bytes

[    3.759517] UBI error: ubi_io_read: -74 (ECC error) while reading 512 bytes from PEB 3:2048, read 512 bytes

I have given the commands for ubifs

$ mkfs.ubifs -q -r root-fs/ -m 2048 -e 129024 -c 2047 -o ubifs.img

$ ubinize -o ubi.img -m 2048 -p 128KiB -s 512 ubinize.cfg

[ubifs]

mode=ubi

image=ubifs.img

vol_id=0

vol_size=200MiB

vol_type=dynamic

vol_name=rootfs

vol_flags=autoresize

Is there any method to fix my nand booting issue????.

Regards

 Anil

  • Hi Biser,

    Thanks for your response.

    I have gone through the same document, But still getting the error. under kernel drivers any modifications required for 16-bit ECC.

    Regards
    Anil
  • Hi Biser,

    I am using SDK 6 and Linux 3.2 version. In my -boot according to my nand flash it requires 16 bit ECC. Because i have modified source under u-boot /am335x-evm.h modified as #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH16_CODE_HW & #define CONFIG_SYS_NAND_ECCPOS. After modified these two files i am able boot my nand by default.

    But still i am getting the below same error while connecting to my ubifs.

    UBI error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes
    UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes from PEB 0:2048, read 512 bytes

    Any 16 bit ECC modifications are required in my kernel drivers (arch/arm/mach-omap2). Please help me.

    Regards,

    Anil

     

  • For SDK 6.0 there are a number of patches that need to be applied to the kernel for BCH-16 support. I'm not a SW expert, but this post and below it give some information: https://e2e.ti.com/support/arm/sitara_arm/f/791/p/214942/1081233#1081233 BCH-16 is natively supported from SDK 7.0 on.

  • Hi Biser,

    I am new to SDK7 version, Because it is Linux 3.12. But u-boot i can take it and work on SDK7. But for me it is challenge to work on Linux 3.12.

    ANOTHER THING, I am not clear with my flash according to datasheet says it is 4-bit ECC. In my datasheet it is mentioned it as "8 Gb, 4-bit ECC, x8 I/O and 3V VCC". Please find my nand datasheet link: www.spansion.com/.../S34ML08G2.pdf and suggest me what should i apply for my nand either 4-bit/8-bit/16-bit ECC.

    Please I need more help.

    Regards
    Anil
  • This NAND part has 128 byte spare area. The AM335X ROM code will default to BCH-16 for this spare area size, so this is what should be used. I will try to search for a more detailed description of what modifications are needed to SDK 6.0 for BCH-16 support.

  • Hi Biser,

    Thanks ok, Please send me the modifications for SDK 6.0 for BCH-16 support. You mean as per my error it required to change under linux boards or drivers changes right?

    OK, I will wait for your response.

    Thanks,
    Anil
  • Hi Anil,

    Regretfully there is no straightforward way to do this on SDK 6.0. Here is the feedback I got from the factory team:

    "We have told other customers to look at the u-boot/kernel from am43xx SDK 7.0 and see the differences from am335x SDK 6.0. I think u-boot isn’t too hard, but the kernel will require more work. I think the omap2.c NAND driver will require the most work."

  • Hi Biser,

    I have no problem with u-boot, Problem i am facing in my drivers. You are suggesting me to apply the am43xx SDK 7.0 patches to my SDK6 linux 3.2 right.

    could you please share the SDK location. i did't see the sdk for am43xx on TI site. am43xx SDK 7.0 is also 3.12 linux right?

    I will try to do the patches.

    Regards

     

  • AM437XSDK 7.0 location is: http://software-dl.ti.com/sitara_linux/esd/AM437xSDK/07_01_00_00/index_FDS.html Patches for SDK 7.0 won't apply to SDK6.0. The factory team suggestion is that the NAND drivers be compared and necessary modifications done to SDK 6.0 driver.

  • Tell me for my understanding the 16 bit -ECC NAND support is it available in AM335X SDK7.0 ??

    Or only it supports for AM437XSDK 7.0 ???

    Regards
  • Yes, BCH-16 is supported on AM335X SDK 7.0 and newer versions. I cannot say why the factory team referred to the AM437X SDK in their reply. NAND driver should be identical in both versions.

  • Hi Biser,

    That mean i can work on Linux 3.12 from AM335X SDK7.

    But I am new to Linux 3.12. my development is not stopping till Linux 3.2. Tomorrow if i want to include more and more patches at that time any way again there is Linux 3.12 dependency.

    I will try to modify my all the changes from Linux 3.2 to Linux 3.12.

    Please clarify and give the answers to my below queries.

    • I am defining my gpio configuration and doing on/off in in my board-am335xevm.c file, how these configuration can define in Linux 3.12 because there is no board file.
    • How to define the i2c slave ids
    • For matrix keypad it required to define the key maps under board-am335xevm.c and how to define in Linux 3.12
    • All the irqs defining in board-am335xevm.c and how in Linux 3.12.
    • Define all the mtd partitions under board-am335xevm.c and how in Linux 3.12 ??
    • Like i have my doubts to convert from 3.2 to 3.12.

    Please help me, so that i can jump from 3.2 to 3.12 version.

    Regards
  • I am not a SW expert myself, so I have asked the SW team to address your questions. What I can say is that starting from SDK 7.0 board configuration is based on device trees, rather than board files. Also I would recommend that you skip SDK 7.0 and jump directly to the latest version: http://software-dl.ti.com/sitara_linux/esd/processor-sdk/PROCESSOR-SDK-LINUX-AM335X/latest/index_FDS.html This is based on kernel v3.14.26 and has quite a few improvements and bug fixes compared to SDK 7.0.

  • Hi Biser,

    Ok thanks, I will work with AM335x SDK 8 (Linux 3.14.26).

    Please help me and ask your engineer to reply for my queries to start the process.

    Is this SDK8 OS can be portable in AM335X it-seems right (Because it comes default with LCD, Back-light, Bluetooth & Wi-Fi, Host USB, Mini USB, Sensors, UARTs, Ethernet, etc)?

    I will wait for your response.

    Regards
  • Hi Anil,

    As Biser said, starting from SDK7.0 (kernel 3.12) & the latest version of the sdk: 8.0 (using kernel 3.14) all these configurations are done in device tree.
    See the am335x-evmsk.dts, am335x-boneblack.dts & am335x-bonecommon.dtsi files for reference. They are located in arch/arm/boot/dts folder in SDK8.0.

    For example:
    - the definition of i2c slave ids, you can check the i2c1: i2c@4802a000 device node in arch/arm/boot/dts/am335x-evm.dts, inside that i2c node the following slaves are listed: lis331dlh, tsl2550, tmp275 & tlv320aic3106.
    Genereal documentation for i2c node can be found in Documentation/devicetree/bindings/i2c/i2c-omap/txt.

    - in the same file (arch/arm/boot/dts/am335x-evm.dts) you can find exampe for matrix keypad: matrix_keypad: matrix_keypad@0

    - irqs are defined in different device tree nodes

    - an example definition of mtd/nand partitions can be found in Documentation/devicetree/bindings/mtd/gpmc-nand.txt. After /*partitions go here*/ comment you should add your partitions, i.e. :
    partition@0 {
    label = "NAND.SPL";
    reg = <0x00000000 0x000020000>;
    };
    partition@1 {
    label = "NAND.SPL.backup1";
    reg = <0x00020000 0x00020000>;
    };
    partition@2 {
    label = "NAND.SPL.backup2";
    reg = <0x00040000 0x00020000>;
    };
    partition@3 {
    label = "NAND.SPL.backup3";
    reg = <0x00060000 0x00020000>;
    };
    partition@4 {
    label = "NAND.u-boot-spl-os";
    reg = <0x00080000 0x00040000>;
    };
    partition@5 {
    label = "NAND.u-boot";
    reg = <0x000C0000 0x00100000>;
    };
    partition@6 {
    label = "NAND.u-boot-env";
    reg = <0x001C0000 0x00020000>;
    };
    partition@7 {
    label = "NAND.u-boot-env.backup1";
    reg = <0x001E0000 0x00020000>;
    };
    partition@8 {
    label = "NAND.kernel";
    reg = <0x00200000 0x00800000>;
    };
    partition@9 {
    label = "NAND.file-system";
    reg = <0x00A00000 0x0F600000>;
    };


    For more information on how to create the corresponding device tree nodes use the documents in: Documentation/devictree/bindigs/ & search in the following community wiki: www.devicetree.org/Main_Page

    Hope this helps.

    Best Regards,
    Yordan
  • Hi Yordan/Biser,

    Thank you, I understood. If i have any doubt  i will reply.

    Thanks for the support.

    Regards

    Anil

     

  • Hi Yordan,

    Now i am working with Linux 3.14 and made some changes under drivers. 

    I have deleted am335x-evm.dts file from /arch/arm/boot/dts/, without this file still my compilation success and got the zImage.

    why?? Could you send me the configuration file to am335x-evm platform. Please find my configuration and give me your comments.

    Regards,

    Anil

    am335x-configuration.txt

  • Hi Anil,

    The config file for AM335x devices is omap2plus_defconfig.  Find the file attached (this is the clean omap2plus_defconfig file, no modifications are done): 

    omap2plus_defconfig.txt
    CONFIG_SYSVIPC=y
    CONFIG_POSIX_MQUEUE=y
    CONFIG_NO_HZ=y
    CONFIG_HIGH_RES_TIMERS=y
    CONFIG_BSD_PROCESS_ACCT=y
    CONFIG_IKCONFIG=y
    CONFIG_IKCONFIG_PROC=y
    CONFIG_LOG_BUF_SHIFT=16
    CONFIG_BLK_DEV_INITRD=y
    CONFIG_EXPERT=y
    CONFIG_SLAB=y
    CONFIG_PROFILING=y
    CONFIG_OPROFILE=y
    CONFIG_KPROBES=y
    CONFIG_MODULES=y
    CONFIG_MODULE_FORCE_LOAD=y
    CONFIG_MODULE_UNLOAD=y
    CONFIG_MODULE_FORCE_UNLOAD=y
    CONFIG_MODVERSIONS=y
    CONFIG_MODULE_SRCVERSION_ALL=y
    # CONFIG_BLK_DEV_BSG is not set
    CONFIG_PARTITION_ADVANCED=y
    CONFIG_ARCH_MULTI_V6=y
    CONFIG_POWER_AVS_OMAP=y
    CONFIG_POWER_AVS_OMAP_CLASS3=y
    CONFIG_OMAP_RESET_CLOCKS=y
    CONFIG_OMAP_MUX_DEBUG=y
    CONFIG_ARCH_OMAP2=y
    CONFIG_ARCH_OMAP3=y
    CONFIG_ARCH_OMAP4=y
    CONFIG_SOC_OMAP5=y
    CONFIG_SOC_AM33XX=y
    CONFIG_SOC_AM43XX=y
    CONFIG_SOC_DRA7XX=y
    CONFIG_ARM_THUMBEE=y
    CONFIG_ARM_ERRATA_411920=y
    CONFIG_SMP=y
    CONFIG_NR_CPUS=2
    CONFIG_CMA=y
    CONFIG_ZBOOT_ROM_TEXT=0x0
    CONFIG_ZBOOT_ROM_BSS=0x0
    CONFIG_ARM_APPENDED_DTB=y
    CONFIG_ARM_ATAG_DTB_COMPAT=y
    CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200"
    CONFIG_KEXEC=y
    CONFIG_FPE_NWFPE=y
    CONFIG_CPU_IDLE=y
    CONFIG_BINFMT_MISC=y
    CONFIG_PM_DEBUG=y
    CONFIG_NET=y
    CONFIG_PACKET=y
    CONFIG_UNIX=y
    CONFIG_XFRM_USER=y
    CONFIG_NET_KEY=y
    CONFIG_NET_KEY_MIGRATE=y
    CONFIG_INET=y
    CONFIG_IP_MULTICAST=y
    CONFIG_IP_PNP=y
    CONFIG_IP_PNP_DHCP=y
    CONFIG_IP_PNP_BOOTP=y
    CONFIG_IP_PNP_RARP=y
    # CONFIG_INET_LRO is not set
    # CONFIG_IPV6 is not set
    CONFIG_NETFILTER=y
    CONFIG_CAN=m
    CONFIG_CAN_C_CAN=m
    CONFIG_CAN_C_CAN_PLATFORM=m
    CONFIG_BT=m
    CONFIG_BT_HCIUART=m
    CONFIG_BT_HCIUART_H4=y
    CONFIG_BT_HCIUART_BCSP=y
    CONFIG_BT_HCIUART_LL=y
    CONFIG_BT_HCIBCM203X=m
    CONFIG_BT_HCIBPA10X=m
    CONFIG_BT_WILINK=m
    CONFIG_CFG80211=m
    CONFIG_MAC80211=m
    CONFIG_MAC80211_RC_PID=y
    CONFIG_MAC80211_RC_DEFAULT_PID=y
    CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
    CONFIG_DEVTMPFS=y
    CONFIG_DEVTMPFS_MOUNT=y
    CONFIG_DMA_CMA=y
    CONFIG_OMAP_OCP2SCP=y
    CONFIG_CONNECTOR=y
    CONFIG_MTD=y
    CONFIG_MTD_CMDLINE_PARTS=y
    CONFIG_MTD_BLOCK=y
    CONFIG_MTD_OOPS=y
    CONFIG_MTD_CFI=y
    CONFIG_MTD_CFI_INTELEXT=y
    CONFIG_MTD_NAND=y
    CONFIG_MTD_NAND_OMAP2=y
    CONFIG_MTD_ONENAND=y
    CONFIG_MTD_ONENAND_VERIFY_WRITE=y
    CONFIG_MTD_ONENAND_OMAP2=y
    CONFIG_MTD_UBI=y
    CONFIG_BLK_DEV_LOOP=y
    CONFIG_BLK_DEV_RAM=y
    CONFIG_BLK_DEV_RAM_SIZE=16384
    CONFIG_SENSORS_TSL2550=m
    CONFIG_BMP085_I2C=m
    CONFIG_SENSORS_LIS3_I2C=m
    CONFIG_SCSI=y
    CONFIG_BLK_DEV_SD=y
    CONFIG_SCSI_MULTI_LUN=y
    CONFIG_SCSI_SCAN_ASYNC=y
    CONFIG_MD=y
    CONFIG_NETDEVICES=y
    CONFIG_KS8851=y
    CONFIG_KS8851_MLL=y
    CONFIG_SMC91X=y
    CONFIG_SMSC911X=y
    CONFIG_TI_CPSW=y
    CONFIG_AT803X_PHY=y
    CONFIG_SMSC_PHY=y
    CONFIG_USB_USBNET=y
    CONFIG_USB_NET_SMSC95XX=y
    CONFIG_USB_ALI_M5632=y
    CONFIG_USB_AN2720=y
    CONFIG_USB_EPSON2888=y
    CONFIG_USB_KC2190=y
    CONFIG_LIBERTAS=m
    CONFIG_LIBERTAS_USB=m
    CONFIG_LIBERTAS_SDIO=m
    CONFIG_LIBERTAS_DEBUG=y
    CONFIG_WL_TI=y
    CONFIG_WL12XX=m
    CONFIG_WL18XX=m
    CONFIG_WLCORE_SPI=m
    CONFIG_WLCORE_SDIO=m
    CONFIG_MWIFIEX=m
    CONFIG_MWIFIEX_SDIO=m
    CONFIG_MWIFIEX_USB=m
    CONFIG_INPUT_JOYDEV=y
    CONFIG_INPUT_EVDEV=y
    CONFIG_KEYBOARD_GPIO=y
    CONFIG_KEYBOARD_MATRIX=m
    CONFIG_KEYBOARD_TWL4030=y
    CONFIG_INPUT_TOUCHSCREEN=y
    CONFIG_TOUCHSCREEN_ADS7846=y
    CONFIG_INPUT_MISC=y
    CONFIG_INPUT_TWL4030_PWRBUTTON=y
    # CONFIG_LEGACY_PTYS is not set
    CONFIG_SERIAL_8250=y
    CONFIG_SERIAL_8250_CONSOLE=y
    CONFIG_SERIAL_8250_NR_UARTS=32
    CONFIG_SERIAL_8250_EXTENDED=y
    CONFIG_SERIAL_8250_MANY_PORTS=y
    CONFIG_SERIAL_8250_SHARE_IRQ=y
    CONFIG_SERIAL_8250_DETECT_IRQ=y
    CONFIG_SERIAL_8250_RSA=y
    CONFIG_SERIAL_OF_PLATFORM=y
    CONFIG_SERIAL_OMAP=y
    CONFIG_SERIAL_OMAP_CONSOLE=y
    CONFIG_HW_RANDOM=y
    CONFIG_I2C_CHARDEV=y
    CONFIG_SPI=y
    CONFIG_SPI_OMAP24XX=y
    CONFIG_PINCTRL_SINGLE=y
    CONFIG_DEBUG_GPIO=y
    CONFIG_GPIO_SYSFS=y
    CONFIG_GPIO_TWL4030=y
    CONFIG_W1=y
    CONFIG_POWER_SUPPLY=y
    CONFIG_POWER_AVS=y
    CONFIG_SENSORS_LM75=m
    CONFIG_THERMAL=y
    CONFIG_THERMAL_GOV_FAIR_SHARE=y
    CONFIG_THERMAL_GOV_USER_SPACE=y
    CONFIG_CPU_THERMAL=y
    CONFIG_TI_SOC_THERMAL=y
    CONFIG_TI_THERMAL=y
    CONFIG_OMAP4_THERMAL=y
    CONFIG_OMAP5_THERMAL=y
    CONFIG_DRA752_THERMAL=y
    CONFIG_WATCHDOG=y
    CONFIG_OMAP_WATCHDOG=y
    CONFIG_TWL4030_WATCHDOG=y
    CONFIG_MFD_SYSCON=y
    CONFIG_MFD_PALMAS=y
    CONFIG_MFD_TPS65217=y
    CONFIG_MFD_TPS65218=y
    CONFIG_MFD_TPS65910=y
    CONFIG_TWL6040_CORE=y
    CONFIG_REGULATOR_FIXED_VOLTAGE=y
    CONFIG_REGULATOR_PALMAS=y
    CONFIG_REGULATOR_TI_ABB=y
    CONFIG_REGULATOR_TPS65023=y
    CONFIG_REGULATOR_TPS6507X=y
    CONFIG_REGULATOR_TPS65217=y
    CONFIG_REGULATOR_TPS65218=y
    CONFIG_REGULATOR_TPS65910=y
    CONFIG_REGULATOR_TWL4030=y
    CONFIG_REGULATOR_PBIAS=y
    CONFIG_FB=y
    CONFIG_FIRMWARE_EDID=y
    CONFIG_FB_MODE_HELPERS=y
    CONFIG_FB_TILEBLITTING=y
    CONFIG_OMAP2_DSS=m
    CONFIG_OMAP2_DSS_SDI=y
    CONFIG_OMAP2_DSS_DSI=y
    CONFIG_FB_OMAP2=m
    CONFIG_DISPLAY_ENCODER_TFP410=m
    CONFIG_DISPLAY_ENCODER_TPD12S015=m
    CONFIG_DISPLAY_CONNECTOR_DVI=m
    CONFIG_DISPLAY_CONNECTOR_HDMI=m
    CONFIG_DISPLAY_PANEL_DPI=m
    CONFIG_BACKLIGHT_LCD_SUPPORT=y
    CONFIG_LCD_CLASS_DEVICE=y
    CONFIG_LCD_PLATFORM=y
    CONFIG_FRAMEBUFFER_CONSOLE=y
    CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
    CONFIG_LOGO=y
    CONFIG_SOUND=m
    CONFIG_SND=m
    CONFIG_SND_MIXER_OSS=m
    CONFIG_SND_PCM_OSS=m
    CONFIG_SND_VERBOSE_PRINTK=y
    CONFIG_SND_DEBUG=y
    CONFIG_SND_USB_AUDIO=m
    CONFIG_SND_SOC=m
    CONFIG_SND_OMAP_SOC=m
    CONFIG_SND_AM33XX_SOC_EVM=m
    CONFIG_SND_EDMA_SOC=m
    CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m
    CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m
    CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m
    CONFIG_SND_SIMPLE_CARD=m
    CONFIG_USB=y
    CONFIG_USB_DEBUG=y
    CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
    CONFIG_USB_MON=y
    CONFIG_USB_WDM=y
    CONFIG_USB_STORAGE=y
    CONFIG_USB_DWC3=m
    CONFIG_USB_TEST=y
    CONFIG_NOP_USB_XCEIV=y
    CONFIG_OMAP_USB2=y
    CONFIG_TI_PIPE3=y
    CONFIG_AM335X_PHY_USB=y
    CONFIG_USB_GADGET=y
    CONFIG_USB_GADGET_DEBUG=y
    CONFIG_USB_GADGET_DEBUG_FILES=y
    CONFIG_USB_GADGET_DEBUG_FS=y
    CONFIG_USB_ZERO=m
    CONFIG_MMC=y
    CONFIG_MMC_UNSAFE_RESUME=y
    CONFIG_SDIO_UART=y
    CONFIG_MMC_OMAP=y
    CONFIG_MMC_OMAP_HS=y
    CONFIG_NEW_LEDS=y
    CONFIG_LEDS_GPIO=y
    CONFIG_LEDS_TRIGGERS=y
    CONFIG_LEDS_TRIGGER_TIMER=y
    CONFIG_LEDS_TRIGGER_ONESHOT=y
    CONFIG_LEDS_TRIGGER_HEARTBEAT=y
    CONFIG_LEDS_TRIGGER_BACKLIGHT=y
    CONFIG_LEDS_TRIGGER_CPU=y
    CONFIG_LEDS_TRIGGER_GPIO=y
    CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
    CONFIG_RTC_CLASS=y
    CONFIG_RTC_DRV_TWL92330=y
    CONFIG_RTC_DRV_TWL4030=y
    CONFIG_RTC_DRV_OMAP=y
    CONFIG_DMADEVICES=y
    CONFIG_TI_EDMA=y
    CONFIG_DMA_OMAP=y
    CONFIG_EXTCON=y
    CONFIG_EXTCON_PALMAS=y
    CONFIG_EXT2_FS=y
    CONFIG_EXT3_FS=y
    # CONFIG_EXT3_FS_XATTR is not set
    CONFIG_EXT4_FS=y
    CONFIG_QUOTA=y
    CONFIG_QFMT_V2=y
    CONFIG_MSDOS_FS=y
    CONFIG_VFAT_FS=y
    CONFIG_TMPFS=y
    CONFIG_JFFS2_FS=y
    CONFIG_JFFS2_SUMMARY=y
    CONFIG_JFFS2_FS_XATTR=y
    CONFIG_JFFS2_COMPRESSION_OPTIONS=y
    CONFIG_JFFS2_LZO=y
    CONFIG_JFFS2_RUBIN=y
    CONFIG_UBIFS_FS=y
    CONFIG_CRAMFS=y
    CONFIG_NFS_FS=y
    CONFIG_NFS_V3_ACL=y
    CONFIG_NFS_V4=y
    CONFIG_ROOT_NFS=y
    CONFIG_NLS_CODEPAGE_437=y
    CONFIG_NLS_ISO8859_1=y
    CONFIG_PRINTK_TIME=y
    CONFIG_DEBUG_INFO=y
    CONFIG_MAGIC_SYSRQ=y
    CONFIG_SCHEDSTATS=y
    CONFIG_TIMER_STATS=y
    CONFIG_PROVE_LOCKING=y
    # CONFIG_DEBUG_BUGVERBOSE is not set
    CONFIG_SECURITY=y
    CONFIG_CRYPTO_MICHAEL_MIC=y
    # CONFIG_CRYPTO_ANSI_CPRNG is not set
    CONFIG_CRC_CCITT=y
    CONFIG_CRC_T10DIF=y
    CONFIG_CRC_ITU_T=y
    CONFIG_CRC7=y
    CONFIG_LIBCRC32C=y
    CONFIG_FONTS=y
    CONFIG_FONT_8x8=y
    CONFIG_FONT_8x16=y
    CONFIG_TI_ST=y
    CONFIG_ST_HCI=y
    

    anil kumar23 said:

    I have deleted am335x-evm.dts file from /arch/arm/boot/dts/, without this file still my compilation success and got the zImage.

    why??

    If you've deleted your dts file, then the build system just skips this step & builds all other targets (other dtds, zImage, uImage, etc.). DTB is not called directly in the code by any of the driver files so deleting it will not cause a build error. It is built as a separate image & loaded at boot time by the bootloader & is read/used by the kernel modules: www.devicetree.org/Main_Page

    Best Regards, 

    Yordan

  • HI,

    I am trying to boot AM335x EVM after ubi.img in NAND and I am getting following error :

    [ 2.360598] UBI: attaching mtd9 to ubi0
    [ 3.316777] UBI: scanning is finished
    [ 3.341255] UBI: volume 0 ("rootfs") re-sized from 1586 to 1924 LEBs
    [ 3.348998] UBI: attached mtd9 (name "NAND.file-system", size 246 MiB) to ubi0
    [ 3.356323] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
    [ 3.363155] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 512
    [ 3.369797] UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
    [ 3.376715] UBI: good PEBs: 1967, bad PEBs: 1, corrupted PEBs: 0
    [ 3.382757] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
    [ 3.389927] UBI: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 632741995
    [ 3.398935] UBI: available PEBs: 0, total reserved PEBs: 1967, PEBs reserved for bad PEB handling: 39
    [ 3.408216] UBI: background thread "ubi_bgt0d" started, PID 871
    [ 3.501401] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    [ 3.507543] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
    [ 3.532308] libphy: 4a101000.mdio: probed
    [ 3.536355] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver Atheros 8031 ethernet
    [ 3.562491] cpsw 4a100000.ethernet: Detected MACID = d4:94:a1:8e:26:8f
    [ 3.583365] input: volume_keys.8 as /devices/volume_keys.8/input/input1
    [ 3.590881] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:02 UTC (946684802)
    [ 3.614755] ALSA device list:
    [ 3.617758] No soundcards found.
    [ 3.641486] UBIFS: background thread "ubifs_bgt0_0" started, PID 885
    [ 3.722297] UBIFS: start fixing up free space
    [ 3.763448] UBI: fixable bit-flip detected at PEB 22
    [ 3.768443] UBI: schedule PEB 22 for scrubbing
    [ 3.953750] UBI: fixable bit-flip detected at PEB 37
    [ 3.958751] UBI: schedule PEB 37 for scrubbing
    [ 4.082493] UBI: fixable bit-flip detected at PEB 49
    [ 4.087495] UBI: schedule PEB 49 for scrubbing
    [ 4.634625] UBI: fixable bit-flip detected at PEB 94
    [ 4.639629] UBI: schedule PEB 94 for scrubbing
    [ 4.702952] UBI: fixable bit-flip detected at PEB 97
    [ 4.707944] UBI: schedule PEB 97 for scrubbing
    [ 4.953245] UBI: fixable bit-flip detected at PEB 103
    [ 4.958338] UBI: schedule PEB 103 for scrubbing
    [ 7.481321] UBI: fixable bit-flip detected at PEB 198
    [ 7.486435] UBI: schedule PEB 198 for scrubbing
    [ 7.512435] UBI: fixable bit-flip detected at PEB 198
    [ 7.564486] UBI warning: ubi_eba_copy_leb: read data back from PEB 1967 and it is different
    [ 7.572935] UBI error: wear_leveling_worker: error -22 while moving PEB 198 to PEB 1967
    [ 7.580977] UBI warning: ubi_ro_mode: switch to read-only mode
    [ 7.586859] CPU: 0 PID: 871 Comm: ubi_bgt0d Not tainted 3.14.35 #2
    [ 7.593079] Backtrace:
    [ 7.595588] [<c00118b0>] (dump_backtrace) from [<c0011ac8>] (show_stack+0x18/0x1c)
    [ 7.603201] r6:ddb15cb0 r5:ddc22c00 r4:ddbdddb8 r3:00000000
    [ 7.608933] [<c0011ab0>] (show_stack) from [<c05c49fc>] (dump_stack+0x24/0x28)
    [ 7.616213] [<c05c49d8>] (dump_stack) from [<c03ec350>] (wear_leveling_worker+0x5d8/0x638)
    [ 7.624534] [<c03ebd78>] (wear_leveling_worker) from [<c03eb17c>] (do_work+0x84/0xf8)
    [ 7.632406] r10:00000000 r9:00000000 r8:ddb15cf0 r7:ddbee038 r6:ddb15cbc r5:ddb15000
    [ 7.640301] r4:ddbd1680
    [ 7.642865] [<c03eb0f8>] (do_work) from [<c03ecba0>] (ubi_thread+0xd8/0x188)
    [ 7.649941] r6:c0888128 r5:ddbee000 r4:ddb15000 r3:00000000
    [ 7.655675] [<c03ecac8>] (ubi_thread) from [<c004fcc0>] (kthread+0xd4/0xec)
    [ 7.662675] r10:00000000 r9:00000000 r8:00000000 r7:c03ecac8 r6:ddb15000 r5:00000000
    [ 7.670572] r4:ddbdcac0 r3:00000000
    [ 7.674189] [<c004fbec>] (kthread) from [<c000e758>] (ret_from_fork+0x14/0x3c)
    [ 7.681449] r7:00000000 r6:00000000 r5:c004fbec r4:ddbdcac0
    [ 7.687162] UBI error: do_work: work failed with error code -22
    [ 7.693118] UBI error: ubi_thread: ubi_bgt0d: work failed with error code -22
    [ 7.701192] UBI error: ubi_io_write: read-only mode
    [ 7.706139] UBI warning: ubi_eba_atomic_leb_change: failed to write VID header to LEB 0:196, PEB 1393
    [ 7.715424] UBIFS error (pid 1): ubifs_leb_change: changing 124928 bytes in LEB 196 failed, error -30
    [ 7.724705] UBIFS warning (pid 1): ubifs_ro_mode: switched to read-only mode, error -30
    [ 7.732773] CPU: 0 PID: 1 Comm: swapper Not tainted 3.14.35 #2
    [ 7.738633] Backtrace:
    [ 7.741113] [<c00118b0>] (dump_backtrace) from [<c0011ac8>] (show_stack+0x18/0x1c)
    [ 7.748728] r6:0001e800 r5:ffffffe2 r4:00000004 r3:00000000
    [ 7.754467] [<c0011ab0>] (show_stack) from [<c05c49fc>] (dump_stack+0x24/0x28)
    [ 7.761747] [<c05c49d8>] (dump_stack) from [<c01fd698>] (ubifs_ro_mode.part.11+0x64/0x68)
    [ 7.769968] [<c01fd634>] (ubifs_ro_mode.part.11) from [<c01fda94>] (ubifs_leb_change+0x130/0x138)
    [ 7.778887] r4:ddad1000 r3:00000000
    [ 7.782510] [<c01fd964>] (ubifs_leb_change) from [<c01fc1c0>] (fixup_leb+0x8c/0x144)
    [ 7.790283] r7:ddad182c r6:000000c4 r5:ddad1000 r4:0001e800
    [ 7.796006] [<c01fc134>] (fixup_leb) from [<c01fd4d8>] (ubifs_fixup_free_space+0x26c/0x36c)
    [ 7.804404] r6:00000000 r5:ddad1000 r4:000000c5
    [ 7.809063] [<c01fd26c>] (ubifs_fixup_free_space) from [<c01fb970>] (ubifs_mount+0xe74/0x1594)
    [ 7.817723] r7:ddbb0a00 r6:ddad1000 r5:00000000 r4:00000000
    [ 7.823449] [<c01faafc>] (ubifs_mount) from [<c00cfee0>] (mount_fs+0x4c/0x18c)
    [ 7.830703] r10:00000000 r9:00000000 r8:00000000 r7:c0843f5c r6:ddbc7900 r5:00000000
    [ 7.838606] r4:00008000
    [ 7.841159] [<c00cfe94>] (mount_fs) from [<c00e6d90>] (vfs_kern_mount+0x50/0xe0)
    [ 7.848598] r10:00000000 r9:ddbc78c0 r8:00000000 r7:c0843f5c r6:00008000 r5:ddbc7900
    [ 7.856501] r4:dd81f140
    [ 7.859057] [<c00e6d40>] (vfs_kern_mount) from [<c00e96e0>] (do_mount+0x20c/0xa0c)
    [ 7.866670] r8:00008000 r7:ddbc7900 r6:00000000 r5:c083c9f4 r4:c0843f5c r3:00000000
    [ 7.874494] [<c00e94d4>] (do_mount) from [<c00ea22c>] (SyS_mount+0x8c/0xc0)
    [ 7.881495] r10:c081a6c8 r9:dfea54a0 r8:c081a6f8 r7:00008000 r6:c081a6f8 r5:dd897000
    [ 7.889385] r4:00000000
    [ 7.891960] [<c00ea1a0>] (SyS_mount) from [<c07e7004>] (mount_block_root+0x11c/0x240)
    [ 7.899826] r7:c081a6e8 r6:ddba5000 r5:00008000 r4:ddba5000
    [ 7.905551] [<c07e6ee8>] (mount_block_root) from [<c07e73dc>] (prepare_namespace+0xb0/0x1e0)
    [ 7.914035] r10:c081a6c8 r9:c081a6c0 r8:c07e64cc r7:c08737c0 r6:c081a6e8 r5:c081a6f8
    [ 7.921937] r4:c081a6e8
    [ 7.924493] [<c07e732c>] (prepare_namespace) from [<c07e6cd8>] (kernel_init_freeable+0x1bc/0x1cc)
    [ 7.933421] r6:c08737c0 r5:00000007 r4:c082764c
    [ 7.938085] [<c07e6b1c>] (kernel_init_freeable) from [<c05bff9c>] (kernel_init+0x10/0xf8)
    [ 7.946311] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c05bff8c
    [ 7.954214] r4:00000000
    [ 7.956768] [<c05bff8c>] (kernel_init) from [<c000e758>] (ret_from_fork+0x14/0x3c)
    [ 7.964380] r4:00000000 r3:dd87e000
    [ 7.967984] CPU: 0 PID: 1 Comm: swapper Not tainted 3.14.35 #2
    [ 7.973849] Backtrace:
    [ 7.976319] [<c00118b0>] (dump_backtrace) from [<c0011ac8>] (show_stack+0x18/0x1c)
    [ 7.983930] r6:0001e800 r5:ffffffe2 r4:ddad1000 r3:00000000
    [ 7.989642] [<c0011ab0>] (show_stack) from [<c05c49fc>] (dump_stack+0x24/0x28)
    [ 7.996915] [<c05c49d8>] (dump_stack) from [<c01fda80>] (ubifs_leb_change+0x11c/0x138)
    [ 8.004881] [<c01fd964>] (ubifs_leb_change) from [<c01fc1c0>] (fixup_leb+0x8c/0x144)
    [ 8.012668] r7:ddad182c r6:000000c4 r5:ddad1000 r4:0001e800
    [ 8.018380] [<c01fc134>] (fixup_leb) from [<c01fd4d8>] (ubifs_fixup_free_space+0x26c/0x36c)
    [ 8.026778] r6:00000000 r5:ddad1000 r4:000000c5
    [ 8.031448] [<c01fd26c>] (ubifs_fixup_free_space) from [<c01fb970>] (ubifs_mount+0xe74/0x1594)
    [ 8.040097] r7:ddbb0a00 r6:ddad1000 r5:00000000 r4:00000000
    [ 8.045819] [<c01faafc>] (ubifs_mount) from [<c00cfee0>] (mount_fs+0x4c/0x18c)
    [ 8.053079] r10:00000000 r9:00000000 r8:00000000 r7:c0843f5c r6:ddbc7900 r5:00000000
    [ 8.060975] r4:00008000
    [ 8.063537] [<c00cfe94>] (mount_fs) from [<c00e6d90>] (vfs_kern_mount+0x50/0xe0)
    [ 8.070962] r10:00000000 r9:ddbc78c0 r8:00000000 r7:c0843f5c r6:00008000 r5:ddbc7900
    [ 8.078868] r4:dd81f140
    [ 8.081430] [<c00e6d40>] (vfs_kern_mount) from [<c00e96e0>] (do_mount+0x20c/0xa0c)
    [ 8.089033] r8:00008000 r7:ddbc7900 r6:00000000 r5:c083c9f4 r4:c0843f5c r3:00000000
    [ 8.096859] [<c00e94d4>] (do_mount) from [<c00ea22c>] (SyS_mount+0x8c/0xc0)
    [ 8.103859] r10:c081a6c8 r9:dfea54a0 r8:c081a6f8 r7:00008000 r6:c081a6f8 r5:dd897000
    [ 8.111765] r4:00000000
    [ 8.114320] [<c00ea1a0>] (SyS_mount) from [<c07e7004>] (mount_block_root+0x11c/0x240)
    [ 8.122193] r7:c081a6e8 r6:ddba5000 r5:00008000 r4:ddba5000
    [ 8.127906] [<c07e6ee8>] (mount_block_root) from [<c07e73dc>] (prepare_namespace+0xb0/0x1e0)
    [ 8.136389] r10:c081a6c8 r9:c081a6c0 r8:c07e64cc r7:c08737c0 r6:c081a6e8 r5:c081a6f8
    [ 8.144297] r4:c081a6e8
    [ 8.146851] [<c07e732c>] (prepare_namespace) from [<c07e6cd8>] (kernel_init_freeable+0x1bc/0x1cc)
    [ 8.155771] r6:c08737c0 r5:00000007 r4:c082764c
    [ 8.160431] [<c07e6b1c>] (kernel_init_freeable) from [<c05bff9c>] (kernel_init+0x10/0xf8)
    [ 8.168653] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c05bff8c
    [ 8.176560] r4:00000000
    [ 8.179113] [<c05bff8c>] (kernel_init) from [<c000e758>] (ret_from_fork+0x14/0x3c)
    [ 8.186726] r4:00000000 r3:dd87e000
    [ 8.190680] UBIFS: background thread "ubifs_bgt0_0" stops
    [ 8.196909] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -30
    [ 8.205010] Please append a correct "root=" boot option; here are the available partitions:
    [ 8.213455] 1f00 128 mtdblock0 (driver?)
    [ 8.218546] 1f01 128 mtdblock1 (driver?)
    [ 8.223642] 1f02 128 mtdblock2 (driver?)
    [ 8.228721] 1f03 128 mtdblock3 (driver?)
    [ 8.233819] 1f04 256 mtdblock4 (driver?)
    [ 8.238901] 1f05 1024 mtdblock5 (driver?)
    [ 8.243993] 1f06 128 mtdblock6 (driver?)
    [ 8.249070] 1f07 128 mtdblock7 (driver?)
    [ 8.254166] 1f08 8192 mtdblock8 (driver?)
    [ 8.259246] 1f09 251904 mtdblock9 (driver?)
    [ 8.264338] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [ 8.272639] drm_kms_helper: panic occurred, switching back to text console
    [ 50.628745] random: nonblocking pool is initialized


    Both, u-boot and kernel are using BCH8 ECC.

    u-boot/include/configs/am335x_evm.h

    #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW

    Kernel boot log :

    [ 1.821841] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
    [ 1.828232] nand: Micron MT29F2G08ABAEAWP
    [ 1.832284] nand: 256MiB, SLC, page size: 2048, OOB size: 64
    [ 1.837974] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme

    I use following command to create ubi image:

    mkfs.ubifs -r rootfs/ -F -o ubifs.img -m 2048 -e 126976 -c 1580 -v
    ubinize -o ubi.img -m 2048 -p 128KiB -s 512 -O 2048 -v ubinize.cfg

    This is my ubinize.cfg file
    [ubifs]
    mode=ubi
    image=ubifs.img
    vol_id=0
    vol_size=192MiB
    vol_type=dynamic
    vol_name=rootfs
    vol_flags=autoresize

    I follow these steps to flash NAND in u-boot

    U-Boot# nand erase.chip

    NAND erase.chip: device 0 whole chip
    Skipping bad block at 0x0dbc0000
    Erasing at 0xffe0000 -- 100% complete.
    OK
    U-Boot# mmc rescan
    U-Boot# fatload mmc 0 0x82000000 MLO
    reading MLO
    77188 bytes read in 10 ms (7.4 MiB/s)
    U-Boot# nand write 0x82000000 0x00000 0x20000

    NAND write: device 0 offset 0x0, size 0x20000
    131072 bytes written: OK
    U-Boot# nand write 0x82000000 0x20000 0x20000

    NAND write: device 0 offset 0x20000, size 0x20000
    131072 bytes written: OK
    U-Boot# nand write 0x82000000 0x40000 0x20000

    NAND write: device 0 offset 0x40000, size 0x20000
    131072 bytes written: OK
    U-Boot# nand write 0x82000000 0x60000 0x20000

    NAND write: device 0 offset 0x60000, size 0x20000
    131072 bytes written: OK
    U-Boot# fatload mmc 0 0x82000000 am335x-evm.dtb
    reading am335x-evm.dtb
    39256 bytes read in 8 ms (4.7 MiB/s)
    U-Boot# nand write 0x82000000 0x80000 0x40000

    NAND write: device 0 offset 0x80000, size 0x40000
    262144 bytes written: OK
    U-Boot# fatload mmc 0 0x82000000 u-boot.img
    reading u-boot.img
    447356 bytes read in 32 ms (13.3 MiB/s)
    U-Boot# nand write 0x82000000 0xc0000 0x100000

    NAND write: device 0 offset 0xc0000, size 0x100000
    1048576 bytes written: OK
    U-Boot# fatload mmc 0 0x82000000 zImage
    reading zImage
    4293552 bytes read in 266 ms (15.4 MiB/s)
    U-Boot# nand write 0x82000000 0x200000 0x800000

    NAND write: device 0 offset 0x200000, size 0x800000
    8388608 bytes written: OK
    U-Boot# fatload mmc 0 0x82000000 ubi.img
    reading ubi.img
    131072000 bytes read in 7910 ms (15.8 MiB/s)
    U-Boot# nand write 0x82000000 0xa00000 0x7D00800

    NAND write: device 0 offset 0xa00000, size 0x7d00800
    131074048 bytes written: OK
    U-Boot# setenv nandroot ubi0:rootfs rw ubi.mtd=9,2048
    U-Boot# setenv bootcmd run nandboot
    U-Boot# setenv optargs mem=512M
    U-Boot# run bootcmd

    Any help is appreciated.

    thanks
    Ankur
  • Hi Yordan,

    I have changed the back-light default value as 0 in am335x-evm.dts file and created am335x-evm.dtb with the below command:

    "make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x-evm.dtb"

    "make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- omap2plus_defconfig"

    "make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j5 zImage"

    and got the zImage and copied zImage & am335x-evm.dtb files in to sdcad boot directory and booted my system. After given the following command still it is showing the value as 8. but i have configured the value as 0.

    ubuntu@arm ~ $ cat /sys/class/backlight/backlight.9/brightness

    8

    What i have done the modifications under am335x-evm.dts is not replicating as same. This Linux 3.12/3.14 version is very confusion, Instead of this logic 3.2 Linux tree good for all.

    What configuration i need to set for my am335x-evm Board, Is it "tisdk_am335x-evm_defconfig" or "omap2plus_defconfig".

    Regards,

    Anil.

  • Hi Ankur,

    It seems your NAND is 2K page and OOB size is 64. Your ROM loader will identify the ECC.

    First you boot from SD-Card and then in the file system try to flash your ubi.img with the below command:

    root#: ubiformat /dev/mtd9 -f ubi.img -s 512 -O 2048

    After that you reboot it with NAND boot, It should work.

    Regards,
    Anil
  • Hi Anil,

    Thanks for your response.

    Wondering why flashing from u-boot doesn't work ? These steps are recommended on TI website.

    Anyways, I tried following your steps. Booted using SD card and the flashed ubi.img using "ubiformat".

    boot is successful but I am get following logs:

    Sending select for 10.20.34.32...
    Lease of 10.20.34.32 obtained, lease time 691200
    /etc/udhcpc.d/50default: Adding DNS 172.16.0.21
    /etc/udhcpc.d/50default: Adding DNS 172.16.1.20
    done.
    Starting system message bus: [   26.374107] UBI: fixable bit-flip detected at PEB 994
    [   26.379231] UBI: schedule PEB 994 for scrubbing
    [   26.464516] UBI warning: ubi_eba_copy_leb: read data back from PEB 1263 and it is different
    [   26.472980] UBI error: wear_leveling_worker: error -22 while moving PEB 994 to PEB 1263
    [   26.481029] UBI warning: ubi_ro_mode: switch to read-only mode
    [   26.486910] CPU: 0 PID: 871 Comm: ubi_bgt0d Tainted: G           O 3.14.35 #2
    [   26.494086] Backtrace:
    [   26.496595] [<c00118b0>] (dump_backtrace) from [<c0011ac8>] (show_stack+0x18/0x1c)
    [   26.504209]  r6:ddb15cb0 r5:ddd97a00 r4:ddbd2d70 r3:00000000
    [   26.509936] [<c0011ab0>] (show_stack) from [<c05c49fc>] (dump_stack+0x24/0x28)
    [   26.517220] [<c05c49d8>] (dump_stack) from [<c03ec350>] (wear_leveling_worker+0x5d8/0x638)
    [   26.525538] [<c03ebd78>] (wear_leveling_worker) from [<c03eb17c>] (do_work+0x84/0xf8)
    [   26.533432]  r10:00000000 r9:00000000 r8:ddb15cf0 r7:ddbee038 r6:ddb15cbc r5:ddb15000
    [   26.541327]  r4:dcc91e40
    [   26.543895] [<c03eb0f8>] (do_work) from [<c03ecba0>] (ubi_thread+0xd8/0x188)
    [   26.550975]  r6:c0888128 r5:ddbee000 r4:ddb15000 r3:00000000
    [   26.556705] [<c03ecac8>] (ubi_thread) from [<c004fcc0>] (kthread+0xd4/0xec)
    [   26.563708]  r10:00000000 r9:00000000 r8:00000000 r7:c03ecac8 r6:ddb15000 r5:00000000
    [   26.571610]  r4:ddbbec00 r3:00000000
    [   26.575219] [<c004fbec>] (kthread) from [<c000e758>] (ret_from_fork+0x14/0x3c)
    [   26.582482]  r7:00000000 r6:00000000 r5:c004fbec r4:ddbbec00
    [   26.588190] UBI error: do_work: work failed with error code -22
    [   26.594156] UBI error: ubi_thread: ubi_bgt0d: work failed with error code -22
    [   26.601384] (stk) :ldisc installation timeout
    [   26.605606] (stk) :ldisc_install = 0dbus.
    Starting rpcbind daemon...rpcbind: cannot create socket for udp6
    rpcbind: cannot create socket for tcp6
    done.
    Starting advanced power management daemon: No APM support in kernel
    (failed.)
    Starting syslogd/klogd: done
    Starting Dropbear SSH server: dropbear.
    Starting PVR
    [   27.175590] UBI warning: ubi_io_read: error -74 (ECC error) while reading 2566 bytes from PEB 78:118824, read only 2566 bytes, retry
    [   27.188756] UBI warning: ubi_io_read: error -74 (ECC error) while reading 2566 bytes from PEB 78:118824, read only 2566 bytes, retry
    [   27.201676] UBI warning: ubi_io_read: error -74 (ECC error) while reading 2566 bytes from PEB 78:118824, read only 2566 bytes, retry
    [   27.214518] UBI: fixable bit-flip detected at PEB 78
    [   27.219509] UBI: schedule PEB 78 for scrubbing
    [   27.224603] UBI: fixable bit-flip detected at PEB 78
    [   27.229590] UBI: schedule PEB 78 for scrubbing
    Stopping Bootlog daemon: bootlogd.
    mount: mounting /dev/mmcblk0p1 on /media/card failed: No such file or directory
    mount: mounting /dev/mmcblk0p2 on /media/fs failed: No such file or directory

    Poky (Yocto Project Reference Distro) 1.6.2 am335x-evm /dev/ttyO0

    am335x-evm login: [   27.601588] (stk) : timed out waiting for ldisc to be un-installed
    [   27.714555] (stk) :ldisc_install = 1(stk) :ldisc installation timeout
    [   28.714587] (stk) :ldisc_install = 0(stk) : timed out waiting for ldisc to be un-installed
    [   29.718371] Bluetooth: st_register failed -22

    Poky (Yocto Project Reference Distro) 1.6.2 am335x-evm /dev/ttyO0

    am335x-evm login: [   32.432307] UBIFS error (pid 885): ubifs_leb_write: writing 2048 bytes to LEB 985:18432 failed, error -30
    [   32.442089] UBIFS warning (pid 885): ubifs_ro_mode: switched to read-only mode, error -30
    [   32.450335] CPU: 0 PID: 885 Comm: ubifs_bgt0_0 Tainted: G           O 3.14.35 #2
    [   32.457807] Backtrace:
    [   32.460366] [<c00118b0>] (dump_backtrace) from [<c0011ac8>] (show_stack+0x18/0x1c)
    [   32.468022]  r6:00004800 r5:ffffffe2 r4:00000004 r3:00000000
    [   32.473862] [<c0011ab0>] (show_stack) from [<c05c49fc>] (dump_stack+0x24/0x28)
    [   32.481166] [<c05c49d8>] (dump_stack) from [<c01fd698>] (ubifs_ro_mode.part.11+0x64/0x68)
    [   32.489443] [<c01fd634>] (ubifs_ro_mode.part.11) from [<c01fd95c>] (ubifs_leb_write+0x144/0x14c)
    [   32.498312]  r4:ddad1000 r3:00000000
    [   32.501977] [<c01fd818>] (ubifs_leb_write) from [<c01fe398>] (ubifs_wbuf_sync_nolock+0xf8/0x340)
    [   32.510821]  r7:00000380 r6:00000800 r5:ddad1000 r4:ddba7690
    [   32.516610] [<c01fe2a0>] (ubifs_wbuf_sync_nolock) from [<c01fe8d0>] (ubifs_bg_wbufs_sync+0x120/0x1b4)
    [   32.525919]  r7:ddba7690 r6:00000001 r5:00000090 r4:ddad1000
    [   32.531710] [<c01fe7b0>] (ubifs_bg_wbufs_sync) from [<c02089c4>] (ubifs_bg_thread+0xc8/0x16c)
    [   32.540292]  r9:00000000 r8:00000001 r7:00000000 r6:c0888128 r5:ddbf0000 r4:ddad1000
    [   32.548196] [<c02088fc>] (ubifs_bg_thread) from [<c004fcc0>] (kthread+0xd4/0xec)
    [   32.555668]  r10:00000000 r9:00000000 r8:00000000 r7:c02088fc r6:ddad1000 r5:00000000
    [   32.563627]  r4:ddbbca40
    [   32.566209] [<c004fbec>] (kthread) from [<c000e758>] (ret_from_fork+0x14/0x3c)
    [   32.573504]  r7:00000000 r6:00000000 r5:c004fbec r4:ddbbca40
    [   32.579254] CPU: 0 PID: 885 Comm: ubifs_bgt0_0 Tainted: G           O 3.14.35 #2
    [   32.586716] Backtrace:
    [   32.589226] [<c00118b0>] (dump_backtrace) from [<c0011ac8>] (show_stack+0x18/0x1c)
    [   32.596867]  r6:00004800 r5:ffffffe2 r4:ddad1000 r3:00000000
    [   32.602651] [<c0011ab0>] (show_stack) from [<c05c49fc>] (dump_stack+0x24/0x28)
    [   32.609947] [<c05c49d8>] (dump_stack) from [<c01fd948>] (ubifs_leb_write+0x130/0x14c)
    [   32.617867] [<c01fd818>] (ubifs_leb_write) from [<c01fe398>] (ubifs_wbuf_sync_nolock+0xf8/0x340)
    [   32.626735]  r7:00000380 r6:00000800 r5:ddad1000 r4:ddba7690
    [   32.632520] [<c01fe2a0>] (ubifs_wbuf_sync_nolock) from [<c01fe8d0>] (ubifs_bg_wbufs_sync+0x120/0x1b4)
    [   32.641823]  r7:ddba7690 r6:00000001 r5:00000090 r4:ddad1000
    [   32.647583] [<c01fe7b0>] (ubifs_bg_wbufs_sync) from [<c02089c4>] (ubifs_bg_thread+0xc8/0x16c)
    [   32.656190]  r9:00000000 r8:00000001 r7:00000000 r6:c0888128 r5:ddbf0000 r4:ddad1000
    [   32.664082] [<c02088fc>] (ubifs_bg_thread) from [<c004fcc0>] (kthread+0xd4/0xec)
    [   32.671552]  r10:00000000 r9:00000000 r8:00000000 r7:c02088fc r6:ddad1000 r5:00000000
    [   32.679488]  r4:ddbbca40
    [   32.682093] [<c004fbec>] (kthread) from [<c000e758>] (ret_from_fork+0x14/0x3c)
    [   32.689368]  r7:00000000 r6:00000000 r5:c004fbec r4:ddbbca40
    [   32.695141] UBIFS error (pid 885): ubifs_bg_wbufs_sync: cannot sync write-buffer, error -30
    [   36.788137] random: nonblocking pool is initialized

    Poky (Yocto Project Reference Distro) 1.6.2 am335x-evm /dev/ttyO0

    am335x-evm login: root
    Password:
    root@am335x-evm:~# [   49.131815] UBIFS error (pid 6): make_reservation: cannot reserve 160 bytes in jhead 1, error -30
    [   49.140792] UBIFS error (pid 6): ubifs_write_inode: can't write inode 4759, error -30
    [   49.149887] UBIFS error (pid 6): make_reservation: cannot reserve 160 bytes in jhead 1, error -30
    [   49.158911] UBIFS error (pid 6): ubifs_write_inode: can't write inode 492, error -30
    [   49.167130] UBIFS error (pid 6): make_reservation: cannot reserve 160 bytes in jhead 1, error -30
    [   49.176112] UBIFS error (pid 6): ubifs_write_inode: can't write inode 4760, error -30
    [   54.191848] UBIFS error (pid 6): make_reservation: cannot reserve 59 bytes in jhead 2, error -30
    [   54.200917] UBIFS error (pid 6): do_writepage: cannot write page 0 of inode 224, error -30
    [   54.210437] UBIFS error (pid 6): make_reservation: cannot reserve 160 bytes in jhead 1, error -30
    [   54.219457] UBIFS error (pid 6): ubifs_write_inode: can't write inode 224, error -30

    Regards

    Ankur