Boot Linux SD card file system T1040RDB Platform

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Boot Linux SD card file system T1040RDB Platform

2,652 Views
gopikrishnan
Contributor III

I need to boot my linux image from SD Card. Basically, the kernel image and hardware device tree file are available /boot/uImage*

 

My steps to boot Linux under SD Card are as follows:

 

1) mmc init;

2) ext2load mmc 0 0x1000000 boot/uImage.bin;

3) ext2load mmc 0 0xc00000 boot/uImage.dtb;

4) setenv bootargs root=/dev/sda1 rootdelay=1 rw console=$consoledev,$baudrate $othbootargs;

5) bootm 0x1000000 - 0xc00000"

 

My mmcboot uboot var is as follows

=>print mmcboot

mmc init; ext2load mmc 0 0x1000000 boot/uImage-p2041rdb.bin; ext2load mmc 0 0xc00000 boot/uImage-p2041rdb.dtb; setenv bootargs root=/dev/sda1 rootdelay=1 rw console=$consoledev,$baudrate $othbootargs;bootm 0x1000000 - 0xc00000

 

But, I am getting kernel panic problem. Please help to spot where I am doing mistake. Attached console message for reference.

 

Thanks in Advance,

Original Attachment has been moved to: kconfig.20120924.zip

Original Attachment has been moved to: console_log_T1040_SDCARDFS.txt.zip

Original Attachment has been moved to: config-3.12.19-rt30-QorIQ-SDK-V1.6-gc29fe1a.zip

Original Attachment has been moved to: uImage.dtb.zip

0 Kudos
14 Replies

1,581 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Gopi Krishnan,


1. Please make sure to use fdisk to create a partition and use "mkfs.ext2" to format this partition, then copy filesystem with uImage and dts to SD card. It seems that you have done this.


2. About the bootargs, usually for SD card you need to use the device name as "/dev/mmcblk0p*", please refer to the following boot command.

  # setenv bootcmd 'setenv bootargs root=/dev/mmcblk0p1 rw rootdelay=5 console=$consoledev,$baudrate;mmcinfo;ext2load mmc 0:1 $loadaddr  /boot/$bootfile;ext2load mmc 0:1 $fdtaddr /boot/$fdtfile;bootm $loadaddr - $fdtaddr'


3. According to your Kernel log, MMC device is not detected, please use the pre-built kernel image with MMC driver enabled.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,581 Views
gopikrishnan
Contributor III

Thanks,

    But the pre-built kernel is not built with Netfilter enabled. We have already ported all our application software and kernel(with netfilter enabled) for P2041RDB using SDK 1.2. Now we need to use to T1040RDB in place of P2041, any quick way to make our existing software work on this new T1040RDB?

Otherwise, is it possible to build netfilter and iptables separately and integrate with pre-built kernel?

0 Kudos

1,581 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Gopi,

For T1040RDB, I suggest you use SDK 1.6, and modify Kernel configuration to enable netfilter based on the default Kernel configuration file. According to your description, it seems that you want to use SDK 1.2 kernel image on T1040RDB, I don't think this is a correct way, some drivers in SDK 1.2 cannot compatible with T1040RDB.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,581 Views
gopikrishnan
Contributor III

Thanks,

But, there is another problem, with the kernel compiled using SDK1.6. I could not able to utilize interface fm1-gb0(ETH3,ETH4,ETH5,ETH6) @ 0xfe4e0000 and fm1-gb1(ETH7,ETH8,ETH9,ETH10) @ 0xfe4e2000. I could able to assign an IP address, but it is not functional. No data transmission is happening via that interface, tested with the help of ping command (No firewall rules and default ACCEPT policy). But the same was working with preloaded kernel in flash.

According to the block diagram, it seems RGMII and SGMI interfaces are working. But QSGMII is not working, I hope there should be a way to enable the driver using kernel menuconfig or .config

I am attaching kernel config file and dtb file for your analysis with topic post. It would be grateful, if you help me build kernel compitable to enable all ethernet interfaces

0 Kudos

1,581 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Gopi,

Probably you missed something in Kernel configuration file, please modify Kernel configuration based on the default .config file.

Please try to use the following steps in Yocto build environment.

1. $ bitbake virtual/kernel -c cleansstate

2. $ bitbake virtual/kernel -c patch

Get kernel source in build_t1040qds_release/tmp/work/t1040qds-fsl-linux/u-boot/linux-qoriq-sdk/3.12-r0/git/.

3. $ bitbake virtual/kernel -c configure

Get the default .config file in Kernel source folder.

4. Go to Kernel source folder.

$make ARCH=powerpc menuconfig

Apply your own specified configuration in Kernel configure menu.

5. $ bitbake virtual/kernel

Rebuild Kernel image again.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,581 Views
gopikrishnan
Contributor III

Hi Yipping,

I tried the steps you given, but problem still persist. I am attaching my current .config (FILE: kconfig.20120924) file. The problem is with interface fm1-gb0 and fm1-gb1, I could assign an IP address, but can't use it. I don't know what's gone wrong, Let me know if any other information is required to solve this problem.

I have given sample output of ping command;

Output with preloaded kernel:

root@itma:~# ifconfig fm1-gb0 10.116.65.89 up

root@t1040rdb:~# ping 10.116.65.12

    PING 10.116.65.12 (10.116.65.12) 56(84) bytes of data.

    64 bytes from 10.116.65.12: icmp_seq=1 ttl=64 time=0.435 ms

    64 bytes from 10.116.65.12: icmp_seq=2 ttl=64 time=0.421 ms

    64 bytes from 10.116.65.12: icmp_seq=3 ttl=64 time=0.342 ms

    64 bytes from 10.116.65.12: icmp_seq=4 ttl=64 time=0.371 ms

    64 bytes from 10.116.65.12: icmp_seq=5 ttl=64 time=0.420 ms

    64 bytes from 10.116.65.12: icmp_seq=6 ttl=64 time=0.418 ms

    ^C

    --- 10.116.65.12 ping statistics ---

    6 packets transmitted, 6 received, 0% packet loss, time 4998ms

    rtt min/avg/max/mdev = 0.342/0.401/0.435/0.035 ms

Output with compiled kernel:

root@itma:~# ifconfig fm1-gb0 10.116.65.89 up

    root@itma:~# ping 10.116.65.12

    PING 10.116.65.12 (10.116.65.12): 56 data bytes

    64 bytes from 10.116.65.89: Destination Host Unreachable

    Vr HL TOS  Len   ID Flg  off TTL Pro  cksSrcDst Data

     4  5  00 0054 4556   2 0000  40  01 5e06 10.116.65.89  10.116.65.12

    64 bytes from 10.116.65.89: Destination Host Unreachable

    Vr HL TOS  Len   ID Flg  off TTL Pro  cksSrcDst Data

     4  5  00 0054 4557   2 0000  40  01 5e05 10.116.65.89  10.116.65.12

    64 bytes from 10.116.65.89: Destination Host Unreachable

    Vr HL TOS  Len   ID Flg  off TTL Pro  cksSrcDst Data

     4  5  00 0054 4558   2 0000  40  01 5e04 10.116.65.89  10.116.65.12

     --- 10.116.65.12 ping statistics ---

    5 packets transmitted, 0 packets received, 100% packet loss

    root@itma:~# iptables -L

    Chain INPUT (policy ACCEPT)

    targetprot opt source         destination 

    Chain FORWARD (policy ACCEPT)

    targetprot opt source         destination 

    Chain OUTPUT (policy ACCEPT)

    targetprot opt source         destination 

Thanks in Advance,

Gopi Krishnan S

0 Kudos

1,583 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Gopi,

Please provide your Kernel configuration file.

Did you use the default dts file?


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,583 Views
gopikrishnan
Contributor III

Hi Yipping,

I have already attached kernel .config file (kconfig.20120924.zip) with the thread topic. I never touched anything in dts file. I suspected there may be a problem with kernel configuration file, that's why I have attached it yesterday.

Good Day & Thanks in Advance,

Gopi

0 Kudos

1,583 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Gopi,


I just got the root cause, this problem is not related with Kernel configuration file. L2Switch driver uio_seville is a module built into filesystem, so if you rebuild Kernel, you also need to rebuild filesystem with "bitbake fsl-image-core". Otherwise you will get version incompatible problem as the followin.


uio_seville: disagrees about version of symbol alloc_etherdev_mqs

uio_seville: Unknown symbol alloc_etherdev_mqs (err -22)

uio_seville: disagrees about version of symbol of_phy_find_device

uio_seville: Unknown symbol of_phy_find_device (err -22)

uio_seville: disagrees about version of symbol _dev_info

uio_seville: Unknown symbol _dev_info (err -22)

uio_seville: disagrees about version of symbol device_create_file

uio_seville: Unknown symbol device_create_file (err -22)

uio_seville: disagrees about version of symbol phy_driver_register

uio_seville: Unknown symbol phy_driver_register (err -22)

uio_seville: disagrees about version of symbol mdiobus_read

uio_seville: Unknown symbol mdiobus_read (err -22)

uio_seville: disagrees about version of symbol free_netdev

uio_seville: Unknown symbol free_netdev (err -22)

uio_seville: disagrees about version of symbol dev_err

uio_seville: Unknown symbol dev_err (err -22)

uio_seville: disagrees about version of symbol phy_driver_unregister

uio_seville: Unknown symbol phy_driver_unregister (err -22)

