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