Commit 41bec228 authored by Eddy Beaupre's avatar Eddy Beaupre Committed by Alejandro Mery
Browse files

Fix issue when building on an arm CPU, configurable makedeb.

parent e1094bb4
...@@ -19,10 +19,12 @@ usb-boot ...@@ -19,10 +19,12 @@ usb-boot
*.swp *.swp
*~ *~
Makefile.in Makefile.in
/autom4te.cache autom4te.cache
/aclocal.m4 aclocal.m4
/compile compile
/configure configure
/depcomp depcomp
/install-sh install-sh
/missing missing
config.guess
config.sub
...@@ -17,7 +17,7 @@ nodist_nand_part_a20_SOURCES = nand-part-a20.c ...@@ -17,7 +17,7 @@ nodist_nand_part_a20_SOURCES = nand-part-a20.c
man_MANS = sunxi-tools.7 man_MANS = sunxi-tools.7
CROSS_COMPILE ?= arm-none-eabi- CROSS_COMPILE ?= @XCOMPILER@
clean-local: clean-local:
rm -f boot_head_sun4i.elf boot_head_sun5i.elf fel-sdboot.elf fel-pio.elf fel-pio.nm jtag-loop.elf boot_head_sun4i.bin boot_head_sun5i.bin fel-sdboot.bin fel-pio.bin jtag-loop.bin *~ *.deb rm -f boot_head_sun4i.elf boot_head_sun5i.elf fel-sdboot.elf fel-pio.elf fel-pio.nm jtag-loop.elf boot_head_sun4i.bin boot_head_sun5i.bin fel-sdboot.bin fel-pio.bin jtag-loop.bin *~ *.deb
......
This diff is collapsed.
This diff is collapsed.
...@@ -11,10 +11,19 @@ AM_INIT_AUTOMAKE([1.9]) ...@@ -11,10 +11,19 @@ AM_INIT_AUTOMAKE([1.9])
# Checks for programs. # Checks for programs.
AC_PROG_CC AC_PROG_CC
AC_PROG_LN_S AC_PROG_LN_S
AC_CANONICAL_BUILD
if test x"$cross_compiling" != x"yes" ; then if test x"$cross_compiling" != x"yes" ; then
AC_CHECK_PROG(ARMGCC_CHECK, arm-none-eabi-gcc, yes) AC_CHECK_PROG(ARM_NONE_EABI_CHECK, arm-none-eabi-gcc, yes)
if test x"$ARMGCC_CHECK" != x"yes" ; then if test x"$ARM_NONE_EABI_CHECK" != x"yes" ; then
AC_MSG_ERROR([Please install GNU Tools for ARM Embedded Processors before installing.]) AC_CHECK_PROG(ARM_LINUX_GNUEABIHF_CHECK, arm-linux-gnueabihf-gcc, yes)
if test x"$ARM_LINUX_GNUEABIHF_CHECK" != x"yes" ; then
AC_MSG_ERROR([Please install GNU Tools for ARM Embedded Processors.])
else
XCOMPILER="arm-linux-gnueabihf-"
fi
else
XCOMPILER="arm-none-eabi-"
fi fi
fi fi
...@@ -39,5 +48,7 @@ AC_FUNC_MMAP ...@@ -39,5 +48,7 @@ AC_FUNC_MMAP
AC_FUNC_REALLOC AC_FUNC_REALLOC
AC_CHECK_FUNCS([memset munmap strchr strerror strtol strtoul]) AC_CHECK_FUNCS([memset munmap strchr strerror strtol strtoul])
AC_SUBST([XCOMPILER])
AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([Makefile])
AC_OUTPUT AC_OUTPUT
#!/bin/bash #!/bin/bash
WRKDIR="`pwd`" WRKDIR="`pwd`"
ISOK=1
while [ "$ISOK" -eq "1" ]; do
while [ -z "${DEBFULLNAME}" ]; do
DEBFULLNAME=$(whiptail --title "Package configuration" --inputbox "\nYour Name" 9 40 3>&1 1>&2 2>&3)
done
while [ -z "${DEBEMAIL}" ] ; do
DEBEMAIL=$(whiptail --title "Package configuration" --inputbox "\nYour Email" 9 40 3>&1 1>&2 2>&3)
done
while [ -z "${RELEASETAG}" ] ; do
RELEASETAG=$(whiptail --title "Package configuration" --inputbox "\nRelease Tag (UNRELEASED/MAIN/CONTRIB/etc...)" 9 40 3>&1 1>&2 2>&3)
done
whiptail --title "Package configuration summary" --yesno " Maintainer Name : ${DEBFULLNAME}\nMaintainer Email : ${DEBEMAIL}\n Release Tag : ${RELEASETAG}\n\nIs this ok?" 11 60
ISOK="$?"
if [ "$ISOK" -gt "1" ] || [ "$ISOK" -lt "0" ]; then
exit
fi
if [ "$ISOK" -eq "1" ]; then
unset RELEASETAG
unset DEBFULLNAME
unset DEBEMAIL
fi
done
rm -rf dpkg rm -rf dpkg
mkdir -p dpkg mkdir -p dpkg
#make distclean
#./configure
make dist-gzip make dist-gzip
mv sunxi-tools-1.0.tar.gz dpkg/sunxi-tools_1.0.orig.tar.gz mv sunxi-tools-1.0.tar.gz dpkg/sunxi-tools_1.0.orig.tar.gz
cd dpkg cd dpkg
tar -xzvf sunxi-tools_1.0.orig.tar.gz tar -xzvf sunxi-tools_1.0.orig.tar.gz
cd sunxi-tools-1.0 cd sunxi-tools-1.0
mkdir debian mkdir debian
echo "sunxi-tools (1.0-1) UNRELEASED; urgency=low" > debian/changelog
echo "sunxi-tools (1.0-1) ${RELEASETAG}; urgency=low" > debian/changelog
git log -1 --pretty=format:'%n * %s%n%n -- %cn <%ce> %cD%n' >> debian/changelog git log -1 --pretty=format:'%n * %s%n%n -- %cn <%ce> %cD%n' >> debian/changelog
echo "9" > debian/compat echo "9" > debian/compat
cat > debian/control <<EOF cat > debian/control <<EOF
Source: sunxi-tools Source: sunxi-tools
Maintainer: ${DEBFULLNAME} <${DEBEMAIL}> Maintainer: ${DEBFULLNAME} <${DEBEMAIL}>
...@@ -60,11 +94,13 @@ EOF ...@@ -60,11 +94,13 @@ EOF
chmod 755 debian/rules chmod 755 debian/rules
mkdir -p debian/source mkdir -p debian/source
echo "3.0 (quilt)" > debian/source/format echo "3.0 (quilt)" > debian/source/format
debuild -us -uc debuild -us -uc
cd ${WRKDIR} cd ${WRKDIR}
mv dpkg/*.deb . mv dpkg/*.deb .
rm -rf dpkg rm -rf dpkg
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