Compare commits
	
		
			145 Commits
		
	
	
		
			feature/cm
			...
			feature/po
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					3cbf0f9d71 | ||
| 
						 | 
					970365d5bf | ||
| 
						 | 
					e0090cdf1b | ||
| 
						 | 
					f62cbc4678 | ||
| 
						 | 
					62ffe94201 | ||
| 
						 | 
					7e5bf88d27 | ||
| 
						 | 
					8944370e0a | ||
| 
						 | 
					122ef70e09 | ||
| 
						 | 
					a7f5c5402d | ||
| 
						 | 
					7606ca039f | ||
| 
						 | 
					770fd8e51b | ||
| 
						 | 
					4fac253f8a | ||
| 
						 | 
					d231107bfe | ||
| 
						 | 
					f1f79f08a1 | ||
| 
						 | 
					c0a9000772 | ||
| 
						 | 
					ed1e4c0240 | ||
| 
						 | 
					e0a8b77db3 | ||
| 
						 | 
					71ba6575d4 | ||
| 
						 | 
					8ff2efbf62 | ||
| 
						 | 
					8fc8368239 | ||
| 
						 | 
					8e09fa8657 | ||
| 
						 | 
					af00086429 | ||
| 
						 | 
					e17ed0fe3d | ||
| 
						 | 
					eb350e5312 | ||
| 
						 | 
					e3c3ee86be | ||
| 
						 | 
					b6acfb001a | ||
| 
						 | 
					da1cce3421 | ||
| 
						 | 
					67341ca813 | ||
| 
						 | 
					3e714da20e | ||
| 
						 | 
					be83cc16ad | ||
| 
						 | 
					386c62ab33 | ||
| 
						 | 
					a4550c9675 | ||
| 
						 | 
					a6c550b828 | ||
| 
						 | 
					ab8bf70cd8 | ||
| 
						 | 
					089ad47882 | ||
| 
						 | 
					30935044d3 | ||
| 
						 | 
					05b1fb1d10 | ||
| 
						 | 
					8292bcd5d1 | ||
| 
						 | 
					e8b2904f51 | ||
| 
						 | 
					4ea2982346 | ||
| 
						 | 
					c362d134fb | ||
| 
						 | 
					fa4ba223cf | ||
| 
						 | 
					3314f83868 | ||
| 
						 | 
					b4591b8d2e | ||
| 
						 | 
					b220ad99c7 | ||
| 
						 | 
					f939911a81 | ||
| 
						 | 
					bd54a9ea61 | ||
| 
						 | 
					970c716e11 | ||
| 
						 | 
					d3230c7745 | ||
| 
						 | 
					8795a05ccb | ||
| 
						 | 
					741c21e41c | ||
| 
						 | 
					d281bf7059 | ||
| 
						 | 
					77f006c5af | ||
| 
						 | 
					8892d28fc7 | ||
| 
						 | 
					22bd8c75d8 | ||
| 
						 | 
					e3a19cb53b | ||
| 
						 | 
					d942ae8700 | ||
| 
						 | 
					4161caff37 | ||
| 
						 | 
					1356e43416 | ||
| 
						 | 
					176fc3e773 | ||
| 
						 | 
					ce0e86f9d8 | ||
| 
						 | 
					fb7fbab958 | ||
| 
						 | 
					21df489a67 | ||
| 
						 | 
					7a4a2fe092 | ||
| 
						 | 
					05ef973532 | ||
| 
						 | 
					1247abdc24 | ||
| 
						 | 
					39fd404ce2 | ||
| 
						 | 
					d25159dce5 | ||
| 
						 | 
					72b82bd1ca | ||
| 
						 | 
					8b1bcc81e6 | ||
| 
						 | 
					464b8ebcfd | ||
| 
						 | 
					bda380aa86 | ||
| 
						 | 
					ebde279240 | ||
| 
						 | 
					c828b16c72 | ||
| 
						 | 
					fe32c8ec5a | ||
| 
						 | 
					ef0956cdc1 | ||
| 
						 | 
					557ddca9de | ||
| 
						 | 
					ff4a504738 | ||
| 
						 | 
					7cee4b531b | ||
| 
						 | 
					36d62e2795 | ||
| 
						 | 
					bcdf9fd794 | ||
| 
						 | 
					947d4ec794 | ||
| 
						 | 
					9abd4092b6 | ||
| 
						 | 
					1f7ba00bf1 | ||
| 
						 | 
					4dbdc12686 | ||
| 
						 | 
					407eebad04 | ||
| 
						 | 
					fc77579bf4 | ||
| 
						 | 
					d9a1157878 | ||
| 
						 | 
					e5dbc2924c | ||
| 
						 | 
					7d77726e80 | ||
| 
						 | 
					cb4c8a5739 | ||
| 
						 | 
					910862e084 | ||
| 
						 | 
					560f4d8930 | ||
| 
						 | 
					bc788dc955 | ||
| 
						 | 
					206460e467 | ||
| 
						 | 
					4691e93747 | ||
| 
						 | 
					735b5f2e79 | ||
| 
						 | 
					b530b76581 | ||
| 
						 | 
					5cfdd6d3d9 | ||
| 
						 | 
					55641a6693 | ||
| 
						 | 
					dd0212bfa0 | ||
| 
						 | 
					333f3ebe55 | ||
| 
						 | 
					bed09c213e | ||
| 
						 | 
					714aa28c92 | ||
| 
						 | 
					e66fdc9adc | ||
| 
						 | 
					842160dd4a | ||
| 
						 | 
					c428102633 | ||
| 
						 | 
					f79aec516f | ||
| 
						 | 
					d273414068 | ||
| 
						 | 
					a95d7a868a | ||
| 
						 | 
					b0ceda4ea2 | ||
| 
						 | 
					2b5b6b3c2f | ||
| 
						 | 
					fc659cd451 | ||
| 
						 | 
					bb0a00c1ee | ||
| 
						 | 
					e5f7d6bfdd | ||
| 
						 | 
					eee43266c8 | ||
| 
						 | 
					05a6f19cf3 | ||
| 
						 | 
					9d95b45410 | ||
| 
						 | 
					b17eeece35 | ||
| 
						 | 
					29358c9c3e | ||
| 
						 | 
					f0b77fdfc5 | ||
| 
						 | 
					c6ef0368e7 | ||
| 
						 | 
					4e63f7ea02 | ||
| 
						 | 
					1b13099af1 | ||
| 
						 | 
					082c614dde | ||
| 
						 | 
					18c53ad585 | ||
| 
						 | 
					a7df46d61a | ||
| 
						 | 
					6a3376b24a | ||
| 
						 | 
					24f7c187a9 | ||
| 
						 | 
					f4933e8c15 | ||
| 
						 | 
					a45a415415 | ||
| 
						 | 
					b2230b577f | ||
| 
						 | 
					0c9e3b6622 | ||
| 
						 | 
					8e99dc6870 | ||
| 
						 | 
					28372cd2fd | ||
| 
						 | 
					cce9bdb98c | ||
| 
						 | 
					afccf97e04 | ||
| 
						 | 
					025dd6001b | ||
| 
						 | 
					b9e2e9c2b8 | ||
| 
						 | 
					873040a941 | ||
| 
						 | 
					928c424440 | ||
| 
						 | 
					960196ee6a | ||
| 
						 | 
					9d43ffd5e8 | ||
| 
						 | 
					4c978b0840 | ||
| 
						 | 
					b55c9a90d1 | 
@@ -2,5 +2,5 @@ cfg_target_canonical="armv11-$cfg_glued_vendor-linux-gnueabi"
 | 
			
		||||
cfg_target_linux='arm'
 | 
			
		||||
cfg_target_uboot_arch='arm'
 | 
			
		||||
cfg_target_gcc_flags='-O2 -pipe -funit-at-a-time -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=softfp -mfpu=vfpv3'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=armv7-a --with-cpu=arm1176jzf-s --with-tune=arm1176jzf-s --with-fpu=vfpv3 --with-float=softfp'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=armv7-a --with-mcpu=arm1176jzf-s --with-mtune=arm1176jzf-s --with-fpu=vfpv3 --with-float=softfp'
 | 
			
		||||
cfg_target_ar_flags='elf32-littlearm'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
cfg_target_canonical="armv5te-$cfg_glued_vendor-linux-gnueabi"
 | 
			
		||||
cfg_target_linux='arm'
 | 
			
		||||
cfg_target_gcc_flags='-O2 -pipe -funit-at-a-time -mtune=arm926ej-s -mfloat-abi=soft'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=armv5te --with-mtune=arm926ej-s --with-float=soft'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
cfg_target_canonical="atom-$cfg_glued_vendor-linux-gnu"
 | 
			
		||||
cfg_target_linux='x86'
 | 
			
		||||
cfg_target_linux_kernel='arch/x86/boot/bzImage'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=atom --with-cpu=atom --with-tune=atom'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=atom --with-mcpu=atom --with-mtune=atom'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
cfg_target_canonical="atom64-$cfg_glued_vendor-linux-gnu"
 | 
			
		||||
cfg_target_linux='x86'
 | 
			
		||||
cfg_target_gcc_flags='-O2 -pipe -march=atom -funit-at-a-time'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-cpu=x86-64 --with-tune=atom'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-mcpu=x86-64 --with-mtune=atom'
 | 
			
		||||
cfg_target_linux_kernel='arch/x86/boot/bzImage'
 | 
			
		||||
cfg_target_lib64='yes'
 | 
			
		||||
 
 | 
			
		||||
@@ -2,5 +2,5 @@ cfg_target_canonical="armv7-$cfg_glued_vendor-linux-gnueabihf"
 | 
			
		||||
cfg_target_linux='arm'
 | 
			
		||||
cfg_target_uboot_arch='arm'
 | 
			
		||||
cfg_target_gcc_flags='-O2 -pipe -funit-at-a-time -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=hard -mfpu=vfpv3'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=armv7-a --with-cpu=cortex-a8 --with-tune=cortex-a8 --with-fpu=vfpv3 --with-float=hard'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=armv7-a --with-mcpu=cortex-a8 --with-mtune=cortex-a8 --with-fpu=vfpv3 --with-float=hard'
 | 
			
		||||
cfg_target_ar_flags='elf32-littlearm'
 | 
			
		||||
 
 | 
			
		||||
@@ -2,5 +2,5 @@ cfg_target_canonical="armv7-$cfg_glued_vendor-linux-gnueabi"
 | 
			
		||||
cfg_target_linux='arm'
 | 
			
		||||
cfg_target_uboot_arch='arm'
 | 
			
		||||
cfg_target_gcc_flags='-O2 -pipe -funit-at-a-time -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp -mfpu=vfpv3'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=armv7-a --with-cpu=cortex-a8 --with-tune=cortex-a8 --with-fpu=vfpv3 --with-float=softfp'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=armv7-a --with-mcpu=cortex-a8 --with-mtune=cortex-a8 --with-fpu=vfpv3 --with-float=softfp'
 | 
			
		||||
cfg_target_ar_flags='elf32-littlearm'
 | 
			
		||||
 
 | 
			
		||||
@@ -2,5 +2,5 @@ cfg_target_canonical="armv7-$cfg_glued_vendor-linux-gnueabihf"
 | 
			
		||||
cfg_target_linux='arm'
 | 
			
		||||
cfg_target_uboot_arch='arm'
 | 
			
		||||
cfg_target_gcc_flags='-O2 -pipe -funit-at-a-time -mcpu=cortex-a9 -mtune=cortex-a9 -mfloat-abi=hard -mfpu=vfpv3'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=armv7-a --with-cpu=cortex-a9 --with-tune=cortex-a9 --with-fpu=vfpv3 --with-float=hard'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=armv7-a --with-mcpu=cortex-a9 --with-mtune=cortex-a9 --with-fpu=vfpv3 --with-float=hard'
 | 
			
		||||
cfg_target_ar_flags='elf32-littlearm'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,3 @@
 | 
			
		||||
cfg_target_canonical="geode-$cfg_glued_vendor-linux-gnu"
 | 
			
		||||
cfg_target_linux='x86'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=geode --with-cpu=geode --with-tune=geode'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=geode --with-mcpu=geode --with-mtune=geode'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
cfg_target_canonical="i586-$cfg_glued_vendor-linux-gnu"
 | 
			
		||||
cfg_target_linux='x86'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=i586 --with-cpu=i586 --with-tune=i586'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=i586 --with-mcpu=i586 --with-mtune=i586'
 | 
			
		||||
cfg_target_gcc_flags='-O2 -pipe -march=i586 -funit-at-a-time'
 | 
			
		||||
cfg_target_glibc_configure_flags='--with-cpu=i586'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
cfg_target_canonical="i686-$cfg_glued_vendor-linux-gnu"
 | 
			
		||||
cfg_target_linux='x86'
 | 
			
		||||
cfg_target_gcc_flags='-O2 -pipe -march=i686 -funit-at-a-time'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-cpu=i686'
 | 
			
		||||
cfg_target_glibc_configure_flags='--with-cpu=i686'
 | 
			
		||||
cfg_target_gcc_configure_flags='--mwith-cpu=i686'
 | 
			
		||||
cfg_target_glibc_configure_flags='--with-mcpu=i686'
 | 
			
		||||
cfg_target_linux_kernel='arch/x86/boot/bzImage'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
cfg_target_canonical="mipsisa32r2-$cfg_glued_vendor-linux-gnu"
 | 
			
		||||
cfg_target_linux='mips'
 | 
			
		||||
cfg_target_gcc_flags='-O2 -pipe -funit-at-a-time -mabi=32 -mips32r2 -mtune=mips32r2 -msoft-float'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-abi=32 --with-tune=mips32r2 --with-float=soft'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-abi=32 --with-mtune=mips32r2 --with-float=soft'
 | 
			
		||||
cfg_target_glibc_configure_flags='--without-fp'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
cfg_target_canonical="armv5-$cfg_glued_vendor-linux-gnueabi"
 | 
			
		||||
cfg_target_linux='arm'
 | 
			
		||||
cfg_target_gcc_flags='-O2 -pipe -funit-at-a-time -mcpu=iwmmxt -mtune=iwmmxt -mfloat-abi=soft'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=iwmmxt --with-cpu=iwmmxt --with-tune=iwmmxt --with-float=soft'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=iwmmxt --with-mcpu=iwmmxt --with-mtune=iwmmxt --with-float=soft'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
cfg_target_canonical="armv5-$cfg_glued_vendor-linux-gnueabi"
 | 
			
		||||
cfg_target_linux='arm'
 | 
			
		||||
cfg_target_gcc_flags='-O2 -pipe -funit-at-a-time -mtune=xscale -mfloat-abi=soft'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=armv5te --with-tune=xscale --with-float=soft'
 | 
			
		||||
cfg_target_gcc_configure_flags='--with-arch=armv5te --with-mtune=xscale --with-float=soft'
 | 
			
		||||
 
 | 
			
		||||
@@ -27,11 +27,22 @@ MAINTAINER Ricardo Martins <rasm@oceanscan-mst.com>
 | 
			
		||||
ENV DEBIAN_FRONTEND noninteractive
 | 
			
		||||
 | 
			
		||||
# Update distro.
 | 
			
		||||
RUN echo "deb http://ftp.us.debian.org/debian testing non-free contrib" >> /etc/apt/sources.list
 | 
			
		||||
RUN echo "deb http://mirrors.fe.up.pt/ubuntu xenial main restricted universe multiverse" >> /etc/apt/sources.list
 | 
			
		||||
RUN echo "deb http://mirrors.fe.up.pt/ubuntu xenial-updates main restricted universe multiverse" >> /etc/apt/sources.list
 | 
			
		||||
RUN echo "deb http://mirrors.fe.up.pt/ubuntu xenial-backports main restricted universe multiverse" >> /etc/apt/sources.list
 | 
			
		||||
RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32
 | 
			
		||||
RUN apt-get update -y
 | 
			
		||||
RUN apt-get dist-upgrade -y
 | 
			
		||||
RUN apt-get install -y g++-5
 | 
			
		||||
RUN apt-get install -y gcc-5
 | 
			
		||||
RUN apt-get install -y wget
 | 
			
		||||
RUN apt-get install -y bzip2
 | 
			
		||||
RUN apt-get install -y git
 | 
			
		||||
RUN apt-get install -y g++-multilib
 | 
			
		||||
RUN apt-get install -y cmake
 | 
			
		||||
RUN apt-get install -y file
 | 
			
		||||
RUN apt-get install -y vim
 | 
			
		||||
RUN apt-get install -y nasm
 | 
			
		||||
RUN apt-get install -y build-essential
 | 
			
		||||
RUN apt-get install -y make
 | 
			
		||||
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
 | 
			
		||||
 
 | 
			
		||||
@@ -29,3 +29,12 @@ all:
 | 
			
		||||
 | 
			
		||||
shell:
 | 
			
		||||
	docker run -w $(VOLUME) -i -a stdin -a stdout -v $(VOLUME):$(VOLUME) -t $(TAG):$(VERSION)
 | 
			
		||||
 | 
			
		||||
clean:
 | 
			
		||||
	@echo "* Stopping docker service..."
 | 
			
		||||
	@sudo systemctl stop docker
 | 
			
		||||
	@echo "* Cleaning docker service..."
 | 
			
		||||
	@sudo rm -rf /var/lib/docker
 | 
			
		||||
	@echo "* Starting docker service..."
 | 
			
		||||
	@sudo systemctl start docker
 | 
			
		||||
	@echo "* Done."
 | 
			
		||||
 
 | 
			
		||||
@@ -70,7 +70,7 @@ create_part_xboot()
 | 
			
		||||
    nfo2 "Populating filesystem"
 | 
			
		||||
    cmd_mount vfat "$part_dev" || die
 | 
			
		||||
 | 
			
		||||
    for f in MLO u-boot.img uEnv.txt; do
 | 
			
		||||
    for f in MLO u-boot.img uEnv.txt kernel; do
 | 
			
		||||
        if [ -f "$cfg_sys_family/rootfs/boot/$f" ]; then
 | 
			
		||||
            nfo2 installing $f to boot partition
 | 
			
		||||
            cp "$cfg_sys_family/rootfs/boot/$f" mount || die
 | 
			
		||||
 
 | 
			
		||||
@@ -71,7 +71,11 @@ download()
 | 
			
		||||
            fi
 | 
			
		||||
        fi
 | 
			
		||||
 | 
			
		||||
        # First try OceanScan-MST mirror.
 | 
			
		||||
	# First try LSTS mirror.
 | 
			
		||||
	lsts_url="http://lsts.pt/glued/$(basename $u)"
 | 
			
		||||
        download_tool "$lsts_url" "$cfg_dir_downloads/$file"
 | 
			
		||||
        if [ $? -ne 0 ]; then
 | 
			
		||||
	    # Then try OceanScan-MST mirror.
 | 
			
		||||
            omst_url="http://www.omst.pt/glued/$(basename $u)"
 | 
			
		||||
            download_tool "$omst_url" "$cfg_dir_downloads/$file"
 | 
			
		||||
            if [ $? -ne 0 ]; then
 | 
			
		||||
@@ -82,6 +86,7 @@ download()
 | 
			
		||||
                    exit 1
 | 
			
		||||
		fi
 | 
			
		||||
            fi
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
        md5="$(md5sum_tool "$cfg_dir_downloads/$file")"
 | 
			
		||||
        if [ "$s" != "$md5" ]; then
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    '2.25.1'
 | 
			
		||||
    '2.28'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
@@ -10,7 +10,7 @@ url=\
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
    'ac493a78de4fee895961d025b7905be4'
 | 
			
		||||
    '9e8340c96626b469a603c15c9d843727'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
maintainer=\
 | 
			
		||||
 
 | 
			
		||||
@@ -1,16 +1,16 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    '1.5'
 | 
			
		||||
    '1.6'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
(
 | 
			
		||||
    "http://downloads.sourceforge.net/project/bridge/bridge/bridge-utils-$version.tar.gz"
 | 
			
		||||
    "http://www.kernel.org/pub/linux/utils/net/bridge-utils/bridge-utils-$version.tar.gz"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
    'ec7b381160b340648dede58c31bb2238'
 | 
			
		||||
    'f369e90e85e4bb46baa26a7b9d66b578'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
maintainer=\
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    '1.0.6'
 | 
			
		||||
    '1.0.71'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
@@ -10,7 +10,7 @@ url=\
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
    '07783e66e27601ab0a8250c328b3d6bf'
 | 
			
		||||
    '075c9256fe20cf6ce867dc2b1c974ebe'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
if [ -d "$cfg_dir_builds/linux/linux-"* ]; then
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										58
									
								
								rules/exiv2/default.bash
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								rules/exiv2/default.bash
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,58 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
  "0.25"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
(
 | 
			
		||||
  "http://lsts.pt/glued/exiv2-${version}.tar.gz"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
  "258d4831b30f75a01e0234065c6c2806"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
maintainer=\
 | 
			
		||||
(
 | 
			
		||||
    'Pedro Gonçalves <pedro@lsts.pt>'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
requires=\
 | 
			
		||||
(
 | 
			
		||||
    "gettext/host"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
configure()
 | 
			
		||||
{
 | 
			
		||||
  ./configure \
 | 
			
		||||
    --datadir="$cfg_dir_toolchain_sysroot" \
 | 
			
		||||
    --prefix="$cfg_dir_rootfs/usr" \
 | 
			
		||||
    --includedir="$cfg_dir_toolchain_sysroot/usr/include" \
 | 
			
		||||
    --enable-cross-compile \
 | 
			
		||||
    --build=$cfg_target_linux \
 | 
			
		||||
    --host="$cfg_target_canonical" \
 | 
			
		||||
    --enable-shared \
 | 
			
		||||
    --disable-static \
 | 
			
		||||
    --disable-xmp
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
build()
 | 
			
		||||
{
 | 
			
		||||
  $cmd_make
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
host_install()
 | 
			
		||||
{
 | 
			
		||||
  $cmd_make install
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
target_install()
 | 
			
		||||
{
 | 
			
		||||
  # Libs:
 | 
			
		||||
  for f in "$cfg_dir_rootfs/lib/"libexiv2*; do
 | 
			
		||||
      cp -av "$f" "$cfg_dir_toolchain_sysroot/usr/lib"
 | 
			
		||||
  done
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -15,12 +15,14 @@ md5=\
 | 
			
		||||
 | 
			
		||||
configure()
 | 
			
		||||
{
 | 
			
		||||
    mkdir -p ../build
 | 
			
		||||
    ./configure \
 | 
			
		||||
        --sysroot="$cfg_dir_toolchain_sysroot" \
 | 
			
		||||
        --prefix="$cfg_dir_rootfs/usr" \
 | 
			
		||||
        --incdir="$cfg_dir_toolchain_sysroot/usr/include" \
 | 
			
		||||
        --enable-cross-compile \
 | 
			
		||||
        --cross-prefix="$cfg_target_canonical-" \
 | 
			
		||||
        --libdir="$cfg_dir_builds/ffmpeg/build" \
 | 
			
		||||
        --target-os="linux" \
 | 
			
		||||
        --enable-shared \
 | 
			
		||||
        --disable-static \
 | 
			
		||||
@@ -39,10 +41,16 @@ host_install()
 | 
			
		||||
    $cmd_make \
 | 
			
		||||
	LIBDIR="$cfg_dir_toolchain_sysroot/usr/lib" \
 | 
			
		||||
        install-headers
 | 
			
		||||
 | 
			
		||||
    $cmd_make \
 | 
			
		||||
        install-libs
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
target_install()
 | 
			
		||||
{
 | 
			
		||||
    $cmd_make \
 | 
			
		||||
        install-libs
 | 
			
		||||
 | 
			
		||||
    $cmd_cp -r "$cfg_dir_builds/ffmpeg/build/"* "$cfg_dir_rootfs/usr/lib/"
 | 
			
		||||
    $cmd_cp -r "$cfg_dir_builds/ffmpeg/build/"* "$cfg_dir_toolchain_sysroot/usr/lib/"
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										15
									
								
								rules/filesystem/fs/etc/rc.d/check_wlan
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								rules/filesystem/fs/etc/rc.d/check_wlan
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
start()
 | 
			
		||||
{
 | 
			
		||||
    if [ ! -f /opt/check_wlan ]; then
 | 
			
		||||
        cp -ri /etc/check_wlan /opt/
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    sh /opt/check_wlan  < /dev/null > /dev/null 2>&1 &
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
stop()
 | 
			
		||||
{
 | 
			
		||||
    echo "* Stopping process..."
 | 
			
		||||
    killall sh /opt/check_wlan -9 > /dev/null 2>&1
 | 
			
		||||
    echo "* Process not running."
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										87
									
								
								rules/filesystem/fs/etc/rc.d/network-wlan
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								rules/filesystem/fs/etc/rc.d/network-wlan
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,87 @@
 | 
			
		||||
start()
 | 
			
		||||
{
 | 
			
		||||
    ifconfig wlan0 up
 | 
			
		||||
    if [ -n "$cfg_eth_ext_ip$cfg_eth_prv_ip" ]; then
 | 
			
		||||
        while [ 1 ]; do
 | 
			
		||||
            echo "* Waiting for wlan0 device..."
 | 
			
		||||
            ifconfig wlan0 > /dev/null 2>&1
 | 
			
		||||
            [ $? -eq 0 ] && break
 | 
			
		||||
            usleep 250000
 | 
			
		||||
        done
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    if [ -n "$cfg_bridge0_ip" ]; then
 | 
			
		||||
        for itf in $cfg_bridge0_itfs; do
 | 
			
		||||
            ifconfig $itf 0.0.0.0
 | 
			
		||||
        done
 | 
			
		||||
 | 
			
		||||
        brctl addbr bridge0
 | 
			
		||||
 | 
			
		||||
        for itf in $cfg_bridge0_itfs; do
 | 
			
		||||
            brctl addif bridge0 $itf
 | 
			
		||||
        done
 | 
			
		||||
 | 
			
		||||
        ifconfig bridge0 $cfg_bridge0_ip netmask $cfg_bridge0_nmask up
 | 
			
		||||
        ifconfig bridge0 multicast
 | 
			
		||||
        route add -net 224.0.0.0 netmask 240.0.0.0 dev bridge0
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # Public ethernet.
 | 
			
		||||
    if [ -n "$cfg_eth_ext_ip" ]; then
 | 
			
		||||
        if [ -n "$cfg_eth_ext_mk" ]; then
 | 
			
		||||
            ifconfig wlan0 "$cfg_eth_ext_ip" netmask "$cfg_eth_ext_mk" up
 | 
			
		||||
        else
 | 
			
		||||
            ifconfig wlan0 "$cfg_eth_ext_ip" up
 | 
			
		||||
        fi
 | 
			
		||||
        ifconfig wlan0 multicast
 | 
			
		||||
        route add -net 224.0.0.0 netmask 240.0.0.0 dev wlan0
 | 
			
		||||
 | 
			
		||||
        # Fixed mac address with $cfg_eth_ext_mac based derivated from IP address $cfg_eth_ext_ip
 | 
			
		||||
        if [ -n "$cfg_eth_ext_mac" ]; then
 | 
			
		||||
          ifconfig wlan0 hw ether $cfg_eth_ext_mac
 | 
			
		||||
        fi
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    if [ -n "$cfg_eth_ext_gw" ]; then
 | 
			
		||||
        route add default gw "$cfg_eth_ext_gw"
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    if [ -n "$cfg_eth_ext_dns" ]; then
 | 
			
		||||
        echo "nameserver $cfg_eth_ext_dns" > /etc/resolv.conf
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # Private ethernet.
 | 
			
		||||
    if [ -n "$cfg_eth_prv_ip" ]; then
 | 
			
		||||
        ifconfig wlan0:prv "$cfg_eth_prv_ip" up
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # Static ARP table.
 | 
			
		||||
    if [ -n "$cfg_arp_table" ]; then
 | 
			
		||||
        for e in $cfg_arp_table; do
 | 
			
		||||
            ip="$(echo $e | cut -f1 -d'|')"
 | 
			
		||||
            mac="$(echo $e | cut -f2 -d'|')"
 | 
			
		||||
            arp -s "$ip" "$mac"
 | 
			
		||||
        done
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    iw wlan0 connect LSTS
 | 
			
		||||
    ifconfig eth0 down
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
stop()
 | 
			
		||||
{
 | 
			
		||||
    # Public ethernet.
 | 
			
		||||
    if [ -n "$cfg_eth_ext_gw" ]; then
 | 
			
		||||
        route del default
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    if [ -n "$cfg_eth_ext_ip" ]; then
 | 
			
		||||
        route del -net 224.0.0.0 netmask 240.0.0.0 dev wlan0
 | 
			
		||||
        ifconfig wlan0 down
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # Private ethernet.
 | 
			
		||||
    if [ -n "$cfg_eth_prv_ip" ]; then
 | 
			
		||||
        ifconfig wlan0:prv down
 | 
			
		||||
    fi
 | 
			
		||||
}
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    '4.9.3'
 | 
			
		||||
    '5.4.0'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
@@ -10,7 +10,7 @@ url=\
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
    '6f831b4d251872736e8e9cc09746f327'
 | 
			
		||||
    '4c626ac2a83ef30dfb9260e6f59c2b30'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
build_dir=$pkg_var
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    '2.22'
 | 
			
		||||
    '2.24'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
@@ -10,7 +10,7 @@ url=\
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
    'e51e02bf552a0a1fbbdc948fb2f5e83c'
 | 
			
		||||
    '97dc5517f92016f3d70d83e3162ad318'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
maintainer=\
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    '5.0.4'
 | 
			
		||||
    '6.1.2'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
@@ -10,7 +10,7 @@ url=\
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
    '50c3edcb7c9438e04377ee9a1a061b79'
 | 
			
		||||
    '8ddbb26dc3bd4e2302984debba1406a5'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
maintainer=\
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										34
									
								
								rules/iw/default.bash
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								rules/iw/default.bash
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,34 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    "4.9"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
(
 | 
			
		||||
    "http://lsts.pt/glued/iw-$version.tar.bz2"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
  "ae8ccaa154449300c2c02eb90a37eebb"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
maintainer=\
 | 
			
		||||
(
 | 
			
		||||
    'Pedro Gonçalves <pedro@lsts.pt>'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
configure()
 | 
			
		||||
{
 | 
			
		||||
    mv "../iw_$version/etc" "../iw-$version/"
 | 
			
		||||
    mv "../iw_$version/lib" "../iw-$version/"
 | 
			
		||||
    mv "../iw_$version/sbin" "../iw-$version/"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
target_install()
 | 
			
		||||
{
 | 
			
		||||
    $cmd_cp -r "etc/"* "$cfg_dir_rootfs/etc/"
 | 
			
		||||
    $cmd_cp -r "sbin/"* "$cfg_dir_rootfs/sbin/"
 | 
			
		||||
    $cmd_cp -r "lib/"* "$cfg_dir_rootfs/lib/"
 | 
			
		||||
    $cmd_cp -r "$pkg_dir/fs/"* "$cfg_dir_rootfs/"
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										46
									
								
								rules/iw/fs/etc/check_wlan
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								rules/iw/fs/etc/check_wlan
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,46 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin:/bin
 | 
			
		||||
 | 
			
		||||
############################# USER INPUT ###########################
 | 
			
		||||
 | 
			
		||||
ip_dest=10.0.30.3
 | 
			
		||||
 | 
			
		||||
####################################################################
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
############### DON'T EDIT ##########################################
 | 
			
		||||
 | 
			
		||||
check_interval=1
 | 
			
		||||
log=/opt/.wifi.log
 | 
			
		||||
wlan=wlan0
 | 
			
		||||
eth=eth0
 | 
			
		||||
 | 
			
		||||
exec 1> /dev/null
 | 
			
		||||
exec 2>> $log
 | 
			
		||||
echo $(date) > $log
 | 
			
		||||
# without check_interval set, we risk a 0 sleep = busy loop
 | 
			
		||||
if [ ! "$check_interval" ]; then
 | 
			
		||||
        echo "No check interval set!" >> $log
 | 
			
		||||
        exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
startWifi () {
 | 
			
		||||
   iw wlan0 connect LSTS >> $log
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ifconfig $eth down
 | 
			
		||||
ifconfig $wlan up
 | 
			
		||||
 | 
			
		||||
while [ 1 ]; do
 | 
			
		||||
        ping -q -c1 $ip_dest > /dev/null
 | 
			
		||||
        if [ $? -ne 0 ]; then
 | 
			
		||||
                echo $(date)" attempting restart..." >> $log
 | 
			
		||||
                startWifi
 | 
			
		||||
                sleep 1
 | 
			
		||||
        else
 | 
			
		||||
                echo "IS LINKED" >> $log
 | 
			
		||||
                sleep $check_interval
 | 
			
		||||
        fi
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
#####################################################################
 | 
			
		||||
@@ -15,9 +15,10 @@ md5=\
 | 
			
		||||
 | 
			
		||||
configure()
 | 
			
		||||
{
 | 
			
		||||
    $cmd_mkdir build
 | 
			
		||||
    ./configure \
 | 
			
		||||
        --sysroot="$cfg_dir_toolchain_sysroot" \
 | 
			
		||||
        --prefix="$cfg_dir_rootfs/usr" \
 | 
			
		||||
        --prefix="$cfg_dir_builds/libav/libav-$version/build/" \
 | 
			
		||||
        --cross-prefix="$cfg_target_canonical-" \
 | 
			
		||||
        --target-os="linux" \
 | 
			
		||||
        --enable-memalign-hack \
 | 
			
		||||
@@ -32,8 +33,14 @@ build()
 | 
			
		||||
    $cmd_make
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
host_install()
 | 
			
		||||
{
 | 
			
		||||
    $cmd_make install
 | 
			
		||||
    $cmd_cp -r "build/"*        "$cfg_dir_toolchain_sysroot/usr/"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
target_install()
 | 
			
		||||
{
 | 
			
		||||
    $cmd_make \
 | 
			
		||||
        install
 | 
			
		||||
    $cmd_cp -r "build/"*        "$cfg_dir_rootfs/usr/"
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -19,6 +19,7 @@ configure()
 | 
			
		||||
        --prefix="$cfg_dir_toolchain_sysroot/usr" \
 | 
			
		||||
        --target="$cfg_target_canonical" \
 | 
			
		||||
        --host="$cfg_target_canonical" \
 | 
			
		||||
        --disable-examples \
 | 
			
		||||
        --build="$cfg_host_canonical"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										41
									
								
								rules/libraw1394/default.bash
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								rules/libraw1394/default.bash
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    '2.0.5'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
(
 | 
			
		||||
    "http://downloads.sourceforge.net/libraw1394/libraw1394-$version.tar.gz"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
    '1db64231c78540c32859b591cb8b40cf'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
configure()
 | 
			
		||||
{
 | 
			
		||||
    "../libraw1394-$version/configure" \
 | 
			
		||||
        --prefix="$cfg_dir_toolchain_sysroot/usr" \
 | 
			
		||||
        --target="$cfg_target_canonical" \
 | 
			
		||||
        --host="$cfg_target_canonical" \
 | 
			
		||||
        --disable-examples \
 | 
			
		||||
        --build="$cfg_host_canonical"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
build()
 | 
			
		||||
{
 | 
			
		||||
    $cmd_make
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
host_install()
 | 
			
		||||
{
 | 
			
		||||
    $cmd_make install
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
target_install()
 | 
			
		||||
{
 | 
			
		||||
    for f in "$cfg_dir_toolchain_sysroot/usr/lib/"libraw1394*so*; do
 | 
			
		||||
        $cmd_target_strip "$f" -o "$cfg_dir_rootfs/lib/$(basename "$f")"
 | 
			
		||||
    done
 | 
			
		||||
}
 | 
			
		||||
@@ -1,16 +1,16 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    '3.14.63'
 | 
			
		||||
    '4.4.66'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
(
 | 
			
		||||
    "https://www.kernel.org/pub/linux/kernel/v3.x/linux-$version.tar.xz"
 | 
			
		||||
    "https://www.kernel.org/pub/linux/kernel/v4.x/linux-$version.tar.xz"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
    '6cf8a6b23849f47f511e0e46cfdb6392'
 | 
			
		||||
    '5353de56bf4621a35afc4384c7e51f30'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
maintainer=\
 | 
			
		||||
 
 | 
			
		||||
@@ -1,16 +1,16 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    '3.14.63'
 | 
			
		||||
    '4.4.66'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
(
 | 
			
		||||
    "https://www.kernel.org/pub/linux/kernel/v3.x/linux-$version.tar.xz"
 | 
			
		||||
    "https://www.kernel.org/pub/linux/kernel/v4.x/linux-$version.tar.xz"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
    '6cf8a6b23849f47f511e0e46cfdb6392'
 | 
			
		||||
    '5353de56bf4621a35afc4384c7e51f30'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
maintainer=\
 | 
			
		||||
 
 | 
			
		||||
@@ -2,21 +2,19 @@
 | 
			
		||||
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    '3.18_2015-06-03'
 | 
			
		||||
    '4.4_2017-01-27'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
(
 | 
			
		||||
    "https://github.com/rasmartins/rpi-linux/archive/rpi-linux-$version.tar.gz"
 | 
			
		||||
    "http://lsts.pt/glued/rpi-linux-$version.zip"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
    '0b0255e50ca358b619bb78653ac2db2e'
 | 
			
		||||
    'f31d48a9d2c93509b35e750be489b44c'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
post_unpack()
 | 
			
		||||
{
 | 
			
		||||
    rmdir "../linux-$version" &&
 | 
			
		||||
        mv "../rpi-linux-rpi-linux-$version" "../linux-$version"
 | 
			
		||||
}
 | 
			
		||||
build_dir="rpi-linux-rpi-linux-$version"
 | 
			
		||||
 | 
			
		||||
find_patches
 | 
			
		||||
 
 | 
			
		||||
@@ -2,12 +2,12 @@
 | 
			
		||||
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    '3.14.64-rt67'
 | 
			
		||||
    '4.4.66-rt79'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
(
 | 
			
		||||
    "https://www.kernel.org/pub/linux/kernel/v3.x/linux-$(linux_mmp_version).tar.xz"
 | 
			
		||||
    "https://www.kernel.org/pub/linux/kernel/v4.x/linux-$(linux_mmp_version).tar.xz"
 | 
			
		||||
    "https://www.kernel.org/pub/linux/kernel/projects/rt/$(linux_mm_version)/patch-$version.patch.gz"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										212
									
								
								rules/linux/v3_14.bash
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										212
									
								
								rules/linux/v3_14.bash
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,212 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    '3.14.63'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
(
 | 
			
		||||
    "https://www.kernel.org/pub/linux/kernel/v3.x/linux-$version.tar.xz"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
    '6cf8a6b23849f47f511e0e46cfdb6392'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
maintainer=\
 | 
			
		||||
(
 | 
			
		||||
    'Ricardo Martins <rasm@fe.up.pt>'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
requires=\
 | 
			
		||||
(
 | 
			
		||||
    'bc/host'
 | 
			
		||||
    'kmod/host'
 | 
			
		||||
    'lz4/host'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# This variable is updated by find_patches().
 | 
			
		||||
patches=()
 | 
			
		||||
 | 
			
		||||
# Major/Minor version.
 | 
			
		||||
linux_mm_version()
 | 
			
		||||
{
 | 
			
		||||
    echo "$version" | cut -f1-2 -d.
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Major/Minor/Patch version.
 | 
			
		||||
linux_mmp_version()
 | 
			
		||||
{
 | 
			
		||||
    echo "$version" | cut -f1 -d-
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
find_patches()
 | 
			
		||||
{
 | 
			
		||||
    patches=(\
 | 
			
		||||
        $(ls -1 \
 | 
			
		||||
             "$pkg_dir/patches/$version/"*.patch \
 | 
			
		||||
             "$pkg_dir/patches/$(linux_mmp_version)/"*.patch \
 | 
			
		||||
             "$pkg_dir/patches/$(linux_mm_version)/"*.patch \
 | 
			
		||||
             "$cfg_dir_system/patches/linux/$version/"*.patch \
 | 
			
		||||
             "$cfg_dir_system/patches/linux/$(linux_mmp_version)/"*.patch \
 | 
			
		||||
             "$cfg_dir_system/patches/linux/$(linux_mm_version)/"*.patch \
 | 
			
		||||
             2> /dev/null | awk '!a[$0]++')
 | 
			
		||||
    )
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
find_patches
 | 
			
		||||
 | 
			
		||||
# Get configuration file.
 | 
			
		||||
linux_cfg_file()
 | 
			
		||||
{
 | 
			
		||||
    for f in "$version" "$(linux_mmp_version)" "$(linux_mm_version)"; do
 | 
			
		||||
        f="$cfg_dir_system/cfg/linux-$f.cfg"
 | 
			
		||||
        if [ -f "$f" ]; then
 | 
			
		||||
            echo "$f"
 | 
			
		||||
            return 0
 | 
			
		||||
        fi
 | 
			
		||||
 | 
			
		||||
        echo "Candidate kernel configuration file '$f' doesn't exist." 1>&2
 | 
			
		||||
    done
 | 
			
		||||
 | 
			
		||||
    echo "ERROR: failed to find a valid kernel configuration file." 1>&2
 | 
			
		||||
    return 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
post_unpack()
 | 
			
		||||
{
 | 
			
		||||
    cp -r ../linux-3.14.63/* ../linux_3.3-3.14.63
 | 
			
		||||
    n=0; while [ -n "${patches[$n]}" ]; do
 | 
			
		||||
             patch="${patches[$n]}"
 | 
			
		||||
             echo "* Applying $patch..."
 | 
			
		||||
             (ucat "$patch" | patch -p1) || return 1
 | 
			
		||||
             let n++
 | 
			
		||||
         done
 | 
			
		||||
 | 
			
		||||
    if [ -d "$cfg_dir_toolchain/firmware" ]; then
 | 
			
		||||
        tar -C "$cfg_dir_toolchain/firmware" -c -v -f - . | tar -C firmware -x -v -f -
 | 
			
		||||
    fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
refresh()
 | 
			
		||||
{
 | 
			
		||||
    for rule in configure build target_install; do
 | 
			
		||||
        if [ "$(linux_cfg_file)" -nt "$cfg_dir_builds/linux/$pkg_var/.$rule" ]; then
 | 
			
		||||
            rm "$cfg_dir_builds/linux/$pkg_var/.$rule"
 | 
			
		||||
        fi
 | 
			
		||||
    done
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
configure()
 | 
			
		||||
{
 | 
			
		||||
    $cmd_make \
 | 
			
		||||
        ARCH=${cfg_target_linux} \
 | 
			
		||||
        mrproper || return 1
 | 
			
		||||
 | 
			
		||||
    cfg="$(linux_cfg_file)"
 | 
			
		||||
    [ -n "$cfg" ] || return 1
 | 
			
		||||
    $cmd_cp "$cfg" .config || return 1
 | 
			
		||||
 | 
			
		||||
    if [ -f "$cfg_dir_system/files/initramfs_init.sh" ]; then
 | 
			
		||||
        $cmd_mkdir initramfs &&
 | 
			
		||||
        $cmd_cp "$pkg_dir/files/initramfs.conf" . &&
 | 
			
		||||
        $cmd_cp "$cfg_dir_system/files/initramfs_init.sh" initramfs/init.sh &&
 | 
			
		||||
        $cmd_cp "$cfg_dir_rootfs/bin/busybox" initramfs/busybox
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    yes '' | $cmd_make \
 | 
			
		||||
        CROSS_COMPILE=${cfg_target_canonical}- \
 | 
			
		||||
        ARCH=${cfg_target_linux} \
 | 
			
		||||
        oldconfig
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
build()
 | 
			
		||||
{
 | 
			
		||||
    $cmd_make \
 | 
			
		||||
        CROSS_COMPILE=$cfg_target_canonical- \
 | 
			
		||||
        ARCH=$cfg_target_linux || return 1
 | 
			
		||||
 | 
			
		||||
    $cmd_make \
 | 
			
		||||
        CROSS_COMPILE=$cfg_target_canonical- \
 | 
			
		||||
        ARCH=$cfg_target_linux \
 | 
			
		||||
        DEPMOD="$cfg_dir_toolchain/sbin/depmod" \
 | 
			
		||||
        modules || return 1
 | 
			
		||||
 | 
			
		||||
    if [ "$(basename $cfg_target_linux_kernel)" = 'uImage' ]; then
 | 
			
		||||
        $cmd_make \
 | 
			
		||||
            CROSS_COMPILE=$cfg_target_canonical- \
 | 
			
		||||
            ARCH=$cfg_target_linux \
 | 
			
		||||
            DEPMOD="$cfg_dir_toolchain/sbin/depmod" \
 | 
			
		||||
            uImage || return 1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # Compressed image.
 | 
			
		||||
    if [ "$(basename $cfg_target_linux_kernel)" = 'zImage' ]; then
 | 
			
		||||
        $cmd_make \
 | 
			
		||||
            CROSS_COMPILE=$cfg_target_canonical- \
 | 
			
		||||
            ARCH=$cfg_target_linux \
 | 
			
		||||
            DEPMOD="$cfg_dir_toolchain/sbin/depmod" \
 | 
			
		||||
            zImage || return 1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # Device tree blob.
 | 
			
		||||
    if [ -n "$cfg_target_linux_dtb" ]; then
 | 
			
		||||
        $cmd_make \
 | 
			
		||||
            CROSS_COMPILE=$cfg_target_canonical- \
 | 
			
		||||
            ARCH=$cfg_target_linux \
 | 
			
		||||
            DEPMOD="$cfg_dir_toolchain/sbin/depmod" \
 | 
			
		||||
            dtbs || return 1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    if [ -n "${cfg_target_linux_size}" ]; then
 | 
			
		||||
        dd if="$cfg_target_linux_kernel" of="${cfg_target_linux_kernel}.padded" \
 | 
			
		||||
            ibs="${cfg_target_linux_size}" conv=sync &&
 | 
			
		||||
        mv "${cfg_target_linux_kernel}.padded" "${cfg_target_linux_kernel}"
 | 
			
		||||
    fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
target_install()
 | 
			
		||||
{
 | 
			
		||||
    if [ -n "$(file "$cfg_target_linux_kernel" | grep ELF)" ]; then
 | 
			
		||||
        strip="$(echo $cfg_dir_toolchain/bin/*-strip)"
 | 
			
		||||
        $strip -s -R .comment "$cfg_target_linux_kernel"
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # Kernel image.
 | 
			
		||||
    if [ -n "$cfg_target_linux_kernel" ]; then
 | 
			
		||||
        cp -v "$cfg_target_linux_kernel" "$cfg_dir_rootfs/boot/kernel"
 | 
			
		||||
    else
 | 
			
		||||
        echo "ERROR: failed to find kernel image at '$cfg_target_linux_kernel'"
 | 
			
		||||
        return 1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # Device tree blobs.
 | 
			
		||||
    dts="arch/$cfg_target_linux/boot/dts"
 | 
			
		||||
    if [ -d "$dts" ]; then
 | 
			
		||||
        $cmd_mkdir "$cfg_dir_rootfs/boot" &&
 | 
			
		||||
            cp -v "$dts/"*.dtb "$cfg_dir_rootfs/boot"
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # Device tree overlays.
 | 
			
		||||
    overlays_dir="arch/$cfg_target_linux/boot/dts/overlays"
 | 
			
		||||
    if [ -d "$overlays_dir" ]; then
 | 
			
		||||
	$cmd_mkdir "$cfg_dir_rootfs/boot/overlays" || return 1
 | 
			
		||||
        $cmd_cp "$overlays_dir"/*.dtbo "$cfg_dir_rootfs/boot/overlays" || return 1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    $cmd_make \
 | 
			
		||||
        CROSS_COMPILE="$cfg_target_canonical-" \
 | 
			
		||||
        ARCH="$cfg_target_linux" \
 | 
			
		||||
        INSTALL_MOD_PATH="$cfg_dir_rootfs/usr" \
 | 
			
		||||
        KBUILD_VERBOSE=1 \
 | 
			
		||||
        DEPMOD="$cfg_dir_toolchain/sbin/depmod" \
 | 
			
		||||
        modules_install
 | 
			
		||||
 | 
			
		||||
    $cmd_make \
 | 
			
		||||
        CROSS_COMPILE="$cfg_target_canonical-" \
 | 
			
		||||
        ARCH="$cfg_target_linux" \
 | 
			
		||||
        INSTALL_MOD_PATH="$cfg_dir_rootfs/usr" \
 | 
			
		||||
        KBUILD_VERBOSE=1 \
 | 
			
		||||
        DEPMOD="$cfg_dir_toolchain/sbin/depmod" \
 | 
			
		||||
        firmware_install
 | 
			
		||||
}
 | 
			
		||||
@@ -1,16 +1,16 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    "0.9"
 | 
			
		||||
    "1.0.2"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
(
 | 
			
		||||
    "http://www.multiprecision.org/mpc/download/mpc-$version.tar.gz"
 | 
			
		||||
    "https://ftp.gnu.org/gnu/mpc/mpc-$version.tar.gz"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
    "0d6acab8d214bd7d1fbbc593e83dd00d"
 | 
			
		||||
    "68fadff3358fb3e7976c7a398a0af4c3"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
maintainer=\
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    '3.1.3'
 | 
			
		||||
    '3.1.5'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
@@ -10,7 +10,7 @@ url=\
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
    '5fdfa3cfa5c86514ee4a241a1affa138'
 | 
			
		||||
    'b1d23a55588e3b2a13e3be66bc69fd8d'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
maintainer=\
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										52
									
								
								rules/netcat/default.bash
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								rules/netcat/default.bash
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,52 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    "110"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
(
 | 
			
		||||
    "https://kent.dl.sourceforge.net/project/nc$version/unix%20netcat%201.10%20by%20_Hobbit_/%5BUnnamed%20release%5D/nc$version.tgz"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
    "402632f2fe01c169ff19a0ad6e9d608c"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
post_unpack()
 | 
			
		||||
{
 | 
			
		||||
  cd "../netcat-$version"
 | 
			
		||||
  mv ../data .
 | 
			
		||||
  mv ../generic.h .
 | 
			
		||||
  mv ../Makefile .
 | 
			
		||||
  mv ../netcat.blurb .
 | 
			
		||||
  mv ../netcat.c .
 | 
			
		||||
  mv ../README .
 | 
			
		||||
  mv ../Changelog .
 | 
			
		||||
  mv ../scripts .
 | 
			
		||||
  mv ../stupidh .
 | 
			
		||||
 | 
			
		||||
  patches=$(ls "$pkg_dir"/patches/*.patch)
 | 
			
		||||
  if [ -n "$patches" ]; then
 | 
			
		||||
      cat $patches | patch -p1
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
build()
 | 
			
		||||
{
 | 
			
		||||
  make nc CC="$cmd_target_cc"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
host_install()
 | 
			
		||||
{
 | 
			
		||||
  $cmd_cp nc "${cfg_dir_toolchain_sysroot}/usr/bin/"
 | 
			
		||||
  $cmd_mkdir "${cfg_dir_toolchain_sysroot}/usr/share/bin/"
 | 
			
		||||
  $cmd_cp scripts/* "${cfg_dir_toolchain_sysroot}/usr/share/bin/"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
target_install()
 | 
			
		||||
{
 | 
			
		||||
  $cmd_target_strip nc -o "$cfg_dir_rootfs/usr/bin/nc"
 | 
			
		||||
  $cmd_mkdir ${cfg_dir_rootfs}/usr/share/bin/
 | 
			
		||||
  $cmd_cp scripts/* "${cfg_dir_rootfs}/usr/share/bin/"
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										11
									
								
								rules/netcat/patches/res_init.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								rules/netcat/patches/res_init.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
--- a/netcat.c	2017-05-25 14:39:05.517314469 +0200
 | 
			
		||||
+++ b/netcat_patch.c	2017-05-25 14:39:00.549218618 +0200
 | 
			
		||||
@@ -1316,7 +1316,7 @@
 | 
			
		||||
 | 
			
		||||
 #ifdef HAVE_BIND
 | 
			
		||||
 /* can *you* say "cc -yaddayadda netcat.c -lresolv -l44bsd" on SunLOSs? */
 | 
			
		||||
-  res_init();
 | 
			
		||||
+//  res_init();
 | 
			
		||||
 #endif
 | 
			
		||||
 /* I was in this barbershop quartet in Skokie IL ... */
 | 
			
		||||
 /* round up the usual suspects, i.e. malloc up all the stuff we need */
 | 
			
		||||
@@ -15,15 +15,22 @@ md5=\
 | 
			
		||||
 | 
			
		||||
requires=\
 | 
			
		||||
(
 | 
			
		||||
    'cmake/host'
 | 
			
		||||
    'ffmpeg/default'
 | 
			
		||||
    'cmake/host'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
maintainer=\
 | 
			
		||||
(
 | 
			
		||||
    'Renato Caldas <rmsc@fe.up.pt>'
 | 
			
		||||
    'Pedro Gonçalves <pedro@fe.up.pt>'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
post_unpack()
 | 
			
		||||
{
 | 
			
		||||
    wget "http://lsts.pt/glued/tbb43_20141204oss_src.tgz"
 | 
			
		||||
    mv tbb43_20141204oss_src.tgz "3rdparty/tbb/"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
configure()
 | 
			
		||||
{
 | 
			
		||||
    LINKER_ADDED_FLAGS="-Wl,-rpath,${cfg_dir_rootfs}/usr/lib"
 | 
			
		||||
@@ -50,6 +57,8 @@ configure()
 | 
			
		||||
    -DBUILD_SHARED_LIBS=ON \
 | 
			
		||||
    -DBUILD_TESTS=OFF \
 | 
			
		||||
    -DBUILD_WITH_DEBUG_INFO=OFF \
 | 
			
		||||
    -DBUILD_TBB=ON \
 | 
			
		||||
    -DWITH_TBB=ON \
 | 
			
		||||
    ../opencv-$version/
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -75,4 +84,7 @@ target_install()
 | 
			
		||||
            $cmd_target_strip -v "$f" -o "$cfg_dir_rootfs/usr/lib/$(basename "$f")"
 | 
			
		||||
        fi
 | 
			
		||||
    done
 | 
			
		||||
 | 
			
		||||
    $cmd_cp -r "${pkg_build_dir}/../build/lib/"libtbb.so "$cfg_dir_rootfs/usr/lib/"
 | 
			
		||||
    $cmd_cp -r "${pkg_build_dir}/../build/lib/"libtbb.so "$cfg_dir_toolchain_sysroot/usr/lib/"
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										46
									
								
								rules/pointgrey/default.bash
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								rules/pointgrey/default.bash
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,46 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    "2.11.3.121"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
(
 | 
			
		||||
    "http://lsts.pt/glued/flycapture.$version.armhf.tar.gz"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
    "788861351143e3279cf4522e1055e739"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
post_unpack()
 | 
			
		||||
{
 | 
			
		||||
    $cmd_cp -r "../flycapture.2.11.3.121_armhf/"* "../pointgrey-$version/"
 | 
			
		||||
    rm -r ../flycapture.2.11.3.121_armhf/
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
requires=\
 | 
			
		||||
(
 | 
			
		||||
    'libusb/default'
 | 
			
		||||
    'libraw1394/default'
 | 
			
		||||
    'libdc1394/default'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
maintainer=\
 | 
			
		||||
(
 | 
			
		||||
    'Pedro Gonçalves <pedro@lsts.pt>'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
host_install()
 | 
			
		||||
{
 | 
			
		||||
    $cmd_cp -r "lib/"*    "$cfg_dir_toolchain_sysroot/usr/lib/"
 | 
			
		||||
    $cmd_cp -r "include/"* "$cfg_dir_toolchain_sysroot/usr/include/"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
target_install()
 | 
			
		||||
{
 | 
			
		||||
    $cmd_mkdir "$cfg_dir_rootfs/usr/include/"
 | 
			
		||||
    $cmd_cp -r "lib/"* "$cfg_dir_rootfs/usr/lib/"
 | 
			
		||||
    $cmd_cp -r "include/"* "$cfg_dir_rootfs/usr/include/"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										59
									
								
								rules/raspicam/default.bash
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								rules/raspicam/default.bash
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,59 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    "1.0.0"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
(
 | 
			
		||||
    "http://lsts.pt/glued/raspicam-$version.zip"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
  "169e62fd17d41455a42711a2f9c54fd1"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
requires=\
 | 
			
		||||
(
 | 
			
		||||
    'cmake/host'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
maintainer=\
 | 
			
		||||
(
 | 
			
		||||
    'Pedro Gonçalves <pedro@lsts.pt>'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
configure()
 | 
			
		||||
{
 | 
			
		||||
    LINKER_ADDED_FLAGS="-Wl,-rpath,${cfg_dir_rootfs}/usr/lib"
 | 
			
		||||
 | 
			
		||||
    ${cfg_dir_toolchain}/usr/local/bin/cmake \
 | 
			
		||||
        -DCMAKE_SYSTEM_NAME="Linux" \
 | 
			
		||||
        -DCMAKE_SYSTEM_VERSION="1" \
 | 
			
		||||
        -DCMAKE_FIND_ROOT_PATH="${cfg_dir_toolchain_sysroot}/usr ${cfg_dir_rootfs}/usr" \
 | 
			
		||||
        -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
 | 
			
		||||
        -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
 | 
			
		||||
        -DCMAKE_C_COMPILER="${cmd_target_cc}" \
 | 
			
		||||
        -DCMAKE_CXX_COMPILER="${cmd_target_cxx}" \
 | 
			
		||||
        -DCMAKE_C_FLAGS="${cfg_target_gcc_flags}" \
 | 
			
		||||
	.
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
build()
 | 
			
		||||
{
 | 
			
		||||
    $cmd_make VERBOSE=1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
host_install()
 | 
			
		||||
{
 | 
			
		||||
    cd build/
 | 
			
		||||
    $cmd_cp -r "lib/"* "$cfg_dir_toolchain_sysroot/usr/lib/"
 | 
			
		||||
    $cmd_cp -r "inc/"* "$cfg_dir_toolchain_sysroot/usr/include/"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
target_install()
 | 
			
		||||
{
 | 
			
		||||
    cd build/
 | 
			
		||||
    $cmd_cp -r "lib/"* "$cfg_dir_rootfs/usr/lib/"
 | 
			
		||||
    $cmd_cp -r "bin/"* "$cfg_dir_rootfs/usr/bin/"
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										44
									
								
								rules/rlwrap/default.bash
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								rules/rlwrap/default.bash
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,44 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
  "0.43"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
(
 | 
			
		||||
  "https://github.com/hanslub42/rlwrap/releases/download/v$version/rlwrap-$version.tar.gz"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
  "b993e83d3a292464de70719b32f83a34"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
requires=(
 | 
			
		||||
  "readline/default"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
configure()
 | 
			
		||||
{
 | 
			
		||||
  ./configure \
 | 
			
		||||
    --prefix="${cfg_dir_toolchain_sysroot}/usr" \
 | 
			
		||||
    --target="$cfg_target_canonical" \
 | 
			
		||||
    --host="$cfg_target_canonical" \
 | 
			
		||||
    --build="$cfg_host_canonical"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
build()
 | 
			
		||||
{
 | 
			
		||||
  $cmd_make
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
host_install()
 | 
			
		||||
{
 | 
			
		||||
  $cmd_make install
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
target_install()
 | 
			
		||||
{
 | 
			
		||||
  $cmd_cp  $cfg_dir_toolchain_sysroot/usr/share/rlwrap $cfg_dir_rootfs/usr/share/
 | 
			
		||||
  $cmd_cp  $cfg_dir_toolchain_sysroot/usr/bin/rlwrap $cfg_dir_rootfs/usr/bin/
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1,31 +1,29 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    '2015-06-03'
 | 
			
		||||
    '2017-02-02'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
(
 | 
			
		||||
    "https://github.com/rasmartins/rpi-boot-firmware/archive/rpi-boot-firmware-$version.tar.gz"
 | 
			
		||||
    "http://lsts.pt/glued/rpi-boot-firmware-$version.zip"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
maintainer=\
 | 
			
		||||
(
 | 
			
		||||
    'Ricardo Martins <rasm@fe.up.pt>'
 | 
			
		||||
    'Pedro Gonçalves <pedro@lsts.pt>'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
    'a80ee36b66cccda4e9ccb7eb26bd6bb8'
 | 
			
		||||
    'eb42664fce4d73f167064e697dfacb76'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
target_install()
 | 
			
		||||
{
 | 
			
		||||
    $cmd_mkdir \
 | 
			
		||||
        "$cfg_dir_rootfs/boot" &&
 | 
			
		||||
    $cmd_mkdir "$cfg_dir_rootfs/boot"
 | 
			
		||||
 | 
			
		||||
    for f in bootcode.bin fixup.dat start.elf; do
 | 
			
		||||
        $cmd_cp -r "../$pkg-$pkg-$version/$f" "$cfg_dir_rootfs/boot"
 | 
			
		||||
    done &&
 | 
			
		||||
    $cmd_cp "../$pkg-$version/"* "$cfg_dir_rootfs/boot/"
 | 
			
		||||
 | 
			
		||||
    tar -C "$pkg_dir/fs" -c -f - . | tar -C "$cfg_dir_rootfs" -x -v -f -
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1 +1 @@
 | 
			
		||||
dwc_otg.lpm_enable=0 console=ttyAMA0,115200,8n1 root=/dev/mmcblk0p2 elevator=deadline rootwait quiet
 | 
			
		||||
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 elevator=deadline rootwait quiet
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										59
									
								
								rules/screen/default.bash
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								rules/screen/default.bash
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,59 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
  "4.5.0"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
(
 | 
			
		||||
  "http://ftp.gnu.org/gnu/screen/screen-$version.tar.gz"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
  "a32105a91359afab1a4349209a028e31"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
requires=\
 | 
			
		||||
(
 | 
			
		||||
  "ncurses/default"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
post_unpack()
 | 
			
		||||
{
 | 
			
		||||
  patches=$(ls "$pkg_dir"/patches/*.patch)
 | 
			
		||||
  if [ -n "$patches" ]; then
 | 
			
		||||
      cat $patches | patch -p1
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  autoconf
 | 
			
		||||
  aclocal
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
configure()
 | 
			
		||||
{
 | 
			
		||||
  ./configure \
 | 
			
		||||
        --target="$cfg_target_canonical" \
 | 
			
		||||
        --host="$cfg_target_canonical" \
 | 
			
		||||
        --build="$cfg_host_canonical" \
 | 
			
		||||
        --prefix="$cfg_dir_toolchain_sysroot/usr" \
 | 
			
		||||
        --enable-colors256
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
build()
 | 
			
		||||
{
 | 
			
		||||
  $cmd_make
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
host_install()
 | 
			
		||||
{
 | 
			
		||||
  $cmd_make install
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
target_install()
 | 
			
		||||
{
 | 
			
		||||
  $cmd_cp  $cfg_dir_toolchain_sysroot/usr/share/screen $cfg_dir_rootfs/usr/share/
 | 
			
		||||
  $cmd_cp  $cfg_dir_toolchain_sysroot/usr/bin/screen-$version $cfg_dir_rootfs/usr/bin/screen
 | 
			
		||||
  $cmd_cp  etc/screenrc $cfg_dir_rootfs/etc/screenrc
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										62
									
								
								rules/screen/patches/0001-compiler-sanity-checks.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								rules/screen/patches/0001-compiler-sanity-checks.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,62 @@
 | 
			
		||||
From: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
Date: Sat, 13 Sep 2014 10:27:27 +0200
 | 
			
		||||
Subject: Removed redundant compiler sanity checks
 | 
			
		||||
 | 
			
		||||
AC_PROG_CC already performs sanity checks. And unlike the removed
 | 
			
		||||
checks, it does so in a way that supports cross compilation.
 | 
			
		||||
 | 
			
		||||
Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
[Ricardo: rebase on top of 4.3.1]
 | 
			
		||||
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
 | 
			
		||||
---
 | 
			
		||||
 configure.ac | 27 ---------------------------
 | 
			
		||||
 1 file changed, 27 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/configure.ac b/configure.ac
 | 
			
		||||
index ffe2e37..27690a6 100644
 | 
			
		||||
--- a/configure.ac
 | 
			
		||||
+++ b/configure.ac
 | 
			
		||||
@@ -48,31 +48,6 @@ AC_PROG_GCC_TRADITIONAL
 | 
			
		||||
 AC_ISC_POSIX
 | 
			
		||||
 AC_USE_SYSTEM_EXTENSIONS
 | 
			
		||||
 
 | 
			
		||||
-AC_TRY_RUN(main(){exit(0);},,[
 | 
			
		||||
-if test $CC != cc ; then
 | 
			
		||||
-AC_NOTE(Your $CC failed - restarting with CC=cc)
 | 
			
		||||
-AC_NOTE()
 | 
			
		||||
-CC=cc
 | 
			
		||||
-export CC
 | 
			
		||||
-exec $0 $configure_args
 | 
			
		||||
-fi
 | 
			
		||||
-])
 | 
			
		||||
-
 | 
			
		||||
-AC_TRY_RUN(main(){exit(0);},,
 | 
			
		||||
-exec 5>&2
 | 
			
		||||
-eval $ac_link
 | 
			
		||||
-AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;)
 | 
			
		||||
-AC_NOTE($ac_compile)
 | 
			
		||||
-AC_MSG_ERROR(Can't run the compiler - sorry))
 | 
			
		||||
-
 | 
			
		||||
-AC_TRY_RUN([
 | 
			
		||||
-main()
 | 
			
		||||
-{
 | 
			
		||||
-  int __something_strange_();
 | 
			
		||||
-  __something_strange_(0);
 | 
			
		||||
-}
 | 
			
		||||
-],AC_MSG_ERROR(Your compiler does not set the exit status - sorry))
 | 
			
		||||
-
 | 
			
		||||
 AC_PROG_AWK
 | 
			
		||||
 
 | 
			
		||||
 AC_PROG_INSTALL
 | 
			
		||||
@@ -1300,8 +1275,6 @@ fi
 | 
			
		||||
 dnl Ptx bug workaround -- insert -lc after -ltermcap
 | 
			
		||||
 test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq"
 | 
			
		||||
 
 | 
			
		||||
-AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.))
 | 
			
		||||
-
 | 
			
		||||
 ETCSCREENRC=
 | 
			
		||||
 AC_MSG_CHECKING(for the global screenrc file)
 | 
			
		||||
 AC_ARG_WITH(sys-screenrc, [  --with-sys-screenrc=path to the global screenrc file], [ ETCSCREENRC="${withval}" ])
 | 
			
		||||
-- 
 | 
			
		||||
1.8.4.5
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										124
									
								
								rules/screen/patches/0002-no-memcpy-fallback.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										124
									
								
								rules/screen/patches/0002-no-memcpy-fallback.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,124 @@
 | 
			
		||||
From: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
Date: Sat, 13 Sep 2014 11:37:59 +0200
 | 
			
		||||
Subject: Do not use memcpy as an alternative for bcopy/memmove
 | 
			
		||||
 | 
			
		||||
The configure script runs a small test program to check whether
 | 
			
		||||
memcpy can handle overlapping memory areas. However, it is not valid
 | 
			
		||||
to conclude that if a single case of overlapping memory is handled
 | 
			
		||||
correctly, all cases will be handled correctly.
 | 
			
		||||
 | 
			
		||||
Since screen already has its own bcopy implementation as a fallback
 | 
			
		||||
for the case that bcopy and memmove are unusable, removing the memcpy
 | 
			
		||||
option should not break any systems.
 | 
			
		||||
 | 
			
		||||
Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
[Ricardo: rebase on top of 4.3.1]
 | 
			
		||||
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
 | 
			
		||||
---
 | 
			
		||||
 acconfig.h   |  3 +--
 | 
			
		||||
 configure.ac | 18 +-----------------
 | 
			
		||||
 os.h         |  8 ++------
 | 
			
		||||
 osdef.h.in   | 10 +---------
 | 
			
		||||
 4 files changed, 5 insertions(+), 34 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/acconfig.h b/acconfig.h
 | 
			
		||||
index 2e46985..9b0b9d4 100644
 | 
			
		||||
--- a/acconfig.h
 | 
			
		||||
+++ b/acconfig.h
 | 
			
		||||
@@ -476,7 +476,7 @@
 | 
			
		||||
 #undef GETTTYENT
 | 
			
		||||
 
 | 
			
		||||
 /*
 | 
			
		||||
- * Define USEBCOPY if the bcopy/memcpy from your system's C library
 | 
			
		||||
+ * Define USEBCOPY if the bcopy from your system's C library
 | 
			
		||||
  * supports the overlapping of source and destination blocks.  When
 | 
			
		||||
  * undefined, screen uses its own (probably slower) version of bcopy().
 | 
			
		||||
  * 
 | 
			
		||||
@@ -487,7 +487,6 @@
 | 
			
		||||
  * Their memove fails the test in the configure script. Sigh. (Juergen)
 | 
			
		||||
  */
 | 
			
		||||
 #undef USEBCOPY
 | 
			
		||||
-#undef USEMEMCPY
 | 
			
		||||
 #undef USEMEMMOVE
 | 
			
		||||
 
 | 
			
		||||
 /*
 | 
			
		||||
diff --git a/configure.ac b/configure.ac
 | 
			
		||||
index 27690a6..b8e3bec 100644
 | 
			
		||||
--- a/configure.ac
 | 
			
		||||
+++ b/configure.ac
 | 
			
		||||
@@ -1145,7 +1145,7 @@ AC_TRY_LINK(,[getttyent();], AC_DEFINE(GETTTYENT))
 | 
			
		||||
 AC_CHECKING(fdwalk)
 | 
			
		||||
 AC_TRY_LINK([#include <stdlib.h>], [fdwalk(NULL, NULL);],AC_DEFINE(HAVE_FDWALK))
 | 
			
		||||
 
 | 
			
		||||
-AC_CHECKING(whether memcpy/memmove/bcopy handles overlapping arguments)
 | 
			
		||||
+AC_CHECKING(whether memmove/bcopy handles overlapping arguments)
 | 
			
		||||
 AC_TRY_RUN([
 | 
			
		||||
 main() {
 | 
			
		||||
   char buf[10];
 | 
			
		||||
@@ -1175,22 +1175,6 @@ main() {
 | 
			
		||||
   exit(0); /* libc version works properly.  */
 | 
			
		||||
 }], AC_DEFINE(USEMEMMOVE))
 | 
			
		||||
 
 | 
			
		||||
-
 | 
			
		||||
-AC_TRY_RUN([
 | 
			
		||||
-#define bcopy(s,d,l) memcpy(d,s,l)
 | 
			
		||||
-main() {
 | 
			
		||||
-  char buf[10];
 | 
			
		||||
-  strcpy(buf, "abcdefghi");
 | 
			
		||||
-  bcopy(buf, buf + 2, 3);
 | 
			
		||||
-  if (strncmp(buf, "ababcf", 6))
 | 
			
		||||
-    exit(1);
 | 
			
		||||
-  strcpy(buf, "abcdefghi");
 | 
			
		||||
-  bcopy(buf + 2, buf, 3);
 | 
			
		||||
-  if (strncmp(buf, "cdedef", 6))
 | 
			
		||||
-    exit(1);
 | 
			
		||||
-  exit(0); /* libc version works properly.  */
 | 
			
		||||
-}], AC_DEFINE(USEMEMCPY))
 | 
			
		||||
-
 | 
			
		||||
 AC_SYS_LONG_FILE_NAMES
 | 
			
		||||
 
 | 
			
		||||
 AC_MSG_CHECKING(for vsprintf)
 | 
			
		||||
diff --git a/os.h b/os.h
 | 
			
		||||
index e827ac9..0b41fb9 100644
 | 
			
		||||
--- a/os.h
 | 
			
		||||
+++ b/os.h
 | 
			
		||||
@@ -142,12 +142,8 @@ extern int errno;
 | 
			
		||||
 # ifdef USEMEMMOVE
 | 
			
		||||
 #  define bcopy(s,d,len) memmove(d,s,len)
 | 
			
		||||
 # else
 | 
			
		||||
-#  ifdef USEMEMCPY
 | 
			
		||||
-#   define bcopy(s,d,len) memcpy(d,s,len)
 | 
			
		||||
-#  else
 | 
			
		||||
-#   define NEED_OWN_BCOPY
 | 
			
		||||
-#   define bcopy xbcopy
 | 
			
		||||
-#  endif
 | 
			
		||||
+#  define NEED_OWN_BCOPY
 | 
			
		||||
+#  define bcopy xbcopy
 | 
			
		||||
 # endif
 | 
			
		||||
 #endif
 | 
			
		||||
 
 | 
			
		||||
diff --git a/osdef.h.in b/osdef.h.in
 | 
			
		||||
index 8687b60..e4057a0 100644
 | 
			
		||||
--- a/osdef.h.in
 | 
			
		||||
+++ b/osdef.h.in
 | 
			
		||||
@@ -58,16 +58,8 @@ extern int   bcmp __P((char *, char *, int));
 | 
			
		||||
 extern int   killpg __P((int, int));
 | 
			
		||||
 #endif
 | 
			
		||||
 
 | 
			
		||||
-#ifndef USEBCOPY
 | 
			
		||||
-# ifdef USEMEMCPY
 | 
			
		||||
-extern void  memcpy __P((char *, char *, int));
 | 
			
		||||
-# else
 | 
			
		||||
-#  ifdef USEMEMMOVE
 | 
			
		||||
+#if defined(USEMEMMOVE) && !defined(USEBCOPY)
 | 
			
		||||
 extern void  memmove __P((char *, char *, int));
 | 
			
		||||
-#  else
 | 
			
		||||
-extern void  bcopy __P((char *, char *, int));
 | 
			
		||||
-#  endif
 | 
			
		||||
-# endif
 | 
			
		||||
 #else
 | 
			
		||||
 extern void  bcopy __P((char *, char *, int));
 | 
			
		||||
 #endif
 | 
			
		||||
-- 
 | 
			
		||||
1.8.4.5
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										125
									
								
								rules/screen/patches/0003-cross-compilation-AC_TRY_RUN.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										125
									
								
								rules/screen/patches/0003-cross-compilation-AC_TRY_RUN.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,125 @@
 | 
			
		||||
From: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
Date: Sat, 13 Sep 2014 12:04:41 +0200
 | 
			
		||||
Subject: Provide cross compilation alternatives for all AC_TRY_RUN uses
 | 
			
		||||
 | 
			
		||||
Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
[Ricardo: rebase on top of 4.3.1]
 | 
			
		||||
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
 | 
			
		||||
---
 | 
			
		||||
 configure.ac | 30 +++++++++++++++++++-----------
 | 
			
		||||
 1 file changed, 19 insertions(+), 11 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/configure.ac b/configure.ac
 | 
			
		||||
index b8e3bec..c4b7cd4 100644
 | 
			
		||||
--- a/configure.ac
 | 
			
		||||
+++ b/configure.ac
 | 
			
		||||
@@ -348,7 +348,8 @@ main()
 | 
			
		||||
   exit(0);
 | 
			
		||||
 }
 | 
			
		||||
 ], AC_NOTE(- your fifos are usable) fifo=1,
 | 
			
		||||
-AC_NOTE(- your fifos are not usable))
 | 
			
		||||
+AC_NOTE(- your fifos are not usable),
 | 
			
		||||
+AC_NOTE(- skipping check because we are cross compiling; assuming fifos are usable) fifo=1)
 | 
			
		||||
 rm -f /tmp/conftest*
 | 
			
		||||
 
 | 
			
		||||
 if test -n "$fifo"; then
 | 
			
		||||
@@ -396,7 +397,8 @@ main()
 | 
			
		||||
   exit(0);
 | 
			
		||||
 }
 | 
			
		||||
 ], AC_NOTE(- your implementation is ok), 
 | 
			
		||||
-AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1)
 | 
			
		||||
+AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1,
 | 
			
		||||
+AC_NOTE(- skipping check because we are cross compiling; assuming fifo implementation is ok))
 | 
			
		||||
 rm -f /tmp/conftest*
 | 
			
		||||
 fi
 | 
			
		||||
 
 | 
			
		||||
@@ -458,7 +460,8 @@ main()
 | 
			
		||||
   exit(0);
 | 
			
		||||
 }
 | 
			
		||||
 ], AC_NOTE(- your sockets are usable) sock=1,
 | 
			
		||||
-AC_NOTE(- your sockets are not usable))
 | 
			
		||||
+AC_NOTE(- your sockets are not usable),
 | 
			
		||||
+AC_NOTE(- skipping check because we are cross compiling; assuming sockets are usable) sock=1)
 | 
			
		||||
 rm -f /tmp/conftest*
 | 
			
		||||
 
 | 
			
		||||
 if test -n "$sock"; then
 | 
			
		||||
@@ -497,7 +500,8 @@ main()
 | 
			
		||||
 }
 | 
			
		||||
 ],AC_NOTE(- you are normal),
 | 
			
		||||
 AC_NOTE(- unix domain sockets are not kept in the filesystem)
 | 
			
		||||
-AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1)
 | 
			
		||||
+AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1,
 | 
			
		||||
+AC_NOTE(- skipping check because we are cross compiling; assuming sockets are normal))
 | 
			
		||||
 rm -f /tmp/conftest*
 | 
			
		||||
 fi
 | 
			
		||||
 
 | 
			
		||||
@@ -624,7 +628,8 @@ main()
 | 
			
		||||
   exit(0);
 | 
			
		||||
 }
 | 
			
		||||
 ],AC_NOTE(- select is ok),
 | 
			
		||||
-AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN))
 | 
			
		||||
+AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN),
 | 
			
		||||
+AC_NOTE(- skipping check because we are cross compiling; assuming select is ok))
 | 
			
		||||
 
 | 
			
		||||
 dnl
 | 
			
		||||
 dnl    ****  termcap or terminfo  ****
 | 
			
		||||
@@ -666,7 +671,8 @@ main()
 | 
			
		||||
 {
 | 
			
		||||
  exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
 | 
			
		||||
 }], AC_NOTE(- you use the termcap database),
 | 
			
		||||
-AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO))
 | 
			
		||||
+AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO),
 | 
			
		||||
+AC_NOTE(- skipping check because we are cross compiling; assuming terminfo database is used) AC_DEFINE(TERMINFO))
 | 
			
		||||
 AC_CHECKING(ospeed)
 | 
			
		||||
 AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
 | 
			
		||||
 
 | 
			
		||||
@@ -801,7 +807,8 @@ main()
 | 
			
		||||
     else
 | 
			
		||||
       AC_NOTE(- can't determine - assume ptys are world accessable)
 | 
			
		||||
     fi
 | 
			
		||||
-  ]
 | 
			
		||||
+  ],
 | 
			
		||||
+  AC_NOTE(- skipping check because we are cross compiling; assuming ptys are world accessable)
 | 
			
		||||
 )
 | 
			
		||||
 rm -f conftest_grp
 | 
			
		||||
 fi
 | 
			
		||||
@@ -885,7 +892,7 @@ AC_EGREP_CPP(yes,
 | 
			
		||||
 #endif
 | 
			
		||||
 ], load=1)
 | 
			
		||||
 fi
 | 
			
		||||
-if test -z "$load" ; then
 | 
			
		||||
+if test -z "$load" && test "$cross_compiling" = no ; then
 | 
			
		||||
 AC_CHECKING(for kernelfile)
 | 
			
		||||
 for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do
 | 
			
		||||
   if test -f $core || test -c $core; then
 | 
			
		||||
@@ -1078,7 +1085,7 @@ main()
 | 
			
		||||
 #endif
 | 
			
		||||
   exit(0);
 | 
			
		||||
 }
 | 
			
		||||
-],,AC_DEFINE(SYSVSIGS))
 | 
			
		||||
+],,AC_DEFINE(SYSVSIGS),:)
 | 
			
		||||
 
 | 
			
		||||
 fi
 | 
			
		||||
 
 | 
			
		||||
@@ -1158,7 +1165,7 @@ main() {
 | 
			
		||||
   if (strncmp(buf, "cdedef", 6))
 | 
			
		||||
     exit(1);
 | 
			
		||||
   exit(0); /* libc version works properly.  */
 | 
			
		||||
-}], AC_DEFINE(USEBCOPY))
 | 
			
		||||
+}], AC_DEFINE(USEBCOPY),,:)
 | 
			
		||||
 
 | 
			
		||||
 AC_TRY_RUN([
 | 
			
		||||
 #define bcopy(s,d,l) memmove(d,s,l)
 | 
			
		||||
@@ -1173,7 +1180,8 @@ main() {
 | 
			
		||||
   if (strncmp(buf, "cdedef", 6))
 | 
			
		||||
     exit(1);
 | 
			
		||||
   exit(0); /* libc version works properly.  */
 | 
			
		||||
-}], AC_DEFINE(USEMEMMOVE))
 | 
			
		||||
+}], AC_DEFINE(USEMEMMOVE),,
 | 
			
		||||
+  AC_NOTE(- skipping check because we are cross compiling; use memmove) AC_DEFINE(USEMEMMOVE))
 | 
			
		||||
 
 | 
			
		||||
 AC_SYS_LONG_FILE_NAMES
 | 
			
		||||
 
 | 
			
		||||
-- 
 | 
			
		||||
1.8.4.5
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										132
									
								
								rules/screen/patches/0004-cross-compilation-ignore-host-fs.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										132
									
								
								rules/screen/patches/0004-cross-compilation-ignore-host-fs.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,132 @@
 | 
			
		||||
From: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
Date: Sun, 14 Sep 2014 07:10:59 +0200
 | 
			
		||||
Subject: When cross-compiling, skip checks that look in the host file system
 | 
			
		||||
 | 
			
		||||
Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
[Ricardo: rebase on top of 4.3.1]
 | 
			
		||||
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
 | 
			
		||||
---
 | 
			
		||||
 configure.ac | 23 +++++++++++++++++++----
 | 
			
		||||
 1 file changed, 19 insertions(+), 4 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/configure.ac b/configure.ac
 | 
			
		||||
index c4b7cd4..9cf7cee 100644
 | 
			
		||||
--- a/configure.ac
 | 
			
		||||
+++ b/configure.ac
 | 
			
		||||
@@ -85,7 +85,7 @@ AC_ARG_ENABLE(socket-dir,
 | 
			
		||||
 dnl
 | 
			
		||||
 dnl    ****  special unix variants  ****
 | 
			
		||||
 dnl
 | 
			
		||||
-if test -n "$ISC"; then
 | 
			
		||||
+if test "$cross_compiling" = no && test -n "$ISC" ; then
 | 
			
		||||
   AC_DEFINE(ISC) LIBS="$LIBS -linet"
 | 
			
		||||
 fi
 | 
			
		||||
 
 | 
			
		||||
@@ -96,10 +96,11 @@ dnl AC_DEFINE(OSF1)	# this disables MIPS again....
 | 
			
		||||
 dnl fi
 | 
			
		||||
 dnl fi
 | 
			
		||||
 
 | 
			
		||||
-if test -f /sysV68 ; then
 | 
			
		||||
+if test "$cross_compiling" = no && test -f /sysV68 ; then
 | 
			
		||||
 AC_DEFINE(sysV68)
 | 
			
		||||
 fi
 | 
			
		||||
 
 | 
			
		||||
+if test "$cross_compiling" = no ; then
 | 
			
		||||
 AC_CHECKING(for MIPS)
 | 
			
		||||
 if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then
 | 
			
		||||
 oldlibs="$LIBS"
 | 
			
		||||
@@ -123,6 +124,7 @@ AC_DEFINE(USE_WAIT2) LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd"
 | 
			
		||||
 ))
 | 
			
		||||
 fi
 | 
			
		||||
 fi
 | 
			
		||||
+fi
 | 
			
		||||
 
 | 
			
		||||
 
 | 
			
		||||
 AC_CHECKING(for Ultrix)
 | 
			
		||||
@@ -132,7 +134,7 @@ AC_EGREP_CPP(yes,
 | 
			
		||||
 #endif
 | 
			
		||||
 ], ULTRIX=1)
 | 
			
		||||
 
 | 
			
		||||
-if test -f /usr/lib/libpyr.a ; then
 | 
			
		||||
+if test "$cross_compiling" = no && test -f /usr/lib/libpyr.a ; then
 | 
			
		||||
 oldlibs="$LIBS"
 | 
			
		||||
 LIBS="$LIBS -lpyr"
 | 
			
		||||
 AC_CHECKING(Pyramid OSX)
 | 
			
		||||
@@ -679,17 +681,21 @@ AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
 | 
			
		||||
 dnl
 | 
			
		||||
 dnl    ****  PTY specific things  ****
 | 
			
		||||
 dnl
 | 
			
		||||
+if test "$cross_compiling" = no ; then
 | 
			
		||||
 AC_CHECKING(for /dev/ptc)
 | 
			
		||||
 if test -r /dev/ptc; then
 | 
			
		||||
 AC_DEFINE(HAVE_DEV_PTC)
 | 
			
		||||
 fi
 | 
			
		||||
+fi
 | 
			
		||||
 
 | 
			
		||||
+if test "$cross_compiling" = no ; then
 | 
			
		||||
 AC_CHECKING(for SVR4 ptys)
 | 
			
		||||
 sysvr4ptys=
 | 
			
		||||
 if test -c /dev/ptmx ; then
 | 
			
		||||
 AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS)
 | 
			
		||||
 sysvr4ptys=1])
 | 
			
		||||
 fi
 | 
			
		||||
+fi
 | 
			
		||||
 
 | 
			
		||||
 AC_CHECK_FUNCS(getpt)
 | 
			
		||||
 
 | 
			
		||||
@@ -699,6 +705,7 @@ AC_CHECK_FUNCS(openpty,,
 | 
			
		||||
 [AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])])
 | 
			
		||||
 fi
 | 
			
		||||
 
 | 
			
		||||
+if test "$cross_compiling" = no ; then
 | 
			
		||||
 AC_CHECKING(for ptyranges)
 | 
			
		||||
 if test -d /dev/ptym ; then
 | 
			
		||||
 pdir='/dev/ptym'
 | 
			
		||||
@@ -722,6 +729,7 @@ p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g'  | sort -u | tr -d '\
 | 
			
		||||
 AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0")
 | 
			
		||||
 AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1")
 | 
			
		||||
 fi
 | 
			
		||||
+fi
 | 
			
		||||
 
 | 
			
		||||
 dnl    ****  pty mode/group handling ****
 | 
			
		||||
 dnl
 | 
			
		||||
@@ -869,14 +877,16 @@ fi
 | 
			
		||||
 dnl
 | 
			
		||||
 dnl    ****  loadav  ****
 | 
			
		||||
 dnl
 | 
			
		||||
+if test "$cross_compiling" = no ; then
 | 
			
		||||
 AC_CHECKING(for libutil(s))
 | 
			
		||||
 test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils"
 | 
			
		||||
 test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil"
 | 
			
		||||
+fi
 | 
			
		||||
 
 | 
			
		||||
 AC_CHECKING(getloadavg)
 | 
			
		||||
 AC_TRY_LINK(,[getloadavg((double *)0, 0);],
 | 
			
		||||
 AC_DEFINE(LOADAV_GETLOADAVG) load=1,
 | 
			
		||||
-if test -f /usr/lib/libkvm.a ; then
 | 
			
		||||
+if test "$cross_compiling" = no && test -f /usr/lib/libkvm.a ; then
 | 
			
		||||
 olibs="$LIBS"
 | 
			
		||||
 LIBS="$LIBS -lkvm"
 | 
			
		||||
 AC_CHECKING(getloadavg with -lkvm)
 | 
			
		||||
@@ -1094,13 +1104,18 @@ dnl    ****  libraries  ****
 | 
			
		||||
 dnl
 | 
			
		||||
 
 | 
			
		||||
 AC_CHECKING(for crypt and sec libraries)
 | 
			
		||||
+if test "$cross_compiling" = no ; then
 | 
			
		||||
 test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d"
 | 
			
		||||
+fi
 | 
			
		||||
 oldlibs="$LIBS"
 | 
			
		||||
 LIBS="$LIBS -lcrypt"
 | 
			
		||||
 AC_CHECKING(crypt)
 | 
			
		||||
 AC_TRY_LINK(,,,LIBS="$oldlibs")
 | 
			
		||||
+if test "$cross_compiling" = no ; then
 | 
			
		||||
 test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec"
 | 
			
		||||
 test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow"
 | 
			
		||||
+fi
 | 
			
		||||
+
 | 
			
		||||
 oldlibs="$LIBS"
 | 
			
		||||
 LIBS="$LIBS -lsun"
 | 
			
		||||
 AC_CHECKING(IRIX sun library)
 | 
			
		||||
-- 
 | 
			
		||||
1.8.4.5
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										54
									
								
								rules/screen/patches/0005-avoid-identifying-as-SVR4.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								rules/screen/patches/0005-avoid-identifying-as-SVR4.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,54 @@
 | 
			
		||||
From: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
Date: Sun, 14 Sep 2014 11:16:58 +0200
 | 
			
		||||
Subject: Avoid mis-identifying systems as SVR4
 | 
			
		||||
 | 
			
		||||
My openSUSE 13.1 Linux system was detected as SVR4 because it had
 | 
			
		||||
libelf installed. This leads to linking with libelf, even though no
 | 
			
		||||
symbols from that library were actually used, and to a workaround for
 | 
			
		||||
a buggy getlogin() being enabled.
 | 
			
		||||
 | 
			
		||||
It is not documented which exact SVR4 system had the bug that the
 | 
			
		||||
workaround was added for, so all I could do is make an educated guess
 | 
			
		||||
at the #defines its compiler would be likely to set.
 | 
			
		||||
 | 
			
		||||
Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
[Ricardo: rebase on top of 4.3.1]
 | 
			
		||||
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
 | 
			
		||||
---
 | 
			
		||||
 configure.ac | 14 ++++++++++++--
 | 
			
		||||
 1 file changed, 12 insertions(+), 2 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/configure.ac b/configure.ac
 | 
			
		||||
index 9cf7cee..e09e4cf 100644
 | 
			
		||||
--- a/configure.ac
 | 
			
		||||
+++ b/configure.ac
 | 
			
		||||
@@ -179,14 +179,24 @@ AC_EGREP_CPP(yes,
 | 
			
		||||
 #endif
 | 
			
		||||
 ], LIBS="$LIBS -lsocket -linet";seqptx=1)
 | 
			
		||||
 
 | 
			
		||||
+AC_CHECKING(SVR4)
 | 
			
		||||
+AC_EGREP_CPP(yes,
 | 
			
		||||
+[main () {
 | 
			
		||||
+#if defined(SVR4) || defined(__SVR4)
 | 
			
		||||
+  yes;
 | 
			
		||||
+#endif
 | 
			
		||||
+], AC_NOTE(- you have a SVR4 system) AC_DEFINE(SVR4) svr4=1)
 | 
			
		||||
+if test -n "$svr4" ; then
 | 
			
		||||
 oldlibs="$LIBS"
 | 
			
		||||
 LIBS="$LIBS -lelf"
 | 
			
		||||
 AC_CHECKING(SVR4)
 | 
			
		||||
 AC_TRY_LINK([#include <utmpx.h>
 | 
			
		||||
 ],,
 | 
			
		||||
-[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN),
 | 
			
		||||
-[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])]
 | 
			
		||||
+[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(BUGGYGETLOGIN),
 | 
			
		||||
+[AC_CHECK_HEADER(elf.h, AC_DEFINE(BUGGYGETLOGIN))])]
 | 
			
		||||
 ,LIBS="$oldlibs")
 | 
			
		||||
+fi
 | 
			
		||||
+
 | 
			
		||||
 AC_CHECK_HEADERS([stropts.h string.h strings.h])
 | 
			
		||||
 
 | 
			
		||||
 AC_CHECKING(for Solaris 2.x)
 | 
			
		||||
-- 
 | 
			
		||||
1.8.4.5
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										39
									
								
								rules/screen/patches/0006-install-no-backup-binary.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								rules/screen/patches/0006-install-no-backup-binary.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,39 @@
 | 
			
		||||
From: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
Date: Sun, 14 Sep 2014 23:58:34 +0200
 | 
			
		||||
Subject: Do not create backup of old installed binary
 | 
			
		||||
 | 
			
		||||
This is a rather unusual feature that packagers will not expect.
 | 
			
		||||
 | 
			
		||||
Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
---
 | 
			
		||||
 Makefile.in | 4 ----
 | 
			
		||||
 1 file changed, 4 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/Makefile.in b/Makefile.in
 | 
			
		||||
index 187a69b..65549e9 100644
 | 
			
		||||
--- a/Makefile.in
 | 
			
		||||
+++ b/Makefile.in
 | 
			
		||||
@@ -83,12 +83,9 @@ screen: $(OFILES)
 | 
			
		||||
 	    $(OPTIONS) $(CFLAGS) $<
 | 
			
		||||
 
 | 
			
		||||
 install_bin: .version screen
 | 
			
		||||
-	-if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \
 | 
			
		||||
-		then mv $(DESTDIR)$(bindir)/$(SCREEN) $(DESTDIR)$(bindir)/$(SCREEN).old; fi
 | 
			
		||||
 	$(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN)
 | 
			
		||||
 	-chown root $(DESTDIR)$(bindir)/$(SCREEN) && chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN)
 | 
			
		||||
 # This doesn't work if $(bindir)/screen is a symlink
 | 
			
		||||
-	-if [ -f $(DESTDIR)$(bindir)/screen ] && [ ! -f $(DESTDIR)$(bindir)/screen.old ]; then mv $(DESTDIR)$(bindir)/screen $(DESTDIR)$(bindir)/screen.old; fi
 | 
			
		||||
 	rm -f $(DESTDIR)$(bindir)/screen
 | 
			
		||||
 	(cd $(DESTDIR)$(bindir) && ln -f -s $(SCREEN) screen)
 | 
			
		||||
 	cp $(srcdir)/utf8encodings/?? $(DESTDIR)$(SCREENENCODINGS)
 | 
			
		||||
@@ -113,7 +110,6 @@ installdirs:
 | 
			
		||||
 uninstall: .version
 | 
			
		||||
 	rm -f $(DESTDIR)$(bindir)/$(SCREEN)
 | 
			
		||||
 	rm -f $(DESTDIR)$(bindir)/screen
 | 
			
		||||
-	-mv $(DESTDIR)$(bindir)/screen.old $(DESTDIR)$(bindir)/screen
 | 
			
		||||
 	rm -f $(DESTDIR)$(ETCSCREENRC)
 | 
			
		||||
 	cd doc; $(MAKE) uninstall
 | 
			
		||||
 
 | 
			
		||||
-- 
 | 
			
		||||
1.8.4.5
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										29
									
								
								rules/screen/patches/0007-install-always-chmod.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								rules/screen/patches/0007-install-always-chmod.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
From: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
Date: Mon, 15 Sep 2014 00:03:05 +0200
 | 
			
		||||
Subject: Change binary permission flags even if chown fails
 | 
			
		||||
 | 
			
		||||
Typically when creating a package, the build is not run as root, so
 | 
			
		||||
the chown will fail. But the chmod can still be done.
 | 
			
		||||
 | 
			
		||||
Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
---
 | 
			
		||||
 Makefile.in | 3 ++-
 | 
			
		||||
 1 file changed, 2 insertions(+), 1 deletion(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/Makefile.in b/Makefile.in
 | 
			
		||||
index 65549e9..3c12fdb 100644
 | 
			
		||||
--- a/Makefile.in
 | 
			
		||||
+++ b/Makefile.in
 | 
			
		||||
@@ -84,7 +84,8 @@ screen: $(OFILES)
 | 
			
		||||
 
 | 
			
		||||
 install_bin: .version screen
 | 
			
		||||
 	$(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN)
 | 
			
		||||
-	-chown root $(DESTDIR)$(bindir)/$(SCREEN) && chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN)
 | 
			
		||||
+	-chown root $(DESTDIR)$(bindir)/$(SCREEN)
 | 
			
		||||
+	-chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN)
 | 
			
		||||
 # This doesn't work if $(bindir)/screen is a symlink
 | 
			
		||||
 	rm -f $(DESTDIR)$(bindir)/screen
 | 
			
		||||
 	(cd $(DESTDIR)$(bindir) && ln -f -s $(SCREEN) screen)
 | 
			
		||||
-- 
 | 
			
		||||
1.8.4.5
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										31
									
								
								rules/screen/patches/0008-install-nonversioned-binary.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								rules/screen/patches/0008-install-nonversioned-binary.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,31 @@
 | 
			
		||||
From: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
Date: Mon, 15 Sep 2014 00:06:20 +0200
 | 
			
		||||
Subject: Support overriding SCREEN to get a non-versioned binary
 | 
			
		||||
 | 
			
		||||
If a packager runs "make install SCREEN=screen", do not create
 | 
			
		||||
"screen" as a symlink to itself.
 | 
			
		||||
 | 
			
		||||
Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
---
 | 
			
		||||
 Makefile.in | 2 ++
 | 
			
		||||
 1 file changed, 2 insertions(+)
 | 
			
		||||
 | 
			
		||||
diff --git a/Makefile.in b/Makefile.in
 | 
			
		||||
index 3c12fdb..860f351 100644
 | 
			
		||||
--- a/Makefile.in
 | 
			
		||||
+++ b/Makefile.in
 | 
			
		||||
@@ -86,9 +86,11 @@ install_bin: .version screen
 | 
			
		||||
 	$(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN)
 | 
			
		||||
 	-chown root $(DESTDIR)$(bindir)/$(SCREEN)
 | 
			
		||||
 	-chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN)
 | 
			
		||||
+ifneq (${SCREEN},screen)
 | 
			
		||||
 # This doesn't work if $(bindir)/screen is a symlink
 | 
			
		||||
 	rm -f $(DESTDIR)$(bindir)/screen
 | 
			
		||||
 	(cd $(DESTDIR)$(bindir) && ln -f -s $(SCREEN) screen)
 | 
			
		||||
+endif
 | 
			
		||||
 	cp $(srcdir)/utf8encodings/?? $(DESTDIR)$(SCREENENCODINGS)
 | 
			
		||||
 
 | 
			
		||||
 ###############################################################################
 | 
			
		||||
-- 
 | 
			
		||||
1.8.4.5
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										43
									
								
								rules/screen/patches/0009-install-dir-dependency.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								rules/screen/patches/0009-install-dir-dependency.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,43 @@
 | 
			
		||||
From: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
Date: Mon, 15 Sep 2014 02:27:09 +0200
 | 
			
		||||
Subject: Ensure that installation dirs exist before copying files into them
 | 
			
		||||
 | 
			
		||||
Since the "install_bin" target requires the installation directories
 | 
			
		||||
to exist, it should depend on the "installdirs" target. The previous
 | 
			
		||||
approach of having "install" depend on "installdirs" is not reliable.
 | 
			
		||||
 | 
			
		||||
For example, in a parallel build, there was no guarantee that
 | 
			
		||||
"installdirs" would be finished before "install_bin" runs. Also if
 | 
			
		||||
the user requested only "install_bin" to be made, "installdirs" would
 | 
			
		||||
be skipped altogether.
 | 
			
		||||
 | 
			
		||||
Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
---
 | 
			
		||||
 Makefile.in | 4 ++--
 | 
			
		||||
 1 file changed, 2 insertions(+), 2 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/Makefile.in b/Makefile.in
 | 
			
		||||
index 860f351..f0fe08d 100644
 | 
			
		||||
--- a/Makefile.in
 | 
			
		||||
+++ b/Makefile.in
 | 
			
		||||
@@ -82,7 +82,7 @@ screen: $(OFILES)
 | 
			
		||||
 	$(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(CPPFLAGS) $(DEFS) \
 | 
			
		||||
 	    $(OPTIONS) $(CFLAGS) $<
 | 
			
		||||
 
 | 
			
		||||
-install_bin: .version screen
 | 
			
		||||
+install_bin: .version screen installdirs
 | 
			
		||||
 	$(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN)
 | 
			
		||||
 	-chown root $(DESTDIR)$(bindir)/$(SCREEN)
 | 
			
		||||
 	-chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN)
 | 
			
		||||
@@ -94,7 +94,7 @@ endif
 | 
			
		||||
 	cp $(srcdir)/utf8encodings/?? $(DESTDIR)$(SCREENENCODINGS)
 | 
			
		||||
 
 | 
			
		||||
 ###############################################################################
 | 
			
		||||
-install: installdirs install_bin
 | 
			
		||||
+install: install_bin
 | 
			
		||||
 	cd doc ; $(MAKE) install
 | 
			
		||||
 	-if [ -d /usr/lib/terminfo ]; then \
 | 
			
		||||
 		PATH="$$PATH:/usr/5bin" tic ${srcdir}/terminfo/screeninfo.src; \
 | 
			
		||||
-- 
 | 
			
		||||
1.8.4.5
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										142
									
								
								rules/screen/patches/0010-rename-sched_h.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										142
									
								
								rules/screen/patches/0010-rename-sched_h.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,142 @@
 | 
			
		||||
From: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
Date: Mon, 15 Sep 2014 00:24:41 +0200
 | 
			
		||||
Subject: Renamed sched.h to eventqueue.h
 | 
			
		||||
 | 
			
		||||
There is a <sched.h> system header that got shadowed by "sched.h".
 | 
			
		||||
While Screen itself doesn't include <sched.h>, other system headers
 | 
			
		||||
might include it indirectly. This broke the build when using uClibc
 | 
			
		||||
with pthread support.
 | 
			
		||||
 | 
			
		||||
Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
 | 
			
		||||
---
 | 
			
		||||
 eventqueue.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 | 
			
		||||
 sched.h      | 48 ------------------------------------------------
 | 
			
		||||
 screen.h     |  2 +-
 | 
			
		||||
 3 files changed, 49 insertions(+), 49 deletions(-)
 | 
			
		||||
 create mode 100644 eventqueue.h
 | 
			
		||||
 delete mode 100644 sched.h
 | 
			
		||||
 | 
			
		||||
diff --git a/eventqueue.h b/eventqueue.h
 | 
			
		||||
new file mode 100644
 | 
			
		||||
index 0000000..fdc3fc4
 | 
			
		||||
--- /dev/null
 | 
			
		||||
+++ b/eventqueue.h
 | 
			
		||||
@@ -0,0 +1,48 @@
 | 
			
		||||
+/* Copyright (c) 2008, 2009
 | 
			
		||||
+ *      Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
 | 
			
		||||
+ *      Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
 | 
			
		||||
+ *      Micah Cowan (micah@cowan.name)
 | 
			
		||||
+ *      Sadrul Habib Chowdhury (sadrul@users.sourceforge.net)
 | 
			
		||||
+ * Copyright (c) 1993-2002, 2003, 2005, 2006, 2007
 | 
			
		||||
+ *      Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
 | 
			
		||||
+ *      Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
 | 
			
		||||
+ * Copyright (c) 1987 Oliver Laumann
 | 
			
		||||
+ *
 | 
			
		||||
+ * This program is free software; you can redistribute it and/or modify
 | 
			
		||||
+ * it under the terms of the GNU General Public License as published by
 | 
			
		||||
+ * the Free Software Foundation; either version 3, or (at your option)
 | 
			
		||||
+ * any later version.
 | 
			
		||||
+ *
 | 
			
		||||
+ * This program is distributed in the hope that it will be useful,
 | 
			
		||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
+ * GNU General Public License for more details.
 | 
			
		||||
+ *
 | 
			
		||||
+ * You should have received a copy of the GNU General Public License
 | 
			
		||||
+ * along with this program (see the file COPYING); if not, see
 | 
			
		||||
+ * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc.,
 | 
			
		||||
+ * 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
 | 
			
		||||
+ *
 | 
			
		||||
+ ****************************************************************
 | 
			
		||||
+ * $Id$ GNU
 | 
			
		||||
+ */
 | 
			
		||||
+
 | 
			
		||||
+struct event
 | 
			
		||||
+{
 | 
			
		||||
+  struct event *next;
 | 
			
		||||
+  void (*handler) __P((struct event *, char *));
 | 
			
		||||
+  char *data;
 | 
			
		||||
+  int fd;
 | 
			
		||||
+  int type;
 | 
			
		||||
+  int pri;
 | 
			
		||||
+  struct timeval timeout;
 | 
			
		||||
+  int queued;		/* in evs queue */
 | 
			
		||||
+  int active;		/* in fdset */
 | 
			
		||||
+  int *condpos;		/* only active if condpos - condneg > 0 */
 | 
			
		||||
+  int *condneg;
 | 
			
		||||
+};
 | 
			
		||||
+
 | 
			
		||||
+#define EV_TIMEOUT	0
 | 
			
		||||
+#define EV_READ		1
 | 
			
		||||
+#define EV_WRITE	2
 | 
			
		||||
+#define EV_ALWAYS	3
 | 
			
		||||
diff --git a/sched.h b/sched.h
 | 
			
		||||
deleted file mode 100644
 | 
			
		||||
index fdc3fc4..0000000
 | 
			
		||||
--- a/sched.h
 | 
			
		||||
+++ /dev/null
 | 
			
		||||
@@ -1,48 +0,0 @@
 | 
			
		||||
-/* Copyright (c) 2008, 2009
 | 
			
		||||
- *      Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
 | 
			
		||||
- *      Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
 | 
			
		||||
- *      Micah Cowan (micah@cowan.name)
 | 
			
		||||
- *      Sadrul Habib Chowdhury (sadrul@users.sourceforge.net)
 | 
			
		||||
- * Copyright (c) 1993-2002, 2003, 2005, 2006, 2007
 | 
			
		||||
- *      Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
 | 
			
		||||
- *      Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
 | 
			
		||||
- * Copyright (c) 1987 Oliver Laumann
 | 
			
		||||
- *
 | 
			
		||||
- * This program is free software; you can redistribute it and/or modify
 | 
			
		||||
- * it under the terms of the GNU General Public License as published by
 | 
			
		||||
- * the Free Software Foundation; either version 3, or (at your option)
 | 
			
		||||
- * any later version.
 | 
			
		||||
- *
 | 
			
		||||
- * This program is distributed in the hope that it will be useful,
 | 
			
		||||
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
- * GNU General Public License for more details.
 | 
			
		||||
- *
 | 
			
		||||
- * You should have received a copy of the GNU General Public License
 | 
			
		||||
- * along with this program (see the file COPYING); if not, see
 | 
			
		||||
- * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc.,
 | 
			
		||||
- * 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
 | 
			
		||||
- *
 | 
			
		||||
- ****************************************************************
 | 
			
		||||
- * $Id$ GNU
 | 
			
		||||
- */
 | 
			
		||||
-
 | 
			
		||||
-struct event
 | 
			
		||||
-{
 | 
			
		||||
-  struct event *next;
 | 
			
		||||
-  void (*handler) __P((struct event *, char *));
 | 
			
		||||
-  char *data;
 | 
			
		||||
-  int fd;
 | 
			
		||||
-  int type;
 | 
			
		||||
-  int pri;
 | 
			
		||||
-  struct timeval timeout;
 | 
			
		||||
-  int queued;		/* in evs queue */
 | 
			
		||||
-  int active;		/* in fdset */
 | 
			
		||||
-  int *condpos;		/* only active if condpos - condneg > 0 */
 | 
			
		||||
-  int *condneg;
 | 
			
		||||
-};
 | 
			
		||||
-
 | 
			
		||||
-#define EV_TIMEOUT	0
 | 
			
		||||
-#define EV_READ		1
 | 
			
		||||
-#define EV_WRITE	2
 | 
			
		||||
-#define EV_ALWAYS	3
 | 
			
		||||
diff --git a/screen.h b/screen.h
 | 
			
		||||
index 603ca3f..34238c8 100644
 | 
			
		||||
--- a/screen.h
 | 
			
		||||
+++ b/screen.h
 | 
			
		||||
@@ -43,7 +43,7 @@
 | 
			
		||||
 #include "osdef.h"
 | 
			
		||||
 
 | 
			
		||||
 #include "ansi.h"
 | 
			
		||||
-#include "sched.h"
 | 
			
		||||
+#include "eventqueue.h"
 | 
			
		||||
 #include "acls.h"
 | 
			
		||||
 #include "comm.h"
 | 
			
		||||
 #include "layer.h"
 | 
			
		||||
-- 
 | 
			
		||||
1.8.4.5
 | 
			
		||||
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
    '2014.07'
 | 
			
		||||
    '2017.05'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
@@ -10,7 +10,7 @@ url=\
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
    '36d4bad687edcafa396fee607e505d4e'
 | 
			
		||||
    '1b9ab3707ded74bbde9405987f816969'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
post_unpack()
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										45
									
								
								rules/uv4l/default.bash
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								rules/uv4l/default.bash
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,45 @@
 | 
			
		||||
version=\
 | 
			
		||||
(
 | 
			
		||||
  "1.0.0"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
url=\
 | 
			
		||||
(
 | 
			
		||||
  "http://lsts.pt/glued/uv4l.$version.tar.bz2"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
md5=\
 | 
			
		||||
(
 | 
			
		||||
  "869e884accbfa9c2356e2fd9307dd71c"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
maintainer=\
 | 
			
		||||
(
 | 
			
		||||
    'Pedro Gonçalves <pedro@lsts.pt>'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
post_unpack()
 | 
			
		||||
{
 | 
			
		||||
    mv "../etc" "../uv4l-$version/"
 | 
			
		||||
    mv "../usr" "../uv4l-$version/"
 | 
			
		||||
    touch startStreamRaspiCam.sh
 | 
			
		||||
    echo "#!/bin/sh" >> startStreamRaspiCam.sh
 | 
			
		||||
    echo "killall uv4l" >> startStreamRaspiCam.sh
 | 
			
		||||
    echo "modprobe cuse" >> startStreamRaspiCam.sh
 | 
			
		||||
    echo "uv4l -nopreview --auto-video_nr --driver raspicam --encoding h264 --width 1080 --height 720 --framerate 12 --quality 8 --server-option '--port=9090' --server-option '--max-queued-connections=30' --server-option '--max-streams=25' --server-option '--max-threads=29'" >> startStreamRaspiCam.sh
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
host_install()
 | 
			
		||||
{
 | 
			
		||||
  $cmd_cp -r "usr/lib/"*    "$cfg_dir_toolchain_sysroot/usr/lib/"
 | 
			
		||||
  $cmd_cp -r "usr/include/"* "$cfg_dir_toolchain_sysroot/usr/include/"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
target_install()
 | 
			
		||||
{
 | 
			
		||||
    $cmd_cp -r "usr/lib/"* "$cfg_dir_rootfs/usr/lib/"
 | 
			
		||||
    $cmd_cp -r "usr/bin/"* "$cfg_dir_rootfs/usr/bin/"
 | 
			
		||||
    $cmd_cp -r "startStreamRaspiCam.sh" "$cfg_dir_rootfs/usr/bin/"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										7
									
								
								systems/lauv-aux-rpi/CMRE-rpi.cfg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								systems/lauv-aux-rpi/CMRE-rpi.cfg
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
cfg_hostname='lauv-aux-rpi-testbed'
 | 
			
		||||
cfg_eth_ext_ip='10.0.200.24'
 | 
			
		||||
cfg_eth_ext_mk='255.255.0.0'
 | 
			
		||||
cfg_eth_ext_gw='10.0.0.1'
 | 
			
		||||
cfg_ptpd_interface='eth0'
 | 
			
		||||
cfg_packages='dropbear rsync busybox e2fsprogs dosfstools ptpd rpcbind nfs-utils rpi-boot-firmware linux/rpi libconfig log4cpp fftw socat crypto++ netcat screen rlwrap'
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										5497
									
								
								systems/lauv-aux-rpi/cfg/linux-4.4_2017-01-27.cfg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5497
									
								
								systems/lauv-aux-rpi/cfg/linux-4.4_2017-01-27.cfg
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -6,13 +6,12 @@ cfg_services1='lauv-storage-server'
 | 
			
		||||
cfg_services2='dune'
 | 
			
		||||
cfg_packages='dropbear rsync busybox e2fsprogs dosfstools ptpd rpcbind nfs-utils rpi-boot-firmware linux/rpi'
 | 
			
		||||
cfg_target_linux_kernel='arch/arm/boot/zImage'
 | 
			
		||||
cfg_target_linux_dtb='arch/arm/boot/dts/bcm2709-rpi-2-b.dtb'
 | 
			
		||||
cfg_ptpd_interface='eth0'
 | 
			
		||||
cfg_terminal='ttyAMA0'
 | 
			
		||||
cfg_lauv_storage_dir='/opt/lsts/dune/log'
 | 
			
		||||
cfg_partitions=\
 | 
			
		||||
(
 | 
			
		||||
    rpi-boot boot0  512B    32MiB
 | 
			
		||||
    rpi-boot BOOT0  512B    32MiB
 | 
			
		||||
    root     root0  32MiB   544MiB
 | 
			
		||||
    data     data0  544MiB  -1
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
@@ -1 +1,9 @@
 | 
			
		||||
# Core.
 | 
			
		||||
arm_freq=1000
 | 
			
		||||
 | 
			
		||||
# Disable BT on Rpi3.
 | 
			
		||||
dtoverlay=pi3-disable-bt
 | 
			
		||||
 | 
			
		||||
# Enable RasPicam
 | 
			
		||||
start_x=1
 | 
			
		||||
gpu_mem=128
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										45
									
								
								systems/lauv-aux-rpi/fs/etc/rc.d/lauv-storage-client
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								systems/lauv-aux-rpi/fs/etc/rc.d/lauv-storage-client
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,45 @@
 | 
			
		||||
mount_path()
 | 
			
		||||
{
 | 
			
		||||
    rpath="$cfg_lauv_storage_host:$1"
 | 
			
		||||
    lpath="$1"
 | 
			
		||||
 | 
			
		||||
    mkdir -p "$lpath"
 | 
			
		||||
 | 
			
		||||
    mount -t nfs -o wsize=32768 "$rpath" "$lpath"
 | 
			
		||||
    if [ $? -eq 0 ]; then
 | 
			
		||||
        echo "* Mounted '$rpath' in '$lpath'"
 | 
			
		||||
        return 0
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    return 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start()
 | 
			
		||||
{
 | 
			
		||||
    /usr/bin/rpcbind
 | 
			
		||||
    if [ $? -ne 0 ]; then
 | 
			
		||||
        echo "ERROR: failed to start rpcbind."
 | 
			
		||||
        return 1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    for path in $cfg_lauv_storage_paths; do
 | 
			
		||||
        n=0; while [ $n -lt "$cfg_lauv_storage_timeout" ]; do
 | 
			
		||||
                 mount_path "$path"
 | 
			
		||||
                 if [ $? -eq 0 ]; then
 | 
			
		||||
                     break
 | 
			
		||||
                 fi
 | 
			
		||||
 | 
			
		||||
                 let n++
 | 
			
		||||
                 sleep 1
 | 
			
		||||
             done
 | 
			
		||||
    done
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
stop()
 | 
			
		||||
{
 | 
			
		||||
    killall rpcbind
 | 
			
		||||
 | 
			
		||||
    for path in $cfg_lauv_storage_paths; do
 | 
			
		||||
        umount "$path"
 | 
			
		||||
    done
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										28
									
								
								systems/lauv-aux-rpi/fs/etc/rc.d/usbmount
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								systems/lauv-aux-rpi/fs/etc/rc.d/usbmount
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,28 @@
 | 
			
		||||
try_mount_storage()
 | 
			
		||||
{
 | 
			
		||||
    n=0; while [ $n -lt 30 ]; do
 | 
			
		||||
             /bin/mount "$1" /opt/lsts/dune/log
 | 
			
		||||
 | 
			
		||||
             if [ $? -eq 0 ]; then
 | 
			
		||||
                 return 0
 | 
			
		||||
             fi
 | 
			
		||||
 | 
			
		||||
             sleep 1
 | 
			
		||||
             let n++
 | 
			
		||||
         done
 | 
			
		||||
 | 
			
		||||
    return 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start()
 | 
			
		||||
{
 | 
			
		||||
    try_mount_storage /dev/sda1
 | 
			
		||||
    echo "* USB Mounted in /opt/lsts/dune/log"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
stop()
 | 
			
		||||
{
 | 
			
		||||
    /bin/umount /dev/sda1
 | 
			
		||||
    echo "* USB Umounted"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -3,3 +3,4 @@ cfg_eth_ext_ip='10.0.200.24'
 | 
			
		||||
cfg_eth_ext_mk='255.255.0.0'
 | 
			
		||||
cfg_eth_ext_gw='10.0.0.1'
 | 
			
		||||
cfg_ptpd_interface='eth0'
 | 
			
		||||
cfg_services1=''
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								systems/lauv-aux-rpi/lauv-xtreme-2-cam.cfg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								systems/lauv-aux-rpi/lauv-xtreme-2-cam.cfg
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
cfg_hostname='lauv-xtreme-2-cam'
 | 
			
		||||
cfg_eth_ext_ip='10.0.10.52'
 | 
			
		||||
cfg_eth_ext_mk='255.255.0.0'
 | 
			
		||||
cfg_eth_ext_gw='10.0.0.1'
 | 
			
		||||
cfg_lauv_storage_dir=/opt/lsts/dune/log
 | 
			
		||||
cfg_lauv_storage_host=10.0.10.53
 | 
			
		||||
cfg_lauv_storage_paths=/opt/lsts/dune/log
 | 
			
		||||
cfg_lauv_storage_timeout=60
 | 
			
		||||
cfg_ptpd_interface='eth0'
 | 
			
		||||
cfg_services1='lauv-storage-client'
 | 
			
		||||
cfg_packages='dropbear rsync busybox e2fsprogs dosfstools rpcbind rpi-boot-firmware linux/rpi exiv2 pointgrey opencv nfs-utils ptpd'
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -1,6 +1,6 @@
 | 
			
		||||
cfg_hostname='lauv-xtreme-2'
 | 
			
		||||
cfg_eth_ext_ip='10.0.10.50'
 | 
			
		||||
cfg_packages="$cfg_packages rpcbind nfs-utils"
 | 
			
		||||
cfg_packages="$cfg_packages rpcbind nfs-utils exiv2 opencv"
 | 
			
		||||
cfg_services1='lauv-storage-client'
 | 
			
		||||
cfg_lauv_storage_host='10.0.10.53'
 | 
			
		||||
cfg_lauv_storage_paths='/opt/lsts/dune/log'
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										85
									
								
								systems/lctr-a6xx/patches/linux/4.4.66/00-aim104-com8.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										85
									
								
								systems/lctr-a6xx/patches/linux/4.4.66/00-aim104-com8.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,85 @@
 | 
			
		||||
diff -Nru a/drivers/tty/serial/8250/8250_aim104_com8.c b/drivers/tty/serial/8250/8250_aim104_com8.c
 | 
			
		||||
--- a/drivers/tty/serial/8250/8250_aim104_com8.c
 | 
			
		||||
+++ b/drivers/tty/serial/8250/8250_aim104_com8.c
 | 
			
		||||
@@ -0,0 +1,51 @@
 | 
			
		||||
+#include <linux/module.h>
 | 
			
		||||
+#include <linux/init.h>
 | 
			
		||||
+#include <linux/serial_8250.h>
 | 
			
		||||
+
 | 
			
		||||
+#define PORT(_base,_irq)				\
 | 
			
		||||
+	{						\
 | 
			
		||||
+		.iobase		= _base,		\
 | 
			
		||||
+		.irq		= _irq,			\
 | 
			
		||||
+		.uartclk	= 1843200,		\
 | 
			
		||||
+		.iotype		= UPIO_PORT,		\
 | 
			
		||||
+		.flags		= UPF_BOOT_AUTOCONF | UPF_BUGGY_UART,	\
 | 
			
		||||
+	}
 | 
			
		||||
+
 | 
			
		||||
+static struct plat_serial8250_port aim104_data[] = {
 | 
			
		||||
+	PORT(0x100, 10),
 | 
			
		||||
+	PORT(0x108, 10),
 | 
			
		||||
+	PORT(0x110, 10),
 | 
			
		||||
+	PORT(0x118, 10),
 | 
			
		||||
+	PORT(0x120, 10),
 | 
			
		||||
+	PORT(0x128, 10),
 | 
			
		||||
+	PORT(0x130, 10),
 | 
			
		||||
+	PORT(0x138, 10),
 | 
			
		||||
+	PORT(0x300, 6),
 | 
			
		||||
+	PORT(0x308, 6),
 | 
			
		||||
+	PORT(0x310, 6),
 | 
			
		||||
+	PORT(0x318, 6),
 | 
			
		||||
+	PORT(0x320, 6),
 | 
			
		||||
+	PORT(0x328, 6),
 | 
			
		||||
+	PORT(0x330, 6),
 | 
			
		||||
+	PORT(0x338, 6),
 | 
			
		||||
+	{ },
 | 
			
		||||
+};
 | 
			
		||||
+
 | 
			
		||||
+static struct platform_device exar_device = {
 | 
			
		||||
+	.name			= "serial8250",
 | 
			
		||||
+	.id			= PLAT8250_DEV_PLATFORM,
 | 
			
		||||
+	.dev			= {
 | 
			
		||||
+		.platform_data	= aim104_data,
 | 
			
		||||
+	},
 | 
			
		||||
+};
 | 
			
		||||
+
 | 
			
		||||
+static int __init exar_init(void)
 | 
			
		||||
+{
 | 
			
		||||
+	return platform_device_register(&exar_device);
 | 
			
		||||
+}
 | 
			
		||||
+
 | 
			
		||||
+module_init(exar_init);
 | 
			
		||||
+
 | 
			
		||||
+MODULE_AUTHOR("Ricardo Martins");
 | 
			
		||||
+MODULE_DESCRIPTION("8250 serial probe module for Eurotech AIM104-COM8");
 | 
			
		||||
+MODULE_LICENSE("GPL");
 | 
			
		||||
diff -Nru a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig
 | 
			
		||||
--- a/drivers/tty/serial/8250/Kconfig
 | 
			
		||||
+++ b/drivers/tty/serial/8250/Kconfig
 | 
			
		||||
@@ -225,6 +225,15 @@ config SERIAL_8250_EXAR_ST16C554
 | 
			
		||||
 	  To compile this driver as a module, choose M here: the module
 | 
			
		||||
 	  will be called 8250_exar_st16c554.
 | 
			
		||||
 | 
			
		||||
+config SERIAL_8250_AIM104_COM8
 | 
			
		||||
+	tristate "Support Eurotech AIM104-COM8 Dual Quad UART"
 | 
			
		||||
+	depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
 | 
			
		||||
+	help
 | 
			
		||||
+	  Eurotech AIM104-COM8 Dual Quad UART.
 | 
			
		||||
+
 | 
			
		||||
+	  To compile this driver as a module, choose M here: the module
 | 
			
		||||
+	  will be called 8250_aim104_com8.
 | 
			
		||||
+
 | 
			
		||||
 config SERIAL_8250_HUB6
 | 
			
		||||
 	tristate "Support Hub6 cards"
 | 
			
		||||
 	depends on SERIAL_8250 != n && ISA && SERIAL_8250_MANY_PORTS
 | 
			
		||||
diff -Nru a/drivers/tty/serial/8250/Makefile b/drivers/tty/serial/8250/Makefile
 | 
			
		||||
--- a/drivers/tty/serial/8250/Makefile
 | 
			
		||||
+++ b/drivers/tty/serial/8250/Makefile
 | 
			
		||||
@@ -17,6 +17,7 @@ obj-$(CONFIG_SERIAL_8250_FOURPORT)	+= 8250_fourport.o
 | 
			
		||||
 obj-$(CONFIG_SERIAL_8250_ACCENT)	+= 8250_accent.o
 | 
			
		||||
 obj-$(CONFIG_SERIAL_8250_BOCA)		+= 8250_boca.o
 | 
			
		||||
 obj-$(CONFIG_SERIAL_8250_EXAR_ST16C554)	+= 8250_exar_st16c554.o
 | 
			
		||||
+obj-$(CONFIG_SERIAL_8250_AIM104_COM8)	+= 8250_aim104_com8.o
 | 
			
		||||
 obj-$(CONFIG_SERIAL_8250_HUB6)		+= 8250_hub6.o
 | 
			
		||||
 obj-$(CONFIG_SERIAL_8250_MCA)		+= 8250_mca.o
 | 
			
		||||
 obj-$(CONFIG_SERIAL_8250_FSL)		+= 8250_fsl.o
 | 
			
		||||
@@ -0,0 +1,14 @@
 | 
			
		||||
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
 | 
			
		||||
index 52d82d2..613c7e9 100644
 | 
			
		||||
--- a/drivers/tty/serial/8250/8250_port.c
 | 
			
		||||
+++ b/drivers/tty/serial/8250/8250_port.c
 | 
			
		||||
@@ -132,8 +132,7 @@ static const struct serial8250_config uart_config[] = {
 | 
			
		||||
 		.name		= "ST16654",
 | 
			
		||||
 		.fifo_size	= 64,
 | 
			
		||||
 		.tx_loadsz	= 32,
 | 
			
		||||
-		.fcr		= UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_01 |
 | 
			
		||||
-				  UART_FCR_T_TRIG_10,
 | 
			
		||||
+		.fcr		= UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_00,
 | 
			
		||||
 		.rxtrig_bytes	= {8, 16, 56, 60},
 | 
			
		||||
 		.flags		= UART_CAP_FIFO | UART_CAP_EFR | UART_CAP_SLEEP,
 | 
			
		||||
 	},
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -4,7 +4,7 @@ cfg_modules=''
 | 
			
		||||
cfg_services0='dropbear network storage upgrade syslog'
 | 
			
		||||
cfg_services1='huawei ntpd'
 | 
			
		||||
cfg_services2='dune'
 | 
			
		||||
cfg_packages='u-boot dropbear rsync busybox linux uswitch ppp iptables socat bridge-utils ntp e2fsprogs i2c-tools iperf dnsmasq'
 | 
			
		||||
cfg_packages='u-boot dropbear rsync busybox linux/v3_14 uswitch ppp iptables socat bridge-utils ntp e2fsprogs i2c-tools iperf dnsmasq'
 | 
			
		||||
cfg_target_linux_kernel='arch/arm/boot/zImage'
 | 
			
		||||
cfg_target_linux_dtb='arch/arm/boot/dts/omap3-lctr-a9xx.dtb'
 | 
			
		||||
cfg_target_uboot_config='igep0020'
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										105
									
								
								systems/lctr-a9xx/patches/linux/4.4.66/00-lctr-a9xx-dts.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										105
									
								
								systems/lctr-a9xx/patches/linux/4.4.66/00-lctr-a9xx-dts.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,105 @@
 | 
			
		||||
diff --git linux-4.4.66/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
 | 
			
		||||
index 30bbc37..7241be6 100644
 | 
			
		||||
--- linux-4.4.66/arch/arm/boot/dts/Makefile
 | 
			
		||||
+++ linux-4.4.66/arch/arm/boot/dts/Makefile
 | 
			
		||||
@@ -421,6 +421,7 @@
 | 
			
		||||
	omap3-igep0020-rev-f.dtb \
 | 
			
		||||
	omap3-igep0030.dtb \
 | 
			
		||||
	omap3-igep0030-rev-g.dtb \
 | 
			
		||||
+	omap3-lctr-a9xx.dtb \
 | 
			
		||||
	omap3-ldp.dtb \
 | 
			
		||||
	omap3-lilly-dbb056.dtb \
 | 
			
		||||
	omap3-n900.dtb \
 | 
			
		||||
diff -Nru linux-4.4.66/arch/arm/boot/dts/omap3-lctr-a9xx.dts linux-4.4.66.rasm/arch/arm/boot/dts/omap3-lctr-a9xx.dts
 | 
			
		||||
--- linux-4.4.66/arch/arm/boot/dts/omap3-lctr-a9xx.dts
 | 
			
		||||
+++ linux-4.4.66.rasm/arch/arm/boot/dts/omap3-lctr-a9xx.dts
 | 
			
		||||
@@ -0,0 +1,89 @@
 | 
			
		||||
+/*
 | 
			
		||||
+ * Copyright (C) 2014 Universidade do Porto - Faculdade de Engenharia
 | 
			
		||||
+ *
 | 
			
		||||
+ * This program is free software; you can redistribute it and/or modify
 | 
			
		||||
+ * it under the terms of the GNU General Public License version 2 as
 | 
			
		||||
+ * published by the Free Software Foundation.
 | 
			
		||||
+ */
 | 
			
		||||
+
 | 
			
		||||
+#include <dt-bindings/input/input.h>
 | 
			
		||||
+#include "omap3-igep0020.dts"
 | 
			
		||||
+
 | 
			
		||||
+/ {
 | 
			
		||||
+	leds {
 | 
			
		||||
+		boot {
 | 
			
		||||
+			linux,default-trigger = "heartbeat";
 | 
			
		||||
+		};
 | 
			
		||||
+	};
 | 
			
		||||
+
 | 
			
		||||
+	gpio_keys {
 | 
			
		||||
+		pinctrl-names = "default";
 | 
			
		||||
+		pinctrl-0 = <&gpio_keys_pins>;
 | 
			
		||||
+		compatible = "gpio-keys";
 | 
			
		||||
+
 | 
			
		||||
+		button@0 {
 | 
			
		||||
+			label = "Button 0";
 | 
			
		||||
+			gpios = <&gpio5 11 GPIO_ACTIVE_HIGH>;	/* gpio_139 */
 | 
			
		||||
+			linux,code = <BTN_0>;
 | 
			
		||||
+			debounce-interval = <5>;
 | 
			
		||||
+		};
 | 
			
		||||
+
 | 
			
		||||
+		button@1 {
 | 
			
		||||
+			label = "Button 1";
 | 
			
		||||
+			gpios = <&gpio5 10 GPIO_ACTIVE_HIGH>;	/* gpio_138 */
 | 
			
		||||
+			linux,code = <BTN_1>;
 | 
			
		||||
+			debounce-interval = <5>;
 | 
			
		||||
+		};
 | 
			
		||||
+
 | 
			
		||||
+		button@2 {
 | 
			
		||||
+			label = "Button 2";
 | 
			
		||||
+			gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>;	/* gpio_137 */
 | 
			
		||||
+			linux,code = <BTN_2>;
 | 
			
		||||
+			debounce-interval = <5>;
 | 
			
		||||
+		};
 | 
			
		||||
+	};
 | 
			
		||||
+
 | 
			
		||||
+	pps {
 | 
			
		||||
+		compatible = "pps-gpio";
 | 
			
		||||
+		pinctrl-names = "default";
 | 
			
		||||
+		pinctrl-0 = <&pps_pins>;
 | 
			
		||||
+		gpios = <&gpio5 8 GPIO_ACTIVE_HIGH>;
 | 
			
		||||
+		assert-rising-edge;
 | 
			
		||||
+	};
 | 
			
		||||
+};
 | 
			
		||||
+
 | 
			
		||||
+&omap3_pmx_core {
 | 
			
		||||
+	gpio_keys_pins: pinmux_gpio_keys_pins {
 | 
			
		||||
+		pinctrl-single,pins = <
 | 
			
		||||
+			0x136 (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* gpio_137 - button 2 */
 | 
			
		||||
+			0x138 (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* gpio_138 - button 1 */
 | 
			
		||||
+			0x13a (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* gpio_139 - button 0 */
 | 
			
		||||
+		>;
 | 
			
		||||
+	};
 | 
			
		||||
+
 | 
			
		||||
+	pps_pins: pinmux_pps_pins {
 | 
			
		||||
+		pinctrl-single,pins = <
 | 
			
		||||
+			0x134 (PIN_INPUT_PULLDOWN | MUX_MODE4)	/* gpio_136 */
 | 
			
		||||
+		>;
 | 
			
		||||
+	};
 | 
			
		||||
+};
 | 
			
		||||
+
 | 
			
		||||
+&i2c2 {
 | 
			
		||||
+	rtc@68 {
 | 
			
		||||
+		compatible = "dallas,ds1307";
 | 
			
		||||
+		reg = <0x68>;
 | 
			
		||||
+	};
 | 
			
		||||
+};
 | 
			
		||||
+
 | 
			
		||||
+/* Disable WiFi/Bluetooth combo. */
 | 
			
		||||
+&mmc2 {
 | 
			
		||||
+	status = "disabled";
 | 
			
		||||
+};
 | 
			
		||||
+
 | 
			
		||||
+&vdd33 {
 | 
			
		||||
+	status = "disabled";
 | 
			
		||||
+};
 | 
			
		||||
+
 | 
			
		||||
+&lbee1usjyc_pdn {
 | 
			
		||||
+	status = "disabled";
 | 
			
		||||
+};
 | 
			
		||||
@@ -33,9 +33,9 @@ index 79daabd..f1b5bb1 100644
 | 
			
		||||
 | 
			
		||||
+#undef CONFIG_BOOT_ONENAND
 | 
			
		||||
+
 | 
			
		||||
 #ifdef CONFIG_BOOT_NAND
 | 
			
		||||
 #define CONFIG_NR_DRAM_BANKS            2
 | 
			
		||||
 #define CONFIG_NAND
 | 
			
		||||
 #endif
 | 
			
		||||
 | 
			
		||||
@@ -201,4 +203,42 @@
 | 
			
		||||
 #define CONFIG_NAND_OMAP_ECCSCHEME	OMAP_ECC_HAM1_CODE_HW
 | 
			
		||||
 #endif
 | 
			
		||||
@@ -58,15 +58,15 @@ index 79daabd..f1b5bb1 100644
 | 
			
		||||
+  "icache on;"                                                          \
 | 
			
		||||
+  "setenv bootargs \"console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} rootwait ro quiet\"; " \
 | 
			
		||||
+  "mmc dev 0; "                                                         \
 | 
			
		||||
+  "ext4load mmc0 0:2 ${loadaddr} /boot/kernel; "                        \
 | 
			
		||||
+  "ext4load mmc0 0:2 ${dtbaddr} /boot/board.dtb; "                      \
 | 
			
		||||
+  "ext4load mmc 0:2 ${loadaddr} /boot/kernel; "                        \
 | 
			
		||||
+  "ext4load mmc 0:2 ${dtbaddr} /boot/board.dtb; "                      \
 | 
			
		||||
+  "bootz ${loadaddr} - ${dtbaddr}; " \
 | 
			
		||||
+
 | 
			
		||||
+#undef CONFIG_ENV_SIZE
 | 
			
		||||
+#define CONFIG_ENV_SIZE			(128 << 10)
 | 
			
		||||
+
 | 
			
		||||
+#define CONFIG_ENV_IS_NOWHERE
 | 
			
		||||
+#define CONFIG_ZERO_BOOTDELAY_CHECK
 | 
			
		||||
+/*#define CONFIG_ENV_IS_NOWHERE*/
 | 
			
		||||
+/*#define CONFIG_ZERO_BOOTDELAY_CHECK*/
 | 
			
		||||
+
 | 
			
		||||
+/* USB */
 | 
			
		||||
+#undef CONFIG_MUSB_UDC
 | 
			
		||||
@@ -1,3 +1,3 @@
 | 
			
		||||
cfg_hostname='x8-02'
 | 
			
		||||
cfg_eth_ext_ip='10.0.20.100'
 | 
			
		||||
cfg_packages='u-boot dropbear rsync busybox linux uswitch ppp iptables socat bridge-utils ntp e2fsprogs i2c-tools iperf dnsmasq libav'
 | 
			
		||||
cfg_packages='u-boot dropbear rsync busybox linux/v3_14 uswitch ppp iptables socat bridge-utils ntp e2fsprogs i2c-tools iperf dnsmasq libav'
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										7
									
								
								systems/lctr-b2xx/CMRE-bbb.cfg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								systems/lctr-b2xx/CMRE-bbb.cfg
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
cfg_hostname='lauv-aux-bbb-testbed'
 | 
			
		||||
cfg_eth_ext_ip='10.0.200.24'
 | 
			
		||||
cfg_eth_ext_mk='255.255.0.0'
 | 
			
		||||
cfg_eth_ext_gw='10.0.0.1'
 | 
			
		||||
cfg_ptpd_interface='eth0'
 | 
			
		||||
cfg_packages='u-boot ptpd i2c-tools am33xx-cm3/host linux dropbear rsync busybox e2fsprogs dosfstools ptpd rpcbind nfs-utils libconfig log4cpp fftw socat crypto++ netcat screen rlwrap'
 | 
			
		||||
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -6,7 +6,7 @@ cfg_services2='dune'
 | 
			
		||||
cfg_packages='u-boot dropbear rsync busybox e2fsprogs ptpd i2c-tools am33xx-cm3/host linux'
 | 
			
		||||
cfg_target_linux_kernel='arch/arm/boot/zImage'
 | 
			
		||||
cfg_target_linux_dtb='arch/arm/boot/dts/am335x-lctr-b2xx.dtb'
 | 
			
		||||
cfg_target_uboot_config='am335x_bbb'
 | 
			
		||||
cfg_target_uboot_config='am335x_boneblack'
 | 
			
		||||
cfg_ptpd_interface='eth0'
 | 
			
		||||
cfg_terminal='ttyO0'
 | 
			
		||||
cfg_partitions=\
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +0,0 @@
 | 
			
		||||
cfg_hostname='mariner-01'
 | 
			
		||||
cfg_storage='data0:ext4:/opt'
 | 
			
		||||
cfg_eth_ext_ip='10.0.20.125'
 | 
			
		||||
cfg_eth_ext_mk='255.255.0.0'
 | 
			
		||||
cfg_eth_ext_gw='10.0.0.1'
 | 
			
		||||
cfg_packages='u-boot dropbear rsync busybox e2fsprogs ptpd i2c-tools am33xx-cm3/host linux libav'
 | 
			
		||||
@@ -1,153 +0,0 @@
 | 
			
		||||
diff --git a/boards.cfg b/boards.cfg
 | 
			
		||||
index 1ba2081..08dc221 100644
 | 
			
		||||
--- a/boards.cfg
 | 
			
		||||
+++ b/boards.cfg
 | 
			
		||||
@@ -1218,3 +1218,4 @@ Orphan  powerpc     ppc4xx         -           sandburst       metrobox
 | 
			
		||||
 # The following were move to "Orphan" in September, 2013
 | 
			
		||||
 Orphan  arm         arm1136        mx31        -               imx31_phycore       imx31_phycore_eet                     imx31_phycore:IMX31_PHYCORE_EET                                                                                                   (resigned) Guennadi Liakhovetski <g.liakhovetski@gmx.de>
 | 
			
		||||
 Orphan  arm         arm1136        mx31        freescale       mx31ads             mx31ads                               -                                                                                                                                 (resigned) Guennadi Liakhovetski <g.liakhovetski@gmx.de>
 | 
			
		||||
+Active  arm         armv7          am33xx      ti              am335x              am335x_bbb                           am335x_bbb:SERIAL1,CONS_INDEX=1                                                                                                    Ricardo Martins <rasm@fe.up.pt>
 | 
			
		||||
diff --git a/include/configs/am335x_bbb.h b/include/configs/am335x_bbb.h
 | 
			
		||||
new file mode 100644
 | 
			
		||||
index 0000000..9e00817
 | 
			
		||||
--- /dev/null
 | 
			
		||||
+++ b/include/configs/am335x_bbb.h
 | 
			
		||||
@@ -0,0 +1,138 @@
 | 
			
		||||
+/*
 | 
			
		||||
+ * am335x_evm.h
 | 
			
		||||
+ *
 | 
			
		||||
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
 | 
			
		||||
+ *
 | 
			
		||||
+ * This program is free software; you can redistribute it and/or
 | 
			
		||||
+ * modify it under the terms of the GNU General Public License as
 | 
			
		||||
+ * published by the Free Software Foundation version 2.
 | 
			
		||||
+ *
 | 
			
		||||
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
 | 
			
		||||
+ * kind, whether express or implied; without even the implied warranty
 | 
			
		||||
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
+ * GNU General Public License for more details.
 | 
			
		||||
+ */
 | 
			
		||||
+
 | 
			
		||||
+#ifndef __CONFIG_AM335X_EVM_H
 | 
			
		||||
+#define __CONFIG_AM335X_EVM_H
 | 
			
		||||
+
 | 
			
		||||
+#include <configs/ti_am335x_common.h>
 | 
			
		||||
+
 | 
			
		||||
+#ifdef CONFIG_BOOTDELAY
 | 
			
		||||
+#  undef CONFIG_BOOTLDELAY
 | 
			
		||||
+#endif
 | 
			
		||||
+#define CONFIG_BOOTDELAY 2
 | 
			
		||||
+#define CONFIG_AUTOBOOT_KEYED 1
 | 
			
		||||
+#define CONFIG_AUTOBOOT_DELAY_STR "uboot"
 | 
			
		||||
+#define CONFIG_AUTOBOOT_PROMPT \
 | 
			
		||||
+			"autoboot in %d seconds\n",bootdelay
 | 
			
		||||
+
 | 
			
		||||
+#undef CONFIG_BOOTM_NETBSD
 | 
			
		||||
+#undef CONFIG_BOOTM_PLAN9
 | 
			
		||||
+#undef CONFIG_BOOTM_RTEMS
 | 
			
		||||
+#undef CONFIG_BOOTM_VXWORKS
 | 
			
		||||
+#undef CONFIG_BOOTP_DNS
 | 
			
		||||
+#undef CONFIG_BOOTP_DNS2
 | 
			
		||||
+#undef CONFIG_BOOTP_SEND_HOSTNAME
 | 
			
		||||
+#undef CONFIG_CMD_ASKENV
 | 
			
		||||
+#undef CONFIG_CMD_BDI
 | 
			
		||||
+#undef CONFIG_CMD_BOOTD
 | 
			
		||||
+#undef CONFIG_CMD_CRC32
 | 
			
		||||
+#undef CONFIG_CMD_DFU
 | 
			
		||||
+#undef CONFIG_CMD_DHCP
 | 
			
		||||
+#undef CONFIG_CMD_EDITENV
 | 
			
		||||
+#undef CONFIG_CMD_EDITENV
 | 
			
		||||
+#undef CONFIG_CMD_EXPORTENV
 | 
			
		||||
+#undef CONFIG_CMD_FPGA
 | 
			
		||||
+#undef CONFIG_CMD_ITEST
 | 
			
		||||
+#undef CONFIG_CMD_LOADB
 | 
			
		||||
+#undef CONFIG_CMD_LOADS
 | 
			
		||||
+#undef CONFIG_CMD_MEMORY
 | 
			
		||||
+#undef CONFIG_CMD_MISC
 | 
			
		||||
+#undef CONFIG_CMD_NET
 | 
			
		||||
+#undef CONFIG_CMD_NFS
 | 
			
		||||
+#undef CONFIG_CMD_PING
 | 
			
		||||
+#undef CONFIG_CMD_SETGETDCR
 | 
			
		||||
+#undef CONFIG_CMD_SPI
 | 
			
		||||
+#undef CONFIG_DRIVER_TI_CPSW
 | 
			
		||||
+#undef CONFIG_MII
 | 
			
		||||
+#undef CONFIG_MUSB_GADGET
 | 
			
		||||
+#undef CONFIG_MUSB_HOST
 | 
			
		||||
+#undef CONFIG_NAND
 | 
			
		||||
+#undef CONFIG_OMAP3_SPI
 | 
			
		||||
+#undef CONFIG_SPI
 | 
			
		||||
+#undef CONFIG_SPI_BOOT
 | 
			
		||||
+#undef CONFIG_SPL_ETH_SUPPORT
 | 
			
		||||
+#undef CONFIG_SPL_NAND_LOAD
 | 
			
		||||
+#undef CONFIG_SPL_NAND_SUPPORT
 | 
			
		||||
+#undef CONFIG_SPL_SPI_FLASH_SUPPORT
 | 
			
		||||
+#undef CONFIG_SPL_SPI_LOAD
 | 
			
		||||
+#undef CONFIG_SPL_SPI_SUPPORT
 | 
			
		||||
+#undef CONFIG_SPL_YMODEM_SUPPORT
 | 
			
		||||
+#undef CONFIG_SYS_LONGHELP
 | 
			
		||||
+
 | 
			
		||||
+#define MACH_TYPE_TIAM335EVM		3589	/* Until the next sync */
 | 
			
		||||
+#define CONFIG_MACH_TYPE		MACH_TYPE_TIAM335EVM
 | 
			
		||||
+
 | 
			
		||||
+/* Clock Defines */
 | 
			
		||||
+#define V_OSCK				24000000  /* Clock output from T2 */
 | 
			
		||||
+#define V_SCLK				(V_OSCK)
 | 
			
		||||
+
 | 
			
		||||
+/* Custom script for NOR */
 | 
			
		||||
+#define CONFIG_SYS_LDSCRIPT		"board/ti/am335x/u-boot.lds"
 | 
			
		||||
+
 | 
			
		||||
+/* Always 128 KiB env size */
 | 
			
		||||
+#define CONFIG_ENV_SIZE			(128 << 10)
 | 
			
		||||
+
 | 
			
		||||
+#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
 | 
			
		||||
+
 | 
			
		||||
+#ifndef CONFIG_SPL_BUILD
 | 
			
		||||
+#define CONFIG_EXTRA_ENV_SETTINGS                                       \
 | 
			
		||||
+  "loadaddr=0x80200000\0"                                               \
 | 
			
		||||
+  "fdtaddr=0x80F80000\0"                                                \
 | 
			
		||||
+  "console=ttyO0,115200n8\0"                                            \
 | 
			
		||||
+  "mmcroot=/dev/mmcblk0p2\0"                                            \
 | 
			
		||||
+  "mmcrootfstype=ext4\0"
 | 
			
		||||
+
 | 
			
		||||
+#define CONFIG_BOOTCOMMAND                                              \
 | 
			
		||||
+  "setenv bootargs \"console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} rootwait ro quiet\"; " \
 | 
			
		||||
+  "mmc dev 0; "                                                         \
 | 
			
		||||
+  "ext4load mmc0 0:2 ${loadaddr} /boot/kernel; "                        \
 | 
			
		||||
+  "ext4load mmc0 0:2 ${fdtaddr} /boot/board.dtb; "                      \
 | 
			
		||||
+  "bootz ${loadaddr} - ${fdtaddr}; "
 | 
			
		||||
+
 | 
			
		||||
+#endif
 | 
			
		||||
+
 | 
			
		||||
+/* NS16550 Configuration */
 | 
			
		||||
+#define CONFIG_SYS_NS16550_COM1		0x44e09000	/* Base EVM has UART0 */
 | 
			
		||||
+#define CONFIG_SYS_NS16550_COM2		0x48022000	/* UART1 */
 | 
			
		||||
+#define CONFIG_SYS_NS16550_COM3		0x48024000	/* UART2 */
 | 
			
		||||
+#define CONFIG_SYS_NS16550_COM4		0x481a6000	/* UART3 */
 | 
			
		||||
+#define CONFIG_SYS_NS16550_COM5		0x481a8000	/* UART4 */
 | 
			
		||||
+#define CONFIG_SYS_NS16550_COM6		0x481aa000	/* UART5 */
 | 
			
		||||
+#define CONFIG_BAUDRATE			115200
 | 
			
		||||
+
 | 
			
		||||
+#define CONFIG_CMD_EEPROM
 | 
			
		||||
+#define CONFIG_ENV_EEPROM_IS_ON_I2C
 | 
			
		||||
+#define CONFIG_SYS_I2C_EEPROM_ADDR	0x50	/* Main EEPROM */
 | 
			
		||||
+#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	2
 | 
			
		||||
+#define CONFIG_SYS_I2C_MULTI_EEPROMS
 | 
			
		||||
+
 | 
			
		||||
+/* PMIC support */
 | 
			
		||||
+#define CONFIG_POWER_TPS65217
 | 
			
		||||
+#define CONFIG_POWER_TPS65910
 | 
			
		||||
+
 | 
			
		||||
+/* SPL */
 | 
			
		||||
+#define CONFIG_SPL_POWER_SUPPORT
 | 
			
		||||
+
 | 
			
		||||
+
 | 
			
		||||
+/* Bootcount using the RTC block */
 | 
			
		||||
+#define CONFIG_BOOTCOUNT_LIMIT
 | 
			
		||||
+#define CONFIG_BOOTCOUNT_AM33XX
 | 
			
		||||
+
 | 
			
		||||
+/* SPI flash. */
 | 
			
		||||
+#define CONFIG_SPL_LDSCRIPT		"$(CPUDIR)/am33xx/u-boot-spl.lds"
 | 
			
		||||
+
 | 
			
		||||
+#define CONFIG_ENV_IS_NOWHERE
 | 
			
		||||
+
 | 
			
		||||
+#endif	/* ! __CONFIG_AM335X_EVM_H */
 | 
			
		||||
							
								
								
									
										13
									
								
								systems/lctr-b2xx/patches/u-boot/2017.05/01-am335x-bbb.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								systems/lctr-b2xx/patches/u-boot/2017.05/01-am335x-bbb.patch
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
 | 
			
		||||
index fc8a08f..0cfcec2 100644
 | 
			
		||||
--- a/include/configs/am335x_evm.h
 | 
			
		||||
+++ b/include/configs/am335x_evm.h
 | 
			
		||||
@@ -104,7 +104,7 @@
 | 
			
		||||
 	DEFAULT_FIT_TI_ARGS \
 | 
			
		||||
 	"bootpart=0:2\0" \
 | 
			
		||||
 	"bootdir=/boot\0" \
 | 
			
		||||
-	"bootfile=zImage\0" \
 | 
			
		||||
+	"bootfile=kernel\0" \
 | 
			
		||||
 	"fdtfile=undefined\0" \
 | 
			
		||||
 	"console=ttyO0,115200n8\0" \
 | 
			
		||||
 	"partitions=" \
 | 
			
		||||
@@ -3,4 +3,4 @@ cfg_storage='data0:ext4:/opt'
 | 
			
		||||
cfg_eth_ext_ip='10.0.20.110'
 | 
			
		||||
cfg_eth_ext_mk='255.255.0.0'
 | 
			
		||||
cfg_eth_ext_gw='10.0.0.1'
 | 
			
		||||
cfg_packages='u-boot dropbear rsync busybox e2fsprogs ptpd i2c-tools am33xx-cm3/host linux libav'
 | 
			
		||||
cfg_packages='u-boot dropbear rsync busybox e2fsprogs ptpd i2c-tools am33xx-cm3/host linux opencv libav'
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5496
									
								
								systems/lctr-rpi/cfg/linux-4.4_2017-01-27.cfg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5496
									
								
								systems/lctr-rpi/cfg/linux-4.4_2017-01-27.cfg
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -5,14 +5,13 @@ cfg_services0='network dropbear storage upgrade syslog ptpd'
 | 
			
		||||
cfg_services2='dune'
 | 
			
		||||
cfg_packages='dropbear rsync busybox e2fsprogs dosfstools ptpd rpcbind rpi-boot-firmware linux/rpi'
 | 
			
		||||
cfg_target_linux_kernel='arch/arm/boot/zImage'
 | 
			
		||||
cfg_target_linux_dtb='arch/arm/boot/dts/bcm2709-rpi-2-b.dtb'
 | 
			
		||||
cfg_ptpd_interface='eth0'
 | 
			
		||||
cfg_eth_ext_mk='255.255.0.0'
 | 
			
		||||
cfg_eth_ext_gw='10.0.0.1'
 | 
			
		||||
cfg_terminal='ttyAMA0'
 | 
			
		||||
cfg_terminal='tty1'
 | 
			
		||||
cfg_partitions=\
 | 
			
		||||
(
 | 
			
		||||
    rpi-boot boot0  512B    32MiB
 | 
			
		||||
    rpi-boot BOOT0  512B    32MiB
 | 
			
		||||
    root     root0  32MiB   544MiB
 | 
			
		||||
    data     data0  544MiB  -1
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
@@ -1 +1,13 @@
 | 
			
		||||
# Core.
 | 
			
		||||
arm_freq=1000
 | 
			
		||||
sdram_freq=500
 | 
			
		||||
core_freq=500
 | 
			
		||||
over_voltage=2
 | 
			
		||||
temp_limit=80 #Will throttle to default clock speed if hit.
 | 
			
		||||
 | 
			
		||||
# Disable BT on Rpi3.
 | 
			
		||||
dtoverlay=pi3-disable-bt
 | 
			
		||||
 | 
			
		||||
# Enable RasPicam
 | 
			
		||||
start_x=1
 | 
			
		||||
gpu_mem=128
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								systems/lctr-rpi/fs/etc/inittab
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								systems/lctr-rpi/fs/etc/inittab
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
::sysinit:/sbin/services sysinit
 | 
			
		||||
::restart:/sbin/init
 | 
			
		||||
::respawn:-/usr/sbin/dropbear -F
 | 
			
		||||
::shutdown:/sbin/services syshalt
 | 
			
		||||
							
								
								
									
										45
									
								
								systems/lctr-rpi/fs/etc/rc.d/lauv-storage-client
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								systems/lctr-rpi/fs/etc/rc.d/lauv-storage-client
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,45 @@
 | 
			
		||||
mount_path()
 | 
			
		||||
{
 | 
			
		||||
    rpath="$cfg_lauv_storage_host:$1"
 | 
			
		||||
    lpath="$1"
 | 
			
		||||
 | 
			
		||||
    mkdir -p "$lpath"
 | 
			
		||||
 | 
			
		||||
    mount -t nfs -o wsize=32768 "$rpath" "$lpath"
 | 
			
		||||
    if [ $? -eq 0 ]; then
 | 
			
		||||
        echo "* Mounted '$rpath' in '$lpath'"
 | 
			
		||||
        return 0
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    return 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start()
 | 
			
		||||
{
 | 
			
		||||
    /usr/bin/rpcbind
 | 
			
		||||
    if [ $? -ne 0 ]; then
 | 
			
		||||
        echo "ERROR: failed to start rpcbind."
 | 
			
		||||
        return 1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    for path in $cfg_lauv_storage_paths; do
 | 
			
		||||
        n=0; while [ $n -lt "$cfg_lauv_storage_timeout" ]; do
 | 
			
		||||
                 mount_path "$path"
 | 
			
		||||
                 if [ $? -eq 0 ]; then
 | 
			
		||||
                     break
 | 
			
		||||
                 fi
 | 
			
		||||
 | 
			
		||||
                 let n++
 | 
			
		||||
                 sleep 1
 | 
			
		||||
             done
 | 
			
		||||
    done
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
stop()
 | 
			
		||||
{
 | 
			
		||||
    killall rpcbind
 | 
			
		||||
 | 
			
		||||
    for path in $cfg_lauv_storage_paths; do
 | 
			
		||||
        umount "$path"
 | 
			
		||||
    done
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										125
									
								
								systems/lctr-rpi/fs/etc/rc.d/lauv-storage-server
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										125
									
								
								systems/lctr-rpi/fs/etc/rc.d/lauv-storage-server
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,125 @@
 | 
			
		||||
mount_storage()
 | 
			
		||||
{
 | 
			
		||||
    echo "* Probing storage..."
 | 
			
		||||
 | 
			
		||||
    bdev="$1"
 | 
			
		||||
    if ! [ -b "$bdev" ]; then
 | 
			
		||||
        echo "* Device $bdev does not exist."
 | 
			
		||||
        return 1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    mount -o rw,relatime "$bdev" "$cfg_lauv_storage_dir" 2> /dev/null
 | 
			
		||||
 | 
			
		||||
    if [ $? -ne 0 ]; then
 | 
			
		||||
        echo "* Failed to mount $bdev on $cfg_lauv_storage_dir"
 | 
			
		||||
        return 1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    echo "* Mounted '$bdev' on '$cfg_lauv_storage_dir'"
 | 
			
		||||
    return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
try_mount_storage()
 | 
			
		||||
{
 | 
			
		||||
    n=0; while [ $n -lt 30 ]; do
 | 
			
		||||
             mount_storage "$1"
 | 
			
		||||
 | 
			
		||||
             if [ $? -eq 0 ]; then
 | 
			
		||||
                 return 0
 | 
			
		||||
             fi
 | 
			
		||||
 | 
			
		||||
             sleep 1
 | 
			
		||||
             let n++
 | 
			
		||||
         done
 | 
			
		||||
 | 
			
		||||
    return 1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start_nfs_server()
 | 
			
		||||
{
 | 
			
		||||
    echo "* Creating NFS administrative folder..."
 | 
			
		||||
    mkdir -p /var/lib/nfs
 | 
			
		||||
    if ! [ -d /var/lib/nfs ]; then
 | 
			
		||||
        echo "ERROR: failed to create data folder."
 | 
			
		||||
        return 1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    echo "* Launching rpcbind..."
 | 
			
		||||
    /usr/bin/rpcbind
 | 
			
		||||
    if [ $? -ne 0 ]; then
 | 
			
		||||
        echo "ERROR: failed to start rpcbind."
 | 
			
		||||
        return 1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    echo "* Launching rpc.statd..."
 | 
			
		||||
    /usr/bin/rpc.statd
 | 
			
		||||
    if [ $? -ne 0 ]; then
 | 
			
		||||
        echo "ERROR: failed to start rpc.statd."
 | 
			
		||||
        return 1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    echo "* Launching rpc.nfsd..."
 | 
			
		||||
    /usr/bin/rpc.nfsd
 | 
			
		||||
    if [ $? -ne 0 ]; then
 | 
			
		||||
        echo "ERROR: failed to start rpc.nfsd."
 | 
			
		||||
        return 1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    echo "* Creating NFS filesystem table..."
 | 
			
		||||
    /usr/bin/exportfs -ra
 | 
			
		||||
    if [ $? -ne 0 ]; then
 | 
			
		||||
        echo "ERROR: failed to create filesystem table."
 | 
			
		||||
        return 1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    echo "* Launching rpc.mountd..."
 | 
			
		||||
    /usr/bin/rpc.mountd
 | 
			
		||||
    if [ $? -ne 0 ]; then
 | 
			
		||||
        echo "ERROR: failed to start rpc.mountd."
 | 
			
		||||
        return 1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    echo "* Exporting NFS filesystems..."
 | 
			
		||||
    /usr/bin/exportfs \
 | 
			
		||||
        -o rw,async,no_root_squash,no_subtree_check \
 | 
			
		||||
        10.0.0.0/16:"$cfg_lauv_storage_dir"
 | 
			
		||||
    if [ $? -ne 0 ]; then
 | 
			
		||||
        echo "ERROR: failed to export filesystems."
 | 
			
		||||
        return 1
 | 
			
		||||
    fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
stop_nfs_server()
 | 
			
		||||
{
 | 
			
		||||
    echo "* Unexporting NFS filesystems..."
 | 
			
		||||
    exportfs -au 2> /dev/null
 | 
			
		||||
    echo "* Terminating rpc.mountd..."
 | 
			
		||||
    killall rpc.mountd 2> /dev/null
 | 
			
		||||
    echo "* Terminating rpc.statd..."
 | 
			
		||||
    killall rpc.statd 2> /dev/null
 | 
			
		||||
    echo "* Terminating rpc.bind..."
 | 
			
		||||
    killall rpcbind 2> /dev/null
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
start()
 | 
			
		||||
{
 | 
			
		||||
    mkdir -p "$cfg_lauv_storage_dir"
 | 
			
		||||
 | 
			
		||||
    # Removable storage.
 | 
			
		||||
    if [ "$cfg_lauv_storage" != "internal" ]; then
 | 
			
		||||
        try_mount_storage /dev/sda1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # FIXME: what to do if the above fails.
 | 
			
		||||
    start_nfs_server
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
stop()
 | 
			
		||||
{
 | 
			
		||||
    stop_nfs_server
 | 
			
		||||
 | 
			
		||||
    if [ "$cfg_lauv_storage" != "internal" ]; then
 | 
			
		||||
        echo "* Unmounting storage..."
 | 
			
		||||
        umount "$cfg_lauv_storage_dir"
 | 
			
		||||
    fi
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										4
									
								
								systems/lctr-rpi/mariner-01.cfg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								systems/lctr-rpi/mariner-01.cfg
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
cfg_hostname='mariner-01'
 | 
			
		||||
cfg_eth_ext_ip='10.0.20.125'
 | 
			
		||||
cfg_packages="$cfg_packages raspicam libjpeg-turbo v4l-utils uv4l libav"
 | 
			
		||||
cfg_modules="$cfg_modules ftdi_sio"
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
cfg_hostname='nest-1'
 | 
			
		||||
cfg_eth_ext_ip='10.0.200.40'
 | 
			
		||||
cfg_eth_ext_ip='10.0.35.1'
 | 
			
		||||
cfg_services1='huawei'
 | 
			
		||||
cfg_packages="$cfg_packages ppp iptables"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								systems/lctr-rpi/rpi-camera-aux.cfg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								systems/lctr-rpi/rpi-camera-aux.cfg
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
cfg_hostname='rpi-camera-aux'
 | 
			
		||||
cfg_eth_ext_ip='10.0.200.52'
 | 
			
		||||
cfg_services1='lauv-storage-server'
 | 
			
		||||
cfg_packages='dropbear rsync busybox e2fsprogs dosfstools rpcbind rpi-boot-firmware linux/rpi exiv2 pointgrey opencv nfs-utils'
 | 
			
		||||
cfg_services0='network dropbear storage upgrade syslog'
 | 
			
		||||
cfg_modules="$cfg_modules ftdi_sio"
 | 
			
		||||
cfg_terminal='ttyAMA0'
 | 
			
		||||
cfg_ptpd_interface='eth0'
 | 
			
		||||
cfg_lauv_storage_dir='/opt/lsts/dune/log'
 | 
			
		||||
							
								
								
									
										12
									
								
								systems/lctr-rpi/rpi-camera-main.cfg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								systems/lctr-rpi/rpi-camera-main.cfg
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
cfg_hostname='rpi-camera-main'
 | 
			
		||||
cfg_eth_ext_ip='10.0.200.53'
 | 
			
		||||
cfg_services1='lauv-storage-client'
 | 
			
		||||
cfg_packages='dropbear rsync busybox e2fsprogs dosfstools rpcbind rpi-boot-firmware linux/rpi exiv2 pointgrey opencv nfs-utils'
 | 
			
		||||
cfg_services0='network dropbear storage upgrade syslog'
 | 
			
		||||
cfg_modules="$cfg_modules ftdi_sio"
 | 
			
		||||
cfg_terminal='ttyAMA0'
 | 
			
		||||
cfg_ptpd_interface='eth0'
 | 
			
		||||
cfg_lauv_storage_host=10.0.200.52
 | 
			
		||||
cfg_lauv_storage_paths=/opt/lsts/dune/log
 | 
			
		||||
cfg_lauv_storage_timeout=20
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										9
									
								
								systems/lctr-rpi/test-rpi.cfg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								systems/lctr-rpi/test-rpi.cfg
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
cfg_hostname='test-rpi'
 | 
			
		||||
cfg_eth_ext_ip='10.0.200.52'
 | 
			
		||||
cfg_services1=''
 | 
			
		||||
cfg_packages='dropbear rsync busybox e2fsprogs dosfstools ptpd rpcbind rpi-boot-firmware linux/rpi libconfig log4cpp crypto++'
 | 
			
		||||
cfg_services0='network dropbear storage upgrade syslog ptpd'
 | 
			
		||||
cfg_modules="$cfg_modules ftdi_sio"
 | 
			
		||||
cfg_terminal='ttyAMA0'
 | 
			
		||||
cfg_ptpd_interface='eth0'
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										4
									
								
								systems/lctr-rpi/x2o-01.cfg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								systems/lctr-rpi/x2o-01.cfg
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
cfg_hostname='x2o-01'
 | 
			
		||||
cfg_eth_ext_ip='10.0.20.140'
 | 
			
		||||
cfg_packages="$cfg_packages raspicam libjpeg-turbo v4l-utils uv4l libav"
 | 
			
		||||
cfg_modules="$cfg_modules ftdi_sio"
 | 
			
		||||
							
								
								
									
										4
									
								
								systems/lctr-rpi/x2o-02.cfg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								systems/lctr-rpi/x2o-02.cfg
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
cfg_hostname='x2o-02'
 | 
			
		||||
cfg_eth_ext_ip='10.0.20.145'
 | 
			
		||||
cfg_packages="$cfg_packages raspicam libjpeg-turbo v4l-utils uv4l libav"
 | 
			
		||||
cfg_modules="$cfg_modules ftdi_sio"
 | 
			
		||||
							
								
								
									
										4
									
								
								systems/lctr-rpi/x8-08.cfg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								systems/lctr-rpi/x8-08.cfg
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
cfg_hostname='x8-08'
 | 
			
		||||
cfg_eth_ext_ip='10.0.20.115'
 | 
			
		||||
cfg_packages="$cfg_packages raspicam opencv uv4l libav"
 | 
			
		||||
cfg_modules="$cfg_modules ftdi_sio"
 | 
			
		||||
		Reference in New Issue
	
	Block a user