Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Tuesday, December 30, 2014

ARCH Linux on a WM8850-based mini laptop

One of my purchases earlier this year was a mini laptop, powered by a Wondermedia WM8850 chip.



It's kinda handy: runs Android/Linux selectively, has a HDMI interface, wired Ethernet and fullsize USB 2.0 ports. Also, it can be charged from USB, tablet style.

Quirks include no HDMI on Linux (yet), and it takes a bit of effort to turn on the wireless. Missing the gpio binary, you can get there by using the sysfs interface:

echo 6 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio6/direction
echo 1 > /sys/class/gpio/gpio6/value


Just echo 0 there to turn it off again.

Compiling a kernel needed some scraping on the web, but can be done like this:

cd linux-3.16
nice make ARCH=arm menuconfig
nice make ARCH=arm zImage
cat arch/arm/boot/zImage arch/arm/boot/dts/wm8850-w70v2.dtb > arch/arm/boot/zImage_w_dtb
mkimage -A arm -O linux -T kernel -C none -a 0x8000 -e 0x8000 -n "My Linux" -d arch/arm/boot/zImage_w_dtb ~/uzImage.bin
make ARCH=arm modules
sudo make ARCH=arm modules_install


The kernel config is online here.

It works happy with a 8GB SD card and adding a bit of swap can't hurt as the 512MB of RAM is not that much.

Thanks for the vt8500 developers!

Saturday, January 26, 2013

Linux filesystem overhead comparison

I needed some temporary data storage for a few days for a migration project, so I wanted to know which filesystem to use, that would give me the most available space.
I'm not considering security, journals or anything here, I just need the maximum amount of space possible. Tests were done on a 2TB SAS disk in a Dell MD1000 array, configured as a one disk RAID0 on a PERC5e controller. The tested ones are the most basic Linux compatible filesystems, by no means is this test academic or universal. The results did surprise me a bit:


I expected FAT to be among the top ones, as it's not a very sophisticated fs, and didn't expect much from ext2/3. I'm also a bit biased towards XFS, so I kind of expected better results.
Tests were done with default mkfs.* settings, only exception is root reserved blocks on ext2/3, which were set to 0. The above output is from df -m. I didn't always pay attention in Operating systems class, so the results of minix surprised me a bit.


I have a sort of love-hate relationship with reiserfs, but for today, it earned itself a job.

Tuesday, May 3, 2011

Linux bridge STP long path cost (802.1t-2001)

A few years ago, we had to implement STP on Linux boxes, using the long path cost standard. If changing the cost values from userspace is not really your thing, here's a patched br_if.c source (mind you, it's for an old kernel version, probably 2.6.17 or something).

Edit: for those who are interested in the actual numbers, not the Linux code: