Re: NetBSD-current for openmoko GTA02
Hi, Peter Tworek writes: > It took me some time, but the source code of the port can be downloaded > from github: https://github.com/tworaz/src/commits/gta02-5.99.58. Thanks! I'm not sure if I will build this but I hope to find time to read through the code. What references did you use? Datasheets and the linux drivers (which linux version?)? -Timo ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: NetBSD-current for openmoko GTA02
On 12/07/2011 06:27 AM, Timo Juhani Lindfors wrote: > Peter Tworek writes: >> For some time now I've been spending some of my free time on getting >> NetBSD running on my Freerunner. > Interesting, do you have this work in some version control system? > Would be nice to see all the steps :-) It took me some time, but the source code of the port can be downloaded from github: https://github.com/tworaz/src/commits/gta02-5.99.58. Building the code should be straightforward if you have some experience with NetBSD. Just checkout the sources somewhere, enter the directory from command line and execute: # ./build.sh -N 1 -u -U -O ../obj-evbarm -T ../tools-evbarm -m evbarm -V HAVE_GCC=45 build # ./build.sh -N 1 -u -U -O ../obj-evbarm -T ../tools-evbarm -m evbarm -V HAVE_GCC=45 kernel=GTA02 Depending on your hardware this can take several hours to complete. After it's done the kernel images should be available under ../obj-evbarm/sys/arch/evbarm/compile/GTA02/{netbsd, netbsd.ub, netbsd.gz.ub}. Note however that this is just a kernel image without any kind of ramdisk. The sources for the ramdisk I've used in my previous image can be found here: https://github.com/tworaz/netbsd-gta02-ramdisk. To build it just add tools-evbarm from kernel build process yo your path, enter checked out ramdisk repository and run: # ./build.sh This should be much quicker to complete. The result of the build process is ramdisk.fs file. To embed the ramdisk inside the kernel I use the following shell script: (You'll have to change _WRKDIR value to make it work) #!/bin/sh _WRKDIR=/home/tworaz/devel/NetBSD _OBJDIR=$_WRKDIR/obj-evbarm _TOOLDIR=$_WRKDIR/tools-evbarm _MDSETIMG=$_TOOLDIR/bin/arm--netbsdelf-mdsetimage _OBJCOPY=$_TOOLDIR/bin/arm--netbsdelf-objcopy _MKUBOOTIMG=$_TOOLDIR/bin/nbmkubootimage _MKUBOOTIMG_ARGS="-A arm -T kernel -a 0x3020 -n NetBSD/gta02 -C gz" echo -n "Removing old kernel: " rm -f netbsd.gz.ub echo "OK" echo -n "Obtaining new binaries: " cp $_OBJDIR/sys/arch/evbarm/compile/GTA02/netbsd . cp $_WRKDIR/ramdisk-gta02/ramdisk.fs . echo "OK" echo -n "Preparing new kernel image: " $_MDSETIMG netbsd ramdisk.fs $_OBJCOPY -S -O binary netbsd netbsd.bin gzip -c netbsd.bin > netbsd.bin.gz $_MKUBOOTIMG $_MKUBOOTIMG_ARGS netbsd.bin.gz netbsd.gz.ub > /dev/null echo "OK" echo -n "Removing temporary files: " rm -f ramdisk.fs rm -f netbsd rm -f netbsd.bin rm -f netbsd.bin.gz echo "OK" _SIZE=`du -k netbsd.gz.ub| awk '{ print $1 }'` echo "New Image Size: $_SIZE kB" The final image should boot on the Freerunner using the procedure I've described in my first email. /ptw ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: NetBSD-current for openmoko GTA02
On 12/08/2011 07:15 PM, Nick Sheppard wrote: > On 06/12/11 23:11, Peter Tworek wrote: >> Hi, >> >> For some time now I've been spending some of my free time on getting >> NetBSD running on my Freerunner. > > At last someone bringing NetBSD to the Freerunner! I've been waiting > for the day when I can point to my phone and casually say "Of course > it runs NetBSD ...". Thank you! You're welcome :). > > I'm only a tinkerer myself, but some years ago I enjoyed getting > NetBSD running on an old Blue & White Mac G3. I was really impressed > by the enthusiasm and helpfulness of the NetBSD community, and by > their mission to make it run on every possible hardware, down to > toasters if possible. What, I really like about NetBSD is the code and documentation. While hacking on linux kernel when I wanted to learn something, I've always ended up spending enormous amounts of time on digging trough mailing list archives, some random web pages, text files under Documentation/ etc. I've usually found what I wanted, but the whole experience was tiresome. With NetBSD I've never had any problems with finding valuable information in the manual pages. > It always seemed to me that the Freerunner would make a great project > (if I only had the time and the skill). So I'm really happy to see > what you're doing. Well I can't promise that this project will ever be as usable as linux is on the GTA02. I'm afraid that there is still enormous amount of work to be done on this port. I also don't think I have the necessary skills and time to do it all by myself. I'll probably continue working on it as long as it's fun, but can't promise anything more. > One question now - what about the GTA04? Looking at NetBSD > development, it seems that people are already working on ports to > current OMAP and BeagleBoard type hardware. Does this mean that a > port to the GTA04 would be relatively straightforward? Or is this too > good to be true? I doubt I'll buy GTA04 myself. The hardware looks nice, but at this moment it's a little bit above my price range. Maybe this will change over time... Porting NetBSD to GTA04 is certainly doable. As you've said there is already some sort of support for OMAP boards in NetBSD, so it should be just a matter of getting it to run on GTA04. I guess that with the debug board working it should be a couple of days of work to get the kernel booting. After that however, all the drivers for GTA02 peripherals that NetBSD doesn't support have to be written. This is probably the most time consuming task. > > Thanks again for letting us know what you're doing, > > Nick Sheppard > > ___ > Openmoko community mailing list > community@lists.openmoko.org > http://lists.openmoko.org/mailman/listinfo/community ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: NetBSD-current for openmoko GTA02
On 06/12/11 23:11, Peter Tworek wrote: Hi, For some time now I've been spending some of my free time on getting NetBSD running on my Freerunner. At last someone bringing NetBSD to the Freerunner! I've been waiting for the day when I can point to my phone and casually say "Of course it runs NetBSD ...". Thank you! I'm only a tinkerer myself, but some years ago I enjoyed getting NetBSD running on an old Blue & White Mac G3. I was really impressed by the enthusiasm and helpfulness of the NetBSD community, and by their mission to make it run on every possible hardware, down to toasters if possible. It always seemed to me that the Freerunner would make a great project (if I only had the time and the skill). So I'm really happy to see what you're doing. One question now - what about the GTA04? Looking at NetBSD development, it seems that people are already working on ports to current OMAP and BeagleBoard type hardware. Does this mean that a port to the GTA04 would be relatively straightforward? Or is this too good to be true? Thanks again for letting us know what you're doing, Nick Sheppard ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: NetBSD-current for openmoko GTA02
On Wed, Dec 7, 2011 at 10:17 AM, Dave wrote: > Hi. > > I agree - the steps involved would act as tutorial for further steps. > > Dave > > > On Wed, Dec 7, 2011 at 3:27 PM, Timo Juhani Lindfors > wrote: > >> Peter Tworek writes: >> > For some time now I've been spending some of my free time on getting >> > NetBSD running on my Freerunner. >> >> Interesting, do you have this work in some version control system? >> Would be nice to see all the steps :-) >> >> Well, yes and no. Locally I'm using git to keep track of all the changes I've made. The problem is that so far I haven't managed to push the repository anywhere. This is due to repository size. Right now it's around 2GB. When I've tried to push it to github my attempt stalled at about 30% and never finished. It could probably be easier if I'd have only imported sys/ directory into git, but well, it's too late for that. The solution might be in forking https://github.com/jsonn/src/ and cherry-picking my changes on top of that, but it'll take me some to get it done. One thing you can be sure of is that in one form or another I'll make my modifications public. /ptw > >> ___ >> Openmoko community mailing list >> community@lists.openmoko.org >> http://lists.openmoko.org/mailman/listinfo/community >> > > > ___ > Openmoko community mailing list > community@lists.openmoko.org > http://lists.openmoko.org/mailman/listinfo/community > > ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: NetBSD-current for openmoko GTA02
Hi. I agree - the steps involved would act as tutorial for further steps. Dave On Wed, Dec 7, 2011 at 3:27 PM, Timo Juhani Lindfors wrote: > Peter Tworek writes: > > For some time now I've been spending some of my free time on getting > > NetBSD running on my Freerunner. > > Interesting, do you have this work in some version control system? > Would be nice to see all the steps :-) > > > ___ > Openmoko community mailing list > community@lists.openmoko.org > http://lists.openmoko.org/mailman/listinfo/community > ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: NetBSD-current for openmoko GTA02
Peter Tworek writes: > For some time now I've been spending some of my free time on getting > NetBSD running on my Freerunner. Interesting, do you have this work in some version control system? Would be nice to see all the steps :-) ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
NetBSD-current for openmoko GTA02
Hi, For some time now I've been spending some of my free time on getting NetBSD running on my Freerunner. The port is far from complete, but as far as I can tell it's the most advanced one up to date. Compared to previous attempts this one doesn't require a debug board to see that the OS is actually boots :). What you can expect from it: * Basic framebuffer driver, it's complete enough to get color text on the screen, but the kernel has to be started from u-boot for it to work, * Working serial port (requires a debug board), * Working I2C driver, * Basic PCF50633 driver (rtc + power button + basic detection of events like usb cable plug/unplug, power management related stuff is not implemented), * LED's + vibrator driver (controlled by sysctl), * Working SPI driver (already supported by NetBSD), unfortunately there are no drivers for peripherals attached to this bus :( * Basic USB OHCI driver, host mode only, you can't log in into your freerunner via ssh like under linux :(. * AUX, Power button handling. Right now AUX does nothing besides printing message to the screen. Power button can be used to shut down the phone. * Touchscreen driver. Not very useful right now, but it works. The easiest way to try it out is to: 1. Download the image from [1] 2. Boot your freerunner into u-boot (AUX+PWR) 3. Copy the image into device RAM by using dfu-util: $ dfu-util -R -D netbsd-gta02-5.9.56.gz.ub -a 0 4. Connect to u-boot usb-serial console: $ cu -l /dev/ttyACM0 5. Start the kernel: GTA02v5 # bootm 0x3200 If all goes well after a few seconds you should see some boot messages scrolling on the screen. Next there the phone should start to vibrate, flash some leds etc. After that it tries to list detected bluetooth devices (doesn't work right now), displays current date and spawns a shell. At this point there is not much that can be done. There is no way to log into the device and execute commands without a debug board :(. Fortunately it's possible to shut it down without removing the battery. Just press and hold the power button for about 4sec. Right now my main focus is to have the code cleaned up, split into series of patches and submitted (at least partially) to NetBSD. I'll probably continue working on this port, but can't promise that it will ever reach the level of usability that linux has. It was mostly written for fun and to learn a little bit more about NetBSD internals. /ptw [1] http://tworaz.net/downloads/NetBSD/gta02/netbsd-gta02-5.9.56.gz.ub ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community