uio_seville: disagrees about version of symbol mdiobus_write

uio_seville: Unknown symbol mdiobus_write (err -22)

uio_seville: disagrees about version of symbol device_remove_file

uio_seville: Unknown symbol device_remove_file (err -22)


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,583 Views
gopikrishnan
Contributor III

Hi Yipping,

        Firstly, I must thank for your deep investigation. using SDK 1.6 I have built bitbake fsl-image-core and extracted the tmp/deploy/fsl-image-core-t1040rdb.tar.gz file to SD card and booting from that as you suggested. But still, I could able to see that error message uio_seville as given in above post. I also found a related kernel module

./lib/modules/3.12.19-rt30-QorIQ-SDK-V1.6+gc29fe1a/extra/uio_seville.ko

When I tried to insert it manually, I got error message

root@t1040rdb:/lib/modules/3.12.19-rt30-QorIQ-SDK-V1.6+gc29fe1a/extra# insmod uio_seville.ko

uio_seville: disagrees about version of symbol alloc_etherdev_mqs

uio_seville: Unknown symbol alloc_etherdev_mqs (err -22)

uio_seville: disagrees about version of symbol of_phy_find_device

uio_seville: Unknown symbol of_phy_find_device (err -22)

uio_seville: disagrees about version of symbol _dev_info

uio_seville: Unknown symbol _dev_info (err -22)

uio_seville: disagrees about version of symbol device_create_file

uio_seville: Unknown symbol device_create_file (err -22)

uio_seville: disagrees about version of symbol phy_driver_register

uio_seville: Unknown symbol phy_driver_register (err -22)

uio_seville: disagrees about version of symbol mdiobus_read

uio_seville: Unknown symbol mdiobus_read (err -22)

uio_seville: disagrees about version of symbol free_netdev

uio_seville: Unknown symbol free_netdev (err -22)

uio_seville: disagrees about version of symbol dev_err

uio_seville: Unknown symbol dev_err (err -22)

uio_seville: disagrees about version of symbol phy_driver_unregister

uio_seville: Unknown symbol phy_driver_unregister (err -22)

uio_seville: disagrees about version of symbol mdiobus_write

uio_seville: Unknown symbol mdiobus_write (err -22)

uio_seville: disagrees about version of symbol device_remove_file

uio_seville: Unknown symbol device_remove_file (err -22)

insmod: ERROR: could not insert module uio_seville.ko: Invalid parameters

root@t1040rdb:/lib/modules/3.12.19-rt30-QorIQ-SDK-V1.6+gc29fe1a/extra#

Please let me know if any other information is required for investigation.

Good Day and Thanks,

Gopi Krishnan S

0 Kudos

1,583 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Gopi Krishnan,

Please make sure the Kernel and the filesystem coming from the same build, If you use the latest built filesystem, please also use the latest Kernel uImage in the folder tmp/deploy/. This would make sure the Kernel and user space driver module are generated together.


I have verified it on my target, if you do as the above, it worked.

When running "bitbake fsl-image-core", u-boot, Kernel uImage and filessytem are all generated in tmp/deploy/images/t1040rdb, please use uImage-t1040rdb.bin and fsl-image-core-t1040rdb.tar.gz in the image deploy folder, which are symbolic link to the latest build images.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,583 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Gopi,

With your Kernel configuration, L2Swith driver uio_seville cannot be setup successfully, so fm1-gb0 cannot work, which connects to L2Swith, I need to do more investigation.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,583 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Gopi,

It's fine to use your own Kernel, but please make sure the MMC/SD card driver is enabled in Kernel configuration file.

CONFIG_MMC=y

# CONFIG_MMC_DEBUG is not set

# CONFIG_MMC_UNSAFE_RESUME is not set

# CONFIG_MMC_CLKGATE is not set

#

# MMC/SD/SDIO Card Drivers

#

CONFIG_MMC_BLOCK=y

CONFIG_MMC_BLOCK_MINORS=8

CONFIG_MMC_BLOCK_BOUNCE=y

# CONFIG_SDIO_UART is not set

# CONFIG_MMC_TEST is not set


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,583 Views
gopikrishnan
Contributor III

It's already enabled, in-fact it's working fine with p2041RDB,

Piece of my existing kconfig file:

# CONFIG_UWB is not set

CONFIG_MMC=y

# CONFIG_MMC_DEBUG is not set

# CONFIG_MMC_UNSAFE_RESUME is not set

# CONFIG_MMC_CLKGATE is not set

#

# MMC/SD/SDIO Card Drivers

#

CONFIG_MMC_BLOCK=y

CONFIG_MMC_BLOCK_MINORS=8

CONFIG_MMC_BLOCK_BOUNCE=y

# CONFIG_SDIO_UART is not set

Thanks,

Gopi

0 Kudos