Ubuntu 11.10 Oneiric 64-bit Virtual Machine and building i.MX53 L2.6.35-11-09-01

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

Ubuntu 11.10 Oneiric 64-bit Virtual Machine and building i.MX53 L2.6.35-11-09-01

16,061 Views
CurtisWald
NXP Employee
NXP Employee

The attached application note details the steps for setting up a 64-bit Ubuntu 11.10 Oneiric virtual machine and then installing the source bundle for the i.MX53 L2.6.35-11-09-01 which was released for the the i.MX53 START_R, (Freescale PMIC) but also works on the START (Dialog PMIC).

NOTE: In the attached application note document below there is a tgz file containing patches. When copying to your Linux host make sure that CR/LF were not added by Windows when extracting and that the md5 checksums are correct for the patch files. To verify yourself, you can in the extraction directory run:

$ md5sum -c *.md5

lkc-1.4-lib.patch: OK

sparse-0.4-fixlabel.patch: OK

To regenerate md5sum if incorrect here is the command for lkc, do the same for sparse changing the name:

$ md5sum lkc-1.4-lib.patch > lkc-1.4-lib.patch.md5

Labels (3)
0 Kudos
Reply
43 Replies

5,490 Views
leonardfairclot
Contributor II

Thanks for all the responses, a lot have to do with a windows PC.  I have a PC running Ubuntu, I follow most of the steps but when I get to the tftp server is where I get lost.  What am I missing?  I don't have "/etc/inetd.conf" do I need to install something? 

0 Kudos
Reply

5,490 Views
CurtisWald
NXP Employee
NXP Employee

Ubuntu provides packages xinetd and atftpd, thus the command can be used to install:

$ sudo apt-get install xinetd atftpd

In the first post of this thread the document CreateUbuntu1110ltib110901.docx section 7.3.5 Configure tftp server is one method for setting up a tftp server.

0 Kudos
Reply

5,490 Views
KrishnaPavan
Contributor II

Why don't you install mtd-utils developer files from the Synaptics PM.

Remove the existing mtd-utils package before running LTIB again...

liu fuguo said:

hi

i am installing L2.6.35_10.12.01_ER_SOURCE for imx28   on ubuntu 12.04 (32bit), i have got the morepatches.tgz  patch, but still error

RPM build errors:
    Bad exit status from /home/liufg/imx28/ltib/tmp/rpm-tmp.68309 (%build)
Build time for mtd-utils: 11 seconds

Failed building mtd-utils
Died at ./ltib line 1380.
traceback:
 main::build_host_rpms:1380
  main::host_checks:1435
   main:542
can you help me?

0 Kudos
Reply

5,490 Views
EdSutter
Senior Contributor II

Liu,

I looked through my notes and realized that I had done a few other things prior to working through this app note.  I think I got this info from here: http://theembeddedsystems.blogspot.com/2011/11/install-ltib-in-ubun....

It  said to do this:

cd <ltib_installation_folder>/dist/lfs-5.1/mtd-utils
and execute :
cd <ltib_installation_folder>/dist/lfs-5.1/mtd-utils
mv mtd-utils.spec mtd-utils-201006.spec
ln -s mtd-utils-20060302.spec mtd-utils.spec

HTH

 
liu fuguo said:

hi

i am installing L2.6.35_10.12.01_ER_SOURCE for imx28   on ubuntu 12.04 (32bit), i have got the morepatches.tgz  patch, but still error

RPM build errors:
    Bad exit status from /home/liufg/imx28/ltib/tmp/rpm-tmp.68309 (%build)
Build time for mtd-utils: 11 seconds

Failed building mtd-utils
Died at ./ltib line 1380.
traceback:
 main::build_host_rpms:1380
  main::host_checks:1435
   main:542
can you help me?

0 Kudos
Reply

5,490 Views
CurtisWald
NXP Employee
NXP Employee

Hi,
To determine the exact error you will need to open the host_config.log and from the bottom of that file page up to see where the error.

I have not built on a 32-bit Ubuntu host, have not tried the morepatches.tgz, but have used a 64-bit 12.04 Ubuntu successfully for the i.mx28.

For the mtd-utils package I did find that removing the -Werror flag in mtd-utils/ubi-utils/old-utils/Makefile allowed for the mtd-utils package to build. Not sure this is what you are seeing as the error, but might be the issue - check your host_config.log file.

The solution I chose for addressing the -Werror was to create a patch and update the spec file to apply the patch for mtd-utils when it is processed. Here are the general steps:

Step 1:
The patch file was placed in /opt/freescale/pkgs/mtd-utils-werror.patch and the contents:
diff -Naur mtd-utils/ubi-utils/old-utils/Makefile mtd-utils.orig/ubi-utils/old-utils/Makefile
--- mtd-utils/ubi-utils/old-utils/Makefile 2010-01-15 17:12:24.000000000 +0000
+++ mtd-utils.orig/ubi-utils/old-utils/Makefile 2012-04-23 20:03:39.173105589 +0000
@@ -4,7 +4,7 @@

KERNELHDR := ../../include

-CFLAGS ?= -O2 -g -Werror
+CFLAGS ?= -O2 -g
CPPFLAGS := -I./inc -I./src -I$(KERNELHDR) \
-std=gnu99 -DPACKAGE_VERSION=\"1.0\" $(CPPFLAGS)

Step 2:
Edit dist/lfs5.1/mtd-utils/mtd-utils.spec adding this patch. In the mtd-utils.spec there is an example of a patch. Follow that adding mtd-utils-werror.patch.

Step 3:
You will need to delete the mtd-utils directory before running ltib otherwise ltib will not run. Look in host_config.log for the location. Then run ltib again.

Good luck,
-Curtis

0 Kudos
Reply

5,490 Views
liufuguo
Contributor I

hi

i am installing L2.6.35_10.12.01_ER_SOURCE for imx28   on ubuntu 12.04 (32bit), i have got the morepatches.tgz  patch, but still error

RPM build errors:
    Bad exit status from /home/liufg/imx28/ltib/tmp/rpm-tmp.68309 (%build)
Build time for mtd-utils: 11 seconds

Failed building mtd-utils
Died at ./ltib line 1380.
traceback:
 main::build_host_rpms:1380
  main::host_checks:1435
   main:542
can you help me?

0 Kudos
Reply

5,490 Views
EdSutter
Senior Contributor II

Just wanna confirm for anyone trying this that I was able to use the instructions from this discussion's attached document (Create-Ubuntu11-10-ltib11-09-01.docx) to successfully run ltib on a UBUNTU DESKTOP 12.04 LTS (32bit) development host.  For anyone that may find them useful, I'm attaching a morepatches.tgz file that contains all the patches discussed in that document.  If this tarball is untarred to be a peer directory to ltib, then the script 'fix' can be run to put things in their place...  Thanks to all for the discussion.

0 Kudos
Reply

5,488 Views
EdSutter
Senior Contributor II

Sorry if I missed this, but where do I get the .tgz file containing the patches?

0 Kudos
Reply

5,488 Views
EdSutter
Senior Contributor II

UPDATE: cancel my last comment... the peer just informed me that he had the same errors.

0 Kudos
Reply

5,490 Views
EdSutter
Senior Contributor II

I'm confused regarding the patches in this document... I've been working through this with UBUNTU 12.04 and found the need for these patches.  A peer here backed off to ubuntu 10.04 using this same version of LTIB and did not need the patches.  How can that be?  The patches are issues that sure seem to be independent of the version of UBUNTU (duplicate structure member definition in a header file, and out-of-order linker command line arguments), so why does building the same LTIB on 10.04 work without the patches?

Signed...

Confused.

0 Kudos
Reply

5,490 Views
CurtisWald
NXP Employee
NXP Employee

Hi Dean,

The reason for the soft link is to provide the correct path for applications that include header files from the sys folder such that at compile time they are found. If the x86_64-linux-gnu/sys provides header files as does i386-linux-gnu/sys then the 'File exists' error may not be fatal. Recommend runing the ltib build and see if all is well. If the ltib build fails then investigation would need to be done at that point to see if related to the header files in i386 vs. x86_64.

-Curtis


 
DeanHuang said:


Hi Curtis,

I have a problem about this:

When I do:

    $ sudo ln -s /usr/include/i386-linux-gnu/sys /usr/include/sys

show that:

   ln: creating symbolic link '/usr/include/sys': File exists

  $ ls -al /usr/include/sys

   lrwxrwxrwx 1 root root 33 2012-06-07 14:37 /usr/include/sys -> /usr/include/x86_64-linux-gnu/sys

How to solve it?


Curtis Wald said:

Hi Antony,

Just create a link:

$ sudo ln -s /usr/include/i386-linux-gnu/sys /usr/include/sys

 

You will then need to delete the elftosb directory and run ltib which should result in a complete build.

-Curtis

0 Kudos
Reply

5,490 Views
DeanHuang
Contributor III


Hi Curtis,

I have a problem about this:

When I do:

    $ sudo ln -s /usr/include/i386-linux-gnu/sys /usr/include/sys

show that:

   ln: creating symbolic link '/usr/include/sys': File exists

  $ ls -al /usr/include/sys

   lrwxrwxrwx 1 root root 33 2012-06-07 14:37 /usr/include/sys -> /usr/include/x86_64-linux-gnu/sys

How to solve it?


Curtis Wald said:

Hi Antony,

Just create a link:

$ sudo ln -s /usr/include/i386-linux-gnu/sys /usr/include/sys

 

You will then need to delete the elftosb directory and run ltib which should result in a complete build.

-Curtis


0 Kudos
Reply

5,491 Views
AdCmo
Contributor III

I got past the zlib issues by following:

http://vijay496.blogspot.com/2012/03/ltib-for-ubuntu-1110-error-faced.html?showComment=1337585257404...


Now: I am having wget package failing.
Any ideas, thanks?


I am running Ubuntu 11.10 32-bit.


Ad.
-----------------

gcc -O2 -Wall -Wno-implicit -o wget cmpt.o connect.o convert.o cookies.o ftp.o ftp-basic.o ftp-ls.o ftp-opie.o hash.o headers.o host.o html-parse.o html-url.o http.o init.o log.o main.o gen-md5.o netrc.o progress.o rbuf.o recur.o res.o retr.o safe-ctype.o snprintf.o gen_sslfunc.o url.o utils.o version.o -lssl -lcrypto -ldl
gen_sslfunc.o: In function `init_ssl':
gen_sslfunc.c:(.text+0x351): undefined reference to `SSLv2_client_method'
collect2: ld returned 1 exit status
make[1]: *** [wget] Error 1
make[1]: Leaving directory `/opt/freescale/ltib/usr/src/rpm/BUILD/wget-1.9.1/src'
make: *** [src] Error 2
error: Bad exit status from /home/me/imx53/11.09.01/ltib/tmp/rpm-tmp.33663 (%build)


RPM build errors:
Bad exit status from /home/me/imx53/11.09.01/ltib/tmp/rpm-tmp.33663 (%build)
Build time for wget: 21 seconds

Failed building wget
Died at ./ltib line 1380.
traceback:
main::build_host_rpms:1380
main::host_checks:1435
main:542


Started: Mon May 21 00:16:07 2012
Ended: Mon May 21 00:16:28 2012
Elapsed: 21 seconds

These packages failed to build:
wget 

Build Failed

0 Kudos
Reply

5,492 Views
AdCmo
Contributor III

All,

I am frustrated that this zlib issue is still not uniformly resolved.

I am trying to install this on a 32-bit Ubuntu 11.10 and I am still getting the

"zlib 0 not installed" error below:

I checked my Ltibutils.pm and is shows the correct "libz.so"  and "libz.h" paths

as pasted below. I was able to see the actual files at "/usr/lib/i386-linux-gnu/"

and "/usr/include/" respectively. 

Please let me know what else I need to check to make the zlib issue go away.

Ad.

------------------

zlib => sub { my @f = (glob('/usr/lib/libz.so*'),
                                  glob('/lib/libz.so*'),
                                  glob('/lib64/libz.so*'),
                                  glob('/usr/lib/i386-linux-gnu/libz.so*'),
                                  glob('/usr/lib32/libz.so*'),
                                  glob('/usr/lib/x86_64-linux-gnu/libz.so*') ); @f > 1 ? 1 : 0 },
                           

'zlib-devel' => sub { -f '/usr/include/zlib.h' },

----------------------------------------------------ERROR DUMP BELOW----------------------------------------------------

~/imx53/11.09.01/ltib$ ./ltib

ltib cannot be run because one or more of the host packages needed to run it
are either missing or out of date or not in ltib's standard path. Please
install/upgrade these packages on your host. If you have your own utilities
in non-standard paths, please add an entry into the .ltibrc file for example:

%path_std
/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/my/own/exes

Package Minimum ver Installed info
------- ----------- ---------------
zlib 0 not installed

Died at ./ltib line 1397.
traceback:
main::host_checks:1397
main:542


Started: Sun May 20 22:40:49 2012
Ended: Sun May 20 22:40:49 2012
Elapsed: 0 seconds


Build Failed

Exiting on error or interrupt

----------------------------------------------END ERROR DUMP----------------------------------------------------


Curtis Wald said:

Hi Antony,

Just create a link:

$ sudo ln -s /usr/include/i386-linux-gnu/sys /usr/include/sys

 

You will then need to delete the elftosb directory and run ltib which should result in a complete build.

-Curtis



Antony Burton said:

Hi,

 Thanks for this well written step through - I was just saying to myself -"All is going so well" when I started having problems:

1) Ltib complained it couldn't find zlib package. I couldn't find this packge (only zlib-devel) so I deleted the line zlib 0 in the string pre_install_deps (line 92) to avoid the verification. This seemed to work, then an error occured with elftosb package (host_config.log):

In file included from /opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-11.09.01/common/AESKey.h:10:0,
                 from /opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-11.09.01/common/AESKey.cpp:8:
/opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-11.09.01/common/stdafx.h:30:36: fatal error: /usr/include/sys/types.h: No such file or directory
compilation terminated.
make[1]: *** [AESKey.o] Error 1
make[1]: Leaving directory `/opt/freescale/ltib/usr/src/rpm/BUILD/elftosb-11.09.01/bld/linux'
make: *** [all] Error 2
error: Bad exit status from /home/antony/imx53/11.09.01/ltib/tmp/rpm-tmp.23263 (%build)


RPM build errors:
    Bad exit status from /home/antony/imx53/11.09.01/ltib/tmp/rpm-tmp.23263 (%build)
Build time for elftosb: 1 seconds

Failed building elftosb

Apparently the file types.h is located at /usr/include/i386-linux-gnu/sys/types.h


What is the best solution? How come I get this error and not you?


Thanks for your help,

Antony

0 Kudos
Reply

5,492 Views
Harris
Contributor III



Krishna Pavan said:

AFAIK, Place patch in the directory, where you want to apply it.

then patch -p1 <./<PATCH_NAME_HERE>, that should solve patching problem.

 

Hi,Pavan,

I do the command:patch -p 1 <./ltib-fix-rpm-flag.patch.

The system give me following messages:

can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- ltib.orig 2012-01-03 07:31:39.415496938 -0800
|+++ ltib      2012-01-03 07:55:28.103446501 -0800
--------------------------
File to patch:

Then I type the patch file:ltib-fix-rpm-flag.patch.

The syetem output this message as before:

patch: **** malformed patch at line 10: chomp($cf->{rpmbuild} = 'which rpmbuild 2>/dev/null' || "$hrpm\n");

Would you help me?

Thanks.

Harris

0 Kudos
Reply

5,492 Views
KrishnaPavan
Contributor II

AFAIK, Place patch in the directory, where you want to apply it.

then patch -p1 <./<PATCH_NAME_HERE>, that should solve patching problem.

0 Kudos
Reply

5,492 Views
Harris
Contributor III

Curtis, I create the ltib-fix-rpm-flag.patch by vim. I run the command patch -p 0 < ltib-fix-rpm-flag.patch. The system feedback this message to me: patch: **** malformed patch at line 10: chomp($cf->{rpmbuild} = 'which rpmbuild 2>/dev/null' || "$hrpm\n");

would you please tell me where I was wrong.

Best Regards

Harris

0 Kudos
Reply

5,493 Views
CurtisWald
NXP Employee
NXP Employee

Harris,

Suggestions:

1. When creating the file ltib-fix-rpm-flag.patch you should consider doing this on a Linux host using a native editor that does not insert carriage returns. Editors like gedit, vi, emacs are example Linux native editor applications.

2. On a Linux host enter the command: man patch 

This man page will provide the details of how the patch command works.

3. Instead of trying to create the patch file and run the patch command you could manually implement the patch. Arround line 2384 in the ltib file change the line

$hrpm                = system('rpm --force-debian 2>/dev/null') == 0 ?

 

to this adding a "-v" option to rpm.

 

 $hrpm                = system('rpm -v --force-debian 2>/dev/null') == 0 ?

 

Regards,

-Curtis

0 Kudos
Reply

5,493 Views
Harris
Contributor III



Curtis Wald said:

Harris,

Create a new file named ltib-fix-rpm-flag.patch and then copy the text in the box shown in 9.3.1 leaving out the first line that has 'cat' and paste that into the new file.

Regards,

-Curtis

 

Curtis,

I type this command:patch -p 0 < ltib-fix-rpm-flag.patch

The system give me following messages:

(Stripping trailing CRs from patch.)
patching file ltib
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 2384 with fuzz 1.

Are my files for errors?

Best Regards

Harris 

0 Kudos
Reply

5,493 Views
CurtisWald
NXP Employee
NXP Employee

Harris,

Create a new file named ltib-fix-rpm-flag.patch and then copy the text in the box shown in 9.3.1 leaving out the first line that has 'cat' and paste that into the new file.

Regards,

-Curtis

0 Kudos
Reply