[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.3-750-g5ed4bdc
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2015-05-21 10:36:21
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 5ed4bdc83acdb2b42c3586bdf19d902a8141e2e6 (commit)
from 9010e13b8c9a5d9f726d397968add04562ff4624 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5ed4bdc83acdb2b42c3586bdf19d902a8141e2e6
Author: Julien Boibessot <jul...@ar...>
Date: Thu May 21 12:35:50 2015 +0200
[TEST] Updates some release tests for APF6: USB, PWM, RS232, imxregs, mplayer
-----------------------------------------------------------------------
Summary of changes:
target/test/packages/test_imxregs.sh | 5 ++-
target/test/packages/test_mplayer.sh | 4 +-
target/test/test_pwm.sh | 98 +++++++++++++++++++++++++++-------
target/test/test_release.sh | 1 +
target/test/test_rs232.sh | 13 ++++-
target/test/test_usb_device.sh | 2 +-
target/test/test_usb_host.sh | 2 +-
7 files changed, 100 insertions(+), 25 deletions(-)
diff --git a/target/test/packages/test_imxregs.sh b/target/test/packages/test_imxregs.sh
index 8a78c58..0fed315 100755
--- a/target/test/packages/test_imxregs.sh
+++ b/target/test/packages/test_imxregs.sh
@@ -3,7 +3,7 @@
#
# Script to test a Buildroot package for Armadeus Software release
#
-# Copyright (C) 2008-2012 The Armadeus Project
+# Copyright (C) 2008-2015 The Armadeus Project
#
# 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
@@ -34,6 +34,9 @@ set_ids()
elif [ "$1" == "APF28" ]; then
ID_REG="HW_DIGCTL_CHIP_ID"
ID_VAL="0x28000001"
+ elif [ "$1" == "APF6" ]; then
+ ID_REG="PMU_MISC2"
+ ID_VAL="0x00676767"
fi
echo "$APF"
diff --git a/target/test/packages/test_mplayer.sh b/target/test/packages/test_mplayer.sh
index 03e11ea..ca51fec 100755
--- a/target/test/packages/test_mplayer.sh
+++ b/target/test/packages/test_mplayer.sh
@@ -3,7 +3,7 @@
#
# Script to test mplayer's Buildroot package for Armadeus software release
#
-# Copyright (C) 2008-2013 The Armadeus Project
+# Copyright (C) 2008-2015 The Armadeus Project
#
# 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
@@ -24,7 +24,7 @@ FBDEV=fbdev
platform_specific_stuff()
{
- if [ "$1" == "APF28" ]; then
+ if [ "$1" == "APF28" ] || [ "$1" == "APF6" ]; then
FBDEV=fbdev2
fi
}
diff --git a/target/test/test_pwm.sh b/target/test/test_pwm.sh
index f265b72..43f356e 100755
--- a/target/test/test_pwm.sh
+++ b/target/test/test_pwm.sh
@@ -3,7 +3,7 @@
#
# Script to test Armadeus Software release
#
-# Copyright (C) 2010-2013 The Armadeus Project - Armadeus Systems
+# Copyright (C) 2010-2015 The Armadeus Project - Armadeus Systems
#
# 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
@@ -22,8 +22,9 @@ source ./test_env.sh
SYS_DIR="/sys/class/pwm/pwm0/"
PERIOD="1000 2000 3000 4000 5000 6000 7000 8000 9000 10000"
FREQUENCY="100 200 300 400 500 600 700 800"
-DUTY="001 250 333 500 666 750 999"
+DUTY="001 250 333 500 666 750 999" # may be overwritten in test
SLEEP_TIME=4
+SYS_DUTY=$SYS_DIR/duty
load_driver()
{
@@ -44,6 +45,13 @@ LED so you can't have both\nwith default\
echo "can't find /sys/ interface"
exit_failed
fi
+ elif [ "$1" == "APF6" ]; then
+ SYS_DIR="/sys/class/pwm/pwmchip2/pwm0"
+ echo 0 > /sys/class/pwm/pwmchip2/export
+ if [ ! -d "$SYS_DIR" ]; then
+ echo "can't find /sys/ interface"
+ exit_failed
+ fi
else
echo "Platform not supported by this test"
exit 0
@@ -63,23 +71,19 @@ prepare_test()
EXTRA_PLAT_MSG="\n (you can also watch i.MX LED; requires a custom built kernel)"
elif [ "$1" == "APF28" ]; then
PLAT_MSG="to pin 26 of J10 connector (GND is on pin 32 or 34)"
+ elif [ "$1" == "APF6" ]; then
+ PLAT_MSG="to pin 26 of J2 (LVDS) connector (GND is on pin 32 or 34)"
+ EXTRA_PLAT_MSG="\n (PWM3 is inverted and may be used as backlight and require a modified dtb)"
fi
ask_user "$OSCILLO $PLAT_MSG, $WHEN_READY $EXTRA_PLAT_MSG"
}
-test_pwm()
+test_pwm_frequency()
{
- show_test_banner "PWM"
-
- execute_for_target load_driver
-
- if [ "$1" != "" ]; then
- prepare_test $1
- else
- execute_for_target prepare_test
+ if [ "$1" == "APF6" ]; then
+ return
fi
-
ask_user "Press ENTER when ready to check PWM output (frequencies starting at 100Hz)"
echo 1 > $SYS_DIR/active
# Test frequency setting
@@ -88,28 +92,84 @@ test_pwm()
echo "Setting PWM frequency to $freq Hz"
sleep $SLEEP_TIME
done
+}
+test_pwm_period()
+{
+ UNIT=us
+ ONE_MHZ=1000000 # us
+ if [ "$1" == "APF6" ]; then
+ UNIT=ns
+ ONE_MHZ=1000000000 # ns
+ echo 1 > $SYS_DIR/enable
+ SYS_DUTY=$SYS_DIR/duty_cycle
+ fi
ask_user "Press ENTER when ready to check PWM output (periods)"
# Test period setting
for period in $PERIOD; do
+ if [ "$1" == "APF6" ]; then
+ period=$((period*1000)) # us -> ns
+ duty=$((period/2))
+ echo $duty > $SYS_DUTY
+ fi
echo $period > $SYS_DIR/period
- freq=$((1000000/period))
- echo "Setting PWM period to $period us (-> $freq Hz)"
+ freq=$((ONE_MHZ / period))
+ echo "Setting PWM period to $period $UNIT (-> $freq Hz)"
sleep $SLEEP_TIME
done
+}
+test_pwm_duty()
+{
+ DUTY_MAX=1000
+ PERIOD=10000
+ if [ "$1" == "APF6" ]; then
+ PERIOD=10000000
+ DUTY="100000 2500000 3333333 5000000 6666666 7500000 9900000"
+ DUTY_MAX=10000000
+ SYS_DUTY=$SYS_DIR/duty_cycle
+ fi
ask_user "Press ENTER when ready to check PWM output (duty cycle @ 100Hz)"
# Test duty cycle setting @ 100Hz -> duty value = positive width signal value
- echo 100 > $SYS_DIR/frequency
+ echo $PERIOD > $SYS_DIR/period
for duty in $DUTY; do
- echo $duty > $SYS_DIR/duty
- echo "Setting duty cycle to $duty/1000 "
+ echo $duty > $SYS_DUTY
+ echo "Setting duty cycle to $duty/$DUTY_MAX"
sleep $SLEEP_TIME
done
+}
- echo 500 > $SYS_DIR/duty
- echo 0 > $SYS_DIR/active
+test_pwm_end()
+{
+ if [ "$1" == "APF6" ]; then
+ echo 500 > $SYS_DIR/duty_cycle
+ echo 0 > $SYS_DIR/enable
+ else
+ echo 500 > $SYS_DIR/duty
+ echo 0 > $SYS_DIR/active
+ fi
echo "End of PWM test"
+}
+
+test_pwm()
+{
+ show_test_banner "PWM"
+
+ execute_for_target load_driver
+
+ if [ "$1" != "" ]; then
+ prepare_test $1
+ else
+ execute_for_target prepare_test
+ fi
+
+ execute_for_target test_pwm_frequency
+
+ execute_for_target test_pwm_period
+
+ execute_for_target test_pwm_duty
+
+ execute_for_target test_pwm_end
ask_user "Did you get correct signals ? (y/N)"
if [ "$response" != "y" ] && [ "$response" != "yes" ]; then
diff --git a/target/test/test_release.sh b/target/test/test_release.sh
index 4ea1bbe..7a8c4be 100755
--- a/target/test/test_release.sh
+++ b/target/test/test_release.sh
@@ -39,6 +39,7 @@ if [ "$response" != "y" ] && [ "$response" != "yes" ]; then
fi
# Here we go ! (First start with Linux)
+udhcpc -i eth0 # activate eth0 if not already done
$THIS_DIR/test_ethernet.sh
echo
$THIS_DIR/test_usb_host.sh
diff --git a/target/test/test_rs232.sh b/target/test/test_rs232.sh
index 692a2b0..0c18476 100755
--- a/target/test/test_rs232.sh
+++ b/target/test/test_rs232.sh
@@ -3,7 +3,7 @@
#
# Script to test Armadeus Software release
#
-# Copyright (C) 2008-2013 The Armadeus Project - Armadeus Systems
+# Copyright (C) 2008-2015 The Armadeus Project - Armadeus Systems
#
# 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
@@ -46,6 +46,14 @@ echo_jumper_help()
else
echo " (No consign yet for this port)"
fi
+ elif [ "$1" == "APF6" ]; then
+ if [ "$2" == "4" ]; then
+ echo
+ echo " (Pin 15 & 16 (CTS/RTS) and 17 & 18 (Rx/Tx) of J5 connector | o o o o o o o v v o |)"
+ echo " | o o o o o o o ^ ^ o |"
+ else
+ echo " (No consign yet for this port)"
+ fi
else
echo "Platform not supported by this test"
fi
@@ -114,6 +122,9 @@ configure_ports_devices()
else
SERIAL_DEVICES="/dev/ttyAPP"
fi
+ elif [ "$1" == "APF6" ]; then
+ REGEXPR="[4]"
+ SERIAL_DEVICES="/dev/ttymxc"
else
echo "$1 platform not supported by this test"
exit 0
diff --git a/target/test/test_usb_device.sh b/target/test/test_usb_device.sh
index 5b47dd9..7ace5fb 100755
--- a/target/test/test_usb_device.sh
+++ b/target/test/test_usb_device.sh
@@ -22,7 +22,7 @@ check_driver()
elif [ "$1" == "APF27" ]; then
echo "APF27 do not support USB device mode"
exit 0
- elif [ "$1" == "APF51" ] || [ "$1" == "APF28" ]; then
+ elif [ "$1" == "APF51" ] || [ "$1" == "APF28" ] || [ "$1" == "APF6" ]; then
dmesg | grep "USB" | grep "Device"
STORAGE_DRIVER=g_mass_storage
else
diff --git a/target/test/test_usb_host.sh b/target/test/test_usb_host.sh
index 17279ad..10ee298 100755
--- a/target/test/test_usb_host.sh
+++ b/target/test/test_usb_host.sh
@@ -71,7 +71,7 @@ test_usb_host()
# execute_for_target load_usb_host_driver_apf9328 echo
BOARD=`cat /etc/machine`
- if [ "$BOARD" == "APF28" ]; then
+ if [ "$BOARD" == "APF28" ] || [ "$BOARD" == "APF6" ]; then
wait_key_insertion "the"
check_usb_key
wait_key_removal
hooks/post-receive
--
armadeus
|