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.

ubiformat not working on Am3353BZCZ80

Dear Sir/Madam,

I couldn't use the ubiformat tool on Linux_SDK_05.06.00.00 , the details as follows, can you advice on how to fix it?

root@am335x-evm:/test# ubiformat: mtd7 (nand), size 260571136 bytes (248.5 MiB), 1988 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes

 -sh: syntax error near unexpected token `('

root@am335x-evm:/test# libscan: scanning eraseblock 1987 -- 100 % complete

-sh: libscan:: command not found

root@am335x-evm:/test# ubiformat: 1988 eraseblocks are supposedly empty

 -sh: ubiformat:: command not found

 root@am335x-evm:/test# ubiformat: flashing eraseblock 46 -- 23 % complete  Segmentation fault

-sh: ubiformat:: command not found

Thanks,

Jason

  • Hi,

    I am trying to use the B version MCU AM3352BZCZ80 to replace AM3352ZCZ72 ,but when I use ubiformat tool to flash

    the ubifs.img , the tool will stuck when doing erasing pocedure , which is working for AM3352ZCZ72 with same other hardware and linux environment. Also it works when I flash kernel using nand_write tool for AM3352BZCZ80 . Is it due to timing issue ? Can you advice how to fix it ?

     

     

     

    Cheers,

    Jason

  • Hi,

    Are you executing this from a shell script file? Please post the shell script or the exact sequence of steps you are following.

    Best regards,
    Miroslav

  • Hi Miroslav,

    the steps I did is as follows from Linux:

    # flash_eraseall /dev/mtd7

    #ubiformat /dev/mtd7 -f ubi.img -s 2048 -O 2048

    then I got the issues as mentioned.

     

    Appreciate your reply!

  • Hi,

    Just a quick thought:

    Can you try to recompile the U-Boot/SPL with hard-coded MPUPLL frequency of 720MHz, since this should be the only difference with the new MCU.

    The piece of code you need to modify is located inside the <u-boot_folder>/board/ti/am335x/board.c file. The function is void am33xx_spl_board_init(void) and the code looks like this:

        int mpu_vdd, mpu_pll, sil_rev;

        /* Assume PG 1.0 */
        mpu_pll = MPUPLL_M_720;

        sil_rev = readl(&cdev->deviceid) >> 28;
        if (sil_rev == 1)
            /* PG 2.0, efuse may not be set. */
            mpu_pll = MPUPLL_M_800;
        else if (sil_rev >= 2) {
            /* Check what the efuse says our max speed is. */
            int efuse_arm_mpu_max_freq;
            efuse_arm_mpu_max_freq = readl(&cdev->efuse_sma);
            if ((efuse_arm_mpu_max_freq & DEVICE_ID_MASK) ==
                    AM335X_ZCZ_1000)
                mpu_pll = MPUPLL_M_1000;
            else if ((efuse_arm_mpu_max_freq & DEVICE_ID_MASK) ==
                    AM335X_ZCZ_800)
                mpu_pll = MPUPLL_M_800;
        }

        /*
         * HACK: PG 2.0 should have max of 800MHz but Beaglebone Black
         * can work at 1GHz.
         */
        if (board_is_bone_lt())
            mpu_pll = MPUPLL_M_1000;

    Just hard-code the mpu_pll variable to always be 720MHz and recompile U-Boot/SPL. Please share the results.

    Best regards,
    Miroslav

  • Another suggestion is to try and use GDB (via gdbserver) on the device to step through the execution process of ubiformat and trace the error. Please note that the ubiformat has to be compiled with debug symbols inside.

    A guide to cross compile ubiformat: http://wiki.beyondlogic.org/index.php/Cross_Compiling_MTD_Utils_for_ARM

    I believe the default Makefile cross compiles with the flag -g which means debug symbols are enabled.

    And here is a guide about how to use gdbserver to remotely debug the application: http://bhagwatdigit.hubpages.com/hub/Remote-debugging-for-ARM-target-board

    Best regards,
    Miroslav

  • Hi Miroslav,

    I have hard-code to 720MHz and form linux, it shows 720000000 as well.

    but it still has the problem, what is the difference? what about the ECC? how to check the ECC mothed used on linux?

     

    Appreciate you repluy ASAP! our production is waiting for the solution!!!

    Thanks,

    Jason