[kbuild-devel] PPC, take 1

2001-12-20 Thread Tom Rini

Okay.  With the various patches Keith has posted (and using kbuild-2.4
for vmlinux - zImage), I've gotten two different boards compiled and
booted.  These still have the various debugging statements in, but aside
from that does anyone see any problems/nits I should go and fix? (I also
left out the files I had to modify for relative includes for now).

-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/


--- /dev/null   Wed Dec 31 17:00:00 1969
+++ arch/ppc/8260_io/Makefile.inWed Dec 19 16:12:48 2001
@@ -0,0 +1,3 @@
+select(CONFIG_8260 commproc.o uart.o)
+select(CONFIG_8260 CONFIG_FEC_ENET fcc_enet.o)
+select(CONFIG_8260 CONFIG_SCC_ENET enet.o)
--- /dev/null   Wed Dec 31 17:00:00 1969
+++ arch/ppc/8xx_io/Makefile.in Wed Dec 19 16:13:03 2001
@@ -0,0 +1,4 @@
+select(CONFIG_8xx commproc.o uart.o)
+select(CONFIG_8xx CONFIG_FEC_ENET fec.o)
+select(CONFIG_8xx CONFIG_SCC_ENET enet.o)
+select(CONFIG_UCODE_PATCH micropatch.o)
--- /dev/null   Wed Dec 31 17:00:00 1969
+++ arch/ppc/amiga/Makefile.in  Mon Dec 17 15:14:19 2001
@@ -0,0 +1,5 @@
+expsyms(amiga_ksyms.o)
+
+select(CONFIG_APUS config.o amiints.o cia.o time.o bootinfo.o amisound.o \
+   chipram.o amiga_ksyms.o)
+select(CONFIG_AMIGA_PCMCIA pcmcia.o)
--- /dev/null   Wed Dec 31 17:00:00 1969
+++ arch/ppc/boot/config.install-2.5Wed Dec 19 16:10:16 2001
@@ -0,0 +1,34 @@
+mainmenu_name PPC Installation
+
+define_bool CONFIG_VMLINUX y
+
+bool 'Use a prefix on install paths' CONFIG_INSTALL_PREFIX
+if [ $CONFIG_INSTALL_PREFIX = y ]; then
+  string '  Prefix for install paths' CONFIG_INSTALL_PREFIX_NAME 
+fi
+string 'Where to install the kernel' CONFIG_INSTALL_KERNEL_NAME 
+/lib/modules/KERNELRELEASE/KERNELBASENAME
+bool 'Install System.map' CONFIG_INSTALL_SYSTEM_MAP
+if [ $CONFIG_INSTALL_SYSTEM_MAP = y ]; then
+  string '  Where to install System.map' CONFIG_INSTALL_SYSTEM_MAP_NAME 
+/lib/modules/KERNELRELEASE/System.map
+fi
+bool 'Install .config' CONFIG_INSTALL_CONFIG
+if [ $CONFIG_INSTALL_CONFIG = y ]; then
+  string '  Where to install .config' CONFIG_INSTALL_CONFIG_NAME 
+/lib/modules/KERNELRELEASE/.config
+fi
+if [ $CONFIG_VMLINUX != y ]; then
+  bool '  Install vmlinux for debugging' CONFIG_INSTALL_VMLINUX
+  if [ $CONFIG_INSTALL_VMLINUX = y ]; then
+string 'Where to install vmlinux' CONFIG_INSTALL_VMLINUX_NAME 
+/lib/modules/KERNELRELEASE/vmlinux
+  fi
+fi
+bool 'Run a post-install script or command' CONFIG_INSTALL_SCRIPT
+if [ $CONFIG_INSTALL_SCRIPT = y ]; then
+  string '  Post-install script or command name' CONFIG_INSTALL_SCRIPT_NAME 
+fi
+
+# FIXME: These critical config options should be in arch/$(ARCH)/config.in.  For
+# coexistence of kbuild 2.4 and 2.5 it is easier to put them here, move them
+# later.  KAO
+
+define_string CONFIG_KBUILD_CRITICAL_ARCH_PPC CONFIG_6xx CONFIG_8xx \
+   CONFIG_4xx CONFIG_ALTIVEC
--- /dev/null   Wed Dec 31 17:00:00 1969
+++ arch/ppc/kernel/Makefile.in Wed Dec 19 21:30:47 2001
@@ -0,0 +1,70 @@
+ifsel(CONFIG_PPC64BRIDGE)
+extra_aflags_all(-Wa-mppc64bridge)
+endif
+
+extra_cflags(pmac_setup.o $(src_includelist /drivers/scsi))
+extra_cflags(prep_setup.o $(src_includelist /drivers/sound))
+# Start off with 'head.o' change as needed.
+#HEAD-y= head.o
+#HEAD-$(CONFIG_4xx):= head_4xx.o
+#HEAD-$(CONFIG_8xx):= head_8xx.o
+
+#select($(HEAD-y))
+dummy := $(shell echo arch_head=$(arch_head) 2)
+dummy := $(shell echo notdir arch_head=$(notdir $(arch_head)) 2)
+select($(notdir $(arch_head)))
+
+expsyms(ppc_ksyms.o prep_setup.o time.o)
+select(entry.o traps.o irq.o idle.o time.o misc.o process.o signal.o ptrace.o align.o 
+semaphore.o syscalls.o setup.o cputable.o ppc_htab.o)
+
+select(CONFIG_6xx l2cr.o)
+select(CONFIG_MODULES ppc_ksyms.o)
+select(CONFIG_POWER4 xics.o)
+select(CONFIG_PCI pci.o pci-dma.o)
+select(CONFIG_KGDB ppc-stub.o)
+select(CONFIG_SMP smp.o)
+select(CONFIG_4xx ppc4xx_pic.o)
+select(CONFIG_OAK oak_setup.o)
+select(CONFIG_WALNUT walnut_setup.o)
+select(CONFIG_TAU temp.o)
+ifsel(CONFIG_WALNUT)
+select(CONFIG_PCI galaxy_pci.o)
+endif
+select(CONFIG_8xx m8xx_setup.o ppc8xx_pic.o)
+ifsel(CONFIG_8xx)
+select(CONFIG_PCI qspan_pci.o)
+ifnsel(CONFIG_MATH_EMULATION)
+select(softemu8xx.o)
+endif
+endif
+select(CONFIG_MBX i8259.o)
+select(CONFIG_APUS apus_setup.o)
+ifsel(CONFIG_APUS)
+select(CONFIG_PCI apus_pci.o)
+endif
+select(CONFIG_ALL_PPC pmac_pic.o pmac_setup.o pmac_time.o prom.o feature.o pmac_pci.o 
+chrp_setup.o chrp_time.o chrp_pci.o open_pic.o indirect_pci.o i8259.o prep_pci.o 
+prep_time.o prep_nvram.o prep_setup.o)
+select(CONFIG_NVRAM pmac_nvram.o)
+select(CONFIG_PMAC_BACKLIGHT pmac_backlight.o)
+select(CONFIG_PMAC_PBOOK sleep.o)
+select(CONFIG_PREP_RESIDUAL residual.o)
+select(CONFIG_PPC_RTAS error_log.o proc_rtas.o)
+select(CONFIG_GEMINI gemini_prom.o gemini_pci.o gemini_setup.o open_pic.o)
+select(CONFIG_8260 m8260_setup.o ppc8260_pic.o)
+select(CONFIG_BOOTX_TEXT btext.o)
+
+ifsel(CONFIG_SMP)
+select(CONFIG_ALL_PPC pmac_smp.o chrp_smp.o)
+endif
+

Re: [kbuild-devel] cml2-1.9.10 problems with kxref.py script

2001-12-20 Thread Steven Cole

On Wednesday 19 December 2001 09:47 pm, Eric S. Raymond wrote:
 Steven Cole [EMAIL PROTECTED]:
  I'm having problems getting the kxref.py script to run using recent
  versions of cml2.

 Hm.  Looks likew Python versions before 2.2b1 get a little confused about
 nested scopes.  I'll put out a 1.9.11 to address this.

Hmmm.  This is interesting.  I got cml2-1.9.11, made a clean 2.4.17-rc2 tree,
installed 1.9.11 and initially got the following errors.  So,  I grabbed
Python 2.2c1 and of course it works just fine.  Then, I re-ran kxref.py using
the older snake (2.1) and it did _not_ blow up as below.  I then deleted the
kxref.out file and Python 2.1 created the wreckage seen below.  I'll stick with 
Python 2.2c1 for now, so this is a non-issue for me, although it may be an issue 
for others who are relying on the RPMS which come with their distro of choice.
Athough getting the latest Python is trivially easy, making it play nicely
with the rest of the system can be more trouble.  If anyone has patches for
making the lpd-related scripts on RH 7.2 work with Python 2.[0,1,2], I'd
certainly appreciate getting them.

When CML2 goes into 2.5.x sometime soon, we probably need to specify the needed 
Python version in Documentation/Changes, along with the URLs of where to obtain it.

Thanks for looking into this,
Steven

Results of cml2-1.9.11 and Python 2.1 after kxref.out is deleted:
[root@spc linux-2.4.17-rc2-cml2]# scripts/kxref.py -e
scripts/kxref.py:145: SyntaxWarning: local name 'definere' in 'makexref' shadows use 
of 'definere' as global in nested scope 'xrefvisit'
  def makexref(tree):
Regenerating cross-reference database...Traceback (most recent call last):
  File scripts/kxref.py, line 540, in ?
load_context(sourcetree)
  File scripts/kxref.py, line 492, in load_context
(xrefs, cml1types) = makexref(tree)
  File scripts/kxref.py, line 221, in makexref
os.path.walk(., xrefvisit, xrefdict)
  File /usr/lib/python2.1/posixpath.py, line 277, in walk
walk(name, func, arg)
  File /usr/lib/python2.1/posixpath.py, line 269, in walk
func(arg, top, names)
  File scripts/kxref.py, line 216, in xrefvisit
filevisitor(dict, node)
  File scripts/kxref.py, line 191, in filevisitor
symdef = definere.search(lines[0])
NameError: global name 'definere' is not defined

___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel



Re: [kbuild-devel] cml2-1.9.10 problems with kxref.py script

2001-12-20 Thread Eric S. Raymond

Steven Cole [EMAIL PROTECTED]:
 Results of cml2-1.9.11 and Python 2.1 after kxref.out is deleted:
 [root@spc linux-2.4.17-rc2-cml2]# scripts/kxref.py -e
 scripts/kxref.py:145: SyntaxWarning: local name 'definere' in 'makexref' shadows use 
of 'definere' as global in nested scope 'xrefvisit'
   def makexref(tree):
 Regenerating cross-reference database...Traceback (most recent call last):
   File scripts/kxref.py, line 540, in ?
 load_context(sourcetree)
   File scripts/kxref.py, line 492, in load_context
 (xrefs, cml1types) = makexref(tree)
   File scripts/kxref.py, line 221, in makexref
 os.path.walk(., xrefvisit, xrefdict)
   File /usr/lib/python2.1/posixpath.py, line 277, in walk
 walk(name, func, arg)
   File /usr/lib/python2.1/posixpath.py, line 269, in walk
 func(arg, top, names)
   File scripts/kxref.py, line 216, in xrefvisit
 filevisitor(dict, node)
   File scripts/kxref.py, line 191, in filevisitor
 symdef = definere.search(lines[0])
 NameError: global name 'definere' is not defined

Aaarrgghh.  I typoed.  Apply this patch:

--- kxref.py2001/12/20 08:56:58 1.51
+++ kxref.py2001/12/20 18:56:55
@@ -137,7 +137,7 @@
 
 def makexref(tree):
 Generate a cross-reference dictionary for the given source tree.
-global typefind, choicere, configre, definre, mycml1types
+global typefind, choicere, configre, definere, mycml1types
 typefind = 
re.compile(r(?!define_)(bool|tristate|int|hex|string)\s+'.*'\s+CONFIG_(\w+))
 choicere = re.compile(r^\s*choice)
 configre = re.compile(rulebase.prefix + r(\w*))

That should make it run under all 2.x versions.
-- 
a href=http://www.tuxedo.org/~esr/;Eric S. Raymond/a

Government is not reason, it is not eloquence, it is force; like fire, a
troublesome servant and a fearful master. Never for a moment should it be left
to irresponsible action.
-- George Washington, in a speech of January 7, 1790

___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel



Re: [kbuild-devel] cml2-1.9.10 problems with kxref.py script

2001-12-20 Thread Steven Cole

On Thursday 20 December 2001 11:58 am, Eric S. Raymond wrote:
 Steven Cole [EMAIL PROTECTED]:
  Results of cml2-1.9.11 and Python 2.1 after kxref.out is deleted:
[snippage]
  NameError: global name 'definere' is not defined

 Aaarrgghh.  I typoed.  Apply this patch:

Obviously correct patch snipped.

 That should make it run under all 2.x versions.

Yep, that fixes it.  A Kibithanks to you!
Steven

___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel



Re: [kbuild-devel] PPC, take 1

2001-12-20 Thread Keith Owens

On Thu, 20 Dec 2001 08:09:19 -0700, 
Tom Rini [EMAIL PROTECTED] wrote:
Okay.  With the various patches Keith has posted (and using kbuild-2.4
for vmlinux - zImage), I've gotten two different boards compiled and
booted.  These still have the various debugging statements in, but aside
from that does anyone see any problems/nits I should go and fix? (I also
left out the files I had to modify for relative includes for now).

Do you have to change the source code to handle relative includes?
Unless you changed the kbuild 2.4 Makefiles as well, changing source
will prevent the use of kbuild 2.4 after your patch is applied.  I
avoided changing source for kbuild 2.5 unless the change was also 2.4
compatible.  You should be able to handle relative includes with extra
cflags (and a lot of FIXME comments).

--- /dev/null  Wed Dec 31 17:00:00 1969
+++ arch/ppc/amiga/Makefile.in Mon Dec 17 15:14:19 2001
@@ -0,0 +1,5 @@
+expsyms(amiga_ksyms.o)
+
+select(CONFIG_APUS config.o amiints.o cia.o time.o bootinfo.o amisound.o \
+  chipram.o amiga_ksyms.o)

No need to use trailing '\', unless they are raw make commands like
CFLAGS +=.  Pre-processor commands do not need continuation markers and
they just look ugly.

--- /dev/null  Wed Dec 31 17:00:00 1969
+++ arch/ppc/kernel/Makefile.inWed Dec 19 21:30:47 2001
@@ -0,0 +1,70 @@
+ifsel(CONFIG_PPC64BRIDGE)
+extra_aflags_all(-Wa-mppc64bridge)
+endif

Should the extra aflags for ppc64bridge be set in Makefile.defs.config
so they affect everything?  Also those flags look wrong, I would expect
-Wa,-mppc64bridge, not -Wa-mppc64bridge.

+ifsel(CONFIG_WALNUT)
+select(CONFIG_PCI galaxy_pci.o)
+endif

select(CONFIG_PCI CONFIG_WALNUT galaxy_pci.o)

+ifsel(CONFIG_8xx)
+select(CONFIG_PCI qspan_pci.o)
+ifnsel(CONFIG_MATH_EMULATION)
+select(softemu8xx.o)
+endif
+endif

select(CONFIG_8xx CONFIG_PCI qspan_pci.o)
select(CONFIG_8xx !CONFIG_MATH_EMULATION softemu8xx.o)

+ifsel(CONFIG_APUS)
+select(CONFIG_PCI apus_pci.o)
+endif

select(CONFIG_PCI CONFIG_APUS apus_pci.o)

+ifsel(CONFIG_SMP)
+select(CONFIG_ALL_PPC pmac_smp.o chrp_smp.o)
+endif

select(CONFIG_ALL_PPC CONFIG_SMP pmac_smp.o chrp_smp.o)

