Jump to content


Photo

X-dsl 0.7 Remake Based On New Kernel


  • Please log in to reply
33 replies to this topic

#1 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 17 May 2010 - 02:24 AM

Continued from here.
Motivation to do this: Run X-dsl from a 32k FATX xbpartitioner partition. Also to support a native install to non-standard partition beyond F and G.

I was able to get X-dsl 0.7 to boot from a frugal install with the new 2.4.32 kernel. Here's a work-log of the changes made, I referred to an archive.org copy of the x-dsl documentation:

CODE

The Kernel

The 2.4.26 kernel used in Damn Small Linux (http://www.damnsmalllinux.org) has been replaced by a 2.4.31 kernel. This is a vanilla kernel from kernel.org with the latest xbox-linux patches (http://sourceforge.net/projects/xbox-linux/) and the knoppix 2.4 kernel patch (available in /usr/src on a knoppix cd). The kernel configuration is available at /boot/config-2.4.31-xbox when running X-DSL. The linux-wlan-ng, ndiswrapper and xbox lirc modules were then compiled against this kernel and are included in X-DSL.

In order to add the kernel the following was modified:

/lib/modules/2.4.26 (removed)
/boot/System.map-2.4.26 (removed)
/lib/modules/2.4.31-xbox (added)
/boot/System.map-2.4.31-xbox (added)
/boot/config-2.4.31-xbox (added)
/boot/System.map (updated to link to System.map-2.4.31-xbox)

The kernel modules in the /modules directory of the initial ramdisk also needed to be replaced with their updated versions


1. I used the kernel config grabbed from a running copy of x-dsl 0.7 /boot folder.
2. I compiled against this kernel with make oldconfig under Xebian 1.1.4 running in VirtualBox. Rename bzImage to linux24 to follow x-dsl naming convention in linuxboot.cfg
3. I compiled cloop module with cloop v2.00-1.
4. Use cloop's extract_compressed_fs to extract KNOPPIX as an iso
5. mount KNOPPIX.iso and copy all files to a working folder.
6. Add amended System.map and 2.4.32-xbox modules to KNOPPIX working folder.
7. mkisofs piped to create_compressed_fs to remaster KNOPPIX.
8. Add cloop.o to minirt24.gz modules folder. minirt24 is an ext2 image.
9. Copy KNOPPIX, minirt24.gz and linux24 to KNOPPIX folder on xbox E drive. Already had linuxboot.cfg and default.xbe in place on E drive.
10. Execute xromwell's default.xbe. Select FATX on E.
11. x-dsl 0.7 boots to the familiar DSL desktop.
12. Quick test with firefox and a xshell. Ok.
13. Did a quick loopback install without errors.

Problems:
1. Sound is not working.
2. lirc is not working.
3. Probably many other things.

TO-DO:
1. Modify X-dsl native install script to install to any of the non-standard partitions beyond F and G. Co-existance of F and/or G along with linux partitions.
2. Fix the known problems.

My files can be found here. I will also update the kernel.config used to the same place.


#2 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 17 May 2010 - 02:42 PM

QUOTE(ldotsfan @ May 17 2010, 09:24 AM) View Post

Problems:
1. Sound is not working.
2. lirc is not working.
3. Probably many other things.

TO-DO:
1. Modify X-dsl native install script to install to any of the non-standard partitions beyond F and G. Co-existance of F and/or G along with linux partitions.
2. Fix the known problems.

Sound worked until I installed ALSA. I was able to modify the native install to go to /dev/hda56 and swap to /dev/hda57. Verified with an manual mount the files are there. But cannot get xromwell to boot the native ext3 partition though dry.gif

#3 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 17 May 2010 - 03:30 PM

QUOTE(ldotsfan @ May 17 2010, 09:24 AM) View Post

2. I compiled against this here. I will also update the kernel.config used to the same place.

Missed one code change:

http://xbox-linux.cv...amp;view=markup

In fatx_parse_boot_block ( struct super_block *sb, struct buffer_head *bh )
CODE

sbi->cluster_size = CLUSTER_SIZE;
sbi->cluster_bits = 14;
sbi->data_start = sbi->dir_start + CLUSTER_SIZE;
PRINTK("FATX: root_dir_sectors:        %d\n",(int)CLUSTER_SIZE);


CLUSTER_SIZE replaced with b->cluster_size and cluster_bits value computed with an if/then/else: if 128 use 16 bits, else if 64 use 15 else use 14.

Edited by ldotsfan, 17 May 2010 - 03:31 PM.


#4 run088

run088

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,003 posts
  • Interests:rebuilding broken xboxes
  • Xbox Version:v1.0
  • 360 version:none

Posted 17 May 2010 - 09:36 PM

Your the man.

I just grabbed and got an initial test. I can confirm it reads 64k. This was just a frugal install on E to see if it would read an F formatted with 64k. It read its directories just fine.

Impressive

#5 run088

run088

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,003 posts
  • Interests:rebuilding broken xboxes
  • Xbox Version:v1.0
  • 360 version:none

Posted 18 May 2010 - 05:24 AM

Further testing showed partitions of both 32k and 64k are functional. However something is messed up about the F drive code. G drive always reads ok but F drive is just lines. I have tested with 3 hdds. 1 2tb and 2 1.5tb's. Results were the same across the boards. The 2 1.5tb's have 32k on G drive and both work. The 2tb has 2 partitions with 64k and its g drive works.

Results are the same for frugal or loopback install.

I can run any configurations you want just let me know.

#6 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 18 May 2010 - 01:22 PM

QUOTE(run088 @ May 18 2010, 12:24 PM) View Post

Further testing showed partitions of both 32k and 64k are functional. However something is messed up about the F drive code. G drive always reads ok but F drive is just lines. I have tested with 3 hdds. 1 2tb and 2 1.5tb's. Results were the same across the boards. The 2 1.5tb's have 32k on G drive and both work. The 2tb has 2 partitions with 64k and its g drive works.

Results are the same for frugal or loopback install.

I can run any configurations you want just let me know.

I found Torne's diff patch for the partitioning from sourceforge archive of xbox linux mailing list and applied that to the kernel instead of my original hand patched version. Recompiled kernel has been uploaded to sourceforge.

Please report back as I'm not certain now if the issue is with Torne's partition code or my FATX changes. You can execute
CODE

cat /proc/partitions > part.txt

at the root console. This displays what the kernel has identified as partitions and their sizes.
CODE

dd if=/dev/hda of=pt bs=512 count=1
hexdump -C pt > pt.txt

This will create a textual representation of the partition table in the .txt files from sector 1 of the hdd. Be careful with the dd syntax though as a typo wil be costly. Please reproduce the contents of the txt files here.

Just to clarify, when you mentioned "F drive is just lines", what did that mean? In the file manager or something else? How did you mount the drives?

My own tests were with F,G,H and I partitions. /dev/hda55 to /dev/hda58. Though not with 32k/64k cluster sizes as the hdd was of smaller size. I'm trying to isolate where the problem lies.

Thanks for your interest and patience.

PS: Also compiled ALSA kernel drivers and uploaded to the same folder in sourceforge.

Edited by ldotsfan, 18 May 2010 - 01:49 PM.


#7 run088

run088

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,003 posts
  • Interests:rebuilding broken xboxes
  • Xbox Version:v1.0
  • 360 version:none

Posted 18 May 2010 - 08:06 PM

In dsl's file manager once the partition has been mounted when you enter the partition there is dotted lines where the files or folders names should be. Before your work on these patches the results were similar on the big partitions but it had garbled symbols instead of lines.

By the way some audio works I didn't mess with it much but I did install konqueror from the sarge repos and could hear the file managers noises when using it. However I tried playing a movie and there was no audio. I didn't really search for a solution but thought I would mention it anyway.

Are you wanting me to run those test on the build I have now or the one you just uploaded? I will assume both unless I hear from you 1st. I got a couple things to do today but should be able to mess with it a little later.

#8 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 19 May 2010 - 01:33 PM

QUOTE(run088 @ May 19 2010, 03:06 AM) View Post

Are you wanting me to run those test on the build I have now or the one you just uploaded? I will assume both unless I hear from you 1st. I got a couple things to do today but should be able to mess with it a little later.

Yes, will be great if you could test both versions. Thanks.

#9 run088

run088

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,003 posts
  • Interests:rebuilding broken xboxes
  • Xbox Version:v1.0
  • 360 version:none

Posted 20 May 2010 - 12:10 AM

Here is what showed up on the part.txt it made a pt.txt but it was blank. This is from a frugal install on the older build


major minor #blocks name

3 0 1465138584 hda
3 50 5000024 hda50
3 51 512000 hda51
3 52 768000 hda52
3 53 768000 hda53
3 54 768000 hda54
3 55 934069424 hda55
3 56 523252624 hda56


This is from a 1.5tb with g just under the 512g 32k barrier and the remainder on f which from memory is around 930g or so. The cluster sizes are not the problem as the problem is there on the 2tb 64k it reads its g as well just not its f even though the drive is split in half and each side is equal.

It is working. The lines are still there but once I scrolled to the bottom the 2 folders in that drives root directory were there. And in those two folders all files seemed to be there. I am going to run the two commands for the txt. This is the same on both builds


major minor #blocks name

3 0 1465138584 hda
3 50 5000024 hda50
3 51 512000 hda51
3 52 768000 hda52
3 53 768000 hda53
3 54 768000 hda54
3 55 934069424 hda55
3 56 523252624 hda56

Edited by run088, 20 May 2010 - 01:06 AM.


#10 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 20 May 2010 - 03:51 AM

To clarify:
1. Is the output from build 1 or 2?
2. The partition sizes look alright and match what you described. But I am still a little concerned over the 'lines'.
3. Can you do a ls -R /mnt/hda55 from the console assuming F is mounted there? Do the lines appear?




#11 run088

run088

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,003 posts
  • Interests:rebuilding broken xboxes
  • Xbox Version:v1.0
  • 360 version:none

Posted 20 May 2010 - 04:05 AM

QUOTE(ldotsfan @ May 19 2010, 08:51 PM) View Post

To clarify:
1. Is the output from build 1 or 2?
2. The partition sizes look alright and match what you described. But I am still a little concerned over the 'lines'.
3. Can you do a ls -R /mnt/hda55 from the console assuming F is mounted there? Do the lines appear?

I found out both builds work however the lines are still there. There are alot of them but if you scroll to the bottom of the directory the files and folders are there. So it is working. I just dont know why all the blank entries in the file manager "the lines where folder or file names should be when viewing f drive "hda55" "

Your code crashed a 128mg xbox twice. It flipped out flashing a few things on the screen then locked the system up requiring a reboot. I tried the same code on hda56 and it reacted as it should scrolling threw its list of files.

Edited by run088, 20 May 2010 - 04:28 AM.


#12 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 20 May 2010 - 10:20 AM

QUOTE(run088 @ May 20 2010, 11:05 AM) View Post

I found out both builds work however the lines are still there. There are alot of them but if you scroll to the bottom of the directory the files and folders are there. So it is working. I just dont know why all the blank entries in the file manager "the lines where folder or file names should be when viewing f drive "hda55" "

Your code crashed a 128mg xbox twice. It flipped out flashing a few things on the screen then locked the system up requiring a reboot. I tried the same code on hda56 and it reacted as it should scrolling threw its list of files.

1. Are you saying X-dsl worked with 128Mb before my changes? I only found this post which had issues but no final solution.
2. Call me paranoid but I'm still worried about the lines. Best to mount the partition as readonly and to read and not write to the partition from Linux.
3. I guess we have to wait for reports from other users to see if they have similar issues with this.
4. Did you run the dd command as root? Strange to get an empty file.

#13 run088

run088

    X-S Freak

  • Members
  • PipPipPipPipPip
  • 1,003 posts
  • Interests:rebuilding broken xboxes
  • Xbox Version:v1.0
  • 360 version:none

Posted 20 May 2010 - 07:10 PM

128mg always has worked for me on all distros. I read that thread and by the sounds of it they were having a problem with xbeboot not xromwell. It looks like there issue is either tied to that xbe or xmugen itself. But I am thinking I have ran xmugen before on a 128mg xbox but I could be wrong. I will try to boot it up later on a 128mg and see if it has issues. But I have never had an issue with the 128mg xbox on linux from memory.


I did read into something in that post that got me thinking. They were talking about running different distros inside one xbox. They were talking about this when they were talking about xbeboot. They were talking about the differences in the way it loads compared to xromwell. At one point they even said the linuxboot.cfg was not needed.

This was new to me and made me realize going the other route might be more flexible. For instance I can only run one distro an xbox even if I run 2 hdds. I can run different builds of the distro but only 1 type. Meaning if the xbox runs xebian then all builds have to be xebian or if it runs xdsl then all builds have to be xdsl. I can not get two different layouts to be on the linuxboot.cfg it always crashes the kernel.

If I am reading into the thread correctly if I use xbeboot instead I would lose 128mg support but gain the ability to launch different distros bypassing the linuxboot.cfg entirely.

Or I may be off the mark entirely. That is just how it reads to me.

I copied that dd command exactly how it was printed on both builds it just came up empty.

The lines issue is workable but you are right to be concerned. I just hit the name tag when I enter that directory so the lines show up under the folders there.

It is weird to me because it is isolated to hda55. What is different between the code for hda55 and hda56?

#14 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 21 May 2010 - 11:51 AM

I've a new kernel ready for testing, please see if it helps for the 128Mb problem. You mentioned it was previously good for all distros so I grabbed Gentoox's kernel patch (courtesy of Thomas Pedley who created/maintained Gentoox) for 2.4.37 from Gentoox repository and applied that to a vanilla 2.4.37 kernel tree, added in the squashfs2.2 patch, 32-64k fatx patch and Torne's partitioning patches and remastered KNOPPIX. Please grab it from here.

It shouldn't affect the FATX 'line' results though. Can you try this instead?
CODE

sudo su
dd if=/dev/hda of=pt bs=512 count=1
hexdump -C pt


#15 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 22 May 2010 - 04:28 PM

Gentoo patch is good for 2.4.37.9 as well, which is the current stable version for 2.4 as stated as kernel.org. Files are available at sourceforge and includes the partitioning and FATX patches.

Edited by ldotsfan, 22 May 2010 - 04:28 PM.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users