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/AM3354: Kernel boot issue

Part Number: AM3354
Other Parts Discussed in Thread: AM3517

Tool/software: Linux

Hi,

I facing issue in booting custom board with 4.9 kernel. Custom board is similar to Beaglebone black. I have linux-3.14.26-g2489c0 kernel released by TI.  I compared the sdk kernel without any change and the working 3.14 kernel in custom board. I found few changes in the drivers and modified according to that. Then made it work with my custom board. I am following the same in 4.9 kernel.

While booting with kernel 4.9, the following issue is occurring.

Error: unrecognized/unsupported machine ID (r1 = 0x00001245)

Available machine support:

ID (hex)        NAME
ffffffff        Generic DT based system
ffffffff        Generic DRA72X (Flattened Device Tree)
ffffffff        Generic DRA74X (Flattened Device Tree)
ffffffff        Generic AM43 (Flattened Device Tree)
ffffffff        Generic OMAP5 (Flattened Device Tree)
ffffffff        Generic OMAP4 (Flattened Device Tree)
ffffffff        Generic AM33XX (Flattened Device Tree)
ffffffff        Generic ti816x (Flattened Device Tree)
ffffffff        Generic ti814x (Flattened Device Tree)
ffffffff        Generic AM3517 (Flattened Device Tree)
ffffffff        Generic OMAP3-GP (Flattened Device Tree)
ffffffff        Generic OMAP36xx (Flattened Device Tree)
ffffffff        Generic OMAP3 (Flattened Device Tree)
ffffffff        Nokia RX-51 board
ffffffff        Generic OMAP2430 (Flattened Device Tree)
ffffffff        Generic OMAP2420 (Flattened Device Tree)

Please check your kernel config and/or bootloader.

(r1 = 0x00001245) is hex form of the machine id 4677, provided in u-boot.

Did i have to provide the machine id in 4.9 kernel..? In 3.14 kernel, i am providing this value anywhere Still it is booting.

Can anyone help me..? I am stuck in this issue for a quite long time.

Here is the previous comments i posted:

Thanks in Advance..

  • In 3.14 kernel, i am *not providing this value anywhere Still it is booting.

    Sorry for the typo error
  • The software team have been notified. They will respond here.
  • Hi Madhu,

    Could you attach the kernel defconfig file which you are using for kernel 4.9 and boot log in a text file?
    Also post the steps used for building the kernel and device tree.

    BR
    Tsvetolin Shulev
  • arch=arm
    baudrate=115200
    board=custom_board_name
    board_name=custom_board_name
    boot_fdt=try
    bootcmd=run mmcboot;setenv mmcdev 1; setenv bootpart 1:2; run mmcboot;run nandboot;
    bootcount=1
    bootdelay=1
    bootdir=/boot
    bootenv=uEnv.txt
    bootfile=zImage
    bootpart=0:2
    console=none
    cpu=armv7
    dfu_alt_info_emmc=rawemmc mmc 0 3751936
    dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw mmc 100 100;u-boot.img.raw mmc 300 400;spl-os-args.raw mmc 80 80;spl-os-image.raw mmc 900 2000;spl-os-args fat 0 1;spl-os-image fat 0 1;u1
    dfu_alt_info_ram=kernel ram 0x80200000 0xD80000;fdt ram 0x80F80000 0x80000;ramdisk ram 0x81000000 0x4000000
    ethact=cpsw
    ethaddr=d0:ff:50:0b:c7:51
    fdt_high=0xffffffff
    fdtaddr=0x80F80000
    fdtfile=custom_board.dtb
    importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
    loadaddr=0x80200000
    loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}
    loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
    loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
    loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz
    loadsplash=mmc dev 0; if mmc rescan; then load mmc 0:${splashpart} ${splashimage} ${splashfile}; else mmc dev 1; if mmc rescan; then load mmc 1:${splashpart} ${splashimage} ${splashfile}; fi; fi;
    mmcargs=setenv bootargs console=${console} ${optargs} root=${mmcroot} rootfstype=${mmcrootfstype}
    mmcboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;if test -n $uenvcmd; then echo Ru;
    mmcdev=0
    mmcloados=run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot loa;
    mmcroot=/dev/mmcblk0p2 ro
    mmcrootfstype=ext4 rootwait
    netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
    netboot=echo Booting from network ...; setenv autoload no; dhcp; tftp ${loadaddr} ${bootfile}; tftp ${fdtaddr} ${fdtfile}; run netargs; bootz ${loadaddr} - ${fdtaddr}
    nfsopts=nolock
    optargs=vt.global_cursor_default=0
    ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype=${ramrootfstype}
    ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M
    ramrootfstype=ext2
    rdaddr=0x81000000
    rootpath=/export/rootfs
    soc=am33xx
    spiargs=setenv bootargs console=${console} ${optargs} root=${spiroot} rootfstype=${spirootfstype}
    spibusno=0
    spiimgsize=0x362000
    spiroot=/dev/mtdblock4 rw
    spirootfstype=jffs2
    spisrcaddr=0xe0000
    splashfile=/boot/splash.bmp.gz
    splashimage=0x82000000
    splashpart=2
    static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
    usbnet_devaddr=d0:ff:50:0b:c7:51
    vendor=vendor_name
    ver=U-Boot 2014.01-rc2 (Oct 23 2017 - 19:02:59)omap2plus_defconfig.doc

    Thanks for your quick response.

    Please find the attached defconfig file and uboot args

    I am using omap2plus_defconfig from arch/arm/config directory

  • Steps i followed to built kernel:

    make ARCH=arm CROSS_COMPILE=<sdk_path>/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- distclean
    make ARCH=arm CROSS_COMPILE=<sdk_path>/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- omap2plus_defconfig
    make ARCH=arm CROSS_COMPILE=<sdk_path>/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- zImage dtbs
    i included my custom.dts file under arch/arm/boot/dts.
  • I compared the 3.14 kernel and 4.9 kernel(both released by TI). under linux/arch/arm/mach-omap2/ directory, cpuidle33xx.c is present in 3.14 kernel and the same file is missing in 4.9 kernel.

    I took the 3.14 kernel from kernel.org website, compiled for my custom board. It is not booting. By comparing ti's 3.14 kernel and mainline(kernel.org) 3.14 kernel, found that cpuidle33xx.c is missing in mainline(kernel.org) 3.14 kernel.

    Will this make any difference..?
    Sorry if im wrong, im new to porting linux for custom board. Kindly suggest.
  • Please, see this post.

  • Yes, i tried unset fdt_high.. but still the issue is same

  • Then why am I seeing this fdt_high=0xffffffff? "unrecognized/unsupported machine ID" error comes from a piece of boot code that is never reached, if the device tree is found and used.
  • U-Boot# print
    arch=arm
    baudrate=115200
    board=custom_name
    board_name=custom_name
    boot_fdt=try
    bootcmd=run mmcboot;setenv mmcdev 1; setenv bootpart 1:2; run mmcboot;run nandboot;
    bootcount=1
    bootdelay=1
    bootdir=/boot
    bootenv=uEnv.txt
    bootfile=zImage
    bootpart=0:2
    console=none
    cpu=armv7
    dfu_alt_info_emmc=rawemmc mmc 0 3751936
    dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw mmc 100 100;u-boot.img.raw mmc 300 400;spl-os-args.raw mmc 80 80;spl-os-image.raw mmc 900 2000;spl-os-args fat 0 1;spl-os-image fat 0 1;u1
    dfu_alt_info_ram=kernel ram 0x80200000 0xD80000;fdt ram 0x80F80000 0x80000;ramdisk ram 0x81000000 0x4000000
    ethact=cpsw
    ethaddr=d0:ff:50:0b:c7:51
    fdtaddr=0x80F80000
    fdtfile=htouch.dtb
    importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
    loadaddr=0x80200000
    loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}
    loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
    loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
    loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz
    loadsplash=mmc dev 0; if mmc rescan; then load mmc 0:${splashpart} ${splashimage} ${splashfile}; else mmc dev 1; if mmc rescan; then load mmc 1:${splashpart} ${splashimage} ${splashfile}; fi; fi;
    mmcargs=setenv bootargs console=${console} ${optargs} root=${mmcroot} rootfstype=${mmcrootfstype}
    mmcboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;if test -n $uenvcmd; then echo Ru;
    mmcdev=0
    mmcloados=run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot loa;
    mmcroot=/dev/mmcblk0p2 ro
    mmcrootfstype=ext4 rootwait
    netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
    netboot=echo Booting from network ...; setenv autoload no; dhcp; tftp ${loadaddr} ${bootfile}; tftp ${fdtaddr} ${fdtfile}; run netargs; bootz ${loadaddr} - ${fdtaddr}
    nfsopts=nolock
    optargs=vt.global_cursor_default=0
    ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype=${ramrootfstype}
    ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M
    ramrootfstype=ext2
    rdaddr=0x81000000
    rootpath=/export/rootfs
    soc=am33xx
    spiargs=setenv bootargs console=${console} ${optargs} root=${spiroot} rootfstype=${spirootfstype}
    spibusno=0
    spiimgsize=0x362000
    spiroot=/dev/mtdblock4 rw
    spirootfstype=jffs2
    spisrcaddr=0xe0000
    splashfile=/boot/splash.bmp.gz
    splashimage=0x82000000
    splashpart=2
    static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
    usbnet_devaddr=d0:ff:50:0b:c7:51
    vendor=custom_board
    ver=U-Boot 2014.01-rc2 (Dec 11 2017 - 15:47:26)

    uboot log after unset fdt_high

    3919176 bytes read in 369 ms (10.1 MiB/s)
    40558 bytes read in 29 ms (1.3 MiB/s)
    Kernel image @ 0x80200000 [ 0x000000 - 0x3bcd48 ]
    ## Flattened Device Tree blob at 80f80000
    Booting using the fdt blob at 0x80f80000
    Loading Device Tree to 9f32c000, end 9f338e6d ... OK

    Starting kernel ...

    It's not showing anything after...starting kernel

    but 3.14 kernel with custom.dtb is booting. 3.14 is booting with am335x-evm.dtb and am335x-boneblack.dtb.
  • Why you set console=none then you are complaining about no showing any messages on the console? Are you kidding with us?

  • Please don't misunderstand, i tried with console= ttyS0,115200n8. but i does't boot. so i kept console= none. Now i tried with console = ttyO0. Its booting now

    Thank you..
  • Since 3.14 kernel is working with console=none.I kept console =none..
  • Right, this is possible if you had something like this expression in your 3.14 kernel's U-Boot. Then the console variable will get overwritten and the messages will show.
    init_console=if test $board_name = A335_ICE; then setenv console ttyO3,115200n8;else setenv console ttyO0,115200n8;fi;