[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: Hopeful get Emdebian on i386 working! with a little help!! please



Thank you for this help I will get to work! I am a little confused though, I
completely understand that I am not cross compiling but I thought that a
part of Emdebian-tools was the stripping down function of standard debian
packages and making them smaller? Or have I got this wrong?

I also understand after running them that emsetup and emsandbox did nothing
for me because like you said I am not cross compiling, but from what I think
you are saying is that I use standard debian packages to build my chroot
using something like debootstrap Sid /tmp/blah but I know I can do this but
this would be debian would it not rather than Emdebian or do I have to use
Emdebian-tool somewhere or somehow??

Thank you for replying I will have to do more reading and researching but I
seems to be very few documents written on it and final I agree this will
take some time to do but I am in no rush

Tim 



-----Original Message-----
From: Neil Williams [mailto:codehelp@debian.org] 
Sent: 23 January 2008 18:27
To: Tim Massey
Cc: debian-embedded@lists.debian.org
Subject: Re: Hopeful get Emdebian on i386 working! with a little help!!
please

On Wed, 2008-01-23 at 16:11 +0000, Tim Massey wrote:
> Hello
> 
> I am looking to get emdebian working on i386, so I have started a trac 
> site for the use of anyone who want to its available at 
> http://temsc.co.uk/emdebian

Please re-read the manpages - you've misunderstood several parts of
emdebian-tools.

1. there is no point using emsandbox to create a build chroot - that is for
building root filesystems from the Emdebian repository (currently only ARM
packages exist). Use debootstrap as normal - omit the --foreign option.
(Don't use empdebuild either.)
http://www.linux.codehelp.co.uk/emdebian/man/re09.html
"emsandbox is a wrapper for debootstrap to prepare an Emdebian root
filesystem, using Emdebian packages and a native chroot via 'debootstrap
--foreign' and code from pbuilder. The native chroot is intended to support
testing of a rootfs and package installability."

You don't want an Emdebian root filesystem (you haven't got any packages to
put into it), you want a build chroot in order to create the packages in the
first place.

2. em_make is *not* equivalent to emsource. em_make is an automated attempt
to remove some of the elements that Emdebian does not need but most of the
changes cannot be automated. em_make is a helper, it just does the simplest
substitutions that almost every package needs - it cannot do anything
specific to particular packages. Most packages need specific patches and
these created by hand and obtained by emsource.
http://www.linux.codehelp.co.uk/emdebian/man/re04.html
"em_make only does so much - many packages will require manual editing of
debian/rules or other files to make a usable emdebian package."
Maybe, one day, em_make could be enough but only when all packages have had
cross-building support patches applied in Debian and when the Debian build
tools have been further tweaked to support DEB_BUILD_OPTIONS consistently.

3. You describe installing the version of emdebian-tools from testing onto
Etch. This is completely unsupported. emdebian-tools is best run within
unstable and it is advisable to create a debootstrap chroot for Debian
unstable for this purpose and build all of your packages in a genuine
'Debian unstable' environment (and use dependencies from unstable). You also
need to ensure you are using the latest version of emdebian-tools that is
available via the Emdebian unstable toolchain repository - even though you
aren't using a cross building toolchain.
(Installing emdebian-tools makes this repository available to you but only
unstable is supported.) Current release is 0.7.4.

     0.7.4 0
        500 http://www.emdebian.org unstable/main Packages
     0.7.0 0
        500 ftp://ftp.uk.debian.org unstable/main Packages

> I have come across my first major stopping point so I would love some 
> help I go all the source I needed to get me started...
> 
> apt apt-utils adduser attr base-files base-passwd bsdutils 
> bsdmainutils cdebconf cron coreutils cpio dhcp3-client dhcp3-common 
> dpkg dselect debianutils diff e2fslibs e2fsprogs findutils grep gzip 
> iptables hostname ifupdown initscripts iputils-ping ed aptitude 
> libdevmapper1.02 libbz2-1.0
> libattr1 libc6 libncurses5 libpam0g libpam-modules libpam-runtime 
> logrotate
> libselinux1 libncursesw5 libpopt0 libreadline5 lsb-base libsepol1 
> login
> libacl1 libwrap0 libcomerr2 libblkid1 libuuid1 libss2 liblzo1 
> libtasn1-3
> libsigc++-2.0-0c2a makedev mawk mount module-init-tools mktemp 
> libsigc++ncurses-base
> ncurses-bin net-tools netbase netcat readline-common passwd procps sed 
> sysv-rc sysvinit sysvinit-utils tar tzdata tcpd openbsd-inetd 
> traceroute nano util-linux update-inetd wget zlib1g

All those packages need customised patches to work for Emdebian and where
those patches already exist, they are in Emdebian SVN. Some of those patches
(the cache-file patches) are ARM-specific and these would need work to adapt
them for another architecture. *HOWEVER* you are not cross building so the
cache files are not relevant to your build.

Some of those packages cannot *be* cross built right now or have
dependencies that cannot be cross built. Emdebian does not need that list
because you'll need busybox instead of coreutils et al.

BUT - you are *not* cross building here so you need to make your own
selections. To build Emdebian packages, you need emdebian patch files which
are in Emdebian SVN and are made available by emsource. Note that these
patch files might not exist for all your packages and those that do exist
may be in need of an update if a new Debian release has been uploaded to
unstable recently. If emsource cannot apply the patches, it will warn you
and you will need to adapt the patches in your favourite editor and/or with
the help of 'meld'.

Take a look at the packages used by the Emdebian root filesystem (i.e.
the ones you need to build for i386 in order to create an i386 root
filesystem for installation onto your device) in
/usr/lib/emdebian-tools/emdebian.crossd

> and then started with apt did the em_make no errors then tried 
> emdebuild but got errors I thought this was likely so I thought I 
> would move on to the next package same thing happened for the first 4
packages!

That is probably because you have confused the purpose of em_make.
em_make is like dh_make - it prepares the package for later (manual) work.
Few packages will build immediately after running dh_make (CDBS usually does
quite a good job) and the same applies to em_make. Both are intended to be
run prior to manual editing of the specific package files. Even if a package
builds first time after dh_make, it clearly needs more work before it can be
made available to others.

emsource includes the results of other (manual) changes to complete the
emdebianisation [sic] of the package, building on what em_make has already
done and the manual changes that follow.

99% of all changes within packages need to be done manually - you edit the
files yourself, you bug test it yourself, you implement the changes
yourself. To do this, you need a thorough understanding of *all* methods of
building Debian packages including dpkg, debhelper, dbs and cdbs as well as
a familiarity with the autotools documentation, libtool docs, dpatch, quilt,
Debian Policy and scripts from the devscripts package. OR you use the
patches already in Emdebian SVN via emsource which are the result of my
manual changes in the relevant packages.

OK, the tickets:
http://temsc.co.uk/emdebian/ticket/1
You haven't installed the native build dependencies of this package. You are
not cross building so you need the native build dependencies, just as with a
normal build. Always ensure that the normal Debian package builds correctly
in your environment before blaming emdebian-tools.
Checking cross-build dependencies is not a trivial task and you don't need
them anyway, you need native. (emdebuild does not check native build
dependencies because cross build dependencies may differ and cannot depend
on the native versions so in some ways, it is useful *not* to have the
native versions installed, especially in a build chroot
environment.)
# apt-get build-dep $package

Same for 2.

3 is the result of not checking what em_make has done and doing the manual
edits in debian/rules, leaving an invalid rules file. Use 'meld'
to compare the original version against the modified one - often this
results from em_make being unable to determine the end of a split line,
leaving a stub behind. This is one benefit of using emdebuild - it ensures
that you have a copy of the debian/* files in ../$package.old/debian/ for
use with meld.

4 is build dependencies again.

You need to ensure that the packages build normally in your setup, then
proceed to make your changes.

emdebian-tools describes itself as the "emdebian crossbuilding tool set"
- you are not cross building so most of emdebian-tools is of no relevance to
your system. By all means use the patches provided by emsource but be
careful *not* to cross build the package itself.

You are a *long* way from getting Emdebian working on i386. I'd estimate
several months of work lie ahead.

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/



No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.19.9/1238 - Release Date: 22/01/2008
20:12
 
  

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.516 / Virus Database: 269.19.9/1238 - Release Date: 22/01/2008
20:12
 


Reply to: