Pages

Sunday, December 4, 2011

PowerMac G4/1Ghz with Nvidia GeForce 440mx notes

Just a few notes for OpenFirmware, Xorg configuration. Sources guide-open-firmware-apple-bios-0, xorgconf-powermac-g41ghz-geforce-4-mx-apple-studio-display-17, http://sowerbutts.com/linux-mac-mini/.

OpenFirmware:
  • ls - displays contents of the current path in the device tree.
  • devalias - provides a list of short alias names for key hardware devices.
  • .properties - provides a list of properties for the selected device.
  • pwd - displays the current path within the device tree.
  • dev - selects a device (using either the alias or absolute/relative device tree path).
  • words - provides a list of forth scripts associated with the selected device.
  • source - executes a particular forth script.
  • load - loads a image from disk, cd, network or another device.
  • go - execites the currently loaded image.
  • see - displays the source code for a particular forth script.
Booting installation of Debian GNU/Linux Squeeze 6.0 on PowerMac G4/1Ghz: 
0>boot cd:,\install\yaboot
 Partition disk:
1. Don't touch the small Partition #1 at the start of the disk, that contains the partition map itself.
2. Partition #2 (16MB) is for "yaboot", the bootstrap that allows you to boot

3. Linux or MacOS. You want to tell the partitioner to use that partition as a "NewWorld boot partition", and set the bootable flag.
4. Partition #3 (2.0GB) should be used as "swap area".
5. Partition #4 (48.0GB) is your root filesystem, you want to use that as a "ReiserFS journalling file system", format it, and mount it on "/"
 Booting after installation:
0>setenv boot-file hd:3,\yaboot

Xorg.conf PowerMac G4/1GHz GeForce 4 MX:

Section "Device"
Identifier "Configured Video Device"
BusID   "PCI:0:16:0"
Driver  "nv"
EndSection

Section "Monitor"
    Identifier    "StudioDisplay17"
    Option "DPMS"
    HorizSync   30-80
    VertRefresh   50-100
EndSection

Section "Screen"
    Identifier    "Default Screen"
    Monitor        "StudioDisplay17"
    Device        "Configured Video Device"
        DefaultDepth    24
           SubSection       "Display"
             Depth            24
             Modes             "1280x1024" "1024x768" "800x600" "640x480"
           EndSubSection
           SubSection        "Display"
             Depth            16
             Modes             "1280x1024" "1024x768""800x600" "640x480"
           EndSubSection
SubSection "Display"
      Depth      15
      Modes      "1280x1024" "1024x768" "800x600" "640x480"
   EndSubSection
SubSection "Display"
      Depth      8
      Modes      "1280x1024" "1024x768" "800x600" "640x480"
   EndSubSection
SubSection "Display"
      Depth      4
      Modes      "1280x1024" "1024x768" "800x600" "640x480"
   EndSubSection
SubSection "Display"
      Depth      1
      Modes      "1280x1024" "1024x768" "800x600" "640x480"
   EndSubSection
EndSection

Section "ServerLayout"
   Identifier   "Default Layout"
   Screen      "Default Screen"
EndSection

Section "DRI"
   Mode   0666
EndSection




Monday, November 28, 2011

Изложба на Иван Христов - Грога, 15.12.2011 - галерия Аспект - Пловдив


На 15.12.2011г. габровският художник Иван Христов - Грога (всъщност това е баща ми) открива самостоятелна изложба в Пловдив - галерия "Аспект", площад "Стефан Стамболов" 1А (до общината). Откриването е между 16:00 - 20:00 часа.


За повече информация може да посетите сайта му http://groga.gabrovo.com/ а също така и на facebook страницата му: http://www.facebook.com/...

Monday, November 14, 2011

Втори и трети опит за домашна бира.

След успеха на първият опит си поръчах още 2 кита. Правих ги един след друг с разлика няколко дена. Изборът ми се спря на Multons Premium Bitter (светла) и Midland Mild Ale (тъмна).


Ферментацията става по вече описания от мен начин. Важно е просто да се спазват инструкциите.

Midland Mild Ale - до момента на мен не ми беше харесвала тъмна бира. Пробвал съм почти всички които ги има на пазара (за бутилираните говоря) но така и не повторих. Тази мога да кажа че беше супер без никакви забележки. Трябва да отблежа че не харесвам много горчиви бири а това е Ейл който по принцип трябва да е сладникав.


Premium Bitter - това трябва да е типичен английски битер и може би за това на мен не ми хареса. Прекалено ми е горчива. От друга страна родителите ми много я харесаха от което следва че всичко е до въпрос на вкус. Просто трябва да се пробва.

Следващото което ще тествам е пак на Muntons Export Pilsner.

Tuesday, October 18, 2011

Fix console font on NetBSD 5.1/macppc

One of annoying things about booting NetBSD 5.1 on PowerMAC G4 after install is console font which is too big to fit in screen. Today I found solution on port-macppc mailing list. You can see it here http://mail-index.netbsd.org/port-macppc/2011/10/18/msg001479.html.

Edit your kernel config file to look like this:

#options    FONT_GALLANT12x22
options       FONT_VT8x8
then recompile and reboot.

Saturday, October 15, 2011

Webkit-gtk on NetBSD 5.1/macppc additional notes (solved)

I've got response from bug report on webkit-gtk (pkg/45429) and here is solution for fixing compiling process on NetBSD/macppc. Create a file named hacks.mk in pkgsrc/www/webkit-gtk. Copy/paste the following and then do make clean; make.

# $NetBSD: hacks.mk,v 1.4 2010/11/02 07:54:31 wiz Exp $

.include "../../mk/compiler.mk"

### [Sun Nov 14 02:35:50 EST 2004 : jlam]
### On PowerPC, building with optimisation with GCC causes an "attempt
### to free unreference scalar".  Remove optimisation flags as a
### workaround until GCC is fixed.
###
.if !empty(CC_VERSION:Mgcc*) && !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc)
PKG_HACKS+=             powerpc-codegen
BUILDLINK_TRANSFORM+=   rename:-O2:-O0
.endif

Wednesday, October 5, 2011

NetBSD 5.1 pkgsrc webkit-gtk compiling problem on PowerMAC G4

After successful installation I've got working NetBSD 5.1/macppc and I tried to add some pkgs to use the MAC for workstation. Here what I've got:
NetBSD 5.1 (G4) #5: Sat Nov 19 19:39:08 EET 2011
root@macppc:/usr/src/sys/arch/macppc/compile/G4
total memory = 1152 MB
avail memory = 1102 MB
timecounter: Timecounters tick every 10.000 msec
found openpic PIC at 80040000
OpenPIC Version 1.2: Supports 4 CPUs and 64 interrupt sources.
bootpath: /pci@f2000000/mac-io@17/ata-4@1f000/disk@0:3,/netbsd
mainbus0 (root)
cpu0 at mainbus0: 7455 (Revision 3.3), ID 0 (primary)
cpu0: HID0 8450c0bc, powersave: 1
cpu0: 1000.00 MHz, 256KB L2 cache no parity parity enabled, 1MB no-parity L3 cache (DDR SRAM) at 4:1 ratio
Trying to compile some meta-pkgs like gnome or kde I ran into some problems.

webkit-gtk - Compilation fails on some file FastMalloc.cpp but all errors are redirected to /dev/null so I couldn't find how to fix this. There is also bug report from 2009 about this problem you can see it here http://mail-index.netbsd.org/pkgsrc-bugs/2009/02/01/msg030663.html. Here is the error I've got:
zsh 6 # make install
=> Bootstrap dependency digest>=20010302: found digest-20080510
===> Skipping vulnerability checks.
WARNING: No /var/db/pkg/pkg-vulnerabilities file found.
WARNING: To fix run: `/usr/sbin/pkg_admin -K /var/db/pkg fetch-pkg-vulnerabilities'.
===> Building for webkit-gtk-1.4.1nb1
/usr/pkg/bin/gmake all-am
gmake[1]: Entering directory `/usr/src/pkgsrc/www/webkit-gtk/work/webkit-1.4.1'
CXX Source/JavaScriptCore/wtf/libJavaScriptCore_la-FastMalloc.lo
Source/JavaScriptCore/wtf/FastMalloc.cpp:1299: warning: converting to 'size_t' from 'float'
Source/JavaScriptCore/wtf/FastMalloc.cpp: In member function 'void WTF::TCMalloc_PageHeap::scavenge()':
Source/JavaScriptCore/wtf/FastMalloc.cpp:1637: warning: converting to 'size_t' from 'float'
Source/JavaScriptCore/wtf/FastMalloc.cpp: In member function 'void WTF::TCMalloc_Central_FreeList::Populate()':
Source/JavaScriptCore/wtf/FastMalloc.cpp:2833: warning: cast from 'char*' to 'void**' increases required alignment of target type
Source/JavaScriptCore/wtf/FastMalloc.cpp: In member function 'T* WTF::PageHeapAllocator::New() [with T = WTF::Span]':
Source/JavaScriptCore/wtf/FastMalloc.cpp:1142: instantiated from here
Source/JavaScriptCore/wtf/FastMalloc.cpp:1039: warning: cast from 'char*' to 'void**' increases required alignment of target type
Source/JavaScriptCore/wtf/FastMalloc.cpp: In member function 'T* WTF::PageHeapAllocator::New() [with T = WTF::TCMalloc_ThreadCache]':
Source/JavaScriptCore/wtf/FastMalloc.cpp:3045: instantiated from here
Source/JavaScriptCore/wtf/FastMalloc.cpp:1039: warning: cast from 'char*' to 'void**' increases required alignment of target type
gmake[1]: *** [Source/JavaScriptCore/wtf/libJavaScriptCore_la-FastMalloc.lo] Error 1
gmake[1]: Leaving directory `/usr/src/pkgsrc/www/webkit-gtk/work/webkit-1.4.1'
gmake: *** [all] Error 2
*** Error code 2

Stop.
make: stopped in /usr/src/pkgsrc/www/webkit-gtk
*** Error code 1

Stop.
make: stopped in /usr/src/pkgsrc/www/webkit-gtk
Still no solution which means that kde web browser and epiphany web browser will not be build. After 1-2 days searching on the net for solution I decided to solve the problem myself. After some tweaking of the GNUmakefile I finally got the error message that fails the compile process
# c++ -DHAVE_CONFIG_H -I. -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wno-parentheses -fno-exceptions -DENABLE_GLIB_SUPPORT=1 -DBUILDING_CAIRO__=1 -DBUILDING_GTK__=1 -DWTF_CHANGES -DXP_UNIX -DWTF_USE_ICU_UNICODE=1 -DWTF_USE_GSTREAMER=1 -DGTK_API_VERSION_2=1 -DNDEBUG -I./Source -I./Source/JavaScriptCore -I./Source/JavaScriptCore/API -I./Source/JavaScriptCore/assembler -I./Source/JavaScriptCore/bytecode -I./Source/JavaScriptCore/bytecompiler -I./Source/JavaScriptCore/collector/handles -I./Source/JavaScriptCore/debugger -I./Source/JavaScriptCore/ForwardingHeaders -I./Source/JavaScriptCore/interpreter -I./Source/JavaScriptCore/jit -I./Source/JavaScriptCore/parser -I./Source/JavaScriptCore/profiler -I./Source/JavaScriptCore/runtime -I./Source/JavaScriptCore/wtf -I./Source/JavaScriptCore/wtf/gobject -I./Source/JavaScriptCore/wtf/gtk -I./Source/JavaScriptCore/wtf/text -I./Source/JavaScriptCore/wtf/unicode -I./Source/JavaScriptCore/yarr -DPNG_NO_ASSEMBLER_CODE -I/usr/src/pkgsrc-current/www/webkit-gtk/work/.buildlink/include -I/usr/src/pkgsrc-current/www/webkit-gtk/work/.x11-buildlink/include/freetype2 -I/usr/src/pkgsrc-current/www/webkit-gtk/work/.x11-buildlink/include -fno-rtti -fstrict-aliasing -O3 -I/usr/src/pkgsrc-current/www/webkit-gtk/work/.buildlink/include/glib/glib-2.0 -I/usr/src/pkgsrc-current/www/webkit-gtk/work/.buildlink/lib/glib-2.0/include -D_REENTRANT -O2 -O2 -MT Source/JavaScriptCore/wtf/libJavaScriptCore_la-FastMalloc.lo -MD -MP -MF Source/JavaScriptCore/wtf/.deps/libJavaScriptCore_la-FastMalloc.Tpo -c ./Source/JavaScriptCore/wtf/FastMalloc.cpp -o Source/JavaScriptCore/wtf/libJavaScriptCore_la-FastMalloc.o
./Source/JavaScriptCore/wtf/FastMalloc.cpp:1299: warning: converting to 'size_t' from 'float'
./Source/JavaScriptCore/wtf/FastMalloc.cpp: In member function 'void WTF::TCMalloc_PageHeap::scavenge()':
./Source/JavaScriptCore/wtf/FastMalloc.cpp:1637: warning: converting to 'size_t' from 'float'
./Source/JavaScriptCore/wtf/FastMalloc.cpp: In member function 'void WTF::TCMalloc_Central_FreeList::Populate()':
./Source/JavaScriptCore/wtf/FastMalloc.cpp:2833: warning: cast from 'char*' to 'void**' increases required alignment of target type
./Source/JavaScriptCore/wtf/FastMalloc.cpp: In member function 'T* WTF::PageHeapAllocator::New() [with T = WTF::Span]':
./Source/JavaScriptCore/wtf/FastMalloc.cpp:1142: instantiated from here
./Source/JavaScriptCore/wtf/FastMalloc.cpp:1039: warning: cast from 'char*' to 'void**' increases required alignment of target type
./Source/JavaScriptCore/wtf/FastMalloc.cpp: In member function 'T* WTF::PageHeapAllocator::New() [with T = WTF::TCMalloc_ThreadCache]':
./Source/JavaScriptCore/wtf/FastMalloc.cpp:3045: instantiated from here
./Source/JavaScriptCore/wtf/FastMalloc.cpp:1039: warning: cast from 'char*' to 'void**' increases required alignment of target type
./Source/JavaScriptCore/wtf/TCSpinLock.h: In member function 'void WTF::TCMalloc_ThreadCache::PickNextSample(size_t)':
./Source/JavaScriptCore/wtf/TCSpinLock.h:113: error: 'asm' operand requires impossible reload
Quick search over google and I found that there was such problem with compilation of webkit-gtk on other OS's on PowerPC arch. It seems that this is gcc compiler bug on macppc arch. Simple solution is to compile with -O0 (do not optimize) instead of -O2 option.

Just for now here is quick and dirty solution to this:
start building process and when GNUmakefile is generated stop the process with ctrl+c.
Now open generated GNUmakefile (usually in webkit-gtk/work/webkit-gtk-1.4.x/GNUmakefile) with some editor and replace all -O2 with -O0 then save and exit and continue the compilation process by entering the dir and typing: gmake


Here are some links for the solutions Í found:
debian solution - http://blog.gmane.org/gmane.linux.debian.ports.powerpc/month=20070801/page=8
webkit-gtk bug report - https://bugs.webkit.org/show_bug.cgi?id=14521
bug report to gcc - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10396

Unfortunately these solutions dont work on NetBSD and I'm not good enough with assembler to make myself a patch.

When this was fixed I ran into another error.
gmake[1]: Entering directory `/usr/src/pkgsrc-current/www/webkit-gtk/work/webkit-1.4.3'
test -d Source/WebKit/gtk/po/ || mkdir -p Source/WebKit/gtk/po/
/usr/bin/msgfmt -c -o Source/WebKit/gtk/po/id.mo Source/WebKit/gtk/po/id.po
test -d Source/WebKit/gtk/po/ || mkdir -p Source/WebKit/gtk/po/
/usr/bin/msgfmt -c -o Source/WebKit/gtk/po/it.mo Source/WebKit/gtk/po/it.po
Source/WebKit/gtk/po/it.po:1324: keyword "msgctxt" unknown
Source/WebKit/gtk/po/it.po:1324:8: parse error
/usr/bin/msgfmt: found 2 fatal errors
gmake[1]: *** [Source/WebKit/gtk/po/it.mo] Error 1
gmake[1]: Leaving directory `/usr/src/pkgsrc-current/www/webkit-gtk/work/webkit-1.4.3'
gmake: *** [all] Error 2
This can be fixed easy by upgrading your gettext package. cd pkgsrc/devel/gettext; make install

Thursday, September 22, 2011

Домашна бира - първи опит

Тези дни реших да си направя домашна бира. Като за начало исках нещо по-просто и за това се разрових из нета. За бирата е нужно малц, захар, вода, мая, достатъчно голям бидон и аеротапа. Намерих един сайт който продава готов малц. Сайтът е http://www.birata.net/. Всъщност това ми е вторият опит защото първия опит се оказа че бидона ми имал фабрично останал ръб който е скъсал на едно място уплатнението и първата бира се вкисна. Поръчах си от сайта малц Pilsner. Представлява една голяма консерва с озахарен малц + пакетче с мая. Следвайки инструкциите които идват с консервата всичко мина както трябва и ето го резултата.
Бидонът престоя в мазето където имам постоянна температура от 18-19 градуса което е перфектно според инструкциите. След като аеротапата спря да бълбука (по инструкция беше 6-8 дена а тя спря на 7мия) се заех със затварянето на бирата в бутилки. Ето го и резултата.
Цялата процедура е малко досадна поради факта че като за начало никъде няма капачки за бутлки и трябваше от заведения да търся. След това се оказа че почти всички бутилки за бира на пазара в момента са с различен размер на капачката (+/- 0.2-0.3мм) от което идват и проблемите. Най-кофти се оказаха бутилките от Ариана. Все пак накрая успях да ги затворя.
Оставих бутилките да престоят един ден в кухнята ми (на около 24-26 градуса) и на другия ден ги пренесох в мазето да се газират и отлежават. Според инструкцията е нужно поне 2 седмици да отлежават. Тествах ги след 2 седмици и половина и бирата се оказа превъзходна.
Наздраве! Паралелно с това се пробвах да си направя собствен малц но срещнах накои трудности от към намирането на необходимите продукти. Основно проблема е хмел но за това ще пиша като имам резултати.

Monday, September 12, 2011

Installing NetBSD 5.1 on PowerMAC G4

I've tried to install NetBSD 5.1 on PowerMAC G4 (grey) following these instructions: http://wiki-static.aydogan.net/How_to_install_NetBSD_on_a_Power_Macintosh_G4_Grey but I had problems booting.

Here are some tips.
It seems that netbsd-INSTALL.gz image which comes from 5.1 installation CD is ok but netbsd-GENERIC.gz and others were not tested so they crashed when I rebooted after installation. So here what I've done to solve this after installation is done but can not boot to netbsd:

Hold Alt+Win+o+f when starting PowerMAC to enter in OpenFirmware cmd line menu.
Boot with install netbsd image. Something like that:



0> boot cd:,\ofwboot.xcf \macppc\binary\kernel\netbsd-INSTALL.gz


When it boots you will be prompted for (I)nstall (S)hell ... choose 'S;.
Now from shell mount your root partition and chroot to it and set up your internet connection:


# mount /dev/wd0a /mnt2
# chroot /mnt2
# ifconfig gem0 192.168.1.10 255.255.255.0 up
# route add default 192.168.1.1
# echo "nameserver 192.168.1.1" > /etc/resolv.conf


Now you can download and compile your own kernel. Get syssrc.tgz from ftp.netbsd.org untar it and go to sys/arch/macppc/conf. Use GENERIC config as if you try to compile POWERMAC_G5 or some of the others result will be the same - kernel crash on next reboot.

# cp GENERIC G4
# vi G4
# config G4
# cd ../compile/G4
# make depend
# make
# cp /netbsd /netbsd.old
# cp netbsd /netbsd


If you want your Xorg server to work you need to add these lines to kernel config file and recompile it:

options WSFB_FAKE_VGA_FB
options WSDISPLAY_COMPAT_PCVT # emulate some ioctls
options WSDISPLAY_COMPAT_SYSCONS # emulate some ioctls
options WSDISPLAY_COMPAT_USL # VT handling
options WSDISPLAY_COMPAT_RAWKBD # can get raw scancodes


Now you just use: X -configure and then test your config with: X -config xorg.conf.new

Monday, August 1, 2011

OpenVPN for Android 2.2 on Viewsonic Viewpad 7

Compiling tun kernel module for android 2.2 (for Viewsonic Viewpad 7)

root your device with some program. I used this one z4root.1.3.0.apk.
Here is also local copy if link above does not work: z4root.1.3.0.apk

get the source (you need git for this one)

$ mkdir tmp
$ cd tmp
$ git clone git://android.git.kernel.org/kernel/common kernel
$ cd kernel
$ git checkout -t origin/android-goldfish-2.6.32

Prepare it for cross-compiling for ARM

export ARCH=arm
export CROSS_COMPILE=/path/to/android/source/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
make mrproper

Get the old configuration of your device

adb pull /proc/config.gz config.gz

Copy the file in your kernel dir

zcat config.gz > .config
make menuconfig

under device drivers->network->
check as module (M) TUN interface

exit and save

$ make modules

Now you have compiled kernel module for tun/tap interfaces
Copy drivers/net/tun.ko somewhere and put it on your device

adb push tun.ko /system/lib/modules

and test if it works

adb shell
# insmod /system/lib/modules/tun.ko

you should see that module is inserted

# lsmod
lsmod
tun 12487 2 - Live 0x7f04f000
ar6000 254669 0 - Live 0x7f000000
#

Now your android is almost ready for installation of openvpn on it.
Since original android viewpad openssl lib does not have all ciphers you need to update it.
Use this link for instructions to update your libssl/liblzo/libcrypto: TunnelDroid README
OpenVPN/libssl/liblzo/libcrypto in one zip - get it from here: TunnelDroid Files or a local copy here: openvpn-binary.zip

Now browse android market and install OpenVPN Installer and OpenVPN Settings then follow the instructions.
OpenVPN Installer have some configuration options about where is your busybox installed and makes proper links
Finally use OpenVPN settings for final configuration of the openvpn.

Useful links:
http://code.google.com/p/android-openvpn-installer/issues/detail?id=2
cross compiling android

tun.ko - module for android 2.2, kernel 2.6.32.9, ARM arch
config.gz - kernel config.gz downloaded from viewpad7 (android 2.2)
android-viewpad7 - check out this dir for more android stuff

link to original page: http://www.horizon9.org/~geroy/