Compare commits

...

17 Commits

Author SHA1 Message Date
João Teixeira
7c15c5d1c4 lctr-rpi: ignore lctr-rpi build folder 2016-11-30 20:08:05 +00:00
João Teixeira
6fe196ad09 lctr-rpi:nest-1 add suport to mobile internet 2016-11-30 20:05:30 +00:00
João Teixeira
b5dba77554 lctr-rpi: Add configuration files for main cpu,(systems based in raspberry pi) 2016-11-29 17:29:12 +00:00
mariacosta
15dd2b7bd6 pkrootfs: DTB currently is in root folder. 2016-10-03 17:08:52 +01:00
Ricardo Martins
eddb1c7611 libpng: upgraded to v1.6.23. 2016-06-20 11:21:26 +01:00
Ricardo Martins
6b7b82786e linux: forced depmod path. 2016-06-14 19:30:56 +01:00
Ricardo Martins
f9b7edea6e kmod: fixed symlink. 2016-06-14 19:30:29 +01:00
Ricardo Martins
62730377b2 docker: install file package. 2016-06-14 18:54:37 +01:00
Ricardo Martins
4ff07d69e0 docker: added script to create docker container suitable to build GLUED. 2016-06-03 14:23:22 +01:00
João Teixeira
77752d3db9 lctr-a6xx: added FTDI support to caravela 2016-06-01 16:41:30 +01:00
Ricardo Martins
79e474bd3d filesystem: added support for Raspberry Pi 3. 2016-05-18 12:45:31 +01:00
Ricardo Martins
0e030cb595 linux: install all dtbs to root folder. 2016-05-18 12:44:52 +01:00
Ricardo Martins
08117b4b9a mkdisk: copy boot files recursively, added support for multiple dtbs. 2016-05-18 12:44:21 +01:00
Ricardo Martins
e24efe0258 lauv-aux-rpi: moved config.txt to system folder. 2016-05-17 19:10:08 +01:00
Ricardo Martins
b648eab591 lauv-aux-rpi: moved config.txt to system folder. 2016-05-17 19:09:55 +01:00
Ricardo Martins
c3f5888e1a linux: added support for device tree overlays and added function to find patches. 2016-05-17 19:08:51 +01:00
Ricardo Martins
4ad474f096 filesystem: updated upgrade script to support newer kernels. 2016-05-17 19:06:30 +01:00
17 changed files with 2666 additions and 41 deletions

1
.gitignore vendored
View File

@@ -10,3 +10,4 @@
/lauv-aux-rpi /lauv-aux-rpi
/ntnu-b2xx /ntnu-b2xx
/stamp9g20 /stamp9g20
/lctr-rpi

37
docker/Dockerfile Normal file
View 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
View 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)

View File

@@ -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 \

View File

@@ -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.

View File

@@ -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()

View File

@@ -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"
} }

View File

@@ -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()

View File

@@ -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
} }

View File

@@ -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"

View File

@@ -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

File diff suppressed because it is too large Load Diff

18
systems/lctr-rpi/config Normal file
View 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
)

View File

@@ -0,0 +1 @@
arm_freq=1000

View File

@@ -0,0 +1,2 @@
ttyAMA0 root:root 660 >terminal
ttyUSB[0-9]* root:root 660 */sbin/mdev-ttyusb

View File

@@ -0,0 +1,4 @@
cfg_hostname='nest-1'
cfg_eth_ext_ip='10.0.200.40'
cfg_packages="$cfg_packages ppp iptables"