Author Topic: Calling all Linux Kernel developers!  (Read 350831 times)

0 Members and 1 Guest are viewing this topic.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #735 on: February 18, 2013, 07:27:58 pm »
Clang via llvm would be a good choice, but it's not exactly a ready-to-go solution.

Offline qubicprograms

  • LV3 Member (Next: 100)
  • ***
  • Posts: 61
  • Rating: +0/-0
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #736 on: February 18, 2013, 07:47:22 pm »
I assume you would have to compile it from source code to ARM?
Or is it just complicated to set up?
« Last Edit: February 18, 2013, 07:49:33 pm by qubicprograms »
I support this kind of hacking: making things do things that those things weren't originally meant to do.

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: Calling all Linux Kernel developers!
« Reply #737 on: February 18, 2013, 11:55:05 pm »
From what I've read, GCC is not a good compiler to use on the nspire.
What compiler would you use instead?

EDIT: Also, a couple other things:
        1. Is there a way to disable the USB debug messages
        2. Is there a way to change the welcome message right before the "linucx login:"
        3. Is there a way to make the X terminal not extend off the screen
        4. Are the X programs supposed to have windows borders (to move them around and close them)
        5. Is there a way to draw pixels in C or C++ code as of yet

1. Yes. Recompile the kernel with no USB debugging messages.
2. Yes. You should be able to just mount the rootfs on your virtual machine and modify the welcome message from there.
3. Not as far as I know. X was probably designed for larger screen sizes so the default window size is probably a reflection of that.
4. The borders and being able to drag stuff around is controlled by a window manager (which runs on X). twm is the one that looks most X-y but you can use others right up to Gnome/KDE (though, it'd probably be pretty slow).
5. I believe the directfb library will let you do that.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #738 on: February 19, 2013, 12:04:14 am »
One easy way to reduce the x terminal screen size is to reduce its font size. It sets its dimensions to whatever is 80x24.

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: Calling all Linux Kernel developers!
« Reply #739 on: February 19, 2013, 05:28:46 am »
Update

I've started working on nLaunch integration. Basically, I'm writing up some software that will package up the kernel into a format that boot2 likes and will be launchable with nLaunch directly.

Pretty much everything is done but unfortunately, boot2 doesn't like the file I built and won't boot just yet. Once I solve this, we'll be able to boot Linux directly from boot2 without the Nspire software even existing (i.e. a 'permanent' installation).

This can save some a lot of loading time since we don't have to wait for boot2 to load a ~9MB OS into memory then load the ~2MB kernel + initrd afterwards - we can simply have boot2 load our 2MB kernel directly! This will reduce the time from cold boot to a Linux shell down to about 12-15 seconds. For reference, it normally takes ~50 seconds to get to a Linux shell from a cold boot.

I hope that post made sense. The hours of coding has messed with my brain a little XD
« Last Edit: February 19, 2013, 05:31:04 am by tangrs »

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #740 on: February 19, 2013, 05:53:18 am »
That time comparison seems a little off, depending on where nLaunch's exploit is. (I haven't used it since I currently don't have an nspire)

If nlaunch starts loading before the RSA validation on the OS file would begin, then you should see a much faster boot time than the standard OS per MB.

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: Calling all Linux Kernel developers!
« Reply #741 on: February 19, 2013, 05:56:03 am »
That time comparison seems a little off, depending on where nLaunch's exploit is. (I haven't used it since I currently don't have an nspire)

If nlaunch starts loading before the RSA validation on the OS file would begin, then you should see a much faster boot time than the standard OS per MB.

I'm pretty sure nLaunch exploits a hole in boot2 before it starts loading the OS so it does it early enough to be useful.

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Calling all Linux Kernel developers!
« Reply #742 on: February 19, 2013, 07:11:28 am »
Indeed, nLaunch and DowngradeFix both exploit the same stack-based buffer overflow vulnerability in the OS validation & loading code through a specially crafted OS image.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline qubicprograms

  • LV3 Member (Next: 100)
  • ***
  • Posts: 61
  • Rating: +0/-0
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #743 on: February 19, 2013, 09:33:32 am »
1. Yes. Recompile the kernel with no USB debugging messages.
2. Yes. You should be able to just mount the rootfs on your virtual machine and modify the welcome message from there.
3. Not as far as I know. X was probably designed for larger screen sizes so the default window size is probably a reflection of that.
4. The borders and being able to drag stuff around is controlled by a window manager (which runs on X). twm is the one that looks most X-y but you can use others right up to Gnome/KDE (though, it'd probably be pretty slow).
5. I believe the directfb library will let you do that.

I guessed the welcome message was in a file (I think I found it once in the initrd) but I couldn't remember which one. Do you know which file it is stored in?

One easy way to reduce the x terminal screen size is to reduce its font size. It sets its dimensions to whatever is 80x24.

How would you do that? I tried running "xterm -fs 5 [or 3]" but nothing changed.

Update

I've started working on nLaunch integration. Basically, I'm writing up some software that will package up the kernel into a format that boot2 likes and will be launchable with nLaunch directly.

Pretty much everything is done but unfortunately, boot2 doesn't like the file I built and won't boot just yet. Once I solve this, we'll be able to boot Linux directly from boot2 without the Nspire software even existing (i.e. a 'permanent' installation).

This can save some a lot of loading time since we don't have to wait for boot2 to load a ~9MB OS into memory then load the ~2MB kernel + initrd afterwards - we can simply have boot2 load our 2MB kernel directly! This will reduce the time from cold boot to a Linux shell down to about 12-15 seconds. For reference, it normally takes ~50 seconds to get to a Linux shell from a cold boot.

I hope that post made sense. The hours of coding has messed with my brain a little XD

If you got this working would there be a way to get back to the normal OS?
I support this kind of hacking: making things do things that those things weren't originally meant to do.

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Calling all Linux Kernel developers!
« Reply #744 on: February 19, 2013, 09:56:40 am »
Quote
If you got this working would there be a way to get back to the normal OS?
Sure, by getting rid of nLaunch (as described in the README, by removing the OS through the maintenance menu) :)
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline qubicprograms

  • LV3 Member (Next: 100)
  • ***
  • Posts: 61
  • Rating: +0/-0
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #745 on: February 19, 2013, 10:17:40 am »
No, I mean could you switch back and forth between Linux and the TI OS
I support this kind of hacking: making things do things that those things weren't originally meant to do.

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Calling all Linux Kernel developers!
« Reply #746 on: February 19, 2013, 10:28:50 am »
Oh, then someone could make an interposed program for multi-boot, which either launches linuxloader2 or some official OS. That saves the time of booting TI's OS in order to use the Ndless version of linuxloader2 in order to get back to Linux.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #747 on: February 19, 2013, 06:17:19 pm »
Xterm's default font isn't freetype, so you'll have to load a different font if you want it to be resizeable.

Offline qubicprograms

  • LV3 Member (Next: 100)
  • ***
  • Posts: 61
  • Rating: +0/-0
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #748 on: February 19, 2013, 07:43:17 pm »
Where would you get those fonts?
Are they just normal ones from a computer?
« Last Edit: February 19, 2013, 07:43:38 pm by qubicprograms »
I support this kind of hacking: making things do things that those things weren't originally meant to do.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #749 on: February 19, 2013, 08:34:09 pm »
If you want a really small font, I'd recommend going for one of these I'm uploading. There's a 4x6 one, and a 6x13 one, but that one is probably the same size as what you're using.

This page goes over installing and using xterm bitmap fonts.

The 4x6 is ugly, but it's the smallest readable font you're going to find.


You can use truetype fonts if you want, but they're designed for much larger sizes than what you want.
« Last Edit: February 19, 2013, 08:35:07 pm by willrandship »