On 6/30/2014 6:53 PM, Ross Berteig wrote:
After some effort, I believe I have a working BitBake recipe for
cross-compiling fossil in an embedded Linux distribution built by the
Yocto Project's BitBake tool.
....
I'll post my recipe for building fossil itself separately, after I've
verified that the fossil it builds actually does run in my target hardware.

I've attached the BitBake recipe that worked for me. Put the file in ~/yocto/poky/meta-myproject/recipes-myproject-extras/fossil and make sure that some other recipe as a last resort ~/yocto/build/local.conf mentions a need for "fossil". You might want to tweak the options passed to ./configure to suit.

I don't happen to care one way or the other about SSL, so I ignored it both in the ./configure and in the documented dependencies. As luck turned out, libssl was already built and present when this recipe was built and ./configure noticed it, so the fossil as built got the related features.

I've (lightly) tested the result in an image running in a very tiny Gumstix Duovero OMAP4-based system by cloning my project's repository, opening a working folder, and successfully building it in the target with GCC.

To learn more about Yocto, see https://yoctoproject.org/ for plenty of documentation.
--
Ross Berteig                               r...@cheshireeng.com
Cheshire Engineering Corp.           http://www.CheshireEng.com/

DESCRIPTION = "Fossil SCM: A low-ceremony distributed version control system."
SECTION = "dev-tools"

LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = 
"file://COPYRIGHT-BSD2.txt;md5=f7c1e448c7cdaa143badd75d8e4cd90d"

PR = "r0"
# Don't forget that PN, PV, and PR can be useful here
SRC_URI = "http://fossil-scm.org/index.html/zip?name=${PN}-${PV}.zip\
&uuid=3e5ebe2b9027cd\
;downloadfilename=${PN}-${PV}.zip"

SRC_URI[md5sum] = "11bc7285a0eca23587fdb16ea6cda03c"
SRC_URI[sha256sum] = 
"07ba770f24988bf6234b38eba8f5674c232ebe26ff03f506918a838c8a27de89"

# fossil needs zlib since nearly everything it stores is compressed internally.
DEPENDS_${PN} = "libz"

# List the files installed in our main package
FILES_${PN} += "\
  ${bindir}/fossil \
"

# Invoke fossil's configure command. There's probably an environment 
# variable intended to supply the target prefix for cross compilation
# but it doesn't appear to be documented. The easy way is to look
# in the run.do_configure script and pluck it out of the definitions
# of CC and friends.
do_configure () {
    ./configure --json --host=arm-poky-linux-gnueabi --prefix=/usr/bin
}

# Install our actual executable from the build directory ${S} to the 
# target file system tree in ${D}. By strong convention, ${D} will only
# hold files and folders actually generated by this recipe so that 
# means that even standard folders such as /usr/bin must be created
# before installing files in them.
do_install () {
     install -d ${D}${bindir}
     install -m 0555 ${S}/fossil ${D}${bindir}
}




_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to