[Automated-testing] Looking for a Debian kernel provisioning solution

Kieran Bingham kbingham at kernel.org
Thu Jan 25 14:36:50 PST 2018


On 25/01/18 22:25, Paul Barker wrote:
> On Thu, Jan 25, 2018 at 10:11 PM, Kieran Bingham <kbingham at kernel.org> wrote:
>> Hi Paul,
>>
>> On 25/01/18 21:58, Paul Barker wrote:
>>> On Thu, Jan 25, 2018 at 6:46 AM, Robert Schwebel
>>> <r.schwebel at pengutronix.de> wrote:
>>>> Hi Tim,
>>>>
>>>> On Wed, Jan 24, 2018 at 10:21:01PM +0000, Bird, Timothy wrote:
>>>>> So, I want to test LTS kernels on a MinnowBoard Turbot....
>>>>>
>>>>> I'm looking for a board farm solution that can handle
>>>>> building a mainline (or LTS) kernel, and deploy it to the MinnowBoard,
>>>>> and reboot the board to a Linux shell prompt.
>>>>>
>>>>> The board is running Ubuntu 16.04.3, using a 4.4 Linux kernel by default,
>>>>> and uses grub2, with OS software coming from a micro-SD card.
>>>>> I have power control of the board, and serial console, and a network
>>>>> connection (with ssh).
>>>>>
>>>>> The upstream kernels archive of Ubuntu have the software that I'll need.
>>>>>
>>>>> But I'm wondering if there's existing board farm software (e.g. labgrid)
>>>>> that can handle the intricacies of installing a newly built kernel onto
>>>>> the board, and rebooting it.
>>>>
>>>> We use the Minnowboard Max for realtime testing with labgrid, and for
>>>> the automatic setup we use an SD-USB-Mux:
>>>>
>>>> https://www.pengutronix.de/en/2017-10-23-usb-sd-mux-automated-sd-card-juggler.html
>>>>
>>>> In fact, we still don't have a proper way of selling them, but if you
>>>> send me your address, you'll probably be added to our beta tester
>>>> program :-)
>>>
>>> This looks to be one part of what I need for Raspberry Pi
>>> kernel/rootfs testing right now. I would buy a handful if they go on
>>> sale.
>>>
>>> Do you have a solution for automating the "Powercycle your target"
>>> step? I've had my eye on the power measurement kit that BayLibre
>>> designed (https://www.tindie.com/products/BayLibre/acme-power-measurement-kit/)
>>> since ELCE a few months ago but it's still not available.
>>
>>
>> I have an ACME which I really like using, as it has immediate cut-off
>> (switch-after power brick), and of course provides power measurement facility too.
>>
>> However, I also have two of these:
>>         https://energenie4u.co.uk/catalogue/product/ENER011
> 
> Looks perfect as I'm UK based. It's also affordable as well,
> everything else I've looked at has been nearly 10x that price. Is that
> controllable from Linux in an automated, non-GUI way?

Yes, it uses sispmctl (should be an apt-get install sispmctl away, or such)

I have the attached energenie-power script on my raspberry-pi - and other
automated scripts hook into that to control some of my boards.

I'm hoping (in some sort of magical free time) that I could implement a better
solution abstracting this akin to labgrid or such ... but alas - free time is
rare - so I'm still just using this basic bash script - and editing it if I
change the devices connected.

Would be nice to abstract the device names elsewhere somehow. If you have more
of this mystical substance called 'time' please do let me know how you get on :D



>>
>> (I believe at least EU versions are available too) - which I have connected to a
>> RaspberryPi as a controller.
>>
>> Being able to switch at the plug-socket level makes it very easy to just
>> 'plug-and-play'
>>
>> I'll add this to the eLinux-wiki (https://elinux.org/Board_Farm#power_control)
>>
> 
> The "ykush" on that page also looks good. I must have missed this page
> going up on the wiki - it's a really useful collection of info :)


Interesting indeed (the ykush)! I hadn't seen that either :D

--
Kieran
-------------- next part --------------
#!/bin/bash

DEVICE=$1
ACTION=$2

APP=$(basename $0)

function help() {
	echo "$APP: Unrecognised Target [$DEVICE] or Action [$ACTION]"
	echo "  Supported target devices:"
	echo "    port[1-4]"
	echo "    stu|v3m|eagle-v3m|8camera"
	echo "  Supported target actions:"
	echo "    on|off|reset|reboot"

	sudo sispmctl -m all
	exit
}

if [ "$#" -ne 2 ]; then
	help
	exit
fi

case $DEVICE in
	port1|stu)
		SWITCH=1
		;;
	port2)
		SWITCH=2
		;;
	port3|v3m|eagle-v3m)
		SWITCH=3
		;;
	port4|8camera)
		SWITCH=4
		;;
	*)
		help
		;;
esac

function energenie() {
	sudo sispmctl -m $2;
	sudo sispmctl $1 $2
}

case $ACTION in
	on)
		energenie -o $SWITCH
		;;
	off)
		energenie -f $SWITCH
		;;
	reset|reboot)
		energenie -f $SWITCH
		sleep 1
		energenie -o $SWITCH
		;;
	*)
		echo "Unrecognised action: $ACTION : Try [on|off|reset|reboot]"
		exit
		;;
esac


More information about the automated-testing mailing list