error in configuring U-boot SDK 1.4 Ubuntu 12.04 ( T4240 )

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

error in configuring U-boot SDK 1.4 Ubuntu 12.04 ( T4240 )

4,539 Views
aravindganesan
Contributor I

Dear Yiping,

I have created a core image :  bitbake fsl-image-core

target : t4240qds

Ubuntu 12.04

SDK 1.5

I am getting the following error while running configuring uboot

araaravind:~/yocto/build_t4240qds_release$ bitbake -c cleanstate u-boot

Traceback (most recent call last):

  File "/usr/bin/bitbake", line 234, in <module>

    ret = main()

  File "/usr/bin/bitbake", line 197, in main

    server = ProcessServer(server_channel, event_queue, configuration)

  File "/usr/lib/pymodules/python2.7/bb/server/process.py", line 78, in __init__

    self.cooker = BBCooker(configuration, self.register_idle_function)

  File "/usr/lib/pymodules/python2.7/bb/cooker.py", line 76, in __init__

    self.parseConfigurationFiles(self.configuration.file)

  File "/usr/lib/pymodules/python2.7/bb/cooker.py", line 510, in parseConfigurationFiles

    data = _parse(os.path.join("conf", "bitbake.conf"), data)

TypeError: getVar() takes exactly 3 arguments (2 given)

ERROR: Error evaluating '${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:build-${BUILD_OS}:pn-${PN}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:${CLASSOVERRIDE}:forcevariable'

Traceback (most recent call last):

  File "/usr/lib/pymodules/python2.7/bb/data_smart.py", line 116, in expandWithRefs

    s = __expand_var_regexp__.sub(varparse.var_sub, s)

  File "/usr/lib/pymodules/python2.7/bb/data_smart.py", line 60, in var_sub

    var = self.d.getVar(key, 1)

  File "/usr/lib/pymodules/python2.7/bb/data_smart.py", line 260, in getVar

    return self.expand(value, var)

  File "/usr/lib/pymodules/python2.7/bb/data_smart.py", line 132, in expand

    return self.expandWithRefs(s, varname).value

  File "/usr/lib/pymodules/python2.7/bb/data_smart.py", line 117, in expandWithRefs

    s = __expand_python_regexp__.sub(varparse.python_sub, s)

TypeError: getVar() takes exactly 3 arguments (2 given)

ERROR: Error evaluating '${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[0] or 'defaultpkgname'}'

Traceback (most recent call last):

  File "/usr/lib/pymodules/python2.7/bb/data_smart.py", line 117, in expandWithRefs

    s = __expand_python_regexp__.sub(varparse.python_sub, s)

  File "/usr/lib/pymodules/python2.7/bb/data_smart.py", line 76, in python_sub

    value = utils.better_eval(codeobj, DataContext(self.d))

  File "/usr/lib/pymodules/python2.7/bb/utils.py", line 387, in better_eval

    return eval(source, _context, locals)

  File "PN", line 1, in <module>

TypeError: getVar() takes exactly 3 arguments (2 given)

araaravind:~/yocto/build_t4240qds_release$

Can you please find what the problem is?

Thanks

Aravind

0 Kudos
Reply
16 Replies

3,475 Views
aravindganesan
Contributor I

Update:

I ran the same command inside yocto ( previously i had run inside build_t4240_release)

ara@Aravind:~/yocto$ bitbake -c cleanstate u-boot

The BBPATH variable is not set

Basically i want to boot fsl-image-core to t4240 using sd card.

Should i run tfts server if i am using sd card?

So can i just copy the source,filesystem and deploy or i should configure u-boot for sd card deployment too?

Shoulld this u-boot configuration be done in my host or after connecting to board?

Please help.

Thanks

Aravind

0 Kudos
Reply

3,475 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Aravind,

Please Enter ~/yocto folder, and run "source ./fsl-setup-poky -m t4240qds", and you will go to build_t4240qds_release automatically, please execute the command "bitbake -c cleansstate u-boot".

In addition, you have installed the Cache binary ISO, right?

for SD deployment, we could talk about this topic later, let's focus on this build problem now.


Have a great day,
Yiping

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

0 Kudos
Reply

3,475 Views
aravindganesan
Contributor I

Dear Yiping Wang

Thanks for your reply.

Yes i did that. i have installed cache.

I have run the command successfully.

No errors.

How sould i modify u-boot now?

please help.

Thanks,

Aravind

0 Kudos
Reply

3,475 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Aravind,

Why do you want to modify u-boot? The u-boot provided in the current SDK already support boot from SD.

If you only want to build u-boot for SD, you need to modify meta-fsl-ppc/conf/machine/t4240qds.conf, to modify UBOOT_MACHINES, add the option "T4240QDS_SDCARD".

You could use the following procedure to get u-boot source and rebuild u-boot, if needed.

$bitbake u-boot -c patch -f

Get the source in build_t4240qds_release/tmp/work/t1040qds-fsl-linux/u-boot/2014.01+fslgit-r0/git/

Modify the source and rebuild u-boot with the following command

$bitbake u-boot -c compile -f

$bitbake u-boot


Have a great day,
Yiping

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

0 Kudos
Reply

3,475 Views
aravindganesan
Contributor I

Dear Yiping

Thanks for your help.

Even I don't have any need to modify u boot.

All I have to do is boot t4240 and enable the rapidio support.

So I don't need to modify uboot for this?

I can reconfigure the kernel and add rapidio support as advised by you in a

previous discussion. this is alright.

So after reconfiguring I just copy to sd card the kernel and file system

and just insert into board?

Do I need to run tftp for SD card boot?

Then how do I set the uboot parameters like ipaddr ?

Sorry for asking to many questions. I just studied the manual and am just

following it.

Please help

Thanks

Aravind

On Sep 1, 2014 11:59 AM, "Yiping Wang" <admin@community.freescale.com>

0 Kudos
Reply

3,476 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Aravind,

No need to modify u-boot, if you want to deploy SD boot environment, it's better to download E6500 prebuilt image ISO.

1. Connect the card reader with SD card to the Linux Host PC.

2. Create the partitions by "fdisk /dev/sdb", one MS-DOS partition(sdb1 and this partition usually for u-boot) and one ext2 partition(sdb2) in the SD card.

  #fdisk /dev/sdb

3. Use the mkfs.ext2 command to create the filesystems.

  # mkfs.ext2 /dev/sdb2

4. Copy the file system to SD card by extracing the QorIQ_SDK_V1.6_E6500_<date>_ROOTFS_Image.tar.gz ,Remove the tarball after extracting rootfs.

  # cp QorIQ_SDK_V1.6_E6500_<date>_ROOTFS_Image.tar.gz  .

  # tar -zxvf QorIQ_SDK_V1.6_E6500_<date>_ROOTFS_Image.tar.gz

  # rm QorIQ_SDK_V1.6_E6500_<date>_ROOTFS_Image.tar.gz

5. Plug in the SD card to the target board and power on.

6. Set the environment in uboot for SD boot.

  # setenv bootfile uImage

  # setenv fdtfile uImage.dtb

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

  # boot


Have a great day,
Yiping

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

0 Kudos
Reply

3,477 Views
aravindganesan
Contributor I

Dear Yiping Wang

Thank you so much for your help.

I have copied to the SD card successfully.

I will try to boot and come back to your.

Thank you

Aravind

0 Kudos
Reply

3,477 Views
aravindganesan
Contributor I

Dear Yiping

Thanks.

I have successfully booted t4240.

I have got login terminal.

But I will have to add a module to it.

I have included support for tsi721 pci to rapidio bridge and I have booted this image to t4240.

Now I am having driver code for tsi721. how do I enable it?

Thanks

Aravind

0 Kudos
Reply

3,477 Views
vigneshwarensan
Contributor III

You dont need to do much.

Make sure you're SD is ext2 and copy your root filesystem and uImage onto the SD (assuming the SD has only one partition of type ext2)

Insert into the board and set the uboot environment variable as given below

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

The variables:

$loadaddr - place where uImage is copied, this value has to be an address on the DRAM,  i used 0x10000000

$fdtaddr - address to which dtb is loaded, again a legal address, i used: 0x17200000

$bootfile - name of the kernel .bin file as given in the SD card

$fdtfile - name of the device tree .bin file in the SD card

You can set other variables in the uboot prompt. type print or printenv to list all environment variables. you'll find $ipaddr  $eth*addr $serverip (if ure using tftp or nfs)

Alternately you can also boot the machine with tftp (for kernel) and nfs(for root filesystem)

Cheers!!

Note: If youre using mutiple partitions in the SD card, make sure to point to the one which is ext2 and has your kernel and rootfs (root=/dev/mmcblk0p1)

0 Kudos
Reply

3,477 Views
aravindganesan
Contributor I

Dear Vigneshwaren Sankaran

Thanks for your response.

I will just try and come back to you.

Thanks

Aravind

On Sep 1, 2014 1:52 PM, "Vigneshwaren Sankaran" <

0 Kudos
Reply

3,477 Views
amittomar
NXP Employee
NXP Employee

Hello Arvind

Did you setup your shell environment by using the bitbake.rc ?


If not please do the same.


Also,try cleaning U-BOOT work area using this command


bitbake -c clean u-boot

Thanks,

Amit.

0 Kudos
Reply

3,477 Views
aravindganesan
Contributor I

Dear Amit,

Thanks for your reply.

I tried $bitbake -c clean u-boot

It is giving same error.

For setting shell environment i did following:

ara@Aravind:~$ cd yocto/

ara@Aravind:~/yocto$ source build_t4240qds_release/bitbake.rc

bash: build_t4240qds_release/bitbake.rc: No such file or directory

ara@Aravind:~/yocto$

Can u please help?

Thanks,

Aravind

0 Kudos
Reply

3,477 Views
amittomar
NXP Employee
NXP Employee

Hope you already tried "source SOURCE_THIS"?

Also,if possible remove your tmp directory and then fire your bitbake commands

Thanks

Amit.

0 Kudos
Reply

3,476 Views
aravindganesan
Contributor I

Dear Amit

Thanks

Yes I have.

I have created a fsl-image-core

Now I want setup the uboot

ara@Aravind:~/yocto/build_t4240qds_release$ ls

bitbake.lock  cache  conf  pseudodone  SOURCE_THIS  tmp

Please help

Thanks

Aravind

On Aug 29, 2014 10:35 PM, "Amit Tomar" <admin@community.freescale.com>

0 Kudos
Reply

3,476 Views
amittomar
NXP Employee
NXP Employee

Are you still facing the same issue?

Thanks

Amit.

0 Kudos
Reply

3,478 Views
aravindganesan
Contributor I

Yes I am

Thanks

Aravind

On Aug 29, 2014 10:43 PM, "Amit Tomar" <admin@community.freescale.com>

0 Kudos
Reply