linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Frank Rowand <frank_rowand@mvista.com>
To: Meena Ramamoorthi <meena@stargateip.com>
Cc: linuxppc-embedded@lists.linuxppc.org, frowand@mvista.com
Subject: Re: kernel thread
Date: Wed, 24 Jan 2001 13:59:53 -0800	[thread overview]
Message-ID: <3A6F5059.B2CFE85D@mvista.com> (raw)
In-Reply-To: NEBBJELJBMCNBHIPPOHFGEPOCAAA.meena@stargateip.com

[-- Attachment #1: Type: text/plain, Size: 488 bytes --]

Meena Ramamoorthi wrote:
>
>   Hi all,
>
>  Has anybody tried using kernel_thread under montavista - IBM 405GP PPC
> hardhat LINUX kernel. ( 2.4 )  If so could you please reply to this. We have
> problem in exporting this. kernel_thread unresolved.
>
>   Early answer appreciated
>
>  Thanks and best regards,
>  Meenakshi

The symbol is there.  I'll attach a trivial module that accesses the symbol
successfully.

-Frank
--
Frank Rowand <frank_rowand@mvista.com>
MontaVista Software, Inc

[-- Attachment #2: hello.c --]
[-- Type: text/plain, Size: 709 bytes --]

#include <linux/module.h>
#include <linux/version.h>
#include <asm/processor.h>

#define VUFX "00.12.12.b"

#ifdef MODULE
static int demo;
MODULE_PARM(demo, "i");
MODULE_PARM_DESC(demo ,"Demo of messages");
MODULE_DESCRIPTION("Demo driver");
MODULE_AUTHOR("Frank Rowand");
#endif

static int other_data;

void cleanup_module(void)
{
	printk("<1>\nGoodbye cruel world\n\n");
	other_data = 666;
}

int init_module(void)
{
	other_data = 333;
	printk("<1>\nHello World  " VUFX "\n");
	if (demo == 0) {
	    printk("<1>setting demo to default value\n");
	    demo = 42;
	}
	printk("<1>the demo var = %d\n",demo);
	printk("<1>\n");
	printk("kernel_thread() = 0x%p\n", kernel_thread);
	printk("<1>\n");
	return 0;
}

[-- Attachment #3: Makefile --]
[-- Type: text/plain, Size: 1023 bytes --]

CC=/opt/hardhat/devkit/ppc/4xx/bin/ppc_4xx-gcc
LD=/opt/hardhat/devkit/ppc/4xx/bin/ppc_4xx-ld

INCLUDEDIR=/opt/hardhat/devkit/ppc/4xx/powerpc-hardhat-linux/include

CFLAGS = -g -D__KERNEL__ -DMODULE  -o  -Wall  -I$(INCLUDEDIR)

INSTALL_ROOT=/opt/hardhat/devkit/ppc/4xx/target
INSTALL_USER_ROOT=$(INSTALL_ROOT)/home/$(USER)


# Extract version number from headers

VER = $(shell awk  -F\" '/REL/  {print $$2}' $(INCLUDEDIR)/linux/version.h)

OBJS = hello.o

all: hello_module.o

hello_module.o: $(OBJS)
	$(LD) -r  $^ -o $@

install:
	install -c hello_module.o $(INSTALL_USER_ROOT)
#	install -d $(INSTALL_ROOT)/lib/modules/misc
#	install -d $(INSTALL_ROOT)/lib/modules/$(VER)/misc
#	install -c hello_module.o $(INSTALL_ROOT)/lib/modules/$(VER)/misc
#	install -c hello_module.o $(INSTALL_ROOT)/lib/modules/misc

clean_target:
	rm $(INSTALL_USER_ROOT)/hello_module.o
#	rm $(INSTALL_ROOT)/lib/modules/$(VER)/misc/hello_module.o
#	rm $(INSTALL_ROOT)/lib/modules/misc/hello_module.o

clean: clean_target
	rm $(OBJS) hello_module.o

  reply	other threads:[~2001-01-24 21:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-24 20:19 kernel thread Meena Ramamoorthi
2001-01-24 21:59 ` Frank Rowand [this message]
2001-01-25  0:53   ` Meena Ramamoorthi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A6F5059.B2CFE85D@mvista.com \
    --to=frank_rowand@mvista.com \
    --cc=frowand@mvista.com \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    --cc=meena@stargateip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).