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.

Linux/PROCESSOR-SDK-AM335X: NAND boot giving Bad Linux ARM zImage magic! error

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Linux

Hi,

I am working on the latest TI SDK  ti-processor-sdk-linux-am335x-evm-03.02.00.05.

My NAND boot is working fine when I am writing the images separately.

But when I am creating a full UBIFS image I  am getting

"Bad Linux ARM zImage magic!"  on

"bootz ${loadaddr} - ${fdtaddr}\0"

This is my NANDARGS:

#define NANDARGS \
        "mtdids=" MTDIDS_DEFAULT "\0" \
        "mtdparts=" MTDPARTS_DEFAULT "\0" \
        "nandargs=setenv bootargs console=${console} " \
                "${optargs} " \
                "root=${nandroot} " \
                "rootfstype=${nandrootfstype}\0" \
        "nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048\0" \
        "nandrootfstype=ubifs rootwait=1\0" \
        "nandboot=echo Booting from nand ...; " \
                "run nandargs; " \
                "nand read ${fdtaddr} NAND.u-boot-spl-os; " \
                "nand read ${loadaddr} NAND.kernel; " \
                "echo error comes now" \
                "bootz ${loadaddr} - ${fdtaddr}\0"

This is the output of my mtdparts

=> mtdparts

device nand0 <nand.0>, # parts = 10
 #: name                                                 size                      offset          mask_flags
 0: NAND.SPL                                      0x00020000      0x00000000      0
 1: NAND.SPL.backup1                     0x00020000      0x00020000      0
 2: NAND.SPL.backup2                       0x00020000      0x00040000      0
 3: NAND.SPL.backup3                      0x00020000      0x00060000      0
 4: NAND.u-boot-spl-os                     0x00040000      0x00080000      0
5: NAND.u-boot                                  0x00080000      0x000c0000      0
 6: NAND.u-boot-env                         0x00020000      0x00140000      0
 7: NAND.u-boot-env.backup1            0x005a0000   0x00160000      0
 8: NAND.kernel                                0x00400000      0x00700000      0
 9: NAND.rootfs                                  0x1f500000      0x00b00000      0


active partition: nand0,0 - (NAND.SPL) 0x00020000 @ 0x00000000

Can anyone let me know the issue

Thanks

Deep

  • Hi,

    How did you set:
    "bootpart=0:2\0" \
    "bootdir=/boot\0" \
    Did you follow this guide:
    processors.wiki.ti.com/.../UBIFS_Support
    for creating and wiring the ubifs into NAND?

    Best Regards,
    Yordan
  • Hi Yordan

    This is my configuration:

    #ifndef CONFIG_SPL_BUILD
    #define CONFIG_EXTRA_ENV_SETTINGS \
    DEFAULT_LINUX_BOOT_ENV \
    DEFAULT_MMC_TI_ARGS \
    DEFAULT_FIT_TI_ARGS \
    "bootpart=0:2\0" \
    "bootdir=/boot\0" \
    "bootfile=zImage\0" \
    "fdtfile=am335x-boneblack.dtb\0" \
    "console=ttyO3,115200n8\0" \
    "partitions=" \
    "uuid_disk=${uuid_gpt_disk};" \
    "name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}\0" \
    "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
    "findfdt="\
    "if test $board_name = A335BONE; then " \
    "setenv fdtfile am335x-bone.dtb; fi; " \
    "if test $board_name = A335BNLT; then " \
    "setenv fdtfile am335x-boneblack.dtb; fi; " \
    "if test $board_name = BBG1; then " \
    "setenv fdtfile am335x-bonegreen.dtb; fi; " \
    "if test $board_name = A33515BB; then " \
    "setenv fdtfile am335x-evm.dtb; fi; " \
    "if test $board_name = A335X_SK; then " \
    "setenv fdtfile am335x-evmsk.dtb; fi; " \
    "if test $board_name = A335_ICE; then " \
    "setenv fdtfile am335x-icev2.dtb; fi; " \
    "if test $fdtfile = undefined; then " \
    "echo WARNING: Could not determine device tree to use; fi; \0" \
    "init_console=" \
    "if test $board_name = A335_ICE; then "\
    "setenv console ttyO3,115200n8;" \
    "else " \
    "setenv console ttyO3,115200n8;" \
    "fi;\0" \
    NANDARGS \
    NETARGS \
    DFUARGS \
    BOOTENV


    I have followed the above NAND user guide for creating and wiring the ubifs into NAND.

    Thanks
    Deep
  • Can anyone suggest me the solution of the issue..

    Thanks
  • Hi,

    The issue was solved.
    There was calculation error for ubifs

    Thanks