├── .gitignore ├── LICENCE.TXT ├── Makefile ├── NOTICE.TXT ├── README ├── build.sh ├── docs ├── AR9271.pdf ├── AR9280.pdf ├── atheros_ar7010.png ├── atheros_ar7010.svg ├── atheros_ar9271.png ├── atheros_ar9271.svg ├── firmware_commands.md ├── memory_management.md ├── packet_injection.md ├── receive_path.md ├── transmit_path.md └── uart ├── local └── patches │ ├── binutils-elf32-xtensa-sec_cache.patch │ ├── binutils.patch │ └── gcc.patch ├── sboot ├── include │ ├── xtensa-elf │ │ └── xtensa │ │ │ ├── config │ │ │ └── core.h │ │ │ ├── corebits.h │ │ │ ├── hal.h │ │ │ └── xtruntime.h │ └── xtensa │ │ └── config │ │ ├── core-isa.h │ │ ├── core-matmap.h │ │ ├── specreg.h │ │ └── tie.h ├── k2_1_0 │ ├── image │ │ └── k2_ram │ │ │ ├── Makefile │ │ │ ├── builds_fusion_vista.ram │ │ │ ├── rom.addrs.ld │ │ │ ├── target.ram.ld │ │ │ └── target.ram_debug.ld │ ├── lib │ │ └── ram │ │ │ └── dummy.txt │ └── ram │ │ ├── adf │ │ ├── Makefile │ │ └── Makefile.ss │ │ ├── buf_pool │ │ ├── Makefile │ │ └── Makefile.ss │ │ ├── carrier_apd │ │ ├── Makefile │ │ └── Makefile.ss │ │ ├── cmnos │ │ ├── Makefile │ │ └── Makefile.ss │ │ ├── hif │ │ ├── Makefile │ │ └── Makefile.ss │ │ ├── htc │ │ ├── Makefile │ │ └── Makefile.ss │ │ ├── init │ │ ├── Makefile │ │ └── Makefile.ss │ │ ├── wlan │ │ ├── Makefile │ │ └── Makefile.ss │ │ └── wmi │ │ ├── Makefile │ │ └── Makefile.ss ├── magpie_1_1 │ ├── image │ │ ├── magpie_ram │ │ │ ├── Makefile │ │ │ ├── merlin_fusion.ram │ │ │ ├── target.ram.ld │ │ │ └── target_gmac.ram.ld │ │ └── output │ │ │ ├── asic │ │ │ ├── rom.asic.addrs.ld │ │ │ ├── rom.asic.bin │ │ │ ├── rom.asic.hex │ │ │ ├── rom.asic.map │ │ │ ├── rom.asic.objdump │ │ │ └── rom.asic.out │ │ │ └── fpga │ │ │ ├── rom.fpga.addrs.ld │ │ │ ├── rom.fpga.bin │ │ │ ├── rom.fpga.hex │ │ │ ├── rom.fpga.map │ │ │ ├── rom.fpga.objdump │ │ │ └── rom.fpga.out │ ├── inc │ │ ├── Magpie_api.h │ │ ├── adf_nbuf_pvt.h │ │ ├── allocram_api.h │ │ ├── athos_api.h │ │ ├── buf_pool_api.h │ │ ├── clock_api.h │ │ ├── cmnos_api.h │ │ ├── dma_engine_api.h │ │ ├── dma_lib.h │ │ ├── eeprom_api.h │ │ ├── hif_api.h │ │ ├── hif_gmac.h │ │ ├── hif_pci.h │ │ ├── hif_usb.h │ │ ├── htc_api.h │ │ ├── intr_api.h │ │ ├── magpie │ │ │ ├── reg_defs.h │ │ │ └── rom_cfg.h │ │ ├── magpie_mem.h │ │ ├── magpie_regdump.h │ │ ├── mem_api.h │ │ ├── misc_api.h │ │ ├── opt_ah.h │ │ ├── printf_api.h │ │ ├── regdump.h │ │ ├── romp_api.h │ │ ├── string_api.h │ │ ├── sys_cfg.h │ │ ├── tasklet_api.h │ │ ├── timer_api.h │ │ ├── uart_api.h │ │ ├── usb_api.h │ │ ├── usb_extr.h │ │ ├── usb_pre.h │ │ ├── usb_std.h │ │ ├── usb_table.h │ │ ├── usb_type.h │ │ ├── usbfifo_api.h │ │ ├── vbuf_api.h │ │ ├── vdesc_api.h │ │ └── wdt_api.h │ ├── lib │ │ ├── ram │ │ │ └── dummy.txt │ │ ├── rom │ │ │ └── dummy.txt │ │ └── sboot │ │ │ └── dummy.txt │ ├── ram │ │ ├── adf │ │ │ ├── Makefile │ │ │ └── Makefile.ss │ │ ├── carrier_apd │ │ │ ├── Makefile │ │ │ └── Makefile.ss │ │ ├── cmnos │ │ │ ├── Makefile │ │ │ └── Makefile.ss │ │ ├── init │ │ │ ├── Makefile │ │ │ └── Makefile.ss │ │ ├── rompatch │ │ │ ├── Makefile │ │ │ └── Makefile.ss │ │ ├── wlan │ │ │ ├── Makefile │ │ │ └── Makefile.ss │ │ └── wmi │ │ │ ├── Makefile │ │ │ └── Makefile.ss │ └── sboot │ │ ├── adf │ │ ├── Makefile │ │ └── nbuf │ │ │ ├── Makefile │ │ │ ├── Makefile.ss │ │ │ └── inc │ │ │ └── adf_nbuf_pvt.h │ │ ├── athos │ │ ├── Makefile │ │ ├── Makefile.ss │ │ └── src │ │ │ ├── _vectors.o │ │ │ ├── athos_main.c │ │ │ ├── crt1-tiny.o │ │ │ ├── libhandlers-board.a │ │ │ └── xtos │ │ │ ├── Makefile │ │ │ ├── Makefile.src │ │ │ ├── _sharedvectors-for-reset.S │ │ │ ├── _sharedvectors.S │ │ │ ├── _vectors.S │ │ │ ├── checkvecsize │ │ │ ├── crt0-app.S │ │ │ ├── crt1-boards.S │ │ │ ├── crt1-sim.S │ │ │ ├── crt1-tiny.S │ │ │ ├── debug-vector.S │ │ │ ├── deprecated.S │ │ │ ├── double-vector.S │ │ │ ├── exc-alloca-handler.S │ │ │ ├── exc-c-wrapper-handler.S │ │ │ ├── exc-return.S │ │ │ ├── exc-sethandler.c │ │ │ ├── exc-syscall-c-handler.c │ │ │ ├── exc-syscall-handler.S │ │ │ ├── exc-table.S │ │ │ ├── exc-unhandled.S │ │ │ ├── exit.S │ │ │ ├── init.c │ │ │ ├── int-handler.S │ │ │ ├── int-highpri-dispatcher.S │ │ │ ├── int-highpri-template.S │ │ │ ├── int-initlevel.S │ │ │ ├── int-lowpri-dispatcher.S │ │ │ ├── int-medpri-dispatcher.S │ │ │ ├── int-sethandler.c │ │ │ ├── int-vector.S │ │ │ ├── interrupt-pri.h │ │ │ ├── interrupt-table.S │ │ │ ├── intlevel-restore.S │ │ │ ├── intlevel-set.S │ │ │ ├── intlevel-setmin.S │ │ │ ├── ints-off.S │ │ │ ├── ints-on.S │ │ │ ├── kernel-vector.S │ │ │ ├── memep-enable.S │ │ │ ├── memep-initrams.S │ │ │ ├── memerror-vector.S │ │ │ ├── nmi-vector.S │ │ │ ├── null-alloca.S │ │ │ ├── null-syscall.S │ │ │ ├── null-vectors.S │ │ │ ├── reloc-vectors.S │ │ │ ├── reset-unneeded.S │ │ │ ├── reset-vector.S │ │ │ ├── shared-reset-vector.S │ │ │ ├── switch_context.S │ │ │ ├── textaddr │ │ │ ├── tiny-refs-min.S │ │ │ ├── tiny-refs.S │ │ │ ├── user-vector-min.S │ │ │ ├── user-vector.S │ │ │ ├── window-vectors.S │ │ │ ├── xtos-internal.h │ │ │ └── xtos-params.h │ │ ├── buf_pool │ │ ├── Makefile │ │ ├── Makefile.ss │ │ ├── inc │ │ │ └── buf_pool_api.h │ │ └── src │ │ │ ├── buf_pool_static.c │ │ │ └── buf_pool_static.h │ │ ├── cmnos │ │ ├── Makefile │ │ ├── allocram │ │ │ ├── Makefile │ │ │ ├── Makefile.ss │ │ │ ├── inc │ │ │ │ └── allocram_api.h │ │ │ └── src │ │ │ │ └── cmnos_allocram.c │ │ ├── clock │ │ │ ├── Makefile │ │ │ ├── Makefile.ss │ │ │ ├── inc │ │ │ │ └── clock_api.h │ │ │ └── src │ │ │ │ └── cmnos_clock.c │ │ ├── eeprom │ │ │ ├── Makefile │ │ │ ├── Makefile.ss │ │ │ ├── inc │ │ │ │ └── eeprom_api.h │ │ │ └── src │ │ │ │ └── cmnos_eeprom.c │ │ ├── inc │ │ │ └── cmnos_api.h │ │ ├── intr │ │ │ ├── Makefile │ │ │ ├── Makefile.ss │ │ │ ├── inc │ │ │ │ └── intr_api.h │ │ │ └── src │ │ │ │ └── cmnos_intr.c │ │ ├── mem │ │ │ ├── Makefile │ │ │ ├── Makefile.ss │ │ │ ├── inc │ │ │ │ └── mem_api.h │ │ │ └── src │ │ │ │ └── cmnos_mem.c │ │ ├── misc │ │ │ ├── Makefile │ │ │ ├── Makefile.ss │ │ │ ├── inc │ │ │ │ └── misc_api.h │ │ │ └── src │ │ │ │ └── cmnos_misc.c │ │ ├── printf │ │ │ ├── Makefile │ │ │ ├── Makefile.ss │ │ │ ├── inc │ │ │ │ └── printf_api.h │ │ │ └── src │ │ │ │ └── cmnos_printf.c │ │ ├── rompatch │ │ │ ├── Makefile │ │ │ ├── Makefile.ss │ │ │ ├── inc │ │ │ │ └── romp_api.h │ │ │ └── src │ │ │ │ └── cmnos_rompatch.c │ │ ├── sflash │ │ │ ├── Makefile │ │ │ ├── Makefile.ss │ │ │ ├── inc │ │ │ │ └── sflash_api.h │ │ │ └── src │ │ │ │ └── cmnos_sflash.c │ │ ├── string │ │ │ ├── Makefile │ │ │ ├── Makefile.ss │ │ │ ├── inc │ │ │ │ └── string_api.h │ │ │ └── src │ │ │ │ └── cmnos_string.c │ │ ├── tasklet │ │ │ ├── Makefile │ │ │ ├── Makefile.ss │ │ │ ├── inc │ │ │ │ └── tasklet_api.h │ │ │ └── src │ │ │ │ └── cmnos_tasklet.c │ │ ├── timer │ │ │ ├── Makefile │ │ │ ├── Makefile.ss │ │ │ ├── inc │ │ │ │ └── timer_api.h │ │ │ └── src │ │ │ │ └── cmnos_timer.c │ │ ├── uart │ │ │ ├── Makefile │ │ │ ├── Makefile.ss │ │ │ ├── inc │ │ │ │ └── uart_api.h │ │ │ └── src │ │ │ │ └── uart_api.c │ │ └── wdt │ │ │ ├── Makefile │ │ │ ├── Makefile.ss │ │ │ ├── inc │ │ │ └── wdt_api.h │ │ │ └── src │ │ │ └── cmnos_wdt.c │ │ ├── dma_engine │ │ ├── Makefile │ │ ├── Makefile.ss │ │ ├── inc │ │ │ └── dma_engine_api.h │ │ └── src │ │ │ ├── desc.c │ │ │ ├── desc.h │ │ │ └── dma_engine.c │ │ ├── fwd │ │ ├── Makefile │ │ ├── Makefile.ss │ │ ├── fwd.c │ │ └── fwd.h │ │ ├── hif │ │ ├── Makefile │ │ ├── dma_lib │ │ │ ├── Makefile │ │ │ ├── Makefile.ss │ │ │ └── dma_lib.c │ │ ├── gmac │ │ │ ├── Makefile │ │ │ ├── Makefile.ss │ │ │ └── hif_gmac.c │ │ ├── inc │ │ │ ├── dma_lib.h │ │ │ ├── hif_api.h │ │ │ ├── hif_gmac.h │ │ │ ├── hif_pci.h │ │ │ ├── hif_usb.h │ │ │ ├── usb_api.h │ │ │ └── usbfifo_api.h │ │ ├── pci │ │ │ ├── Makefile │ │ │ ├── Makefile.ss │ │ │ └── hif_pci.c │ │ └── usb │ │ │ ├── Makefile │ │ │ ├── Makefile.ss │ │ │ └── src │ │ │ ├── HIF_usb.c │ │ │ ├── usb_api.c │ │ │ ├── usb_defs.h │ │ │ ├── usb_extr.h │ │ │ ├── usb_fifo.c │ │ │ ├── usb_pre.h │ │ │ ├── usb_std.h │ │ │ ├── usb_table.c │ │ │ ├── usb_table.h │ │ │ └── usb_type.h │ │ ├── htc │ │ ├── Makefile │ │ ├── Makefile.ss │ │ ├── inc │ │ │ └── htc_api.h │ │ └── src │ │ │ ├── htc.c │ │ │ └── htc_internal.h │ │ ├── inc │ │ ├── Magpie_api.h │ │ ├── athos_api.h │ │ ├── magpie │ │ │ ├── reg_defs.h │ │ │ └── rom_cfg.h │ │ ├── magpie_mem.h │ │ ├── magpie_regdump.h │ │ ├── opt_ah.h │ │ ├── regdump.h │ │ └── sys_cfg.h │ │ ├── vbuf │ │ ├── Makefile │ │ ├── Makefile.ss │ │ ├── inc │ │ │ └── vbuf_api.h │ │ └── src │ │ │ ├── vbuf.c │ │ │ └── vbuf.h │ │ └── vdesc │ │ ├── Makefile │ │ ├── Makefile.ss │ │ ├── inc │ │ └── vdesc_api.h │ │ └── src │ │ ├── vdesc.c │ │ └── vdesc.h ├── make_opt │ ├── Makefile.h │ ├── Rules.make │ ├── RulesCPP.make │ └── lib │ │ ├── _vectors.o │ │ ├── crt1-tiny.o │ │ └── libhandlers-board.a └── utility │ ├── Makefile │ ├── adjust_dep │ ├── Makefile │ └── adj_dep.c │ ├── adjust_time │ ├── Makefile │ └── adj_time.c │ ├── athfw2lnx │ ├── Makefile │ └── athfw2lnx.c │ ├── bin2hex.pl │ ├── bin2hex │ ├── Makefile │ ├── bin2hex.c │ └── bin2hex_swp.c │ ├── imghdr │ ├── Makefile │ └── imghdr.c │ ├── patch_gen │ ├── Makefile │ ├── dt_defs.h │ ├── main.c │ ├── patch.c │ └── patch.h │ └── sh │ ├── make_fw.sh │ └── make_ld.sh ├── scripts ├── checkpatch.pl └── pre-commit.sh └── target_firmware ├── .gitignore ├── CMakeLists.txt ├── Makefile ├── configure ├── firmware-crc.pl ├── install.sh ├── magpie_fw_dev └── target │ ├── adf │ ├── adf_nbuf.c │ ├── adf_nbuf_pvt.h │ ├── adf_net.c │ ├── adf_net_pvt.h │ ├── adf_os_atomic_pvt.h │ ├── adf_os_defer_pvt.c │ ├── adf_os_defer_pvt.h │ ├── adf_os_dma.c │ ├── adf_os_dma_pvt.h │ ├── adf_os_io_pvt.h │ ├── adf_os_irq_pvt.c │ ├── adf_os_irq_pvt.h │ ├── adf_os_lock_pvt.h │ ├── adf_os_mem_pvt.h │ ├── adf_os_module_pvt.h │ ├── adf_os_pci_pvt.h │ ├── adf_os_time_pvt.h │ ├── adf_os_timer.c │ ├── adf_os_timer_pvt.h │ ├── adf_os_types_pvt.h │ └── adf_os_util_pvt.h │ ├── buf_pool │ ├── buf_pool_api.h │ ├── buf_pool_dynamic.c │ ├── buf_pool_static.c │ └── buf_pool_static.h │ ├── cmnos │ ├── clock_api.h │ ├── cmnos_api.h │ ├── cmnos_clock.c │ ├── cmnos_printf.c │ ├── cmnos_sflash.c │ ├── dbg_api.c │ ├── dbg_api.h │ ├── k2_cmnos_clock_patch.c │ ├── k2_fw_cmnos_printf.c │ ├── printf_api.h │ └── sflash_api.h │ ├── hif │ ├── k2_HIF_usb_patch.c │ ├── usb_api_k2_patch.c │ ├── usb_api_magpie_patch.c │ └── usb_api_main_patch.c │ ├── htc │ ├── htc.c │ ├── htc_api.h │ ├── htc_internal.h │ └── htc_tgt.c │ ├── inc │ ├── OTUS │ │ ├── OTUS_htc.h │ │ ├── OTUS_misc.h │ │ └── OTUS_soc.h │ ├── adf_nbuf.h │ ├── adf_net.h │ ├── adf_net_sw.h │ ├── adf_net_types.h │ ├── adf_net_wcmd.h │ ├── adf_os_atomic.h │ ├── adf_os_bitops.h │ ├── adf_os_crypto.h │ ├── adf_os_defer.h │ ├── adf_os_dma.h │ ├── adf_os_io.h │ ├── adf_os_irq.h │ ├── adf_os_lock.h │ ├── adf_os_mem.h │ ├── adf_os_module.h │ ├── adf_os_pci.h │ ├── adf_os_pseudo.h │ ├── adf_os_stdtypes.h │ ├── adf_os_time.h │ ├── adf_os_timer.h │ ├── adf_os_types.h │ ├── adf_os_util.h │ ├── asf_bitmap.h │ ├── asf_queue.h │ ├── asf_sm.h │ ├── dt_defs.h │ ├── k2 │ │ ├── Magpie_api.h │ │ ├── allocram_api.h │ │ ├── athos_api.h │ │ ├── clock_api.h │ │ ├── cmnos_api.h │ │ ├── dma_engine_api.h │ │ ├── dma_lib.h │ │ ├── eeprom_api.h │ │ ├── hif_api.h │ │ ├── hif_gmac.h │ │ ├── hif_pci.h │ │ ├── hif_usb.h │ │ ├── intr_api.h │ │ ├── k2 │ │ │ ├── reg_defs.h │ │ │ └── rom_cfg.h │ │ ├── k2_mem.h │ │ ├── magpie_mem.h │ │ ├── magpie_regdump.h │ │ ├── mem_api.h │ │ ├── misc_api.h │ │ ├── opt_ah.h │ │ ├── printf_api.h │ │ ├── regdump.h │ │ ├── romp_api.h │ │ ├── string_api.h │ │ ├── sys_cfg.h │ │ ├── tasklet_api.h │ │ ├── timer_api.h │ │ ├── uart_api.h │ │ ├── usb_table.h │ │ ├── vbuf_api.h │ │ ├── vdesc_api.h │ │ └── wdt_api.h │ ├── linux │ │ └── compiler.h │ ├── magpie │ │ ├── Magpie_api.h │ │ ├── adf_nbuf_pvt.h │ │ ├── allocram_api.h │ │ ├── athos_api.h │ │ ├── buf_pool_api.h │ │ ├── clock_api.h │ │ ├── cmnos_api.h │ │ ├── dma_engine_api.h │ │ ├── dma_lib.h │ │ ├── eeprom_api.h │ │ ├── hif_api.h │ │ ├── hif_gmac.h │ │ ├── hif_pci.h │ │ ├── hif_usb.h │ │ ├── htc_api.h │ │ ├── intr_api.h │ │ ├── magpie │ │ │ ├── reg_defs.h │ │ │ └── rom_cfg.h │ │ ├── magpie_mem.h │ │ ├── magpie_regdump.h │ │ ├── mem_api.h │ │ ├── misc_api.h │ │ ├── opt_ah.h │ │ ├── printf_api.h │ │ ├── regdump.h │ │ ├── romp_api.h │ │ ├── string_api.h │ │ ├── sys_cfg.h │ │ ├── tasklet_api.h │ │ ├── timer_api.h │ │ ├── uart_api.h │ │ ├── usb_table.h │ │ ├── vbuf_api.h │ │ ├── vdesc_api.h │ │ └── wdt_api.h │ ├── osapi.h │ ├── usb_api.h │ ├── usb_defs.h │ ├── usb_extr.h │ ├── usb_pre.h │ ├── usb_std.h │ ├── usb_type.h │ ├── usbfifo_api.h │ ├── xtensa-elf │ │ └── xtensa │ │ │ ├── config │ │ │ └── core.h │ │ │ ├── corebits.h │ │ │ ├── hal.h │ │ │ └── xtruntime.h │ └── xtensa │ │ └── config │ │ ├── core-isa.h │ │ ├── core-matmap.h │ │ ├── specreg.h │ │ └── tie.h │ ├── init │ ├── app_start.c │ ├── init.c │ ├── init.h │ └── magpie.c │ ├── rompatch │ ├── HIF_usb_patch.c │ └── cmnos_clock_patch.c │ ├── wlan │ ├── wlan_pci.c │ └── wlan_pci.h │ └── wmi │ ├── wmi_internal.h │ ├── wmi_svc.c │ └── wmi_svc_api.h ├── ram-k2.ld ├── ram-magpie.ld ├── rom-addrs-k2.ld ├── rom-addrs-magpie.ld └── wlan ├── _ieee80211.h ├── ah.c ├── ah.h ├── ah_desc.h ├── ah_internal.h ├── ah_osdep.c ├── ah_osdep.h ├── ar5416.h ├── ar5416Phy.c ├── ar5416_hw.c ├── ar5416_phy.c ├── ar5416desc.h ├── ar5416reg.h ├── attacks.c ├── attacks.h ├── debug.c ├── debug.h ├── ieee80211.h ├── ieee80211_linux.h ├── ieee80211_node.h ├── ieee80211_output.c ├── ieee80211_proto.h ├── ieee80211_var.h ├── if_ath.c ├── if_ath_pci.c ├── if_ath_pci.h ├── if_athrate.h ├── if_athvar.h ├── if_llc.h ├── if_owl.c ├── include ├── athdefs.h ├── htc.h ├── htc_services.h ├── k2 │ └── wlan_cfg.h ├── magpie │ └── wlan_cfg.h ├── wlan_hdr.h └── wmi.h ├── modwifi.h ├── ratectrl.h ├── ratectrl11n.h └── ratectrl_11n_ln.c /.gitignore: -------------------------------------------------------------------------------- 1 | /toolchain 2 | -------------------------------------------------------------------------------- /LICENCE.TXT: -------------------------------------------------------------------------------- 1 | Files with a Qualcomm Atheros / Atheros licence fall under the following 2 | licence. Please see NOTICES.TXT for information about other files in this 3 | repository. 4 | 5 | ---- 6 | 7 | Copyright (c) 2013 Qualcomm Atheros, Inc. 8 | 9 | All rights reserved. 10 | 11 | Redistribution and use in source and binary forms, with or without 12 | modification, are permitted (subject to the limitations in the 13 | disclaimer below) provided that the following conditions are met: 14 | 15 | * Redistributions of source code must retain the above copyright 16 | notice, this list of conditions and the following disclaimer. 17 | 18 | * Redistributions in binary form must reproduce the above copyright 19 | notice, this list of conditions and the following disclaimer in the 20 | documentation and/or other materials provided with the 21 | distribution. 22 | 23 | * Neither the name of Qualcomm Atheros nor the names of its 24 | contributors may be used to endorse or promote products derived 25 | from this software without specific prior written permission. 26 | 27 | NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 28 | GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 29 | HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 30 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 31 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 32 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 33 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 34 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 35 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 36 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 37 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 38 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 39 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 40 | 41 | ---- 42 | -------------------------------------------------------------------------------- /NOTICE.TXT: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/NOTICE.TXT -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | make -C target_firmware 4 | tar -cf ../firmware.tar target_firmware/htc_*.fw 5 | if [ "$?" -eq 0 -a "$#" -le 0 ]; then 6 | 7 | echo "" 8 | read -r -p "Install firmware images? This requires root privileges. [y/N] " response 9 | case $response in 10 | [yY][eE][sS]|[yY]) 11 | sudo cp ./target_firmware/htc_7010.fw /lib/firmware/ath9k_htc/htc_7010-1.4.0.fw 12 | sudo cp ./target_firmware/htc_9271.fw /lib/firmware/ath9k_htc/htc_9271-1.4.0.fw 13 | ;; 14 | *) 15 | echo "Skipping installation..." 16 | ;; 17 | esac 18 | fi 19 | -------------------------------------------------------------------------------- /docs/AR9271.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/docs/AR9271.pdf -------------------------------------------------------------------------------- /docs/AR9280.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/docs/AR9280.pdf -------------------------------------------------------------------------------- /docs/atheros_ar7010.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/docs/atheros_ar7010.png -------------------------------------------------------------------------------- /docs/atheros_ar9271.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/docs/atheros_ar9271.png -------------------------------------------------------------------------------- /docs/firmware_commands.md: -------------------------------------------------------------------------------- 1 | ## Adding WMI commands 2 | 3 | The driver (your computer) can send commands to the firmware (the WiFi dongle). In general this is done using so called WMI commands. This document explains the files you need to edit in order to add your own commands. A command can send arbitrary data as a parameter, and the firmware can also include arbitrary data in its response. 4 | 5 | ### Firmware 6 | 7 | 1. First add a new enum entry to represent the command in `wlan/include/wmi.h`. 8 | 2. You will likely also want to add a structure representing the data your command will expect (i.e. the parameters of the command), and the data it will return (i.e. the return value sent by the firmware). This is also done in `wlan/include/wmi.h`. Postfix your structures with \_CMD and \_RESP. Remember to use PREPACK and POSTPACK. 9 | 2. Then program a handler for this case in `wlan/if_ath.c` in the Magpie_Sys_DispatchEntries array. Base your code on the other functions to know how to program these. 10 | 11 | ### Driver 12 | 13 | 1. In `wmi.h` add new enum entry for the command. Also add the \_CMD and \_RESP 14 | structure as done in the firmware. 15 | 2. Now add a debugfs entry in `htc_drv_debug.c` using `debugfs_create_file`, and 16 | by declaring the corresponding read/write operations. See other entires for examples. 17 | 18 | For convenience we let the user issue commands to the driver by writing or reading to debugfs. This is useful to manually issue commands from command line, but can still be used to programmatically read/write to them. Mount the debugfs file system using: 19 | 20 | mount -t debugfs none /sys/kernel/debug 21 | 22 | ### Notes 23 | 24 | In general, pay attention to correctly convert integers to and from network and host order. See other WMI functions for examples. 25 | -------------------------------------------------------------------------------- /docs/packet_injection.md: -------------------------------------------------------------------------------- 1 | # Preventing Modifications 2 | 3 | By default the driver/firmware may modify the content of injected packets. The following sections explain how we prevented this. 4 | 5 | ## Sequence Number Control 6 | 7 | From the datasheet we learn that bit 29 of the `MAC_PCU_STA_ADDR_U16` register must be set to 1. This bit is called `AR_STA_ID1_PRESERVE_SEQNUM`. And if it is set to 1, it "stops the PCU from replacing the sequence number". Hence the internal WiFi chip should not be replacing the sequence number. We haven't tested this in detail though, and to be sure this doesn't happen, we mark injected frames (that should use the sequence number as given by the user) as CF-Poll frames. 8 | 9 | It's actually the responsibility of firmware to automatically increment and assign sequence numbers. We patched the firmware to respect the `ATH_HTC_TX_ASSIGN_SEQ` flag. If it is *not* set, we assure the sequence number is not modified. We do remark that the driver/firmware make inconsistent use of these flags, and likely contains bugs [1]. 10 | 11 | # References 12 | 13 | [1] https://github.com/qca/open-ath9k-htc-firmware/issues/47 14 | 15 | -------------------------------------------------------------------------------- /docs/receive_path.md: -------------------------------------------------------------------------------- 1 | # Receive Path 2 | 3 | This document explains how packets are received and handled by the firmware. 4 | 5 | ## Initialization 6 | 7 | Before entering the infinite loop in `wlan_task`, certain things are initialized. Among these things are the receive descriptors. This is done in `ath_desc_alloc` (see memory management that they are indeed allocated here and put into a list). In total `ATH_RXDESC` descriptors will be allocated, and alongside `ATH_RXBUF` buffers. These two defines are equal to each other, and in our case equal to 11 (in a debug build there are apparently 30). 8 | 9 | The general type of a descriptor is `struct ath_rx_desc`. The device specific structure for us is `struct ar5416_desc_20` (for both the K2 and Magpie chips). Note that `ar5416_desc` is defined to be equal to `ar5416_desc_20`. In the firmware code only `struct ar5416_desc` is used. 10 | 11 | In the function `ath_rxdesc_init` we can see that the field `ds->ds_nbuf` is initialized to a new skb buffer. We then get the physical address of the start of the buffer memory, and assign this to `ds->data`. So `ds->data` contains the physical address of the actual data buffer (and hence also the virtual address). 12 | 13 | * `sc_rxdesc`: active descriptors that are going to be used. 14 | * `sc_rxdesc_idle`: those that have been processed after the interrupt, but are awaiting to be fully transmitted to the host. They are added **at the tail of** `sc_rxdesc` in `ath_rx_complete` (which is in turn called from `tgt_HTCSendCompleteHandler`). 15 | 16 | **TODO: Further documentation** 17 | 18 | -------------------------------------------------------------------------------- /docs/uart: -------------------------------------------------------------------------------- 1 | Name | TX pin | TX GPIO | RX pin | RX GPIO | Baudrate 2 | ---------+--------+---------+--------+---------+-------- 3 | AR9271 | 48 | GPIO9 | 49 | GPIO10 | 19200 4 | AR7010 | 54 | GPIO8 | 52 | GPIO9 | 115200 5 | -------------------------------------------------------------------------------- /local/patches/binutils-elf32-xtensa-sec_cache.patch: -------------------------------------------------------------------------------- 1 | --- a/bfd/elf32-xtensa.c 2012-06-29 17:46:01.000000000 +0300 2 | +++ b/bfd/elf32-xtensa.c 2013-05-08 19:16:39.436716824 +0300 3 | @@ -6075,7 +6075,7 @@ 4 | release_internal_relocs (sec_cache->sec, sec_cache->relocs); 5 | if (sec_cache->ptbl) 6 | free (sec_cache->ptbl); 7 | - memset (sec_cache, 0, sizeof (sec_cache)); 8 | + memset (sec_cache, 0, sizeof (*sec_cache)); 9 | } 10 | } 11 | 12 | @@ -6117,7 +6117,7 @@ 13 | 14 | /* Fill in the new section cache. */ 15 | clear_section_cache (sec_cache); 16 | - memset (sec_cache, 0, sizeof (sec_cache)); 17 | + memset (sec_cache, 0, sizeof (*sec_cache)); 18 | 19 | sec_cache->sec = sec; 20 | sec_cache->contents = contents; 21 | -------------------------------------------------------------------------------- /sboot/include/xtensa/config/specreg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Xtensa Special Register symbolic names 3 | */ 4 | 5 | /* $Id: //depot/rel/BadgerPass/Xtensa/SWConfig/hal/specreg.h.tpp#1 $ */ 6 | 7 | /* 8 | * Customer ID=4748; Build=0x2230f; Copyright (c) 1998-2002 by Tensilica Inc. ALL RIGHTS RESERVED. 9 | * These coded instructions, statements, and computer programs are the 10 | * copyrighted works and confidential proprietary information of Tensilica Inc. 11 | * They may not be modified, copied, reproduced, distributed, or disclosed to 12 | * third parties in any manner, medium, or form, in whole or in part, without 13 | * the prior written consent of Tensilica Inc. 14 | */ 15 | 16 | #ifndef XTENSA_SPECREG_H 17 | #define XTENSA_SPECREG_H 18 | 19 | /* Include these special register bitfield definitions, for historical reasons: */ 20 | #include 21 | 22 | 23 | /* Special registers: */ 24 | #define LBEG 0 25 | #define LEND 1 26 | #define LCOUNT 2 27 | #define SAR 3 28 | #define LITBASE 5 29 | #define SCOMPARE1 12 30 | #define WINDOWBASE 72 31 | #define WINDOWSTART 73 32 | #define IBREAKENABLE 96 33 | #define DDR 104 34 | #define IBREAKA_0 128 35 | #define IBREAKA_1 129 36 | #define DBREAKA_0 144 37 | #define DBREAKA_1 145 38 | #define DBREAKC_0 160 39 | #define DBREAKC_1 161 40 | #define EPC_1 177 41 | #define EPC_2 178 42 | #define EPC_3 179 43 | #define EPC_4 180 44 | #define EPC_5 181 45 | #define DEPC 192 46 | #define EPS_2 194 47 | #define EPS_3 195 48 | #define EPS_4 196 49 | #define EPS_5 197 50 | #define EXCSAVE_1 209 51 | #define EXCSAVE_2 210 52 | #define EXCSAVE_3 211 53 | #define EXCSAVE_4 212 54 | #define EXCSAVE_5 213 55 | #define INTERRUPT 226 56 | #define INTENABLE 228 57 | #define PS 230 58 | #define VECBASE 231 59 | #define EXCCAUSE 232 60 | #define DEBUGCAUSE 233 61 | #define CCOUNT 234 62 | #define PRID 235 63 | #define ICOUNT 236 64 | #define ICOUNTLEVEL 237 65 | #define EXCVADDR 238 66 | #define CCOMPARE_0 240 67 | #define MISC_REG_0 244 68 | #define MISC_REG_1 245 69 | 70 | /* Special cases (bases of special register series): */ 71 | #define IBREAKA 128 72 | #define DBREAKA 144 73 | #define DBREAKC 160 74 | #define EPC 176 75 | #define EPS 192 76 | #define EXCSAVE 208 77 | #define CCOMPARE 240 78 | 79 | /* Special names for read-only and write-only interrupt registers: */ 80 | #define INTREAD 226 81 | #define INTSET 226 82 | #define INTCLEAR 227 83 | 84 | #endif /* XTENSA_SPECREG_H */ 85 | -------------------------------------------------------------------------------- /sboot/include/xtensa/config/tie.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tie.h -- compile-time HAL definitions dependent on CORE & TIE configuration 3 | * 4 | * NOTE: This header file is not meant to be included directly. 5 | */ 6 | 7 | /* 8 | * This header file describes this specific Xtensa processor's TIE extensions 9 | * that extend basic Xtensa core functionality. It is customized to this 10 | * Xtensa processor configuration. 11 | * 12 | * Customer ID=4748; Build=0x2230f; Copyright (C) 1999-2008 by Tensilica Inc. ALL RIGHTS RESERVED. 13 | * These coded instructions, statements, and computer programs are the 14 | * copyrighted works and confidential proprietary information of Tensilica Inc. 15 | * They may not be modified, copied, reproduced, distributed, or disclosed to 16 | * third parties in any manner, medium, or form, in whole or in part, without 17 | * the prior written consent of Tensilica Inc. 18 | */ 19 | 20 | #ifndef _XTENSA_CORE_TIE_H 21 | #define _XTENSA_CORE_TIE_H 22 | 23 | #define XCHAL_CP_NUM 0 /* number of coprocessors */ 24 | #define XCHAL_CP_MAX 0 /* max CP ID + 1 (0 if none) */ 25 | #define XCHAL_CP_MASK 0x00 /* bitmask of all CPs by ID */ 26 | #define XCHAL_CP_PORT_MASK 0x00 /* bitmask of only port CPs */ 27 | 28 | /* Save area for non-coprocessor optional and custom (TIE) state: */ 29 | #define XCHAL_NCP_SA_SIZE 4 30 | #define XCHAL_NCP_SA_ALIGN 4 31 | 32 | /* Total save area for optional and custom state (NCP + CPn): */ 33 | #define XCHAL_TOTAL_SA_SIZE 16 /* with 16-byte align padding */ 34 | #define XCHAL_TOTAL_SA_ALIGN 4 /* actual minimum alignment */ 35 | 36 | /* 37 | * Detailed contents of save areas. 38 | * NOTE: caller must define the XCHAL_SA_{UREG,SREG,REGF} macros (they 39 | * are not defined here) before expanding the XCHAL_SA_xxx_LIST macros. 40 | * 41 | * XCHAL_SA_SREG(dbnum,offset,size,contentsz,align,name,sregnum,bitmask,x,x) 42 | * XCHAL_SA_UREG(dbnum,offset,size,contentsz,align,name,uregnum,bitmask,x,x) 43 | * XCHAL_SA_REGF(dbnum,offset,size,contentsz,align,name,index,span,x,x, 44 | * basename,regf_name,regf_numentries) 45 | */ 46 | 47 | #define XCHAL_SA_NCP_NUM 1 48 | #define XCHAL_SA_NCP_LIST \ 49 | XCHAL_SA_SREG(0x020C, 0, 4, 4, 4, scompare1, 12,0xFFFFFFFF,0,0) 50 | 51 | /* Byte length of instruction from its first nibble (op0 field), per FLIX. */ 52 | #define XCHAL_OP0_FORMAT_LENGTHS 3,3,3,3,3,3,3,3,2,2,2,2,2,2,3,3 53 | 54 | #endif /*_XTENSA_CORE_TIE_H*/ 55 | -------------------------------------------------------------------------------- /sboot/k2_1_0/image/k2_ram/builds_fusion_vista.ram: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | MAGPIE_ROOT=`pwd`/../../../../;export MAGPIE_ROOT 4 | PROJECT=k2; export PROJECT 5 | TARGET=ram; export TARGET 6 | 7 | PRJ_ROOT=$MAGPIE_ROOT/build/k2_1_0; export PRJ_ROOT 8 | PRJNAME=ram; export PRJNAME 9 | PRJPATH=$PRJ_ROOT/$PRJNAME; export PRJPATH 10 | PRJ_HPATH=$PRJPATH/inc; export PRJ_HPATH 11 | 12 | XTENSA_TOOLS_INC=$XTENSA_TOOLS_ROOT/xtensa-elf/include 13 | XTENSA_GCC_INC=$XTENSA_TOOLS_ROOT/lib/gcc/xtensa-elf/4.7.2/include 14 | 15 | HPATH=" -I$XTENSA_TOOLS_INC \ 16 | -I$XTENSA_GCC_INC \ 17 | -I$MAGPIE_ROOT/target/inc/k2 \ 18 | -I$MAGPIE_ROOT/target/inc/k2/k2 \ 19 | -I$MAGPIE_ROOT/../wlan/include \ 20 | -I$MAGPIE_ROOT/../wlan/include/k2 \ 21 | -I$MAGPIE_ROOT/../wlan/ \ 22 | -I$MAGPIE_ROOT/target/cmnos/ \ 23 | -I$MAGPIE_ROOT/target/wmi/ \ 24 | -I$MAGPIE_ROOT/target/wlan/ \ 25 | -I$MAGPIE_ROOT/target/buf_pool/ \ 26 | -I$MAGPIE_ROOT/target/htc/ \ 27 | -I$MAGPIE_ROOT/target/inc \ 28 | -I$MAGPIE_ROOT/target/inc/OTUS \ 29 | -I$MAGPIE_ROOT/target/adf/ \ 30 | -I$MAGPIE_ROOT/build/include/xtensa-elf/ \ 31 | -I$MAGPIE_ROOT/build/include"; 32 | 33 | 34 | export HPATH 35 | 36 | 37 | LIB_PATH=$PRJ_ROOT/lib/ram; export LIB_PATH 38 | CROSS_COMPILE=$XTENSA_TOOLS_ROOT/bin; export CROSS_COMPILE 39 | TARGET_PREFIX=xt-; export TARGET_PREFIX 40 | 41 | ARCH=""; export ARCH 42 | DEFS=""; export DEFS 43 | CCOPTS=" -g -Os -Wunused-label -Wunused-variable -Wunused-value -Wpointer-arith -Wundef -nostdlib -Wundef"; export CCOPTS 44 | ASOPTS="-Wa, --fatal-warnings"; export ASOPTS 45 | DFLAGS="-D_RAM_ -DPROJECT_K2 -DBIG_ENDIAN -D_BYTE_ORDER=_BIG_ENDIAN -D__XTENSA__ -DFUSION_USB_FW -DRX_SCATTER -DFUSION_USB_ENABLE_TX_STREAM -DFUSION_USB_ENABLE_RX_STREAM -DATH_ENABLE_CABQ"; export DFLAGS 46 | TARGET_LDFLAGS="-g -nostdlib"; export TARGET_LDFLAGS 47 | -------------------------------------------------------------------------------- /sboot/k2_1_0/lib/ram/dummy.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/sboot/k2_1_0/lib/ram/dummy.txt -------------------------------------------------------------------------------- /sboot/k2_1_0/ram/adf/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export LAYERNAME = adf 10 | 11 | # 12 | # Sub-system source main path 13 | # 14 | 15 | export SSMPATH = $(MAGPIE_ROOT)/target/$(LAYERNAME) 16 | 17 | 18 | # 19 | # Sub-system object search path for GNU tool chain 20 | # 21 | # !!Customize!! 22 | 23 | # export SSOBJPATH = $(PRJ_ROOT)/build/$(TARGET)/$(LAYERNAME)/obj 24 | 25 | 26 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME)/obj 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | #DIRS = net os nbuf 35 | 36 | 37 | # 38 | # Archive for this package 39 | # 40 | # !!Customize!! 41 | 42 | export L_TARGET = $(LIB_PATH)/libadf.a 43 | 44 | 45 | # 46 | # Targets 47 | # 48 | 49 | all: 50 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 51 | 52 | 53 | dep: 54 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 55 | 56 | clean: 57 | $(MAKE) clean -f Makefile.ss 58 | 59 | init: 60 | $(MAKE) -f Makefile.ss init 61 | 62 | -------------------------------------------------------------------------------- /sboot/k2_1_0/ram/adf/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH) 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/adf_nbuf.o \ 36 | $(SSOBJPATH)/adf_net.o \ 37 | $(SSOBJPATH)/adf_os_defer_pvt.o \ 38 | $(SSOBJPATH)/adf_os_dma.o \ 39 | $(SSOBJPATH)/adf_os_irq_pvt.o \ 40 | $(SSOBJPATH)/adf_os_timer.o 41 | 42 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 43 | 44 | # 45 | # The followings are automatically generated by the tool adj_dep 46 | # 47 | 48 | ### Dep 49 | -------------------------------------------------------------------------------- /sboot/k2_1_0/ram/buf_pool/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export SSNAME = buf_pool 10 | 11 | 12 | # 13 | # Sub-system source main path 14 | # 15 | 16 | export SSMPATH = $(MAGPIE_ROOT)/target/$(SSNAME) 17 | 18 | 19 | # 20 | # Sub-system object search path for GNU tool chain 21 | # 22 | # !!Customize!! 23 | 24 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME)/obj 25 | 26 | 27 | # 28 | # Sub-system/module list at this layer 29 | # 30 | # !!Customize!! 31 | 32 | SUBDIRS = . 33 | 34 | 35 | # 36 | # Archive for this package 37 | # 38 | # !!Customize!! 39 | 40 | export L_TARGET = $(LIB_PATH)/libbuf_pool.a 41 | 42 | 43 | # 44 | # Targets 45 | # 46 | 47 | all: 48 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 49 | 50 | 51 | dep: 52 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 53 | 54 | clean: 55 | $(MAKE) clean -f Makefile.ss 56 | 57 | init: 58 | $(MAKE) -f Makefile.ss init 59 | 60 | -------------------------------------------------------------------------------- /sboot/k2_1_0/ram/buf_pool/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH) 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/buf_pool_static.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | -------------------------------------------------------------------------------- /sboot/k2_1_0/ram/carrier_apd/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export LAYERNAME = carrier_apd 10 | export SLAYERNAME = ../wlan 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(MAGPIE_ROOT)/$(SLAYERNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | # export SSOBJPATH = $(PRJ_ROOT)/build/$(TARGET)/$(LAYERNAME)/usb/obj 26 | 27 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME)/$(SLAYERNAME)/$(SSNAME)/obj 28 | 29 | # 30 | # Sub-system/module list at this layer 31 | # 32 | # !!Customize!! 33 | 34 | SUBDIRS = . 35 | 36 | 37 | # 38 | # Archive for this package 39 | # 40 | # !!Customize!! 41 | 42 | export L_TARGET = $(LIB_PATH)/libcarrier_apd.a 43 | 44 | 45 | # 46 | # Targets 47 | # 48 | 49 | all: 50 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 51 | 52 | dep: 53 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 54 | 55 | clean: 56 | $(MAKE) clean -f Makefile.ss 57 | 58 | init: 59 | $(MAKE) -f Makefile.ss init 60 | -------------------------------------------------------------------------------- /sboot/k2_1_0/ram/carrier_apd/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH) 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH) 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/ah.o \ 36 | $(SSOBJPATH)/ar5416_hw.o \ 37 | $(SSOBJPATH)/ar5416_phy.o \ 38 | $(SSOBJPATH)/ah_osdep.o \ 39 | $(SSOBJPATH)/if_ath.o \ 40 | $(SSOBJPATH)/if_ath_pci.o \ 41 | $(SSOBJPATH)/if_owl.o \ 42 | $(SSOBJPATH)/ieee80211_output.o \ 43 | $(SSOBJPATH)/ar5416Phy.o \ 44 | $(SSOBJPATH)/ratectrl_11n_ln.o 45 | 46 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 47 | 48 | # 49 | # The followings are automatically generated by the tool adj_dep 50 | # 51 | 52 | ### Dep 53 | 54 | -------------------------------------------------------------------------------- /sboot/k2_1_0/ram/cmnos/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export LAYERNAME = cmnos 10 | 11 | # 12 | # Sub-system source main path 13 | # 14 | 15 | export SSMPATH = $(MAGPIE_ROOT)/target/$(LAYERNAME) 16 | 17 | 18 | # 19 | # Sub-system object search path for GNU tool chain 20 | # 21 | # !!Customize!! 22 | 23 | # export SSOBJPATH = $(PRJ_ROOT)/build/$(TARGET)/$(LAYERNAME)/obj 24 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME)/obj 25 | 26 | # 27 | # Sub-system/module list at this layer 28 | # 29 | # !!Customize!! 30 | 31 | SUBDIRS = . 32 | #DIRS = dbg printf sflash clock 33 | 34 | 35 | # 36 | # Archive for this package 37 | # 38 | # !!Customize!! 39 | 40 | export L_TARGET = $(LIB_PATH)/libcmnos.a 41 | 42 | 43 | # 44 | # Targets 45 | # 46 | 47 | all: 48 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 49 | 50 | dep: 51 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 52 | 53 | clean: 54 | $(MAKE) clean -f Makefile.ss 55 | 56 | init: 57 | $(MAKE) -f Makefile.ss init 58 | -------------------------------------------------------------------------------- /sboot/k2_1_0/ram/cmnos/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH) 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/k2_cmnos_clock_patch.o \ 36 | $(SSOBJPATH)/dbg_api.o \ 37 | $(SSOBJPATH)/k2_fw_cmnos_printf.o \ 38 | $(SSOBJPATH)/cmnos_sflash.o 39 | 40 | 41 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 42 | 43 | # 44 | # The followings are automatically generated by the tool adj_dep 45 | # 46 | 47 | ### Dep 48 | 49 | -------------------------------------------------------------------------------- /sboot/k2_1_0/ram/hif/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export LAYERNAME = hif 10 | 11 | 12 | # 13 | # Sub-system source main path 14 | # 15 | 16 | export SSMPATH = $(MAGPIE_ROOT)/target/$(LAYERNAME) 17 | 18 | 19 | # 20 | # Sub-system object search path for GNU tool chain 21 | # 22 | # !!Customize!! 23 | 24 | # export SSOBJPATH = $(PRJ_ROOT)/build/$(TARGET)/$(LAYERNAME)/obj 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME)/obj 26 | 27 | # 28 | # Sub-system/module list at this layer 29 | # 30 | # !!Customize!! 31 | 32 | #DIRS = usb 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libhif.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | 51 | dep: 52 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 53 | 54 | clean: 55 | $(MAKE) clean -f Makefile.ss 56 | 57 | init: 58 | $(MAKE) -f Makefile.ss init 59 | 60 | -------------------------------------------------------------------------------- /sboot/k2_1_0/ram/hif/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH) 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/k2_fw_usb_api.o \ 36 | $(SSOBJPATH)/k2_HIF_usb_patch.o 37 | 38 | 39 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 40 | 41 | # 42 | # The followings are automatically generated by the tool adj_dep 43 | # 44 | 45 | ### Dep 46 | -------------------------------------------------------------------------------- /sboot/k2_1_0/ram/htc/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export SSNAME = htc 10 | 11 | 12 | # 13 | # Sub-system source main path 14 | # 15 | 16 | export SSMPATH = $(MAGPIE_ROOT)/target/$(SSNAME) 17 | 18 | 19 | # 20 | # Sub-system object search path for GNU tool chain 21 | # 22 | # !!Customize!! 23 | 24 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME)/obj 25 | 26 | 27 | # 28 | # Sub-system/module list at this layer 29 | # 30 | # !!Customize!! 31 | 32 | SUBDIRS = . 33 | 34 | 35 | # 36 | # Archive for this package 37 | # 38 | # !!Customize!! 39 | 40 | export L_TARGET = $(LIB_PATH)/libhtc.a 41 | 42 | 43 | # 44 | # Targets 45 | # 46 | 47 | all: 48 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 49 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 50 | 51 | 52 | dep: 53 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 54 | 55 | clean: 56 | $(MAKE) clean -f Makefile.ss 57 | 58 | init: 59 | $(MAKE) -f Makefile.ss init 60 | 61 | -------------------------------------------------------------------------------- /sboot/k2_1_0/ram/htc/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH) 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/htc.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | -------------------------------------------------------------------------------- /sboot/k2_1_0/ram/init/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = ram 10 | export SSNAME = init 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(MAGPIE_ROOT)/target/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libinit.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | 51 | 52 | dep: 53 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 54 | 55 | clean: 56 | $(MAKE) clean -f Makefile.ss 57 | 58 | init: 59 | $(MAKE) -f Makefile.ss init 60 | 61 | -------------------------------------------------------------------------------- /sboot/k2_1_0/ram/init/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH) 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/app_start.o \ 36 | $(SSOBJPATH)/init.o \ 37 | $(SSOBJPATH)/magpie.o 38 | 39 | 40 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 41 | 42 | # 43 | # The followings are automatically generated by the tool adj_dep 44 | # 45 | 46 | ### Dep 47 | -------------------------------------------------------------------------------- /sboot/k2_1_0/ram/wlan/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = ram 10 | export SSNAME = wlan 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(MAGPIE_ROOT)/target/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libwlan.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 51 | 52 | 53 | dep: 54 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 55 | 56 | clean: 57 | $(MAKE) clean -f Makefile.ss 58 | 59 | init: 60 | $(MAKE) -f Makefile.ss init 61 | 62 | -------------------------------------------------------------------------------- /sboot/k2_1_0/ram/wlan/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH) 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/wlan_pci.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | -------------------------------------------------------------------------------- /sboot/k2_1_0/ram/wmi/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export SSNAME = wmi 10 | 11 | 12 | # 13 | # Sub-system source main path 14 | # 15 | 16 | export SSMPATH = $(MAGPIE_ROOT)/target/$(SSNAME) 17 | 18 | 19 | # 20 | # Sub-system object search path for GNU tool chain 21 | # 22 | # !!Customize!! 23 | 24 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME)/obj 25 | 26 | 27 | # 28 | # Sub-system/module list at this layer 29 | # 30 | # !!Customize!! 31 | 32 | SUBDIRS = . 33 | 34 | 35 | # 36 | # Archive for this package 37 | # 38 | # !!Customize!! 39 | 40 | export L_TARGET = $(LIB_PATH)/libwmi.a 41 | 42 | 43 | # 44 | # Targets 45 | # 46 | 47 | all: 48 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 49 | 50 | 51 | dep: 52 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 53 | 54 | clean: 55 | $(MAKE) clean -f Makefile.ss 56 | 57 | init: 58 | $(MAKE) -f Makefile.ss init 59 | 60 | -------------------------------------------------------------------------------- /sboot/k2_1_0/ram/wmi/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH) 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/wmi_svc.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/image/magpie_ram/merlin_fusion.ram: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | MAGPIE_ROOT=`pwd`/../../../../;export MAGPIE_ROOT 4 | PROJECT=magpie; export PROJECT 5 | TARGET=ram; export TARGET 6 | 7 | PRJ_ROOT=$MAGPIE_ROOT/build/magpie_1_1; export PRJ_ROOT 8 | PRJNAME=ram; export PRJNAME 9 | PRJPATH=$PRJ_ROOT/$PRJNAME; export PRJPATH 10 | PRJ_HPATH=$PRJPATH/inc; export PRJ_HPATH 11 | OUTPUT_DIR=$PRJ_ROOT/image/output; export OUTPUT_DIR 12 | 13 | XTENSA_TOOLS_INC=$XTENSA_TOOLS_ROOT/xtensa-elf/include 14 | 15 | HPATH=" -I$XTENSA_TOOLS_INC \ 16 | -I$PRJ_ROOT/inc \ 17 | -I$PRJ_ROOT/inc/$PROJECT \ 18 | -I$MAGPIE_ROOT/../wlan/include \ 19 | -I$MAGPIE_ROOT/../wlan/include/magpie \ 20 | -I$MAGPIE_ROOT/../wlan/ \ 21 | -I$MAGPIE_ROOT/target/cmnos/ \ 22 | -I$MAGPIE_ROOT/target/wmi/ \ 23 | -I$MAGPIE_ROOT/target/wlan/ \ 24 | -I$MAGPIE_ROOT/target/inc \ 25 | -I$MAGPIE_ROOT/target/inc/OTUS \ 26 | -I$MAGPIE_ROOT/target/adf/ \ 27 | -I$MAGPIE_ROOT/build/include/xtensa-elf/ \ 28 | -I$MAGPIE_ROOT/build/include"; 29 | 30 | export HPATH 31 | 32 | LIB_PATH=$PRJ_ROOT/lib/ram; export LIB_PATH 33 | CROSS_COMPILE=$XTENSA_TOOLS_ROOT/bin; export CROSS_COMPILE 34 | TARGET_PREFIX=xt-; export TARGET_PREFIX 35 | 36 | ARCH=""; export ARCH 37 | DEFS=""; export DEFS 38 | CCOPTS=" -g -Os -Wunused-label -Wunused-variable -Wunused-value -Wpointer-arith -Wundef -nostdlib -Wundef"; export CCOPTS 39 | ASOPTS="-Wa, --fatal-warnings"; export ASOPTS 40 | DFLAGS="-DROM_VER_1_1 -D_ROM_1_1_ -D_RAM_ -DPROJECT_MAGPIE -DBIG_ENDIAN -D_BYTE_ORDER=_BIG_ENDIAN -DATH_STATS_ENABLE -D__XTENSA__ -DFUSION_USB_FW -DMAGPIE_MERLIN -DRX_SCATTER -DFUSION_USB_ENABLE_TX_STREAM -DFUSION_USB_ENABLE_RX_STREAM -DATH_ENABLE_CABQ"; export DFLAGS 41 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/image/output/asic/rom.asic.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/sboot/magpie_1_1/image/output/asic/rom.asic.bin -------------------------------------------------------------------------------- /sboot/magpie_1_1/image/output/asic/rom.asic.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/sboot/magpie_1_1/image/output/asic/rom.asic.out -------------------------------------------------------------------------------- /sboot/magpie_1_1/image/output/fpga/rom.fpga.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/sboot/magpie_1_1/image/output/fpga/rom.fpga.bin -------------------------------------------------------------------------------- /sboot/magpie_1_1/image/output/fpga/rom.fpga.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/sboot/magpie_1_1/image/output/fpga/rom.fpga.out -------------------------------------------------------------------------------- /sboot/magpie_1_1/inc/dma_lib.h: -------------------------------------------------------------------------------- 1 | #ifndef __DMA_LIB_H 2 | #define __DMA_LIB_H 3 | 4 | 5 | /***********************External***************************/ 6 | 7 | /** 8 | * @brief DMA engine numbers, HIF need to map them to there 9 | * respective order 10 | */ 11 | typedef enum dma_engine{ 12 | DMA_ENGINE_RX0, 13 | DMA_ENGINE_RX1, 14 | DMA_ENGINE_RX2, 15 | DMA_ENGINE_RX3, 16 | DMA_ENGINE_TX0, 17 | DMA_ENGINE_TX1, 18 | DMA_ENGINE_MAX 19 | }dma_engine_t; 20 | 21 | /** 22 | * @brief Interface type, each HIF should call with its own interface type 23 | */ 24 | typedef enum dma_iftype{ 25 | DMA_IF_GMAC = 0x0,/* GMAC */ 26 | DMA_IF_PCI = 0x1,/*PCI */ 27 | DMA_IF_PCIE = 0x2 /*PCI Express */ 28 | }dma_iftype_t; 29 | 30 | 31 | struct dma_lib_api{ 32 | A_UINT16 (*tx_init)(dma_engine_t eng_no, dma_iftype_t if_type); 33 | void (*tx_start)(dma_engine_t eng_no); 34 | A_UINT16 (*rx_init)(dma_engine_t eng_no, dma_iftype_t if_type); 35 | void (*rx_config)(dma_engine_t eng_no, a_uint16_t num_desc, 36 | a_uint16_t gran); 37 | void (*rx_start)(dma_engine_t eng_no); 38 | A_UINT32 (*intr_status)(dma_iftype_t if_type); 39 | A_UINT16 (*hard_xmit)(dma_engine_t eng_no, VBUF *buf); 40 | void (*flush_xmit)(dma_engine_t eng_no); 41 | A_UINT16 (*xmit_done)(dma_engine_t eng_no); 42 | VBUF * (*reap_xmitted)(dma_engine_t eng_no); 43 | VBUF * (*reap_recv)(dma_engine_t eng_no); 44 | void (*return_recv)(dma_engine_t eng_no, VBUF *buf); 45 | A_UINT16 (*recv_pkt)(dma_engine_t eng_no); 46 | }; 47 | 48 | 49 | /** 50 | * @brief Install the DMA lib api's this for ROM patching 51 | * support 52 | * 53 | * @param apis 54 | */ 55 | void dma_lib_module_install(struct dma_lib_api *apis); 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/inc/hif_pci.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __HIF_PCI_H 3 | #define __HIF_PCI_H 4 | 5 | #include 6 | #include 7 | 8 | 9 | #define PCI_MAX_DATA_PKT_LEN 1664 10 | #define PCI_MAX_CMD_PKT_LEN 512 11 | #define PCI_MAX_BOOT_DESC 2 12 | 13 | typedef enum hif_pci_pipe_rx{ 14 | HIF_PCI_PIPE_RX0, /*Normal Priority RX*/ 15 | HIF_PCI_PIPE_RX1, 16 | HIF_PCI_PIPE_RX2, 17 | HIF_PCI_PIPE_RX3, 18 | HIF_PCI_PIPE_RX_MAX 19 | }hif_pci_pipe_rx_t; 20 | 21 | typedef enum hif_pci_pipe_tx{ 22 | HIF_PCI_PIPE_TX0, /*Normal Priority TX*/ 23 | HIF_PCI_PIPE_TX1, 24 | HIF_PCI_PIPE_TX_MAX 25 | }hif_pci_pipe_tx_t; 26 | 27 | typedef struct __pci_softc{ 28 | HIF_CALLBACK sw; 29 | }__pci_softc_t; 30 | 31 | struct hif_pci_api{ 32 | void (*pci_boot_init)(void); 33 | hif_handle_t (*pci_init)(HIF_CONFIG *pConfig); 34 | void (*pci_reset)(void); 35 | void (*pci_enable)(void); 36 | void (*pci_reap_xmitted)(__pci_softc_t *sc, 37 | dma_engine_t eng_no); 38 | void (*pci_reap_recv)(__pci_softc_t *sc, dma_engine_t eng_no); 39 | A_UINT8 (*pci_get_pipe)(dma_engine_t eng); 40 | dma_engine_t (*pci_get_tx_eng)(hif_pci_pipe_tx_t pipe); 41 | dma_engine_t (*pci_get_rx_eng)(hif_pci_pipe_rx_t pipe); 42 | 43 | }; 44 | 45 | void hif_pci_api_install(struct hif_pci_api *apis); 46 | void hif_pci_module_install(struct hif_api *apis); 47 | #endif 48 | 49 | 50 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/inc/hif_usb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @File: mbox_hw.h 3 | * 4 | * @Abstract: mailbox hardware definitions 5 | * 6 | * @Notes: 7 | * * 8 | * Copyright (c) 2008 Atheros Communications Inc. 9 | * All rights reserved. 10 | * 11 | */ 12 | 13 | #ifndef __HIF_USB_H__ 14 | #define __HIF_USB_H__ 15 | 16 | #include 17 | 18 | #include 19 | #include 20 | #include 21 | //#include 22 | //#include 23 | 24 | #define HIF_USB_PIPE_TX 1 25 | #define HIF_USB_PIPE_RX 2 26 | #define HIF_USB_PIPE_INTERRUPT 3 27 | #define HIF_USB_PIPE_COMMAND 4 28 | #define HIF_USB_PIPE_HP_TX 5 29 | #define HIF_USB_PIPE_MP_TX 6 30 | 31 | struct VBUF_QUEUE 32 | { 33 | VBUF *head; 34 | VBUF *tail; 35 | }; 36 | 37 | /* the mailbox hardware layer context */ 38 | typedef struct _HIF_USB_CONTEXT { 39 | HIF_CALLBACK hifCb; 40 | struct zsDmaQueue dnQ; 41 | struct zsTxDmaQueue upQ; 42 | #if SYSTEM_MODULE_HP_EP5 43 | struct zsDmaQueue hpdnQ; // high priority 44 | #endif 45 | #if SYSTEM_MODULE_HP_EP6 46 | struct zsDmaQueue mpdnQ; // medium priority 47 | #endif 48 | //struct VBUF_QUEUE upVbufQ; 49 | VBUF *cmdQueue; 50 | struct VBUF_QUEUE eventBufQ; 51 | 52 | // Left a door for extension the structure 53 | void *pReserved; 54 | } HIF_USB_CONTEXT; 55 | 56 | void hif_usb_module_install(struct hif_api *apis); 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/inc/mem_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #ifndef __MEM_API_H__ 36 | #define __MEM_API_H__ 37 | struct mem_api { 38 | void (* _mem_init)(void); 39 | void *(* _memset)(void *, int, unsigned int); 40 | void *(* _memcpy)(void *, const void *, unsigned int); 41 | void *(* _memmove)(void *, const void *, unsigned int); 42 | int (* _memcmp)(const void *, const void *, unsigned int); 43 | }; 44 | #endif /* __MEM_API_H__ */ 45 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/inc/opt_ah.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #define AH_SUPPORT_AR5416 1 36 | #define AH_SUPPORT_2133 1 37 | #define AH_SUPPORT_5413 1 38 | //#define AH_DEBUG 1 39 | //#define AR5416_EMULATION 1 40 | #define ATH_FORCE_PPM 1 41 | #define ATH_FORCE_BIAS 1 42 | #define AH_SUPPORT_DFS 1 43 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/inc/printf_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #ifndef __PRINTF_API_H__ 36 | #define __PRINTF_API_H__ 37 | 38 | struct printf_api { 39 | void (* _printf_init)(void); 40 | int (* _printf)(const char * fmt, ...); 41 | }; 42 | 43 | /* NB: The printf module requires the serial module. */ 44 | void cmnos_printf_module_install(struct printf_api *tbl); 45 | int cmnos_printf(const char *fmt, ...); 46 | 47 | 48 | 49 | #endif /* __PRINTF_API_H__ */ 50 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/inc/string_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #ifndef __STRING_API_H__ 36 | #define __STRING_API_H__ 37 | struct string_api { 38 | void (* _string_init)(void); 39 | char *(* _strcpy)(char *, const char *); 40 | char *(* _strncpy)(char *, const char *, unsigned int); 41 | int (* _strlen)(const char *); 42 | int (* _strcmp)(const char *, const char *); 43 | int (* _strncmp)(const char *, const char *, unsigned int); 44 | }; 45 | #endif /* __STRING_API_H__ */ 46 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/inc/vdesc_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @File: VBUF_api.h 3 | * 4 | * @Abstract: Host Interface api 5 | * 6 | * @Notes: 7 | * 8 | * Copyright (c) 2008 Atheros Communications Inc. 9 | * All rights reserved. 10 | * 11 | */ 12 | 13 | #ifndef _VDESC_API_H 14 | #define _VDESC_API_H 15 | 16 | //#define VDESC_CONTROL_BUF_HDR (1 << 6) /* the buffer was manipulated and a header added */ 17 | 18 | #define MAX_HW_DESC_SIZE 20 19 | 20 | typedef struct _VDESC 21 | { 22 | struct _VDESC *next_desc; 23 | A_UINT8 *buf_addr; 24 | A_UINT16 buf_size; 25 | A_UINT16 data_offset; 26 | A_UINT16 data_size; 27 | A_UINT16 control; 28 | A_UINT8 hw_desc_buf[MAX_HW_DESC_SIZE]; 29 | } VDESC; 30 | 31 | //#define VDESC_HW_TO_VDESC(hwdesc) ((VDESC *)(((A_UINT32 *)hwdesc - 4))) 32 | #define VDESC_HW_TO_VDESC(hwdesc) ((VDESC *)(((A_UINT32 *)hwdesc - 4))) 33 | 34 | struct vdesc_api { 35 | void (*_init)(int nDesc); 36 | VDESC* (*_alloc_vdesc)(); 37 | A_UINT8* (*_get_hw_desc)(VDESC *desc); 38 | void (*_swap_vdesc)(VDESC *dest, VDESC *src); 39 | //void (*_free_vdesc)(void); 40 | /* room to expand this table by another table */ 41 | void *pReserved; 42 | }; 43 | 44 | extern void vdesc_module_install(struct vdesc_api *apis); 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/lib/ram/dummy.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/sboot/magpie_1_1/lib/ram/dummy.txt -------------------------------------------------------------------------------- /sboot/magpie_1_1/lib/rom/dummy.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/sboot/magpie_1_1/lib/rom/dummy.txt -------------------------------------------------------------------------------- /sboot/magpie_1_1/lib/sboot/dummy.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/sboot/magpie_1_1/lib/sboot/dummy.txt -------------------------------------------------------------------------------- /sboot/magpie_1_1/ram/adf/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export LAYERNAME = adf 10 | 11 | # 12 | # Sub-system source main path 13 | # 14 | 15 | export SSMPATH = $(MAGPIE_ROOT)/target/$(LAYERNAME) 16 | 17 | 18 | # 19 | # Sub-system object search path for GNU tool chain 20 | # 21 | # !!Customize!! 22 | 23 | # export SSOBJPATH = $(PRJ_ROOT)/build/$(TARGET)/$(LAYERNAME)/obj 24 | 25 | 26 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME)/obj 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | #DIRS = net os nbuf 35 | 36 | 37 | # 38 | # Archive for this package 39 | # 40 | # !!Customize!! 41 | 42 | export L_TARGET = $(LIB_PATH)/libadf.a 43 | 44 | 45 | # 46 | # Targets 47 | # 48 | 49 | all: 50 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 51 | 52 | 53 | dep: 54 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 55 | 56 | clean: 57 | $(MAKE) clean -f Makefile.ss 58 | 59 | init: 60 | $(MAKE) -f Makefile.ss init 61 | 62 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/ram/adf/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH) 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/adf_nbuf.o \ 36 | $(SSOBJPATH)/adf_net.o \ 37 | $(SSOBJPATH)/adf_os_defer_pvt.o \ 38 | $(SSOBJPATH)/adf_os_dma.o \ 39 | $(SSOBJPATH)/adf_os_irq_pvt.o \ 40 | $(SSOBJPATH)/adf_os_timer.o 41 | 42 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 43 | 44 | # 45 | # The followings are automatically generated by the tool adj_dep 46 | # 47 | 48 | ### Dep 49 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/ram/carrier_apd/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export LAYERNAME = carrier_apd 10 | export SLAYERNAME = ../wlan 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(MAGPIE_ROOT)/$(SLAYERNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | # export SSOBJPATH = $(PRJ_ROOT)/build/$(TARGET)/$(LAYERNAME)/usb/obj 26 | 27 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME)/$(SLAYERNAME)/$(SSNAME)/obj 28 | 29 | # 30 | # Sub-system/module list at this layer 31 | # 32 | # !!Customize!! 33 | 34 | SUBDIRS = . 35 | 36 | 37 | # 38 | # Archive for this package 39 | # 40 | # !!Customize!! 41 | 42 | export L_TARGET = $(LIB_PATH)/libcarrier_apd.a 43 | 44 | 45 | # 46 | # Targets 47 | # 48 | 49 | all: 50 | echo $(SSOBJPATH) 51 | echo $(SSMPATH) 52 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 53 | 54 | dep: 55 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 56 | 57 | clean: 58 | $(MAKE) clean -f Makefile.ss 59 | 60 | init: 61 | $(MAKE) -f Makefile.ss init 62 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/ram/carrier_apd/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH) 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH) 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/ah.o \ 36 | $(SSOBJPATH)/ar5416_hw.o \ 37 | $(SSOBJPATH)/ar5416_phy.o \ 38 | $(SSOBJPATH)/ah_osdep.o \ 39 | $(SSOBJPATH)/if_ath.o \ 40 | $(SSOBJPATH)/if_ath_pci.o \ 41 | $(SSOBJPATH)/if_owl.o \ 42 | $(SSOBJPATH)/ieee80211_output.o \ 43 | $(SSOBJPATH)/ar5416Phy.o \ 44 | $(SSOBJPATH)/ratectrl_11n_ln.o 45 | 46 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 47 | 48 | # 49 | # The followings are automatically generated by the tool adj_dep 50 | # 51 | 52 | ### Dep 53 | 54 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/ram/cmnos/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export LAYERNAME = cmnos 10 | 11 | # 12 | # Sub-system source main path 13 | # 14 | 15 | export SSMPATH = $(MAGPIE_ROOT)/target/$(LAYERNAME) 16 | 17 | 18 | # 19 | # Sub-system object search path for GNU tool chain 20 | # 21 | # !!Customize!! 22 | 23 | # export SSOBJPATH = $(PRJ_ROOT)/build/$(TARGET)/$(LAYERNAME)/obj 24 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME)/obj 25 | 26 | # 27 | # Sub-system/module list at this layer 28 | # 29 | # !!Customize!! 30 | 31 | SUBDIRS = . 32 | #DIRS = dbg sflash 33 | 34 | 35 | # 36 | # Archive for this package 37 | # 38 | # !!Customize!! 39 | 40 | export L_TARGET = $(LIB_PATH)/libcmnos.a 41 | 42 | 43 | # 44 | # Targets 45 | # 46 | 47 | all: 48 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 49 | 50 | dep: 51 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 52 | 53 | clean: 54 | $(MAKE) clean -f Makefile.ss 55 | 56 | init: 57 | $(MAKE) -f Makefile.ss init 58 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/ram/cmnos/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH) 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/dbg_api.o \ 36 | $(SSOBJPATH)/cmnos_sflash.o 37 | 38 | 39 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 40 | 41 | # 42 | # The followings are automatically generated by the tool adj_dep 43 | # 44 | 45 | ### Dep 46 | 47 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/ram/init/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = ram 10 | export SSNAME = init 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(MAGPIE_ROOT)/target/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libinit.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | 51 | 52 | dep: 53 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 54 | 55 | clean: 56 | $(MAKE) clean -f Makefile.ss 57 | 58 | init: 59 | $(MAKE) -f Makefile.ss init 60 | 61 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/ram/init/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH) 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/app_start.o \ 36 | $(SSOBJPATH)/init.o \ 37 | $(SSOBJPATH)/magpie.o 38 | 39 | 40 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 41 | 42 | # 43 | # The followings are automatically generated by the tool adj_dep 44 | # 45 | 46 | ### Dep 47 | 48 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/ram/rompatch/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export LAYERNAME = rompatch 10 | 11 | 12 | # 13 | # Sub-system source main path 14 | # 15 | 16 | export SSMPATH = $(MAGPIE_ROOT)/target/$(LAYERNAME) 17 | 18 | 19 | # 20 | # Sub-system object search path for GNU tool chain 21 | # 22 | # !!Customize!! 23 | 24 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME)/obj 25 | 26 | # 27 | # Sub-system/module list at this layer 28 | # 29 | # !!Customize!! 30 | 31 | SUBDIRS = . 32 | #DIRS = hif cmnos 33 | 34 | 35 | # 36 | # Archive for this package 37 | # 38 | # !!Customize!! 39 | 40 | export L_TARGET = $(LIB_PATH)/librompatch.a 41 | 42 | 43 | # 44 | # Targets 45 | # 46 | 47 | all: 48 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 49 | 50 | 51 | dep: 52 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 53 | 54 | clean: 55 | $(MAKE) clean -f Makefile.ss 56 | 57 | init: 58 | $(MAKE) -f Makefile.ss init 59 | 60 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/ram/rompatch/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH) 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/cmnos_clock_patch.o \ 36 | $(SSOBJPATH)/usb_api_patch.o \ 37 | $(SSOBJPATH)/HIF_usb_patch.o 38 | 39 | 40 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 41 | 42 | # 43 | # The followings are automatically generated by the tool adj_dep 44 | # 45 | 46 | ### Dep 47 | 48 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/ram/wlan/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = ram 10 | export SSNAME = wlan 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(MAGPIE_ROOT)/target/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libwlan.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 51 | 52 | 53 | dep: 54 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 55 | 56 | clean: 57 | $(MAKE) clean -f Makefile.ss 58 | 59 | init: 60 | $(MAKE) -f Makefile.ss init 61 | 62 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/ram/wlan/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH) 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/wlan_pci.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | 46 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/ram/wmi/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export SSNAME = wmi 10 | 11 | 12 | # 13 | # Sub-system source main path 14 | # 15 | 16 | export SSMPATH = $(MAGPIE_ROOT)/target/$(SSNAME) 17 | 18 | 19 | # 20 | # Sub-system object search path for GNU tool chain 21 | # 22 | # !!Customize!! 23 | 24 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME)/obj 25 | 26 | 27 | # 28 | # Sub-system/module list at this layer 29 | # 30 | # !!Customize!! 31 | 32 | SUBDIRS = . 33 | 34 | 35 | # 36 | # Archive for this package 37 | # 38 | # !!Customize!! 39 | 40 | export L_TARGET = $(LIB_PATH)/libwmi.a 41 | 42 | 43 | # 44 | # Targets 45 | # 46 | 47 | all: 48 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 49 | 50 | 51 | dep: 52 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 53 | 54 | clean: 55 | $(MAKE) clean -f Makefile.ss 56 | 57 | init: 58 | $(MAKE) -f Makefile.ss init 59 | 60 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/ram/wmi/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH) 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/wmi_svc.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | 46 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/adf/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export LAYERNAME = adf 10 | 11 | # 12 | # Sub-system source main path 13 | # 14 | 15 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME) 16 | 17 | 18 | # 19 | # Sub-system object search path for GNU tool chain 20 | # 21 | # !!Customize!! 22 | 23 | # export SSOBJPATH = $(PRJ_ROOT)/build/$(TARGET)/$(LAYERNAME)/obj 24 | 25 | 26 | # 27 | # Sub-system/module list at this layer 28 | # 29 | # !!Customize!! 30 | 31 | DIRS = nbuf 32 | 33 | # 34 | # Archive for this package 35 | # 36 | # !!Customize!! 37 | 38 | export L_TARGET = $(LIB_PATH)/libadf.a 39 | 40 | 41 | # 42 | # Targets 43 | # 44 | 45 | all : 46 | for i in $(DIRS) ; do $(MAKE) -C $$i all || exit $? ; done 47 | #ar -rcs $(L_TARGET) `find . -name "*.o"` 48 | 49 | dep: 50 | for i in $(DIRS) ; do $(MAKE) -C $$i dep || exit $? ; done 51 | 52 | clean: 53 | for i in $(DIRS) ; do $(MAKE) -C $$i clean; done 54 | 55 | init: 56 | for i in $(DIRS) ; do $(MAKE) -C $$i init; done 57 | 58 | 59 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/adf/nbuf/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export LAYERNAME = adf 10 | export SSNAME = nbuf 11 | 12 | # 13 | # Sub-system source main path 14 | # 15 | 16 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME)/$(SSNAME) 17 | 18 | 19 | # 20 | # Sub-system object search path for GNU tool chain 21 | # 22 | # !!Customize!! 23 | 24 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME)/$(SSNAME)/obj 25 | 26 | 27 | # 28 | # Sub-system/module list at this layer 29 | # 30 | # !!Customize!! 31 | 32 | SUBDIRS = . 33 | 34 | 35 | # 36 | # Archive for this package 37 | # 38 | # !!Customize!! 39 | 40 | #export L_TARGET = $(LIB_PATH)/libadf.a 41 | 42 | 43 | # 44 | # Targets 45 | # 46 | 47 | all: 48 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 49 | 50 | 51 | dep: 52 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 53 | 54 | clean: 55 | $(MAKE) clean -f Makefile.ss 56 | 57 | init: 58 | $(MAKE) -f Makefile.ss init 59 | 60 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/adf/nbuf/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/adf_nbuf.o 36 | 37 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 38 | 39 | # 40 | # The followings are automatically generated by the tool adj_dep 41 | # 42 | 43 | ### Dep 44 | 45 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/athos/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export SSNAME = athos 10 | 11 | 12 | # 13 | # Sub-system source main path 14 | # 15 | 16 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME) 17 | 18 | 19 | # 20 | # Sub-system object search path for GNU tool chain 21 | # 22 | # !!Customize!! 23 | 24 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME)/obj 25 | 26 | 27 | # 28 | # Sub-system/module list at this layer 29 | # 30 | # !!Customize!! 31 | 32 | SUBDIRS = . 33 | 34 | 35 | # 36 | # Archive for this package 37 | # 38 | # !!Customize!! 39 | 40 | export L_TARGET = $(LIB_PATH)/libathos.a 41 | 42 | 43 | # 44 | # Targets 45 | # 46 | 47 | all: 48 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 49 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 50 | 51 | 52 | dep: 53 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 54 | 55 | clean: 56 | $(MAKE) clean -f Makefile.ss 57 | 58 | init: 59 | $(MAKE) -f Makefile.ss init 60 | 61 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/athos/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/athos_main.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/athos/src/_vectors.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/sboot/magpie_1_1/sboot/athos/src/_vectors.o -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/athos/src/crt1-tiny.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/sboot/magpie_1_1/sboot/athos/src/crt1-tiny.o -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/athos/src/libhandlers-board.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/sboot/magpie_1_1/sboot/athos/src/libhandlers-board.a -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/athos/src/xtos/_sharedvectors-for-reset.S: -------------------------------------------------------------------------------- 1 | // _sharedvectors-for-reset.S -- Reference to pull in a shared reset vector 2 | // $Id: //depot/rel/Cottonwood/Xtensa/OS/xtos/_sharedvectors-for-reset.S#2 $ 3 | 4 | // Copyright (c) 2008 Tensilica Inc. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining 7 | // a copy of this software and associated documentation files (the 8 | // "Software"), to deal in the Software without restriction, including 9 | // without limitation the rights to use, copy, modify, merge, publish, 10 | // distribute, sublicense, and/or sell copies of the Software, and to 11 | // permit persons to whom the Software is furnished to do so, subject to 12 | // the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included 15 | // in all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | 25 | #include 26 | 27 | /* Multicore build flows can use this file (_sharedvectors-for-reset.o) 28 | by copying it to _sharedvectors.o early in the linker search path 29 | (to override the default one), and updating the memory map or linker 30 | scripts accordingly. 31 | This file pulls in a sharable reset vector (typically 32 | shared-reset-vector.S, which requires the PRID option). */ 33 | 34 | .global _SharedResetVector 35 | 36 | /* The following allows this object file to be pulled in by reference: */ 37 | .text 38 | .global _xtos_sharedvectors_ref_ 39 | .set _xtos_sharedvectors_ref_, 0 40 | 41 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/athos/src/xtos/_sharedvectors.S: -------------------------------------------------------------------------------- 1 | // _sharedvectors.S -- Reference symbols to pull in any shared vectors 2 | // (default version, used when not sharing any vector) 3 | // $Id: //depot/rel/Cottonwood/Xtensa/OS/xtos/_sharedvectors.S#2 $ 4 | 5 | // Copyright (c) 2008 Tensilica Inc. 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining 8 | // a copy of this software and associated documentation files (the 9 | // "Software"), to deal in the Software without restriction, including 10 | // without limitation the rights to use, copy, modify, merge, publish, 11 | // distribute, sublicense, and/or sell copies of the Software, and to 12 | // permit persons to whom the Software is furnished to do so, subject to 13 | // the following conditions: 14 | // 15 | // The above copyright notice and this permission notice shall be included 16 | // in all copies or substantial portions of the Software. 17 | // 18 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 | 26 | #include 27 | 28 | /* Not present by default. Multicore build flows build/use a custom 29 | version of _sharedvectors.o that may pull in shared vectors. */ 30 | 31 | /* .global _SharedResetVector */ 32 | 33 | /* The following allows this object file to be pulled in by reference: */ 34 | .text 35 | .global _xtos_sharedvectors_ref_ 36 | .set _xtos_sharedvectors_ref_, 0 37 | 38 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/athos/src/xtos/exc-table.S: -------------------------------------------------------------------------------- 1 | // exc-table.S - general exception C handler table 2 | 3 | // Copyright (c) 1999-2010 Tensilica Inc. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining 6 | // a copy of this software and associated documentation files (the 7 | // "Software"), to deal in the Software without restriction, including 8 | // without limitation the rights to use, copy, modify, merge, publish, 9 | // distribute, sublicense, and/or sell copies of the Software, and to 10 | // permit persons to whom the Software is furnished to do so, subject to 11 | // the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included 14 | // in all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | #include 25 | #include 26 | #include "xtos-internal.h" 27 | 28 | 29 | #if XCHAL_HAVE_EXCEPTIONS 30 | 31 | /* 32 | * Table of exception handlers (in C) for user vectored exceptions. 33 | * Provides entries for all possible 64 exception causes 34 | * currently allowed for in the EXCCAUSE register. 35 | */ 36 | .data 37 | .global _xtos_c_handler_table 38 | .align 4 39 | _xtos_c_handler_table: 40 | .rept XCHAL_EXCCAUSE_NUM 41 | .word _xtos_p_none 42 | .endr 43 | 44 | /* 45 | * Default/empty exception C handler. 46 | * This is just a placeholder for exception causes with no registered 47 | * handler; it normally never gets executed. 48 | * NOTE: control goes first to the debugger if one is present; 49 | * see _xtos_unhandled_exception in exc-unhandled.S . 50 | */ 51 | .text 52 | .align 4 53 | .global _xtos_p_none 54 | .type _xtos_p_none,@function 55 | _xtos_p_none: 56 | abi_entry 57 | // Do nothing. 58 | abi_return 59 | .size _xtos_p_none, . - _xtos_p_none 60 | 61 | #endif /* XCHAL_HAVE_EXCEPTIONS */ 62 | 63 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/athos/src/xtos/init.c: -------------------------------------------------------------------------------- 1 | /* init.c - context initialization */ 2 | 3 | /* 4 | * Copyright (c) 1999-2006 Tensilica Inc. 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining 7 | * a copy of this software and associated documentation files (the 8 | * "Software"), to deal in the Software without restriction, including 9 | * without limitation the rights to use, copy, modify, merge, publish, 10 | * distribute, sublicense, and/or sell copies of the Software, and to 11 | * permit persons to whom the Software is furnished to do so, subject to 12 | * the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included 15 | * in all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | */ 25 | 26 | #include 27 | #if XCHAL_NUM_CONTEXTS > 1 28 | #include 29 | #endif 30 | 31 | 32 | 33 | #if 0 /* XCHAL_NUM_CONTEXTS > 1 */ 34 | extern void _xtos_setup_context(int context_num, SetupInfo *info); 35 | extern void _xtos_start_context(void); 36 | 37 | /* 38 | * Sets up a context for running code. 39 | * 40 | * Returns PC at which to set the new context, or 0 on error. 41 | */ 42 | unsigned _xtos_init_context(int context_num, int stack_size, 43 | _xtos_handler_func *start_func, int arg1) 44 | { 45 | SetupInfo info; 46 | 47 | /* Allocate stack: */ 48 | char *sp; 49 | char *stack = malloc(stack_size); 50 | if (stack == NULL) 51 | return 0; 52 | 53 | /* Setup stack for call8: */ 54 | sp = stack + stack_size - 16; 55 | *(unsigned*)(sp - 12) = (unsigned)(sp + 32); 56 | 57 | info.sp = (unsigned)sp; 58 | info.funcpc = (unsigned)start_func; 59 | info.arg1 = arg1; 60 | _xtos_setup_context(context_num, &info); 61 | return (unsigned) &_xtos_start_context; 62 | } 63 | #endif /* multiple contexts */ 64 | 65 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/athos/src/xtos/null-alloca.S: -------------------------------------------------------------------------------- 1 | // null-alloca.S - Stub for Unused Alloca (MOVSP) Handler 2 | // $Id: //depot/rel/Cottonwood/Xtensa/OS/xtos/null-alloca.S#3 $ 3 | 4 | // Copyright (c) 2006-2010 Tensilica Inc. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining 7 | // a copy of this software and associated documentation files (the 8 | // "Software"), to deal in the Software without restriction, including 9 | // without limitation the rights to use, copy, modify, merge, publish, 10 | // distribute, sublicense, and/or sell copies of the Software, and to 11 | // permit persons to whom the Software is furnished to do so, subject to 12 | // the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included 15 | // in all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | 25 | 26 | // Redirect alloca (MOVSP) exceptions as not handled, when 27 | // that functionality is not needed. Done this way, a user can 28 | // just specify this small handler to override the default one. 29 | 30 | .text 31 | .weak _xtos_unhandled_exception 32 | .global _xtos_alloca_handler 33 | _xtos_alloca_handler: 34 | movi a3, _xtos_unhandled_exception 35 | 1: beqz a3, 1b 36 | jx a3 37 | .size _xtos_alloca_handler, . - _xtos_alloca_handler 38 | 39 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/athos/src/xtos/null-syscall.S: -------------------------------------------------------------------------------- 1 | // null-syscall.S - Stub for Unused SYSCALL Handler 2 | // $Id: //depot/rel/Cottonwood/Xtensa/OS/xtos/null-syscall.S#3 $ 3 | 4 | // Copyright (c) 2006-2010 Tensilica Inc. 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining 7 | // a copy of this software and associated documentation files (the 8 | // "Software"), to deal in the Software without restriction, including 9 | // without limitation the rights to use, copy, modify, merge, publish, 10 | // distribute, sublicense, and/or sell copies of the Software, and to 11 | // permit persons to whom the Software is furnished to do so, subject to 12 | // the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included 15 | // in all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | 25 | 26 | // Redirect SYSCALL exceptions as not handled, when 27 | // that functionality is not needed. Done this way, a user can 28 | // just specify this small handler to override the default one. 29 | 30 | .text 31 | .weak _xtos_unhandled_exception 32 | .global _xtos_syscall_handler 33 | _xtos_syscall_handler: 34 | movi a3, _xtos_unhandled_exception 35 | 1: beqz a3, 1b 36 | jx a3 37 | .size _xtos_syscall_handler, . - _xtos_syscall_handler 38 | 39 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/athos/src/xtos/textaddr: -------------------------------------------------------------------------------- 1 | # Program to determine -Ttext parameter for ld 2 | # $Id: //depot/rel/Cottonwood/Xtensa/OS/xtos/textaddr#2 $ 3 | 4 | # Copyright (c) 2001 Tensilica Inc. 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining 7 | # a copy of this software and associated documentation files (the 8 | # "Software"), to deal in the Software without restriction, including 9 | # without limitation the rights to use, copy, modify, merge, publish, 10 | # distribute, sublicense, and/or sell copies of the Software, and to 11 | # permit persons to whom the Software is furnished to do so, subject to 12 | # the following conditions: 13 | # 14 | # The above copyright notice and this permission notice shall be included 15 | # in all copies or substantial portions of the Software. 16 | # 17 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 19 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 20 | # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 21 | # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 22 | # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 23 | # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | 25 | package textaddr; 26 | 27 | use strict; 28 | use FileHandle; 29 | 30 | { 31 | $::myname = 'textaddr'; 32 | 33 | die("Usage is: $::myname objfile label address\n") 34 | unless @ARGV == 3; 35 | my($objfile, $label, $address) = @ARGV; 36 | 37 | 38 | my $nm = new FileHandle "xt-nm $objfile|"; 39 | die("$::myname: $!, opening pipe to xt-nm $objfile.\n") 40 | unless $nm; 41 | while (<$nm>) { 42 | if (/^([0-9a-f]{8}) . (\w+)$/) { 43 | my $oaddress = $1; 44 | my $olabel = $2; 45 | if ($olabel eq $label) { 46 | printf ("0x%x\n", hex($address) - hex($oaddress)); 47 | exit(0); 48 | } 49 | } 50 | } 51 | die ("$::myname: $label not found in $objfile.\n"); 52 | } 53 | 54 | # 55 | # Local Variables: 56 | # mode:perl 57 | # perl-indent-level:2 58 | # cperl-indent-level:2 59 | # End: 60 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/athos/src/xtos/tiny-refs-min.S: -------------------------------------------------------------------------------- 1 | // tiny-refs-min.S - References to pull-in selected modules into tiny LSPs 2 | 3 | // Copyright (c) 2006 Tensilica Inc. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining 6 | // a copy of this software and associated documentation files (the 7 | // "Software"), to deal in the Software without restriction, including 8 | // without limitation the rights to use, copy, modify, merge, publish, 9 | // distribute, sublicense, and/or sell copies of the Software, and to 10 | // permit persons to whom the Software is furnished to do so, subject to 11 | // the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included 14 | // in all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | 25 | .global _need_user_vector_ 26 | .set _need_user_vector_, 0 // define this, so if referenced... 27 | .global _UserExceptionVector // ... we pull-in this 28 | 29 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/athos/src/xtos/tiny-refs.S: -------------------------------------------------------------------------------- 1 | // tiny-refs.S - References to pull-in selected modules into tiny LSPs 2 | 3 | // Copyright (c) 2006 Tensilica Inc. 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining 6 | // a copy of this software and associated documentation files (the 7 | // "Software"), to deal in the Software without restriction, including 8 | // without limitation the rights to use, copy, modify, merge, publish, 9 | // distribute, sublicense, and/or sell copies of the Software, and to 10 | // permit persons to whom the Software is furnished to do so, subject to 11 | // the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included 14 | // in all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | #if defined(__SPLIT__level1int) 25 | 26 | .global _need_level1int_ 27 | .set _need_level1int_, 0 // define this, so if referenced... 28 | .global _need_user_vector_ // ... we pull-in this 29 | .global _xtos_l1int_handler // and this 30 | 31 | #endif 32 | 33 | 34 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/buf_pool/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export SSNAME = buf_pool 10 | 11 | 12 | # 13 | # Sub-system source main path 14 | # 15 | 16 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME) 17 | 18 | 19 | # 20 | # Sub-system object search path for GNU tool chain 21 | # 22 | # !!Customize!! 23 | 24 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME)/obj 25 | 26 | 27 | # 28 | # Sub-system/module list at this layer 29 | # 30 | # !!Customize!! 31 | 32 | SUBDIRS = . 33 | 34 | 35 | # 36 | # Archive for this package 37 | # 38 | # !!Customize!! 39 | 40 | export L_TARGET = $(LIB_PATH)/libbuf_pool.a 41 | 42 | 43 | # 44 | # Targets 45 | # 46 | 47 | all: 48 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 49 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 50 | 51 | 52 | dep: 53 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 54 | 55 | clean: 56 | $(MAKE) clean -f Makefile.ss 57 | 58 | init: 59 | $(MAKE) -f Makefile.ss init 60 | 61 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/buf_pool/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/buf_pool_static.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/buf_pool/src/buf_pool_static.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | /* 36 | * @File: 37 | * 38 | * @Abstract: 39 | * 40 | * @Notes: 41 | */ 42 | 43 | #ifndef BUF_POOL_STATIC_H_ 44 | #define BUF_POOL_STATIC_H_ 45 | 46 | typedef struct _BUF_POOL_STATIC_CONTEXT { 47 | VBUF *bufQ[POOL_ID_MAX]; 48 | 49 | // Left a door for extension the structure 50 | void *pReserved; 51 | } BUF_POOL_STATIC_CONTEXT; 52 | 53 | #endif /*BUF_POOL_STATIC_H_*/ 54 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = rom 10 | export SSNAME = cmnos 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | #export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | DIRS = allocram clock eeprom intr mem misc printf rompatch string tasklet timer wdt uart sflash 34 | #DIRS = allocram 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libcmnos.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | # for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | for i in $(DIRS) ; do $(MAKE) -C $$i all || exit $? ; done 51 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 52 | 53 | 54 | dep: 55 | for i in $(DIRS) ; do $(MAKE) -C $$i dep || exit $? ; done 56 | 57 | clean: 58 | for i in $(DIRS) ; do $(MAKE) -C $$i clean; done 59 | 60 | init: 61 | for i in $(DIRS) ; do $(MAKE) -C $$i init; done 62 | 63 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/allocram/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = rom 10 | export SSNAME = allocram 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | #export L_TARGET = $(LIB_PATH)/libcmnos.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | 51 | 52 | dep: 53 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 54 | 55 | clean: 56 | $(MAKE) clean -f Makefile.ss 57 | 58 | init: 59 | $(MAKE) -f Makefile.ss init 60 | 61 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/allocram/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/cmnos_allocram.o 36 | 37 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 38 | 39 | # 40 | # The followings are automatically generated by the tool adj_dep 41 | # 42 | 43 | ### Dep 44 | 45 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/clock/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = rom 10 | export SSNAME = clock 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libcmnos.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 51 | 52 | 53 | dep: 54 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 55 | 56 | clean: 57 | $(MAKE) clean -f Makefile.ss 58 | 59 | init: 60 | $(MAKE) -f Makefile.ss init 61 | 62 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/clock/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/cmnos_clock.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | 46 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/eeprom/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = rom 10 | export SSNAME = eeprom 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libcmnos.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 51 | 52 | 53 | dep: 54 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 55 | 56 | clean: 57 | $(MAKE) clean -f Makefile.ss 58 | 59 | init: 60 | $(MAKE) -f Makefile.ss init 61 | 62 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/eeprom/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/cmnos_eeprom.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | 46 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/intr/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = rom 10 | export SSNAME = intr 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libcmnos.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 51 | 52 | 53 | dep: 54 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 55 | 56 | clean: 57 | $(MAKE) clean -f Makefile.ss 58 | 59 | init: 60 | $(MAKE) -f Makefile.ss init 61 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/intr/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/cmnos_intr.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/mem/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = rom 10 | export SSNAME = mem 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libcmnos.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 51 | 52 | 53 | dep: 54 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 55 | 56 | clean: 57 | $(MAKE) clean -f Makefile.ss 58 | 59 | init: 60 | $(MAKE) -f Makefile.ss init 61 | 62 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/mem/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/cmnos_mem.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | 46 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/mem/inc/mem_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #ifndef __MEM_API_H__ 36 | #define __MEM_API_H__ 37 | struct mem_api { 38 | void (* _mem_init)(void); 39 | void *(* _memset)(void *, int, unsigned int); 40 | void *(* _memcpy)(void *, const void *, unsigned int); 41 | void *(* _memmove)(void *, const void *, unsigned int); 42 | int (* _memcmp)(const void *, const void *, unsigned int); 43 | }; 44 | #endif /* __MEM_API_H__ */ 45 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/misc/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = rom 10 | export SSNAME = misc 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libcmnos.a 42 | 43 | 44 | # 45 | 46 | # Targets 47 | # 48 | 49 | all: 50 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 51 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 52 | 53 | 54 | dep: 55 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 56 | 57 | clean: 58 | $(MAKE) clean -f Makefile.ss 59 | 60 | init: 61 | $(MAKE) -f Makefile.ss init 62 | 63 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/misc/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/cmnos_misc.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | 46 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/printf/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = rom 10 | export SSNAME = printf 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libcmnos.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 51 | 52 | 53 | dep: 54 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 55 | 56 | clean: 57 | $(MAKE) clean -f Makefile.ss 58 | 59 | init: 60 | $(MAKE) -f Makefile.ss init 61 | 62 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/printf/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/cmnos_printf.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | 46 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/printf/inc/printf_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #ifndef __PRINTF_API_H__ 36 | #define __PRINTF_API_H__ 37 | 38 | struct printf_api { 39 | void (* _printf_init)(void); 40 | int (* _printf)(const char * fmt, ...); 41 | }; 42 | 43 | /* NB: The printf module requires the serial module. */ 44 | void cmnos_printf_module_install(struct printf_api *tbl); 45 | int cmnos_printf(const char *fmt, ...); 46 | 47 | 48 | 49 | #endif /* __PRINTF_API_H__ */ 50 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/rompatch/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = rom 10 | export SSNAME = rompatch 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libcmnos.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 51 | 52 | 53 | dep: 54 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 55 | 56 | clean: 57 | $(MAKE) clean -f Makefile.ss 58 | 59 | init: 60 | $(MAKE) -f Makefile.ss init 61 | 62 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/rompatch/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/cmnos_rompatch.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | 46 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/sflash/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = rom 10 | export SSNAME = sflash 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libcmnos.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 51 | 52 | 53 | dep: 54 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 55 | 56 | clean: 57 | $(MAKE) clean -f Makefile.ss 58 | 59 | init: 60 | $(MAKE) -f Makefile.ss init 61 | 62 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/sflash/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/cmnos_sflash.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | 46 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/sflash/src/cmnos_sflash.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/sboot/magpie_1_1/sboot/cmnos/sflash/src/cmnos_sflash.c -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/string/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = rom 10 | export SSNAME = string 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libcmnos.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 51 | 52 | 53 | dep: 54 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 55 | 56 | clean: 57 | $(MAKE) clean -f Makefile.ss 58 | 59 | init: 60 | $(MAKE) -f Makefile.ss init 61 | 62 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/string/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/cmnos_string.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | 46 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/string/inc/string_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #ifndef __STRING_API_H__ 36 | #define __STRING_API_H__ 37 | struct string_api { 38 | void (* _string_init)(void); 39 | char *(* _strcpy)(char *, const char *); 40 | char *(* _strncpy)(char *, const char *, unsigned int); 41 | int (* _strlen)(const char *); 42 | int (* _strcmp)(const char *, const char *); 43 | int (* _strncmp)(const char *, const char *, unsigned int); 44 | }; 45 | #endif /* __STRING_API_H__ */ 46 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/tasklet/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = rom 10 | export SSNAME = tasklet 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libcmnos.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 51 | 52 | 53 | dep: 54 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 55 | 56 | clean: 57 | $(MAKE) clean -f Makefile.ss 58 | 59 | init: 60 | $(MAKE) -f Makefile.ss init 61 | 62 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/timer/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = rom 10 | export SSNAME = timer 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libcmnos.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 51 | 52 | 53 | dep: 54 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 55 | 56 | clean: 57 | $(MAKE) clean -f Makefile.ss 58 | 59 | init: 60 | $(MAKE) -f Makefile.ss init 61 | 62 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/timer/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/cmnos_timer.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | 46 | 47 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/uart/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = rom 10 | export SSNAME = uart 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libcmnos.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 51 | 52 | 53 | dep: 54 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 55 | 56 | clean: 57 | $(MAKE) clean -f Makefile.ss 58 | 59 | init: 60 | $(MAKE) -f Makefile.ss init 61 | 62 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/uart/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/uart_api.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | 46 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/wdt/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = rom 10 | export SSNAME = wdt 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/cmnos/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libcmnos.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 51 | 52 | 53 | dep: 54 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 55 | 56 | clean: 57 | $(MAKE) clean -f Makefile.ss 58 | 59 | init: 60 | $(MAKE) -f Makefile.ss init 61 | 62 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/cmnos/wdt/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/cmnos_wdt.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | 46 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/dma_engine/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | #export LAYERNAME = rom 10 | export SSNAME = dma_engine 11 | 12 | 13 | # 14 | # Sub-system source main path 15 | # 16 | 17 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME) 18 | 19 | 20 | # 21 | # Sub-system object search path for GNU tool chain 22 | # 23 | # !!Customize!! 24 | 25 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME)/obj 26 | 27 | 28 | # 29 | # Sub-system/module list at this layer 30 | # 31 | # !!Customize!! 32 | 33 | SUBDIRS = . 34 | 35 | 36 | # 37 | # Archive for this package 38 | # 39 | # !!Customize!! 40 | 41 | export L_TARGET = $(LIB_PATH)/libdma.a 42 | 43 | 44 | # 45 | # Targets 46 | # 47 | 48 | all: 49 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 50 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 51 | 52 | 53 | dep: 54 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 55 | 56 | clean: 57 | $(MAKE) clean -f Makefile.ss 58 | 59 | init: 60 | $(MAKE) -f Makefile.ss init 61 | 62 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/dma_engine/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/dma_engine.o \ 36 | $(SSOBJPATH)/desc.o 37 | 38 | 39 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 40 | 41 | # 42 | # The followings are automatically generated by the tool adj_dep 43 | # 44 | 45 | ### Dep 46 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/fwd/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export SSNAME = fwd 10 | 11 | 12 | # 13 | # Sub-system source main path 14 | # 15 | 16 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME) 17 | 18 | 19 | # 20 | # Sub-system object search path for GNU tool chain 21 | # 22 | # !!Customize!! 23 | 24 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME)/obj 25 | 26 | 27 | # 28 | # Sub-system/module list at this layer 29 | # 30 | # !!Customize!! 31 | 32 | SUBDIRS = . 33 | 34 | 35 | # 36 | # Archive for this package 37 | # 38 | # !!Customize!! 39 | 40 | export L_TARGET = $(LIB_PATH)/libfwd.a 41 | 42 | 43 | # 44 | # Targets 45 | # 46 | 47 | all: 48 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 49 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 50 | 51 | 52 | dep: 53 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 54 | 55 | clean: 56 | $(MAKE) clean -f Makefile.ss 57 | 58 | init: 59 | $(MAKE) -f Makefile.ss init 60 | 61 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/fwd/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/ 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/fwd.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/hif/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export LAYERNAME = hif 10 | 11 | 12 | # 13 | # Sub-system source main path 14 | # 15 | 16 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME) 17 | 18 | 19 | # 20 | # Sub-system object search path for GNU tool chain 21 | # 22 | # !!Customize!! 23 | 24 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME)/ 25 | 26 | 27 | # 28 | # Sub-system/module list at this layer 29 | # 30 | # !!Customize!! 31 | 32 | DIRS = pci \ 33 | usb \ 34 | gmac \ 35 | dma_lib 36 | 37 | 38 | 39 | # 40 | # Archive for this package 41 | # 42 | # !!Customize!! 43 | 44 | export L_TARGET = $(LIB_PATH)/libhif.a 45 | 46 | 47 | # 48 | # Targets 49 | # 50 | 51 | all : 52 | for i in $(DIRS) ; do $(MAKE) -C $$i all || exit $? ; done 53 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 54 | 55 | dep: 56 | for i in $(DIRS) ; do $(MAKE) -C $$i dep || exit $? ; done 57 | 58 | clean: 59 | for i in $(DIRS) ; do $(MAKE) -C $$i clean; done 60 | 61 | init: 62 | for i in $(DIRS) ; do $(MAKE) -C $$i init; done 63 | 64 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/hif/dma_lib/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export LAYERNAME = hif 10 | export SSNAME = dma_lib 11 | 12 | # 13 | # Sub-system source main path 14 | # 15 | 16 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME)/$(SSNAME) 17 | 18 | 19 | # 20 | # Sub-system object search path for GNU tool chain 21 | # 22 | # !!Customize!! 23 | 24 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME)/$(SSNAME)/obj 25 | 26 | 27 | # 28 | # Sub-system/module list at this layer 29 | # 30 | # !!Customize!! 31 | 32 | SUBDIRS = . 33 | 34 | 35 | # 36 | # Targets 37 | # 38 | 39 | all: 40 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 41 | 42 | 43 | dep: 44 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 45 | 46 | clean: 47 | $(MAKE) clean -f Makefile.ss 48 | 49 | init: 50 | $(MAKE) -f Makefile.ss init 51 | 52 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/hif/dma_lib/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/ 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/dma_lib.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | 46 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/hif/gmac/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export LAYERNAME = hif 10 | export SSNAME = gmac 11 | 12 | # 13 | # Sub-system source main path 14 | # 15 | 16 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME)/$(SSNAME) 17 | 18 | 19 | # 20 | # Sub-system object search path for GNU tool chain 21 | # 22 | # !!Customize!! 23 | 24 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME)/$(SSNAME)/ 25 | 26 | 27 | # 28 | # Sub-system/module list at this layer 29 | # 30 | # !!Customize!! 31 | 32 | SUBDIRS = . 33 | 34 | 35 | # 36 | # Targets 37 | # 38 | 39 | all: 40 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 41 | 42 | 43 | dep: 44 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 45 | 46 | clean: 47 | $(MAKE) clean -f Makefile.ss 48 | 49 | init: 50 | $(MAKE) -f Makefile.ss init 51 | 52 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/hif/gmac/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/ 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/hif_gmac.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/hif/pci/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export LAYERNAME = hif 10 | export SSNAME = pci 11 | 12 | # 13 | # Sub-system source main path 14 | # 15 | 16 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME)/$(SSNAME) 17 | 18 | 19 | # 20 | # Sub-system object search path for GNU tool chain 21 | # 22 | # !!Customize!! 23 | 24 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME)/$(SSNAME)/obj 25 | 26 | 27 | # 28 | # Sub-system/module list at this layer 29 | # 30 | # !!Customize!! 31 | 32 | SUBDIRS = . 33 | 34 | 35 | # 36 | # Targets 37 | # 38 | 39 | all: 40 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 41 | 42 | 43 | dep: 44 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 45 | 46 | clean: 47 | $(MAKE) clean -f Makefile.ss 48 | 49 | init: 50 | $(MAKE) -f Makefile.ss init 51 | 52 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/hif/pci/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/ 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/hif_pci.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/hif/usb/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export LAYERNAME = hif 10 | export SSNAME = usb 11 | 12 | # 13 | # Sub-system source main path 14 | # 15 | 16 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME)/$(SSNAME) 17 | 18 | 19 | # 20 | # Sub-system object search path for GNU tool chain 21 | # 22 | # !!Customize!! 23 | 24 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(LAYERNAME)/$(SSNAME)/obj 25 | 26 | 27 | # 28 | # Sub-system/module list at this layer 29 | # 30 | # !!Customize!! 31 | 32 | SUBDIRS = . 33 | 34 | 35 | # 36 | # Targets 37 | # 38 | 39 | all: 40 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 41 | 42 | 43 | dep: 44 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 45 | 46 | clean: 47 | $(MAKE) clean -f Makefile.ss 48 | 49 | init: 50 | $(MAKE) -f Makefile.ss init 51 | 52 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/hif/usb/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/HIF_usb.o \ 36 | $(SSOBJPATH)/usb_api.o \ 37 | $(SSOBJPATH)/usb_table.o \ 38 | $(SSOBJPATH)/usb_fifo.o 39 | 40 | 41 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 42 | 43 | # 44 | # The followings are automatically generated by the tool adj_dep 45 | # 46 | 47 | ### Dep 48 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/htc/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export SSNAME = htc 10 | 11 | 12 | # 13 | # Sub-system source main path 14 | # 15 | 16 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME) 17 | 18 | 19 | # 20 | # Sub-system object search path for GNU tool chain 21 | # 22 | # !!Customize!! 23 | 24 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME)/obj 25 | 26 | 27 | # 28 | # Sub-system/module list at this layer 29 | # 30 | # !!Customize!! 31 | 32 | SUBDIRS = . 33 | 34 | 35 | # 36 | # Archive for this package 37 | # 38 | # !!Customize!! 39 | 40 | export L_TARGET = $(LIB_PATH)/libhtc.a 41 | 42 | 43 | # 44 | # Targets 45 | # 46 | 47 | all: 48 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 49 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 50 | 51 | 52 | dep: 53 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 54 | 55 | clean: 56 | $(MAKE) clean -f Makefile.ss 57 | 58 | init: 59 | $(MAKE) -f Makefile.ss init 60 | 61 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/htc/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/htc.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | 46 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/inc/opt_ah.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #define AH_SUPPORT_AR5416 1 36 | #define AH_SUPPORT_2133 1 37 | #define AH_SUPPORT_5413 1 38 | //#define AH_DEBUG 1 39 | //#define AR5416_EMULATION 1 40 | #define ATH_FORCE_PPM 1 41 | #define ATH_FORCE_BIAS 1 42 | #define AH_SUPPORT_DFS 1 43 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/vbuf/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export SSNAME = vbuf 10 | 11 | 12 | # 13 | # Sub-system source main path 14 | # 15 | 16 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME) 17 | 18 | 19 | # 20 | # Sub-system object search path for GNU tool chain 21 | # 22 | # !!Customize!! 23 | 24 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME)/obj 25 | 26 | 27 | # 28 | # Sub-system/module list at this layer 29 | # 30 | # !!Customize!! 31 | 32 | SUBDIRS = . 33 | 34 | 35 | # 36 | # Archive for this package 37 | # 38 | # !!Customize!! 39 | 40 | export L_TARGET = $(LIB_PATH)/libvbuf.a 41 | 42 | 43 | # 44 | # Targets 45 | # 46 | 47 | all: 48 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 49 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 50 | 51 | 52 | dep: 53 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 54 | 55 | clean: 56 | $(MAKE) clean -f Makefile.ss 57 | 58 | init: 59 | $(MAKE) -f Makefile.ss init 60 | 61 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/vbuf/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/vbuf.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | 46 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/vbuf/src/vbuf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @File: 3 | * 4 | * @Abstract: 5 | * 6 | * @Notes: 7 | * 8 | * 9 | * Copyright (c) 2007 Atheros Communications Inc. 10 | * All rights reserved. 11 | * 12 | */ 13 | 14 | #ifndef VBUF_H_ 15 | #define VBUF_H_ 16 | 17 | struct VBUF_CONTEXT { 18 | VBUF *free_buf_head; 19 | int nVbufNum; 20 | 21 | // Left a door for extension the structure 22 | void *pReserved; 23 | }; 24 | 25 | #endif /*VBUF_H_*/ 26 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/vdesc/Makefile: -------------------------------------------------------------------------------- 1 | include $(MAGPIE_ROOT)/build/make_opt/Makefile.h 2 | 3 | 4 | # 5 | # Sub-system source main path 6 | # 7 | # !!Customize!! 8 | 9 | export SSNAME = vdesc 10 | 11 | 12 | # 13 | # Sub-system source main path 14 | # 15 | 16 | export SSMPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME) 17 | 18 | 19 | # 20 | # Sub-system object search path for GNU tool chain 21 | # 22 | # !!Customize!! 23 | 24 | export SSOBJPATH = $(PRJ_ROOT)/$(TARGET)/$(SSNAME)/obj 25 | 26 | 27 | # 28 | # Sub-system/module list at this layer 29 | # 30 | # !!Customize!! 31 | 32 | SUBDIRS = . 33 | 34 | 35 | # 36 | # Archive for this package 37 | # 38 | # !!Customize!! 39 | 40 | export L_TARGET = $(LIB_PATH)/libvdesc.a 41 | 42 | 43 | # 44 | # Targets 45 | # 46 | 47 | all: 48 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss all || exit $?; done 49 | # ar -rcs $(L_TARGET) `find . -name "*.o"` 50 | 51 | 52 | dep: 53 | for i in $(SUBDIRS) ; do $(MAKE) -C $$i -f Makefile.ss dep || exit $?; done 54 | 55 | clean: 56 | $(MAKE) clean -f Makefile.ss 57 | 58 | init: 59 | $(MAKE) -f Makefile.ss init 60 | 61 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/vdesc/Makefile.ss: -------------------------------------------------------------------------------- 1 | # 2 | # Sub-system source search path for Adjust_Dep at this dir level 3 | # 4 | # !!Customize!! 5 | 6 | export SSPATH = $(SSMPATH)/src 7 | 8 | 9 | # 10 | # Extra include paths required by this module at this directory level 11 | # 12 | # !!Customize!! 13 | 14 | EXTRA_HPATH = -I$(SSPATH) -I$(SSMPATH)/inc 15 | #EXTRA_HPATH = 16 | 17 | EXTRA_CFLAGS = 18 | EXTRA_CCFLAGS = 19 | EXTRA_ASFLAGS = 20 | CFLAGS += 21 | 22 | 23 | # 24 | # Search path for GNU tool chain 25 | # 26 | 27 | VPATH = $(LIB_PATH):$(SSOBJPATH) 28 | 29 | 30 | # 31 | # Object list at this directory level 32 | # 33 | # !!Customize!! 34 | 35 | O_OBJS = $(SSOBJPATH)/vdesc.o 36 | 37 | 38 | include $(MAGPIE_ROOT)/build/make_opt/Rules.make 39 | 40 | # 41 | # The followings are automatically generated by the tool adj_dep 42 | # 43 | 44 | ### Dep 45 | -------------------------------------------------------------------------------- /sboot/magpie_1_1/sboot/vdesc/src/vdesc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | /* 36 | * @File: 37 | * 38 | * @Abstract: 39 | * 40 | * @Notes: 41 | */ 42 | 43 | #ifndef VDESC_H_ 44 | #define VDESC_H_ 45 | 46 | struct VDESC_CONTEXT { 47 | VDESC *free_vdesc_head; 48 | 49 | // Left a door for extension the structure 50 | void *pReserved; 51 | }; 52 | 53 | #endif /*VDESC_H_*/ 54 | -------------------------------------------------------------------------------- /sboot/make_opt/Makefile.h: -------------------------------------------------------------------------------- 1 | # 2 | # Include the make variables (CC, etc...) 3 | # 4 | 5 | export XTENSA_TOOL_INSTALLED=1 6 | 7 | ifeq ($(XTENSA_TOOLS_ROOT),) 8 | XTENSA_TOOL_INSTALLED=0 9 | export XTENSA_INSTALL_PATH=$(PWD)/../../../../../../toolchain 10 | export XTENSA_CORE=Magpie_P0 11 | export LM_LICENSE_FILE=27020@us1-lic1:1718@xia:27020@zydasfs 12 | export XTENSA_TOOLS_ROOT=$(XTENSA_INSTALL_PATH)/inst 13 | export XTENSA_ROOT=$(XTENSA_INSTALL_PATH)/builds/RB-2007.2-linux/$(XTENSA_CORE) 14 | export XTENSA_SYSTEM=$(XTENSA_ROOT)/config 15 | endif 16 | export XTENSA_TOOL_INSTALLED=1 17 | export XCC=$(XTENSA_TOOLS_ROOT)/bin/xtensa-elf-gcc 18 | export XLD=$(XTENSA_TOOLS_ROOT)/bin/xtensa-elf-ld 19 | export XAR=$(XTENSA_TOOLS_ROOT)/bin/xtensa-elf-ar 20 | export XOBJCOPY=$(XTENSA_TOOLS_ROOT)/bin/xtensa-elf-objcopy 21 | export XOBJDUMP=$(XTENSA_TOOLS_ROOT)/bin/xtensa-elf-objdump 22 | 23 | export CC = $(CROSS_COMPILE)/$(TARGET_PREFIX)xcc 24 | export AS = $(CROSS_COMPILE)/$(TARGET_PREFIX)xcc 25 | export AR = $(CROSS_COMPILE)/$(TARGET_PREFIX)ar 26 | export LD = $(CROSS_COMPILE)/$(TARGET_PREFIX)xcc 27 | export NM = $(CROSS_COMPILE)/$(TARGET_PREFIX)nm 28 | export OBJCOPY = $(CROSS_COMPILE)/$(TARGET_PREFIX)objcopy 29 | export OBJDUMP = $(CROSS_COMPILE)/$(TARGET_PREFIX)objdump 30 | export BIN2HEX = $(MAGPIE_ROOT)/build/utility/bin/bin2hex 31 | export IMGHDR = $(MAGPIE_ROOT)/build/utility/bin/imghdr 32 | export MK_SYMBOL = sh $(MAGPIE_ROOT)/build/utility/sh/make_ld.sh 33 | export RM rm 34 | 35 | # 36 | # export all these symbols for compilation 37 | # 38 | export CFLAGS = $(ARCH) $(DEFS) $(DFLAGS) $(CCOPTS) $(HPATH) 39 | export CCFLAGS = $(HPATH) $(DEFS) $(DFLAGS) $(CCOPTS) 40 | export ASFLAGS = $(ARCH) $(DEFS) $(DFLAGS) $(ASOPTS) $(HPATH) 41 | export ARFLAGS = -rcs 42 | 43 | # 44 | # Set the default value of MAGPIE_IF to usb if not specified 45 | # 46 | ifeq ($(MAGPIE_IF),) 47 | MAGPIE_IF=usb 48 | endif 49 | -------------------------------------------------------------------------------- /sboot/make_opt/lib/_vectors.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/sboot/make_opt/lib/_vectors.o -------------------------------------------------------------------------------- /sboot/make_opt/lib/crt1-tiny.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/sboot/make_opt/lib/crt1-tiny.o -------------------------------------------------------------------------------- /sboot/make_opt/lib/libhandlers-board.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/sboot/make_opt/lib/libhandlers-board.a -------------------------------------------------------------------------------- /sboot/utility/Makefile: -------------------------------------------------------------------------------- 1 | DIRS = bin2hex 2 | TARGET_DIR = ./bin 3 | 4 | all: 5 | @mkdir -p $(TARGET_DIR) 6 | @for i in $(DIRS) ; do $(MAKE) -C $$i || exit $? ; done 7 | 8 | clean : 9 | @for i in $(DIRS) ; do $(MAKE) -C $$i clean; done 10 | -------------------------------------------------------------------------------- /sboot/utility/adjust_dep/Makefile: -------------------------------------------------------------------------------- 1 | TARGET = ../bin/adj_dep # for Linux environment 2 | #TARGET = ../bin/adj_dep.exe # for CygWin environment 3 | 4 | all: $(TARGET) 5 | 6 | $(TARGET): 7 | gcc -o $(TARGET) adj_dep.c 8 | 9 | install: 10 | cp adj_dep ../bin 11 | 12 | clean: 13 | -rm $(TARGET) 14 | -------------------------------------------------------------------------------- /sboot/utility/adjust_time/Makefile: -------------------------------------------------------------------------------- 1 | TARGET = ../bin/adj_time # for Linux environment 2 | #TARGET = ../bin/adj_time.exe # for CygWin environment 3 | 4 | all: $(TARGET) 5 | 6 | $(TARGET): 7 | gcc -o $(TARGET) adj_time.c 8 | 9 | clean: 10 | -rm $(TARGET) 11 | -------------------------------------------------------------------------------- /sboot/utility/athfw2lnx/Makefile: -------------------------------------------------------------------------------- 1 | all: athfw2lnx 2 | 3 | ifeq ($(ATH_FW),) 4 | $(error "ERROR: usage: make ATH_FW=fw.c") 5 | endif 6 | 7 | athfw2lnx: athfw2lnx.c $(ATH_FW) 8 | gcc -o $@ athfw2lnx.c $(ATH_FW) 9 | 10 | clean: 11 | rm -f athfw2lnx 12 | -------------------------------------------------------------------------------- /sboot/utility/athfw2lnx/athfw2lnx.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #include 36 | #include 37 | #include 38 | 39 | /* These names may vary but this is typical */ 40 | extern const uint32_t zcFwImage[]; 41 | extern const uint32_t zcFwImageSize; 42 | 43 | int main() 44 | { 45 | uint32_t i; 46 | for (i = 0; i < zcFwImageSize/4; i++) 47 | write(1, &zcFwImage[i], 4); 48 | } 49 | -------------------------------------------------------------------------------- /sboot/utility/bin2hex/Makefile: -------------------------------------------------------------------------------- 1 | TARGET = ../bin/bin2hex # for Linux environment 2 | TARGET_DIR = ../bin 3 | E=echo 4 | 5 | all: $(TARGET) 6 | 7 | $(TARGET): 8 | @mkdir -p $(TARGET_DIR) 9 | gcc -o $(TARGET) bin2hex.c 10 | @$(E) " CC " $@ 11 | 12 | clean: 13 | -rm $(TARGET) 14 | -------------------------------------------------------------------------------- /sboot/utility/imghdr/Makefile: -------------------------------------------------------------------------------- 1 | TARGET = ../bin/imghdr # for Linux environment 2 | #TARGET = ../bin/bin2hex.exe # for CygWin environment 3 | 4 | all: $(TARGET) 5 | 6 | $(TARGET): 7 | gcc -o $(TARGET) imghdr.c 8 | 9 | clean: 10 | -rm $(TARGET) 11 | -------------------------------------------------------------------------------- /sboot/utility/patch_gen/Makefile: -------------------------------------------------------------------------------- 1 | TARGET = ../bin/patch_gen # for Linux environment 2 | #TARGET = ../bin/_gen.exe # for CygWin environment 3 | 4 | INC = $(HOME)/project/src/inc 5 | 6 | all: $(TARGET) 7 | 8 | $(TARGET): 9 | gcc -o $(TARGET) -I$(INC) main.c patch.c 10 | 11 | 12 | clean: 13 | -rm $(TARGET) 14 | -------------------------------------------------------------------------------- /sboot/utility/patch_gen/patch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #include "dt_defs.h" 36 | 37 | #define MAX_NUM_OF_PATCH 16 38 | 39 | struct rom_patch_st { 40 | #if 0 41 | uint16_t len; 42 | uint16_t crc16; 43 | #else 44 | uint16_t crc16; 45 | uint16_t len; 46 | #endif 47 | uint32_t ld_addr; 48 | uint32_t fun_addr; // entry address of the patch code 49 | uint8_t *fun; 50 | }; 51 | -------------------------------------------------------------------------------- /scripts/pre-commit.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec git diff --cached | scripts/checkpatch.pl --no-signoff --no-tree -q - 4 | -------------------------------------------------------------------------------- /target_firmware/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /toolchain 3 | /*.fw 4 | -------------------------------------------------------------------------------- /target_firmware/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | [ -d build ] || ./configure || { rm -rf build; false; } 3 | +$(MAKE) -C build/k2 4 | +$(MAKE) -C build/magpie 5 | cp build/k2/htc_*.fw build/magpie/htc_*.fw . 6 | 7 | clean: 8 | rm -rf build htc_*.fw 9 | -------------------------------------------------------------------------------- /target_firmware/configure: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | TOOLCHAIN=$PWD/../toolchain/inst 3 | TARGET=xtensa-elf 4 | PREFIX="$TOOLCHAIN/bin/$TARGET-" 5 | TOOLCHAIN_FILE=$PWD/build/toolchain.cmake 6 | 7 | set -e 8 | rm -rf build 9 | mkdir -p build 10 | 11 | cat > "$TOOLCHAIN_FILE" <caller_fn(ctx->caller_arg); 43 | } 44 | 45 | 46 | -------------------------------------------------------------------------------- /target_firmware/magpie_fw_dev/target/adf/adf_os_irq_pvt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #ifndef __ADF_OS_IRQ_PVT_H 36 | #define __ADF_OS_IRQ_PVT_H 37 | 38 | int __adf_os_setup_intr(__adf_os_device_t osdev, adf_os_drv_intr fn); 39 | void __adf_os_free_intr(__adf_os_device_t osdev); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /target_firmware/magpie_fw_dev/target/adf/adf_os_timer.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #include 36 | #include 37 | 38 | void 39 | __adf_os_timer_func(A_HANDLE timer_handle, void *arg) 40 | { 41 | __adf_os_timer_t *timer = (__adf_os_timer_t *)timer_handle; 42 | 43 | timer->timer_func(arg); 44 | } 45 | -------------------------------------------------------------------------------- /target_firmware/magpie_fw_dev/target/buf_pool/buf_pool_static.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | /* 36 | * @File: 37 | * 38 | * @Abstract: 39 | * 40 | * @Notes: 41 | */ 42 | 43 | #ifndef BUF_POOL_STATIC_H_ 44 | #define BUF_POOL_STATIC_H_ 45 | 46 | typedef struct _BUF_POOL_STATIC_CONTEXT { 47 | VBUF *bufQ[POOL_ID_MAX]; 48 | 49 | // Left a door for extension the structure 50 | void *pReserved; 51 | } BUF_POOL_STATIC_CONTEXT; 52 | 53 | #endif /*BUF_POOL_STATIC_H_*/ 54 | -------------------------------------------------------------------------------- /target_firmware/magpie_fw_dev/target/cmnos/cmnos_sflash.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vanhoefm/modwifi-ath9k-htc/781b8daa5e9a19a0d6c1c4d1a9fda1ffcb18be92/target_firmware/magpie_fw_dev/target/cmnos/cmnos_sflash.c -------------------------------------------------------------------------------- /target_firmware/magpie_fw_dev/target/cmnos/printf_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #ifndef __PRINTF_API_H__ 36 | #define __PRINTF_API_H__ 37 | 38 | struct printf_api { 39 | void (* _printf_init)(void); 40 | int (* _printf)(const char * fmt, ...); 41 | }; 42 | 43 | /* NB: The printf module requires the serial module. */ 44 | void cmnos_printf_module_install(struct printf_api *tbl); 45 | int cmnos_printf(const char *fmt, ...); 46 | 47 | 48 | 49 | #endif /* __PRINTF_API_H__ */ 50 | -------------------------------------------------------------------------------- /target_firmware/magpie_fw_dev/target/inc/adf_os_irq.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #ifndef __ADF_OS_IRQ_H 36 | #define __ADF_OS_IRQ_H 37 | 38 | #include 39 | #include 40 | 41 | static inline int 42 | adf_os_setup_intr(adf_os_device_t osdev, adf_os_drv_intr fn) 43 | { 44 | return __adf_os_setup_intr(osdev, fn); 45 | } 46 | 47 | static inline void 48 | adf_os_free_intr(adf_os_device_t osdev) 49 | { 50 | __adf_os_free_intr(osdev); 51 | } 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /target_firmware/magpie_fw_dev/target/inc/k2/mem_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #ifndef __MEM_API_H__ 36 | #define __MEM_API_H__ 37 | 38 | struct mem_api { 39 | void (* _mem_init)(void); 40 | void *(* _memset)(void *, int, unsigned int); 41 | void *(* _memcpy)(void *, const void *, unsigned int); 42 | void *(* _memmove)(void *, const void *, unsigned int); 43 | int (* _memcmp)(const void *, const void *, unsigned int); 44 | }; 45 | 46 | #endif /* __MEM_API_H__ */ 47 | -------------------------------------------------------------------------------- /target_firmware/magpie_fw_dev/target/inc/k2/opt_ah.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #define AH_SUPPORT_AR5416 1 36 | #define AH_SUPPORT_2133 1 37 | #define AH_SUPPORT_5413 1 38 | #define AH_DEBUG 1 39 | #define AR5416_EMULATION 1 40 | #define ATH_FORCE_PPM 1 41 | #define ATH_FORCE_BIAS 1 42 | #define AH_SUPPORT_DFS 1 43 | -------------------------------------------------------------------------------- /target_firmware/magpie_fw_dev/target/inc/k2/printf_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #ifndef __PRINTF_API_H__ 36 | #define __PRINTF_API_H__ 37 | 38 | struct printf_api { 39 | void (* _printf_init)(void); 40 | int (* _printf)(const char * fmt, ...); 41 | }; 42 | 43 | /* NB: The printf module requires the serial module. */ 44 | void cmnos_printf_module_install(struct printf_api *tbl); 45 | 46 | 47 | #endif /* __PRINTF_API_H__ */ 48 | -------------------------------------------------------------------------------- /target_firmware/magpie_fw_dev/target/inc/k2/string_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #ifndef __STRING_API_H__ 36 | #define __STRING_API_H__ 37 | 38 | struct string_api { 39 | void (* _string_init)(void); 40 | char *(* _strcpy)(char *, const char *); 41 | char *(* _strncpy)(char *, const char *, unsigned int); 42 | int (* _strlen)(const char *); 43 | int (* _strcmp)(const char *, const char *); 44 | int (* _strncmp)(const char *, const char *, unsigned int); 45 | }; 46 | 47 | #endif /* __STRING_API_H__ */ 48 | -------------------------------------------------------------------------------- /target_firmware/magpie_fw_dev/target/inc/magpie/dma_lib.h: -------------------------------------------------------------------------------- 1 | #ifndef __DMA_LIB_H 2 | #define __DMA_LIB_H 3 | 4 | 5 | /***********************External***************************/ 6 | 7 | /** 8 | * @brief DMA engine numbers, HIF need to map them to there 9 | * respective order 10 | */ 11 | typedef enum dma_engine{ 12 | DMA_ENGINE_RX0, 13 | DMA_ENGINE_RX1, 14 | DMA_ENGINE_RX2, 15 | DMA_ENGINE_RX3, 16 | DMA_ENGINE_TX0, 17 | DMA_ENGINE_TX1, 18 | DMA_ENGINE_MAX 19 | }dma_engine_t; 20 | 21 | /** 22 | * @brief Interface type, each HIF should call with its own interface type 23 | */ 24 | typedef enum dma_iftype{ 25 | DMA_IF_GMAC = 0x0,/* GMAC */ 26 | DMA_IF_PCI = 0x1,/*PCI */ 27 | DMA_IF_PCIE = 0x2 /*PCI Express */ 28 | }dma_iftype_t; 29 | 30 | 31 | struct dma_lib_api{ 32 | A_UINT16 (*tx_init)(dma_engine_t eng_no, dma_iftype_t if_type); 33 | void (*tx_start)(dma_engine_t eng_no); 34 | A_UINT16 (*rx_init)(dma_engine_t eng_no, dma_iftype_t if_type); 35 | void (*rx_config)(dma_engine_t eng_no, a_uint16_t num_desc, 36 | a_uint16_t gran); 37 | void (*rx_start)(dma_engine_t eng_no); 38 | A_UINT32 (*intr_status)(dma_iftype_t if_type); 39 | A_UINT16 (*hard_xmit)(dma_engine_t eng_no, VBUF *buf); 40 | void (*flush_xmit)(dma_engine_t eng_no); 41 | A_UINT16 (*xmit_done)(dma_engine_t eng_no); 42 | VBUF * (*reap_xmitted)(dma_engine_t eng_no); 43 | VBUF * (*reap_recv)(dma_engine_t eng_no); 44 | void (*return_recv)(dma_engine_t eng_no, VBUF *buf); 45 | A_UINT16 (*recv_pkt)(dma_engine_t eng_no); 46 | }; 47 | 48 | 49 | /** 50 | * @brief Install the DMA lib api's this for ROM patching 51 | * support 52 | * 53 | * @param apis 54 | */ 55 | void dma_lib_module_install(struct dma_lib_api *apis); 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /target_firmware/magpie_fw_dev/target/inc/magpie/hif_pci.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __HIF_PCI_H 3 | #define __HIF_PCI_H 4 | 5 | #include 6 | #include 7 | 8 | 9 | #define PCI_MAX_DATA_PKT_LEN 1664 10 | #define PCI_MAX_CMD_PKT_LEN 512 11 | #define PCI_MAX_BOOT_DESC 2 12 | 13 | typedef enum hif_pci_pipe_rx{ 14 | HIF_PCI_PIPE_RX0, /*Normal Priority RX*/ 15 | HIF_PCI_PIPE_RX1, 16 | HIF_PCI_PIPE_RX2, 17 | HIF_PCI_PIPE_RX3, 18 | HIF_PCI_PIPE_RX_MAX 19 | }hif_pci_pipe_rx_t; 20 | 21 | typedef enum hif_pci_pipe_tx{ 22 | HIF_PCI_PIPE_TX0, /*Normal Priority TX*/ 23 | HIF_PCI_PIPE_TX1, 24 | HIF_PCI_PIPE_TX_MAX 25 | }hif_pci_pipe_tx_t; 26 | 27 | typedef struct __pci_softc{ 28 | HIF_CALLBACK sw; 29 | }__pci_softc_t; 30 | 31 | struct hif_pci_api{ 32 | void (*pci_boot_init)(void); 33 | hif_handle_t (*pci_init)(HIF_CONFIG *pConfig); 34 | void (*pci_reset)(void); 35 | void (*pci_enable)(void); 36 | void (*pci_reap_xmitted)(__pci_softc_t *sc, 37 | dma_engine_t eng_no); 38 | void (*pci_reap_recv)(__pci_softc_t *sc, dma_engine_t eng_no); 39 | A_UINT8 (*pci_get_pipe)(dma_engine_t eng); 40 | dma_engine_t (*pci_get_tx_eng)(hif_pci_pipe_tx_t pipe); 41 | dma_engine_t (*pci_get_rx_eng)(hif_pci_pipe_rx_t pipe); 42 | 43 | }; 44 | 45 | void hif_pci_api_install(struct hif_pci_api *apis); 46 | void hif_pci_module_install(struct hif_api *apis); 47 | #endif 48 | 49 | 50 | -------------------------------------------------------------------------------- /target_firmware/magpie_fw_dev/target/inc/magpie/hif_usb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @File: mbox_hw.h 3 | * 4 | * @Abstract: mailbox hardware definitions 5 | * 6 | * @Notes: 7 | * * 8 | * Copyright (c) 2008 Atheros Communications Inc. 9 | * All rights reserved. 10 | * 11 | */ 12 | 13 | #ifndef __HIF_USB_H__ 14 | #define __HIF_USB_H__ 15 | 16 | #include 17 | 18 | #include 19 | #include 20 | #include 21 | //#include 22 | //#include 23 | 24 | #define HIF_USB_PIPE_TX 1 25 | #define HIF_USB_PIPE_RX 2 26 | #define HIF_USB_PIPE_INTERRUPT 3 27 | #define HIF_USB_PIPE_COMMAND 4 28 | #define HIF_USB_PIPE_HP_TX 5 29 | #define HIF_USB_PIPE_MP_TX 6 30 | 31 | struct VBUF_QUEUE 32 | { 33 | VBUF *head; 34 | VBUF *tail; 35 | }; 36 | 37 | /* the mailbox hardware layer context */ 38 | typedef struct _HIF_USB_CONTEXT { 39 | HIF_CALLBACK hifCb; 40 | struct zsDmaQueue dnQ; 41 | struct zsTxDmaQueue upQ; 42 | #if SYSTEM_MODULE_HP_EP5 43 | struct zsDmaQueue hpdnQ; // high priority 44 | #endif 45 | #if SYSTEM_MODULE_HP_EP6 46 | struct zsDmaQueue mpdnQ; // medium priority 47 | #endif 48 | //struct VBUF_QUEUE upVbufQ; 49 | VBUF *cmdQueue; 50 | struct VBUF_QUEUE eventBufQ; 51 | 52 | // Left a door for extension the structure 53 | void *pReserved; 54 | } HIF_USB_CONTEXT; 55 | 56 | void hif_usb_module_install(struct hif_api *apis); 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /target_firmware/magpie_fw_dev/target/inc/magpie/mem_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #ifndef __MEM_API_H__ 36 | #define __MEM_API_H__ 37 | struct mem_api { 38 | void (* _mem_init)(void); 39 | void *(* _memset)(void *, int, unsigned int); 40 | void *(* _memcpy)(void *, const void *, unsigned int); 41 | void *(* _memmove)(void *, const void *, unsigned int); 42 | int (* _memcmp)(const void *, const void *, unsigned int); 43 | }; 44 | #endif /* __MEM_API_H__ */ 45 | -------------------------------------------------------------------------------- /target_firmware/magpie_fw_dev/target/inc/magpie/opt_ah.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #define AH_SUPPORT_AR5416 1 36 | #define AH_SUPPORT_2133 1 37 | #define AH_SUPPORT_5413 1 38 | //#define AH_DEBUG 1 39 | //#define AR5416_EMULATION 1 40 | #define ATH_FORCE_PPM 1 41 | #define ATH_FORCE_BIAS 1 42 | #define AH_SUPPORT_DFS 1 43 | -------------------------------------------------------------------------------- /target_firmware/magpie_fw_dev/target/inc/magpie/printf_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #ifndef __PRINTF_API_H__ 36 | #define __PRINTF_API_H__ 37 | 38 | struct printf_api { 39 | void (* _printf_init)(void); 40 | int (* _printf)(const char * fmt, ...); 41 | }; 42 | 43 | /* NB: The printf module requires the serial module. */ 44 | void cmnos_printf_module_install(struct printf_api *tbl); 45 | int cmnos_printf(const char *fmt, ...); 46 | 47 | 48 | 49 | #endif /* __PRINTF_API_H__ */ 50 | -------------------------------------------------------------------------------- /target_firmware/magpie_fw_dev/target/inc/magpie/string_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | #ifndef __STRING_API_H__ 36 | #define __STRING_API_H__ 37 | struct string_api { 38 | void (* _string_init)(void); 39 | char *(* _strcpy)(char *, const char *); 40 | char *(* _strncpy)(char *, const char *, unsigned int); 41 | int (* _strlen)(const char *); 42 | int (* _strcmp)(const char *, const char *); 43 | int (* _strncmp)(const char *, const char *, unsigned int); 44 | }; 45 | #endif /* __STRING_API_H__ */ 46 | -------------------------------------------------------------------------------- /target_firmware/magpie_fw_dev/target/inc/magpie/vdesc_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * @File: VBUF_api.h 3 | * 4 | * @Abstract: Host Interface api 5 | * 6 | * @Notes: 7 | * 8 | * Copyright (c) 2008 Atheros Communications Inc. 9 | * All rights reserved. 10 | * 11 | */ 12 | 13 | #ifndef _VDESC_API_H 14 | #define _VDESC_API_H 15 | 16 | //#define VDESC_CONTROL_BUF_HDR (1 << 6) /* the buffer was manipulated and a header added */ 17 | 18 | #define MAX_HW_DESC_SIZE 20 19 | 20 | typedef struct _VDESC 21 | { 22 | struct _VDESC *next_desc; 23 | A_UINT8 *buf_addr; 24 | A_UINT16 buf_size; 25 | A_UINT16 data_offset; 26 | A_UINT16 data_size; 27 | A_UINT16 control; 28 | A_UINT8 hw_desc_buf[MAX_HW_DESC_SIZE]; 29 | } VDESC; 30 | 31 | //#define VDESC_HW_TO_VDESC(hwdesc) ((VDESC *)(((A_UINT32 *)hwdesc - 4))) 32 | #define VDESC_HW_TO_VDESC(hwdesc) ((VDESC *)(((A_UINT32 *)hwdesc - 4))) 33 | 34 | struct vdesc_api { 35 | void (*_init)(int nDesc); 36 | VDESC* (*_alloc_vdesc)(); 37 | A_UINT8* (*_get_hw_desc)(VDESC *desc); 38 | void (*_swap_vdesc)(VDESC *dest, VDESC *src); 39 | //void (*_free_vdesc)(void); 40 | /* room to expand this table by another table */ 41 | void *pReserved; 42 | }; 43 | 44 | extern void vdesc_module_install(struct vdesc_api *apis); 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /target_firmware/wlan/attacks.h: -------------------------------------------------------------------------------- 1 | #ifndef ATTACKS_H 2 | #define ATTACKS_H 3 | 4 | // Utility functions 5 | int attack_confradio(struct ath_softc_tgt *sc, int jam); 6 | struct ath_tx_buf * attack_build_packet(struct ath_softc_tgt *sc, uint8_t *data, 7 | a_int32_t len, char waitack, unsigned char destmac[6]); 8 | void attack_free_packet(struct ath_softc_tgt *sc, struct ath_tx_buf *bf); 9 | 10 | // Attack implementations 11 | int attack_reactivejam(struct ath_softc_tgt *sc, unsigned char source[6], 12 | unsigned int msecs); 13 | int attack_constantjam_start(struct ath_softc_tgt *sc, char waitack, 14 | unsigned char destmac[6], a_uint16_t length); 15 | int attack_constantjam_stop(struct ath_softc_tgt *sc); 16 | int attack_fastreply(struct ath_softc_tgt *sc, struct ath_tx_buf *bf, 17 | unsigned char source[6], unsigned int msecs, int jam); 18 | 19 | #endif // ATTACKS_H 20 | 21 | -------------------------------------------------------------------------------- /target_firmware/wlan/debug.h: -------------------------------------------------------------------------------- 1 | #ifndef _DEV_ATH_DEBUG_H 2 | #define _DEV_ATH_DEBUG_H 3 | /** 4 | * It is useful to have basic debug output over USB. Note that for more 5 | * serious debugging/problems you still have to use a UART. 6 | */ 7 | 8 | #include "wlan_hdr.h" 9 | #include "ah_desc.h" 10 | 11 | /** Add a message to debug log */ 12 | int printk(const char *format); 13 | /** Convert number to hexadecimal representation */ 14 | const char *itox(unsigned int val); 15 | /** Get the current debug messages, starting from a given offset */ 16 | unsigned int get_dmesg(unsigned int offset, char *buffer, unsigned int length); 17 | 18 | void dump_rx_macbufs(struct ath_hal *ah); 19 | void dump_rx_tailq(struct ath_softc_tgt *sc); 20 | void dump_buffer(unsigned char *buffer, int size); 21 | 22 | void dump_skb(adf_nbuf_t skb); 23 | void dump_skb_data(adf_nbuf_t skb); 24 | void dump_ath_data_hdr_t(ath_data_hdr_t *hd); 25 | void dump_rx_status(struct ath_rx_status *status); 26 | 27 | #endif // _DEV_ATH_DEBUG_H 28 | 29 | -------------------------------------------------------------------------------- /target_firmware/wlan/ieee80211_linux.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 Qualcomm Atheros, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted (subject to the limitations in the 7 | * disclaimer below) provided that the following conditions are met: 8 | * 9 | * * Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * * Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * * Neither the name of Qualcomm Atheros nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE 22 | * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT 23 | * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED 24 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 25 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 27 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 33 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | */ 35 | 36 | #define _LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ 37 | #define _BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */ 38 | #if defined(ADF_LITTLE_ENDIAN_MACHINE) 39 | #define _BYTE_ORDER _LITTLE_ENDIAN 40 | #elif defined(ADF_BIG_ENDIAN_MACHINE) 41 | #define _BYTE_ORDER _BIG_ENDIAN 42 | #else 43 | #error "Please fix asm/byteorder.h" 44 | #endif 45 | -------------------------------------------------------------------------------- /target_firmware/wlan/if_ath_pci.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2002-2004 Sam Leffler, Errno Consulting 3 | * Copyright (c) 2004 Atheros Communications, Inc. 4 | * All rights reserved. 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer, 11 | * without modification. 12 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer 13 | * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any 14 | * redistribution must be conditioned upon including a substantially 15 | * similar Disclaimer requirement for further binary redistribution. 16 | * 3. Neither the names of the above-listed copyright holders nor the names 17 | * of any contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * Alternatively, this software may be distributed under the terms of the 21 | * GNU General Public License ("GPL") version 2 as published by the Free 22 | * Software Foundation. 23 | * 24 | * NO WARRANTY 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 26 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 27 | * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY 28 | * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 29 | * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 30 | * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 33 | * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 35 | * THE POSSIBILITY OF SUCH DAMAGES. 36 | * 37 | * $Id: //depot/sw/branches/fusion_usb/target_firmware/wlan/target/madwifi/ath/if_ath_pci.h#1 $ 38 | */ 39 | 40 | #ifndef _DEV_ATH_PCI_H_ 41 | #define _DEV_ATH_PCI_H_ 42 | 43 | #define ATH_PCI_CACHE_LINE_SIZE 0x0c 44 | #define ATH_PCI_LATENCY_TIMER 0x0d 45 | 46 | #endif /* _DEV_ATH_PCI_H_ */ 47 | -------------------------------------------------------------------------------- /target_firmware/wlan/modwifi.h: -------------------------------------------------------------------------------- 1 | #ifndef MODWIFI_H 2 | #define MODWIFI_H 3 | 4 | //#define DEBUG_INJECT_AMPDU 5 | 6 | #ifdef DEBUG_INJECT_AMPDU 7 | #define PRINTK_AMPDU(x) printk(x) 8 | #else 9 | #define PRINTK_AMPDU(x) 10 | #endif 11 | 12 | #endif // MODWIFI_H 13 | --------------------------------------------------------------------------------