Saturday, August 20, 2016

Installing Slackware 14.2 on Toshiba ac 100 with mainline kernel

The tasks:
  • - switch to GPT partitioning and partition the EMMC
  • - compile kernel, make it bootable
  • - take slackware root
Before starting, keep at mind that internal EMMC is reffered as /dev/mmcblk0p, but if you plug SD card before loading... well, too early, it will became /dev/mmcblk0p, not 1p, as you can expect. This makes AC100 to boot at least root fs from SD card.
First, follow ARCH linux installation guide. The easiest way to compile kernel is to do it on some other ARM computer - saying, on Orange PI (Banana or Raspberry, if you prefer). Stop following this guide until you have only /boot (and /lib with kernel modules, and /etc/ with fstab) on your's EMMC card.
Then take Slackware arm root from here and copy it to EMMC (without boot and preserving /etc/fstab and /lib/kernel modules). Check twice you have a correct fstab (first, root fs and after you boot it - tmpfs and udev)
Next, take a full slackware-arm to sd card, boot the system, plug sd card, mount it, check you have udev running and.. you know what to do with slackware.

Friday, August 5, 2016

GammuTK - very basic TK gui for sending SMSes via GAMMU

Well, that does exactly what it does, and nothing more: it provides simple TCL/TK gui for sending [long][i18n] SMSes. It takes CSV file with phones, lets you edit the SMS and sends to selected numbers. Nothing more. Grab it here.

Sunday, June 19, 2016

GNU screen on Mac OS X 10.4 & HP/UX 11.11

I love GNU Screen. But their maintainers are insane or lazy. Because they does not fix a bug which exists for a long long time. It affects at least Mac OS X 10.4 and HP/UX 11.11.
It compiles quite good. On Mac OS X you have to patch utmp.c changing makeuser() this way:


  (void)time(&now);
// DtZ   u->ut_tv.tv_sec = now;
  u->ut_time = now;

But when you start screen, it says "Abort trap". The problem in realpath() called in tty.c.: real = realpath(tty, NULL); On the systems mentioned, it does not work with NULL as the second argument, it wants char * resolved_path there.
So at least for Mac OS X this helps (and the code for HP/UX is very similar):

int
CheckTtyname (tty) 
char *tty;
{
  struct stat st;
//  char * real;
  int rc;
  char real[PATH_MAX]; // DtZ
 
  if (!realpath(tty,real)) return -1;
 
//  real = realpath(tty, NULL);
 
//  if (!real)
//    return -1;



UPD: In screen 4.4.0 looks like they fixed it! Great! So on HP/UX 11.11 the only thing to convince it to compile is to create empty file /usr/include/sys/select.h (because in the other case it says "Unable to use fifos and sockets" or like that)