Modify

Opened 7 years ago

Closed 7 years ago

#8241 closed defect (fixed)

[patch] [orion] dt2 support does not compile with 2.6.37

Reported by: maddes Owned by: kaloz
Priority: low Milestone:
Component: kernel Version: Trunk
Keywords: kernel 2.6.37 orion dt2 Cc:

Description

Tried to build current release candidate of kernel 2.6.37 for Orion platform.
All trunk packages went well, but kernel build stopped on DT2 support.
Just reporting to let you know that this issue will come up soon.

  CC      arch/arm/mach-orion5x/dt2-setup.o
arch/arm/mach-orion5x/dt2-setup.c:440: error: unknown field 'phys_io' specified in initializer
arch/arm/mach-orion5x/dt2-setup.c:441: error: unknown field 'io_pg_offst' specified in initializer
make[6]: *** [arch/arm/mach-orion5x/dt2-setup.o] Error 1
make[5]: *** [arch/arm/mach-orion5x] Error 2
make[5]: Leaving directory `/home/maddes/openwrt/trunk/build_dir/linux-orion_generic/linux-2.6.37-rc1'

Attachments (1)

orion_dt2_2.6.37.2.patch (1.0 KB) - added by maddes 7 years ago.
-p0 patch for trunk. also applies to backfire.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 7 years ago by maddes

Trunk was r23990 and kernel was 2.6.37-rc1.

comment:2 Changed 7 years ago by florian

Just remove these two fields in the machine macro and there you go.

comment:3 Changed 7 years ago by maddes

It sounded too easy, so I had to review Florian's solution (I know he's a Linux expert, while I'm not).

The two fields have been really just erased from the "machine_desc" structure in "arch/arm/include/asm/mach/arch.h".
Searching for the typical values ORION5X_REGS_PHYS_BASE and ORION5X_REGS_VIRT_BASE revealed no new usage.

The best fix is to use a typical kernel #ifdef:

#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 36)

This should work as before with current trunk (2.6.36) plus Backfire kernel (2.6.32), but also with 2.6.37+.

Untested patch attached.

comment:4 Changed 7 years ago by maddes

In the kernel source it is either "less than" (<) or "greater/equal than" (>=). Corrected.

comment:5 Changed 7 years ago by maddes

Got some time to compile it. Of course I forgot the corresponding include.
Patch is updated.

Was able to compile a booting ramdisk build with 2.6.37-rc3. Tested on WRT350N v2.

Changed 7 years ago by maddes

-p0 patch for trunk. also applies to backfire.

comment:6 Changed 7 years ago by maddes

Also compiles fine with 2.6.36.1. I think patch is good to be committed.

comment:7 Changed 7 years ago by maddes

  • Status changed from new to assigned

comment:8 Changed 7 years ago by maddes

  • Summary changed from [orion] dt2 support does not compile with 2.6.37 to [patch] [orion] dt2 support does not compile with 2.6.37

Now also tested 2.6.32 and this compiles fine too.
The patch is good for trunk.

comment:9 Changed 7 years ago by kaloz

  • Resolution set to fixed
  • Status changed from assigned to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.