Author Archives: admin
Fixed ubuntu vnc keymap problem

ubuntu 12.04 vnc keymap has trouble, D become minimize all windows and S become start menu, run these to fix it.
compile dwarfdump in mac

CFLAGS='-I /opt/local/include -L /opt/local/lib' CXXFLAGS='-I /opt/local/include -L /opt/local/lib' ./configure --prefix=/peter-dwarfdump make make install Because mac gcc doesn't search for the /opt/local, so need to specific the path manually.
Peter-dwarf library can show hierarchy data for compile unit now

Peter-dwarf library can show hierarchy data for compile unit now
Thinkaholic open source event 2015/2/10

Thinkaholic open source event 2015/2/10
I should look at this

I should look at this printf -> _fstat -> _sbrk -> write
now is good enough

now is good enough, can focus on library things
tomcat auto startup script

just save this to /etc/init.d/tomcat and link to /etc/rc5.d/S99tomcat
disable gnome "unable to mount..." dialog

gsettings set org.gnome.desktop.media-handling automount false ...and enable it again: gsettings set org.gnome.desktop.media-handling automount true
Elf is having duplicate compile unit, why ld doesn't clear it out?

Elf is having duplicate compile unit, why ld doesn't clear it out?
why i receive zero in my socket

I have two programs, one written in c++, the other is in java. C++ keep sending bytes to java, overtime write out 400KB. Java keep receiving the data using the readBytes function, this function returns an integer which is the number of byte it actually read for the function call. For every send (400kb) in […]
The jump profiling is little bit enhanced

The jump profiling is little bit enhanced. After load up the ELF kernel, it can read out all symbols and display it in the jump profiling window. It helps people to tracing where the EIP jumping to which c++ function.
Empty bochs instrument crash in linux, but not in mac

Empty bochs instrument crash in linux, but not in mac. My instrument code is nearly empty. core dump: configure: run by: bochsrcSDL.bxrc: instrument.h: instrument.cc:
Java has bug again

Java has bug again. After you installed idk 1.8u25 in your mac, open Eclipse.app/Contents/MacOS/eclipse.ini, you will see: -vm /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home But actually this line has no effect, when you run eclipse with -console -debug, you still see it is running use idk 1.6 "-vm /System/Library/Frameworks/JavaVM.framework". To fix it, change that line to -vm /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java Peter.
make bochs runs faster

Without "CXXFLAGS=-O3", boots can only runs 20M ips on my i5 mbpr. With that, now is 57M ips.
volatile keyword is not everything to prevent compiler optimization

When you add the keyword "volatile" in front of variable declaration, it prevents compiler to optimize the line that are using that variable. But if the line is completely useless, compiler will still optimized it out, prevent to generate any byte code for it.
bochs problem again

I am unable to get the “” from the input stream. Please help. In command line, when i start bochs, I saw “”, which is very normal. But if i use java to read it out, i never got the . I tried different classes (BufferedReader, InputStream), none of them success.
My proposal to Bochs team

Dear Bochs Team My name is Peter, the author of GKD, prior call peter-bochs. Peter-Bochs parses the bochs debugger output. During the last 3 years, I am busy to support each version of bochs because the output of bochs debug command is different. I want to format the bochs debugger command output to xml, so […]
Tutorial : Add a debug command in bochs

This tutorial teach you how to add a debug command in boots, you need to touch these files only: debug.h dbg_main.cc lexer.l parser.y Step 1) First of all, you need to add your command (see below) to lexer.l, don't add anything below the line "[A-Za-z_][A-Za-z0-9_]* { bxlval.sval = strdup(bxtext); return(BX_TOKEN_GENERIC); }", because it will eat […]
bochs can't compile in mac (solved)

bochs can't compile in mac because the configure always set gui_debugger=1, just set this variable to 0 in line 22459. Bochs can be compile in mac with "./configure --enable-disasm --with-sdl --enable-debugger"
${new} will cause error in old tomcat 7

Below code has error, because the ${new} will crash old tomcat 7. JSTL has bug.
Sharepoint online bug

Sharepoint online bug - If you place an html-email-address to it and click "check" button, it crash. Even you delete all text and the check button can't resume normal.
GKD 20141011 released

Fixed a serious bug using windows bochs. In java, the function String::matched will return false when it has a '\r'. Download here https://www.dropbox.com/s/7nf2swf1exkisna/GKD-20141011.jar?dl=0
(solved) install .net 3.5 to azure windows 2012

Install the below fix will resolve this issue http://support2.microsoft.com/kb/3005628
sharepoint 2013 deploy app hang up

In visual studio, when you deploy your sharepoint app, if t hang up in "Installation is in progress". Make sure your "SharePoint Timer Service" is running, this problem will be solved
GKD with windows is working

Someone comlpaint GKD dosen't work with Bochs in windows. Because the bochs path has space. I just tested it in windows 7, this issue doesn't exist.
command to connect sharepoint 2013 to office web apps server

First, do these in office web apps server Second, do these in sharepoint server
openocd with arm is working

openocd with arm is working
openjtag + openocd + smartarm 2200

Finally connect my openjtag usb device to my old smartarm 2200 development board using openocd. The next step is buy a x86 dev board (intel galileo) and try to use openocd with it. Then port peter-bochs to support openocd, finally i will have a hardware debug platform for os dev. http://www.zlgmcu.com is a development board […]
find out what's wrong in your page table

People always ask me why their virtual address is not pointing to the right physical address. Almost every time is the page table get wrong. But there are few possibilities, such as PD, CR address and etc.. You can use these step to find out. 1) First, set the physical point and run until the […]
Kendo with asp.net MVC ScriptBundle issue

Kendo with asp.net MVC, need to be careful this link in your web.config You have to turn off debug="true", otherwise the ScriptBundle includes will not working.
[solved] usb wireless mouse freeze periodically in ubuntu 12.04 lts

usb wireless mouse freeze periodically in ubuntu 12.04 lts, edit /boot/grub/grub.cfg, add a boot option irqpoll will fix it
libelf.h has bug, it includes a missing header file

I cross compile the libel 0.8.13 on my ubuntu 12.04lts. I used the below command to configure it. The compile process is success and installed it correct. But inside the include/libelf/sys_elf.h, it includes a missing header file (elf.h). Just comment it out, and it will works.
Mac has no mkfs.vfat

I have to package my kernel into a fat partition and load it up using grub, but mac doesn't has a mkfs.vfat and "mount loopback" command. So I am creating a small programing using https://github.com/waldheinz/fat32-lib/ to manipulate the fat image by myself. So far these two small program can read & write a fat image: Read […]
Adding file to newlib's sys folder and make it compile

Adding file to newlib's sys folder and make it compile, you need to modify the Makefile.in, see below
newlib sys/*.h will not be copied to output directory

All the .h file in the sys directory will be included when compiling the files in your sys/XXX. They (sys/*.h) will not be copied to the output directoy, that mean they are just used for compile only.
A little bit better - Showing the MBR

A little bit better - Showing the MBR Here is the java code to read MBR out:
We should mix 4K and 4M Page

I was fixing the PSE and PAE page table display for GKD, I found out Linux using 4M page to map large address space and it uses 4K page to map broken space. So advance OS should mix use of 4K and 4M page.   Now GKD supports PSE=1 (4M page)
I think i am under dns attack

I think i am under dns attack, in my /var/log/message i keep seeing these. Someone is using over 2000 ip to lookup my dns server.
GKD dependency tree graph

GKD dependency tree graph