Raspberry Pi: hard realtime Linux/Xenomai

встраиваемые модели

Модераторы: Olej, vikos

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: Raspberry Pi: hard realtime Linux/Xenomai

Непрочитанное сообщение Olej » 22 авг 2018, 18:13

6. Копирую по SSH на установленную систему 2 *.deb пакета всё с того же исходного сайта:

Код: Выделить всё

olej@raspberrypi:~/pi2 $ ls -l
total 7112
-rw-rw-r-- 1 olej olej  181826 May 27 12:26 linux-firmware-image-4.1.21-v7+_4.1.21-v7+-4_armhf.deb
-rw-rw-r-- 1 olej olej 7096408 May 27 12:26 linux-headers-4.1.21-v7+_4.1.21-v7+-4_armhf.deb
И устанавливаю:

Код: Выделить всё

olej@raspberrypi:~/pi2 $ sudo dpkg -i linux-firmware-image-4.1.21-v7+_4.1.21-v7+-4_armhf.deb
Selecting previously unselected package linux-firmware-image-4.1.21-v7+.
(Reading database ... 66370 files and directories currently installed.)
Preparing to unpack linux-firmware-image-4.1.21-v7+_4.1.21-v7+-4_armhf.deb ...
Unpacking linux-firmware-image-4.1.21-v7+ (4.1.21-v7+-4) ...
Setting up linux-firmware-image-4.1.21-v7+ (4.1.21-v7+-4) ...

olej@raspberrypi:~/pi2 $ sudo dpkg -i linux-headers-4.1.21-v7+_4.1.21-v7+-4_armhf.deb
(Reading database ... 66409 files and directories currently installed.)
Preparing to unpack linux-headers-4.1.21-v7+_4.1.21-v7+-4_armhf.deb ...
Unpacking linux-headers-4.1.21-v7+ (4.1.21-v7+-4) over (4.1.21-v7+-4) ...
Setting up linux-headers-4.1.21-v7+ (4.1.21-v7+-4) ...

Код: Выделить всё

olej@raspberrypi:~/pi2 $ ls /lib/modules/`uname -r`
build   modules.alias      modules.builtin      modules.dep      modules.devname  modules.softdep  modules.symbols.bin
kernel  modules.alias.bin  modules.builtin.bin  modules.dep.bin  modules.order    modules.symbols

olej@raspberrypi:~/pi2 $ ls /lib/modules/`uname -r`/build
arch    Documentation  fs       ipc      lib       modules.order   samples   sound  virt
block   drivers        include  Kconfig  Makefile  Module.symvers  scripts   tools
crypto  firmware       init     kernel   mm        net             security  usr

olej@raspberrypi:~/pi2 $ ls /lib/modules/`uname -r`/build/include
acpi         config  dt-bindings  Kbuild  linux     memory  pcmcia  rxrpc  sound   uapi   xenomai
asm-generic  crypto  generated    keys    math-emu  misc    ras     scsi   target  video
clocksource  drm     ipipe        kvm     media     net     rdma    soc    trace   xen

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: Raspberry Pi: hard realtime Linux/Xenomai

Непрочитанное сообщение Olej » 22 авг 2018, 18:36

Теперь уже можно посмотреть что там у нас с realtime Xenomai:

Код: Выделить всё

olej@raspberrypi:~ $ /usr/xenomai/bin/xeno-config
xeno-config --verbose
        --core=cobalt
        --version="3.0.5"
        --cc="arm-linux-gnueabihf-gcc"
        --ccld="/usr/xenomai/bin/wrap-link.sh arm-linux-gnueabihf-gcc"
        --arch="arm"
        --prefix="/usr/xenomai"
        --library-dir="/usr/xenomai/lib"
Usage xeno-config OPTIONS
Options :
        --help
        --v,--verbose
        --version
        --cc
        --ccld
        --arch
        --prefix
        --[skin=]posix|vxworks|psos|alchemy|rtdm|smokey|cobalt
        --auto-init|auto-init-solib|no-auto-init
        --mode-check|no-mode-check
        --cflags
        --ldflags
        --lib*-dir|libdir|user-libdir
        --core
        --info
        --compat

Код: Выделить всё

olej@raspberrypi:~ $ /usr/xenomai/bin/xeno-config --skin=posix --cflags
-I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv7-a -mfloat-abi=hard -mfpu=neon -ffast-math -D_GNU_SOURCE -D_REENTRANT -D__COBALT__ -D__COBALT_WRAP__

olej@raspberrypi:~ $ /usr/xenomai/bin/xeno-config --skin=posix --ldflags
-Wl,--no-as-needed -Wl,@/usr/xenomai/lib/cobalt.wrappers -Wl,@/usr/xenomai/lib/modechk.wrappers  /usr/xenomai/lib/xenomai/bootstrap.o -Wl,--wrap=main -Wl,--dynamic-list=/usr/xenomai/lib/dynlist.ld -L/usr/xenomai/lib -lcobalt -lmodechk -lpthread -lrt   

Код: Выделить всё

olej@raspberrypi:~ $ /usr/xenomai/bin/xeno-config --skin=alchemy --cflags
-I/usr/xenomai/include/cobalt -I/usr/xenomai/include -march=armv7-a -mfloat-abi=hard -mfpu=neon -ffast-math -D_GNU_SOURCE -D_REENTRANT -D__COBALT__ -I/usr/xenomai/include/alchemy

olej@raspberrypi:~ $ /usr/xenomai/bin/xeno-config --skin=alchemy --ldflags
-Wl,--no-as-needed -Wl,@/usr/xenomai/lib/modechk.wrappers -lalchemy -lcopperplate /usr/xenomai/lib/xenomai/bootstrap.o -Wl,--wrap=main -Wl,--dynamic-list=/usr/xenomai/lib/dynlist.ld -L/usr/xenomai/lib -lcobalt -lmodechk -lpthread -lrt   

Код: Выделить всё

olej@raspberrypi:~ $ ls -l /dev/rtdm/
total 0
crw------- 1 root root 245, 0 Aug 22 12:17 autotune
crw------- 1 root root 252, 0 Aug 22 12:17 memdev-private
crw------- 1 root root 252, 1 Aug 22 12:17 memdev-shared
crw------- 1 root root 251, 0 Aug 22 12:17 memdev-sys
drwxr-xr-x 2 root root   1100 Aug 22 12:17 pinctrl-bcm2835
crw------- 1 root root 243, 0 Aug 22 12:17 switchtest
crw------- 1 root root 244, 0 Aug 22 12:17 timerbench

