Compare commits
17 Commits
glued-2016
...
feature/ne
Author | SHA1 | Date | |
---|---|---|---|
|
7c15c5d1c4 | ||
|
6fe196ad09 | ||
|
b5dba77554 | ||
|
15dd2b7bd6 | ||
|
eddb1c7611 | ||
|
6b7b82786e | ||
|
f9b7edea6e | ||
|
62730377b2 | ||
|
4ff07d69e0 | ||
|
77752d3db9 | ||
|
79e474bd3d | ||
|
0e030cb595 | ||
|
08117b4b9a | ||
|
e24efe0258 | ||
|
b648eab591 | ||
|
c3f5888e1a | ||
|
4ad474f096 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,3 +10,4 @@
|
|||||||
/lauv-aux-rpi
|
/lauv-aux-rpi
|
||||||
/ntnu-b2xx
|
/ntnu-b2xx
|
||||||
/stamp9g20
|
/stamp9g20
|
||||||
|
/lctr-rpi
|
||||||
|
37
docker/Dockerfile
Normal file
37
docker/Dockerfile
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
###########################################################################
|
||||||
|
# GLUED: GNU/Linux Uniform Environment Distribution #
|
||||||
|
# Copyright (C) 2016 OceanScan - Marine Systems & Technology, Lda. #
|
||||||
|
###########################################################################
|
||||||
|
# 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 2 of the License, 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; if not, write to the Free Software #
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA #
|
||||||
|
# 02110-1301 USA. #
|
||||||
|
###########################################################################
|
||||||
|
# Author: Ricardo Martins #
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
FROM debian:8
|
||||||
|
|
||||||
|
MAINTAINER Ricardo Martins <rasm@oceanscan-mst.com>
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
|
# Update distro.
|
||||||
|
RUN apt-get update -y
|
||||||
|
RUN apt-get dist-upgrade -y
|
||||||
|
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
|
31
docker/Makefile
Normal file
31
docker/Makefile
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
###########################################################################
|
||||||
|
# GLUED: GNU/Linux Uniform Environment Distribution #
|
||||||
|
# Copyright (C) 2016 OceanScan - Marine Systems & Technology, Lda. #
|
||||||
|
###########################################################################
|
||||||
|
# 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 2 of the License, 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; if not, write to the Free Software #
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA #
|
||||||
|
# 02110-1301 USA. #
|
||||||
|
###########################################################################
|
||||||
|
# Author: Ricardo Martins #
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
TAG := glued
|
||||||
|
VERSION := 2016.05.0
|
||||||
|
VOLUME := $(CURDIR)/..
|
||||||
|
|
||||||
|
all:
|
||||||
|
docker build -t $(TAG):$(VERSION) .
|
||||||
|
|
||||||
|
shell:
|
||||||
|
docker run -w $(VOLUME) -i -a stdin -a stdout -v $(VOLUME):$(VOLUME) -t $(TAG):$(VERSION)
|
10
mkdisk.bash
10
mkdisk.bash
@@ -103,15 +103,17 @@ create_part_rpiboot()
|
|||||||
|
|
||||||
for f in "$cfg_sys_family/rootfs/boot/"*; do
|
for f in "$cfg_sys_family/rootfs/boot/"*; do
|
||||||
nfo2 installing $f to boot partition
|
nfo2 installing $f to boot partition
|
||||||
cp "$f" mount || die
|
cp -r "$f" mount || die
|
||||||
done
|
done
|
||||||
|
|
||||||
nfo2 renaming kernel to kernel7.img
|
nfo2 renaming kernel to kernel7.img
|
||||||
mv mount/kernel mount/kernel7.img
|
mv mount/kernel mount/kernel7.img
|
||||||
|
|
||||||
dtb=$(basename "$cfg_target_linux_dtb")
|
if [ -f mount/board.dtb ]; then
|
||||||
nfo2 renaming board.dtb to "$dtb"
|
dtb=$(basename "$cfg_target_linux_dtb")
|
||||||
mv "mount/board.dtb" "mount/$dtb"
|
nfo2 renaming board.dtb to "$dtb"
|
||||||
|
mv "mount/board.dtb" "mount/$dtb"
|
||||||
|
fi
|
||||||
|
|
||||||
cmd_parted "$dev_loop" \
|
cmd_parted "$dev_loop" \
|
||||||
set "$part_nr" lba on \
|
set "$part_nr" lba on \
|
||||||
|
@@ -60,7 +60,7 @@ done
|
|||||||
|
|
||||||
# Copy DTB.
|
# Copy DTB.
|
||||||
if [ -n "$cfg_target_linux_dtb" ]; then
|
if [ -n "$cfg_target_linux_dtb" ]; then
|
||||||
cp -v "$cfg_dir_toolchain/boot/$(basename $cfg_target_linux_dtb)" "$cfg_dir_rootfs/boot/board.dtb"
|
cp -v "$cfg_dir_rootfs/boot/$(basename $cfg_target_linux_dtb)" "$cfg_dir_rootfs/boot/board.dtb"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Write config vars.
|
# Write config vars.
|
||||||
|
@@ -89,7 +89,7 @@ kernel_mtd_part()
|
|||||||
|
|
||||||
uboot_mtd_part()
|
uboot_mtd_part()
|
||||||
{
|
{
|
||||||
echo -n "* Detecting u-boot MTD paritition... "
|
echo -n "* Detecting u-boot MTD partition... "
|
||||||
if ! [ -f /proc/mtd ]; then
|
if ! [ -f /proc/mtd ]; then
|
||||||
echo "filesystem"
|
echo "filesystem"
|
||||||
return 0
|
return 0
|
||||||
@@ -239,12 +239,19 @@ rpi2_boot_part_upgrade()
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
dtb="bcm2709-rpi-2-b.dtb"
|
for f in overlays; do
|
||||||
if [ -f "/mnt/$dtb" ]; then
|
if [ -d "/mnt/$f" ]; then
|
||||||
|
echo -en "* $label: Replacing $f... "
|
||||||
|
rm -rf "/mnt/$f" && cp -r "$base/.glued-new/boot/$f" /mnt
|
||||||
|
echo 'done'
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
for dtb in "$base/.glued-new/boot/"*.dtb; do
|
||||||
echo -en "* $label: Replacing $dtb... "
|
echo -en "* $label: Replacing $dtb... "
|
||||||
cp "$base/.glued-new/boot/board.dtb" "/mnt/$dtb"
|
cp "$dtb" "/mnt"
|
||||||
echo 'done'
|
echo 'done'
|
||||||
fi
|
done
|
||||||
|
|
||||||
kernel='kernel7.img'
|
kernel='kernel7.img'
|
||||||
if [ -f "/mnt/$kernel" ]; then
|
if [ -f "/mnt/$kernel" ]; then
|
||||||
@@ -265,15 +272,17 @@ rpi2_boot_part_upgrade()
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if board is a Raspberry Pi 2.
|
# Check if board is a Raspberry Pi 2/3.
|
||||||
rpi2_boot_part_upgrade_check()
|
rpi2_boot_part_upgrade_check()
|
||||||
{
|
{
|
||||||
dmesg | grep Machine | grep BCM2709 > /dev/null 2>&1
|
for machine in 'bcm2709' 'raspberry pi'; do
|
||||||
if [ $? -eq 0 ]; then
|
dmesg | grep Machine | grep -i "$machine" > /dev/null 2>&1
|
||||||
echo "* rpi2: machine detected"
|
if [ $? -eq 0 ]; then
|
||||||
rpi2_boot_part_upgrade "rpi2" "/dev/mmcblk0p1"
|
echo "* rpi2: machine detected"
|
||||||
return 0
|
rpi2_boot_part_upgrade "rpi2" "/dev/mmcblk0p1"
|
||||||
fi
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
old_move()
|
old_move()
|
||||||
|
@@ -16,5 +16,5 @@ build()
|
|||||||
host_install()
|
host_install()
|
||||||
{
|
{
|
||||||
$cmd_make install &&
|
$cmd_make install &&
|
||||||
ln -fs kmod "$cfg_dir_toolchain/sbin/depmod"
|
ln -fs ../bin/kmod "$cfg_dir_toolchain/sbin/depmod"
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
version=\
|
version=\
|
||||||
(
|
(
|
||||||
'1.6.19'
|
'1.6.23'
|
||||||
)
|
)
|
||||||
|
|
||||||
url=\
|
url=\
|
||||||
@@ -10,7 +10,7 @@ url=\
|
|||||||
|
|
||||||
md5=\
|
md5=\
|
||||||
(
|
(
|
||||||
'1e6a458429e850fc93c1f3b6dc00a48f'
|
'9b320a05ed4db1f3f0865c8a951fd9aa '
|
||||||
)
|
)
|
||||||
|
|
||||||
configure()
|
configure()
|
||||||
|
@@ -25,6 +25,9 @@ requires=\
|
|||||||
'lz4/host'
|
'lz4/host'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# This variable is updated by find_patches().
|
||||||
|
patches=()
|
||||||
|
|
||||||
# Major/Minor version.
|
# Major/Minor version.
|
||||||
linux_mm_version()
|
linux_mm_version()
|
||||||
{
|
{
|
||||||
@@ -37,17 +40,21 @@ linux_mmp_version()
|
|||||||
echo "$version" | cut -f1 -d-
|
echo "$version" | cut -f1 -d-
|
||||||
}
|
}
|
||||||
|
|
||||||
patches=(\
|
find_patches()
|
||||||
$(ls -1 \
|
{
|
||||||
"$pkg_dir/patches/$version/"*.patch \
|
patches=(\
|
||||||
"$pkg_dir/patches/$(linux_mmp_version)/"*.patch \
|
$(ls -1 \
|
||||||
"$pkg_dir/patches/$(linux_mm_version)/"*.patch \
|
"$pkg_dir/patches/$version/"*.patch \
|
||||||
"$cfg_dir_system/patches/linux/$version/"*.patch \
|
"$pkg_dir/patches/$(linux_mmp_version)/"*.patch \
|
||||||
"$cfg_dir_system/patches/linux/$(linux_mmp_version)/"*.patch \
|
"$pkg_dir/patches/$(linux_mm_version)/"*.patch \
|
||||||
"$cfg_dir_system/patches/linux/$(linux_mm_version)/"*.patch \
|
"$cfg_dir_system/patches/linux/$version/"*.patch \
|
||||||
2> /dev/null | awk '!a[$0]++')
|
"$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.
|
# Get configuration file.
|
||||||
linux_cfg_file()
|
linux_cfg_file()
|
||||||
@@ -121,12 +128,14 @@ build()
|
|||||||
$cmd_make \
|
$cmd_make \
|
||||||
CROSS_COMPILE=$cfg_target_canonical- \
|
CROSS_COMPILE=$cfg_target_canonical- \
|
||||||
ARCH=$cfg_target_linux \
|
ARCH=$cfg_target_linux \
|
||||||
|
DEPMOD="$cfg_dir_toolchain/sbin/depmod" \
|
||||||
modules || return 1
|
modules || return 1
|
||||||
|
|
||||||
if [ "$(basename $cfg_target_linux_kernel)" = 'uImage' ]; then
|
if [ "$(basename $cfg_target_linux_kernel)" = 'uImage' ]; then
|
||||||
$cmd_make \
|
$cmd_make \
|
||||||
CROSS_COMPILE=$cfg_target_canonical- \
|
CROSS_COMPILE=$cfg_target_canonical- \
|
||||||
ARCH=$cfg_target_linux \
|
ARCH=$cfg_target_linux \
|
||||||
|
DEPMOD="$cfg_dir_toolchain/sbin/depmod" \
|
||||||
uImage || return 1
|
uImage || return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -135,6 +144,7 @@ build()
|
|||||||
$cmd_make \
|
$cmd_make \
|
||||||
CROSS_COMPILE=$cfg_target_canonical- \
|
CROSS_COMPILE=$cfg_target_canonical- \
|
||||||
ARCH=$cfg_target_linux \
|
ARCH=$cfg_target_linux \
|
||||||
|
DEPMOD="$cfg_dir_toolchain/sbin/depmod" \
|
||||||
zImage || return 1
|
zImage || return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -143,6 +153,7 @@ build()
|
|||||||
$cmd_make \
|
$cmd_make \
|
||||||
CROSS_COMPILE=$cfg_target_canonical- \
|
CROSS_COMPILE=$cfg_target_canonical- \
|
||||||
ARCH=$cfg_target_linux \
|
ARCH=$cfg_target_linux \
|
||||||
|
DEPMOD="$cfg_dir_toolchain/sbin/depmod" \
|
||||||
dtbs || return 1
|
dtbs || return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -153,15 +164,6 @@ build()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
host_install()
|
|
||||||
{
|
|
||||||
# Device tree blobs.
|
|
||||||
if [ -n "$cfg_target_linux_dtb" ]; then
|
|
||||||
$cmd_mkdir "$cfg_dir_toolchain/boot" &&
|
|
||||||
cp -v "$(dirname $cfg_target_linux_dtb)/"*.dtb "$cfg_dir_toolchain/boot"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
target_install()
|
target_install()
|
||||||
{
|
{
|
||||||
if [ -n "$(file "$cfg_target_linux_kernel" | grep ELF)" ]; then
|
if [ -n "$(file "$cfg_target_linux_kernel" | grep ELF)" ]; then
|
||||||
@@ -177,15 +179,33 @@ target_install()
|
|||||||
return 1
|
return 1
|
||||||
fi
|
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 \
|
$cmd_make \
|
||||||
CROSS_COMPILE="$cfg_target_canonical-" \
|
CROSS_COMPILE="$cfg_target_canonical-" \
|
||||||
ARCH="$cfg_target_linux" \
|
ARCH="$cfg_target_linux" \
|
||||||
INSTALL_MOD_PATH="$cfg_dir_rootfs/usr" \
|
INSTALL_MOD_PATH="$cfg_dir_rootfs/usr" \
|
||||||
|
KBUILD_VERBOSE=1 \
|
||||||
|
DEPMOD="$cfg_dir_toolchain/sbin/depmod" \
|
||||||
modules_install
|
modules_install
|
||||||
|
|
||||||
$cmd_make \
|
$cmd_make \
|
||||||
CROSS_COMPILE="$cfg_target_canonical-" \
|
CROSS_COMPILE="$cfg_target_canonical-" \
|
||||||
ARCH="$cfg_target_linux" \
|
ARCH="$cfg_target_linux" \
|
||||||
INSTALL_MOD_PATH="$cfg_dir_rootfs/usr" \
|
INSTALL_MOD_PATH="$cfg_dir_rootfs/usr" \
|
||||||
|
KBUILD_VERBOSE=1 \
|
||||||
|
DEPMOD="$cfg_dir_toolchain/sbin/depmod" \
|
||||||
firmware_install
|
firmware_install
|
||||||
}
|
}
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
cfg_hostname='caravela'
|
cfg_hostname='caravela'
|
||||||
cfg_eth_ext_ip='10.0.10.40'
|
cfg_eth_ext_ip='10.0.10.40'
|
||||||
cfg_packages="$cfg_packages ppp iptables"
|
cfg_packages="$cfg_packages ppp iptables"
|
||||||
|
cfg_modules="$cfg_modules ftdi_sio"
|
||||||
|
@@ -1529,7 +1529,7 @@ CONFIG_USB_SERIAL_GENERIC=y
|
|||||||
# CONFIG_USB_SERIAL_CP210X is not set
|
# CONFIG_USB_SERIAL_CP210X is not set
|
||||||
# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
|
# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
|
||||||
# CONFIG_USB_SERIAL_EMPEG is not set
|
# CONFIG_USB_SERIAL_EMPEG is not set
|
||||||
# CONFIG_USB_SERIAL_FTDI_SIO is not set
|
CONFIG_USB_SERIAL_FTDI_SIO=m
|
||||||
# CONFIG_USB_SERIAL_VISOR is not set
|
# CONFIG_USB_SERIAL_VISOR is not set
|
||||||
# CONFIG_USB_SERIAL_IPAQ is not set
|
# CONFIG_USB_SERIAL_IPAQ is not set
|
||||||
# CONFIG_USB_SERIAL_IR is not set
|
# CONFIG_USB_SERIAL_IR is not set
|
||||||
|
2499
systems/lctr-rpi/cfg/linux-3.18_2015-06-03.cfg
Normal file
2499
systems/lctr-rpi/cfg/linux-3.18_2015-06-03.cfg
Normal file
File diff suppressed because it is too large
Load Diff
18
systems/lctr-rpi/config
Normal file
18
systems/lctr-rpi/config
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
cfg_architecture='cortex-a8-hardfp'
|
||||||
|
cfg_storage='data0:ext4:/opt'
|
||||||
|
cfg_modules=''
|
||||||
|
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_partitions=\
|
||||||
|
(
|
||||||
|
rpi-boot boot0 512B 32MiB
|
||||||
|
root root0 32MiB 544MiB
|
||||||
|
data data0 544MiB -1
|
||||||
|
)
|
1
systems/lctr-rpi/fs/boot/config.txt
Normal file
1
systems/lctr-rpi/fs/boot/config.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
arm_freq=1000
|
2
systems/lctr-rpi/fs/etc/mdev.conf
Normal file
2
systems/lctr-rpi/fs/etc/mdev.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ttyAMA0 root:root 660 >terminal
|
||||||
|
ttyUSB[0-9]* root:root 660 */sbin/mdev-ttyusb
|
4
systems/lctr-rpi/nest-1.cfg
Normal file
4
systems/lctr-rpi/nest-1.cfg
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
cfg_hostname='nest-1'
|
||||||
|
cfg_eth_ext_ip='10.0.200.40'
|
||||||
|
cfg_packages="$cfg_packages ppp iptables"
|
||||||
|
|
Reference in New Issue
Block a user