--- /dev/null  Wed Dec 31 17:00:00 1969
+++ arch/ppc/math-emu/Makefile.in  Mon Dec 17 14:59:17 2001
@@ -0,0 +1,11 @@
+select(math.o fmr.o lfd.o stfd.o)
+select(CONFIG_MATH_EMULATION fabs.o fadd.o fadds.o fcmpo.o fcmpu.o \

Remove trailing '\'.

--- /dev/null  Wed Dec 31 17:00:00 1969
+++ arch/ppc/xmon/Makefile.in  Wed Dec 19 09:37:19 2001
@@ -0,0 +1,6 @@
+ifsel(CONFIG_8xx)
+  select(CONFIG_XMON start_8xx.o)
+else
+  select(CONFIG_XMON start.o)
+endif

select(CONFIG_XMON  CONFIG_8xx start_8xx.o)
select(CONFIG_XMON !CONFIG_8xx start.o)


___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel



Re: [kbuild-devel] PPC, take 1

2001-12-20 Thread Tom Rini

On Fri, Dec 21, 2001 at 07:34:35AM +1100, Keith Owens wrote:
 On Thu, 20 Dec 2001 08:09:19 -0700, 
 Tom Rini [EMAIL PROTECTED] wrote:
 Okay.  With the various patches Keith has posted (and using kbuild-2.4
 for vmlinux - zImage), I've gotten two different boards compiled and
 booted.  These still have the various debugging statements in, but aside
 from that does anyone see any problems/nits I should go and fix? (I also
 left out the files I had to modify for relative includes for now).
 
 Do you have to change the source code to handle relative includes?
 Unless you changed the kbuild 2.4 Makefiles as well, changing source
 will prevent the use of kbuild 2.4 after your patch is applied.  I
 avoided changing source for kbuild 2.5 unless the change was also 2.4
 compatible.  You should be able to handle relative includes with extra
 cflags (and a lot of FIXME comments).

Yeah, I did the 'proper' kbuild-2.5 only fix for now.  What would the
proper extra flag be for #include ../../../drivers/scsi/sd.h tho?
$(src_listinc /) or so?

 --- /dev/nullWed Dec 31 17:00:00 1969
 +++ arch/ppc/amiga/Makefile.in   Mon Dec 17 15:14:19 2001
 @@ -0,0 +1,5 @@
 +expsyms(amiga_ksyms.o)
 +
 +select(CONFIG_APUS config.o amiints.o cia.o time.o bootinfo.o amisound.o \
 +chipram.o amiga_ksyms.o)
 
 No need to use trailing '\', unless they are raw make commands like
 CFLAGS +=.  Pre-processor commands do not need continuation markers and
 they just look ugly.

Ah, okay.

 --- /dev/nullWed Dec 31 17:00:00 1969
 +++ arch/ppc/kernel/Makefile.in  Wed Dec 19 21:30:47 2001
 @@ -0,0 +1,70 @@
 +ifsel(CONFIG_PPC64BRIDGE)
 +extra_aflags_all(-Wa-mppc64bridge)
 +endif
 
 Should the extra aflags for ppc64bridge be set in Makefile.defs.config
 so they affect everything?  Also those flags look wrong, I would expect
 -Wa,-mppc64bridge, not -Wa-mppc64bridge.

Yeah, that's a typo.  Thanks.  I'll ask the ppc64 people if all .S files
should get it or what.

 +ifsel(CONFIG_WALNUT)
 +select(CONFIG_PCI galaxy_pci.o)
 +endif
 
 select(CONFIG_PCI CONFIG_WALNUT galaxy_pci.o)

Yeah, that came out of pass-one (directish translation).  I found the
select(CONFIG_A ... CONFIG_N foo.o) later on.

I'll go fix those bits and post a patch (are you planning on a 2.4.16-3
or going to wait until 2.4.17 is out?).

-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel



Re: [kbuild-devel] PPC, take 1

2001-12-20 Thread Keith Owens

On Thu, 20 Dec 2001 13:46:56 -0700, 
Tom Rini [EMAIL PROTECTED] wrote:
Yeah, I did the 'proper' kbuild-2.5 only fix for now.  What would the
proper extra flag be for #include ../../../drivers/scsi/sd.h tho?
$(src_listinc /) or so?

:(((.  That one will have to change to #include sd.h and both 2.4 and
2.5 need extra cflags.

I'll go fix those bits and post a patch (are you planning on a 2.4.16-3
or going to wait until 2.4.17 is out?).

2.4.16-3 within 24 hours (I hope).


___
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel