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

0 Members and 1 Guest are viewing this topic.

Offline mdr1

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 303
  • Rating: +21/-2
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #450 on: December 02, 2012, 11:42:42 am »
Well, I added root.ext2 but renamed with a .tns at the end.
The command startx doesn't work.
root.ext2.tns doesn't seem to be mounted.



Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #451 on: December 02, 2012, 11:45:33 am »
You have to write it on a usb-stick using "dd if=rootfs.ext2 of=/dev/sdb".
Also, you are using the wrong image, the only images with X are my builds and I use only tar.bz2.

The ADC works perfectly with ndless, but not my linux kernel driver..
What am I doing wrong?
My changes in nspire_mmio.h:
Code: [Select]
#define NSPIRE_ADC_PHYS_BASE 0xC4000000
#define NSPIRE_ADC_SIZE 0x000001DF
#define NSPIRE_ADC_VIRT_BASE 0xfed7ee21 //0x1df before BOOT1

common.c:
Code: [Select]
struct map_desc nspire_io_regs[] __initdata = {
IOTABLE_ENTRY(ADC),
IOTABLE_ENTRY(APB),
IOTABLE_ENTRY(BOOT1),
IOTABLE_ENTRY(INTERRUPT),
};

Then im accessing it with:
Code: [Select]
adc[0] = readl(IOMEM(NSPIRE_ADC_VIRT_BASE + 0x110));What am I doing wrong?
« Last Edit: December 02, 2012, 11:57:29 am by Vogtinator »

Offline mdr1

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 303
  • Rating: +21/-2
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #452 on: December 02, 2012, 11:57:47 am »
Is it really needed to put it on a usb stick instead of putting it in the internal memory?
About the image, where can I find your builds ?



Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #453 on: December 02, 2012, 12:01:21 pm »
X is a bit too large to use as initrd.
http://dl.dropbox.com/u/105478372/zImage.tns
http://dl.dropbox.com/u/105478372/rootfs.tar.bz2
I posted these URLs somewhere in this thread, but I'm too lazy to search.


Edit: With ioremap it works.. IDK why, but I'll make a patch.
Edit2: I can't use floats inside the kernel: "Undefined reference to '__aeabi_f2d'" -> Wrong toolchain?
Edit3: Ok, moved calculation of voltages to the userspace :-/
« Last Edit: December 02, 2012, 01:45:46 pm by Vogtinator »

Offline InspiredByCas

  • LV3 Member (Next: 100)
  • ***
  • Posts: 44
  • Rating: +4/-1
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #454 on: December 02, 2012, 02:52:06 pm »
Quote
Or why can nClock run in background with linucx?
It cannot ;)
Like the rest, it is completely replaced by Linux and its userspace.
But how knows nClock the right time after any softreboot (linucx, chrash on calc etc.)?

Quote
Are there two different RAMs?
Yes, there are indeed two different RAMs, but the main parts of both TI's OS and Linux use the same RAM, in the same area.

And these parts which are not used by OS and linucx are these the areas where all these 'special commands' write their to?
And it this the area which is mapped to /dev/ram0 ?
And what is in the second RAM?

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #455 on: December 02, 2012, 02:54:53 pm »
Quote
And what is in the second RAM?
There's the SRAM (flip-flops, fast) and the SDRAM (slow, has to be refreshed dynamically)

Quote
But how knows nClock the right time after any softreboot (linucx, chrash on calc etc.)?
I think it CAN be that linucx doesn't override that value in RAM, but that's random.
The ram doesn't get cleared by linux.

BTW: We should choose a new name, linucx is outdated and wrong. Maybe linspire?
« Last Edit: December 02, 2012, 03:16:37 pm by Vogtinator »

Offline InspiredByCas

  • LV3 Member (Next: 100)
  • ***
  • Posts: 44
  • Rating: +4/-1
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #456 on: December 02, 2012, 03:36:47 pm »
Quote
And what is in the second RAM?
There's the SRAM (flip-flops, fast) and the SDRAM (slow, has to be refreshed dynamically)

