Tuesday 26th November, 2013
USB errors in fastboot: I was just trying to upgrade my development tablet to Android 4.4 "some kind of allegedly cute codename probably goes here". While upgrading, using whatever weirdy version of fastboot happened to be in my $PATH, I was getting somewhat opaque errors. Noticeably:

apsu:nakasi-krt16s cheesey$ fastboot erase boot
ERROR: could not get pipe properties
erasing 'boot'... OKAY

And then, later:

sending 'system' (611886 KB)... ERROR: usb_write failed with status e00002be
FAILED (data transfer failure (No such file or directory))

And again, later still:

getvar:version-bootloader FAILED (remote: (Nv3pBadReceiveLength))

The results for searching for error e00002be on the Internet seemed to result in a lot of people thrashing around being ad-hoc, but the actual problem (at least for me) was embarassingly simple:

I was accidentally using an absolutely ancient version of fastboot.

Using a more recent fastboot solved the problem entirely. Unfortunately fastboot doesn't have a --version option or anything similar but the newer versions have a longer help message.

Broken fastboot:

$ fastboot 2>&1 | wc -l
20

Working fastboot:

$ /SDKs/Android/fastboot 2>&1 | wc -l
24

If in doubt, there's an up-to-date fastboot included as part of the Android SDK for your platform (in the platform-tools directory).

posted by Rob Mitchelmore, 14:19 (anchor)
Saturday 9th November, 2013
Update to previous RPCEmu post: if you check the code out of mercurial, that now works on OpenBSD.

posted by Rob Mitchelmore, 18:29 (anchor)
Friday 8th November, 2013
Getting RPCEmu 0.8.11 to run under OpenBSD: possibly the intersection of the set of people who get nostalgic for RISC OS and the set of people who use OpenBSD on a daily basis is quite small. However, here's a patch to the RPCEmu 0.8.11 source code.

To use:

$ tar xzf rpcemu-0.8.11.tar.gz
$ cd rpcemu-0.8.11
$ patch -p 1 < /path/to/rpcemu-0.8.11-openbsd.patch

Then build RPCEmu as usual. It requires the allegro game library, but you can get this out of packages or ports, and the packages version (as of 5.4-release) will work fine.

So, what is this patch actually doing?

I'm glad you asked. All it changes is a few preprocessor bits:

  1. The type off_t in OpenBSD is always 64 bits wide. Other OSes have different sets of functions for 64-bit offsets. There's already support for aliasing the explicitly 64-bit names to the "normal" names for __MACH__ in rpcemu.h. The patch adds __OpenBSD__ to that, so that that aliasing will happen under OpenBSD as well.
  2. The hostfs.c file uses utime.h. If __unix or __MACH__ are not defined, it tries to include it as sys/utime.h. On OpenBSD, it isn't in sys/, and __unix isn't set in gcc. So the patch adds __OpenBSD__ to this line, too.
  3. The rpcemu.h file uses the existence of _BIG_ENDIAN to check for the host being big-endian. Unfortunately, on OpenBSD this is always in existence as is _LITTLE_ENDIAN and the _BYTE_ORDER macro switches between them. So this patch replaces the compile-time check for big-endianness in rpcemu.h to check _BYTE_ORDER.

Hopefully this stuff won't be necessary by the next release!

posted by Rob Mitchelmore, 22:11 (anchor)
June 2015May 2015April 2015June 2014
January 2014November 2013October 2013July 2013
April 2013March 2013January 2013November 2012
older posts