Jump to content
OGXbox.com

Alpine Linux for ye old Xbox


dust08
 Share

Recommended Posts

Hey everyone! I managed to get Alpine Linux working on the xbox with a 5.15 kernel! It's command line only right now so no sound or desktop environment.

 

 

https://drive.google.com/file/d/1DVtaFB22BeUntv46iKk8FT0YSwMncD2a/view?usp=sharing

If anyone wants to try it. user=user password=xbox
be careful with the f_drive it's using the fatx fuse from https://github.com/mborgerson/fatx so f drive needs to be f takes all format.
You can edit /etc/local.d/xbox-bootup.start and set the manual offset and size if you have a different f drive set up.
there's a backup rootfs.tar.gz.backup that will get created incase something goes wrong that is rotated out from the last rootfs each shutdown/reboot if needed

If anyone wants you should actually be able to get a full desktop working. There's a guide here for wayland/weston: https://flighttestdude.wordpress.com/alpine-linux-stuff/ should work fine with the simpledrm driver I have set up. I'll probably try and set up something way lighter and experiment around with different desktops.

 

Edited by dust08
  • Like 6
Link to comment
Share on other sites

Oh ya for sure DSL is great! The issue is no modern software or support for new xbox drive formats. With this you can access the new Titan/Cerbios f takes all formatting and have access to any app you can get on alpine with the apk package manager.

Oh and if anyone can test this on a 64mb stock xbox please let me know how it goes with booting, I only have a 128mb one. If it won't boot on stock I may need to find a way to reduce the size of the initramfs even further.

Link to comment
Share on other sites

hmm so actually seems anything to do with f drive is broken so I take it back it's not better at reading drives than DSL for now lol

So fyi don't use f drive or it will break the partition. c and e work fine though tested filling and emptying the whole drives.

I'll try and figure out what's broken and fix it.

  • Like 2
Link to comment
Share on other sites

Alright new version uploaded with gui and web browsers. Dillo works well, would only recommend netsurf with 128mb of ram and it crashes a good bit as well as takes forever to launch but it supports modern web standards so leaving it out of the menu need to type netsurf throuth the terminal if you want to try it. Also disabled the f drive on this one. For a different wallpaper just save whatever background photo you want as wallpaper in the alpine folder on the e drive.

Forgot most people probably can't into file management on linux. So if you don't want to use the command line to manage files just go to the terminal, type apk search (filemanager or file managment whatever search term...) and pick one that sounds nice, you can type apk info (package name) for more info about it, then doas apk add (packagename) to install. After adding a package you can go to tools>regen menu and it should add it under file managers.

I'll remember to find a good file manager and add it next time.

Another useful linux tip is ctrl+alt+f keys 1-6 will open a new terminal window if you need one and ctrl+c will cancel any current running command.

 

link: https://drive.google.com/file/d/1eF8TviKszMMFTzRfCKXKTFEUF3RbAuZt/view?usp=share_link

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Tried on a 64mb

I'm going to give it a minute, but it looks like it may be stuck, there is one line below this, but I'm unable to read it.

/home/user/.cache/netsurf/dblk/A
tar: corrupted data
tar: short read
mount: mounting /sys /nrewroot/sys failed: No such file or directory

 

Edited by Natetronn
Link to comment
Share on other sites

Yep there's something wrong. That sounds like the initramfs is working fine but the archive on my google drive is corrupted/truncated or something. Although could be running out of ram decompressing it, if so I might have to change the init script in the initramfs to activate and use swap. I have a more up to date rootfs with some minor fixes/improvements I need to upload anyways so I'll change the init script and upload a new version when I get back from work.

Edited by dust08
Link to comment
Share on other sites

Once the rootfs decompresses and it switches to it I have it make a swap currently but that's after the initramfs so going to change it to set up swap earlier in the process. Hopefully this won't significantly slow down the boot process.

Edited by dust08
Link to comment
Share on other sites

1 hour ago, dust08 said:

Once the rootfs decompresses and it switches to it I have it make a swap currently but that's after the initramfs so going to change it to set up swap earlier in the process. Hopefully this won't significantly slow down the boot process.

Gotcha. Happy to test that for you.

Link to comment
Share on other sites

I'm getting around it by using one of the 750mb cache drives to put the rootfs in instead of ram, using another cache drive as swap, and using zswap to compress pages in ram, also tweaked some sysctl settings for low memory.  Going to upload a new version shortly it does take a while to boot and shutdown as it's grown pretty large now with all the gui apps I've included.

Link to comment
Share on other sites

Alright here is the new version if you could test on your 64mb xbox @Natetronn . This version has a file manager, image viewer, text editor, and working netsurf added. Netsurf is running through sdl without gtk in it's framebuffer mode so window sizes are fixed and can't be resized, I added a 480p and 720p window size for it to the menu in fluxbox. 

 

https://drive.google.com/drive/folders/19dCXbFyQf264aQhdJacTHJXgqQH-Fc2N?usp=sharing

Edited by dust08
Link to comment
Share on other sites

hmmm well made it further that time it looks like. How strange, invalid tar magic usually means that the archive is corrupted, probably not anything memory related now. What size is the rootfs.tar.gz showing as in the alpine folder on your e drive? Is there any way it could be getting corrupted when transferring to your xbox? Or I wonder if somehow it's getting corrupted uploading to google drive...  

Link to comment
Share on other sites

Ok I just downloaded from my google drive and extracted and seems like something is wrong with the archive, unless the extraction tool I'm using on my windows laptop isn't opening it right. EDIT: nevermind seems like the archive is good on the google drive. Wish I had a 64mb console to test on, hopefully someone else can test just to confirm.

Edited by dust08
Link to comment
Share on other sites

30 minutes ago, dust08 said:

Ok I just downloaded from my google drive and extracted and seems like something is wrong with the archive, unless the extraction tool I'm using on my windows laptop isn't opening it right. EDIT: nevermind seems like the archive is good on the google drive. Wish I had a 64mb console to test on, hopefully someone else can test just to confirm.

Downloaded again and FTP once more. Same spot it failed as last time.

Link to comment
Share on other sites

4 minutes ago, dust08 said:

Sure I could, probably not today though. Wouldn't be able to tell me what to change would you? 

This is Cromwell but it should be the same file

https://github.com/XboxDev/cromwell/blob/master/drivers/pci/pci.c#L283

Of course the memory size detection routine is in the PCI driver... 😕

You can change line 319 to be

if (true) {

or you could change line 314 to be

xbox_ram = 64;
Link to comment
Share on other sites

1 hour ago, Prehistoricman said:

This is Cromwell but it should be the same file

https://github.com/XboxDev/cromwell/blob/master/drivers/pci/pci.c#L283

Of course the memory size detection routine is in the PCI driver... 😕

You can change line 319 to be

if (true) {

or you could change line 314 to be

xbox_ram = 64;

I'll compile it real quick and see what happens. Although, looking at it, does it not account for both 64 and 128 with the conditionals there?

Update: Okay, same issues for me after changing 314 to 64 and running make.

Edited by Natetronn
Link to comment
Share on other sites

1 hour ago, Prehistoricman said:

This is Cromwell but it should be the same file

https://github.com/XboxDev/cromwell/blob/master/drivers/pci/pci.c#L283

Of course the memory size detection routine is in the PCI driver... 😕

You can change line 319 to be

if (true) {

or you could change line 314 to be

xbox_ram = 64;

Technically, there's not much reason to just change either of those. If you're going to force 64MB anyway... Just clear the entire function and just have the line:

PciWriteDword(BUS_0, DEV_0, FUNC_0, 0x84, 0x3FFFFFF); // 64 MB

The whole function is just testing memory locations to see if there's more than 64mb to determine which hex value to write. No reason to waste the time letting it test it you're going to always write the same value.

Link to comment
Share on other sites

8 hours ago, Natetronn said:

Which boot loader and version should I use? Gentoox, Xromwell / Cromwell? Or is there a different way to launch alpine? I'd like to be using whatever you're using so we're on the same page here.

I'm using the newest version of xromwell, cromwell won't work on my openxenium, it shouldn't matter but good idea to eliminate any other variables. You reminded me I forgot to put the apps/linux folder in the place on e folder this time with xromwell.

Edited by dust08
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

Board Life Status


Board startup date: April 23, 2017 12:45:48
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.