olej@raspberrypi:~ $ ls -l /dev/rtdm/pinctrl-bcm2835/
total 0
crw------- 1 root root 239,  0 Aug 22 12:17 gpio0
crw------- 1 root root 239,  1 Aug 22 12:17 gpio1
crw------- 1 root root 239, 10 Aug 22 12:17 gpio10
crw------- 1 root root 239, 11 Aug 22 12:17 gpio11
crw------- 1 root root 239, 12 Aug 22 12:17 gpio12
crw------- 1 root root 239, 13 Aug 22 12:17 gpio13
crw------- 1 root root 239, 14 Aug 22 12:17 gpio14
crw------- 1 root root 239, 15 Aug 22 12:17 gpio15
crw------- 1 root root 239, 16 Aug 22 12:17 gpio16
crw------- 1 root root 239, 17 Aug 22 12:17 gpio17
crw------- 1 root root 239, 18 Aug 22 12:17 gpio18
crw------- 1 root root 239, 19 Aug 22 12:17 gpio19
crw------- 1 root root 239,  2 Aug 22 12:17 gpio2
crw------- 1 root root 239, 20 Aug 22 12:17 gpio20
crw------- 1 root root 239, 21 Aug 22 12:17 gpio21
crw------- 1 root root 239, 22 Aug 22 12:17 gpio22
crw------- 1 root root 239, 23 Aug 22 12:17 gpio23
crw------- 1 root root 239, 24 Aug 22 12:17 gpio24
crw------- 1 root root 239, 25 Aug 22 12:17 gpio25
crw------- 1 root root 239, 26 Aug 22 12:17 gpio26
crw------- 1 root root 239, 27 Aug 22 12:17 gpio27
crw------- 1 root root 239, 28 Aug 22 12:17 gpio28
crw------- 1 root root 239, 29 Aug 22 12:17 gpio29
crw------- 1 root root 239,  3 Aug 22 12:17 gpio3
crw------- 1 root root 239, 30 Aug 22 12:17 gpio30
crw------- 1 root root 239, 31 Aug 22 12:17 gpio31
crw------- 1 root root 239, 32 Aug 22 12:17 gpio32
crw------- 1 root root 239, 33 Aug 22 12:17 gpio33
crw------- 1 root root 239, 34 Aug 22 12:17 gpio34
crw------- 1 root root 239, 35 Aug 22 12:17 gpio35
crw------- 1 root root 239, 36 Aug 22 12:17 gpio36
crw------- 1 root root 239, 37 Aug 22 12:17 gpio37
crw------- 1 root root 239, 38 Aug 22 12:17 gpio38
crw------- 1 root root 239, 39 Aug 22 12:17 gpio39
crw------- 1 root root 239,  4 Aug 22 12:17 gpio4
crw------- 1 root root 239, 40 Aug 22 12:17 gpio40
crw------- 1 root root 239, 41 Aug 22 12:17 gpio41
crw------- 1 root root 239, 42 Aug 22 12:17 gpio42
crw------- 1 root root 239, 43 Aug 22 12:17 gpio43
crw------- 1 root root 239, 44 Aug 22 12:17 gpio44
crw------- 1 root root 239, 45 Aug 22 12:17 gpio45
crw------- 1 root root 239, 46 Aug 22 12:17 gpio46
crw------- 1 root root 239, 47 Aug 22 12:17 gpio47
crw------- 1 root root 239, 48 Aug 22 12:17 gpio48
crw------- 1 root root 239, 49 Aug 22 12:17 gpio49
crw------- 1 root root 239,  5 Aug 22 12:17 gpio5
crw------- 1 root root 239, 50 Aug 22 12:17 gpio50
crw------- 1 root root 239, 51 Aug 22 12:17 gpio51
crw------- 1 root root 239, 52 Aug 22 12:17 gpio52
crw------- 1 root root 239,  6 Aug 22 12:17 gpio6
crw------- 1 root root 239,  7 Aug 22 12:17 gpio7
crw------- 1 root root 239,  8 Aug 22 12:17 gpio8
crw------- 1 root root 239,  9 Aug 22 12:17 gpio9

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: Raspberry Pi: hard realtime Linux/Xenomai

Непрочитанное сообщение Olej » 22 авг 2018, 18:45

Olej писал(а):Теперь уже можно посмотреть что там у нас с realtime Xenomai:
И удостовериться runtime, что мы действительно инсталлировали hard realtime систему:

Код: Выделить всё

