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

0 Members and 3 Guests are viewing this topic.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Calling all Linux Kernel developers!
« Reply #345 on: November 23, 2012, 11:07:21 am »
I know who is doing all the upvotes and I'll deal with it.
« Last Edit: November 23, 2012, 11:10:14 am by Eeems »
/e

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #346 on: November 23, 2012, 01:35:55 pm »
How to compile your kernel (not using buildroot):
1. Build yourself a cross compiler for arm (little endian), you can use buildroot and the nspire-scripts.
Than add the binarys to your PATH (if they dont have a prefix like "arm-gcc", add one)
2. Create a new folder for your build
3. clone tangrs git tree with "git clone git://github.com/tangrs/linux" and "cd linux"
4. Download my patch (for X, directfb...) "wget http://dl.dropbox.com/u/105478372/fbdev.patch" and apply it "git apply fbdev.patch"
5. Edit "Makefile" and search for "ARCH ?= $(SUBARCH)" and change it to "ARCH := arm".
    Do the same for "CROSS_COMPILE ?= <something>" and change it to "CROSS_COMPILE := <your arm-gcc-prefix e.g. 'arm-elf-'>"
6. "make nspire_defconfig"
7. "make menuconfig", "make xconfig" or "make gconfig"
Configure it suitable for your needs, but enable (Search using "/"):
CONFIG_EXT4_FS
EXT4_USE_FOR_EXT23
CONFIG_SCSI
CONFIG_BLK_DEV_SD
CONFIG_USB_STORAGE
CONFIG_SWAP if you want to use swap
CONFIG_STRIP_ASM_SYMS if you dont want to debug the kernel
disable CONFIG_LOGO if you want to see longer errors on your screen without scrolling ;D

For internet you will need:
CONFIG_INET
CONFIG_NETDEVICES
For WLAN:
CONFIG_CFG80211
CONFIG_MAC80211
and the driver for your WLAN-dongle, you can get the name with "lsusb -v".

If something doesn't work, there are many tutorials on configuring your kernel.
8. Compile: "make zImage -j"
9. Make cup of coffee
10. Drink it, but be careful, it may be hot
11. "mv arch/arm/boot/zImage zImage.tns"
12. Copy it onto your calculator
13. Boot
« Last Edit: November 23, 2012, 01:38:56 pm by Vogtinator »

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: Calling all Linux Kernel developers!
« Reply #347 on: November 23, 2012, 04:17:26 pm »
Thank you for your patience and effort. It is much appreciated.

Sadly I do not have the time for the moment (it may be so until holidays, with luck) to apply your tutorial.
I can see how things are going just by reading the steps, but some points look shadowed to me :
How to compile your kernel (not using buildroot):
1. Build yourself a cross compiler for arm (little endian), you can use buildroot and the nspire-scripts.

Here, the "build yourself" means for me to open emacs, and start coding. Is that what you wanted to say ?
I've never built any sort of kernel in the past, nor used cross compilers and have no idea of the way to go.
If you think the answer is easy to find on Google, don't waste your time to answer that point =)

Quote
9. Make cup of coffee
I cannot see the rule "cup", nor "of", nor "coffee" in the Makefile. Were you talking about the rule "some" and "tea" ?
« Last Edit: November 24, 2012, 03:08:39 am by Levak »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #348 on: November 23, 2012, 04:30:52 pm »
Quote
Here, the "build yourself" means for me to open emacs, and start coding. Is that what you wanted to say?
You could do that if you have the patience and time, but http://hackspire.unsads.com/wiki/index.php/C_and_assembly_development_introduction_on_Linux should be faster if you're not trying to compile it on a 4004 ;D
Your prefix will be arm-none-eabi-, you just have to copy the binarys created into /usr/bin, /opt/cross or whatever directory is in your $PATH.

Quote
Where you talking about the rule "some" and "tea"?
That'd be possible to, but the configuration is much more complicated..


Offline floris497

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 210
  • Rating: +8/-0
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #349 on: November 23, 2012, 04:37:04 pm »
can someone tell me where to find linuxloader2.tns? is there a place where i can find all the files i need?(already compiled)

Offline noobnonin

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 151
  • Rating: +3/-38
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #350 on: November 23, 2012, 07:56:07 pm »
floris, attached is the bootscript, remember that to run it you have to add the command to the ndless.cfg

hey vogtinator, theres something i dont understand, once i have everything you have and i want just to add a wifidongle driver, do i have to follow all the steps u posted?

one more thing, does that driver has to be in the rootfs or can i put it in the zimage.tns??


Regards...
« Last Edit: November 23, 2012, 08:11:41 pm by noobnonin »

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #351 on: November 23, 2012, 08:02:51 pm »
he wanted linuxloader and, did you download that file or make it? It is illegal to put other's programs up for download without their permission
This used to contain a signature.

