Daily blurbs May. 2014


daily blurbs

23 May 2014 (Fri)

09:04:27 # Life I was talking about scripting languages at a table at linuxcon. I was probably too negative about perl and too in love with C++ for scripting tasks. Martin Pauley at the table was very much for perl but then he has his affiliation and experience with perl. I too am too affiliated with scripting with C++. I wrote binfmtc, although I don't know if anybody other than me is using it seriously.

If I were to redesign binfmtc I would worry a bit more about how the magic names are designed, because it would be a pain to do a migration, so we're stuck with the system even after 9 years.

6 May 2014 (Tue)

17:52:26 # Life Trying out Debian arm64 port on chroot running inside qemu-user-static. It seems like it's getting closer to being ready. qemu 2.0 already hit Debian unstable, so qemu-aarch64-static is already available in qemu-user-static package. Today, debootstrap cross almost works but doesn't, because of some missing dependencies in debian-ports. hmmm... Some of the commands I needed to do:

I installed qemu-user-static on sid chroot, and installed the binfmts script on host.

$ sudo cp sid-chroot/usr/share/binfmts/qemu-aarch64 /usr/share/binfmts/
$ sudo update-binfmts --import qemu-aarch64

$ sudo cp sid-chroot/usr/bin/qemu-aarch64-static aarch64-chroot/usr/bin

I installed chroot using debootstrap.

$ sudo mkdir chroot
$ cd chroot
$ sudo debootstrap --foreign --arch=arm64 --no-check-gpg unstable . http://ftp.debian-ports.org/debian/

  install libselinux1
$ (cd tmp && wget http://ftp.debian-ports.org/debian/pool-arm64/main/libs/libselinux/libselinux1_2.2.2-1+profile_arm64.deb ) 
$ sudo dpkg -x tmp/libselinux1_2.2.2-1+profile_arm64.deb .
 copy over etc/passwd and etc/group from some other chroot.
$ sudo chroot .
# debootstrap/debootstrap --second-stage
# dpkg -i tmp/libselinux1_2.2.2-1+profile_arm64.deb
# debootstrap/debootstrap --second-stage

apt complained some missing packages at this point still. So I manually downloaded and installed using dpkg -i base-passwd_3.5.28_arm64.deb libdb5.3_5.3.28-3.1_arm64.deb gnupg_1.4.15-1.1_arm64.deb libselinux1_2.2.2-1+profile_arm64.deb gpgv_1.4.15-1.1_arm64.deb libsemanage-common_2.2-1_all.deb libaudit-common_2.3.2-2_all.deb libsemanage1_2.2-1_arm64.deb libaudit1_2.3.2-2_arm64.deb libustr-1.0-1_1.0.4-3_arm64.deb

And now I have managed to get apt not complain. Getting closer and closer ...

1 May 2014 (Thu)

17:43:01 # Life Brainfuck. I've been playing with brainfuck for my holiday project. It seems like an easy enough language to write an interpreter and compiler. So far I've implemented several C++ interpreters and x86_64 assembly, refreshing to read x86_64 ABI documentation to see that it's not quite the same as x86. I thought rax was going to be used as first parameter, but rdi is used instead, hmmm why did I think so.

Junichi Uekawa

$Id: 201405.html.en,v 1.4 2014/05/23 00:30:25 dancer Exp $