* compile error (undefined reference to jffs2_getlink) for kernel 2.4.26
@ 2005-03-03 4:52 Kevin Liao
2005-03-03 8:28 ` Thomas Gleixner
2005-03-03 11:36 ` compile error (undefined reference to jffs2_getlink) for kernel 2.4.26 Artem B. Bityuckiy
0 siblings, 2 replies; 9+ messages in thread
From: Kevin Liao @ 2005-03-03 4:52 UTC (permalink / raw)
To: MTD List
I use the snapshop 20050302 to patch kernel 2.4.26 for ARM. I get the
following
error messages when I try to "make zImage":
fs/fs.o(.text+0x37944): In function `jffs2_readlink':
: undefined reference to `jffs2_getlink'
fs/fs.o(.text+0x3799c): In function `jffs2_follow_link':
: undefined reference to `jffs2_getlink'
drivers/mtd/mtdlink.o(.text+0x5f28): In function
`cfi_intelext_partition_fixup':
: undefined reference to `__ffs'
I find this function "jffs2_getlink" should be in jffs2/read.c but it's does
not
exist. Should I wait for later snapshop or I can fix it manuly? Thank a lot!
Regards,
Kevin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: compile error (undefined reference to jffs2_getlink) for kernel 2.4.26
2005-03-03 4:52 compile error (undefined reference to jffs2_getlink) for kernel 2.4.26 Kevin Liao
@ 2005-03-03 8:28 ` Thomas Gleixner
2005-03-03 8:40 ` compile error (undefined reference to jffs2_getlink) forkernel 2.4.26 Kevin Liao
2005-03-03 11:36 ` compile error (undefined reference to jffs2_getlink) for kernel 2.4.26 Artem B. Bityuckiy
1 sibling, 1 reply; 9+ messages in thread
From: Thomas Gleixner @ 2005-03-03 8:28 UTC (permalink / raw)
To: Kevin Liao; +Cc: MTD List
On Thu, 2005-03-03 at 12:52 +0800, Kevin Liao wrote:
> I use the snapshop 20050302 to patch kernel 2.4.26 for ARM. I get the
> following
> error messages when I try to "make zImage":
>
> fs/fs.o(.text+0x37944): In function `jffs2_readlink':
> : undefined reference to `jffs2_getlink'
> fs/fs.o(.text+0x3799c): In function `jffs2_follow_link':
> : undefined reference to `jffs2_getlink'
> drivers/mtd/mtdlink.o(.text+0x5f28): In function
> `cfi_intelext_partition_fixup':
> : undefined reference to `__ffs'
>
> I find this function "jffs2_getlink" should be in jffs2/read.c but it's does
> not
> exist. Should I wait for later snapshop or I can fix it manuly? Thank a lot!
Read http://www.linux-mtd.infradead.org/#kernelversions
tglx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: compile error (undefined reference to jffs2_getlink) forkernel 2.4.26
2005-03-03 8:28 ` Thomas Gleixner
@ 2005-03-03 8:40 ` Kevin Liao
2005-03-03 9:01 ` Thomas Gleixner
0 siblings, 1 reply; 9+ messages in thread
From: Kevin Liao @ 2005-03-03 8:40 UTC (permalink / raw)
To: MTD List
On Thu, 2005-03-03 at 16:28+0800, Thomas Gleixner wrote:
> On Thu, 2005-03-03 at 12:52 +0800, Kevin Liao wrote:
>> I use the snapshop 20050302 to patch kernel 2.4.26 for ARM. I get the
>> following
>> error messages when I try to "make zImage":
>>
>> fs/fs.o(.text+0x37944): In function `jffs2_readlink':
>> : undefined reference to `jffs2_getlink'
>> fs/fs.o(.text+0x3799c): In function `jffs2_follow_link':
>> : undefined reference to `jffs2_getlink'
>> drivers/mtd/mtdlink.o(.text+0x5f28): In function
>> `cfi_intelext_partition_fixup':
>> : undefined reference to `__ffs'
>>
>> I find this function "jffs2_getlink" should be in jffs2/read.c but it's
>> does
>> not
>> exist. Should I wait for later snapshop or I can fix it manuly? Thank a
>> lot!
>
> Read http://www.linux-mtd.infradead.org/#kernelversions
>
> tglx
>
Thanks for the reply. Actully I had read it before I ask this question.
According to the webpage, the kernel version I used should be ok.
I think the root cause is not the kernel version. Because I serach
the whole directory extracted from snapshop 20050302 but found
no implementation for jffs2_getlink function. Maybe I search the
wrong place?
Regards,
Kevin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: compile error (undefined reference to jffs2_getlink) forkernel 2.4.26
2005-03-03 8:40 ` compile error (undefined reference to jffs2_getlink) forkernel 2.4.26 Kevin Liao
@ 2005-03-03 9:01 ` Thomas Gleixner
2005-03-03 15:36 ` Steve Wahl
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Gleixner @ 2005-03-03 9:01 UTC (permalink / raw)
To: Kevin Liao; +Cc: MTD List
On Thu, 2005-03-03 at 16:40 +0800, Kevin Liao wrote:
> Thanks for the reply. Actully I had read it before I ask this question.
> According to the webpage, the kernel version I used should be ok.
> I think the root cause is not the kernel version. Because I serach
> the whole directory extracted from snapshop 20050302 but found
> no implementation for jffs2_getlink function. Maybe I search the
> wrong place?
Yes, jffs2_getlink is removed. There was an update to jffs2 a couple of
days ago. It broke the 2.4 code.
Frankly spoken, I personally don't care.
2.4 is as is and we are not going to do anything about. Feel free to fix
it by porting the link changes back to super-v24.c or use an snapshot
before said changes.
tglx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: compile error (undefined reference to jffs2_getlink) for kernel 2.4.26
2005-03-03 4:52 compile error (undefined reference to jffs2_getlink) for kernel 2.4.26 Kevin Liao
2005-03-03 8:28 ` Thomas Gleixner
@ 2005-03-03 11:36 ` Artem B. Bityuckiy
2005-03-03 11:59 ` Kevin Liao
1 sibling, 1 reply; 9+ messages in thread
From: Artem B. Bityuckiy @ 2005-03-03 11:36 UTC (permalink / raw)
To: Kevin Liao; +Cc: MTD List
Kevin Liao wrote:
> I use the snapshop 20050302 to patch kernel 2.4.26 for ARM. I get the
> following
> error messages when I try to "make zImage":
>
Kevin,
I'm sorry, that was my patch which broke 2.4. I've completely forgotten
about 2.4-compatibility. I'll see what I might do to repair this.
Apologies.
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: compile error (undefined reference to jffs2_getlink) for kernel 2.4.26
2005-03-03 11:36 ` compile error (undefined reference to jffs2_getlink) for kernel 2.4.26 Artem B. Bityuckiy
@ 2005-03-03 11:59 ` Kevin Liao
2005-03-03 12:19 ` Artem B. Bityuckiy
0 siblings, 1 reply; 9+ messages in thread
From: Kevin Liao @ 2005-03-03 11:59 UTC (permalink / raw)
To: Artem B. Bityuckiy; +Cc: MTD List
> Kevin,
>
> I'm sorry, that was my patch which broke 2.4. I've completely forgotten
> about 2.4-compatibility. I'll see what I might do to repair this.
> Apologies.
>
> --
> Best Regards,
> Artem B. Bityuckiy,
> St.-Petersburg, Russia.
>
You do not need to be sorry at all. I really don't want you guys to
maintain the backward compatibility for 2.4.x. I just want to find
the reason why this snapshop breaks 2.4.x and try to fix it by
myself. I need to say thank to tglx. Because his help, I now have
a working 2.4.x kernel with snapshop 20050228:) And I totally
agree his suggestion for removing the 2.4.x code from current CVS.
Regards,
Kevin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: compile error (undefined reference to jffs2_getlink) for kernel 2.4.26
2005-03-03 11:59 ` Kevin Liao
@ 2005-03-03 12:19 ` Artem B. Bityuckiy
0 siblings, 0 replies; 9+ messages in thread
From: Artem B. Bityuckiy @ 2005-03-03 12:19 UTC (permalink / raw)
To: Kevin Liao; +Cc: MTD List
[-- Attachment #1: Type: TEXT/PLAIN, Size: 394 bytes --]
Kevin Liao wrote:
> You do not need to be sorry at all.
Ok, but I should have been more accurate.
Here is the patch I propose. I didn't test it and didn't compile. Please
try it. The idea is simple: f->dents contains the target link and you only
need take it from there.
Please, report if the patch works and we might commit it.
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
[-- Attachment #2: Type: TEXT/PLAIN, Size: 1502 bytes --]
--- symlink-v24.c 2005-03-03 15:13:21.227821215 +0300
+++ symlink-v24_tweaked.c 2005-03-03 15:15:31.457291207 +0300
@@ -27,12 +27,34 @@
.setattr = jffs2_setattr
};
+static inline char * jffs2_provide_link(struct jffs2_sb_info *c, struct jffs2_inode_info *f)
+{
+ unsigned char *kbuf = kmalloc(f->metadata->size + 1, GFP_USER);
+
+ if (!kbuf) {
+ printk(KERN_ERR "jffs2_provide_link(): can't allocate memory for symlink target\n");
+ return ERR_PTR(-ENOMEM);
+ }
+
+ if (!f->dents) {
+ printk(KERN_ERR "jffs2_provide_link(): can't find symlink target\n");
+ return ERR_PTR(-EIO);
+ }
+
+ D1(printk(KERN_DEBUG "jffs2_provide_link(): target path is '%s'\n", (char *) f->dents));
+
+ memcpy(kbuf, (char *) f->dents, f->metadata->size + 1);
+ buf[f->metadata->size + 1] = '\0';
+
+ return buf;
+}
+
int jffs2_readlink(struct dentry *dentry, char *buffer, int buflen)
{
unsigned char *kbuf;
int ret;
- kbuf = jffs2_getlink(JFFS2_SB_INFO(dentry->d_inode->i_sb), JFFS2_INODE_INFO(dentry->d_inode));
+ kbuf = jffs2_provide_link(JFFS2_SB_INFO(dentry->d_inode->i_sb), JFFS2_INODE_INFO(dentry->d_inode));
if (IS_ERR(kbuf))
return PTR_ERR(kbuf);
@@ -46,7 +68,7 @@
unsigned char *buf;
int ret;
- buf = jffs2_getlink(JFFS2_SB_INFO(dentry->d_inode->i_sb), JFFS2_INODE_INFO(dentry->d_inode));
+ buf = jffs2_provide_link(JFFS2_SB_INFO(dentry->d_inode->i_sb), JFFS2_INODE_INFO(dentry->d_inode));
if (IS_ERR(buf))
return PTR_ERR(buf);
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: compile error (undefined reference to jffs2_getlink) forkernel 2.4.26
2005-03-03 9:01 ` Thomas Gleixner
@ 2005-03-03 15:36 ` Steve Wahl
2005-03-03 17:06 ` Thomas Gleixner
0 siblings, 1 reply; 9+ messages in thread
From: Steve Wahl @ 2005-03-03 15:36 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: MTD List
On Thu, Mar 03, 2005 at 10:01:27AM +0100, Thomas Gleixner wrote:
> On Thu, 2005-03-03 at 16:40 +0800, Kevin Liao wrote:
> > Thanks for the reply. Actully I had read it before I ask this question.
> > According to the webpage, the kernel version I used should be ok.
> > I think the root cause is not the kernel version. Because I serach
> > the whole directory extracted from snapshop 20050302 but found
> > no implementation for jffs2_getlink function. Maybe I search the
> > wrong place?
>
> Yes, jffs2_getlink is removed. There was an update to jffs2 a couple of
> days ago. It broke the 2.4 code.
>
> Frankly spoken, I personally don't care.
>
> 2.4 is as is and we are not going to do anything about. Feel free to fix
> it by porting the link changes back to super-v24.c or use an snapshot
> before said changes.
I'm a real outsider here, and don't care much about whether the code
works under 2.4 or not.
But at least one way of interpreting
http://www.linux-mtd.infradead.org/#kernelversions is:
Code in the 2.6 kernel tree gets updated. Code in the 2.4
tree doesn't, you'll have to fetch it from CVS yourself. You
need at least 2.4.26; anything lower than that is ancient and
we're not interested in supporting it.
In other words, the whole text about "ancient kernels" can easily be
interpreted to mean anything *before 2.4.26*, and that 2.4.26 and on
is still fair game to ask the mailing list at the moment.
It also says that in the *future*, 2.4 will be completely put into
maintenance mode. If that future is now, IMHO somebody should update
that web page to say so.
With the way that page currently reads, I don't think being curt with
someone who asks about 2.4.26 and pointing them at the web page is
really fair.
[Personally, I don't think you should move to that future just yet;
2-6 more months would be where I would do it. Where I work, there was
some resistance to moving to 2.6 because it isn't yet "mature" in the
embedded space, as in the major embedded suppliers like MontaVista
aren't really shipping 2.6 yet. That was a couple of months ago, and
I haven't been paying attentiion; they might be there now. At any
rate, I recognize my opinion doesn't really matter because I'm not an
active developer; I'm only suggesting what I think is a way to create
less friction in this community.]
Thanks for listening; If I cause more heat than light with this, I
appologize profusely.
--> Steve Wahl
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: compile error (undefined reference to jffs2_getlink) forkernel 2.4.26
2005-03-03 15:36 ` Steve Wahl
@ 2005-03-03 17:06 ` Thomas Gleixner
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Gleixner @ 2005-03-03 17:06 UTC (permalink / raw)
To: Steve Wahl; +Cc: MTD List
On Thu, 2005-03-03 at 09:36 -0600, Steve Wahl wrote:
> In other words, the whole text about "ancient kernels" can easily be
> interpreted to mean anything *before 2.4.26*, and that 2.4.26 and on
> is still fair game to ask the mailing list at the moment.
You're right.
> It also says that in the *future*, 2.4 will be completely put into
> maintenance mode. If that future is now, IMHO somebody should update
> that web page to say so.
Will happen.
> [Personally, I don't think you should move to that future just yet;
> 2-6 more months would be where I would do it. Where I work, there was
> some resistance to moving to 2.6 because it isn't yet "mature" in the
> embedded space, as in the major embedded suppliers like MontaVista
> aren't really shipping 2.6 yet.
In my opinion we should have removed it since long. It's lying around,
makes the tree ugly, breaks on a regular base and nobody cares to fix
it. The active MTD developers are doing 2.6 only and are blamed on a
regular base, why it does not work on 2.4.
If somebody stands up and takes the responsibility to keep the 2.4 stuff
alive, I could be convinced to keep it alive.
Anybody up to it?
tglx
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-03-03 17:06 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-03 4:52 compile error (undefined reference to jffs2_getlink) for kernel 2.4.26 Kevin Liao
2005-03-03 8:28 ` Thomas Gleixner
2005-03-03 8:40 ` compile error (undefined reference to jffs2_getlink) forkernel 2.4.26 Kevin Liao
2005-03-03 9:01 ` Thomas Gleixner
2005-03-03 15:36 ` Steve Wahl
2005-03-03 17:06 ` Thomas Gleixner
2005-03-03 11:36 ` compile error (undefined reference to jffs2_getlink) for kernel 2.4.26 Artem B. Bityuckiy
2005-03-03 11:59 ` Kevin Liao
2005-03-03 12:19 ` Artem B. Bityuckiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox