Forum: PS2 Linux - Show your penguin pride. Discuss PS2 Linux (Official kit and Blackrhino) here!


The above video goes away if you are a member and logged in, so log in now!




 
Would you like to get all the new info from
PSX-Scene in your email each day?




Want to learn more about the team keeping you up to date with the latest scene news?

Read about them now!

Check out our Developer bios, too!

 


User Tag List

Like Tree1Likes

Thread: Porting of Linux 2.6 to PS2
  

Page 8 of 42 FirstFirst ... 6 7 8 9 10 18 ... LastLast
Results 71 to 80 of 413
  1. #71  
    danielb's Avatar
    danielb is offline Member
    Join Date
    Apr 2011
    Location
    Portugal
    Posts
    168
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    2
    Likes Received
    3
    Well definitely x11 is not working...
    Reply With Quote  

  2. #72  
    wisi is offline Member
    Join Date
    Nov 2008
    Posts
    100
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    What is the current status of the project? - No new posts for two months now...?
    I managed to set-up the toolchain for compiling the new 2.6 kernel - so I'm looking forward to helping in the development. (If I can.)
    Reply With Quote  

  3. #73  
    Mega Man's Avatar
    Mega Man is offline Member
    Join Date
    Jan 2010
    Location
    Germany
    Posts
    519
    Downloads
    0
    Uploads
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    5
    Likes Received
    35
    The Linux 2.6 kernel has now support for 64 bit and 128 bit general purpose registers. This means that the kernel preserves the register content of the user space applications. Before this change only 32 bit of the 128 bit where preserved. This makes it more compatible to the old applications.
    I also added this feature for the lo1, hi1 and shift amount registers.
    I wanted to drop the support for the 64 bit kernel. I think it is enough to have a 32 bit kernel with support for 64 bit and 128 bit. I think the old kernel was designed the same way. I added support for additional instructions in the simple toolchain, but not in the ubuntu toolchain.
    Sometimes USB is failing. USB is then not working anymore. This happens from startup or later.
    Currently I am trying to get a framebuffer driver working. A framebuffer driver would allow to run the X-Server. The text output is working and I can see the penguin logo, but it suddenly stops. The power off button is then not working anymore when pressed for a short time. I assume the IOP stopped. Maybe someone has an idea how to debug it.
    I need to add support for CLUT in the frame buffer (8 bit) to speed it up. I detected that the data cache and the instruction cache is flushed when a DMA transfer is started. This type of DMA is only used by graphic. I disabled flushing of the instruction cache, this change increased the performance and would also increase the performance of the old kernels. The driver is not yet included in the CVS. The normal console driver needs to be disabled.
    The CDVD driver is included in the CVS, but it is compiling with errors.
    There is still no audio driver.
    The ethernet driver prints stupid stuff: eth%d instead of eth0.
    The driver for the memory cards is missing.
    The driver for the game pads is included and seems to work. I only tested the output at /proc/ps2pad. Maybe someone could test more.
    The joystick driver was not copied. Maybe it would directly work.
    The binutils need support for additional r5900 instructions (file binutils-2.20.1/opcodes/mips-opc.c). This can be copied from the patches used by chewi into the file linux/simple-toolchain/binutils-2.20.1-mipsel-ps2.patch and needs to be tested. It would be good to have a test program for the additional assembler instructions.
    I detected that the function wbflush() was not yet implemented. I copied the code from the old kernel (not in CVS yet). I don't know if this has any impact.
    The sysproc driver is also not copied. For this the kernel needs to be able to process the parameters passed to the kernel at startup, so that bootinfo can be copied completely (see arch/mips/ps2/prom.c, compare to old linux 2.4 version, function prom_init()). I added support for sysproc in the new kernelloader 2.5 (not released yet, but in CVS).
    Full support for power button is missing (see linux-2.4.17_ps2/arch/mips/ps2/powerbutton.c).
    The current version of the linux 2.6 kernel in CVS seems to run stable, except for the USB problem.

    EDIT: I realized that I already copied the ps2sysconf stuff, but the bootinfo structure is not yet completely copied. Also I cleaned up the framebuffer driver code and now it is working without stopping while booting:



    The video shows the USB problem at the end (repeating "o"). Network was still working and I could shutdown the PS2 via ssh. aptitude is working when less packages are installed.
    Last edited by Mega Man; 01-07-2012 at 03:19 PM.
    niccoooodu61 likes this.
    Reply With Quote  

  4. #74  
    wisi is offline Member
    Join Date
    Nov 2008
    Posts
    100
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    Can you give me some advice about porting the memory card driver? I made several attempts in this direction but currently I am stuck at an error in compile "drivers/ps2/mc.c:862: error: lvalue required as left operand of assignment" The error's "source" is most likely the file sifutil.h :
    Code:
    #define PS2SIF_ALLOC(ptr, size, align) \
        do { \
          (ptr) = ((__typeof__(ptr))sif_alloc_ptr = PS2SIF_ALIGN(sif_alloc_ptr, (align))); \
          PS2SIF_ALLOC_DPRINT("(%14s,%4d,%3d) = %p\n", #ptr,(size),(align),(ptr)); \
          sif_alloc_ptr += (size); \
        } while (0)
    And more precisely - the third line of the quoted above.
    I found several documents on porting driver modules from kernel 2.4 to 2.6 and some for creating drivers, but I can't seem to find code quite such as the one above.
    Reply With Quote  

  5. #75  
    Mega Man's Avatar
    Mega Man is offline Member
    Join Date
    Jan 2010
    Location
    Germany
    Posts
    519
    Downloads
    0
    Uploads
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    5
    Likes Received
    35
    It is not allowed to cast a variable on the left side of an assignment. This has been changed after GCC version 2.95. I think in GCC version 4. You need to move one opening round bracket from left to right, so that the casting "(__typeof__(ptr))" is done after the assignment. The new code is:

    Code:
    #define PS2SIF_ALLOC(ptr, size, align) \
        do { \
          (ptr) = (__typeof__(ptr))(sif_alloc_ptr = PS2SIF_ALIGN(sif_alloc_ptr, (align))); \
          PS2SIF_ALLOC_DPRINT("(%14s,%4d,%3d) = %p\n", #ptr,(size),(align),(ptr)); \
          sif_alloc_ptr += (size); \
        } while (0)
    EDIT: I made screenshots of a running xfce on the PS2. It is currently running very slow. The startup took something around 30 minutes. Starting of one application needs ~10 min. The mouse cursor is normally moving slow (jumping) and sometimes fast enough to be usable. The framebuffer driver is not yet optimized. xorg expects that the framebuffer is memory mappable, but I think this is not possible, so I emulated it by copying the virtual framebuffer to the physical one every 20 ms (including complete data cache flush).
    xfce1.jpg xfce2.jpg xfce3.jpg
    Last edited by Mega Man; 01-08-2012 at 03:55 PM. Reason: Added screenshots of xfce on PS2
    Reply With Quote  

  6. #76  
    SkyNet's Avatar
    SkyNet is offline Member
    Join Date
    Apr 2010
    Posts
    612
    Downloads
    5
    Uploads
    0
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    204
    Likes Received
    182
    Mega Man ---nice job. I really like your screenshots of xfce on PS2.
    Can you tell me---do you run Linux 2.6 on fat ps2 with hdd inside or it can also run on slim ps2 through LAN?
    How do you think---how long can it take to create Linux 2.6 which will work perfectly on ps2 and have no bugs?
    Also if that time would come , could slim users enjoy it also ? I mean through LAN? Do you think LAN will have enough speed and PS2 will have enough power to run Linux 2.6 with xfce on top of it?
    Is it possible to create LiveDVD of Linux 2.6 and install it to SMB?
    Also does usage of Linux 2.6 on ps2 give possibility to run web-browser with support for flash from Adobe? In other words --will users have ability to watch Youtube videos in window of web-browser?

    Mega Man how do you think is it possible to install second GPL disk of Linux Kit to SMB Folder and run it on slim ps2?

    Also woud be nice if you could tell when new version of Kloader would be released ?

    Thanks...
    Last edited by SkyNet; 01-09-2012 at 06:18 AM.

    Best Regards from PS3 Linux User
    Reply With Quote  

  7. #77  
    Mega Man's Avatar
    Mega Man is offline Member
    Join Date
    Jan 2010
    Location
    Germany
    Posts
    519
    Downloads
    0
    Uploads
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    5
    Likes Received
    35
    Quote Originally Posted by SkyNet View Post
    Can you tell me---do you run Linux 2.6 on fat ps2 with hdd inside or it can also run on slim ps2 through LAN?
    This was running from the internal HDD in a fat PS2.

    Quote Originally Posted by SkyNet View Post
    How do you think---how long can it take to create Linux 2.6 which will work perfectly on ps2 and have no bugs?
    I don't know. A good running system could be there in some months or years.

    Quote Originally Posted by SkyNet View Post
    Also if that time would come , could slim users enjoy it also ?
    Yes, but you need a USB memory stick for the swap memory.

    Quote Originally Posted by SkyNet View Post
    I mean through LAN?
    Yes, but you still need a swap memory.

    Quote Originally Posted by SkyNet View Post
    Do you think LAN will have enough speed and PS2 will have enough power to run Linux 2.6 with xfce on top of it?
    I think that the LAN speed is not a problem. The limited memory is a problem. The boot time could stay at 30 min.

    Quote Originally Posted by SkyNet View Post
    Is it possible to create LiveDVD of Linux 2.6 and install it to SMB?
    Yes, but you still need swap memory.

    Quote Originally Posted by SkyNet View Post
    Also does usage of Linux 2.6 on ps2 give possibility to run web-browser with support for flash from Adobe?
    Yes, but this would be slow.

    Quote Originally Posted by SkyNet View Post
    In other words --will users have ability to watch Youtube videos in window of web-browser?
    HTML5 would work, but maybe the video is too slow.

    Quote Originally Posted by SkyNet View Post
    Mega Man how do you think is it possible to install second GPL disk of Linux Kit to SMB Folder and run it on slim ps2?
    Not with Linux 2.6. archicharmer already did this. There is an archive of the hdd installation at sourceforge.

    Quote Originally Posted by SkyNet View Post
    Also woud be nice if you could tell when new version of Kloader would be released ?
    First, I want to improve some stuff.
    Reply With Quote  

  8. #78  
    wisi is offline Member
    Join Date
    Nov 2008
    Posts
    100
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    The errors, while compiling the memory card driver were just too many and too difficult for me to fix, so I changed my focus to the cdvd driver. I got to the point where it compiles without errors and a "fare amount" of warnings, however the is a segmentation fault when doing "mount -t iso9660 /dev/ps2cdvd0 /<mount_point>". Because this is my first attempt at porting kernel driver, I would like to check the whole driver for errors. However what I need is documentation on the matter. There are some very useful documents on the internet about porting drivers from 2.4 to 2.6 kernel, but they do not quite describe some parts of the block driver's code. So my question is - where can I find an example cdvd driver that works on the 2.6 kernel and documentation on the matter?

    Edit:
    After some "investigation" the cause for the segmentation fault seems to be the the cdrom_open() function in the cdrom.c source in the drivers directory. The fault happens exactly when the "cdi" structure is accessed - consequently ether the cdrom_device_info struct does not properly connect with the "cdi" variable in the driver module or there is something wrong in the cdrom_open() function, however I do not think that cdrom_open() function could faulty, because it is coming from a stable kernel release... I don't know how to fix the above.
    Last edited by wisi; 01-11-2012 at 11:14 AM.
    Reply With Quote  

  9. #79  
    Mega Man's Avatar
    Mega Man is offline Member
    Join Date
    Jan 2010
    Location
    Germany
    Posts
    519
    Downloads
    0
    Uploads
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    5
    Likes Received
    35
    Documentation of the CDROM subsystem is here: SourceForge.net Repository - [kernelloader] Index of /linux/linux-2.6.35.4-mipsel-ps2/Documentation/cdrom
    But this may not be enough.
    Often it is good to look at other drivers, for example drivers/ide/ide-cd.c. You can also check what changed between the kernel versions.

    cdrom_open() is called from ps2cdvd_common_open(). In my version the first parameter cdi was not defined. I think you changed this. You need to pass in the pointer of ps2cdvd_info. This need to be done in some clean way. The driver needs to be restructured.
    Reply With Quote  

  10. #80  
    uusser is offline Registered User
    Join Date
    Jan 2012
    Posts
    31
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    0
    thanks
    Reply With Quote  

Page 8 of 42 FirstFirst ... 6 7 8 9 10 18 ... LastLast
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •