Commit 43ffdb3c authored by Alessandro Rubini's avatar Alessandro Rubini

build: added wrs_build_ptp_noposix

parent 2a54ac6e
#!/bin/bash
# check variables, like all scripts herein do
WRS_SCRIPT_NAME=$(basename $0)
if [ -z "$WRS_BASE_DIR" ]; then
echo "$0: Plesae set WRS_BASE_DIR" >& 2
exit 1
fi
. ${WRS_BASE_DIR}/scripts/wrs_functions
wrs_check_vars WRS_OUTPUT_DIR WRS_DOWNLOAD_DIR WRS_WR_REPOSITORY CROSS_COMPILE
wrs_echo "--- PTP daemon (noposix repository)"
mkdir -p $WRS_DOWNLOAD_DIR/ptp || wrs_die "mkdir downloads/ptp"
cd $WRS_DOWNLOAD_DIR/ptp
# checkout repository
if [ ! -d .git ]; then
wrs_echo "Checking out git repository"
git init
git remote add gnudd git://gnudd.com/ptp-noposix.git
git fetch gnudd
git checkout -b master gnudd/master
else
wrs_echo "Using local git repository"
fi
# to avoid building in the "download" place, copy it to the build place
cd "$WRS_OUTPUT_DIR/build"
dirname="ptp-noposix"
rm -rf "$dirname"
cp -a "$WRS_DOWNLOAD_DIR/ptp" "$dirname"
cd "$dirname"
# we need LINUX and CROSS_COMPILE. The latter is there for sure
if [ "x$LINUX" == "x" ]; then
export LINUX="$WRS_OUTPUT_DIR/build/linux-2.6.35"
fi
make ptpd || wrs_die "cannot build ptp-noposix"
install -d "$WRS_OUTPUT_DIR/images/wr/bin"
install -d "$WRS_OUTPUT_DIR/images/wr/lib"
install -d "$WRS_OUTPUT_DIR/images/wr/include"
install ptpd "$WRS_OUTPUT_DIR/images/wr/bin"
install libwripc.a libptpnetif.a "$WRS_OUTPUT_DIR/images/wr/lib"
install libwripc/wr_ipc.h "$WRS_OUTPUT_DIR/images/wr/include"
#make $WRS_MAKE_J uImage modules || wrs_die "kernel compilation"
#cp arch/$ARCH/boot/uImage $(find . -name '*.ko') $WRS_OUTPUT_DIR/images
......@@ -77,10 +77,9 @@ wrs_build_step 01-at91boot wrs_build_at91boot
wrs_build_step 02-u-boot wrs_build_u-boot
wrs_build_step 03-kernel wrs_build_kernel
wrs_build_step 04-modules wrs_build_modules
wrs_build_step 05-wrs-userspace wrs_build_userspace
#wrs_build_step 06-wrs-addon wrs_build_addon
#wrs_build_step 07-wrap-rootfs wrs_build_finalrootfs
#wrs_build_step 08-host-tftpd wrs_build_tftpd
wrs_build_step 05-ptp-noposix wrs_build_ptp_noposix
wrs_build_step 06-wrs-userspace wrs_build_userspace
#wrs_build_step wrap-rootfs wrs_build_finalrootfs
if $failed_step; then
wrs_die "One or more build steps failed"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment