From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] bsdiff with buildroot
Date: Thu, 14 Apr 2016 22:46:56 +0200 [thread overview]
Message-ID: <571001C0.2030305@mind.be> (raw)
In-Reply-To: <CADKZYY+U0DdQn061_F+s7An1fubGbpDijxMGHgunWvNoEROx4w@mail.gmail.com>
Hi Santhosh,
On 04/14/16 07:30, Santhosh Ramani wrote:
> Hello,
>
> I'm trying to install bsdiff package and using buildroot to create my rootfs for
> AM335x device. I've selected the option of custom toolchain and using the
> toolchain provided by TI as part of their SDK 7.0.
>
> I'm having some trouble with bzip2, it's a pre-requisite for bsdiff. When
> installing bzip2, cp seemed to fail. I had to replace the cp statement.
Since the problem is with bzip2, it would have been more appropriate to put
that in the subject.
>
>
> Original statement
> =================
> *cp -f bzip2
> /home/sramani/buildroot/buildroot/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/bin/bunzip2
> *
>
>
> Updated statement
> =================
> *cp --remove-destination -f ~/buildroot/buildroot/output/build/bzip2-1.0.6/bzip2
> /home/sramani/buildroot/buildroot/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/bin/bunzip2*
>
> I had to do the same thing for *bunzip2*, and *bzcat*.
I guess this was during the install-staging step? Because in install-target,
we already explicitly rm all binaries in bzip2.mk.
This is really a problem in the bzip2 upstream package itself. It's actually
weird that it installs the executable three times, instead of symlinking or
hardlinking...
The underlying issue, I guess, is that you are using a pre-installed custom
external toolchain, which has bzip2 installed in its sysroot as absolute
symlinks. When buildroot copies this to the staging directory, the symlink is
kept, but it points to a file which is not writable by you. So when bzip2 tries
to overwrite it, it goes through the symlink, and fails to overwrite the file in
your pre-installed toolchain directory.
There are a couple of solutions possible:
1. In bzip2.mk, remove any existing bzip2 etc. like we do for target install.
2. In bzip2.mk, use custom staging install commands like we do for host-bzip2 -
we anyway only need the libraries.
3. Add a patch to the package that fixes the Makefile to use
--remove-destination, or to use install. This could be combined with using a
hardlink instead. Probably the 20-legacy patch from debian already solves it,
because I expect that you only have a problem with bunzip2 and bzcat, not with
bzip2.
Regards,
Arnout
>
> Can someone please help me out? Thank you for your help.
> Regards
>
> Santhosh
>
> --
> Greater the Difficulty....Sweeter is the Victory
>
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
next prev parent reply other threads:[~2016-04-14 20:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-14 5:30 [Buildroot] bsdiff with buildroot Santhosh Ramani
2016-04-14 20:46 ` Arnout Vandecappelle [this message]
2016-04-18 17:05 ` Santhosh Ramani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=571001C0.2030305@mind.be \
--to=arnout@mind.be \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox