[rtems-libbsd commit] Simplify
Sebastian Huber
sebh at rtems.org
Tue Apr 17 10:03:20 UTC 2012
Module: rtems-libbsd
Branch: master
Commit: edd344ae1bbaf698f4316b66faa408ebda98353c
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=edd344ae1bbaf698f4316b66faa408ebda98353c
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Apr 17 11:54:31 2012 +0200
Simplify
---
Makefile | 793 +++++++++++++++++++++++++--------------------------
freebsd-to-rtems.py | 692 ++++++++++++++++++++++-----------------------
2 files changed, 726 insertions(+), 759 deletions(-)
diff --git a/Makefile b/Makefile
index 13f8b19..c7b21cf 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@ include $(PROJECT_ROOT)/make/leaf.cfg
CFLAGS += -ffreestanding
CFLAGS += -I .
CFLAGS += -I rtemsbsd
+CFLAGS += -I rtemsbsd/$(RTEMS_CPU)/include
CFLAGS += -I freebsd/$(RTEMS_CPU)/include
CFLAGS += -I contrib/altq
CFLAGS += -I contrib/pf
@@ -14,411 +15,401 @@ CFLAGS += -B $(INSTALL_BASE)
CFLAGS += -w
CFLAGS += -std=gnu99
-C_FILES = \
- freebsd/kern/subr_eventhandler.c \
- freebsd/kern/kern_subr.c \
- freebsd/kern/kern_tc.c \
- freebsd/libkern/fls.c \
- freebsd/net/bridgestp.c \
- freebsd/net/ieee8023ad_lacp.c \
- freebsd/net/if_atmsubr.c \
- freebsd/net/if.c \
- freebsd/net/if_clone.c \
- freebsd/net/if_dead.c \
- freebsd/net/if_disc.c \
- freebsd/net/if_edsc.c \
- freebsd/net/if_ef.c \
- freebsd/net/if_enc.c \
- freebsd/net/if_epair.c \
- freebsd/net/if_faith.c \
- freebsd/net/if_fddisubr.c \
- freebsd/net/if_fwsubr.c \
- freebsd/net/if_gif.c \
- freebsd/net/if_gre.c \
- freebsd/net/if_iso88025subr.c \
- freebsd/net/if_lagg.c \
- freebsd/net/if_llatbl.c \
- freebsd/net/if_loop.c \
- freebsd/net/if_media.c \
- freebsd/net/if_mib.c \
- freebsd/net/if_spppfr.c \
- freebsd/net/if_spppsubr.c \
- freebsd/net/if_stf.c \
- freebsd/net/if_tap.c \
- freebsd/net/if_tun.c \
- freebsd/net/if_vlan.c \
- freebsd/net/pfil.c \
- freebsd/net/radix.c \
- freebsd/net/radix_mpath.c \
- freebsd/net/raw_cb.c \
- freebsd/net/raw_usrreq.c \
- freebsd/net/route.c \
- freebsd/net/rtsock.c \
- freebsd/net/slcompress.c \
- freebsd/net/zlib.c \
- freebsd/net/bpf_buffer.c \
- freebsd/net/bpf.c \
- freebsd/net/bpf_filter.c \
- freebsd/net/bpf_jitter.c \
- freebsd/net/if_arcsubr.c \
- freebsd/net/if_bridge.c \
- freebsd/net/if_ethersubr.c \
- freebsd/net/netisr.c \
- freebsd/netinet/accf_data.c \
- freebsd/netinet/accf_dns.c \
- freebsd/netinet/accf_http.c \
- freebsd/netinet/if_atm.c \
- freebsd/netinet/if_ether.c \
- freebsd/netinet/igmp.c \
- freebsd/netinet/in.c \
- freebsd/netinet/in_gif.c \
- freebsd/netinet/in_mcast.c \
- freebsd/netinet/in_pcb.c \
- freebsd/netinet/in_proto.c \
- freebsd/netinet/in_rmx.c \
- freebsd/netinet/ip_carp.c \
- freebsd/netinet/ip_divert.c \
- freebsd/netinet/ip_ecn.c \
- freebsd/netinet/ip_encap.c \
- freebsd/netinet/ip_fastfwd.c \
- freebsd/netinet/ip_gre.c \
- freebsd/netinet/ip_icmp.c \
- freebsd/netinet/ip_id.c \
- freebsd/netinet/ip_input.c \
- freebsd/netinet/ip_ipsec.c \
- freebsd/netinet/ip_mroute.c \
- freebsd/netinet/ip_options.c \
- freebsd/netinet/ip_output.c \
- freebsd/netinet/raw_ip.c \
- freebsd/netinet/sctp_asconf.c \
- freebsd/netinet/sctp_auth.c \
- freebsd/netinet/sctp_bsd_addr.c \
- freebsd/netinet/sctp_cc_functions.c \
- freebsd/netinet/sctp_crc32.c \
- freebsd/netinet/sctp_indata.c \
- freebsd/netinet/sctp_input.c \
- freebsd/netinet/sctp_output.c \
- freebsd/netinet/sctp_pcb.c \
- freebsd/netinet/sctp_peeloff.c \
- freebsd/netinet/sctp_sysctl.c \
- freebsd/netinet/sctp_timer.c \
- freebsd/netinet/sctp_usrreq.c \
- freebsd/netinet/sctputil.c \
- freebsd/netinet/tcp_debug.c \
- freebsd/netinet/tcp_input.c \
- freebsd/netinet/tcp_lro.c \
- freebsd/netinet/tcp_offload.c \
- freebsd/netinet/tcp_output.c \
- freebsd/netinet/tcp_reass.c \
- freebsd/netinet/tcp_sack.c \
- freebsd/netinet/tcp_subr.c \
- freebsd/netinet/tcp_syncache.c \
- freebsd/netinet/tcp_timer.c \
- freebsd/netinet/tcp_timewait.c \
- freebsd/netinet/tcp_usrreq.c \
- freebsd/netinet/udp_usrreq.c \
- freebsd/netinet/ipfw/dn_sched_fifo.c \
- freebsd/netinet/ipfw/dn_sched_rr.c \
- freebsd/netinet/ipfw/ip_fw_log.c \
- freebsd/netinet/ipfw/dn_sched_qfq.c \
- freebsd/netinet/ipfw/dn_sched_prio.c \
- freebsd/netinet/ipfw/ip_dn_glue.c \
- freebsd/netinet/ipfw/ip_fw2.c \
- freebsd/netinet/ipfw/dn_heap.c \
- freebsd/netinet/ipfw/ip_dummynet.c \
- freebsd/netinet/ipfw/ip_fw_sockopt.c \
- freebsd/netinet/ipfw/dn_sched_wf2q.c \
- freebsd/netinet/ipfw/ip_fw_nat.c \
- freebsd/netinet/ipfw/ip_fw_pfil.c \
- freebsd/netinet/ipfw/ip_dn_io.c \
- freebsd/netinet/ipfw/ip_fw_table.c \
- freebsd/netinet/libalias/alias_dummy.c \
- freebsd/netinet/libalias/alias_pptp.c \
- freebsd/netinet/libalias/alias_smedia.c \
- freebsd/netinet/libalias/alias_mod.c \
- freebsd/netinet/libalias/alias_cuseeme.c \
- freebsd/netinet/libalias/alias_nbt.c \
- freebsd/netinet/libalias/alias_irc.c \
- freebsd/netinet/libalias/alias_util.c \
- freebsd/netinet/libalias/alias_db.c \
- freebsd/netinet/libalias/alias_ftp.c \
- freebsd/netinet/libalias/alias_proxy.c \
- freebsd/netinet/libalias/alias.c \
- freebsd/netinet/libalias/alias_skinny.c \
- freebsd/netinet/libalias/alias_sctp.c \
- freebsd/netinet6/dest6.c \
- freebsd/netinet6/frag6.c \
- freebsd/netinet6/icmp6.c \
- freebsd/netinet6/in6.c \
- freebsd/netinet6/in6_cksum.c \
- freebsd/netinet6/in6_gif.c \
- freebsd/netinet6/in6_ifattach.c \
- freebsd/netinet6/in6_mcast.c \
- freebsd/netinet6/in6_pcb.c \
- freebsd/netinet6/in6_proto.c \
- freebsd/netinet6/in6_rmx.c \
- freebsd/netinet6/in6_src.c \
- freebsd/netinet6/ip6_forward.c \
- freebsd/netinet6/ip6_id.c \
- freebsd/netinet6/ip6_input.c \
- freebsd/netinet6/ip6_ipsec.c \
- freebsd/netinet6/ip6_mroute.c \
- freebsd/netinet6/ip6_output.c \
- freebsd/netinet6/mld6.c \
- freebsd/netinet6/nd6.c \
- freebsd/netinet6/nd6_nbr.c \
- freebsd/netinet6/nd6_rtr.c \
- freebsd/netinet6/raw_ip6.c \
- freebsd/netinet6/route6.c \
- freebsd/netinet6/scope6.c \
- freebsd/netinet6/sctp6_usrreq.c \
- freebsd/netinet6/udp6_usrreq.c \
- freebsd/netipsec/ipsec.c \
- freebsd/netipsec/ipsec_input.c \
- freebsd/netipsec/ipsec_mbuf.c \
- freebsd/netipsec/ipsec_output.c \
- freebsd/netipsec/key.c \
- freebsd/netipsec/key_debug.c \
- freebsd/netipsec/keysock.c \
- freebsd/netipsec/xform_ah.c \
- freebsd/netipsec/xform_esp.c \
- freebsd/netipsec/xform_ipcomp.c \
- freebsd/netipsec/xform_ipip.c \
- freebsd/netipsec/xform_tcp.c \
- freebsd/net80211/ieee80211_acl.c \
- freebsd/net80211/ieee80211_action.c \
- freebsd/net80211/ieee80211_adhoc.c \
- freebsd/net80211/ieee80211_ageq.c \
- freebsd/net80211/ieee80211_amrr.c \
- freebsd/net80211/ieee80211.c \
- freebsd/net80211/ieee80211_crypto.c \
- freebsd/net80211/ieee80211_crypto_ccmp.c \
- freebsd/net80211/ieee80211_crypto_none.c \
- freebsd/net80211/ieee80211_crypto_tkip.c \
- freebsd/net80211/ieee80211_crypto_wep.c \
- freebsd/net80211/ieee80211_ddb.c \
- freebsd/net80211/ieee80211_dfs.c \
- freebsd/net80211/ieee80211_freebsd.c \
- freebsd/net80211/ieee80211_hostap.c \
- freebsd/net80211/ieee80211_ht.c \
- freebsd/net80211/ieee80211_hwmp.c \
- freebsd/net80211/ieee80211_input.c \
- freebsd/net80211/ieee80211_ioctl.c \
- freebsd/net80211/ieee80211_mesh.c \
- freebsd/net80211/ieee80211_monitor.c \
- freebsd/net80211/ieee80211_node.c \
- freebsd/net80211/ieee80211_output.c \
- freebsd/net80211/ieee80211_phy.c \
- freebsd/net80211/ieee80211_power.c \
- freebsd/net80211/ieee80211_proto.c \
- freebsd/net80211/ieee80211_radiotap.c \
- freebsd/net80211/ieee80211_ratectl.c \
- freebsd/net80211/ieee80211_ratectl_none.c \
- freebsd/net80211/ieee80211_regdomain.c \
- freebsd/net80211/ieee80211_rssadapt.c \
- freebsd/net80211/ieee80211_scan.c \
- freebsd/net80211/ieee80211_scan_sta.c \
- freebsd/net80211/ieee80211_sta.c \
- freebsd/net80211/ieee80211_superg.c \
- freebsd/net80211/ieee80211_tdma.c \
- freebsd/net80211/ieee80211_wds.c \
- freebsd/net80211/ieee80211_xauth.c \
- freebsd/opencrypto/crypto.c \
- freebsd/opencrypto/deflate.c \
- freebsd/opencrypto/cryptosoft.c \
- freebsd/opencrypto/criov.c \
- freebsd/opencrypto/rmd160.c \
- freebsd/opencrypto/xform.c \
- freebsd/opencrypto/skipjack.c \
- freebsd/opencrypto/cast.c \
- freebsd/opencrypto/cryptodev.c \
- freebsd/crypto/sha1.c \
- freebsd/crypto/sha2/sha2.c \
- freebsd/crypto/rijndael/rijndael-alg-fst.c \
- freebsd/crypto/rijndael/rijndael-api.c \
- freebsd/crypto/rijndael/rijndael-api-fst.c \
- freebsd/crypto/des/des_setkey.c \
- freebsd/crypto/des/des_enc.c \
- freebsd/crypto/des/des_ecb.c \
- freebsd/crypto/blowfish/bf_enc.c \
- freebsd/crypto/blowfish/bf_skey.c \
- freebsd/crypto/blowfish/bf_ecb.c \
- freebsd/crypto/rc4/rc4.c \
- freebsd/crypto/camellia/camellia-api.c \
- freebsd/crypto/camellia/camellia.c \
- contrib/altq/freebsd/altq/altq_rmclass.c \
- contrib/altq/freebsd/altq/altq_rio.c \
- contrib/altq/freebsd/altq/altq_subr.c \
- contrib/altq/freebsd/altq/altq_cdnr.c \
- contrib/altq/freebsd/altq/altq_priq.c \
- contrib/altq/freebsd/altq/altq_cbq.c \
- contrib/altq/freebsd/altq/altq_hfsc.c \
- contrib/altq/freebsd/altq/altq_red.c \
- contrib/pf/freebsd/netinet/in4_cksum.c \
- contrib/pf/freebsd/net/pf.c \
- contrib/pf/freebsd/net/if_pflog.c \
- contrib/pf/freebsd/net/pf_subr.c \
- contrib/pf/freebsd/net/pf_ioctl.c \
- contrib/pf/freebsd/net/pf_table.c \
- contrib/pf/freebsd/net/pf_if.c \
- contrib/pf/freebsd/net/pf_osfp.c \
- contrib/pf/freebsd/net/pf_norm.c \
- contrib/pf/freebsd/net/pf_ruleset.c \
- contrib/pf/freebsd/net/if_pfsync.c \
- freebsd/dev/mii/mii.c \
- freebsd/dev/mii/mii_physubr.c \
- freebsd/dev/mii/icsphy.c \
- freebsd/dev/mii/brgphy.c \
- freebsd/local/usb_if.c \
- freebsd/local/bus_if.c \
- freebsd/local/device_if.c \
- freebsd/local/cryptodev_if.c \
- freebsd/local/miibus_if.c \
- freebsd/kern/init_main.c \
- freebsd/kern/kern_mib.c \
- freebsd/kern/kern_mbuf.c \
- freebsd/kern/kern_module.c \
- freebsd/kern/kern_sysctl.c \
- freebsd/kern/subr_bus.c \
- freebsd/kern/subr_kobj.c \
- freebsd/kern/uipc_mbuf.c \
- freebsd/kern/uipc_mbuf2.c \
- freebsd/kern/uipc_socket.c \
- freebsd/kern/uipc_sockbuf.c \
- freebsd/kern/uipc_domain.c \
- freebsd/dev/usb/usb_busdma.c \
- freebsd/dev/usb/usb_core.c \
- freebsd/dev/usb/usb_debug.c \
- freebsd/dev/usb/usb_dev.c \
- freebsd/dev/usb/usb_device.c \
- freebsd/dev/usb/usb_dynamic.c \
- freebsd/dev/usb/usb_error.c \
- freebsd/dev/usb/usb_generic.c \
- freebsd/dev/usb/usb_handle_request.c \
- freebsd/dev/usb/usb_hid.c \
- freebsd/dev/usb/usb_hub.c \
- freebsd/dev/usb/usb_lookup.c \
- freebsd/dev/usb/usb_mbuf.c \
- freebsd/dev/usb/usb_msctest.c \
- freebsd/dev/usb/usb_parse.c \
- freebsd/dev/usb/usb_process.c \
- freebsd/dev/usb/usb_request.c \
- freebsd/dev/usb/usb_transfer.c \
- freebsd/dev/usb/usb_util.c \
- freebsd/dev/usb/quirk/usb_quirk.c \
- freebsd/dev/usb/controller/ohci.c \
- freebsd/dev/usb/controller/ehci.c \
- freebsd/dev/usb/controller/usb_controller.c \
- freebsd/cam/cam.c \
- freebsd/cam/scsi/scsi_all.c \
- freebsd/dev/usb/storage/umass.c \
- freebsd/kern/subr_hints.c \
- freebsd/dev/random/harvest.c \
- freebsd/libkern/random.c \
- freebsd/libkern/arc4random.c \
- freebsd/kern/subr_pcpu.c \
- freebsd/kern/subr_sbuf.c \
- freebsd/kern/subr_rman.c \
- freebsd/libkern/inet_ntoa.c \
- freebsd/kern/kern_prot.c \
- freebsd/kern/kern_time.c \
- freebsd/kern/kern_event.c \
- freebsd/netinet/tcp_hostcache.c \
- freebsd/dev/pci/pci.c \
- freebsd/kern/uipc_accf.c \
- freebsd/kern/kern_ntptime.c \
- freebsd/dev/re/if_re.c \
- freebsd/dev/fxp/if_fxp.c \
- freebsd/dev/e1000/e1000_80003es2lan.c \
- freebsd/dev/e1000/e1000_82542.c \
- freebsd/dev/e1000/e1000_82575.c \
- freebsd/dev/e1000/e1000_mac.c \
- freebsd/dev/e1000/e1000_nvm.c \
- freebsd/dev/e1000/e1000_vf.c \
- freebsd/dev/e1000/if_lem.c \
- freebsd/dev/e1000/e1000_82540.c \
- freebsd/dev/e1000/e1000_82543.c \
- freebsd/dev/e1000/e1000_api.c \
- freebsd/dev/e1000/e1000_manage.c \
- freebsd/dev/e1000/e1000_osdep.c \
- freebsd/dev/e1000/if_em.c \
- freebsd/dev/e1000/e1000_82541.c \
- freebsd/dev/e1000/e1000_82571.c \
- freebsd/dev/e1000/e1000_ich8lan.c \
- freebsd/dev/e1000/e1000_mbx.c \
- freebsd/dev/e1000/e1000_phy.c \
- freebsd/dev/e1000/if_igb.c \
- freebsd/dev/dc/dcphy.c \
- freebsd/dev/dc/if_dc.c \
- freebsd/dev/dc/pnphy.c \
- freebsd/dev/smc/if_smc.c \
- freebsd/dev/bce/if_bce.c \
- freebsd/dev/bfe/if_bfe.c \
- freebsd/dev/bge/if_bge.c
-# RTEMS Project Owned Files
-C_FILES += \
- rtemsbsd/dev/usb/controller/ohci_lpc24xx.c \
- rtemsbsd/dev/usb/controller/ohci_lpc32xx.c \
- rtemsbsd/dev/usb/controller/ehci_mpc83xx.c \
- rtemsbsd/src/rtems-bsd-cam.c \
- rtemsbsd/src/rtems-bsd-nexus.c \
- rtemsbsd/src/rtems-bsd-autoconf.c \
- rtemsbsd/src/rtems-bsd-delay.c \
- rtemsbsd/src/rtems-bsd-mutex.c \
- rtemsbsd/src/rtems-bsd-thread.c \
- rtemsbsd/src/rtems-bsd-condvar.c \
- rtemsbsd/src/rtems-bsd-lock.c \
- rtemsbsd/src/rtems-bsd-log.c \
- rtemsbsd/src/rtems-bsd-sx.c \
- rtemsbsd/src/rtems-bsd-rwlock.c \
- rtemsbsd/src/rtems-bsd-generic.c \
- rtemsbsd/src/rtems-bsd-panic.c \
- rtemsbsd/src/rtems-bsd-synch.c \
- rtemsbsd/src/rtems-bsd-signal.c \
- rtemsbsd/src/rtems-bsd-callout.c \
- rtemsbsd/src/rtems-bsd-init.c \
- rtemsbsd/src/rtems-bsd-init-with-irq.c \
- rtemsbsd/src/rtems-bsd-assert.c \
- rtemsbsd/src/rtems-bsd-prot.c \
- rtemsbsd/src/rtems-bsd-resource.c \
- rtemsbsd/src/rtems-bsd-jail.c \
- rtemsbsd/src/rtems-bsd-shell.c \
- rtemsbsd/src/rtems-bsd-syscalls.c \
- rtemsbsd/src/rtems-bsd-smp.c \
- rtemsbsd/src/rtems-bsd-malloc.c \
- rtemsbsd/src/rtems-bsd-support.c \
- rtemsbsd/src/rtems-bsd-bus-dma.c \
- rtemsbsd/src/rtems-bsd-sysctl.c \
- rtemsbsd/src/rtems-bsd-sysctlbyname.c \
- rtemsbsd/src/rtems-bsd-sysctlnametomib.c \
- rtemsbsd/src/rtems-bsd-uma.c \
- rtemsbsd/src/rtems-bsd-taskqueue.c \
- rtemsbsd/src/rtems-bsd-timesupport.c \
- rtemsbsd/src/rtems-bsd-timeout.c \
- rtemsbsd/src/rtems-bsd-newproc.c \
- rtemsbsd/src/rtems-bsd-vm_glue.c \
- rtemsbsd/src/rtems-bsd-cyclecount.c
-
-ifeq ($(RTEMS_CPU),arm)
-C_FILES += \
- freebsd/arm/arm/in_cksum.c \
- freebsd/arm/arm/in_cksum_arm.S
+C_FILES =
+C_FILES += rtemsbsd/dev/usb/controller/ohci_lpc24xx.c
+C_FILES += rtemsbsd/dev/usb/controller/ohci_lpc32xx.c
+C_FILES += rtemsbsd/dev/usb/controller/ehci_mpc83xx.c
+C_FILES += rtemsbsd/src/rtems-bsd-cam.c
+C_FILES += rtemsbsd/src/rtems-bsd-nexus.c
+C_FILES += rtemsbsd/src/rtems-bsd-autoconf.c
+C_FILES += rtemsbsd/src/rtems-bsd-delay.c
+C_FILES += rtemsbsd/src/rtems-bsd-mutex.c
+C_FILES += rtemsbsd/src/rtems-bsd-thread.c
+C_FILES += rtemsbsd/src/rtems-bsd-condvar.c
+C_FILES += rtemsbsd/src/rtems-bsd-lock.c
+C_FILES += rtemsbsd/src/rtems-bsd-log.c
+C_FILES += rtemsbsd/src/rtems-bsd-sx.c
+C_FILES += rtemsbsd/src/rtems-bsd-rwlock.c
+C_FILES += rtemsbsd/src/rtems-bsd-generic.c
+C_FILES += rtemsbsd/src/rtems-bsd-panic.c
+C_FILES += rtemsbsd/src/rtems-bsd-synch.c
+C_FILES += rtemsbsd/src/rtems-bsd-signal.c
+C_FILES += rtemsbsd/src/rtems-bsd-callout.c
+C_FILES += rtemsbsd/src/rtems-bsd-init.c
+C_FILES += rtemsbsd/src/rtems-bsd-init-with-irq.c
+C_FILES += rtemsbsd/src/rtems-bsd-assert.c
+C_FILES += rtemsbsd/src/rtems-bsd-prot.c
+C_FILES += rtemsbsd/src/rtems-bsd-resource.c
+C_FILES += rtemsbsd/src/rtems-bsd-jail.c
+C_FILES += rtemsbsd/src/rtems-bsd-shell.c
+C_FILES += rtemsbsd/src/rtems-bsd-syscalls.c
+C_FILES += rtemsbsd/src/rtems-bsd-smp.c
+C_FILES += rtemsbsd/src/rtems-bsd-malloc.c
+C_FILES += rtemsbsd/src/rtems-bsd-support.c
+C_FILES += rtemsbsd/src/rtems-bsd-bus-dma.c
+C_FILES += rtemsbsd/src/rtems-bsd-sysctl.c
+C_FILES += rtemsbsd/src/rtems-bsd-sysctlbyname.c
+C_FILES += rtemsbsd/src/rtems-bsd-sysctlnametomib.c
+C_FILES += rtemsbsd/src/rtems-bsd-uma.c
+C_FILES += rtemsbsd/src/rtems-bsd-taskqueue.c
+C_FILES += rtemsbsd/src/rtems-bsd-timesupport.c
+C_FILES += rtemsbsd/src/rtems-bsd-newproc.c
+C_FILES += rtemsbsd/src/rtems-bsd-vm_glue.c
+C_FILES += freebsd/kern/subr_eventhandler.c
+C_FILES += freebsd/kern/kern_subr.c
+C_FILES += freebsd/kern/kern_tc.c
+C_FILES += freebsd/libkern/fls.c
+C_FILES += freebsd/net/bridgestp.c
+C_FILES += freebsd/net/ieee8023ad_lacp.c
+C_FILES += freebsd/net/if_atmsubr.c
+C_FILES += freebsd/net/if.c
+C_FILES += freebsd/net/if_clone.c
+C_FILES += freebsd/net/if_dead.c
+C_FILES += freebsd/net/if_disc.c
+C_FILES += freebsd/net/if_edsc.c
+C_FILES += freebsd/net/if_ef.c
+C_FILES += freebsd/net/if_enc.c
+C_FILES += freebsd/net/if_epair.c
+C_FILES += freebsd/net/if_faith.c
+C_FILES += freebsd/net/if_fddisubr.c
+C_FILES += freebsd/net/if_fwsubr.c
+C_FILES += freebsd/net/if_gif.c
+C_FILES += freebsd/net/if_gre.c
+C_FILES += freebsd/net/if_iso88025subr.c
+C_FILES += freebsd/net/if_lagg.c
+C_FILES += freebsd/net/if_llatbl.c
+C_FILES += freebsd/net/if_loop.c
+C_FILES += freebsd/net/if_media.c
+C_FILES += freebsd/net/if_mib.c
+C_FILES += freebsd/net/if_spppfr.c
+C_FILES += freebsd/net/if_spppsubr.c
+C_FILES += freebsd/net/if_stf.c
+C_FILES += freebsd/net/if_tap.c
+C_FILES += freebsd/net/if_tun.c
+C_FILES += freebsd/net/if_vlan.c
+C_FILES += freebsd/net/pfil.c
+C_FILES += freebsd/net/radix.c
+C_FILES += freebsd/net/radix_mpath.c
+C_FILES += freebsd/net/raw_cb.c
+C_FILES += freebsd/net/raw_usrreq.c
+C_FILES += freebsd/net/route.c
+C_FILES += freebsd/net/rtsock.c
+C_FILES += freebsd/net/slcompress.c
+C_FILES += freebsd/net/zlib.c
+C_FILES += freebsd/net/bpf_buffer.c
+C_FILES += freebsd/net/bpf.c
+C_FILES += freebsd/net/bpf_filter.c
+C_FILES += freebsd/net/bpf_jitter.c
+C_FILES += freebsd/net/if_arcsubr.c
+C_FILES += freebsd/net/if_bridge.c
+C_FILES += freebsd/net/if_ethersubr.c
+C_FILES += freebsd/net/netisr.c
+C_FILES += freebsd/netinet/accf_data.c
+C_FILES += freebsd/netinet/accf_dns.c
+C_FILES += freebsd/netinet/accf_http.c
+C_FILES += freebsd/netinet/if_atm.c
+C_FILES += freebsd/netinet/if_ether.c
+C_FILES += freebsd/netinet/igmp.c
+C_FILES += freebsd/netinet/in.c
+C_FILES += freebsd/netinet/in_gif.c
+C_FILES += freebsd/netinet/in_mcast.c
+C_FILES += freebsd/netinet/in_pcb.c
+C_FILES += freebsd/netinet/in_proto.c
+C_FILES += freebsd/netinet/in_rmx.c
+C_FILES += freebsd/netinet/ip_carp.c
+C_FILES += freebsd/netinet/ip_divert.c
+C_FILES += freebsd/netinet/ip_ecn.c
+C_FILES += freebsd/netinet/ip_encap.c
+C_FILES += freebsd/netinet/ip_fastfwd.c
+C_FILES += freebsd/netinet/ip_gre.c
+C_FILES += freebsd/netinet/ip_icmp.c
+C_FILES += freebsd/netinet/ip_id.c
+C_FILES += freebsd/netinet/ip_input.c
+C_FILES += freebsd/netinet/ip_ipsec.c
+C_FILES += freebsd/netinet/ip_mroute.c
+C_FILES += freebsd/netinet/ip_options.c
+C_FILES += freebsd/netinet/ip_output.c
+C_FILES += freebsd/netinet/raw_ip.c
+C_FILES += freebsd/netinet/sctp_asconf.c
+C_FILES += freebsd/netinet/sctp_auth.c
+C_FILES += freebsd/netinet/sctp_bsd_addr.c
+C_FILES += freebsd/netinet/sctp_cc_functions.c
+C_FILES += freebsd/netinet/sctp_crc32.c
+C_FILES += freebsd/netinet/sctp_indata.c
+C_FILES += freebsd/netinet/sctp_input.c
+C_FILES += freebsd/netinet/sctp_output.c
+C_FILES += freebsd/netinet/sctp_pcb.c
+C_FILES += freebsd/netinet/sctp_peeloff.c
+C_FILES += freebsd/netinet/sctp_sysctl.c
+C_FILES += freebsd/netinet/sctp_timer.c
+C_FILES += freebsd/netinet/sctp_usrreq.c
+C_FILES += freebsd/netinet/sctputil.c
+C_FILES += freebsd/netinet/tcp_debug.c
+C_FILES += freebsd/netinet/tcp_input.c
+C_FILES += freebsd/netinet/tcp_lro.c
+C_FILES += freebsd/netinet/tcp_offload.c
+C_FILES += freebsd/netinet/tcp_output.c
+C_FILES += freebsd/netinet/tcp_reass.c
+C_FILES += freebsd/netinet/tcp_sack.c
+C_FILES += freebsd/netinet/tcp_subr.c
+C_FILES += freebsd/netinet/tcp_syncache.c
+C_FILES += freebsd/netinet/tcp_timer.c
+C_FILES += freebsd/netinet/tcp_timewait.c
+C_FILES += freebsd/netinet/tcp_usrreq.c
+C_FILES += freebsd/netinet/udp_usrreq.c
+C_FILES += freebsd/netinet/ipfw/dn_sched_fifo.c
+C_FILES += freebsd/netinet/ipfw/dn_sched_rr.c
+C_FILES += freebsd/netinet/ipfw/ip_fw_log.c
+C_FILES += freebsd/netinet/ipfw/dn_sched_qfq.c
+C_FILES += freebsd/netinet/ipfw/dn_sched_prio.c
+C_FILES += freebsd/netinet/ipfw/ip_dn_glue.c
+C_FILES += freebsd/netinet/ipfw/ip_fw2.c
+C_FILES += freebsd/netinet/ipfw/dn_heap.c
+C_FILES += freebsd/netinet/ipfw/ip_dummynet.c
+C_FILES += freebsd/netinet/ipfw/ip_fw_sockopt.c
+C_FILES += freebsd/netinet/ipfw/dn_sched_wf2q.c
+C_FILES += freebsd/netinet/ipfw/ip_fw_nat.c
+C_FILES += freebsd/netinet/ipfw/ip_fw_pfil.c
+C_FILES += freebsd/netinet/ipfw/ip_dn_io.c
+C_FILES += freebsd/netinet/ipfw/ip_fw_table.c
+C_FILES += freebsd/netinet/libalias/alias_dummy.c
+C_FILES += freebsd/netinet/libalias/alias_pptp.c
+C_FILES += freebsd/netinet/libalias/alias_smedia.c
+C_FILES += freebsd/netinet/libalias/alias_mod.c
+C_FILES += freebsd/netinet/libalias/alias_cuseeme.c
+C_FILES += freebsd/netinet/libalias/alias_nbt.c
+C_FILES += freebsd/netinet/libalias/alias_irc.c
+C_FILES += freebsd/netinet/libalias/alias_util.c
+C_FILES += freebsd/netinet/libalias/alias_db.c
+C_FILES += freebsd/netinet/libalias/alias_ftp.c
+C_FILES += freebsd/netinet/libalias/alias_proxy.c
+C_FILES += freebsd/netinet/libalias/alias.c
+C_FILES += freebsd/netinet/libalias/alias_skinny.c
+C_FILES += freebsd/netinet/libalias/alias_sctp.c
+C_FILES += freebsd/netinet6/dest6.c
+C_FILES += freebsd/netinet6/frag6.c
+C_FILES += freebsd/netinet6/icmp6.c
+C_FILES += freebsd/netinet6/in6.c
+C_FILES += freebsd/netinet6/in6_cksum.c
+C_FILES += freebsd/netinet6/in6_gif.c
+C_FILES += freebsd/netinet6/in6_ifattach.c
+C_FILES += freebsd/netinet6/in6_mcast.c
+C_FILES += freebsd/netinet6/in6_pcb.c
+C_FILES += freebsd/netinet6/in6_proto.c
+C_FILES += freebsd/netinet6/in6_rmx.c
+C_FILES += freebsd/netinet6/in6_src.c
+C_FILES += freebsd/netinet6/ip6_forward.c
+C_FILES += freebsd/netinet6/ip6_id.c
+C_FILES += freebsd/netinet6/ip6_input.c
+C_FILES += freebsd/netinet6/ip6_ipsec.c
+C_FILES += freebsd/netinet6/ip6_mroute.c
+C_FILES += freebsd/netinet6/ip6_output.c
+C_FILES += freebsd/netinet6/mld6.c
+C_FILES += freebsd/netinet6/nd6.c
+C_FILES += freebsd/netinet6/nd6_nbr.c
+C_FILES += freebsd/netinet6/nd6_rtr.c
+C_FILES += freebsd/netinet6/raw_ip6.c
+C_FILES += freebsd/netinet6/route6.c
+C_FILES += freebsd/netinet6/scope6.c
+C_FILES += freebsd/netinet6/sctp6_usrreq.c
+C_FILES += freebsd/netinet6/udp6_usrreq.c
+C_FILES += freebsd/netipsec/ipsec.c
+C_FILES += freebsd/netipsec/ipsec_input.c
+C_FILES += freebsd/netipsec/ipsec_mbuf.c
+C_FILES += freebsd/netipsec/ipsec_output.c
+C_FILES += freebsd/netipsec/key.c
+C_FILES += freebsd/netipsec/key_debug.c
+C_FILES += freebsd/netipsec/keysock.c
+C_FILES += freebsd/netipsec/xform_ah.c
+C_FILES += freebsd/netipsec/xform_esp.c
+C_FILES += freebsd/netipsec/xform_ipcomp.c
+C_FILES += freebsd/netipsec/xform_ipip.c
+C_FILES += freebsd/netipsec/xform_tcp.c
+C_FILES += freebsd/net80211/ieee80211_acl.c
+C_FILES += freebsd/net80211/ieee80211_action.c
+C_FILES += freebsd/net80211/ieee80211_adhoc.c
+C_FILES += freebsd/net80211/ieee80211_ageq.c
+C_FILES += freebsd/net80211/ieee80211_amrr.c
+C_FILES += freebsd/net80211/ieee80211.c
+C_FILES += freebsd/net80211/ieee80211_crypto.c
+C_FILES += freebsd/net80211/ieee80211_crypto_ccmp.c
+C_FILES += freebsd/net80211/ieee80211_crypto_none.c
+C_FILES += freebsd/net80211/ieee80211_crypto_tkip.c
+C_FILES += freebsd/net80211/ieee80211_crypto_wep.c
+C_FILES += freebsd/net80211/ieee80211_ddb.c
+C_FILES += freebsd/net80211/ieee80211_dfs.c
+C_FILES += freebsd/net80211/ieee80211_freebsd.c
+C_FILES += freebsd/net80211/ieee80211_hostap.c
+C_FILES += freebsd/net80211/ieee80211_ht.c
+C_FILES += freebsd/net80211/ieee80211_hwmp.c
+C_FILES += freebsd/net80211/ieee80211_input.c
+C_FILES += freebsd/net80211/ieee80211_ioctl.c
+C_FILES += freebsd/net80211/ieee80211_mesh.c
+C_FILES += freebsd/net80211/ieee80211_monitor.c
+C_FILES += freebsd/net80211/ieee80211_node.c
+C_FILES += freebsd/net80211/ieee80211_output.c
+C_FILES += freebsd/net80211/ieee80211_phy.c
+C_FILES += freebsd/net80211/ieee80211_power.c
+C_FILES += freebsd/net80211/ieee80211_proto.c
+C_FILES += freebsd/net80211/ieee80211_radiotap.c
+C_FILES += freebsd/net80211/ieee80211_ratectl.c
+C_FILES += freebsd/net80211/ieee80211_ratectl_none.c
+C_FILES += freebsd/net80211/ieee80211_regdomain.c
+C_FILES += freebsd/net80211/ieee80211_rssadapt.c
+C_FILES += freebsd/net80211/ieee80211_scan.c
+C_FILES += freebsd/net80211/ieee80211_scan_sta.c
+C_FILES += freebsd/net80211/ieee80211_sta.c
+C_FILES += freebsd/net80211/ieee80211_superg.c
+C_FILES += freebsd/net80211/ieee80211_tdma.c
+C_FILES += freebsd/net80211/ieee80211_wds.c
+C_FILES += freebsd/net80211/ieee80211_xauth.c
+C_FILES += freebsd/opencrypto/crypto.c
+C_FILES += freebsd/opencrypto/deflate.c
+C_FILES += freebsd/opencrypto/cryptosoft.c
+C_FILES += freebsd/opencrypto/criov.c
+C_FILES += freebsd/opencrypto/rmd160.c
+C_FILES += freebsd/opencrypto/xform.c
+C_FILES += freebsd/opencrypto/skipjack.c
+C_FILES += freebsd/opencrypto/cast.c
+C_FILES += freebsd/opencrypto/cryptodev.c
+C_FILES += freebsd/crypto/sha1.c
+C_FILES += freebsd/crypto/sha2/sha2.c
+C_FILES += freebsd/crypto/rijndael/rijndael-alg-fst.c
+C_FILES += freebsd/crypto/rijndael/rijndael-api.c
+C_FILES += freebsd/crypto/rijndael/rijndael-api-fst.c
+C_FILES += freebsd/crypto/des/des_setkey.c
+C_FILES += freebsd/crypto/des/des_enc.c
+C_FILES += freebsd/crypto/des/des_ecb.c
+C_FILES += freebsd/crypto/blowfish/bf_enc.c
+C_FILES += freebsd/crypto/blowfish/bf_skey.c
+C_FILES += freebsd/crypto/blowfish/bf_ecb.c
+C_FILES += freebsd/crypto/rc4/rc4.c
+C_FILES += freebsd/crypto/camellia/camellia-api.c
+C_FILES += freebsd/crypto/camellia/camellia.c
+C_FILES += contrib/altq/freebsd/altq/altq_rmclass.c
+C_FILES += contrib/altq/freebsd/altq/altq_rio.c
+C_FILES += contrib/altq/freebsd/altq/altq_subr.c
+C_FILES += contrib/altq/freebsd/altq/altq_cdnr.c
+C_FILES += contrib/altq/freebsd/altq/altq_priq.c
+C_FILES += contrib/altq/freebsd/altq/altq_cbq.c
+C_FILES += contrib/altq/freebsd/altq/altq_hfsc.c
+C_FILES += contrib/altq/freebsd/altq/altq_red.c
+C_FILES += contrib/pf/freebsd/netinet/in4_cksum.c
+C_FILES += contrib/pf/freebsd/net/pf.c
+C_FILES += contrib/pf/freebsd/net/if_pflog.c
+C_FILES += contrib/pf/freebsd/net/pf_subr.c
+C_FILES += contrib/pf/freebsd/net/pf_ioctl.c
+C_FILES += contrib/pf/freebsd/net/pf_table.c
+C_FILES += contrib/pf/freebsd/net/pf_if.c
+C_FILES += contrib/pf/freebsd/net/pf_osfp.c
+C_FILES += contrib/pf/freebsd/net/pf_norm.c
+C_FILES += contrib/pf/freebsd/net/pf_ruleset.c
+C_FILES += contrib/pf/freebsd/net/if_pfsync.c
+C_FILES += freebsd/dev/mii/mii.c
+C_FILES += freebsd/dev/mii/mii_physubr.c
+C_FILES += freebsd/dev/mii/icsphy.c
+C_FILES += freebsd/dev/mii/brgphy.c
+C_FILES += freebsd/local/usb_if.c
+C_FILES += freebsd/local/bus_if.c
+C_FILES += freebsd/local/device_if.c
+C_FILES += freebsd/local/cryptodev_if.c
+C_FILES += freebsd/local/miibus_if.c
+C_FILES += freebsd/kern/init_main.c
+C_FILES += freebsd/kern/kern_mib.c
+C_FILES += freebsd/kern/kern_mbuf.c
+C_FILES += freebsd/kern/kern_module.c
+C_FILES += freebsd/kern/kern_sysctl.c
+C_FILES += freebsd/kern/subr_bus.c
+C_FILES += freebsd/kern/subr_kobj.c
+C_FILES += freebsd/kern/uipc_mbuf.c
+C_FILES += freebsd/kern/uipc_mbuf2.c
+C_FILES += freebsd/kern/uipc_socket.c
+C_FILES += freebsd/kern/uipc_sockbuf.c
+C_FILES += freebsd/kern/uipc_domain.c
+C_FILES += freebsd/dev/usb/usb_busdma.c
+C_FILES += freebsd/dev/usb/usb_core.c
+C_FILES += freebsd/dev/usb/usb_debug.c
+C_FILES += freebsd/dev/usb/usb_dev.c
+C_FILES += freebsd/dev/usb/usb_device.c
+C_FILES += freebsd/dev/usb/usb_dynamic.c
+C_FILES += freebsd/dev/usb/usb_error.c
+C_FILES += freebsd/dev/usb/usb_generic.c
+C_FILES += freebsd/dev/usb/usb_handle_request.c
+C_FILES += freebsd/dev/usb/usb_hid.c
+C_FILES += freebsd/dev/usb/usb_hub.c
+C_FILES += freebsd/dev/usb/usb_lookup.c
+C_FILES += freebsd/dev/usb/usb_mbuf.c
+C_FILES += freebsd/dev/usb/usb_msctest.c
+C_FILES += freebsd/dev/usb/usb_parse.c
+C_FILES += freebsd/dev/usb/usb_process.c
+C_FILES += freebsd/dev/usb/usb_request.c
+C_FILES += freebsd/dev/usb/usb_transfer.c
+C_FILES += freebsd/dev/usb/usb_util.c
+C_FILES += freebsd/dev/usb/quirk/usb_quirk.c
+C_FILES += freebsd/dev/usb/controller/ohci.c
+C_FILES += freebsd/dev/usb/controller/ehci.c
+C_FILES += freebsd/dev/usb/controller/usb_controller.c
+C_FILES += freebsd/cam/cam.c
+C_FILES += freebsd/cam/scsi/scsi_all.c
+C_FILES += freebsd/dev/usb/storage/umass.c
+C_FILES += freebsd/kern/subr_hints.c
+C_FILES += freebsd/dev/random/harvest.c
+C_FILES += freebsd/libkern/random.c
+C_FILES += freebsd/libkern/arc4random.c
+C_FILES += freebsd/kern/subr_pcpu.c
+C_FILES += freebsd/kern/subr_sbuf.c
+C_FILES += freebsd/kern/subr_rman.c
+C_FILES += freebsd/libkern/inet_ntoa.c
+C_FILES += freebsd/kern/kern_prot.c
+C_FILES += freebsd/kern/kern_time.c
+C_FILES += freebsd/kern/kern_event.c
+C_FILES += freebsd/netinet/tcp_hostcache.c
+C_FILES += freebsd/dev/pci/pci.c
+C_FILES += freebsd/kern/uipc_accf.c
+C_FILES += freebsd/kern/kern_ntptime.c
+C_FILES += freebsd/dev/re/if_re.c
+C_FILES += freebsd/dev/fxp/if_fxp.c
+C_FILES += freebsd/dev/e1000/e1000_80003es2lan.c
+C_FILES += freebsd/dev/e1000/e1000_82542.c
+C_FILES += freebsd/dev/e1000/e1000_82575.c
+C_FILES += freebsd/dev/e1000/e1000_mac.c
+C_FILES += freebsd/dev/e1000/e1000_nvm.c
+C_FILES += freebsd/dev/e1000/e1000_vf.c
+C_FILES += freebsd/dev/e1000/if_lem.c
+C_FILES += freebsd/dev/e1000/e1000_82540.c
+C_FILES += freebsd/dev/e1000/e1000_82543.c
+C_FILES += freebsd/dev/e1000/e1000_api.c
+C_FILES += freebsd/dev/e1000/e1000_manage.c
+C_FILES += freebsd/dev/e1000/e1000_osdep.c
+C_FILES += freebsd/dev/e1000/if_em.c
+C_FILES += freebsd/dev/e1000/e1000_82541.c
+C_FILES += freebsd/dev/e1000/e1000_82571.c
+C_FILES += freebsd/dev/e1000/e1000_ich8lan.c
+C_FILES += freebsd/dev/e1000/e1000_mbx.c
+C_FILES += freebsd/dev/e1000/e1000_phy.c
+C_FILES += freebsd/dev/e1000/if_igb.c
+C_FILES += freebsd/dev/dc/dcphy.c
+C_FILES += freebsd/dev/dc/if_dc.c
+C_FILES += freebsd/dev/dc/pnphy.c
+C_FILES += freebsd/dev/smc/if_smc.c
+C_FILES += freebsd/dev/bce/if_bce.c
+C_FILES += freebsd/dev/bfe/if_bfe.c
+C_FILES += freebsd/dev/bge/if_bge.c
+ifeq ($(RTEMS_CPU), arm)
+C_FILES += freebsd/arm/arm/in_cksum_arm.S
+C_FILES += freebsd/arm/arm/in_cksum.c
endif
-ifeq ($(RTEMS_CPU),i386)
-C_FILES += \
- freebsd/i386/i386/in_cksum.c
+ifeq ($(RTEMS_CPU), i386)
+C_FILES += freebsd/i386/i386/in_cksum.c
endif
-ifeq ($(RTEMS_CPU),mips)
-C_FILES += \
- freebsd/mips/mips/in_cksum.c
+ifeq ($(RTEMS_CPU), mips)
+C_FILES += freebsd/mips/mips/in_cksum.c
endif
-ifeq ($(RTEMS_CPU),powerpc)
-C_FILES += \
- freebsd/powerpc/powerpc/in_cksum.c
+ifeq ($(RTEMS_CPU), powerpc)
+C_FILES += freebsd/powerpc/powerpc/in_cksum.c
endif
-ifeq ($(RTEMS_CPU),sparc64)
-C_FILES += \
- freebsd/sparc64/sparc64/in_cksum.c
+ifeq ($(RTEMS_CPU), sparc64)
+C_FILES += freebsd/sparc64/sparc64/in_cksum.c
endif
C_O_FILES = $(C_FILES:%.c=%.o)
diff --git a/freebsd-to-rtems.py b/freebsd-to-rtems.py
index fdd679b..9539368 100755
--- a/freebsd-to-rtems.py
+++ b/freebsd-to-rtems.py
@@ -1,6 +1,6 @@
#! /usr/bin/python
#
-# Copyright (c) 2009-2011 embedded brains GmbH. All rights reserved.
+# Copyright (c) 2009-2012 embedded brains GmbH. All rights reserved.
#
# embedded brains GmbH
# Obere Lagerstr. 30
@@ -165,10 +165,9 @@ def mapCPUDependentPath(path):
# compare and process file only if different
# + copy or diff depending on execution mode
-def processIfDifferent(new, old, desc, src):
+def processIfDifferent(new, old, src):
global filesProcessed
global isVerbose, isDryRun, isEarlyExit
- # print new + " " + old + " X" + desc + "X " + src
if not os.path.exists(old) or \
filecmp.cmp(new, old, shallow=False) == False:
filesProcessed += 1
@@ -185,20 +184,6 @@ def processIfDifferent(new, old, desc, src):
old_contents, new_contents, fromfile=src, tofile=new, n=5):
sys.stdout.write(line)
-# generate an empty file as a place holder
-def installEmptyFile(src):
- global tempFile
- dst = RTEMS_DIR + '/' + PREFIX + '/' + src.replace('rtems/', '')
- try:
- if isDryRun == False:
- os.makedirs(os.path.dirname(dst))
- except OSError:
- pass
- out = open(tempFile, 'w')
- out.write('/* EMPTY */\n')
- out.close()
- processIfDifferent(tempFile, dst, "empty file ", "empty file" )
-
# fix include paths inside a C or .h file
def fixIncludes(data):
data = re.sub('#([ \t]*)include <', '#\\1include <' + PREFIX + '/', data)
@@ -215,89 +200,104 @@ def revertFixIncludes(data):
data = re.sub('#([ \t]*)include <' + PREFIX + '/', '#\\1include <', data)
return data
-# Copy a header file from FreeBSD to the RTEMS BSD tree
-def installHeaderFile(org, target):
- global tempFile
- src = FreeBSD_DIR + '/' + org
- dst = RTEMS_DIR + '/' + PREFIX + '/' + org
- dst = mapContribPath(dst)
- if target != "generic":
- dst = mapCPUDependentPath(dst)
- try:
- if isDryRun == False:
- os.makedirs(os.path.dirname(dst))
- except OSError:
- pass
- data = open(src).read()
- out = open(tempFile, 'w')
- if org.find('rtems') == -1:
- data = fixIncludes(data)
- out.write(data)
- out.close()
- processIfDifferent(tempFile, dst, "Header ", src)
+class Converter(object):
+ def convert(self, src):
+ return open(src).read()
+ def isConvertible(self):
+ return True
-# Copy a source file from FreeBSD to the RTEMS BSD tree
-def installSourceFile(org):
- global tempFile
- src = FreeBSD_DIR + '/' + org
- dst = RTEMS_DIR + '/' + PREFIX + '/' + org
- dst = mapContribPath(dst)
- try:
- if isDryRun == False:
- os.makedirs(os.path.dirname(dst))
- except OSError:
- pass
- data = open(src).read()
- out = open(tempFile, 'w')
- if org.find('rtems') == -1:
+class NoConverter(object):
+ def convert(self, src):
+ raise
+
+ def isConvertible(self):
+ return False
+
+class EmptyConverter(Converter):
+ def convert(self, src):
+ return '/* EMPTY */\n'
+
+class FromFreeBSDToRTEMSHeaderConverter(Converter):
+ def convert(self, src):
+ data = super(FromFreeBSDToRTEMSHeaderConverter, self).convert(src)
+ return fixIncludes(data)
+
+class FromRTEMSToFreeBSDHeaderConverter(Converter):
+ def convert(self, src):
+ data = super(FromRTEMSToFreeBSDHeaderConverter, self).convert(src)
+ return revertFixIncludes(data)
+
+class FromFreeBSDToRTEMSSourceConverter(Converter):
+ def convert(self, src):
+ data = super(FromFreeBSDToRTEMSSourceConverter, self).convert(src)
data = fixIncludes(data)
- out.write('#include <' + PREFIX + '/machine/rtems-bsd-config.h>\n\n')
- out.write(data)
- out.close()
- processIfDifferent(tempFile, dst, "Source ", src)
-
-# Revert a header file from the RTEMS BSD tree to the FreeBSD tree
-def revertHeaderFile(org, target):
- global tempFile
- src = RTEMS_DIR + '/' + PREFIX + '/' + org.replace('rtems/', '')
- src = mapContribPath(src)
- if target != "generic":
- src = mapCPUDependentPath(src)
- dst = FreeBSD_DIR + '/' + org
- try:
- if isDryRun == False:
- os.makedirs(os.path.dirname(dst))
- except OSError:
- pass
- data = open(src).read()
- out = open(tempFile, 'w')
- if org.find('rtems') == -1:
- data = revertFixIncludes(data)
- out.write(data)
- out.close()
- processIfDifferent(tempFile, dst, "Header ", src)
-
-# Revert a source file from the RTEMS BSD tree to the FreeBSD tree
-def revertSourceFile(org, target):
- src = RTEMS_DIR + '/' + PREFIX + '/' + org
- src = mapContribPath(src)
- dst = FreeBSD_DIR + '/' + org
- if target != "generic":
- src = mapCPUDependentPath(src)
- try:
- if isDryRun == False:
- os.makedirs(os.path.dirname(dst))
- except OSError:
- pass
- data = open(src).read()
- out = open(tempFile, 'w')
- if org.find('rtems') == -1:
+ data = '#include <' + PREFIX + '/machine/rtems-bsd-config.h>\n\n' + data
+ return data
+
+class FromRTEMSToFreeBSDSourceConverter(Converter):
+ def convert(self, src):
+ data = super(FromRTEMSToFreeBSDSourceConverter, self).convert(src)
data = re.sub('#include <' + PREFIX + '/machine/rtems-bsd-config.h>\n\n', '', data)
data = revertFixIncludes(data)
- out.write(data)
- out.close()
- processIfDifferent(tempFile, dst, "Source ", src)
+ return data
+
+class PathComposer(object):
+ def composeFreeBSDPath(self, path):
+ return FreeBSD_DIR + '/' + path
+
+ def composeRTEMSPath(self, path, prefix):
+ path = prefix + PREFIX + '/' + path
+ path = mapContribPath(path)
+ return path
+
+class RTEMSPathComposer(object):
+ def composeFreeBSDPath(self, path):
+ return path
+
+ def composeRTEMSPath(self, path, prefix):
+ path = prefix + 'rtemsbsd/' + path
+ return path
+
+class CPUDependentPathComposer(PathComposer):
+ def composeRTEMSPath(self, path, prefix):
+ path = super(CPUDependentPathComposer, self).composeRTEMSPath(path, prefix)
+ path = mapCPUDependentPath(path)
+ return path
+
+class File(object):
+ def __init__(self, path, pathComposer, fromFreeBSDToRTEMSConverter, fromRTEMSToFreeBSDConverter):
+ self.path = path
+ self.pathComposer = pathComposer
+ self.fromFreeBSDToRTEMSConverter = fromFreeBSDToRTEMSConverter
+ self.fromRTEMSToFreeBSDConverter = fromRTEMSToFreeBSDConverter
+
+ def copy(self, dst, src, converter):
+ if converter.isConvertible():
+ global tempFile
+ try:
+ if isDryRun == False:
+ os.makedirs(os.path.dirname(dst))
+ except OSError:
+ pass
+ data = converter.convert(src)
+ out = open(tempFile, 'w')
+ out.write(data)
+ out.close()
+ processIfDifferent(tempFile, dst, src)
+
+ def copyFromFreeBSDToRTEMS(self):
+ src = self.pathComposer.composeFreeBSDPath(self.path)
+ dst = self.pathComposer.composeRTEMSPath(self.path, RTEMS_DIR + '/')
+ self.copy(dst, src, self.fromFreeBSDToRTEMSConverter)
+
+ def copyFromRTEMSToFreeBSD(self):
+ src = self.pathComposer.composeRTEMSPath(self.path, RTEMS_DIR + '/')
+ dst = self.pathComposer.composeFreeBSDPath(self.path)
+ self.copy(dst, src, self.fromRTEMSToFreeBSDConverter)
+
+ def getMakefileFragment(self):
+ return self.pathComposer.composeRTEMSPath(self.path, '')
# Remove the output directory
def deleteOutputDirectory():
@@ -317,29 +317,17 @@ def deleteOutputDirectory():
class ModuleManager:
def __init__(self):
self.modules = []
- self.emptyFiles = []
def addModule(self, module):
self.modules.append(module)
- def addEmptyFiles(self, emptyFiles):
- self.emptyFiles.extend(emptyFiles)
-
- def copyFiles(self):
- for f in self.emptyFiles:
- installEmptyFile(f)
+ def copyFromFreeBSDToRTEMS(self):
for m in self.modules:
- for f in m.headerFiles:
- installHeaderFile(f, m.target)
- for f in m.sourceFiles:
- installSourceFile(f)
+ m.copyFromFreeBSDToRTEMS()
- def revertFiles(self):
+ def copyFromRTEMSToFreeBSD(self):
for m in self.modules:
- for f in m.headerFiles:
- revertHeaderFile(f, m.target)
- for f in m.sourceFiles:
- revertSourceFile(f, m.target)
+ m.copyFromRTEMSToFreeBSD()
def createMakefile(self):
global tempFile
@@ -352,6 +340,7 @@ class ModuleManager:
'CFLAGS += -ffreestanding \n' \
'CFLAGS += -I . \n' \
'CFLAGS += -I rtemsbsd \n' \
+ 'CFLAGS += -I rtemsbsd/$(RTEMS_CPU)/include \n' \
'CFLAGS += -I freebsd/$(RTEMS_CPU)/include \n' \
'CFLAGS += -I contrib/altq \n' \
'CFLAGS += -I contrib/pf \n' \
@@ -359,32 +348,15 @@ class ModuleManager:
'CFLAGS += -w \n' \
'CFLAGS += -std=gnu99\n' \
'\n'
- data += 'C_FILES ='
- for m in self.modules:
- if m.target == "generic":
- for f in m.sourceFiles:
- f = PREFIX + '/' + f
- f = mapContribPath(f)
- data += ' \\\n\t' + f
- data += '\n'
- data += '# RTEMS Project Owned Files\n'
- data += 'C_FILES +='
- for f in rtems_sourceFiles:
- data += ' \\\n\trtemsbsd/' + f
- data += '\n'
- data += '\n'
+ data += 'C_FILES =\n'
for m in self.modules:
- if m.target != "generic":
- data += "ifeq ($(RTEMS_CPU)," + m.target + ")\n"
- data += "C_FILES +="
- for f in m.sourceFiles:
- f = PREFIX + '/' + f
- f = mapContribPath(f)
- data += ' \\\n\t' + f
- data += '\n'
+ for file in m.sourceFiles:
+ data += 'C_FILES += ' + file.getMakefileFragment() + '\n'
+ for cpu, files in sorted(m.cpuDependentSourceFiles.items()):
+ data += 'ifeq ($(RTEMS_CPU), ' + cpu + ')\n'
+ for file in files:
+ data += 'C_FILES += ' + file.getMakefileFragment() + '\n'
data += 'endif\n'
-
-
data += '\n' \
'C_O_FILES = $(C_FILES:%.c=%.o)\n' \
'C_DEP_FILES = $(C_FILES:%.c=%.dep)\n' \
@@ -400,12 +372,12 @@ class ModuleManager:
'\t$(MAKE) $(LIB)\n' \
'\n' \
'install: $(LIB)\n' \
- '\tinstall -d $(INSTALL_BASE)/include\n' \
- '\tinstall -c -m 644 $(LIB) $(INSTALL_BASE)\n' \
- '\tcd rtemsbsd; for i in `find . -name \'*.h\'` ; do \\\n' \
- '\t install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done\n' \
- '\tfor i in `find contrib freebsd -name \'*.h\'` ; do \\\n' \
- '\t install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done\n' \
+ '\tinstall -d $(INSTALL_BASE)/include\n' \
+ '\tinstall -c -m 644 $(LIB) $(INSTALL_BASE)\n' \
+ '\tcd rtemsbsd; for i in `find . -name \'*.h\'` ; do \\\n' \
+ '\t install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done\n' \
+ '\tfor i in `find contrib freebsd -name \'*.h\'` ; do \\\n' \
+ '\t install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done\n' \
'\n' \
'clean:\n' \
'\trm -f -r $(PROJECT_INCLUDE)/rtems/freebsd\n' \
@@ -413,47 +385,85 @@ class ModuleManager:
'\trm -f libbsd.html\n' \
'\n' \
'-include $(C_DEP_FILES)\n' \
- '\n' \
- 'doc: libbsd.html\n' \
- '\n' \
- 'libbsd.html: libbsd.txt\n' \
- '\tasciidoc -o libbsd.html libbsd.txt\n'
+ '\n' \
+ 'doc: libbsd.html\n' \
+ '\n' \
+ 'libbsd.html: libbsd.txt\n' \
+ '\tasciidoc -o libbsd.html libbsd.txt\n'
out = open(tempFile, 'w')
out.write(data)
out.close()
makefile = RTEMS_DIR + '/Makefile'
- processIfDifferent(tempFile, makefile, "Makefile ", "Makefile")
+ processIfDifferent(tempFile, makefile, "Makefile")
+
+def assertHeaderFile(path):
+ if path[-2] != '.' or path[-1] != 'h':
+ print "*** " + path + " does not end in .h"
+ print "*** Move it to a C source file list"
+ sys.exit(2)
+
+def assertSourceFile(path):
+ if path[-2] != '.' or (path[-1] != 'c' and path[-1] != 'S'):
+ print "*** " + path + " does not end in .c"
+ print "*** Move it to a header file list"
+ sys.exit(2)
# Module - logical group of related files we can perform actions on
class Module:
def __init__(self, name):
self.name = name
- self.target = "generic"
self.headerFiles = []
self.sourceFiles = []
+ self.cpuDependentSourceFiles = {}
self.dependencies = []
- def setTarget(self, value):
- self.target = value
-
+ def copyFromFreeBSDToRTEMS(self):
+ for file in self.headerFiles:
+ file.copyFromFreeBSDToRTEMS()
+ for file in self.sourceFiles:
+ file.copyFromFreeBSDToRTEMS()
+ for cpu, files in self.cpuDependentSourceFiles.items():
+ for file in files:
+ file.copyFromFreeBSDToRTEMS()
+
+ def copyFromRTEMSToFreeBSD(self):
+ for file in self.headerFiles:
+ file.copyFromRTEMSToFreeBSD()
+ for file in self.sourceFiles:
+ file.copyFromRTEMSToFreeBSD()
+ for cpu, files in self.cpuDependentSourceFiles.items():
+ for file in files:
+ file.copyFromRTEMSToFreeBSD()
+
+ def addFiles(self, currentFiles, newFiles, pathComposer, fromFreeBSDToRTEMSConverter, fromRTEMSToFreeBSDConverter, assertFile):
+ for file in newFiles:
+ assertFile(file)
+ currentFiles.append(File(file, pathComposer, fromFreeBSDToRTEMSConverter, fromRTEMSToFreeBSDConverter))
+ return currentFiles
+
def addHeaderFiles(self, files):
- self.headerFiles.extend(files)
- for file in files:
- if file[-2] != '.' or file[-1] != 'h':
- print "*** " + file + " does not end in .h"
- print "*** Move it to a C source file list"
- sys.exit(2)
+ self.headerFiles = self.addFiles(self.headerFiles, files, PathComposer(), FromFreeBSDToRTEMSHeaderConverter(), FromRTEMSToFreeBSDHeaderConverter(), assertHeaderFile)
+
+ def addEmptyHeaderFiles(self, files):
+ self.headerFiles = self.addFiles(self.headerFiles, files, PathComposer(), EmptyConverter(), NoConverter(), assertHeaderFile)
+
+ def addRTEMSHeaderFiles(self, files):
+ self.headerFiles = self.addFiles(self.headerFiles, files, RTEMSPathComposer(), NoConverter(), NoConverter(), assertHeaderFile)
+
+ def addCPUDependentHeaderFiles(self, files):
+ self.headerFiles = self.addFiles(self.headerFiles, files, CPUDependentPathComposer(), FromFreeBSDToRTEMSHeaderConverter(), FromRTEMSToFreeBSDHeaderConverter(), assertHeaderFile)
def addSourceFiles(self, files):
- self.sourceFiles.extend(files)
- for file in files:
- if file[-2] != '.' or \
- (file[-1] != 'c' and file[-1] != 'S'):
- print "*** " + file + " does not end in .c"
- print "*** Move it to a header file list"
- sys.exit(2)
+ self.sourceFiles = self.addFiles(self.sourceFiles, files, PathComposer(), FromFreeBSDToRTEMSSourceConverter(), FromRTEMSToFreeBSDSourceConverter(), assertSourceFile)
+
+ def addRTEMSSourceFiles(self, files):
+ self.sourceFiles = self.addFiles(self.sourceFiles, files, RTEMSPathComposer(), NoConverter(), NoConverter(), assertSourceFile)
+ def addCPUDependentSourceFiles(self, cpu, files):
+ if not self.cpuDependentSourceFiles.has_key(cpu):
+ self.cpuDependentSourceFiles [cpu] = []
+ self.cpuDependentSourceFiles [cpu] = self.addFiles(self.cpuDependentSourceFiles [cpu], files, CPUDependentPathComposer(), FromFreeBSDToRTEMSSourceConverter(), FromRTEMSToFreeBSDSourceConverter(), assertSourceFile)
def addDependency(self, dep):
self.dependencies.append(dep)
@@ -462,85 +472,139 @@ class Module:
# - initialize each module with set of files associated
mm = ModuleManager()
-rtems_headerFiles = [
- 'rtems/machine/atomic.h',
- 'rtems/machine/_bus.h',
- 'rtems/machine/bus.h',
- 'rtems/machine/bus_dma.h',
- 'rtems/machine/rtems-bsd-config.h',
- 'rtems/machine/clock.h',
- 'rtems/machine/cpufunc.h',
- 'rtems/machine/endian.h',
- 'rtems/machine/_limits.h',
- 'rtems/machine/_align.h',
- 'rtems/machine/mutex.h',
- 'rtems/machine/param.h',
- 'rtems/machine/pcpu.h',
- 'rtems/machine/pmap.h',
- 'rtems/machine/proc.h',
- 'rtems/machine/resource.h',
- 'rtems/machine/runq.h',
- 'rtems/machine/signal.h',
- 'rtems/machine/stdarg.h',
- 'rtems/machine/_stdint.h',
- 'rtems/machine/_types.h',
- 'rtems/machine/ucontext.h',
- 'rtems/machine/rtems-bsd-symbols.h',
- 'rtems/machine/rtems-bsd-cache.h',
- 'rtems/machine/rtems-bsd-sysinit.h',
- 'rtems/machine/rtems-bsd-select.h',
- 'rtems/machine/rtems-bsd-taskqueue.h',
- 'bsd.h',
- ]
-rtems_sourceFiles = [
- 'dev/usb/controller/ohci_lpc24xx.c',
- 'dev/usb/controller/ohci_lpc32xx.c',
- 'dev/usb/controller/ehci_mpc83xx.c',
- 'src/rtems-bsd-cam.c',
- 'src/rtems-bsd-nexus.c',
- 'src/rtems-bsd-autoconf.c',
- 'src/rtems-bsd-delay.c',
- 'src/rtems-bsd-mutex.c',
- 'src/rtems-bsd-thread.c',
- 'src/rtems-bsd-condvar.c',
- 'src/rtems-bsd-lock.c',
- 'src/rtems-bsd-log.c',
- 'src/rtems-bsd-sx.c',
- 'src/rtems-bsd-rwlock.c',
- 'src/rtems-bsd-generic.c',
- 'src/rtems-bsd-panic.c',
- 'src/rtems-bsd-synch.c',
- 'src/rtems-bsd-signal.c',
- 'src/rtems-bsd-callout.c',
- 'src/rtems-bsd-init.c',
- 'src/rtems-bsd-init-with-irq.c',
- 'src/rtems-bsd-assert.c',
- 'src/rtems-bsd-prot.c',
- 'src/rtems-bsd-resource.c',
- 'src/rtems-bsd-jail.c',
- 'src/rtems-bsd-shell.c',
- 'src/rtems-bsd-syscalls.c',
- 'src/rtems-bsd-smp.c',
- #'src/rtems-bsd-socket.c',
- #'src/rtems-bsd-mbuf.c',
- 'src/rtems-bsd-malloc.c',
- 'src/rtems-bsd-support.c',
- 'src/rtems-bsd-bus-dma.c',
- 'src/rtems-bsd-sysctl.c',
- 'src/rtems-bsd-sysctlbyname.c',
- 'src/rtems-bsd-sysctlnametomib.c',
- 'src/rtems-bsd-uma.c',
- 'src/rtems-bsd-taskqueue.c',
- 'src/rtems-bsd-timesupport.c',
- 'src/rtems-bsd-timeout.c',
- 'src/rtems-bsd-newproc.c',
- 'src/rtems-bsd-vm_glue.c',
- 'src/rtems-bsd-cyclecount.c',
- ]
-# RTEMS files handled separately from modules
-# rtems = Module('rtems')
-# rtems.addHeaderFiles( rtems_headerFiles )
-# rtems.addSourceFiles( rtems_sourceFiles )
+rtems = Module('rtems')
+rtems.addRTEMSHeaderFiles(
+ [
+ 'rtems/machine/atomic.h',
+ 'rtems/machine/_bus.h',
+ 'rtems/machine/bus.h',
+ 'rtems/machine/bus_dma.h',
+ 'rtems/machine/rtems-bsd-config.h',
+ 'rtems/machine/clock.h',
+ 'rtems/machine/cpufunc.h',
+ 'rtems/machine/endian.h',
+ 'rtems/machine/_limits.h',
+ 'rtems/machine/_align.h',
+ 'rtems/machine/mutex.h',
+ 'rtems/machine/param.h',
+ 'rtems/machine/pcpu.h',
+ 'rtems/machine/pmap.h',
+ 'rtems/machine/proc.h',
+ 'rtems/machine/resource.h',
+ 'rtems/machine/runq.h',
+ 'rtems/machine/signal.h',
+ 'rtems/machine/stdarg.h',
+ 'rtems/machine/_stdint.h',
+ 'rtems/machine/_types.h',
+ 'rtems/machine/ucontext.h',
+ 'rtems/machine/rtems-bsd-symbols.h',
+ 'rtems/machine/rtems-bsd-cache.h',
+ 'rtems/machine/rtems-bsd-sysinit.h',
+ 'rtems/machine/rtems-bsd-select.h',
+ 'rtems/machine/rtems-bsd-taskqueue.h',
+ 'bsd.h',
+ ]
+)
+rtems.addRTEMSSourceFiles(
+ [
+ 'dev/usb/controller/ohci_lpc24xx.c',
+ 'dev/usb/controller/ohci_lpc32xx.c',
+ 'dev/usb/controller/ehci_mpc83xx.c',
+ 'src/rtems-bsd-cam.c',
+ 'src/rtems-bsd-nexus.c',
+ 'src/rtems-bsd-autoconf.c',
+ 'src/rtems-bsd-delay.c',
+ 'src/rtems-bsd-mutex.c',
+ 'src/rtems-bsd-thread.c',
+ 'src/rtems-bsd-condvar.c',
+ 'src/rtems-bsd-lock.c',
+ 'src/rtems-bsd-log.c',
+ 'src/rtems-bsd-sx.c',
+ 'src/rtems-bsd-rwlock.c',
+ 'src/rtems-bsd-generic.c',
+ 'src/rtems-bsd-panic.c',
+ 'src/rtems-bsd-synch.c',
+ 'src/rtems-bsd-signal.c',
+ 'src/rtems-bsd-callout.c',
+ 'src/rtems-bsd-init.c',
+ 'src/rtems-bsd-init-with-irq.c',
+ 'src/rtems-bsd-assert.c',
+ 'src/rtems-bsd-prot.c',
+ 'src/rtems-bsd-resource.c',
+ 'src/rtems-bsd-jail.c',
+ 'src/rtems-bsd-shell.c',
+ 'src/rtems-bsd-syscalls.c',
+ 'src/rtems-bsd-smp.c',
+ #'src/rtems-bsd-socket.c',
+ #'src/rtems-bsd-mbuf.c',
+ 'src/rtems-bsd-malloc.c',
+ 'src/rtems-bsd-support.c',
+ 'src/rtems-bsd-bus-dma.c',
+ 'src/rtems-bsd-sysctl.c',
+ 'src/rtems-bsd-sysctlbyname.c',
+ 'src/rtems-bsd-sysctlnametomib.c',
+ 'src/rtems-bsd-uma.c',
+ 'src/rtems-bsd-taskqueue.c',
+ 'src/rtems-bsd-timesupport.c',
+ 'src/rtems-bsd-newproc.c',
+ 'src/rtems-bsd-vm_glue.c',
+ ]
+)
+rtems.addEmptyHeaderFiles(
+ [
+ 'cam/cam_queue.h',
+ 'ddb/db_sym.h',
+ 'ddb/ddb.h',
+ 'machine/cpu.h',
+ 'machine/elf.h',
+ 'machine/sf_buf.h',
+ 'machine/smp.h',
+ 'machine/vm.h',
+ #'machine/vmparam.h',
+ 'local/opt_bce.h',
+ 'local/opt_ntp.h',
+ 'local/pci_if.h',
+ 'security/audit/audit.h',
+ 'sys/bio.h',
+ 'sys/copyright.h',
+ 'sys/cpuset.h',
+ 'sys/exec.h',
+ 'sys/fail.h',
+ 'sys/limits.h',
+ 'sys/namei.h',
+ 'sys/_pthreadtypes.h',
+ #'sys/resourcevar.h',
+ 'sys/sched.h',
+ 'sys/select.h',
+ 'sys/syscallsubr.h',
+ 'sys/sysent.h',
+ 'sys/syslimits.h',
+ 'sys/sysproto.h',
+ 'sys/stat.h',
+ #'sys/time.h',
+ 'time.h',
+ 'sys/timespec.h',
+ 'sys/_timeval.h',
+ #'sys/vmmeter.h',
+ #'sys/vnode.h',
+ 'vm/pmap.h',
+ #'vm/uma_int.h',
+ #'vm/uma_dbg.h',
+ #'vm/vm_extern.h',
+ #'vm/vm_map.h',
+ #'vm/vm_object.h',
+ #'vm/vm_page.h',
+ #'vm/vm_param.h',
+ #'vm/vm_kern.h',
+ 'geom/geom_disk.h',
+ #'sys/kdb.h',
+ #'libkern/jenkins.h',
+ 'machine/pcb.h',
+ #'net80211/ieee80211_freebsd.h',
+ 'netgraph/ng_ipfw.h',
+ #'sys/sf_buf.h',
+ ]
+)
local = Module('local')
# RTEMS has its own local/pmap.h
@@ -569,7 +633,7 @@ local.addHeaderFiles(
'local/opt_cam.h',
'local/opt_carp.h',
'local/opt_compat.h',
- 'local/opt_config.h',
+ 'local/opt_config.h',
'local/opt_cpu.h',
'local/opt_ddb.h',
'local/opt_device_polling.h',
@@ -595,8 +659,8 @@ local.addHeaderFiles(
'local/opt_natm.h',
'local/opt_netgraph.h',
'local/opt_param.h',
- 'local/opt_posix.h',
- 'local/opt_pf.h',
+ 'local/opt_posix.h',
+ 'local/opt_pf.h',
'local/opt_printf.h',
'local/opt_route.h',
'local/opt_scsi.h',
@@ -606,7 +670,7 @@ local.addHeaderFiles(
'local/opt_usb.h',
'local/opt_vlan.h',
'local/opt_wlan.h',
- 'local/opt_zero.h',
+ 'local/opt_zero.h',
'local/usbdevs_data.h',
'local/usbdevs.h',
'local/usb_if.h',
@@ -1896,135 +1960,51 @@ pf.addSourceFiles(
]
)
-# ARM Architecture Specific Files Module
-armDependent = Module('armDependent')
-armDependent.setTarget("arm")
-armDependent.addHeaderFiles(
+# in_chksum Module
+in_cksum = Module('in_cksum')
+in_cksum.addCPUDependentHeaderFiles(
[
'arm/include/in_cksum.h',
+ 'i386/include/in_cksum.h',
+ 'mips/include/in_cksum.h',
+ 'powerpc/include/in_cksum.h',
+ 'sparc64/include/in_cksum.h',
]
)
-armDependent.addSourceFiles(
+in_cksum.addCPUDependentSourceFiles(
+ 'arm',
[
- 'arm/arm/in_cksum.c',
'arm/arm/in_cksum_arm.S',
+ 'arm/arm/in_cksum.c',
]
)
-
-# i386 Architecture Specific Files Module
-i386Dependent = Module('i386Dependent')
-i386Dependent.setTarget("i386")
-i386Dependent.addHeaderFiles(
- [
- 'i386/include/in_cksum.h',
- ]
-)
-i386Dependent.addSourceFiles(
+in_cksum.addCPUDependentSourceFiles(
+ 'i386',
[
'i386/i386/in_cksum.c',
]
)
-
-# MIPS Architecture Specific Files Module
-mipsDependent = Module('mipsDependent')
-mipsDependent.setTarget("mips")
-mipsDependent.addHeaderFiles(
- [
- 'mips/include/in_cksum.h',
- ]
-)
-mipsDependent.addSourceFiles(
+in_cksum.addCPUDependentSourceFiles(
+ 'mips',
[
'mips/mips/in_cksum.c',
]
)
-
-# PowerPC Architecture Specific Files Module
-powerpcDependent = Module('powerpcDependent')
-powerpcDependent.setTarget("powerpc")
-powerpcDependent.addHeaderFiles(
- [
- 'powerpc/include/in_cksum.h',
- ]
-)
-powerpcDependent.addSourceFiles(
+in_cksum.addCPUDependentSourceFiles(
+ 'powerpc',
[
'powerpc/powerpc/in_cksum.c',
]
)
-
-# SPARC64 Architecture Specific Files Module
-sparc64Dependent = Module('cpu_dependent')
-sparc64Dependent.setTarget("sparc64")
-sparc64Dependent.addHeaderFiles(
- [
- 'sparc64/include/in_cksum.h',
- ]
-)
-sparc64Dependent.addSourceFiles(
+in_cksum.addCPUDependentSourceFiles(
+ 'sparc64',
[
'sparc64/sparc64/in_cksum.c',
]
)
-# Add Empty Files
-mm.addEmptyFiles(
- [
- 'cam/cam_queue.h',
- 'ddb/db_sym.h',
- 'ddb/ddb.h',
- 'machine/cpu.h',
- 'machine/elf.h',
- 'machine/sf_buf.h',
- 'machine/smp.h',
- 'machine/vm.h',
- #'machine/vmparam.h',
- 'local/opt_bce.h',
- 'local/opt_ntp.h',
- 'local/pci_if.h',
- 'security/audit/audit.h',
- 'sys/bio.h',
- 'sys/copyright.h',
- 'sys/cpuset.h',
- 'sys/exec.h',
- 'sys/fail.h',
- 'sys/limits.h',
- 'sys/namei.h',
- 'sys/_pthreadtypes.h',
- #'sys/resourcevar.h',
- 'sys/sched.h',
- 'sys/select.h',
- 'sys/syscallsubr.h',
- 'sys/sysent.h',
- 'sys/syslimits.h',
- 'sys/sysproto.h',
- 'sys/stat.h',
- #'sys/time.h',
- 'time.h',
- 'sys/timespec.h',
- 'sys/_timeval.h',
- #'sys/vmmeter.h',
- #'sys/vnode.h',
- 'vm/pmap.h',
- #'vm/uma_int.h',
- #'vm/uma_dbg.h',
- #'vm/vm_extern.h',
- #'vm/vm_map.h',
- #'vm/vm_object.h',
- #'vm/vm_page.h',
- #'vm/vm_param.h',
- #'vm/vm_kern.h',
- 'geom/geom_disk.h',
- #'sys/kdb.h',
- #'libkern/jenkins.h',
- 'machine/pcb.h',
- #'net80211/ieee80211_freebsd.h',
- 'netgraph/ng_ipfw.h',
- #'sys/sf_buf.h',
- ]
-)
-
# Register all the Module instances with the Module Manager
+mm.addModule(rtems)
mm.addModule(netDeps)
mm.addModule(net)
mm.addModule(netinet)
@@ -2061,12 +2041,8 @@ mm.addModule(devNic_broadcomm)
# TBD Requires ISA and PCCard Support to be pulled in.
# mm.addModule(devNic_cs)
-# Now add CPU Architecture Dependent Modules
-mm.addModule(armDependent)
-mm.addModule(i386Dependent)
-mm.addModule(mipsDependent)
-mm.addModule(powerpcDependent)
-mm.addModule(sparc64Dependent)
+# Add in_chksum
+mm.addModule(in_cksum)
# XXX TODO Check that no file is also listed in empty
# XXX TODO Check that no file in in two modules
@@ -2074,10 +2050,10 @@ mm.addModule(sparc64Dependent)
# Perform the actual file manipulation
if isForward == True:
if isOnlyMakefile == False:
- mm.copyFiles()
+ mm.copyFromFreeBSDToRTEMS()
mm.createMakefile()
else:
- mm.revertFiles()
+ mm.copyFromRTEMSToFreeBSD()
# Print a summary if changing files
if isDiffMode == False:
More information about the vc
mailing list