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

0 Members and 1 Guest are viewing this topic.

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Calling all Linux Kernel developers!
« Reply #30 on: October 04, 2012, 07:00:33 am »
Awesome work Tangrs !

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Calling all Linux Kernel developers!
« Reply #31 on: October 04, 2012, 07:23:12 am »
Yep, awesome :)
Pretty fast too to load so far !
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: Calling all Linux Kernel developers!
« Reply #32 on: October 04, 2012, 08:25:42 am »
Good news and bad news!

Good news is that I now have a working userspace and rebooting has been fixed as well. I also just finished writing a keypad driver but it weirdly freezes sometimes for no reason.

Bad news is that I just realised how crap my code is. I read up on kernel coding conventions and my copy-pasta code (yes, most of the porting was just copying and adapting existing code) breaks quite a lot of it XD

Oh well. My excuse is "I'll fix it up later" :P

Anyhow, enjoy the demonstration video:


Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #33 on: October 04, 2012, 09:33:32 am »
It boots up pretty fast. That's awesome. If it keeps going at this speed, the project will be done in no-time. Keep it up!
Any chance of a snapshot download or anything, to show to everyone I know :P

Some people need a high five in the face... with a chair.
~EC

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 #34 on: October 04, 2012, 09:40:53 am »
Excellent work, as usual ;)

Indeed, some documentation about the building process (even if just to redirect to appropriate online documentation) would be good.
Some IT pros know how to build native and cross-compiled buildroot and Linux kernel, but in our community, many users are not IT pros ;)

Fun idea: adding some file in /proc, or char device in /dev, that exposes the calculator's product ID to read() (mmap() access is not mandatory as a first step) :)
« Last Edit: October 04, 2012, 09:44:01 am by Lionel Debroux »
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Calling all Linux Kernel developers!
« Reply #35 on: October 04, 2012, 11:35:15 am »
how did you manage to boot this w/o RSA code?
Woah cool O.o
« Last Edit: October 04, 2012, 11:37:05 am by aeTIos »
I'm not a nerd but I pretend:

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Calling all Linux Kernel developers!
« Reply #36 on: October 04, 2012, 11:35:16 am »
how did you manage to boot this w/o RSA code?
I'm not a nerd but I pretend:

Offline alberthrocks

  • Moderator
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 876
  • Rating: +103/-10
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #37 on: October 04, 2012, 12:01:21 pm »
how did you manage to boot this w/o RSA code?
Also, the OS can be "hot-launched" - basically, it can replace the currently running Nspire OS. :)

(Basically, you can pretty much launch an OS on top of the currently running OS. A good example is Gujin or LinLD, or Loadlin.)

EDIT: I haven't seen the video (I'm at school) - if he is launching from the documents screen, then it's a "hot" launch. If it's booted from the booting sequence, then it's "cold". I'm currently describing a "hot" launch.
« Last Edit: October 04, 2012, 12:02:27 pm by alberthrocks »
Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/


Proud member of ClrHome!

Miss my old signature? Here it is!
Spoiler For Signature:
Alternate "New" IRC post notification bot (Newy) down? Go here to reset it! http://withg.org/albert/cpuhero/

Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/

Activity remains limited due to busyness from school et al. Sorry! :( Feel free to PM, email, or if you know me well enough, FB me if you have a question/concern. :)

Don't expect me to be online 24/7 until summer. Contact me via FB if you feel it's urgent.


Proud member of ClrHome!

Spoiler For "My Projects! :D":
Projects:

Computer/Web/IRC Projects:
C______c: 0% done (Doing planning and trying to not forget it :P)
A_____m: 40% done (Need to develop a sophisticated process queue, and a pretty web GUI)
AtomBot v3.0: 0% done (Planning stage, may do a litmus test of developer wants in the future)
IdeaFrenzy: 0% done (Planning and trying to not forget it :P)
wxWabbitemu: 40% done (NEED MOAR FEATURES :P)

Calculator Projects:
M__ C_____ (an A____ _____ clone): 0% done (Need to figure out physics and Axe)
C2I: 0% done (planning, checking the demand for it, and dreaming :P)

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 #38 on: October 04, 2012, 12:29:16 pm »
Yes, tangrs' work is based on a hot launcher, like RunOS and OSLauncher (but more evolved than those).

EDIT: BTW, tangrs, besides the documentation about the building process, in order to lower the barrier even further for users, you should also provide the config that you used for buildroot (or similar tools) ;)
Programmers who have already dabbled with Linux can recreate configs for buildroot / similar, but that would be work duplication, and therefore a waste of time :)
« Last Edit: October 04, 2012, 02:30:21 pm by Lionel Debroux »
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline TheNlightenedOne

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 427
  • Rating: +16/-1
    • View Profile
Re: Re: Calling all Linux Kernel developers!
« Reply #39 on: October 04, 2012, 03:20:31 pm »
This is awesome. Thank you, tangrs!
"Eris" (Ndless 3.1)
"Keto" (Ndless 3.1)
"Luna" (AMS 3.10, HW4)
"Aurora" (2.55MP)

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: Calling all Linux Kernel developers!
« Reply #40 on: October 05, 2012, 01:33:12 am »
I actually had a brief readme written up for someone who wanted to compile the kernel for himself. I'll post it here.

Code: [Select]
How to boot:

1. Make folder called 'linux' (no quotes).
2. Copy 'initrd.tns', 'zImage.tns' and 'linuxloader.tns' to folder.
3. Run 'linuxloader.tns'

How to build from scratch (if you love pain)

Userspace image
1. Download buildroot (http://buildroot.uclibc.org/)
2. make menuconfig
3. Target architecture is 'arm little endian'
4. Variant can be 'arm generic' or 'arm926t'
5. In target filesystems, select ext2 image
6. make
7. Get cup of coffee
8. Copy and rename output/images/rootfs.ext to initrd.tns

Kernel
1. Add toolchain bin to PATH: buildroot-dir/output/toolchain/usr/bin (or something like that)
2. make ARCH=arm nspire_defconfig
3a. make
or for moar speed:
3b. make -jn (Where n is number of CPU cores you have + 1)
4. Coffee
5. Copy and rename arch/arm/boot/zImage to zImage.tns

Bootloader
1. Get source from tangrs github
2. Get Ndless SDK
3. make

I'll include the latest snapshot as an attachment for those who dislike pain :P

Excellent work, as usual ;)

Indeed, some documentation about the building process (even if just to redirect to appropriate online documentation) would be good.
Some IT pros know how to build native and cross-compiled buildroot and Linux kernel, but in our community, many users are not IT pros ;)

Fun idea: adding some file in /proc, or char device in /dev, that exposes the calculator's product ID to read() (mmap() access is not mandatory as a first step) :)

That's actually the boot loader's job XD I'll implement it soon.

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Calling all Linux Kernel developers!
« Reply #41 on: October 05, 2012, 04:31:49 am »
I've just tested this on my CX CAS (didn't go the pain way), and it works great.
It's already very functional, and all the utilities I tried work fine (top, nano, mkdir, ls, dmesg, etc).

Very very good work !

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 #42 on: October 05, 2012, 04:32:09 am »
Attached is a .config for buildroot 2012.08, which yields bzip2'ed rootfs, binutils 2.22, GCC 4.7.1 with C++ support, and several extra goodies such as, but not limited to, lua / luac / luajit, less, nano for simple text edition, SDL (with framebuffer support, sdl_gfx, sdl_image with BMP, JPEG and PNG support), expat, libusb, minicom.

Needless to say, the size of the rootfs raised a bit, to 7.2 MB uncompressed and 2.6 MB bzip2'ed; it can be reduced to ~5 MB uncompressed by disabling several bits:
Code: [Select]
$ diff -ub .config .config.old
--- .config     2012-10-05 10:25:55.703430432 +0200
+++ .config.old 2012-10-05 09:49:53.599394584 +0200
@@ -483,7 +483,7 @@
 #
 # memtester requires a toolchain with LARGEFILE support
 #
-BR2_PACKAGE_MINICOM=y
+# BR2_PACKAGE_MINICOM is not set
 # BR2_PACKAGE_MTD is not set
 # BR2_PACKAGE_NANOCOM is not set
 
@@ -530,8 +530,7 @@
 # unionfs requires a toolchain with LARGEFILE support
 #
 # BR2_PACKAGE_USB_MODESWITCH is not set
-BR2_PACKAGE_USBUTILS=y
-# BR2_PACKAGE_USBUTILS_ZLIB is not set
+# BR2_PACKAGE_USBUTILS is not set
 # BR2_PACKAGE_WIPE is not set
 
 #
@@ -677,8 +676,7 @@
 # BR2_PACKAGE_LIBIQRF is not set
 # BR2_PACKAGE_LIBNFC is not set
 # BR2_PACKAGE_LIBNFC_LLCP is not set
-BR2_PACKAGE_LIBUSB=y
-# BR2_PACKAGE_LIBUSB_COMPAT is not set
+# BR2_PACKAGE_LIBUSB is not set
 
 #
 # libv4l requires a toolchain with LARGEFILE support
@@ -796,7 +794,7 @@
 #
 # BR2_PACKAGE_ENCHANT is not set
 # BR2_PACKAGE_ICU is not set
-BR2_PACKAGE_LIBICONV=y
+# BR2_PACKAGE_LIBICONV is not set
 BR2_PACKAGE_NCURSES=y
 # BR2_PACKAGE_NCURSES_TARGET_PANEL is not set
 # BR2_PACKAGE_NCURSES_TARGET_FORM is not set
@@ -810,8 +808,8 @@
 #
 # JSON/XML
 #
-BR2_PACKAGE_CJSON=y
-BR2_PACKAGE_EXPAT=y
+# BR2_PACKAGE_CJSON is not set
+# BR2_PACKAGE_EXPAT is not set
 # BR2_PACKAGE_EZXML is not set
 # BR2_PACKAGE_JSON_C is not set
 # BR2_PACKAGE_LIBROXML is not set
@@ -1037,7 +1035,7 @@
 # Text editors and viewers
 #
 # BR2_PACKAGE_ED is not set
-BR2_PACKAGE_LESS=y
+# BR2_PACKAGE_LESS is not set
 BR2_PACKAGE_NANO=y
 BR2_PACKAGE_NANO_TINY=y
 # BR2_PACKAGE_UEMACS is not set


I cannot test it on my CX because it needs to stick to OS 3.0.1...
tangrs, should one of us send you a Clickpad (prototype or production model) to speed up your process ?
« Last Edit: October 05, 2012, 04:34:46 am by Lionel Debroux »
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: Calling all Linux Kernel developers!
« Reply #43 on: October 05, 2012, 04:37:53 am »
Attached is a .config for buildroot 2012.08, which yields bzip2'ed rootfs, binutils 2.22, GCC 4.7.1 with C++ support, and several extra goodies such as, but not limited to, lua / luac / luajit, less, nano for simple text edition, SDL (with framebuffer support, sdl_gfx, sdl_image with BMP, JPEG and PNG support), expat, libusb, minicom.

Needless to say, the size of the rootfs raised a bit, to 7.2 MB uncompressed and 2.6 MB bzip2'ed; it can be reduced to ~5 MB uncompressed by disabling several bits:

Just a quick reminder that there's a 4MB soft limit for RAM disks. Make sure the final image is less than that until I rework the bootloader to lift it.

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 #44 on: October 05, 2012, 04:43:45 am »
Quote
Just a quick reminder that there's a 4MB soft limit for RAM disks. Make sure the final image is less than that until I rework the bootloader to lift it.
ACK :)
It's easy to reach 8 MB without even attempting to add an X server + its libraries.

EDIT1: Given that you wrote "until I rework the bootloader to lift it", I take it that raising the limit involves more than modifying MAX_RAMDISK_SIZE in main.c ?
EDIT2: you replied to me while I was editing :D
« Last Edit: October 05, 2012, 04:49:50 am by Lionel Debroux »
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.