Offline noobnonin

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 151
  • Rating: +3/-38
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #352 on: November 23, 2012, 08:07:35 pm »
nonono, i made that bootscipt, its like the bootscript of tangrs but tangrs doesnt have the initrd just the zimage
« Last Edit: November 23, 2012, 08:09:18 pm by noobnonin »

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #353 on: November 23, 2012, 08:08:45 pm »
Ok, nvm I wasn't sure.
This used to contain a signature.

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: Calling all Linux Kernel developers!
« Reply #354 on: November 24, 2012, 03:15:49 am »
Quote
Here, the "build yourself" means for me to open emacs, and start coding. Is that what you wanted to say?
You could do that if you have the patience and time, but http://hackspire.unsads.com/wiki/index.php/C_and_assembly_development_introduction_on_Linux should be faster if you're not trying to compile it on a 4004 ;D
Your prefix will be arm-none-eabi-, you just have to copy the binarys created into /usr/bin, /opt/cross or whatever directory is in your $PATH.
Ah ! For sure I already have that.
But now imagine I have succesfuly compiled the kernel, how to compile stuff that is not included in that kernel ? (for example, how to you manage to add the extra-programs that are available by default when you run your kernel ?).
Maybe I've missed one post, but I cannot figure out how you're dealing with the *double* cross compiler (linux <> arm nspire <> arm linux).
« Last Edit: November 24, 2012, 03:18:18 am by Levak »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline InspiredByCas

  • LV3 Member (Next: 100)
  • ***
  • Posts: 44
  • Rating: +4/-1
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #355 on: November 24, 2012, 03:47:10 am »
Quote
Here, the "build yourself" means for me to open emacs, and start coding. Is that what you wanted to say?
You could do that if you have the patience and time, but http://hackspire.unsads.com/wiki/index.php/C_and_assembly_development_introduction_on_Linux should be faster if you're not trying to compile it on a 4004 ;D
Your prefix will be arm-none-eabi-, you just have to copy the binarys created into /usr/bin, /opt/cross or whatever directory is in your $PATH.
Ah ! For sure I already have that.
But now imagine I have succesfuly compiled the kernel, how to compile stuff that is not included in that kernel ? (for example, how to you manage to add the extra-programs that are available by default when you run your kernel ?).
Maybe I've missed one post, but I cannot figure out how you're dealing with the *double* cross compiler (linux <> arm nspire <> arm linux).

Other stuff which is not a driver, is in the initial ramdisk (initrd) which contains the root filesystem, or, since we have USB support, this root filesystem can be copied to a USB stick and it is mounted at boot time like a real hard disk in a real desktop PC running linux.
So once all drivers and stuff which should be in the kernel, is there, boot it and start install apps on the nspire. For that, a USB stick is needed, because it can be mounted writeable.

So I understand this so far, or am I wrong?


btw: how can I give +1 to a post?
« Last Edit: November 24, 2012, 03:48:04 am by InspiredByCas »

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 #356 on: November 24, 2012, 04:20:48 am »
Buildroot enables one to build and install a number of programs and libraries to a given location on the host disk, forming the target FS. The contents of that location are recursively compressed (for initrd), or can be recursively copied as is to external USB Mass Storage Device.
For other programs/libraries not directly provided by buildroot, just tell the build system of said programs/libraries that it should use an install prefix relative to the root of the target FS.

Provided the arm-none-eabi and arm-linux-gnueabi toolchains have different names, dealing with them requires nothing special.
« Last Edit: November 24, 2012, 04:23:07 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 DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Calling all Linux Kernel developers!
« Reply #357 on: November 24, 2012, 04:24:36 am »
Wow, I just checked the comments on my video, and I saw THAT:
http://www.youtube.com/watch?v=K8P7lxQ9bcw
Some a**hole motherf****r stole my video, I already reported it!

Yeah that happened with the nDoom vid I made >.<. Thankfully the other ones never got as many views as mine, though (most didn't even hit 100 views)

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #358 on: November 24, 2012, 08:23:45 am »
Quote
But now imagine I have succesfuly compiled the kernel, how to compile stuff that is not included in that kernel ? (for example, how to you manage to add the extra-programs that are available by default when you run your kernel ?).

Ok, guide for buildroot:
1. "git clone git://git.buildroot.org/buildroot" and "cd buildroot"
2. "make menuconfig"
3. Target Architecture -> ARM (little endian)
4. Target Architecture Variant -> arm926t
5. Enable BR2_CCACHE for faster recompilings
6. System Configuration -> Port to run a getty (login prompt) on -> tty0
7. Configure what you want, but use GCC 4.6.x as 4.7 introduces some preprocessor bugs.
8. Edit system/skeleton/etc/passwd and change "root:x:0" to "root::0"
9. "make"
10. "tar -xvf output/images/rootfs.tar -C <usb-stick>"
11. boot
12. Play crysis if you chose to build it (may need some time)

Of course you can use whatever arm(v5) linux distro you like. But most of them are waaay to slow.
« Last Edit: November 24, 2012, 08:32:36 am by Vogtinator »

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 #359 on: November 24, 2012, 09:08:47 am »
And some .config files suitable for buildroot were posted somewhere in this topic or its siblings :)
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.