andy_shev: (carstyle)
There is mini-HOWTO for the Git repository configuration for the Linux kernel project to get its history contiguous from Linux 0.01 till these days. The standard Linux kernel Git tree refers to its mother upstream via origin. We need to add two more remotes, id est history.git (history group) and history.git (Thomas Gleixner):
git remote add history https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git
git remote add tglxh https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git
With this being done, you already may access to the old stuff by tags. But Git history is abrupted as before, on v2.6.12-rc2:
$ git log --oneline v2.6.12-rc2
1da177e4c3f4 (tag: v2.6.12-rc2, replaced) Linux-2.6.12-rc2
The trick is so called reference replacement (used to be a grafts file). We need to add two replacements to stitch these three trees: origin, history, and tglxh together.
$ git replace -l --format long
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (commit) -> a3628e41a9946c4fe93d9b2ae5906e1b2184fa8e (commit)
7a2deb32924142696b8174cdf9b38cd72a11fc96 (commit) -> 3d1ac2f58324f59a7b56f067cfd2cb8cc3af0865 (commit)
To achieve that run
$ git replace --graft 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 e7e173af42dbf37b1d946f9ee00219cb3b2bea6a
$ git replace --graft 7a2deb32924142696b8174cdf9b38cd72a11fc96 379a6be1eedb84ae0d476afbc4b4070383681178
Now, if you run git log against v2.6.12-rc2, you will see the rest of the history:
$ git log --oneline v2.6.12-rc2
1da177e4c3f4 (tag: v2.6.12-rc2, replaced) Linux-2.6.12-rc2
e7e173af42db (tag: v2.6.12-rc2-pre, tglxh/master, tglxh/HEAD) Linux 2.6.12-rc2
607899e17218 [PATCH] x86_64: Fix segment constraints
d21ca622e8b8 [PATCH] missing gameport dependencies
92bff94b41b2 [PATCH] missing include in lanai.c
...
fa1ec1000cf9 (tag: 0.10) Linux 0.10 (November 11, 1991 ???)
bb441db1a90a Linux-0.01 (September 17, 1991)
Note, search in the Git history (via git log) is obviously will work through the whole history now, and many other commands. Enjoy!
andy_shev: (warrior)
Interestingly that I have got a broken email from Wise (at least looking into the headers it doesn't ring any bell of any possible scams, the full message is provided here). Their first reaction, of course, is to deny that they have screwed up QA, or development, or other processes:
Kuvakaappaus_20250316_120547.png
The question is that does email contain any suspicious activities?
andy_shev: (carstyle)
andy_shev: (carstyle)
andy_shev: (contemplative)
I needed to find a power supply (12V 6A or more) with kinda yet another standard connector to power one specific Intel Atom N450 based motherboard. On the photo below there are connectors from four power supplies.

Power supply connectors

Okay, yellow one is not what I was looking for and IBM power supply with it provides 16v, which is a bit more than needed. So, the rest three have the very same connector, BUT...

(Look at the following pucture very careful till continue with reading)

Power supplies

...three different pin layouts! Good that motherboard has all set of protections (wrong polarity) and (one of) the power supply(ies) has a shortcircuit protection. Otherwise I would got working only one out of two: motherboard and power supply.

P.S. Be careful with this type of connector.
andy_shev: (carstyle)
After experimenting with Intel Edison board I decided to have a look at Dell Venue 7 3740 which is based on the same chip (but has higher frequency and bigger eMMC, including LTE modem, display, and audio). It can be found on the second hand market for something like 60€ + delivery (as of day of writing this blog post).
Dell Venue 7 3740
Before doing anything useful it would be nice to have an access to the only free serial port (the same as for Intel Edison it's called /dev/ttyMFD2 in the stock kernel). For this, let's open a back cover and look at the motherboard:
Dell Venue 7 3740 motherboard
Our interest here is the 40-pin connector which has last 4 pins related to the UART, but it's good that we may find necessary signals in better, from soldering perspective, locations as depicted below:
UART pins
The signals are +1.8v TTL, be aware to find an appropriate adapter. Luckily I have had one which is +1.8v by default and connected directly to it, so +1.8v signal is unconnected in my case, while being soldered just in case:
UART connection
The stock image doesn't issue anything to UART. However, if you rooted the device as pretty well described in the Dell official documentation, you would be able to run something like
adb shell
dmesg > /dev/ttyMFD2


(Note that default UART settings are 9600,8,n,1)

Next step is to build U-Boot for it, stay tuned!
andy_shev: (Default)
In our lab we are using a lot of different DUTs and most of them are connected via PDUs for the remote power cycle. The biggest part of PDUs are APC 7820B or similar (from APC). APC is controllable via SNMP and everything is so far, so good.

Couple of years ago I have got Keil Systems EnviroBot PDU (not produced anymore) from e-waste, which is 12 ports and quite an interesting device in a sense that it's accessible via HTTP only.

After a few hours of experimenting (yeah, I'm not a ninja in HTML/XML + shell) I have nailed it down to make it accessible via our scripts that in their turn are for users logged via SSH.

So, to show the state of the certain port:
curl -s -L --noproxy '*' -o "<FILE>" "http://<ADDRESS>/power.cgi?mdu=0"
xmllint --xpath "//tr[td/input[@name=\"switch<PORT>\"]]/td[3]/text()" --html "<FILE>" 2>/dev/null

Turning OFF...
curl -s -L --noproxy '*' -o /dev/null -d switch<PORT>="1" -d d12="1" -d B1="Submit" http://<ADDRESS>/out_control.cgi

...and turning ON:
curl -s -L --noproxy '*' -o /dev/null -d switch<PORT>="1" -d d12="0" -d B1="Submit" http://<ADDRESS>/out_control.cgi

Couple of weeks ago, due to some changes, we have ordered another PDU from IntelliNet, which appears a new device also accessible via HTTP-only.

For it it looks slightly different.

State:
curl -s -L --noproxy '*' -o "<FILE>" -u "admin:admin" "http://<ADDRESS>/status.xml"
xmllint --xpath "//outletStat<PORT>/text()" "<FILE>" 2>/dev/null

OFF:
curl -s -L --noproxy '*' -o /dev/null -u admin:admin -X POST "http://<ADDRESS>/control_outlet.htm?op=1&outlet<PORT>=1&submit=Anwenden"

ON:
curl -s -L --noproxy '*' -o /dev/null -u admin:admin -X POST "http://<ADDRESS>/control_outlet.htm?op=0&outlet<PORT>=1&submit=Anwenden"

In all cases:
  • <ADDRESS>: IP or FQDN address of the PDU

  • <PORT>: power switch port, usually from 0 to 7

  • <FILE>: temporary file to cache the results, so one can get info for all ports on per port basis
  • andy_shev: (carstyle)
    Intel Minnowboard (v1) was one of the first Intel's attempts to create an open hardware (okay, to some extent, if we take all possible blobs into consideration) platform based on Intel CPU or SoC (in this case it's an Intel Atom E600 series with EG20T PCH).

    Minnowboard (v1)

    Linus Walleij, who was actively maintaining the GPIO subsystem, once sent a patch to convert PCH UDC (USB Device Controller) driver to use GPIO descriptor interface. However, the original code looks strange and seems never worked. It means that VBUS detection mechanism wasn't supported by the kernel. His patch didn't change that, only improved to use modern data structures and APIs. That time I have promised him that I will check the schematics and test it at some point.

    First part of the journey appears to be enabling IRQ on GPIO SCH controller, which is not quite usual in a sense of delivery to the OS. The (semi-)wrong assumption that the IRQ is shared with SCI, which is IRQ #9 for x86 case, brought up the wrong change ec689a8a8155 ("mfd: lpc_sch: Add support for Intel Quark X1000") in the kernel (yeah, sometimes product organizations focused on easier way to get job done, without deeper investigation involved). That change has been partially reverted in 922e8ce883e5 ("mfd: lpc_sch: Partially revert "Add support for Intel Quark X1000""). Thanks to Jan Kiszka from Siemens for pointing out to the issue and developing initial fix that landed in the kernel with 7a81638485c1 ("gpio: sch: Add edge event support").

    So, are we done? Nope! The second part is to fix GPIO in the UDC driver to be in align with the schematics, according to which (see page 4 D5 and page 8 B1-C2) it uses pin 12 (starting from 0, a.k.a. GPIO_SUS7) on that GPIO controller to detect VBUS. Hence the promised change to the driver 049d3db625a6 ("usb: gadget: pch_udc: Provide a GPIO line used on Intel Minnowboard (v1)") and its updated version dfc03e0bae86 ("usb: gadget: pch_udc: Use PCI sub IDs instead of DMI").

    Now we done, right? Not really. What about to test? Yes, the third part is to be sure that it indeed works. The astute reader already asks the question: Why do we need this at all? The board has separate connection for USB host and UDC, it should simply work!. Unfortunately no.

    There are possibilities regarding to how UDC should behave when the host is connected. One is to power the device (in our case the board itself) by VBUS, in other words to be USB self-powered device. This is not implemented in case of Minnowboard (v1). So another possibility is to detect VBUS to see when we actually got the host connection. But this is broken on... PCB level and hence doesn't work.

    Let's look again at the schematics. First of all on the page 8 B2-B3 the ~4:7 resistor divider (39 kOhm : 68 kOhm) is depicted. It's needed for the high voltage, which is +5v, to be converted to the chip level, which is +3.3v.

    VBUS sense

    So far so good. However, if we go to the page 19 C4 we will see... bootstrap pull-up 10 kOhm to +3.3v (with above 68 kOhm it gives us ~1:7 divider).

    GPIO SUS7 bootstrap

    Okay, let's assume we connected USB device to it which may consume up to 100 mA on the +5v line. By Ohm's law its resistance could be equal to 50 Ohm. In such case we will have 10 kOhm to +3.3v on one leg and 39 kOhm + 68 kOhm (like in parallel due to above "short circuit") on the other. It still gives us ~1:2.5 divider against +3.3v power rail. That's still well higher than the logical "1" threshold.

    Which means that VBUS detection is always high! The bootstrap is dedicated to detect the B1 stepping of the Intel Atom E600 SoC (see page 19 D2-D3). What to do in such case? I don't know the good answer because electrically it's not gonna work. Yes, we may use some timer logic or so to let the BIOS detect that, but I decided just to ignore the bootstrap, so I simply unsoldered R229 from the board. I hope somebody may fix the BIOS to just always assume the B1 stepping if it's not done yet.
    andy_shev: (proud)
    Historically and due to lack of knowledge about process the ACPI IDs for some devices are abusing the specification. As of today the v6.4 of it [1] says in the chapter 6.1.5 "_HID (Hardware ID)":

    A valid ACPI ID must be of the form “NNNN####” where N is an uppercase letter or a digit (‘0’-‘9’) and # is a hex digit. This specification reserves the string “ACPI” for use only with devices defined herein. It further reserves all strings representing 4 HEX digits for exclusive use with PCI-assigned Vendor IDs.



    Note that the first part of the ACPI ID is a Vendor ID which has to be in the official registry.

    However, we have a lot of IDs, including some of them issued by Intel, that do not follow that.

    Recently, while I cleaned up kernel from fake IDs [2] that hardware vendors never ever allocated for their devices (many of them simply don't care), it appears that Siemens on behalf of Seiko Epson was trying to establish yet another fake ID for their RTC discrete component in the Coreboot [3] and Linux kernel [4].

    Luckily they have listened to me and actually followed the process, i.e. they have asked Seiko Epson to register themselves in ACPI registry [5], which happens couple of month ago under the 'SECC' vendor (while it’s even better, I dunno why they haven't simply reused their PNP Vendor ID which is in the registry for ages). And they have allocated the proper ID, SECC6110, for their RX6110SA component.

    Now the patches for Coreboot (see [6]) and Linux kernel, as commit 8d69f62fddf6 ("rtc: rx6110: add ACPI bindings to I2C"), are accepted.

    I really wish that all hardware vendors will follow this, including Intel (for the record, we improved a lot the ACPI ID allocation process and there shouldn’t be new cases).

    Funny thing that newly introduced ID for Alibaba abusing the specification due to potential collisions with real PCI IDs ('BABA' can be represented as 0xbaba).
    andy_shev: (carstyle)
    I have spent some time to get the proper pin layout for the 16x2 LCD from Ampire (the model is AC162AY, or 162A-1-D Rev.B). The problem begins with the different polarity of the power rails. I thought if the polarity is wrong, what else can be wrong? That's how I started my search on Internet without any positive results — all of the layouts have a standard power rail polarity, i.e. 1 — GND and 2 — Vcc. At the end it comes I wasted time. Only power rails are messed up, other than that everything seems standard and I got a text on the LCD.

    P.S> Found a PDF with photos of that LCD: https://fccid.io/W8F800920910/Internal-Photos/Internal-Photos-2-1406623.pdf
    andy_shev: (serious)
    Настолько редко захожу в ЖЖ, да и почти перестал читать свои подписки...
    andy_shev: (serious)
    Решил набросать мысли, которые, возможно, могут ответить на вопрос "что же дальше?"

    Успокоиться. Не должно быть никакой эйфории. Все материальные блага и документы должны быть описаны и сохранены.

    xВласть. Януковича и прочих бывших при власти ни в коем случае не убивать. Должны быть процессы, показательные, но справедливые.

    Тимошенко. Пусть лечится в Германии, ей не место во власти, лучше пусть будет каким-нибудь общественным деятелем, омбудсменом, к примеру.

    Люстрации. Необходимо широкомасштабное поле для люстраций. Причём под них должны попадать в независимости от политичской или иной принадлежностей.

    Злоупотребления. Пытаться нарыть материалы на власть имущих, в независимости кто они и какие заслуги имеют.

    Перевыборы. Однозначно и президентские, и парламентские с учётом проведенных люстраций.
    Должны появится те люди, которые были на майдане, которые себя зарекомендовали. Все, включая майдановцев и любых других, кто придёт ко власти в той или иной мере, обязаны понимать, любое мутное действие должно вызывать противодействие и публичность.

    Суд. Происходящее в судах и прочих органах должно быть прозрачно. В каждом суде стоит создавать микромайданы по сути, если видно, что дело шьётся белыми нитками. То есть должна быть возможность в легитимном поле влиять на судей.

    Коррупция. Как многие, особенно с востока страны, заявляли, мы сами у себя должны делать Европу. Так вот, факты требования или дачи взяток должны быть опубликованы. Самим взяток не давать!

    Олигархия. Отбирать, национализировать и т.п. предприятий делать не надо. Достаточно заставить выполнять всё, что касается социальных гарантий сотрудников, экологии и модернизации для улучшения условий труда.
    andy_shev: (contemplative)
    В передаче от 22.11.2013 первым выступал известный Н.Я. Азаров. На время его выступления убрали лого "поддержки студии" (около 100 человек, если не ошибаюсь, которые по выборке примерно соответствуют всей стране). Подали также кадр, где некоторые давят на пультах кнопку "поддерживаю". Очевидно, что сверху поступило указание. Правда и верхов непонятно сколько ­— сплошная многовекторность...
    Так вот, помимо многочисленных ляпов "по Фрейду" пана Азарова, по-моему вполне ясно, что вся идея похода в Европу — сплошная профанация. Но и со стороны Европы не совсем правильно говорить, что "не Европа тянет к себе Украину, а Украина хочет в Европу". Ведь для Европы Украина некий краеугольный камень как геополитики, так и ресурсов (в основном земельных). Лакомый кусочек для хозяина, но Россия — не хозяин. Одно в этом всём радует: текущая украинская власть играет в lose-lose. Если в Европу с европейскими ценностями, то их посадят с конфискацией рано или поздно. Если же в Россию, то зачем царю Владимиру Владимировичу сильные, свободомыслящие губернаторы?
    andy_shev: (Default)
    So, finally I've moved to dreamwidth.org. I set up crossposting, but I prefer to use Dreamwidth engine instead of LJ.
    andy_shev: (Default)
    ...and nothing more.
    andy_shev: (warrior)
    Мужской род, пишем "обОих", женский род — "обЕих". Сложно?
    andy_shev: (contemplative)
    Что-то много разговоров о FreeBSD на этой неделе. Даже твит был, где явно радостно воспевалось "Happy Birthday [to me, FreeBSD]". Увидев тот твит, подумалось, что Сен-Санс написал музыку "[Умирающего] лебедя" как раз в мажорных тонах, но партия, исполненная Анной Павловой, заканчивалась трагически...

    f16 -> f18

    Jun. 13th, 2013 11:30 pm
    andy_shev: (proud)
    Наконец решил переехать на новомодное, с идеями чучхэЛеннарта Поттеринга (меня тут за чаем коллеги в качестве стёба попросили линки на lurkmore использовать, ну, вот тут уместно), воплощённое во всей красе в F18. То, что это самый тяжкий апгрейд в моей жизни, я понял после двух вечеров, поминая всуе идеи чучхэ, заложенные в основе. На такую глубь ковыряния системы при апгрейде я не опускался давно. Но давайте по порядку.

    Вечер первый, или ничто не предвещало беды

    Традиционно я обновляю систему через yum. Так же начал и в этот раз, загрузил и установил пакеты fedora-release и fedora-release-notes руками, потом сказал yum update. Yum радостно зашуршал и через какое-то время выдал список ломающих систему зависимостей (самосборные пакеты), после их удаления все зависимости просчитались, и манящий своей перспективой вопрос "Продолжить [д/Н]:" появился на экране. Я, наивный, ответил: "Конечно, да!"

    Полчаса на загрузку (да, я отсталый, у меня 10Мбит канал), и приключения начинаются...

    Рекурсия - см. Рекурсия. Попытка просчитать транзакцию завершилась печально: rpm не смог найти свою внутреннюю зависимость rpmlib(X-CheckUnifiedSystemdir), и мне предложено было обновить RPM. "Ладно", - думаю я, - "обновлю руками", что сразу и сделал. Перезапускаю yum update, и снова здравствуйте. Картина никак не изменилась, хотя rpm уже 4.10.

    Чем дальше в лес... Исходная зависимость требовалась для пакета filesystem - один из базовых пакетов системы. Попробовал установить пакет руками. Ага, идеи чучхэ не дали совершить действие. Я ж совсем забыл, что тут systemd головного мозга во весь рост! /lib, /bin и /sbin - символические ссылки на /usr/lib, /usr/bin и /usr/sbin соответственно. Я прилежно скопировал каталоги и поставил симлинки на их копии, но не подумал, что содержимое каталогов неплохо бы скопировать в соответствующие каталоги в /usr. Тут-то и поджидало меня веселье. Я говорю, хочу filesystem, glibc и ещё каких-то пару пакетов за раз поставить, игнорируя эту внутреннюю зависимость. Установка радостно обламывается, я остаюсь в системе, где у меня в /lib, /bin и /sbin нет никаких базовых утилит (они же в соседние каталоги забэкаплены)! Пришлось вспоминать LD_LIBRARY_PATH, LD_PRELOAD.

    Может ли быть хуже? А вот может, после того, что команда ls и подобные заработали снова, я попытался обновить glibc. Я уж не припомню, что там обломалось, но каждый последующий запуск чего угодно заканчивался Segmentation fault. Вот тут пришлось ещё вспомнить и запуск бинарников через ld-linux.so... В процессе борьбы я склонялся к варианту "А ну его к чёрту, может с usb-брелока и по-новому раскатать систему?", но не наш же путь! Кое-как, привёл в чувства, догадался наконец скопировать содержимое /lib и Ко в соответствующие каталоги в /usr и перезапустили yum update, правда уже по частям (пара небольших обновления и пара довольно больших), после чего ушёл спать.

    Забыл совсем упомянуть крах базы rpm во время песен и плясок вокруг разломанной системы. rpm --rebuilddb справился вроде бы неплохо, хотя появились дубликаты записей некоторых пакетов. Часть из них я удалил руками, часть (старые пакеты) удалились при обновлении yum'ом.

    День следующий
    Утром перед работой я перезагрузил систему, чтобы под новое ядро всё запустилось, да и посмотреть на этот самый systemd.

    Ага, отвалилась сеть. Ну, ладно, до вечера уж подождёт. Вечером продолжил исследования. Не помню каким бубном и шаманскими танцами, но сеть поднялась (перезагружался для проверки, что автоматом всё тоже сработает). Открыл для себя nm-tool, nmcli и nm-online. Ах, помню, что пришлось сказать systemctl disable network.service - LSB сервис, который по сути кроме красных надписей при загрузке ничего не добавлял (может в этом была причина?).

    Следующая проблема - X не стартуют. Долгое копание в заменителях runlevel'ов и файлах настройки systemd выяснил, автор сего чуда - большой любитель символических ссылок. Первое, надо проставить символическую ссылку на необходимую цель (у нас же systemd, помните?), чтобы она была целью по умолчанию. Попытка запуска init 5 ничего не давала. Посмотрел новомодный файл graphics.target, там упоминался display-manager.service. Догадаетесь, что мне было сказано на попытку systemctl start display-manager.service? Правильно "No such file or directory"! Символические ссылки... Эту мантру должен повторять каждый пользователь systemd. systemctl enable gdm.service автоматически (хоть где-то автоматика сработала!) проставил ссылку gdm.service <- default.service.

    Наконец-то появилась графика, чтобы запускать браузер. Я давно уже использую Xfce, но с каждым релизом там хуже и хуже, такое впечатление, что там специально наняли человека, который чуть-чуть портит.

    Проблемы с Xfce и их решения.

    • systray стал бегать по панели, а не придерживаться её края. Оказывается, раньше tasklist автоматически занимал всю ширину панели. Коммит 080db558 всё испортил. Лечить установкой разделителя перед systray plugin со свойством expandable.

    • magnet-link не открывается. Не знаю, что там произошло, исправление здесь.

    • и самое нетривиальное, часы на боковой панели стали повёрнутыми вертикально. Вначале потратил время, чтобы найти параметр rotate-vertically, который установили в TRUE по умолчанию (что курили?). Затем выяснил, смена параметров вручную в файле настроек панели ни к чему не приводит, они перезаписываются (может я что-то неправильно там форматировал?), зато православный путь - использование xfconf-query, а именно
      xfconf-query -c xfce4-panel -p /plugins/plugin-18/rotate-vertically -n -t bool -s false, предварительно определив, как называется модуль часов.



    Ну, ещё по мелочи, mc перестал нормально отображать цвета в панелях, когда запущен под screen, а терминал 256-цветный. На этот счёт есть запись #902911 в RH Bugzilla.

    В остальном пока что полёт нормальный.

    Valencia

    May. 1st, 2013 06:19 pm
    andy_shev: (carstyle)
    Джерело: Valencia


    Итак, собравшись с мыслями и выложенным фотоальбомом, пишу мини фотоотчёт о посещении Валенсии. Валенсия стала крайним пунктом моего ( Read more... )
    andy_shev: (carstyle)
    Вот и прошёл год пользования железным конём. Короткие итоги:
    • Пробег: чуть-чуть более 11000 км

    • Расход бензина: 8.56 - 9.67 (в среднем) - 10.62 л/100км

    • Средняя дистанция между заправками: 425 км

    • Средний промежуток времени между заправками: 15 дней


    Про стоимость удовольствия даже не спрашивайте - дорого! :)
    Но я доволен.

    Profile

    andy_shev: (Default)
    Andy Shevchenko

    November 2026

    S M T W T F S
    1234567
    8910 11121314
    15161718192021
    22232425262728
    2930     

    Syndicate

    RSS Atom

    Most Popular Tags

    Style Credit

    Expand Cut Tags

    No cut tags
    Page generated Nov. 13th, 2026 02:11 pm
    Powered by Dreamwidth Studios