On 20 February 2018 at 15:10, Zoran S <zoran.stojsavljevic.de@gmail.com> wrote:
Hello Neil,

Do you have any handy examples for BBB how to boot from ram disk,
written in jinja2?


The gold standard test jobs are in the documentation, including one for a BBB ramdisk. You don't need jinja2 changes for that.
 
It does not want to boot initramfs.cpio.xz

Should work with ...cpio.gz 

It's not a U-Boot thing, it's that the test shell overlay needs to be added to the ramdisk, so the ramdisk needs to be unpacked and repacked.

You can also use apply-overlay: false and then transfer-overlay support but that requires that the ramdisk raises a working network interface automatically and has tools like wget and tar.

For now, just repack the ramdisk to use gz compression, then move on to doing NFS - depending on your kernel config, you might not need to add modules to the ramdisk.
 
(or similar format??? I am
using u-boot 11.2017)?!

Thank you,
Zoran

_______

On Tue, Feb 20, 2018 at 2:33 PM, Neil Williams <neil.williams@linaro.org> wrote:
> On 20 February 2018 at 12:51, Zoran S <zoran.stojsavljevic.de@gmail.com>
> wrote:
>>
>> OK.
>>
>> It seems to me that I need somehow to activate the following .conf file:
>>
>>
>> /usr/lib/python2.7/dist-packages/lava_dispatcher/default-config/lava-dispatcher/device-types/beaglebone-black.conf
>
>
> No. That is for V1 only - it is completely irrelevant to LAVA V2. All the
> device configuration is done on the master using the Jinja2 templates.
>
>
>>
>>
>> On Tue, Feb 20, 2018 at 12:28 PM, Neil Williams
>> <neil.williams@linaro.org> wrote:
>> > On 20 February 2018 at 11:20, Zoran S <zoran.stojsavljevic.de@gmail.com>
>> > wrote:
>> >>
>> >> Hello,
>> >>
>> >> I am bringing now the target Beaglebone Black, as DUT in Lava.
>> >>
>> >> Here is my BBB01.jinja2 device definition:
>> >>
>> >> {% extends 'beaglebone-black.jinja2' %}
>> >> {% set connection_command = '/vagrant/scripts/connectBBB.sh localhost
>> >> 8020 root ""' %}
>> >> {% set power_on_command = '/usr/bin/egctl egenie on left left left' %}
>> >> {% set power_off_command = '/usr/bin/egctl egenie off left left left'
>> >> %}
>> >> {% set hard_reset_command = '/usr/bin/egctl egenie on left left left'
>> >> %}
>> >>
>> >> Where the line: "vagrant/scripts/connectBBB.sh localhost 8020 root ""'
>> >>
>> >> represents as $@ the following: 127.0.0.1 8020 root and "" (""
>> >> represents empty password, actually <cr>).
>> >
>> >
>> > What password? To connect to the serial port of the device? That looks
>> > wrong.
>> >
>> > If a password is required to login to the booted system, that must be
>> > supplied in the test job definition using auto login action support.
>> >
>> >>
>> >>
>> >> It seems that this part works correctly:
>> >>
>> >> end: 2.4.1 reset-device (duration 00:00:00)
>> >> start: 2.4.2 u-boot-interrupt (timeout 00:03:00)
>> >> Changing prompt to 'Press SPACE to abort autoboot'
>> >> u-boot-interrupt: Wait for prompt Press SPACE to abort autoboot
>> >> (timeout 00:03:00)
>> >> spawn telnet localhost 8020
>> >> Trying ::1...
>> >> Connected to localhost.
>> >> Escape character is '^]'.
>> >> ser2net port 8020 device /dev/ttyUSB0 [115200 N81] (Debian GNU/Linux)
>> >>
>> >> end: 2.4.2 u-boot-interrupt (duration 00:00:02)
>> >> start: 2.4.3 bootloader-commands (timeout 00:02:58)
>> >> Changing prompt to start interaction: U-Boot
>> >> bootloader-commands: Wait for prompt U-Boot (timeout 00:03:00)
>> >
>> >
>> > Your U-Boot configuration did not issue a prompt, it immediately went
>> > into
>> > booting the board with whatever was last installed.
>> >
>> >>
>> >> switch to partitions #0, OK
>> >> mmc0 is current device
>> >> SD/MMC found on device 0
>> >> ** Unable to read file boot.scr **
>> >> ** Unable to read file uEnv.txt **
>> >> switch to partitions #0, OK
>> >> mmc0 is current device
>> >> Scanning mmc 0:1...
>> >> switch to partitions #0, OK
>> >> mmc0 is current device
>> >> SD/MMC found on device 0
>> >> switch to partitions #0, OK
>> >> mmc0 is current device
>> >> SD/MMC found on device 0
>> >> ** Unable to read file boot.scr **
>> >> ** Unable to read file uEnv.txt **
>> >> 4161168 bytes read in 293 ms (13.5 MiB/s)
>> >> 35016 bytes read in 23 ms (1.5 MiB/s)
>> >> ## Flattened Device Tree blob at 88000000
>> >>    Booting using the fdt blob at 0x88000000
>> >>    Loading Device Tree to 8fff4000, end 8ffff8c7 ... OK
>> >> Starting kernel ...
>> >> [    0.000000] Booting Linux on physical CPU 0x0
>> >> [    0.000000] Linux version 4.13.8-jumpnow (oe-user@oe-host) (gcc
>> >> version 7.2.0 (GCC)) #1 Fri Jan 12 13:27:03 CET 2018
>> >> [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7),
>> >> cr=10c5387d
>> >> [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
>> >> instruction cache
>> >> [    0.000000] OF: fdt: Machine model: TI AM335x BeagleBone Black
>> >> [    0.000000] Memory policy: Data cache writeback
>> >> [    0.000000] cma: Reserved 16 MiB at 0x9f000000
>> >> [    0.000000] CPU: All CPU(s) started in SVC mode.
>> >>
>> >> But when it comes to login to kernel login, it fails!
>> >
>> >
>> > It cannot login because it's trying to login to the wrong system -
>> > whatever
>> > was last installed, not the one specified in the test job. There are no
>> > TFTP
>> > operations here - that's a problem.
>> >
>> >>
>> >>
>> >> Starting OpenBSD Secure Shell server: sshd
>> >> key_load_public: invalid format
>> >> Could not load host key: /etc/ssh/ssh_host_rsa_key
>> >> key_load_public: invalid format
>> >> Could not load host key: /etc/ssh/ssh_host_dsa_key
>> >> key_load_public: invalid format
>> >> Could not load host key: /etc/ssh/ssh_host_ecdsa_key
>> >> key_load_public: invalid format
>> >> Could not load host key: /etc/ssh/ssh_host_ed25519_key
>> >> sshd: no hostkeys available -- exiting.
>> >> Starting rpcbind daemon...done.
>> >> starting statd: done
>> >> exportfs: can't open /etc/exports for reading
>> >> modprobe: can't change directory to '/lib/modules': No such file or
>> >> directory
>> >> NFS daemon support not enabled in kernel
>> >> Starting syslogd/klogd: done
>> >> Poky (Yocto Project Reference Distro) 2.3.2 beaglebone /dev/ttyO0
>> >> beaglebone login: [  170.488770] random: crng init done
>> >> bootloader-commands timed out after 178 seconds
>> >> end: 2.4.3 bootloader-commands (duration 00:02:58)
>> >> uboot-retry failed: 1 of 1 attempts. 'bootloader-commands timed out
>> >> after 178 seconds'
>> >> bootloader-commands timed out after 178 seconds
>> >> end: 2.4 uboot-retry (duration 00:03:00)
>> >> uboot-action failed: 1 of 1 attempts. 'bootloader-commands timed out
>> >> after 178 seconds'
>> >> bootloader-commands timed out after 178 seconds
>> >> end: 2 uboot-action (duration 00:03:00)
>> >> Cleaning after the job
>> >> Cleaning up download directory:
>> >> /var/lib/lava/dispatcher/tmp/84/tftp-deploy-a0ZzPD/ramdisk
>> >> Cleaning up download directory:
>> >> /var/lib/lava/dispatcher/tmp/84/tftp-deploy-a0ZzPD/kernel
>> >> Cleaning up download directory:
>> >> /var/lib/lava/dispatcher/tmp/84/tftp-deploy-a0ZzPD/dtb
>> >> Cleaning up download directory:
>> >> /var/lib/lava/dispatcher/tmp/84/tftp-deploy-a0ZzPD/modules
>> >> start: 4.1 power-off (timeout 00:00:05)
>> >> nice /usr/bin/egctl egenie off left left left
>> >> command output socket 1 - off
>> >> socket 2 - off
>> >> socket 3 - off
>> >> socket 4 - off
>> >>
>> >> It seems that empty character as "" in jinja2 is noit well represented
>> >> (or maybe I need to have somehow <CR>)?!
>> >>
>> >> Any advise too this problem?
>> >>
>> >> Thank you,
>> >> Zoran
>> >> zo
>> >> _______________________________________________
>> >> Lava-users mailing list
>> >> Lava-users@lists.linaro.org
>> >> https://lists.linaro.org/mailman/listinfo/lava-users
>> >
>> >
>> >
>> >
>> > --
>> >
>> > Neil Williams
>> > =============
>> > neil.williams@linaro.org
>> > http://www.linux.codehelp.co.uk/
>
>
>
>
> --
>
> Neil Williams
> =============
> neil.williams@linaro.org
> http://www.linux.codehelp.co.uk/



--