olej@raspberrypi:/usr/xenomai/bin $ sudo ./latency -h -H30
== Sampling period: 1000 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT|  00:00:01  (periodic user-mode task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|      0.156|      3.289|      8.958|       0|     0|      0.156|      8.958
RTD|     -0.626|      3.258|     16.562|       0|     0|     -0.626|     16.562
RTD|     -1.355|      3.155|     16.874|       0|     0|     -1.355|     16.874
RTD|      2.498|      3.168|     15.103|       0|     0|     -1.355|     16.874
RTD|      2.446|      3.176|     16.769|       0|     0|     -1.355|     16.874
RTD|      2.498|      3.186|     16.560|       0|     0|     -1.355|     16.874
RTD|      2.497|      3.184|     14.216|       0|     0|     -1.355|     16.874
RTD|      2.445|      3.232|     14.424|       0|     0|     -1.355|     16.874
RTD|      2.444|      3.364|     12.601|       0|     0|     -1.355|     16.874
RTD|      2.496|      3.177|     15.257|       0|     0|     -1.355|     16.874
RTD|      2.496|      3.181|     14.788|       0|     0|     -1.355|     16.874
RTD|      2.443|      3.178|     14.371|       0|     0|     -1.355|     16.874
RTD|      2.495|      3.170|     10.776|       0|     0|     -1.355|     16.874
RTD|      2.442|      3.195|     15.203|       0|     0|     -1.355|     16.874
RTD|      2.442|      3.189|     17.547|       0|     0|     -1.355|     17.547
RTD|      2.494|      3.343|     13.796|       0|     0|     -1.355|     17.547
RTD|      2.441|      3.235|     10.983|       0|     0|     -1.355|     17.547
^C---|--param|----range-|--samples
HSD|    min|   0 -  1 |        2
HSD|    min|   1 -  2 |        1
HSD|    min|   2 -  3 |       14
---|--param|----range-|--samples
HSD|    avg|   0 -  1 |        2
HSD|    avg|   1 -  2 |        1
HSD|    avg|   2 -  3 |    12058
HSD|    avg|   3 -  4 |     2813
HSD|    avg|   4 -  5 |     1192
HSD|    avg|   5 -  6 |     1407
HSD|    avg|   6 -  7 |      208
HSD|    avg|   7 -  8 |       59
HSD|    avg|   8 -  9 |       26
HSD|    avg|   9 - 10 |        6
HSD|    avg|  10 - 11 |        3
HSD|    avg|  12 - 13 |        3
HSD|    avg|  13 - 14 |        1
HSD|    avg|  14 - 15 |        5
HSD|    avg|  15 - 16 |        3
HSD|    avg|  16 - 17 |        4
HSD|    avg|  17 - 18 |        1
---|--param|----range-|--samples
HSD|    max|   8 -  9 |        1
HSD|    max|  10 - 11 |        2
HSD|    max|  12 - 13 |        1
HSD|    max|  13 - 14 |        1
HSD|    max|  14 - 15 |        4
HSD|    max|  15 - 16 |        3
HSD|    max|  16 - 17 |        4
HSD|    max|  17 - 18 |        1
HSH|--param|--samples-|--average--|---stddev--
HSS|    min|        17|      1.706|      0.686
HSS|    avg|     17792|      2.617|      1.121
HSS|    max|        17|     13.824|      2.506
---|-----------|-----------|-----------|--------|------|-------------------------
RTS|     -1.355|      3.216|     17.547|       0|     0|    00:00:18/00:00:18
А вот то же самое, но для задач в пространстве ядра Xenomai (-t1)

Код: Выделить всё

olej@raspberrypi:/usr/xenomai/bin $ sudo ./latency -h -H30 -t1
== Sampling period: 1000 us
== Test mode: in-kernel periodic task
== All results in microseconds
warming up...
RTT|  00:00:01  (in-kernel periodic task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD|     -0.782|     -0.668|      3.281|       0|     0|     -0.782|      3.281
RTD|     -0.730|     -0.628|      7.656|       0|     0|     -0.782|      7.656
RTD|     -0.731|     -0.632|      7.395|       0|     0|     -0.782|      7.656
RTD|     -0.783|     -0.607|      6.717|       0|     0|     -0.783|      7.656
RTD|     -0.783|     -0.605|      7.759|       0|     0|     -0.783|      7.759
RTD|     -0.784|     -0.595|      8.123|       0|     0|     -0.784|      8.123
RTD|     -0.732|     -0.624|      7.549|       0|     0|     -0.784|      8.123
RTD|     -0.733|     -0.635|      7.184|       0|     0|     -0.784|      8.123
RTD|     -0.785|     -0.635|      6.820|       0|     0|     -0.785|      8.123
RTD|     -0.733|     -0.639|      6.611|       0|     0|     -0.785|      8.123
RTD|     -0.786|     -0.618|      6.819|       0|     0|     -0.786|      8.123
RTD|     -0.734|     -0.623|      6.350|       0|     0|     -0.786|      8.123
RTD|     -0.734|     -0.630|      6.974|       0|     0|     -0.786|      8.123
RTD|     -0.735|     -0.619|      5.932|       0|     0|     -0.786|      8.123
^C---|--param|----range-|--samples
HSD|    min|   0 -  1 |       14
---|--param|----range-|--samples
HSD|    avg|   0 -  1 |    14113
HSD|    avg|   1 -  2 |       10
HSD|    avg|   2 -  3 |       10
HSD|    avg|   3 -  4 |        9
HSD|    avg|   4 -  5 |        5
HSD|    avg|   5 -  6 |        3
HSD|    avg|   6 -  7 |        7
HSD|    avg|   7 -  8 |        5
HSD|    avg|   8 -  9 |        2
HSD|    avg|  12 - 13 |        1
---|--param|----range-|--samples
HSD|    max|   3 -  4 |        1
HSD|    max|   5 -  6 |        1
HSD|    max|   6 -  7 |        6
HSD|    max|   7 -  8 |        5
HSD|    max|   8 -  9 |        1
HSH|--param|--samples-|--average--|---stddev--
HSS|    min|        14|      0.000|      0.000
HSS|    avg|     14165|      0.014|      0.273
HSS|    max|        14|      6.214|      1.188
---|-----------|-----------|-----------|--------|------|-------------------------
RTS|     -0.786|     -0.625|      8.123|       0|     0|    00:00:15/00:00:15
Там нужно бы сделать калибровку, чтобы устранить небольшие отрицательные значения ... но это всё - потом, но и так всё хорошо видно и понятно - это микросекундные латентности на игрушке Rapsbery Pi.

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: Raspberry Pi: hard realtime Linux/Xenomai

Непрочитанное сообщение Olej » 22 авг 2018, 19:28

Olej писал(а):В любом случае уже время пришло проделать полное обновления образа/SD, с начала и по-порядку...
Вторая скрытая причина того, что я соблазнился на переустановку чистой системы, в том что:
- На всех этих ARM ... Rapsberu Pi, Orange Pi стоят в меру старенькие ядра, и даже не сколько ядра, сколько репозитории Debian системы...

Код: Выделить всё

olej@raspberrypi:/usr/xenomai/bin $ uname -a
Linux raspberrypi 4.1.21-v7+ #4 SMP Sat Jul 15 06:39:14 CEST 2017 armv7l GNU/Linux
- В которых уж явно устаревшие реализации OpenCV и всего что относится к компьютерному зрению и распознаванию... см. тему:

Код: Выделить всё

pi@raspberrypi:~ $ python
Python 2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'2.4.9.1'
- Но из инсайдерских рассылок я знаю откуда и как установить из исходников OpenCV даже не 3, а 4! (см. OpenCV). И автор-разработчик утверждает что проделывал это и на Rapsbery Pi. Очень хотелось бы попробовать! :lol:

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: Raspberry Pi: hard realtime Linux/Xenomai

Непрочитанное сообщение Olej » 23 авг 2018, 12:05

Olej писал(а):5. Хочу все начальные действия попробовать выполнить удалённо, по SSH сессии, без клавиатуры и без монитора подключенного по HDMI (хотя бы потому, что не всякие мониторы и не со всякими кабелями и переходниками хотят работать с HDMI - об этом много в Интернет):
О чём говорят и авторы сборки системы, которую используем - Raspberry Pi image for the Pi zero,1,2,3 with Xenomai 3.0.5 on Raspbian linux 4.1.y Debian 8 jessie
The idea is that if you know the mac addres of your pi, then you don't need to connect a monitor,mouse and keyboard to it, but instead you can lookup its ip address using above website, and login over ssh into the pi. Or smbmount the root homedir on your own machine so that you can easily edit the files on the pi with your local editor.

Note: just put a label with the mac address on your pi !!

to find out the mac and or ip address of a network interface on the pi, you can just connect a monitor a mouse and a keyboard to the pi, login to it , and run the following command :
/sbin/ifconfig
Note: at each login the pi automatically prints the mac and ip address of the eth0 and wlan0 interfaces

Код: Выделить всё

olej@raspberrypi:/etc $ ifconfig
eth0      Link encap:Ethernet  HWaddr b8:27:eb:7e:2c:a8  
          inet addr:192.168.1.104  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::d21c:cacb:e0c6:f8c5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1298 errors:0 dropped:0 overruns:0 frame:0
          TX packets:672 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:217006 (211.9 KiB)  TX bytes:83187 (81.2 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:79 errors:0 dropped:0 overruns:0 frame:0
          TX packets:79 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:7204 (7.0 KiB)  TX bytes:7204 (7.0 KiB)
И выглядит это примерно так... на картинке видно:
- Power Bank на 20000mAh, от которого питается Rapsbery Pi 2 (это оказалось куда продуктивнее, чем дрочиться с китайскими зарядками "блоками питания", с пульсациями и импульсными помехами)
- измеритель питания (ток + напряжение) ... даже больше 0.36A потребления я не смог поймать
- Rapsbery Pi 2 с всего 2-мя подключенными шнурками: Ethernet + питание
Вложения
KIMG0044.JPG
KIMG0043.JPG

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: Raspberry Pi: hard realtime Linux/Xenomai

Непрочитанное сообщение Olej » 20 мар 2022, 18:00

Olej писал(а):
13 июн 2018, 20:05
Загрузка образа с SD-карточки, откуда образ этот .img брать, и что с ним делать - описано здесь.
После большого перерыва ...
Raspberry Pi images with Xenomai 3 on Raspbian linux
- image file for raspberry pi sdcard for the Pi 2,3b and 3b+:
raspbian_stretch9_xenomai3.0.8.img.7z (created june 2019)
- the instructions for building this image you can find at https://github.com/harcokuppens/xenomai ... 2_3_3B+.md.
- I made an improved installation description for building the kernel with xenomai support at https://github.com/harcokuppens/xenomai ... l3bplus.md. This installation creates a single debian package
raspberrypi-kernel-4.9.80-rpi-xeno-3.0.8_armhf.deb
- which you just have to install on a standard pi image to get xenomai support on that image. It installs the xenomai patched kernel, its modules and the xenomai tools and libraries in one go!
- if you want to compile a kernel module using the linux headers you must also install the following package
linux-headers-4.9.80-rpi-xeno-3.0.8+_4.9.80-rpi-xeno-3.0.8+-1_armhf.deb

Note: if you want to compile a kernel module using these linux headers you must first run the following command:

cd /usr/src/linux-headers-4.9.80-rpi-xeno-3.0.8+/
make -i modules_prepare

Ignore the errors, it just only needs to recompile the scripts in the linux headers folder. These scripts are in intel format in the package because I cross compiled these debian packages on an intel machine and somehow the scripts where compiled for the local platform instead of the arm platform, so therefore we need to recompile them on the pi it self.
- I shrinked the image file with the very nice instructions from Andrew Oakley which you can find here.

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: Raspberry Pi: hard realtime Linux/Xenomai

Непрочитанное сообщение Olej » 20 мар 2022, 18:15

Код: Выделить всё

olej@R420:~/Загрузки/ISO/RapsberriPi/Xenomai_3.0.8$ ls -l raspbian_stretch9_xenomai3.0.8.img.7z 
-rw-rw-r-- 1 olej olej 349986805 мар 20 17:04 raspbian_stretch9_xenomai3.0.8.img.7z

Код: Выделить всё

olej@R420:~/Загрузки/ISO/RapsberriPi/Xenomai_3.0.8$ ls -l linux-headers-4.9.80-rpi-xeno-3.0.8+_4.9.80-rpi-xeno-3.0.8+-1_armhf.deb 
-rw-rw-r-- 1 olej olej 10609324 мар 20 17:09 linux-headers-4.9.80-rpi-xeno-3.0.8+_4.9.80-rpi-xeno-3.0.8+-1_armhf.deb
Download the image, unzip it with 7zip and put the image on a sdcard. Then put the sdcard in the pi, and reboot. Voila : running pi with xenomai
Instructions on how to put the image on a sdcard you can find here.
Важнейшее:
you can log in with the following credentials:
user: pi
passwd: raspberry

user: root
passwd: pi

For working with xenomai the root user is preferred.
When you use the new card for the first time, remember to expand the filesystem to fill the space on the new card. This because the image is made as small to just contain all it needs. However most sdcards are much bigger, but before you can use this extra space you must expand the filesystem first. From the Raspberry Pi's terminal, do sudo raspi-config , then select Expand Filesystem. Then do a reboot to apply the changes. Alternatively you can do this directly from the command line with:
sudo raspi-config --expand-rootfs
sudo shutdown -r now

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: Raspberry Pi: hard realtime Linux/Xenomai

Непрочитанное сообщение Olej » 20 мар 2022, 18:31

Olej писал(а):
20 мар 2022, 18:15

Код: Выделить всё

olej@R420:~/Загрузки/ISO/RapsberriPi/Xenomai_3.0.8$ ls -l raspbian_stretch9_xenomai3.0.8.img.7z 
-rw-rw-r-- 1 olej olej 349986805 мар 20 17:04 raspbian_stretch9_xenomai3.0.8.img.7z
Разархивирование:

Код: Выделить всё

olej@R420:~/Загрузки/ISO/RapsberriPi/Xenomai_3.0.8$ which 7za 
/usr/bin/7za

Код: Выделить всё

olej@R420:~/Загрузки/ISO/RapsberriPi/Xenomai_3.0.8$ time 7za x raspbian_stretch9_xenomai3.0.8.img.7z 

7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=ru_UA.UTF-8,Utf16=on,HugeFiles=on,64 bits,40 CPUs Intel(R) Xeon(R) CPU E5-2470 v2 @ 2.40GHz (306E4),ASM,AES-NI)

Scanning the drive for archives:
1 file, 349986805 bytes (334 MiB)

Extracting archive: raspbian_stretch9_xenomai3.0.8.img.7z
--
Path = raspbian_stretch9_xenomai3.0.8.img.7z
Type = 7z
Physical Size = 349986805
Headers Size = 172
Method = LZMA:24
Solid = -
Blocks = 1

Everything is Ok                         

Size:       1670381568
Compressed: 349986805

real	0m29,074s
user	0m27,348s
sys	0m1,720s
Всё успешно!

Код: Выделить всё

olej@R420:~/Загрузки/ISO/RapsberriPi/Xenomai_3.0.8$ ls -l raspbian_stretch9_xenomai3.0.8.img 
-rw-r--r-- 1 olej olej 1670381568 июн 12  2019 raspbian_stretch9_xenomai3.0.8.img

Код: Выделить всё

olej@R420:~/Загрузки/ISO/RapsberriPi/Xenomai_3.0.8$ file raspbian_stretch9_xenomai3.0.8.img 
raspbian_stretch9_xenomai3.0.8.img: DOS/MBR boot sector; partition 1 : ID=0xc, start-CHS (0x0,130,3), end-CHS (0x5,249,31), startsector 8192, 87851 sectors; partition 2 : ID=0x83, start-CHS (0x6,30,25), end-CHS (0xcb,20,9), startsector 98304, 3164160 sectors
1.6-1.7Gb образ - можно на 2Gb накатать, а 4Gb - за глаза... Учитывая что это консольная система и доступ будет по SSH.

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: Raspberry Pi: hard realtime Linux/Xenomai

Непрочитанное сообщение Olej » 21 мар 2022, 01:50

Olej писал(а):
20 мар 2022, 18:31
Разархивирование:
Наученный неудачным опытом предыдущих 4 лет - начинаю работу с образами на SD карте с проверки SD карты.
Об этом: образы и карточки

Аватара пользователя
Olej
Писатель
Сообщения: 21338
Зарегистрирован: 24 сен 2011, 14:22
Откуда: Харьков
Контактная информация:

Re: Raspberry Pi: hard realtime Linux/Xenomai

Непрочитанное сообщение Olej » 25 мар 2022, 03:33

Теперь проверенную SD карту можно писать:

Код: Выделить всё

olej@R420:~/Загрузки/ISO/RapsberriPi/Xenomai_3.0.8$ pwd
/home/olej/Загрузки/ISO/RapsberriPi/Xenomai_3.0.8

Код: Выделить всё

olej@R420:~/Загрузки/ISO/RapsberriPi/Xenomai_3.0.8$ ls -l *.img
-rw-r--r-- 1 olej olej 1670381568 июн 12  2019 raspbian_stretch9_xenomai3.0.8.img
Запись:

Код: Выделить всё

olej@R420:~/Загрузки/ISO/RapsberriPi/Xenomai_3.0.8$ time sudo dd if=raspbian_stretch9_xenomai3.0.8.img of=/dev/sdd bs=1M conv=fsync status=progress
[sudo] пароль для olej:       
1608515584 байт (1,6 GB, 1,5 GiB) скопирован, 23 s, 69,9 MB/s
1593+0 записей получено
1593+0 записей отправлено
1670381568 байт (1,7 GB, 1,6 GiB) скопирован, 312,559 s, 5,3 MB/s

real	5m15,787s
user	0m0,015s
sys	0m5,279s

Ответить

Вернуться в «Одноплатные компьютеры»

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и 2 гостя