Hi folks
I was asked recently if one could optimize runtime performance of the Linux-Kernel by compiling it with an optimized compiler.
The answer: No
Even trying to use the armv7l hardfloat gcc causes the kernel build to fail.
Working but bricked devices
Hi Folks
I stumbled across the following link right now:
http://androidroot.mobi/technical/tf-secure-boot-key/
In my opinion this kind of sealing up a device is an unacceptable measurement.
I suggest you check if there is such a security measurement documented and if it is boycott the respective producer.
3.1.10 on adam
ha! with backlight working! 😉
localhost ~ # uname -a Linux localhost 3.1.10-00008-g03975b1-dirty #106 SMP PREEMPT Wed Apr 11 12:43:53 CEST 2012 armv7l ARMv7 Processor rev 0 (v7l) adam GNU/Linux
Accessing/manipulating networkdevices in C
Howdy how
BenBE asked me to give him some advice how to open and manipulate network devices from user space.
Although it’s not really a kernel hacking issue, as his way of asking proposed I’ll post the respective link after all, because I’ve promised.
Usually you use APIs for such a purpose.
In this case its the library called Libdnet and the project page can be found under the following URL:
http://libdnet.sourceforge.net/
I just have taken a look into Debian’s package viewer and somehow the relevant header (Â /usr/include/dnet/tun.h )
is missing ( packages broken/outdated? O.o)
Anyway, the header file would only tell us that much (Thx to benny for the tip with the highlighter! 😉 ):
/*
* tun.h
*
* Network tunnel device.
*
* Copyright (c) 2001 Dug Song
*
* $Id: tun.h,v 1.2 2005/01/25 21:29:12 dugsong Exp $
*/
#ifndef DNET_TUN_H
#define DNET_TUN_H
typedef struct tun tun_t;
__BEGIN_DECLS
tun_t *tun_open(struct addr *src, struct addr *dst, int mtu);
int tun_fileno(tun_t *tun);
const char *tun_name(tun_t *tun);
ssize_t tun_send(tun_t *tun, const void *buf, size_t size);
ssize_t tun_recv(tun_t *tun, void *buf, size_t size);
tun_t *tun_close(tun_t *tun);
__END_DECLS
#endif /* DNET_TUN_H */
An example can be found a little more deeper on the following site:
http://csfacwiki.cslabs.ewu.edu/wiki/securitylab/index.php/Libdnet
By using libudev for dynamic file checking and path allocation
you could also make it a little more dynamic and flexible.
(Using hardcoded strings in order to allocate files is usually a very bad idea)
Gentoo: Emerging with RAMFS
Hi
bash_vi asked me to write a short resume about how to emerge programs by using the ramfs for speedup.
Here’s how to do so:
mount -t ramfs -o size=2g ramfs /var/tmp/portage/
- The “-t ramfs” is obviously self explainatory.
- The “-o size” tells the ramfs driver how much space of the RAM should be reserved for this specific mount point.
- “/var/tmp/portage/” is the place where portage usually unpacks the source boundles and begins to compile them.
You can also put it into your /etc/fstab
in order to keep it for each reboot with
echo -e "ramfs\t/var/tmp/portage/\tramfs\tsize=2g\t0\t0" >> /etc/fstab
Now you can compile your stuff within RAMFS
Links:
- http://de.gentoo-wiki.com/wiki/Emerge_beschleunigen
- http://www.thegeekstuff.com/2008/11/overview-of-ramfs-and-tmpfs-on-linux/
PlasmaActive on NI Adam
Howdy
At least someone got Plasma-Active running on the NI Adam:
http://share.basyskom.com/contour/Deployment/latest-basyskom-plasma-active-tegra2-mer.html
But 2.6.38 , where 3.2 would be recent is really a NO-GO.
Really.
Dear developers.
Why don’t you write code which can be merged into upstream again?
notion ink adam – tegra devices
I’m really pissed.
It’s again the same shit as with my HTC dream (or should I say nightmare?)
Ages outdated kernel, branches with drivers which are that badly written that they can never be merged into Torvalds master again.
Dudes! Can’t you have a look over to Texas Instruments?!
The OMAP is well documented, there are free drivers available and there is always support in main.
WTF? What use is a kernel where no peripherial drivers are available within the official, recent kernel?!
Bánh bao
Howdy
Yesterday I’ve made me some “Bánh bao”.
Basically its steamed bread with meat within.
Of six only one survived until now, and I’ll eat this one, just after I’ve written this entry.
It’s really delicious and I can only suggest you to try it as well.
As you can see, I left out the eggs, because eggs don’t agree with my stomach.
The dough
Ingredients
- A pack dry yeast
(Read on the back, for how much flour it’s supposed to be used!) - 1/2 tablespoon salt
- 1 tablespoon tapioca flour
- 250g flour
- 20g sugar
- 125ml warm water
(“hot” mode of the water-tap is sufficient) - Add 1 tablespoon distilled vinegar into the water
Processing
- Put the dry ingredients into a bowl and mix it well.
- Put the vinegar and the warm water into a cup and mix it.
- Put it into the bowl with the dry ingredients and mix it, then knead it.
- Let it go up for 3hours.
Stuffing
Ingredients
- Some ground meat (anything does it)
- Vietnamese sausage alias Lap Suong (lạp xưởng)
http://en.wikipedia.org/wiki/Chinese_sausage
Very important, because it gives the characteristic taste to the whole stuff! - Mushrooms (Shitake)
- 1/2 Onion
- 1 tablespoon sugar (Yes! That much!)
- 1 tablespoon salt (Yes! As well 😉 )
- 1/2 tbsp fish sauce
http://en.wikipedia.org/wiki/Fish_sauce - 1/2 tbsp distilled vinegar
- A bit of Garlic, Pepper, Paprika
- Maybe some glass noodles, if you like
Processing
Peel the lạp xưởng and cut it into pieces.
Cut the onion into small pieces, as well as the mushrooms.
Then take some of the pieces of the lạp xưởng and cut it into smaller pieces and mix it with the fish sauce, the union pieces, the mushroom pieces, the sugar, the salt.
Now spice it up with garlic, paprika, pepper, etc. until the sauce gets a very intensive sweet-salty taste.
Put two hands of ground meat into the stuff mix it well.
The filling procedure is similar to the one for ManjÅ« (https://blog.the-leviathan.ch/?p=204), only “upside down”.
Which means, that you close the package on the top, not on the ground.
You take the dough, make a similar plate, like with the Manjū dough, and then put a fist of the filling into the middle.
Then you put some of the lạp xưởng pieces on the side of the raw meat ball and close it, like described for the Manjū.
Also steaming is similar to ManjÅ«, only a bit longer, because it’s meat within:
Steam it for 30-40 min!
Kubuntu-Mobile on GTA04
Hi
I tried out Kubuntu-Mobile [1] on my GTA04.
Considering that it’s a whole KDE4 there on this little smart phone it runs surprisingly fluent.
Nepomuk still fucks up, and also the layout is a little bit suboptimal for this small screen (2.8″!)
But after all: I’ve got KDE4 running on a smart phone!
Yeeeha! ^_^
[1] http://cdimage.ubuntu.com/kubuntu-mobile/releases/11.04/release/
Pseudo OOP in C AND Go
This post I made because I just discovered an entry from long time ago, which I forgot to answer.
pseudo code:
int *method_to_append() { return 0; } void *do_something() {} struct foo { int attribute1 : 0; int attribute2 : 0; int *method1 : method_to_append; void *method2 : do_something; }; struct foo new_obj; new_obj->method2();