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.

Compiler/AM3358: Zimage question

Part Number: AM3358


Tool/software: TI C/C++ Compiler

Hi TI ,

Why zImage is booting from rootfs for Toolchain -:  gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf  and the zImage  and zImage-4.1.13-g8dc6617 is created in TargetNFS folder [/boot/] which is rootfs.

I want to enable Ralink wlan usb dongle in kernel which i did but issue is zImage is not booting instead of zImage-4.1.13-g8dc6617 which is different and both are present in /opt/ti-processor-sdk-linux-am335x-evm-02.00.01.07/targetNFS/boot  [Rules.make has set  DESTDIR=/opt/ti-processor-sdk-linux-am335x-evm-02.00.01.07/targetNFS] for Rootfs.

Ideally for booting using sd card :

Boot Partion has MLO, u-boot.img , uImage 

Rootfs Partion has rootfs [/dev/ /etc /boot ,  etc] I want to know what is the use of boot folder of rootfs which has zImage ,  zImage-4.1.13-g8dc6617,and .dtb for beagle bones and bone black. what my assumption is  zImage-4.1.13-g8dc6617 is having .dtb information but how its getting these information? I am unable to find.

Please enlighten me !

Regards

Rohit



]

  • This has been forwarded to the software team. They will respond here.
  • Hello,

    Probably the bootloader is configured that zImage, you should be able to change the bootargs and get you zImage booting.
    If you can do a printenv on the uboot console that will tell you what is being picked and from where, It should be easy to tweak the bootcmd.
    If not just post the output of printenv command and we will be able to help you.

    Cheers,
    --Prabhakar Lad
  • Hi Prabhakar,

    Thanks for the reply,

    I run the printenv :

    board_rev=00C0
    board_serial=0816BBBK0FC2
    boot_fdt=try
    bootargs=console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048 rootfstype=ubifs rootwait=1
    bootcmd=run findfdt; run envboot; run mmcboot;setenv mmcdev 1; setenv bootpart 1:2; run mmcboot;run nandboot;
    bootcount=1
    bootdelay=1
    bootdir=/boot
    bootenvfile=uEnv.txt
    bootfile=zImage
    bootm_size=0x10000000
    bootpart=1:2
    bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
    console=ttyO0,115200n8
    cpu=armv7
    dfu_alt_info_emmc=rawemmc raw 0 3751936
    dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x300 0x400;1
    dfu_alt_info_nand=SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.backup3 part 0 4;u-boot part 0 5;u-bo9
    dfu_alt_info_ram=kernel ram 0x80200000 0xD80000;fdt ram 0x80F80000 0x80000;ramdisk ram 0x81000000 0x4000000
    envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootscript; then r;
    eth1addr=68:9e:19:8f:5e:c9
    ethact=cpsw
    ethaddr=68:9e:19:8f:5e:c7
    fdt_addr_r=0x88000000
    fdtaddr=0x88000000
    fdtfile=am335x-boneblack.dtb
    findfdt=if test $board_name = A335BONE; then setenv fdtfile am335x-bone.dtb; fi; if test $board_name = A335BNLT; t
    finduuid=part uuid mmc 0:2 uuid
    importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}
    kernel_addr_r=0x82000000
    loadaddr=0x82000000
    loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
    loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr
    loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
    loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
    loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz


    here boot image is zImage from /boot directory of rootfs and uEnv.txt file is not there, how can i change the boot args then?

  • Hello,

    From the boot args its looking for boot.scr. can you print the this file or attach.
    What is the output wile booting linux. Do get any of this messages
    Running bootscript from/mporting environment from mm ?

    Cheers,
    Prabhakar Lad
  • Hi Prabhakar,
    Following is the message-
    bootscript = echo Running bootscript from mmc${mmcdev} ...;source ${loadaddr}

    Since now i am able to boot using mycompiled zImage which i put inside Rootfs boot directory with am335x_boneblack.dtb.
    But since uEnv.txt is not present in mine /boot dir of rootfs .

    I explore and have created a boot.cmd file and compiled using cmd mkimage utility comes with uboot src:
    mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'Execute uImage' -d boot.cmd boot.scr

    now i can copy this boot.scr in the /boot folder where my zImage is already present.Is tht correct?
    Default image og beaglebone reading uEnv.txt to get the boot args while booting the kernel.

    I took a boot.cmd file :
    if fatload mmc 0 80200000 uImage
    then
    \techo ***** Kernel: /dev/mmcblk0p1/uImage *****
    else
    echo ***** Kernel: /dev/mtd3 *****
    nand read 80200000 280000 400000
    fi

    echo ***** RootFS: /dev/mmcblk0p2 *****
    setenv bootargs 'console=ttyS2,115200n8 console=tty0 ethaddr=01:2b:03:01:23:45 g_ether.host_addr=00:dc:c8:f7:75:05 g_ether.dev_addr=00:dd:dc:eb:6d:f1 root=/dev/mmcblk0p2 rw rootwait'

    bootm 80200000
    refer :elinux.org/ECE497_Modifying_Kernel_Command_Line_Parameters
    I want to know what should be the cmd we need to give in boot.cmd file which will load uImage from boot partion instead of rootfs and without uEnv.txt how this wotks.

    Regards
    Rohit
  • Hello,

    Yes whatever you did was correct.

    I assume you have enabled fat in uboot. Can you post your boot.cmd file. that will make easier for guiding you.

    Ideally if the boot partition is partition 0, then you need to add "fatload mmc 0 0xxxxxxxxx uImage" and do a bootm 0xxxxxxxxx
    where 0xxxxxxxxx is the address in RAM.

    Cheers,
    --Prabhakar Lad