I know that already, but what is the content of these RAMs? SRAM is the normal operating RAM like in a PC, I think, but what's in the other one?

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 #457 on: December 02, 2012, 03:45:14 pm »
Quote
BTW: We should choose a new name, linucx is outdated and wrong. Maybe linspire?
Nope, that's the name of a commercial Linux distro ;)

Quote
SRAM is the normal operating RAM like in a PC,
Basically all RAMs of "large" capacity (beyond several hundreds of KBs, several MBs) are SDRAMs, because they're denser (significantly fewer transistors per bit) :)

Quote
I think, but what's in the other one?
On the Clickpads and Touchpads, the screen buffer, for instance; but TI's OS stores some other stuff there, because the calculator usually flat out crashes, after exiting a Ndless program, if you draw past the end of the screen area.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #458 on: December 02, 2012, 03:54:52 pm »
Quote
Nope, that's the name of a commercial Linux distro ;-)
Didn't know that.. What's your suggestion?

Quote
because the calculator usually flat out crashes, after exiting a Ndless program, if you draw past the end of the screen area.
Yeah, I noticed it unintentionally..

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: Calling all Linux Kernel developers!
« Reply #459 on: December 03, 2012, 12:42:28 am »
You have to write it on a usb-stick using "dd if=rootfs.ext2 of=/dev/sdb".
Also, you are using the wrong image, the only images with X are my builds and I use only tar.bz2.

The ADC works perfectly with ndless, but not my linux kernel driver..
What am I doing wrong?
My changes in nspire_mmio.h:
Code: [Select]
#define NSPIRE_ADC_PHYS_BASE 0xC4000000
#define NSPIRE_ADC_SIZE 0x000001DF
#define NSPIRE_ADC_VIRT_BASE 0xfed7ee21 //0x1df before BOOT1

common.c:
Code: [Select]
struct map_desc nspire_io_regs[] __initdata = {
IOTABLE_ENTRY(ADC),
IOTABLE_ENTRY(APB),
IOTABLE_ENTRY(BOOT1),
IOTABLE_ENTRY(INTERRUPT),
};

Then im accessing it with:
Code: [Select]
adc[0] = readl(IOMEM(NSPIRE_ADC_VIRT_BASE + 0x110));What am I doing wrong?


Just make the size SZ_4K. You're also doing unaligned reads because addresses start at 0xfed7ee21 which isn't 4 byte aligned.

« Last Edit: December 03, 2012, 12:42:52 am by tangrs »

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #460 on: December 03, 2012, 01:21:37 am »
Is SZ_4K =1 because the size has to be in pages?
I'll change it, test it and send you a new patch.
Does X and directfb work on click and touchpads?
If not, you have to add cx_clcd_check to your classic clcd panel struct.

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: Calling all Linux Kernel developers!
« Reply #461 on: December 03, 2012, 01:23:16 am »
Is SZ_4K =1 because the size has to be in pages?
I'll change it, test it and send you a new patch.
Does X and directfb work on click and touchpads?
If not, you have to add cx_clcd_check to your classic clcd panel struct.

No, it means 4096 bytes. It's a lot easier than calculating everything exactly right.

Edit: X doesn't appear to work, I'll try including the clcd_check and try again
« Last Edit: December 03, 2012, 01:23:53 am by tangrs »

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: Calling all Linux Kernel developers!
« Reply #462 on: December 03, 2012, 01:28:25 am »
it didn't work because the MMU can only map whole pages, not bytes,
like it is on x86 with PAGing?

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: Calling all Linux Kernel developers!
« Reply #463 on: December 03, 2012, 01:29:35 am »
it didn't work because the MMU can only map whole pages, not bytes,
like it is on x86 with PAGing?

That's possible.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Calling all Linux Kernel developers!
« Reply #464 on: December 03, 2012, 01:38:24 am »
Pages have to be aligned to their size. What's with the random 0xfed7ee21 address?
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman