├── .gitignore ├── Ai-BR100 ├── CHANGELOG ├── COPYING ├── CREDITS ├── MAINTAINERS ├── MAKEALL ├── Makefile ├── README ├── board └── rt2880 │ ├── Makefile │ ├── config.mk │ ├── flash.c │ ├── include │ ├── CpuCp0RegDef.h │ ├── aux_intc.h │ ├── aux_reg_map.h │ ├── chip_reg_map.h │ ├── compiler.h │ ├── cpu.h │ ├── cpu_except.h │ ├── ethernet.h │ ├── except.h │ ├── ide3710.h │ ├── intc.h │ ├── lcd.h │ ├── mac.h │ ├── mac.inc │ ├── mem_init.inc │ ├── mem_map.h │ ├── mem_map_1fc0.h │ ├── mem_tst.h │ ├── palmpak_tst.h │ ├── pio.h │ ├── product.h │ ├── pubdefs.h │ ├── regdef.h │ ├── sysc.h │ ├── timer.h │ └── uart.h │ ├── memsetup.S │ ├── rt2880.c │ ├── rt2880_init.S │ ├── serial.c │ ├── serial.h │ └── u-boot.lds ├── common ├── Makefile ├── cmd_bdinfo.c ├── cmd_boot.c ├── cmd_bootm.c ├── cmd_console.c ├── cmd_fat.c ├── cmd_flash.c ├── cmd_load.c ├── cmd_mem.c ├── cmd_misc.c ├── cmd_net.c ├── cmd_nvedit.c ├── cmd_usb.c ├── command.c ├── console.c ├── devices.c ├── dlmalloc.c ├── env_common.c ├── env_flash.c ├── env_nand.c ├── env_spi.c ├── environment.c ├── exports.c ├── flash.c ├── gpio.c ├── libcommon.a.map ├── lists.c ├── main.c ├── usb.c └── usb_storage.c ├── config.in ├── config.mk ├── cpu └── ralink_soc │ ├── Makefile │ ├── cache.S │ ├── config.mk │ ├── cpu.c │ ├── interrupts.c │ └── start.S ├── disk ├── Makefile ├── part.c ├── part_amiga.c ├── part_amiga.h ├── part_dos.c ├── part_dos.h ├── part_iso.c ├── part_iso.h ├── part_mac.c └── part_mac.h ├── doc ├── I2C_Edge_Conditions ├── README-i386 ├── README.ARM-SoC ├── README.ARM-memory-map ├── README.COBRA5272 ├── README.EVB-64260-750CX ├── README.INCA-IP ├── README.IPHASE4539 ├── README.IceCube ├── README.JFFS2 ├── README.JFFS2_NAND ├── README.MBX ├── README.MPC866 ├── README.Modem ├── README.NetConsole ├── README.OXC ├── README.PIP405 ├── README.POST ├── README.PXA_CF ├── README.Purple ├── README.RPXClassic ├── README.RPXlite ├── README.SBC8560 ├── README.Sandpoint8240 ├── README.TQM8260 ├── README.VLAN ├── README.adnpesc1 ├── README.adnpesc1_base32 ├── README.alaska8220 ├── README.amigaone ├── README.autoboot ├── README.bedbug ├── README.cmi ├── README.commands ├── README.commands.itest ├── README.console ├── README.db64360 ├── README.db64460 ├── README.dk1c20 ├── README.dk1c20_std32 ├── README.dk1s10 ├── README.dk1s10_mldk20 ├── README.dk1s10_std32 ├── README.dk1s40_std32 ├── README.dk20k200_std32 ├── README.ebony ├── README.evb64260 ├── README.fads ├── README.idma2intr ├── README.lynxkdi ├── README.m68k ├── README.ml300 ├── README.modnet50 ├── README.mpc5xx ├── README.mpc74xx ├── README.mpc85xxads ├── README.mpc85xxcds ├── README.nand ├── README.ne2000 ├── README.nios ├── README.nios_CFG_NIOS_CPU ├── README.nios_DK ├── README.ns9750dev ├── README.ocotea ├── README.omap730p2 ├── README.ppc440 ├── README.sbc8560 ├── README.sched ├── README.serial_multi ├── README.silent ├── README.standalone ├── README.usb ├── README.video ├── README.xpedite1k └── TODO-i386 ├── drivers ├── Makefile ├── bbu_spiflash.h ├── ehci-core.h ├── ehci-hcd.c ├── ehci-ra.c ├── ehci.h ├── i2c_drv.c ├── mii_mgr.c ├── msdc │ ├── config.h │ ├── mmc_core.c │ ├── mmc_core.h │ ├── mmc_test.c │ ├── mmc_test.h │ ├── msdc.c │ ├── msdc.h │ ├── msdc_cust.c │ ├── msdc_cust.h │ ├── msg.h │ ├── sdio.h │ ├── test_result │ │ ├── msdc_all │ │ ├── msdc_blklen │ │ ├── msdc_card_detect │ │ ├── msdc_card_erase │ │ ├── msdc_card_init │ │ ├── msdc_cmd12 │ │ ├── msdc_dma_basic │ │ ├── msdc_dma_desc │ │ ├── msdc_dma_enhance │ │ ├── msdc_pio │ │ └── msdc_stress │ ├── ts_msdc.c │ └── utils.h ├── nand_flash.c ├── ohci-hcd.c ├── ohci.h ├── phy_val.c ├── phy_val.h ├── ralink_nand.h ├── ralink_spi.h ├── rt2880_eth.c ├── spi_drv.c ├── spi_flash.c ├── spi_rt6855A_flash.c └── vtss.h ├── fs ├── Makefile └── fat │ ├── Makefile │ ├── fat.c │ ├── fat.c.old │ └── file.c ├── httpd ├── Makefile ├── fs.c ├── fs.h ├── fsdata.h ├── httpd.c ├── httpd.h ├── main.c ├── tapdev.c ├── tapdev.h ├── uip.c ├── uip.h ├── uip_arch.c ├── uip_arch.h ├── uip_arp.c ├── uip_arp.h ├── uipopt.h └── vendors │ ├── cleanwrt │ ├── 404.html │ ├── art.html │ ├── fail.html │ ├── flashing.html │ ├── index.html │ ├── style.css │ └── uboot.html │ ├── general │ ├── 404.html │ ├── art.html │ ├── fail.html │ ├── flashing.html │ ├── index.html │ ├── style.css │ └── uboot.html │ ├── makefsdatac │ └── yuicompressor-2.4.8.jar ├── include ├── LzmaDecode.h ├── _exports.h ├── altera.h ├── asm-mips │ ├── addrspace.h │ ├── au1x00.h │ ├── bitops.h │ ├── byteorder.h │ ├── cachectl.h │ ├── cacheops.h │ ├── global_data.h │ ├── inca-ip.h │ ├── io.h │ ├── isadep.h │ ├── mipsregs.h │ ├── posix_types.h │ ├── processor.h │ ├── ptrace.h │ ├── reg.h │ ├── regdef.h │ ├── sgidefs.h │ ├── string.h │ ├── system.h │ ├── types.h │ └── u-boot.h ├── asm │ ├── addrspace.h │ ├── au1x00.h │ ├── bitops.h │ ├── byteorder.h │ ├── cachectl.h │ ├── cacheops.h │ ├── global_data.h │ ├── inca-ip.h │ ├── io.h │ ├── isadep.h │ ├── mipsregs.h │ ├── posix_types.h │ ├── processor.h │ ├── ptrace.h │ ├── reg.h │ ├── regdef.h │ ├── sgidefs.h │ ├── string.h │ ├── system.h │ ├── types.h │ ├── u-boot.h │ └── unaligned.h ├── ata.h ├── bedbug │ ├── bedbug.h │ ├── ppc.h │ ├── regs.h │ ├── tables.h │ └── type.h ├── bmp_layout.h ├── bmp_logo.h ├── bzlib.h ├── circbuf.h ├── cmd_confdefs.h ├── command.h ├── common.h ├── config.h ├── config.mk ├── configs │ └── rt2880.h ├── console.h ├── devices.h ├── environment.h ├── exports.h ├── fat.h ├── fat_old.h ├── flash.h ├── fpga.h ├── gpio.h ├── hush.h ├── i2c.h ├── ide.h ├── image.h ├── kgdb.h ├── linux │ ├── bitops.h │ ├── byteorder │ │ ├── big_endian.h │ │ ├── generic.h │ │ ├── little_endian.h │ │ └── swab.h │ ├── config.h │ ├── ctype.h │ ├── mc146818rtc.h │ ├── mtd │ │ ├── doc2000.h │ │ ├── nand.h │ │ ├── nand_ids.h │ │ └── nftl.h │ ├── posix_types.h │ ├── stat.h │ ├── stddef.h │ ├── string.h │ ├── time.h │ ├── types.h │ └── unaligned │ │ ├── access_ok.h │ │ ├── be_byteshift.h │ │ ├── generic.h │ │ └── le_byteshift.h ├── lists.h ├── logbuff.h ├── lzma │ ├── LzmaDec.h │ ├── LzmaTools.h │ └── LzmaTypes.h ├── malloc.h ├── mk48t59.h ├── nand_api.h ├── net.h ├── part.h ├── post.h ├── rt_mmap.h ├── rtc.h ├── s_record.h ├── scsi.h ├── serial.h ├── spi.h ├── spi_api.h ├── systemace.h ├── unxz.h ├── usb.h ├── usb_defs.h ├── version.h ├── watchdog.h ├── xilinx.h ├── xz.h └── zlib.h ├── lib_generic ├── LzmaDec.h ├── LzmaDecode.c ├── LzmaTools.h ├── Makefile ├── Types.h ├── bzlib.c ├── bzlib_crctable.c ├── bzlib_decompress.c ├── bzlib_huffman.c ├── bzlib_private.h ├── bzlib_randtable.c ├── crc32.c ├── ctype.c ├── decompress_unxz.c ├── display_options.c ├── string.c ├── vsprintf.c ├── xz_dec_bcj.c ├── xz_dec_lzma2.c ├── xz_dec_stream.c ├── xz_lzma2.h ├── xz_private.h ├── xz_stream.h └── zlib.c ├── lib_mips ├── Makefile ├── board.c ├── mips_linux.c └── time.c ├── mips_config.mk ├── mkconfig ├── net ├── Makefile ├── bootp.c ├── bootp.h ├── eth.c ├── httpd.c ├── httpd.h ├── net.c ├── rarp.c ├── rarp.h ├── tftp.c └── tftp.h ├── rtc ├── Makefile └── date.c ├── scripts ├── Configure ├── Makefile ├── Menuconfig ├── README.Menuconfig ├── README.uClinux ├── header.tk ├── lxdialog │ ├── BIG.FAT.WARNING │ ├── Makefile │ ├── checklist.c │ ├── colors.h │ ├── dialog.h │ ├── inputbox.c │ ├── lxdialog.c │ ├── menubox.c │ ├── msgbox.c │ ├── textbox.c │ ├── util.c │ └── yesno.c ├── tail.tk ├── tkcond.c ├── tkgen.c ├── tkparse.c └── tkparse.h ├── stage1 ├── Makefile ├── boot.c ├── gdma.c ├── nandc.c ├── stage1n2.lds └── start.S ├── tools ├── Makefile ├── crc32.c ├── image.h └── mkimage.c └── u-boot_version.h /.gitignore: -------------------------------------------------------------------------------- 1 | *.core 2 | .*.swp 3 | *.o 4 | *.a 5 | .depend 6 | tools/mkimage 7 | scripts/lxdialog/lxdialog 8 | util/addmg 9 | System.map 10 | uboot.trx 11 | u-boot 12 | u-boot.map 13 | u-boot.srec 14 | uboot.bin 15 | uboot_128k.bin 16 | uboot.img 17 | uboot_rom.bin 18 | -------------------------------------------------------------------------------- /Ai-BR100: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated by make menuconfig: don't edit 3 | # 4 | CONFIG_CROSS_COMPILER_PATH="/home/foo/.buildroot-gcc342/bin" 5 | ASIC_BOARD=y 6 | # RT2880_ASIC_BOARD is not set 7 | # RT3350_ASIC_BOARD is not set 8 | # RT3052_ASIC_BOARD is not set 9 | # RT3352_ASIC_BOARD is not set 10 | # RT3883_ASIC_BOARD is not set 11 | # RT5350_ASIC_BOARD is not set 12 | # RT6855A_ASIC_BOARD is not set 13 | MT7620_ASIC_BOARD=y 14 | MT7620_MP=y 15 | P5_MAC_TO_NONE_MODE=y 16 | # P5_MAC_TO_PHY_MODE is not set 17 | # P5_RGMII_TO_MAC_MODE is not set 18 | # P5_MII_TO_MAC_MODE is not set 19 | # P5_RMII_TO_MAC_MODE is not set 20 | P4_MAC_TO_NONE_MODE=y 21 | # P4_MAC_TO_PHY_MODE is not set 22 | # P4_RGMII_TO_MAC_MODE is not set 23 | # P4_MII_TO_MAC_MODE is not set 24 | # P4_RMII_TO_MAC_MODE is not set 25 | # ON_BOARD_NAND_FLASH_COMPONENT is not set 26 | ON_BOARD_SPI_FLASH_COMPONENT=y 27 | # ON_BOARD_SDR is not set 28 | # ON_BOARD_DDR1 is not set 29 | ON_BOARD_DDR2=y 30 | # ON_BOARD_256M_DRAM_COMPONENT is not set 31 | ON_BOARD_512M_DRAM_COMPONENT=y 32 | # ON_BOARD_1024M_DRAM_COMPONENT is not set 33 | # ON_BOARD_2048M_DRAM_COMPONENT is not set 34 | # ON_BOARD_DDR_WIDTH_8 is not set 35 | ON_BOARD_DDR_WIDTH_16=y 36 | ON_BOARD_16BIT_DRAM_BUS=y 37 | PDMA_NEW=y 38 | RX_SCATTER_GATTER_DMA=y 39 | # UBOOT_RAM is not set 40 | UBOOT_ROM=y 41 | # CPLL_NONE is not set 42 | # CPLL_FROM_480MHZ is not set 43 | # CPLL_FROM_XTAL is not set 44 | CPLL_FROM_CONF=y 45 | # MT7620_PLL_MULTI_RATIO_24 is not set 46 | # MT7620_PLL_MULTI_RATIO_25 is not set 47 | # MT7620_PLL_MULTI_RATIO_26 is not set 48 | # MT7620_PLL_MULTI_RATIO_27 is not set 49 | # MT7620_PLL_MULTI_RATIO_28 is not set 50 | MT7620_PLL_MULTI_RATIO_29=y 51 | # MT7620_PLL_MULTI_RATIO_30 is not set 52 | CPLL_MULTI_RATIO_CFG=5 53 | MT7620_PLL_DIV_RATIO_2=y 54 | # MT7620_PLL_DIV_RATIO_3 is not set 55 | # MT7620_PLL_DIV_RATIO_4 is not set 56 | CPLL_DIV_RATIO_CFG=0 57 | CPLL_SSC_CFG=0x7 58 | # DUAL_IMAGE_SUPPORT is not set 59 | LAN_WAN_PARTITION=y 60 | RALINK_DEMO_BOARD_PVLAN=y 61 | # RALINK_EV_BOARD_PVLAN is not set 62 | TEXT_BASE=0xBC000000 63 | -------------------------------------------------------------------------------- /CHANGELOG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanwrt/u-boot_mt7620/48a4ba43b95f0536e3db9f611e8c4970f92ebaea/CHANGELOG -------------------------------------------------------------------------------- /CREDITS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanwrt/u-boot_mt7620/48a4ba43b95f0536e3db9f611e8c4970f92ebaea/CREDITS -------------------------------------------------------------------------------- /MAINTAINERS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanwrt/u-boot_mt7620/48a4ba43b95f0536e3db9f611e8c4970f92ebaea/MAINTAINERS -------------------------------------------------------------------------------- /board/rt2880/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2003 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | include $(TOPDIR)/config.mk 25 | 26 | LIB = lib$(BOARD).a 27 | 28 | 29 | OBJS = $(BOARD).o serial.o 30 | ifeq ($(CFG_ENV_IS), IN_FLASH) 31 | OBJS += flash.o 32 | endif 33 | SOBJS = $(BOARD)_init.o memsetup.o 34 | 35 | $(LIB): .depend $(OBJS) $(SOBJS) 36 | $(AR) crv $@ $(OBJS) $(SOBJS) 37 | 38 | ######################################################################### 39 | 40 | .depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) 41 | $(CC) -M -g $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c)> $@ 42 | 43 | sinclude .depend 44 | 45 | ######################################################################### 46 | -------------------------------------------------------------------------------- /board/rt2880/config.mk: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2003 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | # 25 | # RT2880 board with MIPS 4Kec CPU core 26 | # 27 | 28 | # ROM version 29 | #TEXT_BASE = 0xBFC00000 30 | 31 | # RAM version 32 | #TEXT_BASE = 0x8A200000 33 | 34 | # ICE DEBUG version 35 | # SDRAM BASE 0x8A000000 36 | # Use top half of SDRAM(32M) as ROM 37 | #TEXT_BASE = 0x8B000000 38 | -------------------------------------------------------------------------------- /board/rt2880/u-boot.lds: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2003 3 | * Wolfgang Denk Engineering, 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | /* 25 | OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips") 26 | */ 27 | /*OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips")*/ 28 | OUTPUT_FORMAT("elf32-tradlittlemips", "elf32-tradbigmips", "elf32-tradlittlemips") 29 | OUTPUT_ARCH(mips) 30 | ENTRY(_start) 31 | 32 | SECTIONS 33 | { 34 | . = 0x00000000; 35 | 36 | . = ALIGN(4); 37 | .text : 38 | { 39 | *(.text) 40 | } 41 | 42 | . = ALIGN(4); 43 | .rodata : { *(.rodata) } 44 | 45 | . = ALIGN(4); 46 | 47 | .data : { *(.data) } 48 | 49 | . = ALIGN(4); 50 | .sdata : { *(.sdata) } 51 | 52 | _gp = ALIGN(16); 53 | 54 | .got : { 55 | __got_start = .; 56 | *(.got) 57 | __got_end = .; 58 | } 59 | 60 | .sdata : { *(.sdata) } 61 | 62 | __u_boot_cmd_start = .; 63 | .u_boot_cmd : { *(.u_boot_cmd) } 64 | __u_boot_cmd_end = .; 65 | 66 | uboot_end_data = .; 67 | num_got_entries = (__got_end - __got_start) >> 2; 68 | 69 | . = ALIGN(4); 70 | .sbss : { *(.sbss) } 71 | .bss : { *(.bss) } 72 | 73 | uboot_end = .; 74 | } 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /common/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2004 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | include $(TOPDIR)/config.mk 25 | 26 | LIB = libcommon.a 27 | 28 | AOBJS = 29 | 30 | ifeq ($(RALINK_CMDLINE),ON) 31 | COBJS = main.o cmd_bdinfo.o cmd_boot.o cmd_bootm.o cmd_console.o \ 32 | cmd_load.o cmd_misc.o cmd_net.o cmd_mem.o \ 33 | cmd_nvedit.o command.o console.o devices.o dlmalloc.o \ 34 | env_common.o exports.o lists.o gpio.o 35 | else 36 | COBJS = console.o devices.o dlmalloc.o \ 37 | env_common.o exports.o lists.o cmd_nvedit.o cmd_bootm.o cmd_net.o 38 | endif 39 | 40 | ifeq ($(RALINK_UPGRADE_BY_SERIAL),ON) 41 | COBJS += cmd_load.o 42 | endif 43 | 44 | ifdef RALINK_USB 45 | COBJS += usb.o usb_storage.o cmd_usb.o cmd_fat.o 46 | endif 47 | 48 | OBJS = $(AOBJS) $(COBJS) 49 | 50 | ifeq ($(CFG_ENV_IS), IN_FLASH) 51 | OBJS += cmd_flash.o env_flash.o flash.o cmd_mem.o 52 | endif 53 | ifeq ($(CFG_ENV_IS), IN_SPI) 54 | OBJS += env_spi.o 55 | endif 56 | ifeq ($(CFG_ENV_IS), IN_NAND) 57 | OBJS += env_nand.o 58 | endif 59 | 60 | CPPFLAGS += -I.. 61 | 62 | all: $(LIB) $(AOBJS) 63 | 64 | $(LIB): .depend $(OBJS) 65 | $(AR) crv $@ $(OBJS) 66 | 67 | environment.o: environment.c ../tools/envcrc 68 | $(CC) $(AFLAGS) -Wa,--no-warn \ 69 | -DENV_CRC=$(shell ../tools/envcrc) \ 70 | -c -o $@ environment.c 71 | 72 | ../tools/envcrc: 73 | $(MAKE) -C ../tools 74 | 75 | ######################################################################### 76 | 77 | .depend: Makefile $(AOBJS:.o=.S) $(COBJS:.o=.c) 78 | $(CC) -M $(CFLAGS) $(AOBJS:.o=.S) $(COBJS:.o=.c) > $@ 79 | 80 | sinclude .depend 81 | 82 | ######################################################################### 83 | -------------------------------------------------------------------------------- /common/cmd_console.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2000 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | /* 25 | * Boot support 26 | */ 27 | #include 28 | #include 29 | #include 30 | 31 | #if (CONFIG_COMMANDS & CFG_CMD_CONSOLE) 32 | #ifdef RT2880_U_BOOT_CMD_OPEN 33 | 34 | extern void _do_coninfo (void); 35 | int do_coninfo (cmd_tbl_t * cmd, int flag, int argc, char *argv[]) 36 | { 37 | int i, l; 38 | 39 | /* Scan for valid output and input devices */ 40 | 41 | puts ("List of available devices:\n"); 42 | 43 | for (i = 1; i <= ListNumItems (devlist); i++) { 44 | device_t *dev = ListGetPtrToItem (devlist, i); 45 | 46 | printf ("%-8s %08x %c%c%c ", 47 | dev->name, 48 | dev->flags, 49 | (dev->flags & DEV_FLAGS_SYSTEM) ? 'S' : '.', 50 | (dev->flags & DEV_FLAGS_INPUT) ? 'I' : '.', 51 | (dev->flags & DEV_FLAGS_OUTPUT) ? 'O' : '.'); 52 | 53 | for (l = 0; l < MAX_FILES; l++) { 54 | if (stdio_devices[l] == dev) { 55 | printf ("%s ", stdio_names[l]); 56 | } 57 | } 58 | putc ('\n'); 59 | } 60 | return 0; 61 | } 62 | 63 | 64 | /***************************************************/ 65 | 66 | U_BOOT_CMD( 67 | coninfo, 3, 1, do_coninfo, 68 | "coninfo - print console devices and information\n", 69 | "" 70 | ); 71 | #endif 72 | #endif /* CFG_CMD_CONSOLE */ 73 | -------------------------------------------------------------------------------- /common/cmd_misc.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2001 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | /* 25 | * Misc functions 26 | */ 27 | #include 28 | #include 29 | 30 | #if (CONFIG_COMMANDS & CFG_CMD_MISC) 31 | #ifdef RT2880_U_BOOT_CMD_OPEN 32 | 33 | int do_sleep (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) 34 | { 35 | ulong delay; 36 | 37 | if (argc != 2) { 38 | printf ("Usage:\n%s\n", cmdtp->usage); 39 | return 1; 40 | } 41 | 42 | delay = simple_strtoul(argv[1], NULL, 10); 43 | 44 | while (delay) { 45 | int i; 46 | for (i=0; i<1000; ++i) { 47 | if (ctrlc ()) { 48 | return (-1); 49 | } 50 | udelay (1000); 51 | } 52 | --delay; 53 | } 54 | return 0; 55 | } 56 | #endif 57 | /* Implemented in $(CPU)/interrupts.c */ 58 | #if (CONFIG_COMMANDS & CFG_CMD_IRQ) 59 | int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); 60 | 61 | U_BOOT_CMD( 62 | irqinfo, 1, 1, do_irqinfo, 63 | "irqinfo - print information about IRQs\n", 64 | NULL 65 | ); 66 | #endif /* CONFIG_COMMANDS & CFG_CMD_IRQ */ 67 | #ifdef RT2880_U_BOOT_CMD_OPEN 68 | 69 | U_BOOT_CMD( 70 | sleep , 2, 2, do_sleep, 71 | "sleep - delay execution for some time\n", 72 | "N\n" 73 | " - delay execution for N seconds (N is _decimal_ !!!)\n" 74 | ); 75 | #endif 76 | #endif /* CFG_CMD_MISC */ 77 | -------------------------------------------------------------------------------- /common/exports.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | static void dummy(void) 5 | { 6 | } 7 | 8 | unsigned long get_version(void) 9 | { 10 | return XF_VERSION; 11 | } 12 | 13 | void jumptable_init (void) 14 | { 15 | DECLARE_GLOBAL_DATA_PTR; 16 | int i; 17 | 18 | gd->jt = (void **) malloc (XF_MAX * sizeof (void *)); 19 | for (i = 0; i < XF_MAX; i++) 20 | gd->jt[i] = (void *) dummy; 21 | 22 | gd->jt[XF_get_version] = (void *) get_version; 23 | gd->jt[XF_malloc] = (void *) malloc; 24 | gd->jt[XF_free] = (void *) free; 25 | gd->jt[XF_get_timer] = (void *)get_timer; 26 | gd->jt[XF_udelay] = (void *)udelay; 27 | #if defined(CONFIG_I386) || defined(CONFIG_PPC) 28 | gd->jt[XF_install_hdlr] = (void *) irq_install_handler; 29 | gd->jt[XF_free_hdlr] = (void *) irq_free_handler; 30 | #endif /* I386 || PPC */ 31 | } 32 | -------------------------------------------------------------------------------- /cpu/ralink_soc/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2003 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | include $(TOPDIR)/config.mk 25 | 26 | LIB = lib$(CPU).a 27 | 28 | START = start.o 29 | OBJS = cpu.o 30 | SOBJS = cache.o 31 | 32 | all: .depend $(START) $(LIB) 33 | 34 | $(LIB): $(OBJS) $(SOBJS) 35 | $(AR) crv $@ $(OBJS) $(SOBJS) 36 | 37 | ######################################################################### 38 | 39 | .depend: Makefile $(START:.o=.S) $(OBJS:.o=.c) 40 | $(CC) -M $(CFLAGS) $(START:.o=.S) $(OBJS:.o=.c) > $@ 41 | 42 | sinclude .depend 43 | 44 | ######################################################################### 45 | -------------------------------------------------------------------------------- /cpu/ralink_soc/config.mk: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2003 3 | # Wolfgang Denk, DENX Software Engineering, 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | v=$(shell \ 24 | $(AS) --version|grep "GNU assembler"|awk -F . '{print $$2}') 25 | MIPSFLAGS=$(shell \ 26 | if [ "$v" -lt "14" ]; then \ 27 | echo "-mcpu=4kc -mabicalls"; \ 28 | else \ 29 | echo "-march=4kc -mtune=4kc -mabicalls"; \ 30 | fi) 31 | # Dennis Lee, Big Endian need -EB otherwise remove -EB 32 | # echo "-mcpu=4kc -EB -mabicalls"; 33 | # echo "-march=4kc -mtune=4kc -Wa,-mips_allow_branch_to_undefined -mabicalls"; 34 | PLATFORM_CPPFLAGS += $(MIPSFLAGS) 35 | -------------------------------------------------------------------------------- /cpu/ralink_soc/cpu.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2003 3 | * Wolfgang Denk, DENX Software Engineering, 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | 30 | 31 | #define SOFTRES_REG (RALINK_SYSCTL_BASE + 0x0034) 32 | #define GORESET (0x01) 33 | 34 | int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) 35 | { 36 | *(volatile unsigned int*)(SOFTRES_REG) = GORESET; 37 | return 1; 38 | } 39 | 40 | void flush_cache (ulong start_addr, ulong size) 41 | { 42 | 43 | } 44 | #ifdef RT2880_U_BOOT_CMD_OPEN 45 | 46 | void write_one_tlb( int index, u32 pagemask, u32 hi, u32 low0, u32 low1 ){ 47 | write_32bit_cp0_register(CP0_ENTRYLO0, low0); 48 | write_32bit_cp0_register(CP0_PAGEMASK, pagemask); 49 | write_32bit_cp0_register(CP0_ENTRYLO1, low1); 50 | write_32bit_cp0_register(CP0_ENTRYHI, hi); 51 | write_32bit_cp0_register(CP0_INDEX, index); 52 | tlb_write_indexed(); 53 | } 54 | #endif 55 | -------------------------------------------------------------------------------- /cpu/ralink_soc/interrupts.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2003 3 | * Wolfgang Denk, DENX Software Engineering, 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #include 25 | 26 | void enable_interrupts(void) 27 | { 28 | } 29 | 30 | int disable_interrupts(void) 31 | { 32 | return 0; 33 | } 34 | -------------------------------------------------------------------------------- /disk/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2000 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | include $(TOPDIR)/config.mk 25 | 26 | #CFLAGS += -DET_DEBUG -DDEBUG 27 | 28 | LIB = libdisk.a 29 | 30 | #OBJS = part.o part_mac.o part_dos.o part_iso.o part_amiga.o 31 | OBJS = part.o part_dos.o 32 | 33 | all: $(LIB) 34 | 35 | $(LIB): $(START) $(OBJS) 36 | $(AR) crv $@ $(OBJS) 37 | 38 | ######################################################################### 39 | 40 | .depend: Makefile $(OBJS:.o=.c) 41 | $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@ 42 | 43 | sinclude .depend 44 | 45 | ######################################################################### 46 | -------------------------------------------------------------------------------- /disk/part_dos.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2000 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef _DISK_PART_DOS_H 25 | #define _DISK_PART_DOS_H 26 | 27 | 28 | #ifdef CONFIG_ISO_PARTITION 29 | /* Make the buffers bigger if ISO partition support is enabled -- CD-ROMS 30 | have 2048 byte blocks */ 31 | #define DEFAULT_SECTOR_SIZE 2048 32 | #else 33 | #define DEFAULT_SECTOR_SIZE 512 34 | #endif 35 | #define DOS_PART_TBL_OFFSET 0x1be 36 | #define DOS_PART_MAGIC_OFFSET 0x1fe 37 | #define DOS_PBR_FSTYPE_OFFSET 0x36 38 | #define DOS_PBR_MEDIA_TYPE_OFFSET 0x15 39 | #define DOS_MBR 0 40 | #define DOS_PBR 1 41 | 42 | typedef struct dos_partition { 43 | unsigned char boot_ind; /* 0x80 - active */ 44 | unsigned char head; /* starting head */ 45 | unsigned char sector; /* starting sector */ 46 | unsigned char cyl; /* starting cylinder */ 47 | unsigned char sys_ind; /* What partition type */ 48 | unsigned char end_head; /* end head */ 49 | unsigned char end_sector; /* end sector */ 50 | unsigned char end_cyl; /* end cylinder */ 51 | unsigned char start4[4]; /* starting sector counting from 0 */ 52 | unsigned char size4[4]; /* nr of sectors in partition */ 53 | } dos_partition_t; 54 | 55 | #endif /* _DISK_PART_DOS_H */ 56 | -------------------------------------------------------------------------------- /doc/I2C_Edge_Conditions: -------------------------------------------------------------------------------- 1 | I2C Edge Conditions: 2 | ==================== 3 | 4 | I2C devices may be left in a write state if a read was occuring 5 | and the CPU was reset. This may result in EEPROM data corruption. 6 | 7 | The edge condition is as follows: 8 | 1) A read operation begins. 9 | 2) I2C controller issues a start command. 10 | 3) The I2C writes the device address. 11 | 4) The CPU is reset at this point. 12 | 13 | Once the CPU reinitializes and the read is tried again: 14 | 1) The I2C controller issues a start command. 15 | 2) The I2C controller writes the device address. 16 | 3) The I2C controller writes the offset. 17 | 18 | The EEPROM sees: 19 | 1) START 20 | 2) device address 21 | 3) START "this start is ignored by most EEPROMs" 22 | 4) device address "EEPROM interprets this as offset" 23 | 5) Offset in device, "EEPROM interprets this as data to write" 24 | 25 | The device will interpret this sequence as a WRITE command and 26 | write rubbish into itself, i.e. the "offset" will be interpreted 27 | as data to be written in location "device address". 28 | 29 | Notes 30 | ----- 31 | !!!THIS IS AN UNDOCUMENTED I2C BUS BUG, NOT A IBM 4xx BUG!!! 32 | 33 | This reset edge condition could possibly be present in every I2C 34 | controller and device available. For boards where a I2C bus reset 35 | function can be implemented a i2c_init_board() function should be 36 | provided and enabled by #define'ing CFG_I2C_INIT_BOARD in your 37 | board's config file. Note that this is NOT necessary when using the 38 | bit-banging I2C driver (common/soft_i2c.c) as this already includes 39 | the I2C bus reset sequence. 40 | 41 | 42 | Many thanks to Bill Hunter for finding this serious BUG. 43 | email to: 44 | 45 | Erik Theisen 46 | Tue, 5 Mar 2002 23:02:19 -0500 (Wed 05:02 MET) 47 | -------------------------------------------------------------------------------- /doc/README-i386: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanwrt/u-boot_mt7620/48a4ba43b95f0536e3db9f611e8c4970f92ebaea/doc/README-i386 -------------------------------------------------------------------------------- /doc/README.ARM-SoC: -------------------------------------------------------------------------------- 1 | [By Steven Scholz , 16 Aug 2004] 2 | 3 | Since the cpu/ directory gets clobbered with peripheral driver code I 4 | started cleaning up cpu/arm920t. 5 | 6 | I introduced the concept of Soc (system on a chip) into the ./cpu 7 | directory. That means that code that is cpu (i.e. core) specific 8 | resides in 9 | 10 | cpu/$(CPU)/ 11 | 12 | and code that is specific to some SoC (i.e. vendor specific 13 | peripherals around the core) is moved into 14 | 15 | cpu/$(CPU)/$(SOC)/ 16 | 17 | Thus a library/archive "cpu/$(CPU)/$(SOC)/lib$(SOC).a" will be build 18 | and linked. Examples will be 19 | 20 | cpu/arm920t/imx/ 21 | cpu/arm920t/s3c24x0 22 | 23 | One can select an SoC by passing the name of it to ./mkconfig just 24 | like 25 | 26 | @./mkconfig $(@:_config=) arm arm920t vcma9 mpl s3c24x0 27 | 28 | If there's no VENDOR field (like "mpl" in the above line) one has to 29 | pass NULL instead: 30 | 31 | @./mkconfig $(@:_config=) arm arm920t mx1ads NULL imx 32 | -------------------------------------------------------------------------------- /doc/README.ARM-memory-map: -------------------------------------------------------------------------------- 1 | Subject: Re: [PATCH][CFT] bring ARM memory layout in line with the documented behaviour 2 | From: "Anders Larsen" 3 | Date: Thu, 18 Sep 2003 14:15:21 +0200 4 | To: Wolfgang Denk 5 | 6 | ... 7 | >I still see references to _armboot_start, _armboot_end_data, and 8 | >_armboot_end - which role do these play now? Can we get rid of them? 9 | > 10 | >How are they (should they be) set in your memory map above? 11 | 12 | _armboot_start contains the value of TEXT_BASE (0xA07E0000); it seems 13 | TEXT_BASE and _armboot_start are both used for the same purpose in 14 | different parts of the (ARM) code. 15 | Furthermore, the startup code (cpu//start.S) internally uses 16 | another variable (_TEXT_BASE) with the same content as _armboot_start. 17 | I agree that this mess should be cleaned up. 18 | -------------------------------------------------------------------------------- /doc/README.EVB-64260-750CX: -------------------------------------------------------------------------------- 1 | The EVB-64260-750CX is quite similar to the EVB-64260-BP already 2 | supported except the following differences: 3 | * It has an IBM-750CXe soldiered on board instead of the slot-1 in the 4 | BP. 5 | * It has a single PCI male connector instead of the 4 PCI female 6 | connectors on the BP. It also gets power trough the PCI connector. 7 | * It has only a single DIMM slot instead of the 2 slots in the BP. 8 | -------------------------------------------------------------------------------- /doc/README.INCA-IP: -------------------------------------------------------------------------------- 1 | 2 | Flash programming on the INCA-IP board is complicated because of the 3 | EBU swapping unit. A BDI2000 can be used for flash programming only 4 | if the EBU swapping unit is enabled; otherwise it will not detect the 5 | flash memory. But the EBU swapping unit is disadbled after reset, so 6 | if you program some code to flash with the swapping unit on, it will 7 | not be runnable with the swapping unit off. 8 | 9 | The consequence is that you have to write a pre-swapped image to 10 | flash using the BDI2000. A simple host-side tool "inca-swap-bytes" is 11 | provided in the "tools/" directory. Use it as follows: 12 | 13 | bash$ ./inca-swap-bytes u-boot.bin.swp 14 | 15 | Note that the current BDI config file _disables_ the EBU swapping 16 | unit for the flash bank 0. To enable it, (this is required for the 17 | BDI flash commands to work) uncomment the following line in the 18 | config file: 19 | 20 | ;WM32 0xb8000260 0x404161ff ; Swapping unit enabled 21 | 22 | and comment out 23 | 24 | WM32 0xb8000260 0x004161ff ; Swapping unit disabled 25 | 26 | Alternatively, you can use "mm 0xb8000260 " commands to 27 | enable/disable the swapping unit manually. 28 | 29 | Just for reference, here is the complete sequence of actions we took 30 | to install a U-Boot image into flash. 31 | 32 | 1. ./inca-swap-bytes u-boot.bin.swp 33 | 34 | 2. From BDI: 35 | 36 | mm 0xb8000260 0x404161ff 37 | erase 0xb0000000 38 | erase 0xb0010000 39 | prog 0xb0000000 /tftpboot/INCA/u-boot.bin.swp bin 40 | mm 0xb8000260 0x004161ff 41 | go 0xb0000000 42 | 43 | 44 | Ethernet autonegotiation needs some time to complete. Instead of 45 | delaying the boot process in all cases, we just start the 46 | autonegotiation process when U-Boot comes up and that is all. Most 47 | likely, it will complete by the time the network transfer is 48 | attempted for the first time. In the worst case, if a transfer is 49 | attempted before the autonegotiation is complete, just a single 50 | packet would be lost resulting in a single timeout error, and then 51 | the transfer would proceed normally. So the time that we would have 52 | lost unconditionally waiting for the autonegotiation to complete, we 53 | have to wait only if the file transfer is started immediately after 54 | reset. We've verified that this works for all the clock 55 | configurations. 56 | 57 | (C) 2003 Wolfgang Denk 58 | -------------------------------------------------------------------------------- /doc/README.IceCube: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------------- 2 | Build target Flash address | BDI "go" command | Reset Vector 3 | --------------------------------------------------------------------------- 4 | Lite5200 0xFFF00000 | 0xFFF00100 | 0xFFF00100 5 | Lite5200_LOWBOOT 0xFF000000 | 0xFF000100 | 0x00000100 6 | Lite5200_LOWBOOT08 0xFF800000 | 0xFF800100 | 0x00000100 7 | icecube_5200 0xFFF00000 | 0xFFF00100 | 0xFFF00100 8 | icecube_5200_LOWBOOT 0xFF000000 | 0xFF000100 | 0x00000100 9 | icecube_5200_LOWBOOT08 0xFF800000 | 0xFF800100 | 0x00000100 10 | icecube_5200_DDR 0xFFF00000 | 0xFFF00100 | 0xFFF00100 11 | icecube_5200_DDR_LOWBOOT 0xFF800000 | 0xFF800100 | 0x00000100 12 | icecube_5200_DDR_LOWBOOT08 0xFF800000 | 0xFF800100 | 0x00000100 13 | --------------------------------------------------------------------------- 14 | -------------------------------------------------------------------------------- /doc/README.JFFS2: -------------------------------------------------------------------------------- 1 | JFFS2 options and usage. 2 | ----------------------- 3 | 4 | JFFS2 in U-Boot is a read only implementation of the file system in 5 | Linux with the same name. To use JFFS2 define CFG_CMD_JFFS2. 6 | 7 | The module adds three new commands. 8 | fsload - load binary file from a file system image 9 | fsinfo - print information about file systems 10 | ls - list files in a directory 11 | chpart - change active partition 12 | 13 | If you boot from a partition which is mounted writable, and you 14 | update your boot environment by replacing single files on that 15 | partition, you should also define CFG_JFFS2_SORT_FRAGMENTS. Scanning 16 | the JFFS2 filesystem takes *much* longer with this feature, though. 17 | Sorting is done while inserting into the fragment list, which is 18 | more or less a bubble sort. That algorithm is known to be O(n^2), 19 | thus you should really consider if you can avoid it! 20 | 21 | 22 | There is two ways for JFFS2 to find the disk. The default way uses 23 | the flash_info structure to find the start of a JFFS2 disk (called 24 | partition in the code) and you can change where the partition is with 25 | two defines. 26 | 27 | CFG_JFFS2_FIRST_BANK 28 | defined the first flash bank to use 29 | 30 | CFG_JFFS2_FIRST_SECTOR 31 | defines the first sector to use 32 | 33 | 34 | The second way is to define CFG_JFFS_CUSTOM_PART and implement the 35 | jffs2_part_info(int part_num) function in your board specific files. 36 | In this mode CFG_JFFS2_FIRST_BANK and CFG_JFFS2_FIRST_SECTOR is not 37 | used. 38 | 39 | The input is a partition number starting with 0. 40 | Return a pointer to struct part_info or NULL for error; 41 | 42 | Ex jffs2_part_info() for one partition. 43 | --- 44 | #if defined CFG_JFFS_CUSTOM_PART 45 | #include 46 | 47 | static struct part_info part; 48 | 49 | struct part_info* 50 | jffs2_part_info(int part_num) 51 | { 52 | if(part_num==0){ 53 | if(part.usr_priv==(void*)1) 54 | return ∂ 55 | 56 | memset(&part, 0, sizeof(part)); 57 | part.offset=(char*)0xFF800000; 58 | part.size=1024*1024*8; 59 | 60 | /* Mark the struct as ready */ 61 | part.usr_priv=(void*)1; 62 | 63 | return ∂ 64 | } 65 | return 0; 66 | } 67 | #endif 68 | --- 69 | 70 | TODO. 71 | 72 | Remove the assumption that JFFS can dereference a pointer 73 | into the disk. The current code do not work with memory holes 74 | or hardware with a sliding window (PCMCIA). 75 | -------------------------------------------------------------------------------- /doc/README.JFFS2_NAND: -------------------------------------------------------------------------------- 1 | JFFS2 NAND support: 2 | 3 | To ebable, use the following #define in the board configuration file: 4 | 5 | #define CONFIG_JFFS2_NAND 1 6 | 7 | Configuration of partitions is similar to how this is done in U-Boot 8 | for JFFS2 on top NOR flash. If a single parition is used, it can be 9 | configured using the following #defines in the configuration file: 10 | 11 | #define CONFIG_JFFS2_NAND_DEV 0 /* nand device jffs2 lives on */ 12 | #define CONFIG_JFFS2_NAND_OFF 0 /* start of jffs2 partition */ 13 | #define CONFIG_JFFS2_NAND_SIZE 2*1024*1024 /* size of jffs2 partition */ 14 | 15 | If more than a single partition is desired, the user can define a 16 | CFG_JFFS_CUSTOM_PART macro and implement a 17 | 18 | struct part_info* jffs2_part_info(int part_num) 19 | 20 | function in a board-specific module. An example of such function is 21 | available in common/cmd_jffs2.c 22 | 23 | The default configuration for the DAVE board has a single JFFS2 24 | partition of 2 MB size. 25 | -------------------------------------------------------------------------------- /doc/README.MPC866: -------------------------------------------------------------------------------- 1 | The current implementation allows the user to specify the desired CPU 2 | clock value, in MHz, via an environment variable "cpuclk". 3 | 4 | Four compile-time constants are used: 5 | 6 | CONFIG_8xx_OSCLK - input quartz clock 7 | CFG_8xx_CPUCLK_MIN - minimum allowed CPU clock 8 | CFG_8xx_CPUCLK_MAX - maximum allowed CPU clock 9 | CONFIG_8xx_CPUCLK_DEFAULT - default CPU clock value 10 | 11 | If the "cpuclk" environment variable value is within the CPUCLK_MIN / 12 | CPUCLK_MAX limits, the specified value is used. Otherwise, the 13 | default CPU clock value is set. 14 | 15 | Please make sure you understand what you are doing, and understand 16 | the restrictions of your hardware (board, processor). For example, 17 | ethernet will stop working for CPU clock frequencies below 25 MHz. 18 | 19 | Please note that the new clock-handling code is enabled if 20 | CONFIG_8xx_CPUCLK_DEFAULT is defined. Since this mechanism supports 21 | only MPC866 and newer CPUs, this constant MUST NOT be defined for 22 | MPC823/850/860/862 series. The clock generation algorithm for older 23 | chips is different and has not been implemented yet. If you need it, 24 | your patch is welcome. 25 | -------------------------------------------------------------------------------- /doc/README.OXC: -------------------------------------------------------------------------------- 1 | This document contains different information about the port 2 | of U-Boot for the OXC board designed by Lucent Technologies, 3 | Inc. 4 | 5 | 1. Showing activity 6 | 7 | U-Boot for the OXC board can show its current status using 8 | the Active LED. This feature is configured by the following 9 | options: 10 | 11 | CONFIG_SHOW_ACTIVITY 12 | 13 | When this option is on, the Active LED is blinking fast 14 | when U-Boot runs in the idle loop (i.e. waits for user 15 | commands from serial console) and blinking slow when it 16 | downloads an image over network. When U-Boot loads an image 17 | over serial line the Active LED does not blink and its state 18 | is random (i.e. either constant on or constant off). 19 | 20 | CONFIG_SHOW_BOOT_PROGRESS 21 | 22 | When this option is on, U-Boot switches the Active LED 23 | off before booting an image and switches it on if booting 24 | failed due to some reasons. 25 | -------------------------------------------------------------------------------- /doc/README.PXA_CF: -------------------------------------------------------------------------------- 1 | 2 | These are brief instructions on how to add support for CF adapters to 3 | custom designed PXA boards. You need to set the parameters in the 4 | config file. This should work for most implementations especially if you 5 | follow the connections of the standard lubbock. Anyway just the block 6 | marked memory configuration should be touched since the other parameters 7 | are imposed by the PXA architecture. 8 | 9 | #define CONFIG_PXA_PCMCIA 1 10 | #define CONFIG_PXA_IDE 1 11 | 12 | #define CONFIG_PCMCIA_SLOT_A 1 13 | /* just to keep build system happy */ 14 | 15 | #define CFG_PCMCIA_MEM_ADDR 0x28000000 16 | #define CFG_PCMCIA_MEM_SIZE 0x10000000 17 | 18 | #define CFG_MECR_VAL 0x00000000 19 | #define CFG_MCMEM0_VAL 0x00004204 20 | #define CFG_MCMEM1_VAL 0x00000000 21 | #define CFG_MCATT0_VAL 0x00010504 22 | #define CFG_MCATT1_VAL 0x00000000 23 | #define CFG_MCIO0_VAL 0x00008407 24 | #define CFG_MCIO1_VAL 0x00000000 25 | /* memory configuration */ 26 | 27 | #define CFG_IDE_MAXBUS 1 28 | /* max. 1 IDE bus */ 29 | #define CFG_IDE_MAXDEVICE 1 30 | /* max. 1 drive per IDE bus */ 31 | 32 | #define CFG_ATA_IDE0_OFFSET 0x0000 33 | 34 | #define CFG_ATA_BASE_ADDR 0x20000000 35 | 36 | /* Offset for data I/O */ 37 | #define CFG_ATA_DATA_OFFSET 0x1f0 38 | 39 | /* Offset for normal register accesses */ 40 | #define CFG_ATA_REG_OFFSET 0x1f0 41 | 42 | /* Offset for alternate registers */ 43 | #define CFG_ATA_ALT_OFFSET 0x3f0 44 | 45 | 46 | Another important point is that maybe you have to power the pcmcia 47 | subsystem. This is very board specific, for an example on how to 48 | do it please search for CONFIG_EXADRON1 in cmd_pcmcia.c 49 | -------------------------------------------------------------------------------- /doc/README.Purple: -------------------------------------------------------------------------------- 1 | Installation Instructions: 2 | -------------------------- 3 | 4 | 1. Put the s2 switch into the following position: 5 | 6 | Off On 7 | ------ 8 | |x | 9 | | x| 10 | |x | 11 | | X| 12 | ------ 13 | 14 | Put the s3 switch into the following position: 15 | 16 | Off On 17 | ------ 18 | | x | 19 | | x | 20 | | x| 21 | | x| 22 | ------ 23 | 24 | Put the s4 switch into the following position: 25 | 26 | Off On 27 | ------ 28 | |x | 29 | |x | 30 | |x | 31 | |x | 32 | |x | 33 | | x| 34 | | x| 35 | |x | 36 | ------ 37 | 38 | 2. Connect to the serial console and to the BDI. Power on. On the 39 | serial line, you should see: 40 | 41 | PURPLE@1.2> 42 | 43 | 3. Type '8'. No echo will be displayed. In response, you should get: 44 | 45 | 7A(pass) 46 | 47 | 4. From BDI, enter command: 48 | 49 | mmw 0xb800d860 0x0042c7ff 50 | 51 | 5. Then, from BDI: 52 | 53 | erase 0xB0000000 54 | erase 0xB0008000 55 | erase 0xB000C000 56 | erase 0xB0010000 57 | erase 0xB0020000 58 | 59 | prog 0xB0000000 bin 60 | 61 | 6. Power off. Restore the original S2 switch position: 62 | 63 | Off On 64 | ------ 65 | | x| 66 | | x| 67 | |x | 68 | | X| 69 | ------ 70 | 71 | Power on. U-Boot should come up. 72 | 73 | 74 | Implementation Notes: 75 | --------------------- 76 | 77 | Due to the RAM/flash bus arbitration problem the suggested workaround 78 | had to be implemented. It works okay. On the downside is that you 79 | can't really check whether 'erase' is complete by polling flash as it 80 | is usually done. Instead, the flash driver simply waits for a given 81 | time and assumes that erase then has passed. This behaviour is 82 | identical to what the VxWorks driver does; also, the same timeout (6 83 | seconds) was chosen. Note that this timeout applies for each erase 84 | operation, i. e. per erased sector. 85 | -------------------------------------------------------------------------------- /doc/README.RPXClassic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanwrt/u-boot_mt7620/48a4ba43b95f0536e3db9f611e8c4970f92ebaea/doc/README.RPXClassic -------------------------------------------------------------------------------- /doc/README.SBC8560: -------------------------------------------------------------------------------- 1 | The port was tested on Wind River System Sbc8560 board . 2 | U-Boot was installed on the flash memory of the CPU card (no the SODIMM). 3 | 4 | NOTE: Please configure uboot compile to the proper PCI frequency and 5 | setup the appropriate DIP switch settings. 6 | 7 | SBC8560 board: 8 | 9 | Make sure boards switches are set to their appropriate conditions. 10 | Refer to the Engineering Reference Guide ERG-00300-002. Of particular 11 | importance are: 1)Tthe settings for JP4 (JP4 1-3 and 2-4), which 12 | select the on-board FLASH device (Intel 28F128Jx); 2) The settings 13 | for the Clock SW9 (33 MHz or 66 MHz). 14 | 15 | Note: SW9 Settings: 66 MHz 16 | 4:1 ratio CCB clocks:SYSCLK 17 | 3:1 ration e500 Core:CCB 18 | pos1 - on, pos2 - on, pos3 - off, pos4 - on, pos5 - off, pos6 - on 19 | Note: SW9 Settings: 33 MHz 20 | 8:1 ratio CCB clocks:SYSCLK 21 | 3:1 ration e500 Core:CCB 22 | pos1 - on, pos2 - on, pos3 - on, pos4 - off, pos5 - off, pos6 - on 23 | 24 | 25 | Flashing the FLASH device with the "Wind River ICE": 26 | 27 | 1) Properly connect and configure the Wind River ICE to the 28 | target JTAG port. This includes running the SBC8560 register script. 29 | Make sure target memory can be read and written. 30 | 31 | 2) Build the u-boot image: 32 | make distclean 33 | make SBC8560_66_config or SBC8560_33_config 34 | make CROSS_COMPILE=.../ELDK3.0/ppc_8xx-/ all 35 | 36 | Note: reference is made to the ELDK3.0 compiler but any 85xx cross-compiler 37 | should suffice. 38 | 39 | 3) Convert the uboot (.elf) file to a uboot.bin file (using visionClick converter). 40 | The bin file should be converted from fffc0000 to ffffffff 41 | 42 | 4) Setup the Flash Utility (tools menu) for: 43 | 44 | Determine the clock speed of the PCI bus and set SW9 accordingly 45 | Note: the speed of the PCI bus defaults to the slowest PCI card 46 | PlayBack the "default" register file for the SBC8560 47 | Select the uboot.bin file with zero bias 48 | Select the initialize Target prior to programming 49 | Select the V28F640Jx (8192 x 8) 1 device FLASH Algorithm 50 | Select the erase base address from FFFC0000 to FFFFFFFF 51 | Select the start address from 0 with size of 4000 52 | 53 | 5) Erase and Program 54 | -------------------------------------------------------------------------------- /doc/README.VLAN: -------------------------------------------------------------------------------- 1 | U-Boot has networking support for VLANs (802.1q), and CDP (Cisco 2 | Discovery Protocol). 3 | 4 | You control the sending/receiving of VLAN tagged packets with the 5 | "vlan" environmental variable. When not present no tagging is 6 | performed. 7 | 8 | CDP is used mainly to discover your device VLAN(s) when connected to 9 | a Cisco switch. 10 | 11 | Note: In order to enable CDP support a small change is needed in the 12 | networking driver. You have to enable reception of the 13 | 01:00:0c:cc:cc:cc MAC address which is a multicast address. 14 | 15 | Various defines control CDP; see the README section. 16 | -------------------------------------------------------------------------------- /doc/README.amigaone: -------------------------------------------------------------------------------- 1 | AmigaOne U-Boot and the SciTech emulator 2 | 3 | The directory board/MAI/bios_emulator contains the source code 4 | of the SciTech x86 emulator. This emulator is normally available 5 | under a BSD license. However, SciTech kindly gave us permission 6 | to use their emulator in PPCBoot for the AmigaOne. It's available 7 | in this form only under GPL. 8 | 9 | Thanks to Kendall Bennett and the rest of the team at SciTech. 10 | See http://www.scitechsoft.com for their web site 11 | 12 | The GPL license can be found at http://www.gnu.org/licenses/gpl.html 13 | -------------------------------------------------------------------------------- /doc/README.bedbug: -------------------------------------------------------------------------------- 1 | BEDBUG Support for U-Boot 2 | -------------------------- 3 | 4 | These changes implement the bedbug (emBEDded deBUGger) debugger in U-Boot. 5 | A specific implementation is made for the IBM405 processor but other flavors 6 | can be easily implemented. 7 | 8 | ##################### 9 | ### Modifications ### 10 | ##################### 11 | 12 | ./common/Makefile 13 | Included cmd_bedbug.c and bedbug.c in the Makefile. 14 | 15 | ./common/command.c 16 | Added bedbug commands to command table. 17 | 18 | ./common/board.c 19 | Added call to initialize debugger on startup. 20 | 21 | ./cpu/ppc4xx/Makefile 22 | Added bedbug_405.c to the Makefile. 23 | 24 | ./cpu/ppc4xx/start.S 25 | Added code to handle the debug exception (0x2000) on the 405. 26 | Also added code to handle critical exceptions since the debug 27 | is treated as critical on the 405. 28 | 29 | ./cpu/ppc4xx/traps.c 30 | Added more detailed output for the program exception to tell 31 | if it is an illegal instruction, privileged instruction or 32 | a trap. Also added debug trap handler. 33 | 34 | ./include/cmd_confdefs.h 35 | Added definition of CFG_CMD_BEDBUG. 36 | 37 | ./include/config_WALNUT405.h 38 | Added CFG_CMD_BEDBUG to the CONFIG_COMMANDS for the WALNUT. 39 | 40 | ./include/ppc_asm.tmpl 41 | Added code to handle critical exceptions 42 | 43 | ################# 44 | ### New Stuff ### 45 | ################# 46 | 47 | ./include/bedbug/ppc.h 48 | ./include/bedbug/regs.h 49 | ./include/bedbug/bedbug.h 50 | ./include/bedbug/elf.h [obsoleted by new include/elf.h] 51 | ./include/bedbug/tables.h 52 | ./include/cmd_bedbug.h 53 | ./common/cmd_bedbug.c 54 | ./common/bedbug.c 55 | Bedbug library includes code for assembling and disassembling 56 | PowerPC instructions to/from memory as well as handling 57 | hardware breakpoints and stepping through code. These 58 | routines are common to all PowerPC processors. 59 | 60 | ./cpu/ppc4xx/bedbug_405.c 61 | IBM PPC405 specific debugger routines. 62 | 63 | 64 | Bedbug support for the MPC860 65 | ----------------------------- 66 | 67 | Changes: 68 | 69 | common/cmd_bedbug.c 70 | Added call to initialize 860 debugger. 71 | 72 | cpu/mpc8xx/Makefile 73 | Added new file "bedbug_860.c" to the makefile 74 | 75 | cpu/mpc8xx/start.S 76 | Added handler for InstructionBreakpoint (0xfd00) 77 | 78 | cpu/mpc8xx/traps.c 79 | Added new routine DebugException() 80 | 81 | include/config_MBX.h 82 | Added CFG_CMD_BEDBUG to CONFIG_COMMANDS define 83 | 84 | 85 | New Files: 86 | 87 | cpu/mpc8xx/bedbug_860.c 88 | CPU-specific routines for 860 debug registers. 89 | -------------------------------------------------------------------------------- /doc/README.cmi: -------------------------------------------------------------------------------- 1 | 2 | Summary: 3 | ======== 4 | 5 | This file contains information about the cmi board configuration. 6 | Please see cmi_mpc5xx_config for further details. The cmi board is 7 | a customer specific board but should work with small modifications 8 | on every board which has a MPC5xx and either a 28F128J3A, 9 | 28F320J3A or 28F640J3A Intel flash mounted. 10 | 11 | Board Discription: 12 | ================== 13 | 14 | * Motorola MPC555 15 | * RS232 connection 16 | * Intel flash 28F640J3A 17 | * Micron SRAM 1M 18 | * Altera PLD 19 | 20 | Bootstrap: 21 | ========== 22 | 23 | In contrast to the usual boot sequence used in U-Boot, on the 24 | cmi board we don't boot from the external flash directly. 25 | Because of we use a 16-bit flash and don't sample a RCW 26 | from the data bus to set the startup buswidth to 16-bit. 27 | Unfortunatly the default width, sampled from the default RCW 28 | is 32-bit. For this reason we burn the proper RCW into the 29 | internal flash shadow location and boot after power-on or 30 | reset from the internal flash and then branch to 0x02000100 31 | where the U-Boot reset vector handler is located. 32 | 33 | Memory Map: 34 | =========== 35 | 36 | Memory Map after relocation: 37 | 38 | 0x0000 0000 CFG_SDRAM_BASE 39 | : 40 | 0x000F 9FFF 41 | : 42 | : 43 | 0x0100 0000 CFG_IMMR (Internal memory map base adress) 44 | : 45 | 0x0130 7FFF 46 | : 47 | : 48 | 0x0200 0000 CFG_FLASH_BASE 49 | : 50 | 0x027C FFFF 51 | : 52 | : 53 | 0x0300 0000 PLD_BASE 54 | 55 | Flash Partition: 56 | 57 | 0x0200 0000 Block 0 and 1 contain U-Boot except 58 | : environment 59 | : 60 | 0x0201 FFFF 61 | 0x0202 0000 Block 2 contains environment (.ppcenv) 62 | : 63 | 0x0202 FFFF 64 | 65 | See README file for futher information about U-Boot relocation 66 | and partitioning. 67 | 68 | Tested Features: 69 | ================ 70 | 71 | * U-Boot commands: go, loads, loadb, all memory features, printenv, 72 | setenv, saveenv, protect, erase, fli, bdi, mtest, reset, version, 73 | coninfo, help (see configuration file for available commands) 74 | 75 | * Blinking led to indicate boot process 76 | 77 | Added or Changed Files: 78 | ======================= 79 | 80 | u-boot-0.2.0/board/cmi/* 81 | u-boot-0.2.0/include/configs/cmi_mpc5xx.h 82 | 83 | Regards, 84 | Martin 85 | -------------------------------------------------------------------------------- /doc/README.commands: -------------------------------------------------------------------------------- 1 | 2 | Commands are added to U-Boot by creating a new command structure. 3 | This is done by first including command.h 4 | 5 | Then using the U_BOOT_CMD() macro to fill in a cmd_tbl_t struct. 6 | 7 | U_BOOT_CMD(name,maxargs,repeatable,command,"usage","help") 8 | 9 | name: is the name of the commad. THIS IS NOT a string. 10 | maxargs: the maximumn numbers of arguments this function takes 11 | command: Function pointer (*cmd)(struct cmd_tbl_s *, int, int, char *[]); 12 | usage: Short description. This is a string 13 | help: long description. This is a string 14 | 15 | 16 | **** Behinde the scene ****** 17 | 18 | The structure created is named with a special prefix (__u_boot_cmd_) 19 | and placed by the linker in a special section. 20 | 21 | This makes it possible for the final link to extract all commands 22 | compiled into any object code and construct a static array so the 23 | command can be found in an array starting at __u_boot_cmd_start. 24 | 25 | If a new board is defined do not forget to define the command section 26 | by writing in u-boot.lds ($(TOPDIR)/board/boardname/u-boot.lds) these 27 | 3 lines: 28 | 29 | __u_boot_cmd_start = .; 30 | .u_boot_cmd : { *(.u_boot_cmd) } 31 | __u_boot_cmd_end = .; 32 | -------------------------------------------------------------------------------- /doc/README.commands.itest: -------------------------------------------------------------------------------- 1 | A slow day today so here is a revised itest command with provisional 2 | support for comparing strings as well :-)) 3 | 4 | Now table driven to allow the operators 5 | -eq, -ne, -lt, -gt, -le, -ge, ==, !=, <>, <, >, <=, >= 6 | 7 | Uses the expected command modifier for integer compares of width 1, 2 or 8 | 4 bytes of .b, .w, .l and the new modifer of .s for a string compare. 9 | String comparison is over the length of the shorter, this hopefully 10 | avoids missing terminators when using an indirect pointer. 11 | 12 | eg. 13 | if itest.l *40000 == 12345678 then; .... 14 | if itest.w *40000 != 1234 then; .... 15 | if itest.b *40000 >= 12 then; .... 16 | if itest.s *40000 -eq hello then; .... 17 | -------------------------------------------------------------------------------- /doc/README.evb64260: -------------------------------------------------------------------------------- 1 | This file contains status information for the port of U-Boot to the 2 | Galileo Evaluation Board. 3 | 4 | Author: Josh Huber 5 | Mission Critical Linux, Inc. 6 | 7 | The support for the Galileo Evaluation board is fairly minimal now. 8 | It's sufficient to boot Linux, but doesn't provide too much more than 9 | what's required to do this. 10 | 11 | Both DUART channels are supported (to use the second one, you have to 12 | modify the board -- see the schematics for where to solder on the 13 | devices module). The ethernet ports are supported, and the MPSC is 14 | supported as a console driver. (keep in mind that the kernel has no 15 | support for this yet) 16 | 17 | There are still occaisonal lockups with the MPSC console driver due to 18 | (we think!) overrun problems. If you're looking for something stable 19 | to use for Linux development, consider sticking with the DUART console 20 | for now. 21 | 22 | Automatic memory sizing mostly works. We've had problems with some 23 | combinations of memory. Please send us email if you're having trouble 24 | with respect to the memory detection. 25 | 26 | Right now, only the 512k boot flash is supported. Support for the 27 | 16MB flash on the devices module is forthcoming. Right now the flash 28 | is stored at the 256k boundry in flash, wasting a whole sector (64k!) 29 | for environment data. This isn't really a big deal since we're not 30 | using the 512k for anything else. (Just U-Boot and the environment) 31 | 32 | Finally, here is a sample output session: 33 | 34 | U-Boot 1.0.0-pre1 (Jun 6 2001 - 12:45:11) 35 | 36 | Initializing... 37 | CPU: MPC7400 (altivec enabled) v2.9 38 | Board: EVB64260 39 | DRAM: 256 MB 40 | FLASH: 512 kB 41 | In: serial 42 | Out: serial 43 | Err: serial 44 | 45 | => 46 | 47 | The default configuration should be correct for the evaluation board, 48 | as it's shipped from Galileo. Keep in mind that the default baudrate 49 | is set to 38400, 8N1. 50 | 51 | Good luck, and make sure to send any bugreports to us (or the 52 | u-boot-users list). 53 | 54 | Josh 55 | -------------------------------------------------------------------------------- /doc/README.idma2intr: -------------------------------------------------------------------------------- 1 | (C) 2003 Arun Dharankar 2 | 3 | Attached is an IDMA example code for MPC8260/PPCBoot. I had tried to 4 | search around and could not find any for implementing IDMA, so 5 | implemented one. Its not coded in the best way, but works. 6 | 7 | Also, I was able to test the IDMA specific code under Linux also 8 | (with modifications). My requirement was to implement it for 9 | CompactFlash implemented in memory mode, and it works for it under 10 | PPCBoot and Linux. 11 | -------------------------------------------------------------------------------- /doc/README.lynxkdi: -------------------------------------------------------------------------------- 1 | LYNX KDI SUPPORT 2 | 3 | Last Update: July 20, 2003 4 | ======================================================================= 5 | 6 | This file describes support for LynuxWorks KDI within U-Boot. Support 7 | is enabled by defining CONFIG_LYNXKDI. 8 | 9 | 10 | LYNXOS AND BLUECAT SUPPORTED 11 | ============================ 12 | Both LynxOS and BlueCat linux KDIs are supported. The implementation 13 | automatically detects which is being booted. When you use mkimage 14 | you should specify "lynxos" for both (see target-specific notes). 15 | 16 | 17 | SUPPORTED ARCHITECTURE/TARGETS 18 | ============================== 19 | The following targets have been tested: 20 | 21 | -PowerPC MPC8260ADS 22 | 23 | 24 | FILES TO LOOK AT 25 | ================ 26 | include/lynxkdi.h -defines a simple struct passed to a kdi. 27 | common/lynxkdi.c -implements the call to the kdi. 28 | common/cmd_bootm.c -top-level command implementation ("bootm"). 29 | 30 | 31 | ==================================================================== 32 | TARGET SPECIFIC NOTES 33 | ==================================================================== 34 | 35 | MPC8260ADS 36 | =========== 37 | The default LynxOS and BlueCat implementations require some 38 | modifications to the config file. 39 | 40 | Edit include/configs/MPC8260ADS.h to use the following: 41 | 42 | #define CFG_IMMR 0xFA200000 43 | #define CFG_BCSR 0xFA100000 44 | #define CFG_BR1_PRELIM 0xFA101801 45 | 46 | When creating a LynxOS or BlueCat u-boot image using mkimage, 47 | you must specify the following: 48 | 49 | Both: -A ppc -O lynxos -T kernel -C none 50 | LynxOS: -a 0x00004000 -e 0x00004020 51 | BlueCat: -a 0x00500000 -e 0x00507000 52 | 53 | To pass the MAC address to BlueCat you should define the 54 | "fcc2_ether_addr" parameter in the "bootargs" environment 55 | variable. E.g.: 56 | 57 | ==> setenv bootargs fcc2_ether_addr=00:11:22:33:44:55:66 58 | -------------------------------------------------------------------------------- /doc/README.modnet50: -------------------------------------------------------------------------------- 1 | U-BOOT Port for FSForth ModNET50 Board 2 | -------------------------------------- 3 | 4 | author: Thomas Elste 5 | IMMS gGmbH 6 | 7 | The port based upon an early (partial complete) 8 | armboot-port from Stephan Linz for the ModNET50 Board. 9 | 10 | 11 | Overview: 12 | 13 | - board with Netsilicon NET+50 ARM7TDMI CPU without MMU 14 | - 16 MB SDRAM 15 | - 2 MB Flash (MBL29LV160BE) 16 | - 10/100 Ethernet PHY (LXT971A) 17 | 18 | 19 | Current Configuration (include/configs/modnet50.h): 20 | 21 | Memory Map: 0x00000000 - 0x00FFFFFF 16M SDRAM 22 | 0x10000000 - 0x101FFFFF 2M Flash 23 | 24 | The Flash uses a BB-Architectur with 35 sectors 25 | (0:16K; 1,2:8K; 3:32K; 4-34:64K). U-Boot is located in 26 | the first 5 sectors. 27 | 28 | The environment is located at the end of the 4th Flash 29 | sector (0x1001C000-0x1001FFFF). 30 | 31 | Build: 32 | 33 | U-boot should be build by using the ELDK Toolchain (arm-linux-*). 34 | 35 | make modnet50_config 36 | make 37 | 38 | 39 | Status: 40 | 41 | Everything seems to work fine. Booting images was tested by 42 | booting uCLinux (with and without a separate ramdisk image) from 43 | flash. 44 | 45 | 46 | Files: 47 | 48 | cpu/arm720t/serial_netarm.c .. serial I/O for the cpu 49 | 50 | board/modnet50/memsetup.S .. memory setup for ModNET50 51 | board/modnet50/flash.c .. flash routines 52 | board/modnet50/modnet50.c .. some board init stuff 53 | 54 | drivers/netarm_eth.c .. ethernet driver for the NET+50 CPU 55 | drivers/netarm_eth.h .. header for ethernet driver 56 | 57 | include/configs/modnet50.h .. configuration file for ModNET50 58 | 59 | include/netarm_*.h .. register and macro definitions for 60 | the NETARM CPU family 61 | 62 | doc/README.modnet50 .. this readme 63 | -------------------------------------------------------------------------------- /doc/README.mpc5xx: -------------------------------------------------------------------------------- 1 | 2 | Summary: 3 | ======== 4 | 5 | This file contains information about the port of U-Boot to the 6 | Motorola mpc5xx series of CPUs. Most of this code is taken from 7 | existing code mainly from the mpc8xx port. In contrast to mpc8xx, 8 | the mpc5xx has no CPM, MMU and cache facilities. 9 | 10 | The implemented features have been tested on the cmi board, a 11 | customer specific board (see README.cmi). 12 | 13 | Hence this port is only tested on the cmi board further possible 14 | tests on other boards will be very valuable. 15 | 16 | Not Tested Features: 17 | ==================== 18 | 19 | * System calls 20 | * Interrupts 21 | 22 | Added or Changed Files: 23 | ======================= 24 | 25 | u-boot-0.2.0/common/cmd_boot.c 26 | u-boot-0.2.0/common/cmd_reginfo.c 27 | u-boot-0.2.0/common/environment.c 28 | u-boot-0.2.0/cpu/mpc5xx/* 29 | u-boot-0.2.0/include/cmd_reginfo.h 30 | u-boot-0.2.0/include/common.h 31 | u-boot-0.2.0/include/ppc_asm.tmpl 32 | u-boot-0.2.0/include/watchdog.h 33 | u-boot-0.2.0/include/mpc5xx.h 34 | u-boot-0.2.0/include/status_led.h 35 | u-boot-0.2.0/include/asm-ppc/u-boot.h 36 | u-boot-0.2.0/include/asm-ppc/5xx_immap.h 37 | u-boot-0.2.0/lib_ppc/board.c 38 | u-boot-0.2.0/lib_ppc/cache.c 39 | u-boot-0.2.0/lib_ppc/time.c 40 | u-boot-0.2.0/Makefile 41 | u-boot-0.2.0/CREDITS 42 | u-boot-0.2.0/doc/README.mpc5xx 43 | u-boot-0.2.0/doc/README.cmi 44 | u-boot-0.2.0/README 45 | u-boot-0.2.0/MAKEALL 46 | 47 | Regards, 48 | Martin 49 | -------------------------------------------------------------------------------- /doc/README.mpc74xx: -------------------------------------------------------------------------------- 1 | This file contains status information for the port of U-Boot to the 2 | Motorola mpc74xx series of CPUs. 3 | 4 | Author: Josh Huber 5 | Mission Critical Linux, Inc. 6 | 7 | Currently the support for these CPUs is pretty minimal, but enough to 8 | get things going. (much like the support for the Galileo Eval Board) 9 | 10 | There is a framework in place to enable the L2 cache, and to program 11 | the BATs. Currently, there are still problems with the code which 12 | sets up the L2 cache, so it's not enabled. (IMHO, it shouldn't be 13 | anyway). Additionally, there is support for enabling the MMU, which 14 | we also don't do. The BATs are programmed just for the benefit of 15 | jumping into Linux in a sane configuration. 16 | 17 | Most of the code was based on other cpus supported by U-Boot. 18 | 19 | If you find any errors in the CPU setup code, please send us a note. 20 | 21 | Thanks, 22 | Josh 23 | -------------------------------------------------------------------------------- /doc/README.ne2000: -------------------------------------------------------------------------------- 1 | This driver supports NE2000 compatible cards (those based on DP8390, 2 | DP83902 and similar). It can be used with PCMCIA/CF cards provided 3 | that the CCR is correctly initialized. 4 | 5 | The code is based on sources from the Linux kernel (pcnet_cs.c, 6 | 8390.h) and eCOS(if_dp83902a.c, if_dp83902a.h). Both of these 2 7 | wonderful world are GPL, so this is, of course, GPL. 8 | 9 | I developed and tested this driver on a custom PXA255 based system and 10 | with a billionton CF network card connected to the PCMCIA interface of 11 | the micro (have a look at README.PXA_CF for the support of this port). 12 | 13 | The options you have to specify in the config file are (with the 14 | value for my board as an example): 15 | 16 | #define CONFIG_DRIVER_NE2000 17 | 18 | - Enables the driver 19 | 20 | #define CONFIG_DRIVER_NE2000_BASE (0x20000000+0x300) 21 | 22 | - Address where the board is mapped 23 | 24 | #define CONFIG_DRIVER_NE2000_CCR (0x28000000+0x3f8) 25 | 26 | - Address of the CCR (card configuration register). It could be found 27 | by enabling DEBUG in cmd_pcmcia.c. If this is not defined nothing is 28 | done as far as PCMCIA support is concerned. 29 | 30 | #define CONFIG_DRIVER_NE2000_VAL (0x20) 31 | 32 | - The value to be written in the CCR. It selects among different I/O 33 | spaces that could be used by the card. 34 | 35 | 36 | Enjoy! 37 | 38 | Christian Pellegrin 39 | -------------------------------------------------------------------------------- /doc/README.ns9750dev: -------------------------------------------------------------------------------- 1 | U-Boot Port to the NS9750 DevKit from NetSilicon 2 | 3 | 1 Overview 4 | 2 Board Configuration 5 | 3 Installation 6 | 7 | 8 | 1 Overview 9 | ---------- 10 | 11 | This port supports these NS9750 features. 12 | 13 | o one UART 14 | 15 | 2 Board Configuration 16 | --------------------- 17 | 18 | Switches: 19 | SW10: 4 20 | SW11: 6,7 21 | SW16: 6,7,8 22 | SW17-SW20: 1 23 | SW4: 3, 6 24 | SW 1: 1 25 | SW2: 4 26 | SW3: 3 27 | SW8: 3 (rotated by 180 degree!!!!) 28 | 29 | Serial Console is Port B (bottom right port) 30 | 31 | 3 Installation 32 | -------------- 33 | 34 | Have fun, 35 | -- 36 | Markus Pietrek 37 | -------------------------------------------------------------------------------- /doc/README.ocotea: -------------------------------------------------------------------------------- 1 | IBM Ocotea Board 2 | 3 | Last Update: March 2, 2004 4 | ======================================================================= 5 | 6 | This file contains some handy info regarding U-Boot and the IBM 7 | Ocotea 440gx evalutation board. See the README.ppc440 for additional 8 | information. 9 | 10 | 11 | SWITCH SETTINGS & JUMPERS 12 | ========================== 13 | 14 | Here's what I've been using successfully. If you feel inclined to 15 | change things ... please read the docs! 16 | 17 | DIPSW U46 U80 18 | ------------------------ 19 | SW 1 off off 20 | SW 2 on off 21 | SW 3 off off 22 | SW 4 off off 23 | SW 5 off off 24 | SW 6 on on 25 | SW 7 on off 26 | SW 8 on off 27 | 28 | J41: strapped 29 | J42: open 30 | 31 | All others are factory default. 32 | 33 | 34 | I2C Information 35 | ===================== 36 | 37 | See README.ebony for information. 38 | 39 | PCI 40 | =========================== 41 | 42 | Untested at the time of writing. 43 | 44 | PPC440GX Ethernet EMACs 45 | =========================== 46 | 47 | All EMAC ports have been tested and are known to work 48 | with EPS Group 4. 49 | 50 | Special note about the Cicada CIS8201: 51 | The CIS8201 Gigabit PHY comes up in GMII mode by default. 52 | One must hit an extended register to allow use of RGMII mode. 53 | This has been done in the 440gx_enet.c file with a #ifdef/endif 54 | pair. 55 | 56 | IBM does not store the EMAC ethernet addresses within their PIBS bootloader. 57 | The addresses contained in the config header file are from my particular 58 | board and you _*should*_ change them to reflect your board either in the 59 | config file and/or in your environment variables. I found the addresses on 60 | labels on the bottom side of the board. 61 | 62 | 63 | BDI2k or JTAG Debugging 64 | =========================== 65 | 66 | For ease of debugging you can swap the small boot flash and external SRAM 67 | by changing U46:3 to on. You can then use the sram as your boot flash by 68 | loading the sram via the jtag debugger. 69 | 70 | 71 | Regards, 72 | --Travis 73 | 74 | -------------------------------------------------------------------------------- /doc/README.sbc8560: -------------------------------------------------------------------------------- 1 | The port was tested on Wind River System Sbc8560 board . 2 | U-Boot was installed on the flash memory of the CPU card (no the SODIMM). 3 | 4 | NOTE: Please configure uboot compile to the proper PCI frequency and 5 | setup the appropriate DIP switch settings. 6 | 7 | SBC8560 board: 8 | 9 | Make sure boards switches are set to their appropriate conditions. 10 | Refer to the Engineering Reference Guide ERG-00300-002. Of particular 11 | importance are: 1)Tthe settings for JP4 (JP4 1-3 and 2-4), which 12 | select the on-board FLASH device (Intel 28F128Jx); 2) The settings 13 | for the Clock SW9 (33 MHz or 66 MHz). 14 | 15 | Note: SW9 Settings: 66 MHz 16 | 4:1 ratio CCB clocks:SYSCLK 17 | 3:1 ration e500 Core:CCB 18 | pos1 - on, pos2 - on, pos3 - off, pos4 - on, pos5 - off, pos6 - on 19 | Note: SW9 Settings: 33 MHz 20 | 8:1 ratio CCB clocks:SYSCLK 21 | 3:1 ration e500 Core:CCB 22 | pos1 - on, pos2 - on, pos3 - on, pos4 - off, pos5 - off, pos6 - on 23 | 24 | 25 | Flashing the FLASH device with the "Wind River ICE": 26 | 27 | 1) Properly connect and configure the Wind River ICE to the 28 | target JTAG port. This includes running the SBC8560 register script. 29 | Make sure target memory can be read and written. 30 | 31 | 2) Build the u-boot image: 32 | make distclean 33 | make SBC8560_66_config or SBC8560_33_config 34 | make CROSS_COMPILE=.../ELDK3.0/ppc_8xx-/ all 35 | 36 | Note: reference is made to the ELDK3.0 compiler but any 85xx cross-compiler 37 | should suffice. 38 | 39 | 3) Convert the uboot (.elf) file to a uboot.bin file (using visionClick converter). 40 | The bin file should be converted from fffc0000 to ffffffff 41 | 42 | 4) Setup the Flash Utility (tools menu) for: 43 | 44 | Determine the clock speed of the PCI bus and set SW9 accordingly 45 | Note: the speed of the PCI bus defaults to the slowest PCI card 46 | PlayBack the "default" register file for the SBC8560 47 | Select the uboot.bin file with zero bias 48 | Select the initialize Target prior to programming 49 | Select the V28F640Jx (8192 x 8) 1 device FLASH Algorithm 50 | Select the erase base address from FFFC0000 to FFFFFFFF 51 | Select the start address from 0 with size of 4000 52 | 53 | 5) Erase and Program 54 | -------------------------------------------------------------------------------- /doc/README.sched: -------------------------------------------------------------------------------- 1 | Notes on the scheduler in sched.c: 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3 | 4 | 'sched.c' provides an very simplistic multi-threading scheduler. 5 | See the example, function 'sched(...)', in the same file for its 6 | API usage. 7 | 8 | Until an exhaustive testing can be done, the implementation cannot 9 | qualify as that of production quality. It works with the example 10 | in 'sched.c', it may or may not work in other cases. 11 | 12 | 13 | Limitations: 14 | ~~~~~~~~~~~~ 15 | 16 | - There are NO primitives for thread synchronization (locking, 17 | notify etc). 18 | 19 | - Only the GPRs and FPRs context is saved during a thread context 20 | switch. Other registers on the PowerPC processor (60x, 7xx, 7xxx 21 | etc) are NOT saved. 22 | 23 | - The scheduler is NOT transparent to the user. The user 24 | applications must invoke thread_yield() to allow other threads to 25 | scheduler. 26 | 27 | - There are NO priorities, and the scheduling policy is round-robin 28 | based. 29 | 30 | - There are NO capabilities to collect thread CPU usage, scheduler 31 | stats, thread status etc. 32 | 33 | - The semantics are somewhat based on those of pthreads, but NOT 34 | the same. 35 | 36 | - Only seven threads are allowed. These can be easily increased by 37 | changing "#define MAX_THREADS" depending on the available memory. 38 | 39 | - The stack size of each thread is 8KBytes. This can be easily 40 | increased depending on the requirement and the available memory, 41 | by increasing "#define STK_SIZE". 42 | 43 | - Only one master/parent thread is allowed, and it cannot be 44 | stopped or deleted. Any given thread is NOT allowed to stop or 45 | delete itself. 46 | 47 | - There NOT enough safety checks as are probably in the other 48 | threads implementations. 49 | 50 | - There is no parent-child relationship between threads. Only one 51 | thread may thread_join, preferably the master/parent thread. 52 | 53 | (C) 2003 Arun Dharankar 54 | -------------------------------------------------------------------------------- /doc/README.serial_multi: -------------------------------------------------------------------------------- 1 | The support for multiple serial interfaces as implemented is mainly 2 | intended to allow for modem dial-in / dial-out while still being able 3 | to use a serial console on a (different) serial port. 4 | 5 | MPC8XX Specific 6 | =============== 7 | At the moment, the ports must be split on a SMC and a SCC port on a 8 | 8xx processor; other configurations are not (yet) supported. 9 | 10 | Support for hardware handshake has not been implemented yet (but is 11 | in the works). 12 | 13 | *) The default console depends on the keys pressed: 14 | - SMC if keys not pressed (modem not enabled) 15 | - SCC if keys pressed (modem enabled) 16 | 17 | *) The console can be switched to SCC by any of the following commands: 18 | 19 | setenv stdout serial_scc 20 | setenv stdin serial_scc 21 | setenv stderr serial_scc 22 | 23 | *) The console can be switched to SMC by any of the following commands: 24 | 25 | setenv stdout serial_smc 26 | setenv stdin serial_smc 27 | setenv stderr serial_smc 28 | 29 | *) If a file descriptor is set to "serial" then the current serial device 30 | will be used which, in turn, can be switched by above commands. 31 | 32 | *) The baudrate is the same for all serial devices. But it can be switched 33 | just after switching the console: 34 | 35 | setenv sout serial_scc; setenv baudrate 38400 36 | 37 | After that press 'enter' at the SCC console. Note that baudrates <38400 38 | are not allowed on LWMON with watchdog enabled (see CFG_BAUDRATE_TABLE in 39 | include/configs/lwmon.h). 40 | 41 | 42 | PPC4XX Specific 43 | =============== 44 | *) The default console is UART0 45 | 46 | *) The console can be switched to UART1 by any of the following commands: 47 | setenv stdout serial1 48 | setenv stderr serial1 49 | setenv stdin serial1 50 | 51 | *) The console can be switched to UART0 by any of the following commands: 52 | setenv stdout serial0 53 | setenv stderr serial0 54 | setenv stdin serial0 55 | -------------------------------------------------------------------------------- /doc/README.silent: -------------------------------------------------------------------------------- 1 | The config option CONFIG_SILENT_CONSOLE can be used to quiet messages 2 | on the console. If the option has been enabled, the output can be 3 | silenced by setting the environment variable "silent". The variable 4 | is latched into the global data at an early stage in the boot process 5 | so deleting it with "setenv" will not take effect until the system is 6 | restarted. 7 | 8 | The following actions are taken if "silent" is set at boot time: 9 | 10 | - Until the console devices have been initialized, output has to be 11 | suppressed by testing for the flag "GD_FLG_SILENT" in "gd->flags". 12 | 13 | - When the console devices have been initialized, "stdout" and 14 | "stderr" are set to "nulldev", so subsequent messages are 15 | suppressed automatically. Make sure to enable "nulldev" by 16 | #defining CFG_DEVICE_NULLDEV in your board config file. 17 | 18 | - When booting a linux kernel, the "bootargs" are fixed up so that 19 | the argument "console=" will be in the command line, no matter how 20 | it was set in "bootargs" before. 21 | -------------------------------------------------------------------------------- /doc/README.video: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2000 3 | * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | U-Boot MPC8xx video controller driver 25 | ====================================== 26 | 27 | The driver has been tested with the following configurations: 28 | 29 | - MPC823FADS with AD7176 on a PAL TV (YCbYCr) - arsenio@tin.it 30 | - GENIETV with AD7177 on a PAL TV (YCbYCr) - arsenio@tin.it 31 | -------------------------------------------------------------------------------- /doc/TODO-i386: -------------------------------------------------------------------------------- 1 | i386 port missing features: 2 | * i386 cleaness (wbinvld is 486+ ... ) 3 | * Pentium TSC timer/udelay 4 | * setup the BIOS data area and BIOS equipment word to reflect machine config. 5 | * Make reset work (from Linux and from the boot prompt) 6 | * DMA, FDC, RTC, KBC initialization 7 | * split of part of cpu/i386/interrupt.c to cpu/i385/entry.c? 8 | * re-entry of protected mode from real mode, should be added to realmode_switch.S 9 | (and used by INT 10h and INT 16h handlers for console I/O during early 10 | linux boot...) 11 | * missing functions in lib_i386 and cpu/i386 12 | * speaker beep interface 13 | 14 | 15 | SC520 missing features: 16 | * Watchdog 17 | * SC520 timer/udelay 18 | * SC520 3rd PIC 19 | * SC520 ICE serial 20 | * SC520 MMCR reset 21 | 22 | SC520 CDP board support missing features: 23 | * environment in sram 24 | 25 | SC520 CDP board support bugs: 26 | * SPI EEPROM support does not work 27 | * 0x680 LEDS dos not work for me 28 | * is it possible to make both the internal serial ports and the 29 | ports on the sio work at the same time? 30 | -------------------------------------------------------------------------------- /drivers/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2000-2004 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | include $(TOPDIR)/config.mk 25 | 26 | # CFLAGS += -DET_DEBUG -DDEBUG 27 | 28 | LIB = libdrivers.a 29 | 30 | OBJS = rt2880_eth.o #i2c_drv.o 31 | 32 | ifeq ($(RALINK_MDIO_ACCESS_FUN),ON) 33 | OBJS += mii_mgr.o 34 | endif 35 | 36 | ifeq ($(CFG_ENV_IS), IN_FLASH) 37 | OBJS += spi_drv.o 38 | endif 39 | 40 | ifeq ($(CFG_ENV_IS), IN_SPI) 41 | ifeq ($(RT6855A_MP), y) 42 | OBJS += spi_rt6855A_flash.o 43 | else 44 | OBJS += spi_flash.o 45 | endif 46 | ifeq ($(RT3883_MP), y) 47 | OBJS += spi_drv.o 48 | endif 49 | endif 50 | 51 | ifeq ($(CFG_ENV_IS), IN_NAND) 52 | OBJS += nand_flash.o 53 | ifeq ($(RT3883_MP), y) 54 | OBJS += spi_drv.o 55 | endif 56 | endif 57 | 58 | ifeq ($(RALINK_OHCI), ON) 59 | OBJS += ohci-hcd.o 60 | endif 61 | 62 | ifeq ($(RALINK_EHCI), ON) 63 | OBJS += ehci-hcd.o ehci-ra.o 64 | endif 65 | 66 | ifeq ($(RALINK_EPHY_TESTER), ON) 67 | OBJS += phy_val.o 68 | endif 69 | ifeq ($(MTK_MSDC), ON) 70 | OBJS += msdc/mmc_core.o msdc/mmc_test.o msdc/msdc.o msdc/msdc_cust.o msdc/ts_msdc.o 71 | endif 72 | 73 | all: $(LIB) 74 | 75 | $(LIB): $(OBJS) 76 | $(AR) crv $@ $(OBJS) 77 | 78 | ######################################################################### 79 | 80 | .depend: Makefile $(OBJS:.o=.c) 81 | $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@ 82 | 83 | sinclude .depend 84 | 85 | ######################################################################### 86 | -------------------------------------------------------------------------------- /drivers/ehci-core.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2007-2008, Juniper Networks, Inc. 3 | * Copyright (c) 2008, Excito Elektronik i Skåne AB 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License as 8 | * published by the Free Software Foundation version 2 of 9 | * the License. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 19 | * MA 02111-1307 USA 20 | */ 21 | 22 | #ifndef USB_EHCI_CORE_H 23 | #define USB_EHCI_CORE_H 24 | 25 | extern int rootdev; 26 | extern struct ehci_hccr *hccr; 27 | extern volatile struct ehci_hcor *hcor; 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /drivers/msdc/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef _UTILS_H_ 2 | #define _UTILS_H_ 3 | 4 | #include 5 | #include 6 | #include "msg.h" 7 | 8 | #define BUG_ON(x) \ 9 | do { \ 10 | if (x) { \ 11 | printf("[BUG] %s LINE:%d FILE:%s\n", #x, __LINE__, __FILE__); \ 12 | while(1); \ 13 | } \ 14 | }while(0) 15 | #define WARN_ON(x) \ 16 | do { \ 17 | if (x) { \ 18 | MSG(WRN, "[WARN] %s LINE:%d FILE:%s\n", #x, __LINE__, __FILE__); \ 19 | } \ 20 | }while(0) 21 | 22 | #define ERR_EXIT(expr, ret, expected_ret) \ 23 | do { \ 24 | (ret) = (expr);\ 25 | if ((ret) != (expected_ret)) { \ 26 | printf("[ERR] LINE:%d: %s != %d (%d)\n", __LINE__, #expr, expected_ret, ret); \ 27 | goto exit; \ 28 | } \ 29 | } while(0) 30 | 31 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) 32 | 33 | /* 34 | * ffs: find first bit set. This is defined the same way as 35 | * the libc and compiler builtin ffs routines, therefore 36 | * differs in spirit from the above ffz (man ffs). 37 | */ 38 | 39 | static uint32 uffs(uint32 x) 40 | { 41 | int r = 1; 42 | 43 | if (!x) 44 | return 0; 45 | if (!(x & 0xffff)) { 46 | x >>= 16; 47 | r += 16; 48 | } 49 | if (!(x & 0xff)) { 50 | x >>= 8; 51 | r += 8; 52 | } 53 | if (!(x & 0xf)) { 54 | x >>= 4; 55 | r += 4; 56 | } 57 | if (!(x & 3)) { 58 | x >>= 2; 59 | r += 2; 60 | } 61 | if (!(x & 1)) { 62 | x >>= 1; 63 | r += 1; 64 | } 65 | return r; 66 | } 67 | 68 | 69 | 70 | #ifndef min 71 | #define min(x, y) (x < y ? x : y) 72 | #endif 73 | #ifndef max 74 | #define max(x, y) (x > y ? x : y) 75 | #endif 76 | 77 | #if 1 78 | #define udelay(us) \ 79 | do { \ 80 | volatile int count = us * 5000; \ 81 | while (count--); \ 82 | }while(0) 83 | 84 | #define mdelay(ms) \ 85 | do { \ 86 | unsigned long i; \ 87 | for (i = 0; i < ms; i++) \ 88 | udelay(1000); \ 89 | }while(0) 90 | #else 91 | #define udelay(us) do{GPT_Delay_us(us);}while(0) 92 | #define mdelay(ms) do{GPT_Delay_ms(ms);}while(0) 93 | 94 | #endif 95 | #define WAIT_COND(cond,tmo,left) \ 96 | do { \ 97 | volatile u32 t = tmo; \ 98 | while (1) { \ 99 | if ((cond) || (t == 0)) break; \ 100 | if (t > 0) { mdelay(1); t--; } \ 101 | } \ 102 | left = t; \ 103 | WARN_ON(left == 0); \ 104 | }while(0) 105 | 106 | #endif /* _UTILS_H_ */ 107 | 108 | -------------------------------------------------------------------------------- /drivers/phy_val.h: -------------------------------------------------------------------------------- 1 | #ifndef USB_PHY_VAL_H 2 | #define USB_PHY_VAL_H 3 | 4 | struct _lp0r28 5 | { 6 | unsigned short final_link:1; 7 | unsigned short final_speed:1; 8 | unsigned short final_duplex:1; 9 | unsigned short tx_amp_save:2; 10 | unsigned short mdix_status:1; 11 | unsigned short mr_autoneg_complete:1; 12 | unsigned short reserved:1; 13 | unsigned short polarity_neg_pcs:1; 14 | unsigned short lch_descr_lock:1; 15 | unsigned short lch_linkup_mdix:1; 16 | unsigned short lch_linkup_mdi:1; 17 | unsigned short lch_linkup_10:1; 18 | unsigned short lch_linkup_100:1; 19 | unsigned short lch_rx_linkpulse:1; 20 | unsigned short lch_sig_detect:1; 21 | }; 22 | 23 | #define ProbeZfgain 0 24 | #define ProbeAgccode 1 25 | #define ProbeBoosten 2 26 | #define ProbeSnr 3 27 | #define ProbeDcoff 4 28 | #define ProbeAdcoff 5 29 | #define ProbeAdcSign 6 30 | 31 | unsigned int tcPhyReadReg(unsigned char port_num,unsigned char reg_num); 32 | unsigned int tcPhyReadLReg(unsigned char port_num,unsigned char page_num,unsigned char reg_num); 33 | void tcPhyWriteLReg(unsigned char port_num,unsigned char page_num,unsigned char reg_num,unsigned int reg_data); 34 | unsigned int tcPhyReadGReg(unsigned char port_num,unsigned char page_num,unsigned char reg_num); 35 | void tcPhyWriteGReg(unsigned char port_num,unsigned char page_num,unsigned char reg_num,unsigned int reg_data); 36 | int tc2105mlReadAdcSum(unsigned char port_num); 37 | int tc2105mlReadProbe(unsigned char port_num, unsigned char mode); 38 | void tc2105mlDispProbe100(unsigned char port_num); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /fs/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2000, 2001 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | # 24 | 25 | SUBDIRS := jffs2 cramfs fdos fat reiserfs ext2 26 | 27 | .depend all: 28 | @for dir in $(SUBDIRS) ; do \ 29 | $(MAKE) -C $$dir $@ ; done 30 | -------------------------------------------------------------------------------- /fs/fat/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # See file CREDITS for list of people who contributed to this 4 | # project. 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU General Public License as 8 | # published by the Free Software Foundation; either version 2 of 9 | # the License, or (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 19 | # MA 02111-1307 USA 20 | # 21 | 22 | TOPDIR=../../ 23 | 24 | include $(TOPDIR)/config.mk 25 | 26 | LIB = libfat.a 27 | 28 | AOBJS = 29 | COBJS = fat.o file.o 30 | 31 | OBJS = $(AOBJS) $(COBJS) 32 | 33 | all: $(LIB) $(AOBJS) 34 | 35 | $(LIB): .depend $(OBJS) 36 | $(AR) crv $@ $(OBJS) 37 | 38 | 39 | ######################################################################### 40 | 41 | .depend: Makefile $(AOBJS:.o=.S) $(COBJS:.o=.c) 42 | $(CC) -M $(CFLAGS) $(AOBJS:.o=.S) $(COBJS:.o=.c) > $@ 43 | 44 | sinclude .depend 45 | 46 | ######################################################################### 47 | -------------------------------------------------------------------------------- /httpd/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for http stuff 3 | # 4 | 5 | include $(TOPDIR)/config.mk 6 | 7 | LIB = libhttpd.a 8 | OBJS += uip.o uip_arch.o uip_arp.o httpd.o fs.o 9 | 10 | all: $(LIB) 11 | 12 | fs.c: fsdata.c 13 | 14 | fsdata.c: 15 | ./vendors/makefsdatac $(DEVICE_VENDOR) 16 | 17 | $(LIB): $(START) $(OBJS) 18 | $(AR) crv $@ $(OBJS) 19 | 20 | ######################################################################### 21 | 22 | .depend: Makefile $(OBJS:.o=.c) 23 | $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@ 24 | 25 | sinclude .depend 26 | 27 | ######################################################################### 28 | 29 | -------------------------------------------------------------------------------- /httpd/fsdata.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001, Swedish Institute of Computer Science. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the Institute nor the names of its contributors 14 | * may be used to endorse or promote products derived from this software 15 | * without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | * 29 | * This file is part of the lwIP TCP/IP stack. 30 | * 31 | * Author: Adam Dunkels 32 | * 33 | * $Id: fsdata.h,v 1.4.2.1 2003/10/04 22:54:06 adam Exp $ 34 | */ 35 | #ifndef __FSDATA_H__ 36 | #define __FSDATA_H__ 37 | 38 | #include "uipopt.h" 39 | 40 | struct fsdata_file { 41 | const struct fsdata_file *next; 42 | const char *name; 43 | const char *data; 44 | const int len; 45 | #ifdef FS_STATISTICS 46 | #if FS_STATISTICS == 1 47 | u16_t count; 48 | #endif /* FS_STATISTICS */ 49 | #endif /* FS_STATISTICS */ 50 | }; 51 | 52 | struct fsdata_file_noconst { 53 | struct fsdata_file *next; 54 | char *name; 55 | char *data; 56 | int len; 57 | #ifdef FS_STATISTICS 58 | #if FS_STATISTICS == 1 59 | u16_t count; 60 | #endif /* FS_STATISTICS */ 61 | #endif /* FS_STATISTICS */ 62 | }; 63 | 64 | #endif /* __FSDATA_H__ */ 65 | -------------------------------------------------------------------------------- /httpd/tapdev.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2001, Adam Dunkels. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. The name of the author may not be used to endorse or promote 14 | * products derived from this software without specific prior 15 | * written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 18 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 21 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 23 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 26 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | * This file is part of the uIP TCP/IP stack. 30 | * 31 | * $Id: tapdev.h,v 1.1.2.1 2003/10/04 22:54:17 adam Exp $ 32 | * 33 | */ 34 | 35 | #ifndef __TAPDEV_H__ 36 | #define __TAPDEV_H__ 37 | 38 | void tapdev_init(void); 39 | unsigned int tapdev_read(void); 40 | void tapdev_send(void); 41 | 42 | #endif /* __TAPDEV_H__ */ 43 | -------------------------------------------------------------------------------- /httpd/vendors/cleanwrt/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Page not found 6 | 7 | 8 | 9 |
10 |

PAGE NOT FOUND

11 |
The page you were looking for doesn't exist!
12 |
13 |
You can find more information about this project on CleanWrt
14 | 15 | -------------------------------------------------------------------------------- /httpd/vendors/cleanwrt/art.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ART update 6 | 7 | 8 | 9 |
10 |

ART UPDATE

11 |

You are going to update ART (Atheros Radio Test) on the device.
Please, choose file from your local hard drive and click Update ART button.

12 |
13 |
14 | WARNINGS 15 |
    16 |
  • do not power off the device during update
  • 17 |
  • if everything goes well, the device will restart
  • 18 |
  • you can upload whatever you want, so be sure that you choose proper ART image for your device
  • 19 |
20 |
21 |
22 |
You can find more information about this project on CleanWrt
23 | 24 | -------------------------------------------------------------------------------- /httpd/vendors/cleanwrt/fail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update failed 6 | 7 | 8 | 9 |
10 |

UPDATE FAILED

11 |
Something went wrong during updateProbably you have chosen wrong file (too big or too small) or you were trying to update ART on device with unknown FLASH type (and size) which is not allowed. Please, try again or contact with the author of this modification. You can also get more information during update in U-Boot console.
12 |
13 |
You can find more information about this project on CleanWrt
14 | 15 | -------------------------------------------------------------------------------- /httpd/vendors/cleanwrt/flashing.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update in progress 6 | 8 | 9 | 10 |
11 |

UPDATE IN PROGRESS

12 |

Your file was successfully uploaded! Update is in progress and you should wait for automatic reset of the device.
Update time depends on image size and may take up to a few minutes. You can close this page.

13 |
14 |
15 |
You can find more information about this project on CleanWrt
16 | 17 | -------------------------------------------------------------------------------- /httpd/vendors/cleanwrt/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Firmware update 6 | 7 | 8 | 9 |
10 |

FIRMWARE UPDATE

11 |

You are going to update firmware on the device.
Please, choose file from your local hard drive and click Update firmware button.

12 |
13 |
14 | WARNINGS 15 |
    16 |
  • do not power off the device during update
  • 17 |
  • if everything goes well, the device will restart
  • 18 |
  • you can upload whatever you want, so be sure that you choose proper firmware image for your device
  • 19 |
20 |
21 |
22 |
You can find more information about this project on CleanWrt
23 | 24 | -------------------------------------------------------------------------------- /httpd/vendors/cleanwrt/style.css: -------------------------------------------------------------------------------- 1 | h1, 2 | p, 3 | form, 4 | ul { 5 | margin: 0; 6 | padding: 0; 7 | } 8 | 9 | html, 10 | body { 11 | font: 13px/20px Arial, sans-serif; 12 | background: #EDEDED; 13 | } 14 | 15 | #m { 16 | max-width: 750px; 17 | margin: 30px auto 10px; 18 | border: solid 1px #BABABA; 19 | background: #FFF; 20 | border-radius: 7px; 21 | box-shadow: 0 0 10px #D2D1D1; 22 | } 23 | 24 | #m > * { 25 | padding: 20px; 26 | } 27 | 28 | h1 { 29 | font: bold 50px/50px Tahoma; 30 | border-bottom: solid 1px #E8E8E8; 31 | } 32 | 33 | a, 34 | h1 { 35 | color: #2450AD; 36 | text-decoration: none; 37 | } 38 | 39 | .i { 40 | margin: 20px; 41 | border-radius: 7px; 42 | text-align: justify; 43 | } 44 | 45 | .w { 46 | background: #FEFDCE; 47 | border: solid 1px #FFC643; 48 | } 49 | 50 | .e { 51 | background: #FFE7E7; 52 | border:solid 1px #FE7171; 53 | } 54 | 55 | #f { 56 | text-align: center; 57 | color: #969393; 58 | } 59 | 60 | form, 61 | p, 62 | h1 { 63 | text-align: center; 64 | } 65 | 66 | ul { 67 | list-style: square; 68 | margin: 0 0 0 20px; 69 | } 70 | 71 | .red { 72 | color: #E41616; 73 | } 74 | 75 | .i strong { 76 | margin: 0 0 5px; 77 | display: block; 78 | } -------------------------------------------------------------------------------- /httpd/vendors/cleanwrt/uboot.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | U-Boot update 6 | 7 | 8 | 9 |
10 |

U-BOOT UPDATE

11 |

You are going to update U-Boot bootloader on the device.
Please, choose file from your local hard drive and click Update U-Boot button.

12 |
13 |
14 | WARNINGS 15 |
    16 |
  • do not power off the device during update
  • 17 |
  • if everything goes well, the device will restart
  • 18 |
  • you can upload whatever you want, so be sure that you choose proper U-Boot image for your device
  • 19 |
  • updating U-Boot is a very dangerous operation and may damage your device!
  • 20 |
21 |
22 |
23 |
You can find more information about this project on CleanWrt
24 | 25 | -------------------------------------------------------------------------------- /httpd/vendors/general/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Page not found 6 | 7 | 8 | 9 |
10 |

PAGE NOT FOUND

11 |
The page you were looking for doesn't exist!
12 |
13 |
You can find more information about this project on CleanWrt
14 | 15 | -------------------------------------------------------------------------------- /httpd/vendors/general/art.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ART update 6 | 7 | 8 | 9 |
10 |

ART UPDATE

11 |

You are going to update ART (Atheros Radio Test) on the device.
Please, choose file from your local hard drive and click Update ART button.

12 |
13 |
14 | WARNINGS 15 |
    16 |
  • do not power off the device during update
  • 17 |
  • if everything goes well, the device will restart
  • 18 |
  • you can upload whatever you want, so be sure that you choose proper ART image for your device
  • 19 |
20 |
21 |
22 |
You can find more information about this project on CleanWrt
23 | 24 | -------------------------------------------------------------------------------- /httpd/vendors/general/fail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update failed 6 | 7 | 8 | 9 |
10 |

UPDATE FAILED

11 |
Something went wrong during updateProbably you have chosen wrong file (too big or too small) or you were trying to update ART on device with unknown FLASH type (and size) which is not allowed. Please, try again or contact with the author of this modification. You can also get more information during update in U-Boot console.
12 |
13 |
You can find more information about this project on CleanWrt
14 | 15 | -------------------------------------------------------------------------------- /httpd/vendors/general/flashing.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update in progress 6 | 8 | 9 | 10 |
11 |

UPDATE IN PROGRESS

12 |

Your file was successfully uploaded! Update is in progress and you should wait for automatic reset of the device.
Update time depends on image size and may take up to a few minutes. You can close this page.

13 |
14 |
15 |
You can find more information about this project on CleanWrt
16 | 17 | -------------------------------------------------------------------------------- /httpd/vendors/general/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Firmware update 6 | 7 | 8 | 9 |
10 |

FIRMWARE UPDATE

11 |

You are going to update firmware on the device.
Please, choose file from your local hard drive and click Update firmware button.

12 |
13 |
14 | WARNINGS 15 |
    16 |
  • do not power off the device during update
  • 17 |
  • if everything goes well, the device will restart
  • 18 |
  • you can upload whatever you want, so be sure that you choose proper firmware image for your device
  • 19 |
20 |
21 |
22 |
You can find more information about this project on CleanWrt
23 | 24 | -------------------------------------------------------------------------------- /httpd/vendors/general/style.css: -------------------------------------------------------------------------------- 1 | h1, 2 | p, 3 | form, 4 | ul { 5 | margin: 0; 6 | padding: 0; 7 | } 8 | 9 | html, 10 | body { 11 | font: 13px/20px Arial, sans-serif; 12 | background: #EDEDED; 13 | } 14 | 15 | #m { 16 | max-width: 750px; 17 | margin: 30px auto 10px; 18 | border: solid 1px #BABABA; 19 | background: #FFF; 20 | border-radius: 7px; 21 | box-shadow: 0 0 10px #D2D1D1; 22 | } 23 | 24 | #m > * { 25 | padding: 20px; 26 | } 27 | 28 | h1 { 29 | font: bold 50px/50px Tahoma; 30 | border-bottom: solid 1px #E8E8E8; 31 | } 32 | 33 | a, 34 | h1 { 35 | color: #2450AD; 36 | text-decoration: none; 37 | } 38 | 39 | .i { 40 | margin: 20px; 41 | border-radius: 7px; 42 | text-align: justify; 43 | } 44 | 45 | .w { 46 | background: #FEFDCE; 47 | border: solid 1px #FFC643; 48 | } 49 | 50 | .e { 51 | background: #FFE7E7; 52 | border:solid 1px #FE7171; 53 | } 54 | 55 | #f { 56 | text-align: center; 57 | color: #969393; 58 | } 59 | 60 | form, 61 | p, 62 | h1 { 63 | text-align: center; 64 | } 65 | 66 | ul { 67 | list-style: square; 68 | margin: 0 0 0 20px; 69 | } 70 | 71 | .red { 72 | color: #E41616; 73 | } 74 | 75 | .i strong { 76 | margin: 0 0 5px; 77 | display: block; 78 | } -------------------------------------------------------------------------------- /httpd/vendors/general/uboot.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | U-Boot update 6 | 7 | 8 | 9 |
10 |

U-BOOT UPDATE

11 |

You are going to update U-Boot bootloader on the device.
Please, choose file from your local hard drive and click Update U-Boot button.

12 |
13 |
14 | WARNINGS 15 |
    16 |
  • do not power off the device during update
  • 17 |
  • if everything goes well, the device will restart
  • 18 |
  • you can upload whatever you want, so be sure that you choose proper U-Boot image for your device
  • 19 |
  • updating U-Boot is a very dangerous operation and may damage your device!
  • 20 |
21 |
22 |
23 |
You can find more information about this project on CleanWrt
24 | 25 | -------------------------------------------------------------------------------- /httpd/vendors/yuicompressor-2.4.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanwrt/u-boot_mt7620/48a4ba43b95f0536e3db9f611e8c4970f92ebaea/httpd/vendors/yuicompressor-2.4.8.jar -------------------------------------------------------------------------------- /include/_exports.h: -------------------------------------------------------------------------------- 1 | EXPORT_FUNC(get_version) 2 | EXPORT_FUNC(getc) 3 | EXPORT_FUNC(tstc) 4 | EXPORT_FUNC(putc) 5 | EXPORT_FUNC(puts) 6 | EXPORT_FUNC(printf) 7 | EXPORT_FUNC(install_hdlr) 8 | EXPORT_FUNC(free_hdlr) 9 | EXPORT_FUNC(malloc) 10 | EXPORT_FUNC(free) 11 | EXPORT_FUNC(udelay) 12 | EXPORT_FUNC(get_timer) 13 | EXPORT_FUNC(vprintf) 14 | EXPORT_FUNC(do_reset) 15 | -------------------------------------------------------------------------------- /include/asm-mips/byteorder.h: -------------------------------------------------------------------------------- 1 | /* $Id: //WIFI_SOC/release/SDK_4_1_0_0/Uboot/include/asm-mips/byteorder.h#1 $ 2 | * 3 | * This file is subject to the terms and conditions of the GNU General Public 4 | * License. See the file "COPYING" in the main directory of this archive 5 | * for more details. 6 | * 7 | * Copyright (C) by Ralf Baechle 8 | */ 9 | #ifndef _MIPS_BYTEORDER_H 10 | #define _MIPS_BYTEORDER_H 11 | 12 | #include 13 | 14 | #ifdef __GNUC__ 15 | 16 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) 17 | # define __BYTEORDER_HAS_U64__ 18 | # define __SWAB_64_THRU_32__ 19 | #endif 20 | 21 | #endif /* __GNUC__ */ 22 | 23 | #if defined (__MIPSEB__) 24 | # include 25 | #elif defined (__MIPSEL__) 26 | # include 27 | #else 28 | # error "MIPS, but neither __MIPSEB__, nor __MIPSEL__???" 29 | #endif 30 | 31 | #endif /* _MIPS_BYTEORDER_H */ 32 | -------------------------------------------------------------------------------- /include/asm-mips/cachectl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * cachectl.h -- defines for MIPS cache control system calls 3 | * 4 | * Copyright (C) 1994, 1995, 1996 by Ralf Baechle 5 | */ 6 | #ifndef __ASM_MIPS_CACHECTL 7 | #define __ASM_MIPS_CACHECTL 8 | 9 | /* 10 | * Options for cacheflush system call 11 | */ 12 | #define ICACHE (1<<0) /* flush instruction cache */ 13 | #define DCACHE (1<<1) /* writeback and flush data cache */ 14 | #define BCACHE (ICACHE|DCACHE) /* flush both caches */ 15 | 16 | /* 17 | * Caching modes for the cachectl(2) call 18 | * 19 | * cachectl(2) is currently not supported and returns ENOSYS. 20 | */ 21 | #define CACHEABLE 0 /* make pages cacheable */ 22 | #define UNCACHEABLE 1 /* make pages uncacheable */ 23 | 24 | #endif /* __ASM_MIPS_CACHECTL */ 25 | -------------------------------------------------------------------------------- /include/asm-mips/cacheops.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Cache operations for the cache instruction. 3 | * 4 | * This file is subject to the terms and conditions of the GNU General Public 5 | * License. See the file "COPYING" in the main directory of this archive 6 | * for more details. 7 | * 8 | * (C) Copyright 1996, 1997 by Ralf Baechle 9 | */ 10 | #ifndef __ASM_MIPS_CACHEOPS_H 11 | #define __ASM_MIPS_CACHEOPS_H 12 | 13 | /* 14 | * Cache Operations 15 | */ 16 | #define Index_Invalidate_I 0x00 17 | #define Index_Writeback_Inv_D 0x01 18 | #define Index_Invalidate_SI 0x02 19 | #define Index_Writeback_Inv_SD 0x03 20 | #define Index_Load_Tag_I 0x04 21 | #define Index_Load_Tag_D 0x05 22 | #define Index_Load_Tag_SI 0x06 23 | #define Index_Load_Tag_SD 0x07 24 | #define Index_Store_Tag_I 0x08 25 | #define Index_Store_Tag_D 0x09 26 | #define Index_Store_Tag_SI 0x0A 27 | #define Index_Store_Tag_SD 0x0B 28 | #define Create_Dirty_Excl_D 0x0d 29 | #define Create_Dirty_Excl_SD 0x0f 30 | #define Hit_Invalidate_I 0x10 31 | #define Hit_Invalidate_D 0x11 32 | #define Hit_Invalidate_SI 0x12 33 | #define Hit_Invalidate_SD 0x13 34 | #define Fill 0x14 35 | #define Hit_Writeback_Inv_D 0x15 36 | /* 0x16 is unused */ 37 | #define Hit_Writeback_Inv_SD 0x17 38 | #define Hit_Writeback_I 0x18 39 | #define Hit_Writeback_D 0x19 40 | /* 0x1a is unused */ 41 | #define Hit_Writeback_SD 0x1b 42 | /* 0x1c is unused */ 43 | /* 0x1e is unused */ 44 | #define Hit_Set_Virtual_SI 0x1e 45 | #define Hit_Set_Virtual_SD 0x1f 46 | 47 | #endif /* __ASM_MIPS_CACHEOPS_H */ 48 | -------------------------------------------------------------------------------- /include/asm-mips/global_data.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2002-2003 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef __ASM_GBL_DATA_H 25 | #define __ASM_GBL_DATA_H 26 | 27 | #include 28 | 29 | /* 30 | * The following data structure is placed in some memory wich is 31 | * available very early after boot (like DPRAM on MPC8xx/MPC82xx, or 32 | * some locked parts of the data cache) to allow for a minimum set of 33 | * global variables during system initialization (until we have set 34 | * up the memory controller so that we can use RAM). 35 | * 36 | * Keep it *SMALL* and remember to set CFG_GBL_DATA_SIZE > sizeof(gd_t) 37 | */ 38 | 39 | typedef struct global_data { 40 | bd_t *bd; 41 | unsigned long flags; 42 | unsigned long baudrate; 43 | unsigned long have_console; /* serial_init() was called */ 44 | unsigned long ram_size; /* RAM size */ 45 | unsigned long reloc_off; /* Relocation Offset */ 46 | unsigned long env_addr; /* Address of Environment struct */ 47 | unsigned long env_valid; /* Checksum of Environment valid? */ 48 | void **jt; /* jump table */ 49 | } gd_t; 50 | 51 | /* 52 | * Global Data Flags 53 | */ 54 | #define GD_FLG_RELOC 0x00001 /* Code was relocated to RAM */ 55 | #define GD_FLG_DEVINIT 0x00002 /* Devices have been initialized */ 56 | #define GD_FLG_SILENT 0x00004 /* Silent mode */ 57 | 58 | #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("k0") 59 | 60 | #endif /* __ASM_GBL_DATA_H */ 61 | -------------------------------------------------------------------------------- /include/asm-mips/inca-ip.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanwrt/u-boot_mt7620/48a4ba43b95f0536e3db9f611e8c4970f92ebaea/include/asm-mips/inca-ip.h -------------------------------------------------------------------------------- /include/asm-mips/isadep.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Various ISA level dependant constants. 3 | * Most of the following constants reflect the different layout 4 | * of Coprocessor 0 registers. 5 | * 6 | * Copyright (c) 1998 Harald Koerfgen 7 | */ 8 | #include 9 | 10 | #ifndef __ASM_ISADEP_H 11 | #define __ASM_ISADEP_H 12 | 13 | #if defined(CONFIG_CPU_R3000) 14 | /* 15 | * R2000 or R3000 16 | */ 17 | 18 | /* 19 | * kernel or user mode? (CP0_STATUS) 20 | */ 21 | #define KU_MASK 0x08 22 | #define KU_USER 0x08 23 | #define KU_KERN 0x00 24 | 25 | #else 26 | /* 27 | * kernel or user mode? 28 | */ 29 | #define KU_MASK 0x18 30 | #define KU_USER 0x10 31 | #define KU_KERN 0x00 32 | 33 | #endif 34 | 35 | #endif /* __ASM_ISADEP_H */ 36 | -------------------------------------------------------------------------------- /include/asm-mips/ptrace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is subject to the terms and conditions of the GNU General Public 3 | * License. See the file "COPYING" in the main directory of this archive 4 | * for more details. 5 | * 6 | * Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 by Ralf Baechle 7 | * 8 | * Machine dependent structs and defines to help the user use 9 | * the ptrace system call. 10 | */ 11 | #ifndef _ASM_PTRACE_H 12 | #define _ASM_PTRACE_H 13 | 14 | #include 15 | #include 16 | 17 | /* 0 - 31 are integer registers, 32 - 63 are fp registers. */ 18 | #define FPR_BASE 32 19 | #define PC 64 20 | #define CAUSE 65 21 | #define BADVADDR 66 22 | #define MMHI 67 23 | #define MMLO 68 24 | #define FPC_CSR 69 25 | #define FPC_EIR 70 26 | 27 | #ifndef _LANGUAGE_ASSEMBLY 28 | /* 29 | * This struct defines the way the registers are stored on the stack during a 30 | * system call/exception. As usual the registers k0/k1 aren't being saved. 31 | */ 32 | struct pt_regs { 33 | /* Pad bytes for argument save space on the stack. */ 34 | unsigned long pad0[6]; 35 | 36 | /* Saved main processor registers. */ 37 | unsigned long regs[32]; 38 | 39 | /* Other saved registers. */ 40 | unsigned long lo; 41 | unsigned long hi; 42 | 43 | /* 44 | * saved cp0 registers 45 | */ 46 | unsigned long cp0_epc; 47 | unsigned long cp0_badvaddr; 48 | unsigned long cp0_status; 49 | unsigned long cp0_cause; 50 | }; 51 | 52 | #endif /* !(_LANGUAGE_ASSEMBLY) */ 53 | 54 | /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ 55 | /* #define PTRACE_GETREGS 12 */ 56 | /* #define PTRACE_SETREGS 13 */ 57 | /* #define PTRACE_GETFPREGS 14 */ 58 | /* #define PTRACE_SETFPREGS 15 */ 59 | /* #define PTRACE_GETFPXREGS 18 */ 60 | /* #define PTRACE_SETFPXREGS 19 */ 61 | 62 | #define PTRACE_SETOPTIONS 21 63 | 64 | /* options set using PTRACE_SETOPTIONS */ 65 | #define PTRACE_O_TRACESYSGOOD 0x00000001 66 | 67 | #if 0 /* def _LANGUAGE_ASSEMBLY */ 68 | #include 69 | #endif 70 | 71 | #ifdef __KERNEL__ 72 | 73 | #ifndef _LANGUAGE_ASSEMBLY 74 | /* 75 | * Does the process account for user or for system time? 76 | */ 77 | #define user_mode(regs) (((regs)->cp0_status & KU_MASK) == KU_USER) 78 | 79 | #define instruction_pointer(regs) ((regs)->cp0_epc) 80 | 81 | extern void show_regs(struct pt_regs *); 82 | #endif /* !(_LANGUAGE_ASSEMBLY) */ 83 | 84 | #endif 85 | 86 | #endif /* _ASM_PTRACE_H */ 87 | -------------------------------------------------------------------------------- /include/asm-mips/reg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Various register offset definitions for debuggers, core file 3 | * examiners and whatnot. 4 | * 5 | * This file is subject to the terms and conditions of the GNU General Public 6 | * License. See the file "COPYING" in the main directory of this archive 7 | * for more details. 8 | * 9 | * Copyright (C) 1995, 1999 by Ralf Baechle 10 | */ 11 | #ifndef __ASM_MIPS_REG_H 12 | #define __ASM_MIPS_REG_H 13 | 14 | /* 15 | * This defines/structures correspond to the register layout on stack - 16 | * if the order here is changed, it needs to be updated in 17 | * include/asm-mips/stackframe.h 18 | */ 19 | #define EF_REG0 6 20 | #define EF_REG1 7 21 | #define EF_REG2 8 22 | #define EF_REG3 9 23 | #define EF_REG4 10 24 | #define EF_REG5 11 25 | #define EF_REG6 12 26 | #define EF_REG7 13 27 | #define EF_REG8 14 28 | #define EF_REG9 15 29 | #define EF_REG10 16 30 | #define EF_REG11 17 31 | #define EF_REG12 18 32 | #define EF_REG13 19 33 | #define EF_REG14 20 34 | #define EF_REG15 21 35 | #define EF_REG16 22 36 | #define EF_REG17 23 37 | #define EF_REG18 24 38 | #define EF_REG19 25 39 | #define EF_REG20 26 40 | #define EF_REG21 27 41 | #define EF_REG22 28 42 | #define EF_REG23 29 43 | #define EF_REG24 30 44 | #define EF_REG25 31 45 | /* 46 | * k0/k1 unsaved 47 | */ 48 | #define EF_REG28 34 49 | #define EF_REG29 35 50 | #define EF_REG30 36 51 | #define EF_REG31 37 52 | 53 | /* 54 | * Saved special registers 55 | */ 56 | #define EF_LO 38 57 | #define EF_HI 39 58 | 59 | #define EF_CP0_EPC 40 60 | #define EF_CP0_BADVADDR 41 61 | #define EF_CP0_STATUS 42 62 | #define EF_CP0_CAUSE 44 63 | 64 | #define EF_SIZE 180 /* size in bytes */ 65 | 66 | #endif /* __ASM_MIPS_REG_H */ 67 | -------------------------------------------------------------------------------- /include/asm-mips/regdef.h: -------------------------------------------------------------------------------- 1 | /* 2 | * include/asm-mips/regdefs.h 3 | * 4 | * This file is subject to the terms and conditions of the GNU General Public 5 | * License. See the file "COPYING" in the main directory of this archive 6 | * for more details. 7 | * 8 | * Copyright (C) 1994, 1995 by Ralf Baechle 9 | */ 10 | 11 | #ifndef __ASM_MIPS_REGDEF_H 12 | #define __ASM_MIPS_REGDEF_H 13 | 14 | /* 15 | * Symbolic register names for 32 bit ABI 16 | */ 17 | #define zero $0 /* wired zero */ 18 | #define AT $1 /* assembler temp - uppercase because of ".set at" */ 19 | #define v0 $2 /* return value */ 20 | #define v1 $3 21 | #define a0 $4 /* argument registers */ 22 | #define a1 $5 23 | #define a2 $6 24 | #define a3 $7 25 | #define t0 $8 /* caller saved */ 26 | #define t1 $9 27 | #define t2 $10 28 | #define t3 $11 29 | #define t4 $12 30 | #define t5 $13 31 | #define t6 $14 32 | #define t7 $15 33 | #define s0 $16 /* callee saved */ 34 | #define s1 $17 35 | #define s2 $18 36 | #define s3 $19 37 | #define s4 $20 38 | #define s5 $21 39 | #define s6 $22 40 | #define s7 $23 41 | #define t8 $24 /* caller saved */ 42 | #define t9 $25 43 | #define jp $25 /* PIC jump register */ 44 | #define k0 $26 /* kernel scratch */ 45 | #define k1 $27 46 | #define gp $28 /* global pointer */ 47 | #define sp $29 /* stack pointer */ 48 | #define fp $30 /* frame pointer */ 49 | #define s8 $30 /* same like fp! */ 50 | #define ra $31 /* return address */ 51 | 52 | #endif /* __ASM_MIPS_REGDEF_H */ 53 | -------------------------------------------------------------------------------- /include/asm-mips/sgidefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is subject to the terms and conditions of the GNU General Public 3 | * License. See the file "COPYING" in the main directory of this archive 4 | * for more details. 5 | * 6 | * Copyright (C) 1996, 1999, 2001 Ralf Baechle 7 | * Copyright (C) 1999 Silicon Graphics, Inc. 8 | * Copyright (C) 2001 MIPS Technologies, Inc. 9 | */ 10 | #ifndef __ASM_SGIDEFS_H 11 | #define __ASM_SGIDEFS_H 12 | 13 | /* 14 | * Using a Linux compiler for building Linux seems logic but not to 15 | * everybody. 16 | */ 17 | #if 0 /* ndef __linux__ */ 18 | #error Use a Linux compiler or give up. 19 | #endif 20 | 21 | /* 22 | * Definitions for the ISA levels 23 | * 24 | * With the introduction of MIPS32 / MIPS64 instruction sets definitions 25 | * MIPS ISAs are no longer subsets of each other. Therefore comparisons 26 | * on these symbols except with == may result in unexpected results and 27 | * are forbidden! 28 | */ 29 | #define _MIPS_ISA_MIPS1 1 30 | #define _MIPS_ISA_MIPS2 2 31 | #define _MIPS_ISA_MIPS3 3 32 | #define _MIPS_ISA_MIPS4 4 33 | #define _MIPS_ISA_MIPS5 5 34 | #define _MIPS_ISA_MIPS32 6 35 | #define _MIPS_ISA_MIPS64 7 36 | 37 | /* 38 | * Subprogram calling convention 39 | */ 40 | #define _MIPS_SIM_ABI32 1 41 | #define _MIPS_SIM_NABI32 2 42 | #define _MIPS_SIM_ABI64 3 43 | 44 | #endif /* __ASM_SGIDEFS_H */ 45 | -------------------------------------------------------------------------------- /include/asm-mips/types.h: -------------------------------------------------------------------------------- 1 | /* $Id: //WIFI_SOC/release/SDK_4_1_0_0/Uboot/include/asm-mips/types.h#1 $ 2 | * 3 | * This file is subject to the terms and conditions of the GNU General Public 4 | * License. See the file "COPYING" in the main directory of this archive 5 | * for more details. 6 | * 7 | * Copyright (C) 1994, 1995, 1996, 1999 by Ralf Baechle 8 | * Copyright (C) 1999 Silicon Graphics, Inc. 9 | */ 10 | #ifndef _ASM_TYPES_H 11 | #define _ASM_TYPES_H 12 | 13 | typedef unsigned short umode_t; 14 | 15 | /* 16 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 17 | * header files exported to user space 18 | */ 19 | 20 | typedef __signed__ char __s8; 21 | typedef unsigned char __u8; 22 | 23 | typedef __signed__ short __s16; 24 | typedef unsigned short __u16; 25 | 26 | typedef __signed__ int __s32; 27 | typedef unsigned int __u32; 28 | 29 | #if (_MIPS_SZLONG == 64) 30 | 31 | typedef __signed__ long __s64; 32 | typedef unsigned long __u64; 33 | 34 | #else 35 | 36 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) 37 | typedef __signed__ long long __s64; 38 | typedef unsigned long long __u64; 39 | #endif 40 | 41 | #endif 42 | 43 | /* 44 | * These aren't exported outside the kernel to avoid name space clashes 45 | */ 46 | #ifdef __KERNEL__ 47 | 48 | typedef __signed char s8; 49 | typedef unsigned char u8; 50 | 51 | typedef __signed short s16; 52 | typedef unsigned short u16; 53 | 54 | typedef __signed int s32; 55 | typedef unsigned int u32; 56 | 57 | #if (_MIPS_SZLONG == 64) 58 | 59 | typedef __signed__ long s64; 60 | typedef unsigned long u64; 61 | 62 | #else 63 | 64 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) 65 | typedef __signed__ long long s64; 66 | typedef unsigned long long u64; 67 | #endif 68 | 69 | #endif 70 | 71 | #define BITS_PER_LONG _MIPS_SZLONG 72 | 73 | typedef unsigned long dma_addr_t; 74 | 75 | #endif /* __KERNEL__ */ 76 | 77 | #endif /* _ASM_TYPES_H */ 78 | -------------------------------------------------------------------------------- /include/asm-mips/u-boot.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2003 3 | * Wolfgang Denk, DENX Software Engineering, 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef _U_BOOT_H_ 25 | #define _U_BOOT_H_ 1 26 | 27 | typedef struct bd_info { 28 | int bi_baudrate; /* serial console baudrate */ 29 | unsigned long bi_ip_addr; /* IP Address */ 30 | unsigned char bi_enetaddr[6]; /* Ethernet adress */ 31 | unsigned long bi_arch_number; /* unique id for this board */ 32 | unsigned long bi_boot_params; /* where this board expects params */ 33 | unsigned long bi_memstart; /* start of DRAM memory */ 34 | unsigned long bi_memsize; /* size of DRAM memory in bytes */ 35 | unsigned long bi_flashstart; /* start of FLASH memory */ 36 | unsigned long bi_flashsize; /* size of FLASH memory */ 37 | unsigned long bi_flashoffset; /* reserved area for startup monitor */ 38 | } bd_t; 39 | #define bi_env_data bi_env->data 40 | #define bi_env_crc bi_env->crc 41 | 42 | #endif /* _U_BOOT_H_ */ 43 | -------------------------------------------------------------------------------- /include/asm/byteorder.h: -------------------------------------------------------------------------------- 1 | /* $Id: //WIFI_SOC/release/SDK_4_1_0_0/Uboot/include/asm/byteorder.h#1 $ 2 | * 3 | * This file is subject to the terms and conditions of the GNU General Public 4 | * License. See the file "COPYING" in the main directory of this archive 5 | * for more details. 6 | * 7 | * Copyright (C) by Ralf Baechle 8 | */ 9 | #ifndef _MIPS_BYTEORDER_H 10 | #define _MIPS_BYTEORDER_H 11 | 12 | #include 13 | 14 | #ifdef __GNUC__ 15 | 16 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) 17 | # define __BYTEORDER_HAS_U64__ 18 | # define __SWAB_64_THRU_32__ 19 | #endif 20 | 21 | #endif /* __GNUC__ */ 22 | 23 | #if defined (__MIPSEB__) 24 | # include 25 | #elif defined (__MIPSEL__) 26 | # include 27 | #else 28 | # error "MIPS, but neither __MIPSEB__, nor __MIPSEL__???" 29 | #endif 30 | 31 | #endif /* _MIPS_BYTEORDER_H */ 32 | -------------------------------------------------------------------------------- /include/asm/cachectl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * cachectl.h -- defines for MIPS cache control system calls 3 | * 4 | * Copyright (C) 1994, 1995, 1996 by Ralf Baechle 5 | */ 6 | #ifndef __ASM_MIPS_CACHECTL 7 | #define __ASM_MIPS_CACHECTL 8 | 9 | /* 10 | * Options for cacheflush system call 11 | */ 12 | #define ICACHE (1<<0) /* flush instruction cache */ 13 | #define DCACHE (1<<1) /* writeback and flush data cache */ 14 | #define BCACHE (ICACHE|DCACHE) /* flush both caches */ 15 | 16 | /* 17 | * Caching modes for the cachectl(2) call 18 | * 19 | * cachectl(2) is currently not supported and returns ENOSYS. 20 | */ 21 | #define CACHEABLE 0 /* make pages cacheable */ 22 | #define UNCACHEABLE 1 /* make pages uncacheable */ 23 | 24 | #endif /* __ASM_MIPS_CACHECTL */ 25 | -------------------------------------------------------------------------------- /include/asm/cacheops.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Cache operations for the cache instruction. 3 | * 4 | * This file is subject to the terms and conditions of the GNU General Public 5 | * License. See the file "COPYING" in the main directory of this archive 6 | * for more details. 7 | * 8 | * (C) Copyright 1996, 1997 by Ralf Baechle 9 | */ 10 | #ifndef __ASM_MIPS_CACHEOPS_H 11 | #define __ASM_MIPS_CACHEOPS_H 12 | 13 | /* 14 | * Cache Operations 15 | */ 16 | #define Index_Invalidate_I 0x00 17 | #define Index_Writeback_Inv_D 0x01 18 | #define Index_Invalidate_SI 0x02 19 | #define Index_Writeback_Inv_SD 0x03 20 | #define Index_Load_Tag_I 0x04 21 | #define Index_Load_Tag_D 0x05 22 | #define Index_Load_Tag_SI 0x06 23 | #define Index_Load_Tag_SD 0x07 24 | #define Index_Store_Tag_I 0x08 25 | #define Index_Store_Tag_D 0x09 26 | #define Index_Store_Tag_SI 0x0A 27 | #define Index_Store_Tag_SD 0x0B 28 | #define Create_Dirty_Excl_D 0x0d 29 | #define Create_Dirty_Excl_SD 0x0f 30 | #define Hit_Invalidate_I 0x10 31 | #define Hit_Invalidate_D 0x11 32 | #define Hit_Invalidate_SI 0x12 33 | #define Hit_Invalidate_SD 0x13 34 | #define Fill 0x14 35 | #define Hit_Writeback_Inv_D 0x15 36 | /* 0x16 is unused */ 37 | #define Hit_Writeback_Inv_SD 0x17 38 | #define Hit_Writeback_I 0x18 39 | #define Hit_Writeback_D 0x19 40 | /* 0x1a is unused */ 41 | #define Hit_Writeback_SD 0x1b 42 | /* 0x1c is unused */ 43 | /* 0x1e is unused */ 44 | #define Hit_Set_Virtual_SI 0x1e 45 | #define Hit_Set_Virtual_SD 0x1f 46 | 47 | #endif /* __ASM_MIPS_CACHEOPS_H */ 48 | -------------------------------------------------------------------------------- /include/asm/global_data.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2002-2003 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef __ASM_GBL_DATA_H 25 | #define __ASM_GBL_DATA_H 26 | 27 | #include 28 | 29 | /* 30 | * The following data structure is placed in some memory wich is 31 | * available very early after boot (like DPRAM on MPC8xx/MPC82xx, or 32 | * some locked parts of the data cache) to allow for a minimum set of 33 | * global variables during system initialization (until we have set 34 | * up the memory controller so that we can use RAM). 35 | * 36 | * Keep it *SMALL* and remember to set CFG_GBL_DATA_SIZE > sizeof(gd_t) 37 | */ 38 | 39 | typedef struct global_data { 40 | bd_t *bd; 41 | unsigned long flags; 42 | unsigned long baudrate; 43 | unsigned long have_console; /* serial_init() was called */ 44 | unsigned long ram_size; /* RAM size */ 45 | unsigned long reloc_off; /* Relocation Offset */ 46 | unsigned long env_addr; /* Address of Environment struct */ 47 | unsigned long env_valid; /* Checksum of Environment valid? */ 48 | void **jt; /* jump table */ 49 | } gd_t; 50 | 51 | /* 52 | * Global Data Flags 53 | */ 54 | #define GD_FLG_RELOC 0x00001 /* Code was relocated to RAM */ 55 | #define GD_FLG_DEVINIT 0x00002 /* Devices have been initialized */ 56 | #define GD_FLG_SILENT 0x00004 /* Silent mode */ 57 | 58 | #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("k0") 59 | 60 | #endif /* __ASM_GBL_DATA_H */ 61 | -------------------------------------------------------------------------------- /include/asm/inca-ip.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanwrt/u-boot_mt7620/48a4ba43b95f0536e3db9f611e8c4970f92ebaea/include/asm/inca-ip.h -------------------------------------------------------------------------------- /include/asm/isadep.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Various ISA level dependant constants. 3 | * Most of the following constants reflect the different layout 4 | * of Coprocessor 0 registers. 5 | * 6 | * Copyright (c) 1998 Harald Koerfgen 7 | */ 8 | #include 9 | 10 | #ifndef __ASM_ISADEP_H 11 | #define __ASM_ISADEP_H 12 | 13 | #if defined(CONFIG_CPU_R3000) 14 | /* 15 | * R2000 or R3000 16 | */ 17 | 18 | /* 19 | * kernel or user mode? (CP0_STATUS) 20 | */ 21 | #define KU_MASK 0x08 22 | #define KU_USER 0x08 23 | #define KU_KERN 0x00 24 | 25 | #else 26 | /* 27 | * kernel or user mode? 28 | */ 29 | #define KU_MASK 0x18 30 | #define KU_USER 0x10 31 | #define KU_KERN 0x00 32 | 33 | #endif 34 | 35 | #endif /* __ASM_ISADEP_H */ 36 | -------------------------------------------------------------------------------- /include/asm/ptrace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is subject to the terms and conditions of the GNU General Public 3 | * License. See the file "COPYING" in the main directory of this archive 4 | * for more details. 5 | * 6 | * Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 by Ralf Baechle 7 | * 8 | * Machine dependent structs and defines to help the user use 9 | * the ptrace system call. 10 | */ 11 | #ifndef _ASM_PTRACE_H 12 | #define _ASM_PTRACE_H 13 | 14 | #include 15 | #include 16 | 17 | /* 0 - 31 are integer registers, 32 - 63 are fp registers. */ 18 | #define FPR_BASE 32 19 | #define PC 64 20 | #define CAUSE 65 21 | #define BADVADDR 66 22 | #define MMHI 67 23 | #define MMLO 68 24 | #define FPC_CSR 69 25 | #define FPC_EIR 70 26 | 27 | #ifndef _LANGUAGE_ASSEMBLY 28 | /* 29 | * This struct defines the way the registers are stored on the stack during a 30 | * system call/exception. As usual the registers k0/k1 aren't being saved. 31 | */ 32 | struct pt_regs { 33 | /* Pad bytes for argument save space on the stack. */ 34 | unsigned long pad0[6]; 35 | 36 | /* Saved main processor registers. */ 37 | unsigned long regs[32]; 38 | 39 | /* Other saved registers. */ 40 | unsigned long lo; 41 | unsigned long hi; 42 | 43 | /* 44 | * saved cp0 registers 45 | */ 46 | unsigned long cp0_epc; 47 | unsigned long cp0_badvaddr; 48 | unsigned long cp0_status; 49 | unsigned long cp0_cause; 50 | }; 51 | 52 | #endif /* !(_LANGUAGE_ASSEMBLY) */ 53 | 54 | /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ 55 | /* #define PTRACE_GETREGS 12 */ 56 | /* #define PTRACE_SETREGS 13 */ 57 | /* #define PTRACE_GETFPREGS 14 */ 58 | /* #define PTRACE_SETFPREGS 15 */ 59 | /* #define PTRACE_GETFPXREGS 18 */ 60 | /* #define PTRACE_SETFPXREGS 19 */ 61 | 62 | #define PTRACE_SETOPTIONS 21 63 | 64 | /* options set using PTRACE_SETOPTIONS */ 65 | #define PTRACE_O_TRACESYSGOOD 0x00000001 66 | 67 | #if 0 /* def _LANGUAGE_ASSEMBLY */ 68 | #include 69 | #endif 70 | 71 | #ifdef __KERNEL__ 72 | 73 | #ifndef _LANGUAGE_ASSEMBLY 74 | /* 75 | * Does the process account for user or for system time? 76 | */ 77 | #define user_mode(regs) (((regs)->cp0_status & KU_MASK) == KU_USER) 78 | 79 | #define instruction_pointer(regs) ((regs)->cp0_epc) 80 | 81 | extern void show_regs(struct pt_regs *); 82 | #endif /* !(_LANGUAGE_ASSEMBLY) */ 83 | 84 | #endif 85 | 86 | #endif /* _ASM_PTRACE_H */ 87 | -------------------------------------------------------------------------------- /include/asm/reg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Various register offset definitions for debuggers, core file 3 | * examiners and whatnot. 4 | * 5 | * This file is subject to the terms and conditions of the GNU General Public 6 | * License. See the file "COPYING" in the main directory of this archive 7 | * for more details. 8 | * 9 | * Copyright (C) 1995, 1999 by Ralf Baechle 10 | */ 11 | #ifndef __ASM_MIPS_REG_H 12 | #define __ASM_MIPS_REG_H 13 | 14 | /* 15 | * This defines/structures correspond to the register layout on stack - 16 | * if the order here is changed, it needs to be updated in 17 | * include/asm-mips/stackframe.h 18 | */ 19 | #define EF_REG0 6 20 | #define EF_REG1 7 21 | #define EF_REG2 8 22 | #define EF_REG3 9 23 | #define EF_REG4 10 24 | #define EF_REG5 11 25 | #define EF_REG6 12 26 | #define EF_REG7 13 27 | #define EF_REG8 14 28 | #define EF_REG9 15 29 | #define EF_REG10 16 30 | #define EF_REG11 17 31 | #define EF_REG12 18 32 | #define EF_REG13 19 33 | #define EF_REG14 20 34 | #define EF_REG15 21 35 | #define EF_REG16 22 36 | #define EF_REG17 23 37 | #define EF_REG18 24 38 | #define EF_REG19 25 39 | #define EF_REG20 26 40 | #define EF_REG21 27 41 | #define EF_REG22 28 42 | #define EF_REG23 29 43 | #define EF_REG24 30 44 | #define EF_REG25 31 45 | /* 46 | * k0/k1 unsaved 47 | */ 48 | #define EF_REG28 34 49 | #define EF_REG29 35 50 | #define EF_REG30 36 51 | #define EF_REG31 37 52 | 53 | /* 54 | * Saved special registers 55 | */ 56 | #define EF_LO 38 57 | #define EF_HI 39 58 | 59 | #define EF_CP0_EPC 40 60 | #define EF_CP0_BADVADDR 41 61 | #define EF_CP0_STATUS 42 62 | #define EF_CP0_CAUSE 44 63 | 64 | #define EF_SIZE 180 /* size in bytes */ 65 | 66 | #endif /* __ASM_MIPS_REG_H */ 67 | -------------------------------------------------------------------------------- /include/asm/regdef.h: -------------------------------------------------------------------------------- 1 | /* 2 | * include/asm-mips/regdefs.h 3 | * 4 | * This file is subject to the terms and conditions of the GNU General Public 5 | * License. See the file "COPYING" in the main directory of this archive 6 | * for more details. 7 | * 8 | * Copyright (C) 1994, 1995 by Ralf Baechle 9 | */ 10 | 11 | #ifndef __ASM_MIPS_REGDEF_H 12 | #define __ASM_MIPS_REGDEF_H 13 | 14 | /* 15 | * Symbolic register names for 32 bit ABI 16 | */ 17 | #define zero $0 /* wired zero */ 18 | #define AT $1 /* assembler temp - uppercase because of ".set at" */ 19 | #define v0 $2 /* return value */ 20 | #define v1 $3 21 | #define a0 $4 /* argument registers */ 22 | #define a1 $5 23 | #define a2 $6 24 | #define a3 $7 25 | #define t0 $8 /* caller saved */ 26 | #define t1 $9 27 | #define t2 $10 28 | #define t3 $11 29 | #define t4 $12 30 | #define t5 $13 31 | #define t6 $14 32 | #define t7 $15 33 | #define s0 $16 /* callee saved */ 34 | #define s1 $17 35 | #define s2 $18 36 | #define s3 $19 37 | #define s4 $20 38 | #define s5 $21 39 | #define s6 $22 40 | #define s7 $23 41 | #define t8 $24 /* caller saved */ 42 | #define t9 $25 43 | #define jp $25 /* PIC jump register */ 44 | #define k0 $26 /* kernel scratch */ 45 | #define k1 $27 46 | #define gp $28 /* global pointer */ 47 | #define sp $29 /* stack pointer */ 48 | #define fp $30 /* frame pointer */ 49 | #define s8 $30 /* same like fp! */ 50 | #define ra $31 /* return address */ 51 | 52 | #endif /* __ASM_MIPS_REGDEF_H */ 53 | -------------------------------------------------------------------------------- /include/asm/sgidefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is subject to the terms and conditions of the GNU General Public 3 | * License. See the file "COPYING" in the main directory of this archive 4 | * for more details. 5 | * 6 | * Copyright (C) 1996, 1999, 2001 Ralf Baechle 7 | * Copyright (C) 1999 Silicon Graphics, Inc. 8 | * Copyright (C) 2001 MIPS Technologies, Inc. 9 | */ 10 | #ifndef __ASM_SGIDEFS_H 11 | #define __ASM_SGIDEFS_H 12 | 13 | /* 14 | * Using a Linux compiler for building Linux seems logic but not to 15 | * everybody. 16 | */ 17 | #if 0 /* ndef __linux__ */ 18 | #error Use a Linux compiler or give up. 19 | #endif 20 | 21 | /* 22 | * Definitions for the ISA levels 23 | * 24 | * With the introduction of MIPS32 / MIPS64 instruction sets definitions 25 | * MIPS ISAs are no longer subsets of each other. Therefore comparisons 26 | * on these symbols except with == may result in unexpected results and 27 | * are forbidden! 28 | */ 29 | #define _MIPS_ISA_MIPS1 1 30 | #define _MIPS_ISA_MIPS2 2 31 | #define _MIPS_ISA_MIPS3 3 32 | #define _MIPS_ISA_MIPS4 4 33 | #define _MIPS_ISA_MIPS5 5 34 | #define _MIPS_ISA_MIPS32 6 35 | #define _MIPS_ISA_MIPS64 7 36 | 37 | /* 38 | * Subprogram calling convention 39 | */ 40 | #define _MIPS_SIM_ABI32 1 41 | #define _MIPS_SIM_NABI32 2 42 | #define _MIPS_SIM_ABI64 3 43 | 44 | #endif /* __ASM_SGIDEFS_H */ 45 | -------------------------------------------------------------------------------- /include/asm/types.h: -------------------------------------------------------------------------------- 1 | /* $Id: //WIFI_SOC/release/SDK_4_1_0_0/Uboot/include/asm/types.h#1 $ 2 | * 3 | * This file is subject to the terms and conditions of the GNU General Public 4 | * License. See the file "COPYING" in the main directory of this archive 5 | * for more details. 6 | * 7 | * Copyright (C) 1994, 1995, 1996, 1999 by Ralf Baechle 8 | * Copyright (C) 1999 Silicon Graphics, Inc. 9 | */ 10 | #ifndef _ASM_TYPES_H 11 | #define _ASM_TYPES_H 12 | 13 | typedef unsigned short umode_t; 14 | 15 | /* 16 | * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 17 | * header files exported to user space 18 | */ 19 | 20 | typedef __signed__ char __s8; 21 | typedef unsigned char __u8; 22 | 23 | typedef __signed__ short __s16; 24 | typedef unsigned short __u16; 25 | 26 | typedef __signed__ int __s32; 27 | typedef unsigned int __u32; 28 | 29 | #if (_MIPS_SZLONG == 64) 30 | 31 | typedef __signed__ long __s64; 32 | typedef unsigned long __u64; 33 | 34 | #else 35 | 36 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) 37 | typedef __signed__ long long __s64; 38 | typedef unsigned long long __u64; 39 | #endif 40 | 41 | #endif 42 | 43 | /* 44 | * These aren't exported outside the kernel to avoid name space clashes 45 | */ 46 | #ifdef __KERNEL__ 47 | 48 | typedef __signed char s8; 49 | typedef unsigned char u8; 50 | 51 | typedef __signed short s16; 52 | typedef unsigned short u16; 53 | 54 | typedef __signed int s32; 55 | typedef unsigned int u32; 56 | 57 | #if (_MIPS_SZLONG == 64) 58 | 59 | typedef __signed__ long s64; 60 | typedef unsigned long u64; 61 | 62 | #else 63 | 64 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) 65 | typedef __signed__ long long s64; 66 | typedef unsigned long long u64; 67 | #endif 68 | 69 | #endif 70 | 71 | #define BITS_PER_LONG _MIPS_SZLONG 72 | 73 | typedef unsigned long dma_addr_t; 74 | 75 | #endif /* __KERNEL__ */ 76 | 77 | #endif /* _ASM_TYPES_H */ 78 | -------------------------------------------------------------------------------- /include/asm/u-boot.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2003 3 | * Wolfgang Denk, DENX Software Engineering, 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef _U_BOOT_H_ 25 | #define _U_BOOT_H_ 1 26 | 27 | typedef struct bd_info { 28 | int bi_baudrate; /* serial console baudrate */ 29 | unsigned long bi_ip_addr; /* IP Address */ 30 | unsigned char bi_enetaddr[6]; /* Ethernet adress */ 31 | unsigned long bi_arch_number; /* unique id for this board */ 32 | unsigned long bi_boot_params; /* where this board expects params */ 33 | unsigned long bi_memstart; /* start of DRAM memory */ 34 | unsigned long bi_memsize; /* size of DRAM memory in bytes */ 35 | unsigned long bi_flashstart; /* start of FLASH memory */ 36 | unsigned long bi_flashsize; /* size of FLASH memory */ 37 | unsigned long bi_flashoffset; /* reserved area for startup monitor */ 38 | } bd_t; 39 | #define bi_env_data bi_env->data 40 | #define bi_env_crc bi_env->crc 41 | 42 | #endif /* _U_BOOT_H_ */ 43 | -------------------------------------------------------------------------------- /include/asm/unaligned.h: -------------------------------------------------------------------------------- 1 | #ifndef _GENERIC_UNALIGNED_H 2 | #define _GENERIC_UNALIGNED_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | /* 11 | * Select endianness 12 | */ 13 | #if defined(__LITTLE_ENDIAN) 14 | #define get_unaligned __get_unaligned_le 15 | #define put_unaligned __put_unaligned_le 16 | #elif defined(__BIG_ENDIAN) 17 | #define get_unaligned __get_unaligned_be 18 | #define put_unaligned __put_unaligned_be 19 | #else 20 | #error invalid endian 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /include/bedbug/bedbug.h: -------------------------------------------------------------------------------- 1 | /* $Id: //WIFI_SOC/release/SDK_4_1_0_0/Uboot/include/bedbug/bedbug.h#1 $ */ 2 | 3 | #ifndef _BEDBUG_H 4 | #define _BEDBUG_H 5 | 6 | #ifndef NULL 7 | #define NULL 0 8 | #endif 9 | 10 | #define _USE_PROTOTYPES 11 | 12 | #ifndef isblank 13 | #define isblank(c) isspace((int)(c)) 14 | #endif 15 | 16 | #ifndef __P 17 | #if defined(_USE_PROTOTYPES) && (defined(__STDC__) || defined(__cplusplus)) 18 | #define __P(protos) protos /* full-blown ANSI C */ 19 | #else 20 | #define __P(protos) () /* traditional C preprocessor */ 21 | #endif 22 | #endif 23 | 24 | #define assert( condition ) if( (condition) ) _exit(0) 25 | 26 | #endif /* _BEDBUG_H */ 27 | 28 | 29 | /* 30 | * Copyright (c) 2001 William L. Pitts 31 | * All rights reserved. 32 | * 33 | * Redistribution and use in source and binary forms are freely 34 | * permitted provided that the above copyright notice and this 35 | * paragraph and the following disclaimer are duplicated in all 36 | * such forms. 37 | * 38 | * This software is provided "AS IS" and without any express or 39 | * implied warranties, including, without limitation, the implied 40 | * warranties of merchantability and fitness for a particular 41 | * purpose. 42 | */ 43 | -------------------------------------------------------------------------------- /include/bedbug/type.h: -------------------------------------------------------------------------------- 1 | #ifndef _TYPE_BEDBUG_H 2 | #define _TYPE_BEDBUG_H 3 | 4 | /* Supporting routines */ 5 | int bedbug_puts (const char *); 6 | void bedbug_init (void); 7 | void bedbug860_init (void); 8 | void do_bedbug_breakpoint (struct pt_regs *); 9 | void bedbug_main_loop (unsigned long, struct pt_regs *); 10 | 11 | 12 | typedef struct { 13 | int hw_debug_enabled; 14 | int stopped; 15 | int current_bp; 16 | struct pt_regs *regs; 17 | 18 | void (*do_break) (cmd_tbl_t *, int, int, char *[]); 19 | void (*break_isr) (struct pt_regs *); 20 | int (*find_empty) (void); 21 | int (*set) (int, unsigned long); 22 | int (*clear) (int); 23 | } CPU_DEBUG_CTX; 24 | 25 | 26 | #endif /* _TYPE_BEDBUG_H */ 27 | -------------------------------------------------------------------------------- /include/bmp_layout.h: -------------------------------------------------------------------------------- 1 | /* (C) Copyright 2002 2 | * Detlev Zundel, DENX Software Engineering, dzu@denx.de. 3 | * 4 | * See file CREDITS for list of people who contributed to this 5 | * project. 6 | * 7 | * This program is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU General Public License as 9 | * published by the Free Software Foundation; either version 2 of 10 | * the License, or (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 20 | * MA 02111-1307 USA 21 | */ 22 | 23 | /************************************************************************/ 24 | /* ** Layout of a bmp file */ 25 | /************************************************************************/ 26 | 27 | #ifndef _BMP_H_ 28 | #define _BMP_H_ 29 | 30 | typedef struct bmp_color_table_entry { 31 | __u8 blue; 32 | __u8 green; 33 | __u8 red; 34 | __u8 reserved; 35 | } __attribute__ ((packed)) bmp_color_table_entry_t; 36 | 37 | /* When accessing these fields, remember that they are stored in little 38 | endian format, so use linux macros, e.g. le32_to_cpu(width) */ 39 | 40 | typedef struct bmp_header { 41 | /* Header */ 42 | char signature[2]; 43 | __u32 file_size; 44 | __u32 reserved; 45 | __u32 data_offset; 46 | /* InfoHeader */ 47 | __u32 size; 48 | __u32 width; 49 | __u32 height; 50 | __u16 planes; 51 | __u16 bit_count; 52 | __u32 compression; 53 | __u32 image_size; 54 | __u32 x_pixels_per_m; 55 | __u32 y_pixels_per_m; 56 | __u32 colors_used; 57 | __u32 colors_important; 58 | /* ColorTable */ 59 | 60 | } __attribute__ ((packed)) bmp_header_t; 61 | 62 | typedef struct bmp_image { 63 | bmp_header_t header; 64 | /* We use a zero sized array just as a placeholder for variable 65 | sized array */ 66 | bmp_color_table_entry_t color_table[0]; 67 | } bmp_image_t; 68 | 69 | /* Data in the bmp_image is aligned to this length */ 70 | #define BMP_DATA_ALIGN 4 71 | 72 | /* Constants for the compression field */ 73 | #define BMP_BI_RGB 0 74 | #define BMP_BI_RLE8 1 75 | #define BMP_BI_RLE4 2 76 | 77 | #endif /* _BMP_H_ */ 78 | -------------------------------------------------------------------------------- /include/circbuf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2003 3 | * Gerry Hamel, geh@ti.com, Texas Instruments 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | */ 20 | 21 | #ifndef __CIRCBUF_H__ 22 | #define __CIRCBUF_H__ 23 | 24 | typedef struct circbuf { 25 | unsigned int size; /* current number of bytes held */ 26 | unsigned int totalsize; /* number of bytes allocated */ 27 | 28 | char *top; /* pointer to current buffer start */ 29 | char *tail; /* pointer to space for next element */ 30 | 31 | char *data; /* all data */ 32 | char *end; /* end of data buffer */ 33 | } circbuf_t; 34 | 35 | int buf_init (circbuf_t * buf, unsigned int size); 36 | int buf_free (circbuf_t * buf); 37 | int buf_pop (circbuf_t * buf, char *dest, unsigned int len); 38 | int buf_push (circbuf_t * buf, const char *src, unsigned int len); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /include/config.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /include/config.mk: -------------------------------------------------------------------------------- 1 | ARCH = mips 2 | CPU = ralink_soc 3 | BOARD = rt2880 4 | -------------------------------------------------------------------------------- /include/console.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2000 3 | * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef _CONSOLE_H_ 25 | #define _CONSOLE_H_ 26 | 27 | #include 28 | 29 | /* 30 | ** VARIABLES 31 | */ 32 | 33 | extern device_t *stdio_devices[] ; 34 | extern char *stdio_names[MAX_FILES] ; 35 | 36 | int console_realloc(int top); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /include/exports.h: -------------------------------------------------------------------------------- 1 | #ifndef __EXPORTS_H__ 2 | #define __EXPORTS_H__ 3 | 4 | #ifndef __ASSEMBLY__ 5 | 6 | #include 7 | 8 | /* These are declarations of exported functions available in C code */ 9 | unsigned long get_version(void); 10 | int getc(void); 11 | int tstc(void); 12 | void putc(const char); 13 | void puts(const char*); 14 | void printf(const char* fmt, ...); 15 | void install_hdlr(int, interrupt_handler_t*, void*); 16 | void free_hdlr(int); 17 | void *malloc(size_t); 18 | void free(void*); 19 | void udelay(unsigned long); 20 | unsigned long get_timer(unsigned long); 21 | void vprintf(const char *, va_list); 22 | void do_reset (void); 23 | 24 | void app_startup(char **); 25 | 26 | #endif /* ifndef __ASSEMBLY__ */ 27 | 28 | enum { 29 | #define EXPORT_FUNC(x) XF_ ## x , 30 | #include <_exports.h> 31 | #undef EXPORT_FUNC 32 | 33 | XF_MAX 34 | }; 35 | 36 | #define XF_VERSION 2 37 | 38 | #if defined(CONFIG_I386) 39 | extern gd_t *global_data; 40 | #endif 41 | 42 | #endif /* __EXPORTS_H__ */ 43 | -------------------------------------------------------------------------------- /include/fat_old.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cleanwrt/u-boot_mt7620/48a4ba43b95f0536e3db9f611e8c4970f92ebaea/include/fat_old.h -------------------------------------------------------------------------------- /include/gpio.h: -------------------------------------------------------------------------------- 1 | #ifndef GPIO_H 2 | #define GPIO_H 3 | 4 | #if defined(MT7620_MP) 5 | /* LED, Button GPIO# definition */ 6 | #define RST_BTN 12 7 | #define WPS_BTN 12 8 | //#define PWR_LED GND 9 | #define WIFI_2G_LED 72 10 | #define WAN_LED 44 11 | 12 | enum gpio_reg_id { 13 | GPIO_INT = 0, 14 | GPIO_EDGE, 15 | GPIO_RMASK, 16 | GPIO_MASK, 17 | GPIO_DATA, 18 | GPIO_DIR, 19 | GPIO_POL, 20 | GPIO_SET, 21 | GPIO_RESET, 22 | GPIO_TOG, 23 | GPIO_MAX_REG 24 | }; 25 | 26 | extern unsigned int mtk7620_get_gpio_reg_addr(unsigned short gpio_nr, enum gpio_reg_id id); 27 | extern int mtk7620_set_gpio_dir(unsigned short gpio_nr, unsigned short gpio_dir); 28 | extern int mtk7620_get_gpio_pin(unsigned short gpio_nr); 29 | extern int mtk7620_set_gpio_pin(unsigned short gpio_nr, unsigned int val); 30 | #endif 31 | 32 | extern void led_init(void); 33 | extern void gpio_init(void); 34 | extern void LEDON(void); 35 | extern void LEDOFF(void); 36 | extern unsigned long DETECT(void); 37 | extern unsigned long DETECT_WPS(void); 38 | extern void rst_fengine(void); 39 | 40 | #if defined(ALL_LED_OFF) 41 | extern void ALL_LEDON(void); 42 | extern void ALL_LEDOFF(void); 43 | #endif 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /include/hush.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2001 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef _HUSH_H_ 25 | #define _HUSH_H_ 26 | 27 | #define FLAG_EXIT_FROM_LOOP 1 28 | #define FLAG_PARSE_SEMICOLON (1 << 1) /* symbol ';' is special for parser */ 29 | #define FLAG_REPARSING (1 << 2) /* >=2nd pass */ 30 | 31 | extern int u_boot_hush_start(void); 32 | extern int parse_string_outer(char *, int); 33 | extern int parse_file_outer(void); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /include/ide.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2000 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #ifndef _IDE_H 25 | #define _IDE_H 26 | 27 | #define IDE_BUS(dev) (dev >> 1) 28 | 29 | #ifdef CONFIG_IDE_LED 30 | 31 | /* 32 | * LED Port 33 | */ 34 | #define LED_PORT ((uchar *)(PER8_BASE + 0x3000)) 35 | #define LED_IDE1 0x01 36 | #define LED_IDE2 0x02 37 | #define DEVICE_LED(d) ((d & 2) | ((d & 2) == 0)) /* depends on bit positions! */ 38 | 39 | #endif /* CONFIG_IDE_LED */ 40 | 41 | #ifdef CFG_64BIT_LBA 42 | typedef uint64_t lbaint_t; 43 | #else 44 | typedef ulong lbaint_t; 45 | #endif 46 | 47 | /* 48 | * Function Prototypes 49 | */ 50 | 51 | void ide_init (void); 52 | ulong ide_read (int device, lbaint_t blknr, ulong blkcnt, ulong *buffer); 53 | ulong ide_write (int device, lbaint_t blknr, ulong blkcnt, ulong *buffer); 54 | 55 | #endif /* _IDE_H */ 56 | -------------------------------------------------------------------------------- /include/kgdb.h: -------------------------------------------------------------------------------- 1 | #ifndef __KGDB_H__ 2 | #define __KGDB_H__ 3 | 4 | #include 5 | 6 | #define KGDBERR_BADPARAMS 1 7 | #define KGDBERR_NOTHEXDIG 2 8 | #define KGDBERR_MEMFAULT 3 9 | #define KGDBERR_NOSPACE 4 10 | #define KGDBERR_ALIGNFAULT 5 11 | 12 | #define KGDBDATA_MAXREGS 8 13 | #define KGDBDATA_MAXPRIV 8 14 | 15 | #define KGDBEXIT_TYPEMASK 0xff 16 | 17 | #define KGDBEXIT_KILL 0 18 | #define KGDBEXIT_CONTINUE 1 19 | #define KGDBEXIT_SINGLE 2 20 | 21 | #define KGDBEXIT_WITHADDR 0x100 22 | 23 | typedef 24 | struct { 25 | int num; 26 | unsigned long val; 27 | } 28 | kgdb_reg; 29 | 30 | typedef 31 | struct { 32 | int sigval; 33 | int extype; 34 | unsigned long exaddr; 35 | int nregs; 36 | kgdb_reg regs[KGDBDATA_MAXREGS]; 37 | unsigned long private[KGDBDATA_MAXPRIV]; 38 | } 39 | kgdb_data; 40 | 41 | /* these functions are provided by the generic kgdb support */ 42 | extern void kgdb_init(void); 43 | extern void kgdb_error(int); 44 | extern int kgdb_output_string(const char *, unsigned int); 45 | extern void breakpoint(void); 46 | 47 | /* these functions are provided by the platform specific kgdb support */ 48 | extern void kgdb_flush_cache_range(void *, void *); 49 | extern void kgdb_flush_cache_all(void); 50 | extern int kgdb_setjmp(long *); 51 | extern void kgdb_longjmp(long *, int); 52 | extern void kgdb_enter(struct pt_regs *, kgdb_data *); 53 | extern void kgdb_exit(struct pt_regs *, kgdb_data *); 54 | extern int kgdb_getregs(struct pt_regs *, char *, int); 55 | extern void kgdb_putreg(struct pt_regs *, int, char *, int); 56 | extern void kgdb_putregs(struct pt_regs *, char *, int); 57 | extern int kgdb_trap(struct pt_regs *); 58 | extern void kgdb_breakpoint(int argc, char *argv[]); 59 | 60 | /* these functions are provided by the platform serial driver */ 61 | extern void kgdb_serial_init(void); 62 | extern int getDebugChar(void); 63 | extern void putDebugChar(int); 64 | extern void putDebugStr(const char *); 65 | extern void kgdb_interruptible(int); 66 | 67 | /* this is referenced in the trap handler for the platform */ 68 | extern int (*debugger_exception_handler)(struct pt_regs *); 69 | 70 | #endif /* __KGDB_H__ */ 71 | -------------------------------------------------------------------------------- /include/linux/bitops.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_BITOPS_H 2 | #define _LINUX_BITOPS_H 3 | 4 | 5 | /* 6 | * ffs: find first bit set. This is defined the same way as 7 | * the libc and compiler builtin ffs routines, therefore 8 | * differs in spirit from the above ffz (man ffs). 9 | */ 10 | 11 | static inline int generic_ffs(int x) 12 | { 13 | int r = 1; 14 | 15 | if (!x) 16 | return 0; 17 | if (!(x & 0xffff)) { 18 | x >>= 16; 19 | r += 16; 20 | } 21 | if (!(x & 0xff)) { 22 | x >>= 8; 23 | r += 8; 24 | } 25 | if (!(x & 0xf)) { 26 | x >>= 4; 27 | r += 4; 28 | } 29 | if (!(x & 3)) { 30 | x >>= 2; 31 | r += 2; 32 | } 33 | if (!(x & 1)) { 34 | x >>= 1; 35 | r += 1; 36 | } 37 | return r; 38 | } 39 | 40 | /* 41 | * hweightN: returns the hamming weight (i.e. the number 42 | * of bits set) of a N-bit word 43 | */ 44 | 45 | static inline unsigned int generic_hweight32(unsigned int w) 46 | { 47 | unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555); 48 | res = (res & 0x33333333) + ((res >> 2) & 0x33333333); 49 | res = (res & 0x0F0F0F0F) + ((res >> 4) & 0x0F0F0F0F); 50 | res = (res & 0x00FF00FF) + ((res >> 8) & 0x00FF00FF); 51 | return (res & 0x0000FFFF) + ((res >> 16) & 0x0000FFFF); 52 | } 53 | 54 | static inline unsigned int generic_hweight16(unsigned int w) 55 | { 56 | unsigned int res = (w & 0x5555) + ((w >> 1) & 0x5555); 57 | res = (res & 0x3333) + ((res >> 2) & 0x3333); 58 | res = (res & 0x0F0F) + ((res >> 4) & 0x0F0F); 59 | return (res & 0x00FF) + ((res >> 8) & 0x00FF); 60 | } 61 | 62 | static inline unsigned int generic_hweight8(unsigned int w) 63 | { 64 | unsigned int res = (w & 0x55) + ((w >> 1) & 0x55); 65 | res = (res & 0x33) + ((res >> 2) & 0x33); 66 | return (res & 0x0F) + ((res >> 4) & 0x0F); 67 | } 68 | 69 | #include 70 | 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /include/linux/config.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_CONFIG_H 2 | #define _LINUX_CONFIG_H 3 | 4 | /* #include */ 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /include/linux/ctype.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_CTYPE_H 2 | #define _LINUX_CTYPE_H 3 | 4 | /* 5 | * NOTE! This ctype does not handle EOF like the standard C 6 | * library is required to. 7 | */ 8 | 9 | #define _U 0x01 /* upper */ 10 | #define _L 0x02 /* lower */ 11 | #define _D 0x04 /* digit */ 12 | #define _C 0x08 /* cntrl */ 13 | #define _P 0x10 /* punct */ 14 | #define _S 0x20 /* white space (space/lf/tab) */ 15 | #define _X 0x40 /* hex digit */ 16 | #define _SP 0x80 /* hard space (0x20) */ 17 | 18 | extern unsigned char _ctype[]; 19 | 20 | #define __ismask(x) (_ctype[(int)(unsigned char)(x)]) 21 | 22 | #define isalnum(c) ((__ismask(c)&(_U|_L|_D)) != 0) 23 | #define isalpha(c) ((__ismask(c)&(_U|_L)) != 0) 24 | #define iscntrl(c) ((__ismask(c)&(_C)) != 0) 25 | #define isdigit(c) ((__ismask(c)&(_D)) != 0) 26 | #define isgraph(c) ((__ismask(c)&(_P|_U|_L|_D)) != 0) 27 | #define islower(c) ((__ismask(c)&(_L)) != 0) 28 | #define isprint(c) ((__ismask(c)&(_P|_U|_L|_D|_SP)) != 0) 29 | #define ispunct(c) ((__ismask(c)&(_P)) != 0) 30 | #define isspace(c) ((__ismask(c)&(_S)) != 0) 31 | #define isupper(c) ((__ismask(c)&(_U)) != 0) 32 | #define isxdigit(c) ((__ismask(c)&(_D|_X)) != 0) 33 | 34 | #define isascii(c) (((unsigned char)(c))<=0x7f) 35 | #define toascii(c) (((unsigned char)(c))&0x7f) 36 | 37 | static inline unsigned char __tolower(unsigned char c) 38 | { 39 | if (isupper(c)) 40 | c -= 'A'-'a'; 41 | return c; 42 | } 43 | 44 | static inline unsigned char __toupper(unsigned char c) 45 | { 46 | if (islower(c)) 47 | c -= 'a'-'A'; 48 | return c; 49 | } 50 | 51 | #define tolower(c) __tolower(c) 52 | #define toupper(c) __toupper(c) 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /include/linux/posix_types.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_POSIX_TYPES_H 2 | #define _LINUX_POSIX_TYPES_H 3 | 4 | #include 5 | 6 | /* 7 | * This allows for 1024 file descriptors: if NR_OPEN is ever grown 8 | * beyond that you'll have to change this too. But 1024 fd's seem to be 9 | * enough even for such "real" unices like OSF/1, so hopefully this is 10 | * one limit that doesn't have to be changed [again]. 11 | * 12 | * Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in 13 | * (and thus ) - but this is a more logical 14 | * place for them. Solved by having dummy defines in . 15 | */ 16 | 17 | /* 18 | * Those macros may have been defined in . But we always 19 | * use the ones here. 20 | */ 21 | #undef __NFDBITS 22 | #define __NFDBITS (8 * sizeof(unsigned long)) 23 | 24 | #undef __FD_SETSIZE 25 | #define __FD_SETSIZE 1024 26 | 27 | #undef __FDSET_LONGS 28 | #define __FDSET_LONGS (__FD_SETSIZE/__NFDBITS) 29 | 30 | #undef __FDELT 31 | #define __FDELT(d) ((d) / __NFDBITS) 32 | 33 | #undef __FDMASK 34 | #define __FDMASK(d) (1UL << ((d) % __NFDBITS)) 35 | 36 | typedef struct { 37 | unsigned long fds_bits [__FDSET_LONGS]; 38 | } __kernel_fd_set; 39 | 40 | /* Type of a signal handler. */ 41 | typedef void (*__kernel_sighandler_t)(int); 42 | 43 | /* Type of a SYSV IPC key. */ 44 | typedef int __kernel_key_t; 45 | 46 | #include 47 | 48 | #endif /* _LINUX_POSIX_TYPES_H */ 49 | -------------------------------------------------------------------------------- /include/linux/stddef.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_STDDEF_H 2 | #define _LINUX_STDDEF_H 3 | 4 | #undef NULL 5 | #if defined(__cplusplus) 6 | #define NULL 0 7 | #else 8 | #define NULL ((void *)0) 9 | #endif 10 | 11 | #ifndef _SIZE_T 12 | #include 13 | #endif 14 | 15 | #undef offsetof 16 | #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /include/linux/string.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_STRING_H_ 2 | #define _LINUX_STRING_H_ 3 | 4 | #include /* for size_t */ 5 | #include /* for NULL */ 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | extern char * ___strtok; 12 | extern char * strpbrk(const char *,const char *); 13 | extern char * strtok(char *,const char *); 14 | extern char * strsep(char **,const char *); 15 | extern __kernel_size_t strspn(const char *,const char *); 16 | 17 | 18 | /* 19 | * Include machine specific inline routines 20 | */ 21 | #include 22 | 23 | #ifndef __HAVE_ARCH_STRCPY 24 | extern char * strcpy(char *,const char *); 25 | #endif 26 | #ifndef __HAVE_ARCH_STRNCPY 27 | extern char * strncpy(char *,const char *, __kernel_size_t); 28 | #endif 29 | #ifndef __HAVE_ARCH_STRCAT 30 | extern char * strcat(char *, const char *); 31 | #endif 32 | #ifndef __HAVE_ARCH_STRNCAT 33 | extern char * strncat(char *, const char *, __kernel_size_t); 34 | #endif 35 | #ifndef __HAVE_ARCH_STRCMP 36 | extern int strcmp(const char *,const char *); 37 | #endif 38 | #ifndef __HAVE_ARCH_STRNCMP 39 | extern int strncmp(const char *,const char *,__kernel_size_t); 40 | #endif 41 | #ifndef __HAVE_ARCH_STRNICMP 42 | extern int strnicmp(const char *, const char *, __kernel_size_t); 43 | #endif 44 | #ifndef __HAVE_ARCH_STRCHR 45 | extern char * strchr(const char *,int); 46 | #endif 47 | #ifndef __HAVE_ARCH_STRRCHR 48 | extern char * strrchr(const char *,int); 49 | #endif 50 | #ifndef __HAVE_ARCH_STRSTR 51 | extern char * strstr(const char *,const char *); 52 | #endif 53 | #ifndef __HAVE_ARCH_STRLEN 54 | extern __kernel_size_t strlen(const char *); 55 | #endif 56 | #ifndef __HAVE_ARCH_STRNLEN 57 | extern __kernel_size_t strnlen(const char *,__kernel_size_t); 58 | #endif 59 | #ifndef __HAVE_ARCH_STRDUP 60 | extern char * strdup(const char *); 61 | #endif 62 | #ifndef __HAVE_ARCH_STRSWAB 63 | extern char * strswab(const char *); 64 | #endif 65 | 66 | #ifndef __HAVE_ARCH_MEMSET 67 | extern void * memset(void *,int,__kernel_size_t); 68 | #endif 69 | #ifndef __HAVE_ARCH_MEMCPY 70 | extern void * memcpy(void *,const void *,__kernel_size_t); 71 | #endif 72 | #ifndef __HAVE_ARCH_MEMMOVE 73 | extern void * memmove(void *,const void *,__kernel_size_t); 74 | #endif 75 | #ifndef __HAVE_ARCH_MEMSCAN 76 | extern void * memscan(void *,int,__kernel_size_t); 77 | #endif 78 | #ifndef __HAVE_ARCH_MEMCMP 79 | extern int memcmp(const void *,const void *,__kernel_size_t); 80 | #endif 81 | #ifndef __HAVE_ARCH_MEMCHR 82 | extern void * memchr(const void *,int,__kernel_size_t); 83 | #endif 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | 89 | #endif /* _LINUX_STRING_H_ */ 90 | -------------------------------------------------------------------------------- /include/linux/unaligned/access_ok.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_UNALIGNED_ACCESS_OK_H 2 | #define _LINUX_UNALIGNED_ACCESS_OK_H 3 | 4 | #include 5 | 6 | static inline u16 get_unaligned_le16(const void *p) 7 | { 8 | return le16_to_cpup((__le16 *)p); 9 | } 10 | 11 | static inline u32 get_unaligned_le32(const void *p) 12 | { 13 | return le32_to_cpup((__le32 *)p); 14 | } 15 | 16 | static inline u64 get_unaligned_le64(const void *p) 17 | { 18 | return le64_to_cpup((__le64 *)p); 19 | } 20 | 21 | static inline u16 get_unaligned_be16(const void *p) 22 | { 23 | return be16_to_cpup((__be16 *)p); 24 | } 25 | 26 | static inline u32 get_unaligned_be32(const void *p) 27 | { 28 | return be32_to_cpup((__be32 *)p); 29 | } 30 | 31 | static inline u64 get_unaligned_be64(const void *p) 32 | { 33 | return be64_to_cpup((__be64 *)p); 34 | } 35 | 36 | static inline void put_unaligned_le16(u16 val, void *p) 37 | { 38 | *((__le16 *)p) = cpu_to_le16(val); 39 | } 40 | 41 | static inline void put_unaligned_le32(u32 val, void *p) 42 | { 43 | *((__le32 *)p) = cpu_to_le32(val); 44 | } 45 | 46 | static inline void put_unaligned_le64(u64 val, void *p) 47 | { 48 | *((__le64 *)p) = cpu_to_le64(val); 49 | } 50 | 51 | static inline void put_unaligned_be16(u16 val, void *p) 52 | { 53 | *((__be16 *)p) = cpu_to_be16(val); 54 | } 55 | 56 | static inline void put_unaligned_be32(u32 val, void *p) 57 | { 58 | *((__be32 *)p) = cpu_to_be32(val); 59 | } 60 | 61 | static inline void put_unaligned_be64(u64 val, void *p) 62 | { 63 | *((__be64 *)p) = cpu_to_be64(val); 64 | } 65 | 66 | #endif /* _LINUX_UNALIGNED_ACCESS_OK_H */ 67 | -------------------------------------------------------------------------------- /include/linux/unaligned/be_byteshift.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_UNALIGNED_BE_BYTESHIFT_H 2 | #define _LINUX_UNALIGNED_BE_BYTESHIFT_H 3 | 4 | #include 5 | 6 | static inline u16 __get_unaligned_be16(const u8 *p) 7 | { 8 | return p[0] << 8 | p[1]; 9 | } 10 | 11 | static inline u32 __get_unaligned_be32(const u8 *p) 12 | { 13 | return p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3]; 14 | } 15 | 16 | static inline u64 __get_unaligned_be64(const u8 *p) 17 | { 18 | return (u64)__get_unaligned_be32(p) << 32 | 19 | __get_unaligned_be32(p + 4); 20 | } 21 | 22 | static inline void __put_unaligned_be16(u16 val, u8 *p) 23 | { 24 | *p++ = val >> 8; 25 | *p++ = val; 26 | } 27 | 28 | static inline void __put_unaligned_be32(u32 val, u8 *p) 29 | { 30 | __put_unaligned_be16(val >> 16, p); 31 | __put_unaligned_be16(val, p + 2); 32 | } 33 | 34 | static inline void __put_unaligned_be64(u64 val, u8 *p) 35 | { 36 | __put_unaligned_be32(val >> 32, p); 37 | __put_unaligned_be32(val, p + 4); 38 | } 39 | 40 | static inline u16 get_unaligned_be16(const void *p) 41 | { 42 | return __get_unaligned_be16((const u8 *)p); 43 | } 44 | 45 | static inline u32 get_unaligned_be32(const void *p) 46 | { 47 | return __get_unaligned_be32((const u8 *)p); 48 | } 49 | 50 | static inline u64 get_unaligned_be64(const void *p) 51 | { 52 | return __get_unaligned_be64((const u8 *)p); 53 | } 54 | 55 | static inline void put_unaligned_be16(u16 val, void *p) 56 | { 57 | __put_unaligned_be16(val, p); 58 | } 59 | 60 | static inline void put_unaligned_be32(u32 val, void *p) 61 | { 62 | __put_unaligned_be32(val, p); 63 | } 64 | 65 | static inline void put_unaligned_be64(u64 val, void *p) 66 | { 67 | __put_unaligned_be64(val, p); 68 | } 69 | 70 | #endif /* _LINUX_UNALIGNED_BE_BYTESHIFT_H */ 71 | -------------------------------------------------------------------------------- /include/linux/unaligned/generic.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_UNALIGNED_GENERIC_H 2 | #define _LINUX_UNALIGNED_GENERIC_H 3 | 4 | /* define __force to nothing in U-Boot */ 5 | #define __force 6 | 7 | /* 8 | * Cause a link-time error if we try an unaligned access other than 9 | * 1,2,4 or 8 bytes long 10 | */ 11 | extern void __bad_unaligned_access_size(void); 12 | 13 | #define __get_unaligned_le(ptr) ((__force typeof(*(ptr)))({ \ 14 | __builtin_choose_expr(sizeof(*(ptr)) == 1, *(ptr), \ 15 | __builtin_choose_expr(sizeof(*(ptr)) == 2, get_unaligned_le16((ptr)), \ 16 | __builtin_choose_expr(sizeof(*(ptr)) == 4, get_unaligned_le32((ptr)), \ 17 | __builtin_choose_expr(sizeof(*(ptr)) == 8, get_unaligned_le64((ptr)), \ 18 | __bad_unaligned_access_size())))); \ 19 | })) 20 | 21 | #define __get_unaligned_be(ptr) ((__force typeof(*(ptr)))({ \ 22 | __builtin_choose_expr(sizeof(*(ptr)) == 1, *(ptr), \ 23 | __builtin_choose_expr(sizeof(*(ptr)) == 2, get_unaligned_be16((ptr)), \ 24 | __builtin_choose_expr(sizeof(*(ptr)) == 4, get_unaligned_be32((ptr)), \ 25 | __builtin_choose_expr(sizeof(*(ptr)) == 8, get_unaligned_be64((ptr)), \ 26 | __bad_unaligned_access_size())))); \ 27 | })) 28 | 29 | #define __put_unaligned_le(val, ptr) ({ \ 30 | void *__gu_p = (ptr); \ 31 | switch (sizeof(*(ptr))) { \ 32 | case 1: \ 33 | *(u8 *)__gu_p = (__force u8)(val); \ 34 | break; \ 35 | case 2: \ 36 | put_unaligned_le16((__force u16)(val), __gu_p); \ 37 | break; \ 38 | case 4: \ 39 | put_unaligned_le32((__force u32)(val), __gu_p); \ 40 | break; \ 41 | case 8: \ 42 | put_unaligned_le64((__force u64)(val), __gu_p); \ 43 | break; \ 44 | default: \ 45 | __bad_unaligned_access_size(); \ 46 | break; \ 47 | } \ 48 | (void)0; }) 49 | 50 | #define __put_unaligned_be(val, ptr) ({ \ 51 | void *__gu_p = (ptr); \ 52 | switch (sizeof(*(ptr))) { \ 53 | case 1: \ 54 | *(u8 *)__gu_p = (__force u8)(val); \ 55 | break; \ 56 | case 2: \ 57 | put_unaligned_be16((__force u16)(val), __gu_p); \ 58 | break; \ 59 | case 4: \ 60 | put_unaligned_be32((__force u32)(val), __gu_p); \ 61 | break; \ 62 | case 8: \ 63 | put_unaligned_be64((__force u64)(val), __gu_p); \ 64 | break; \ 65 | default: \ 66 | __bad_unaligned_access_size(); \ 67 | break; \ 68 | } \ 69 | (void)0; }) 70 | 71 | #endif /* _LINUX_UNALIGNED_GENERIC_H */ 72 | -------------------------------------------------------------------------------- /include/linux/unaligned/le_byteshift.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_UNALIGNED_LE_BYTESHIFT_H 2 | #define _LINUX_UNALIGNED_LE_BYTESHIFT_H 3 | 4 | #include 5 | 6 | static inline u16 __get_unaligned_le16(const u8 *p) 7 | { 8 | return p[0] | p[1] << 8; 9 | } 10 | 11 | static inline u32 __get_unaligned_le32(const u8 *p) 12 | { 13 | return p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24; 14 | } 15 | 16 | static inline u64 __get_unaligned_le64(const u8 *p) 17 | { 18 | return (u64)__get_unaligned_le32(p + 4) << 32 | 19 | __get_unaligned_le32(p); 20 | } 21 | 22 | static inline void __put_unaligned_le16(u16 val, u8 *p) 23 | { 24 | *p++ = val; 25 | *p++ = val >> 8; 26 | } 27 | 28 | static inline void __put_unaligned_le32(u32 val, u8 *p) 29 | { 30 | __put_unaligned_le16(val >> 16, p + 2); 31 | __put_unaligned_le16(val, p); 32 | } 33 | 34 | static inline void __put_unaligned_le64(u64 val, u8 *p) 35 | { 36 | __put_unaligned_le32(val >> 32, p + 4); 37 | __put_unaligned_le32(val, p); 38 | } 39 | 40 | static inline u16 get_unaligned_le16(const void *p) 41 | { 42 | return __get_unaligned_le16((const u8 *)p); 43 | } 44 | 45 | static inline u32 get_unaligned_le32(const void *p) 46 | { 47 | return __get_unaligned_le32((const u8 *)p); 48 | } 49 | 50 | static inline u64 get_unaligned_le64(const void *p) 51 | { 52 | return __get_unaligned_le64((const u8 *)p); 53 | } 54 | 55 | static inline void put_unaligned_le16(u16 val, void *p) 56 | { 57 | __put_unaligned_le16(val, p); 58 | } 59 | 60 | static inline void put_unaligned_le32(u32 val, void *p) 61 | { 62 | __put_unaligned_le32(val, p); 63 | } 64 | 65 | static inline void put_unaligned_le64(u64 val, void *p) 66 | { 67 | __put_unaligned_le64(val, p); 68 | } 69 | 70 | #endif /* _LINUX_UNALIGNED_LE_BYTESHIFT_H */ 71 | -------------------------------------------------------------------------------- /include/logbuff.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2002 3 | * Detlev Zundel, dzu@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | #ifndef _LOGBUFF_H 24 | #define _LOGBUFF_H 25 | 26 | #ifdef CONFIG_LOGBUFFER 27 | 28 | #define LOGBUFF_LEN (16384) /* Must be 16k right now */ 29 | #define LOGBUFF_MASK (LOGBUFF_LEN-1) 30 | #define LOGBUFF_OVERHEAD (4096) /* Logbuffer overhead for extra info */ 31 | #define LOGBUFF_RESERVE (LOGBUFF_LEN+LOGBUFF_OVERHEAD) 32 | 33 | #define LOGBUFF_INITIALIZED (1<<31) 34 | 35 | int drv_logbuff_init (void); 36 | void logbuff_init_ptrs (void); 37 | void logbuff_log(char *msg); 38 | void logbuff_reset (void); 39 | 40 | #endif /* CONFIG_LOGBUFFER */ 41 | 42 | #endif /* _LOGBUFF_H */ 43 | -------------------------------------------------------------------------------- /include/lzma/LzmaDec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Fake include for LzmaDec.h 3 | * 4 | * Copyright (C) 2007-2009 Industrie Dial Face S.p.A. 5 | * Luigi 'Comio' Mantellini (luigi.mantellini@idf-hit.com) 6 | * 7 | * See file CREDITS for list of people who contributed to this 8 | * project. 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License as 12 | * published by the Free Software Foundation; either version 2 of 13 | * the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 23 | * MA 02111-1307 USA 24 | */ 25 | 26 | #ifndef __LZMADEC_H__FAKE__ 27 | #define __LZMADEC_H__FAKE__ 28 | 29 | #include "../../lib_generic/LzmaDec.h" 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /include/lzma/LzmaTools.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Fake include for LzmaTools.h 3 | * 4 | * Copyright (C) 2007-2009 Industrie Dial Face S.p.A. 5 | * Luigi 'Comio' Mantellini (luigi.mantellini@idf-hit.com) 6 | * 7 | * See file CREDITS for list of people who contributed to this 8 | * project. 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License as 12 | * published by the Free Software Foundation; either version 2 of 13 | * the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 23 | * MA 02111-1307 USA 24 | */ 25 | 26 | #ifndef __LZMATOOLS_H__FAKE__ 27 | #define __LZMATOOLS_H__FAKE__ 28 | 29 | #include "../../lib_generic/LzmaTools.h" 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /include/lzma/LzmaTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Fake include for Types.h 3 | * 4 | * Copyright (C) 2007-2009 Industrie Dial Face S.p.A. 5 | * Luigi 'Comio' Mantellini (luigi.mantellini@idf-hit.com) 6 | * 7 | * See file CREDITS for list of people who contributed to this 8 | * project. 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License as 12 | * published by the Free Software Foundation; either version 2 of 13 | * the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 23 | * MA 02111-1307 USA 24 | */ 25 | 26 | #ifndef __TYPES_H__FAKE__ 27 | #define __TYPES_H__FAKE__ 28 | 29 | /* 30 | *This avoids the collition with zlib.h Byte definition 31 | */ 32 | #define Byte LZByte 33 | 34 | #include "../../lib_generic/Types.h" 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /include/mk48t59.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH 3 | * Andreas Heppel 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | /* 25 | * Date & Time support for the MK48T59 RTC 26 | */ 27 | 28 | 29 | #if defined(CONFIG_RTC_MK48T59) && (CONFIG_COMMANDS & CFG_CMD_DATE) 30 | 31 | #define RTC_PORT_ADDR0 CFG_ISA_IO + 0x70 32 | #define RTC_PORT_ADDR1 RTC_PORT_ADDR0 + 0x1 33 | #define RTC_PORT_DATA CFG_ISA_IO + 0x76 34 | 35 | /* RTC Offsets */ 36 | #define RTC_SECONDS 0x1FF9 37 | #define RTC_MINUTES 0x1FFA 38 | #define RTC_HOURS 0x1FFB 39 | #define RTC_DAY_OF_WEEK 0x1FFC 40 | #define RTC_DAY_OF_MONTH 0x1FFD 41 | #define RTC_MONTH 0x1FFE 42 | #define RTC_YEAR 0x1FFF 43 | 44 | #define RTC_CONTROLA 0x1FF8 45 | #define RTC_CA_WRITE 0x80 46 | #define RTC_CA_READ 0x40 47 | #define RTC_CA_CALIB_SIGN 0x20 48 | #define RTC_CA_CALIB_MASK 0x1f 49 | 50 | #define RTC_CONTROLB 0x1FF9 51 | #define RTC_CB_STOP 0x80 52 | 53 | #define RTC_WATCHDOG 0x1FF7 54 | #define RTC_WDS 0x80 55 | #define RTC_WD_RB_16TH 0x0 56 | #define RTC_WD_RB_4TH 0x1 57 | #define RTC_WD_RB_1 0x2 58 | #define RTC_WD_RB_4 0x3 59 | 60 | void rtc_set_watchdog(short multi, short res); 61 | void *nvram_read(void *dest, const short src, size_t count); 62 | void nvram_write(short dest, const void *src, size_t count); 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /include/nand_api.h: -------------------------------------------------------------------------------- 1 | #ifndef _NAND_API_H_ 2 | #define _NAND_SPI_H_ 3 | 4 | 5 | unsigned long ranand_init(void); 6 | int nand_env_init(void); 7 | 8 | int ranand_write(char *buf, unsigned int to, int len); 9 | int ranand_read(char *buf, unsigned int from, int len); 10 | int ranand_erase(unsigned int offs, int len); 11 | int ranand_erase_write(char *buf, unsigned int offs, int count); 12 | 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /include/rtc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2001 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | /* 25 | * Generic RTC interface. 26 | */ 27 | #ifndef _RTC_H_ 28 | #define _RTC_H_ 29 | 30 | /* 31 | * The struct used to pass data from the generic interface code to 32 | * the hardware dependend low-level code ande vice versa. Identical 33 | * to struct rtc_time used by the Linux kernel. 34 | * 35 | * Note that there are small but significant differences to the 36 | * common "struct time": 37 | * 38 | * struct time: struct rtc_time: 39 | * tm_mon 0 ... 11 1 ... 12 40 | * tm_year years since 1900 years since 0 41 | */ 42 | 43 | struct rtc_time { 44 | int tm_sec; 45 | int tm_min; 46 | int tm_hour; 47 | int tm_mday; 48 | int tm_mon; 49 | int tm_year; 50 | int tm_wday; 51 | int tm_yday; 52 | int tm_isdst; 53 | }; 54 | 55 | void rtc_get (struct rtc_time *); 56 | void rtc_set (struct rtc_time *); 57 | void rtc_reset (void); 58 | 59 | void GregorianDay (struct rtc_time *); 60 | void to_tm (int, struct rtc_time *); 61 | unsigned long mktime (unsigned int, unsigned int, unsigned int, 62 | unsigned int, unsigned int, unsigned int); 63 | 64 | #endif /* _RTC_H_ */ 65 | -------------------------------------------------------------------------------- /include/serial.h: -------------------------------------------------------------------------------- 1 | #ifndef __SERIAL_H__ 2 | #define __SERIAL_H__ 3 | 4 | #define NAMESIZE 16 5 | #define CTLRSIZE 8 6 | 7 | struct serial_device { 8 | char name[NAMESIZE]; 9 | char ctlr[CTLRSIZE]; 10 | 11 | int (*init) (void); 12 | void (*setbrg) (void); 13 | int (*getc) (void); 14 | int (*tstc) (void); 15 | void (*putc) (const char c); 16 | void (*puts) (const char *s); 17 | 18 | struct serial_device *next; 19 | }; 20 | 21 | extern struct serial_device serial_smc_device; 22 | extern struct serial_device serial_scc_device; 23 | extern struct serial_device * default_serial_console (void); 24 | 25 | #if defined(CONFIG_405GP) || defined(CONFIG_405CR) || defined(CONFIG_440) \ 26 | || defined(CONFIG_405EP) 27 | extern struct serial_device serial0_device; 28 | extern struct serial_device serial1_device; 29 | #endif 30 | 31 | 32 | extern void serial_initialize(void); 33 | extern void serial_devices_init(void); 34 | extern int serial_assign(char * name); 35 | extern void serial_reinit_all(void); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /include/spi_api.h: -------------------------------------------------------------------------------- 1 | #ifndef _SPI_API_H_ 2 | #define _SPI_SPI_H_ 3 | 4 | 5 | unsigned long raspi_init(void); 6 | int spi_env_init(void); 7 | 8 | int raspi_write(char *buf, unsigned int to, int len); 9 | int raspi_read(char *buf, unsigned int from, int len); 10 | int raspi_erase(unsigned int offs, int len); 11 | int raspi_erase_write(char *buf, unsigned int offs, int count); 12 | 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /include/systemace.h: -------------------------------------------------------------------------------- 1 | #ifndef __SYSTEMACE_H 2 | #define __SYSTEMACE_H 3 | /* 4 | * Copyright (c) 2004 Picture Elements, Inc. 5 | * Stephen Williams (steve@picturel.com) 6 | * 7 | * This source code is free software; you can redistribute it 8 | * and/or modify it in source code form under the terms of the GNU 9 | * General Public License as published by the Free Software 10 | * Foundation; either version 2 of the License, or (at your option) 11 | * any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 21 | */ 22 | #ident "$Id: //WIFI_SOC/release/SDK_4_1_0_0/Uboot/include/systemace.h#1 $" 23 | 24 | #ifdef CONFIG_SYSTEMACE 25 | 26 | # include 27 | 28 | block_dev_desc_t * systemace_get_dev(int dev); 29 | 30 | #endif /* CONFIG_SYSTEMACE */ 31 | #endif /* __SYSTEMACE_H */ 32 | -------------------------------------------------------------------------------- /include/unxz.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Wrapper for XZ decompressor to make it usable for kernel and initramfs 3 | * decompression 4 | * 5 | * Author: Lasse Collin 6 | * 7 | * This file has been put into the public domain. 8 | * You can do whatever you want with this file. 9 | */ 10 | 11 | #ifndef DECOMPRESS_UNXZ_H 12 | #define DECOMPRESS_UNXZ_H 13 | 14 | int unxz(unsigned char *in, int in_size, unsigned char *out, int *in_used); 15 | 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /lib_generic/LzmaTools.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Usefuls routines based on the LzmaTest.c file from LZMA SDK 4.65 3 | * 4 | * Copyright (C) 2007-2008 Industrie Dial Face S.p.A. 5 | * Luigi 'Comio' Mantellini (luigi.mantellini@idf-hit.com) 6 | * 7 | * Copyright (C) 1999-2005 Igor Pavlov 8 | * 9 | * See file CREDITS for list of people who contributed to this 10 | * project. 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU General Public License as 14 | * published by the Free Software Foundation; either version 2 of 15 | * the License, or (at your option) any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU General Public License 23 | * along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 25 | * MA 02111-1307 USA 26 | */ 27 | 28 | #ifndef __LZMA_TOOL_H__ 29 | #define __LZMA_TOOL_H__ 30 | 31 | #include 32 | 33 | extern int lzmaBuffToBuffDecompress (unsigned char *outStream, SizeT *uncompressedSize, 34 | unsigned char *inStream, SizeT length); 35 | #endif 36 | -------------------------------------------------------------------------------- /lib_generic/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2000-2002 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | include $(TOPDIR)/config.mk 25 | 26 | LIB = libgeneric.a 27 | 28 | OBJS = crc32.o ctype.o display_options.o string.o vsprintf.o 29 | 30 | ifeq ($(CONFIG_GZIP),ON) 31 | OBJS += zlib.o 32 | endif 33 | 34 | ifeq ($(CONFIG_BZIP2),ON) 35 | OBJS += bzlib.o bzlib_crctable.o bzlib_randtable.o bzlib_decompress.o bzlib_huffman.o 36 | endif 37 | 38 | ifeq ($(CONFIG_LZMA),ON) 39 | OBJS += LzmaDecode.o 40 | endif 41 | 42 | ifeq ($(CONFIG_XZ),ON) 43 | OBJS += decompress_unxz.o xz_dec_bcj.o xz_dec_lzma2.o xz_dec_stream.o 44 | endif 45 | 46 | $(LIB): .depend $(OBJS) 47 | $(AR) crv $@ $(OBJS) 48 | 49 | ######################################################################### 50 | 51 | .depend: Makefile $(OBJS:.o=.c) 52 | $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@ 53 | 54 | sinclude .depend 55 | 56 | ######################################################################### 57 | -------------------------------------------------------------------------------- /lib_generic/ctype.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2000 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | /* 25 | * linux/lib/ctype.c 26 | * 27 | * Copyright (C) 1991, 1992 Linus Torvalds 28 | */ 29 | 30 | #include 31 | 32 | unsigned char _ctype[] = { 33 | _C,_C,_C,_C,_C,_C,_C,_C, /* 0-7 */ 34 | _C,_C|_S,_C|_S,_C|_S,_C|_S,_C|_S,_C,_C, /* 8-15 */ 35 | _C,_C,_C,_C,_C,_C,_C,_C, /* 16-23 */ 36 | _C,_C,_C,_C,_C,_C,_C,_C, /* 24-31 */ 37 | _S|_SP,_P,_P,_P,_P,_P,_P,_P, /* 32-39 */ 38 | _P,_P,_P,_P,_P,_P,_P,_P, /* 40-47 */ 39 | _D,_D,_D,_D,_D,_D,_D,_D, /* 48-55 */ 40 | _D,_D,_P,_P,_P,_P,_P,_P, /* 56-63 */ 41 | _P,_U|_X,_U|_X,_U|_X,_U|_X,_U|_X,_U|_X,_U, /* 64-71 */ 42 | _U,_U,_U,_U,_U,_U,_U,_U, /* 72-79 */ 43 | _U,_U,_U,_U,_U,_U,_U,_U, /* 80-87 */ 44 | _U,_U,_U,_P,_P,_P,_P,_P, /* 88-95 */ 45 | _P,_L|_X,_L|_X,_L|_X,_L|_X,_L|_X,_L|_X,_L, /* 96-103 */ 46 | _L,_L,_L,_L,_L,_L,_L,_L, /* 104-111 */ 47 | _L,_L,_L,_L,_L,_L,_L,_L, /* 112-119 */ 48 | _L,_L,_L,_P,_P,_P,_P,_C, /* 120-127 */ 49 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 128-143 */ 50 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 144-159 */ 51 | _S|_SP,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P, /* 160-175 */ 52 | _P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P, /* 176-191 */ 53 | _U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U, /* 192-207 */ 54 | _U,_U,_U,_U,_U,_U,_U,_P,_U,_U,_U,_U,_U,_U,_U,_L, /* 208-223 */ 55 | _L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L, /* 224-239 */ 56 | _L,_L,_L,_L,_L,_L,_L,_P,_L,_L,_L,_L,_L,_L,_L,_L}; /* 240-255 */ 57 | -------------------------------------------------------------------------------- /lib_generic/display_options.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2000-2002 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | #include 25 | 26 | int display_options (void) 27 | { 28 | extern char version_string[]; 29 | 30 | #if defined(BUILD_TAG) 31 | printf ("\n\n%s, Build: %s\n\n", version_string, BUILD_TAG); 32 | #else 33 | printf ("\n\n%s\n\n", version_string); 34 | #endif 35 | return 0; 36 | } 37 | 38 | /* 39 | * print sizes as "xxx kB", "xxx.y kB", "xxx MB" or "xxx.y MB" as needed; 40 | * allow for optional trailing string (like "\n") 41 | */ 42 | void print_size (ulong size, const char *s) 43 | { 44 | ulong m, n; 45 | ulong d = 1 << 20; /* 1 MB */ 46 | char c = 'M'; 47 | 48 | if (size < d) { /* print in kB */ 49 | c = 'k'; 50 | d = 1 << 10; 51 | } 52 | 53 | n = size / d; 54 | 55 | m = (10 * (size - (n * d)) + (d / 2) ) / d; 56 | 57 | if (m >= 10) { 58 | m -= 10; 59 | n += 1; 60 | } 61 | 62 | printf ("%2ld", n); 63 | if (m) { 64 | printf (".%ld", m); 65 | } 66 | printf (" %cB%s", c, s); 67 | } 68 | -------------------------------------------------------------------------------- /lib_generic/xz_stream.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Definitions for handling the .xz file format 3 | * 4 | * Author: Lasse Collin 5 | * 6 | * This file has been put into the public domain. 7 | * You can do whatever you want with this file. 8 | */ 9 | 10 | #ifndef XZ_STREAM_H 11 | #define XZ_STREAM_H 12 | 13 | /* 14 | * See the .xz file format specification at 15 | * http://tukaani.org/xz/xz-file-format.txt 16 | * to understand the container format. 17 | */ 18 | 19 | #define STREAM_HEADER_SIZE 12 20 | 21 | //#define HEADER_MAGIC "\3757zXZ" 22 | #define HEADER_MAGIC_SIZE 6 23 | 24 | #define FOOTER_MAGIC "YZ" 25 | #define FOOTER_MAGIC_SIZE 2 26 | 27 | /* 28 | * Variable-length integer can hold a 63-bit unsigned integer, or a special 29 | * value to indicate that the value is unknown. 30 | */ 31 | typedef uint64_t vli_type; 32 | 33 | #define VLI_MAX ((vli_type)-1 / 2) 34 | #define VLI_UNKNOWN ((vli_type)-1) 35 | 36 | /* Maximum encoded size of a VLI */ 37 | #define VLI_BYTES_MAX (sizeof(vli_type) * 8 / 7) 38 | 39 | /* Integrity Check types */ 40 | enum xz_check { 41 | XZ_CHECK_NONE = 0, 42 | XZ_CHECK_CRC32 = 1, 43 | XZ_CHECK_CRC64 = 4, 44 | XZ_CHECK_SHA256 = 10 45 | }; 46 | 47 | /* Maximum possible Check ID */ 48 | #define XZ_CHECK_MAX 15 49 | 50 | #endif 51 | 52 | -------------------------------------------------------------------------------- /lib_mips/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2003 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | include $(TOPDIR)/config.mk 25 | 26 | LIB = lib$(ARCH).a 27 | 28 | AOBJS = 29 | 30 | COBJS = board.o time.o mips_linux.o 31 | 32 | OBJS = $(AOBJS) $(COBJS) 33 | 34 | $(LIB): .depend $(OBJS) 35 | $(AR) crv $@ $(OBJS) 36 | 37 | ######################################################################### 38 | 39 | .depend: Makefile $(AOBJS:.o=.S) $(COBJS:.o=.c) 40 | $(CC) -M $(CFLAGS) $(AOBJS:.o=.S) $(COBJS:.o=.c) > $@ 41 | 42 | sinclude .depend 43 | 44 | ######################################################################### 45 | -------------------------------------------------------------------------------- /mips_config.mk: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2003 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__ 25 | -------------------------------------------------------------------------------- /mkconfig: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | # Script to create header files and links to configure 4 | # U-Boot for a specific board. 5 | # 6 | # Parameters: Target Architecture CPU Board [VENDOR] [SOC] 7 | # 8 | # (C) 2002 DENX Software Engineering, Wolfgang Denk 9 | # 10 | 11 | APPEND=no # Default: Create new config file 12 | 13 | while [ $# -gt 0 ] ; do 14 | case "$1" in 15 | --) shift ; break ;; 16 | -a) shift ; APPEND=yes ;; 17 | *) break ;; 18 | esac 19 | done 20 | 21 | [ $# -lt 4 ] && exit 1 22 | [ $# -gt 6 ] && exit 1 23 | 24 | echo "Configuring for $1 board..." 25 | 26 | cd ./include 27 | 28 | # 29 | # Create link to architecture specific headers 30 | # 31 | rm -f asm 32 | ln -s asm-$2 asm 33 | rm -f asm-$2/arch 34 | ln -s arch-$3 asm-$2/arch 35 | 36 | if [ "$2" = "arm" ] ; then 37 | rm -f asm-$2/proc 38 | ln -s proc-armv asm-$2/proc 39 | fi 40 | 41 | # 42 | # Create include file for Make 43 | # 44 | echo "ARCH = $2" > config.mk 45 | echo "CPU = $3" >> config.mk 46 | echo "BOARD = $4" >> config.mk 47 | 48 | [ "$5" ] && [ "$5" != "NULL" ] && echo "VENDOR = $5" >> config.mk 49 | 50 | [ "$6" ] && [ "$6" != "NULL" ] && echo "SOC = $6" >> config.mk 51 | 52 | # 53 | # Create board specific header file 54 | # 55 | if [ "$APPEND" = "yes" ] # Append to existing config file 56 | then 57 | echo >> config.h 58 | else 59 | > config.h # Create new config file 60 | fi 61 | echo "/* Automatically generated - do not edit */" >>config.h 62 | echo "#include " >>config.h 63 | 64 | exit 0 65 | -------------------------------------------------------------------------------- /net/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2000 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | include $(TOPDIR)/config.mk 25 | 26 | # CFLAGS += -DET_DEBUG -DDEBUG 27 | 28 | LIB = libnet.a 29 | 30 | OBJS = net.o tftp.o eth.o httpd.o 31 | all: $(LIB) 32 | 33 | $(LIB): $(START) $(OBJS) 34 | $(AR) crv $@ $(OBJS) 35 | 36 | ######################################################################### 37 | 38 | .depend: Makefile $(OBJS:.o=.c) 39 | $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@ 40 | 41 | sinclude .depend 42 | 43 | ######################################################################### 44 | -------------------------------------------------------------------------------- /net/httpd.h: -------------------------------------------------------------------------------- 1 | #ifndef _NET_HTTPD_H__ 2 | #define _NET_HTTPD_H__ 3 | 4 | void HttpdStart(void); 5 | void HttpdHandler(void); 6 | 7 | /* board specific implementation */ 8 | extern int do_http_upgrade(const ulong size, const int upgrade_type); 9 | extern int do_http_progress(const int state); 10 | extern void LEDON(void); 11 | extern void LEDOFF(void); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /net/rarp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2000 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | 25 | #ifndef __RARP_H__ 26 | #define __RARP_H__ 27 | 28 | #ifndef __NET_H__ 29 | #include 30 | #endif /* __NET_H__ */ 31 | 32 | 33 | /**********************************************************************/ 34 | /* 35 | * Global functions and variables. 36 | */ 37 | 38 | extern int RarpTry; 39 | 40 | extern void RarpRequest (void); /* Send a RARP request */ 41 | 42 | /**********************************************************************/ 43 | 44 | #endif /* __RARP_H__ */ 45 | -------------------------------------------------------------------------------- /net/tftp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * LiMon - BOOTP/TFTP. 3 | * 4 | * Copyright 1994, 1995, 2000 Neil Russell. 5 | * (See License) 6 | */ 7 | 8 | #ifndef __TFTP_H__ 9 | #define __TFTP_H__ 10 | 11 | /**********************************************************************/ 12 | /* 13 | * Global functions and variables. 14 | */ 15 | 16 | /* tftp.c */ 17 | extern void TftpStart (void); /* Begin TFTP get */ 18 | 19 | /**********************************************************************/ 20 | 21 | #endif /* __TFTP_H__ */ 22 | -------------------------------------------------------------------------------- /rtc/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # (C) Copyright 2001-2004 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | # 5 | # See file CREDITS for list of people who contributed to this 6 | # project. 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License as 10 | # published by the Free Software Foundation; either version 2 of 11 | # the License, or (at your option) any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program; if not, write to the Free Software 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | # MA 02111-1307 USA 22 | # 23 | 24 | include $(TOPDIR)/config.mk 25 | 26 | #CFLAGS += -DDEBUG 27 | 28 | LIB = librtc.a 29 | 30 | OBJS = date.o 31 | 32 | all: $(LIB) 33 | 34 | $(LIB): $(START) $(OBJS) 35 | $(AR) crv $@ $(OBJS) 36 | 37 | ######################################################################### 38 | 39 | .depend: Makefile $(OBJS:.o=.c) 40 | $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@ 41 | 42 | sinclude .depend 43 | 44 | ######################################################################### 45 | -------------------------------------------------------------------------------- /scripts/Makefile: -------------------------------------------------------------------------------- 1 | HEADER=header.tk 2 | TAIL=tail.tk 3 | 4 | # Previous versions always remade kconfig.tk because they always depended 5 | # on soundscript. This runs fairly fast, and I can't find all the 6 | # Config.in files to depend on anyways. So I'll force it to remake. 7 | 8 | kconfig.tk: dummy 9 | 10 | kconfig.tk: ${TOPDIR}/Makefile ${TOPDIR}/arch/${ARCH}/config.in \ 11 | tkparse ${HEADER} ${TAIL} 12 | @if [ -f /usr/local/bin/wish ]; then \ 13 | echo '#!'"/usr/local/bin/wish -f" > kconfig.tk; \ 14 | else \ 15 | echo '#!'"/usr/bin/wish -f" > kconfig.tk; \ 16 | fi 17 | cat ${HEADER} >> ./kconfig.tk 18 | ./tkparse < ../arch/${ARCH}/config.in >> kconfig.tk 19 | echo "set defaults \"arch/${ARCH}/defconfig\"" >> kconfig.tk 20 | echo "set ARCH \"${ARCH}\"" >> kconfig.tk 21 | cat ${TAIL} >> kconfig.tk 22 | chmod 755 kconfig.tk 23 | 24 | tkparse: tkparse.o tkcond.o tkgen.o 25 | ${HOSTCC} -o tkparse tkparse.o tkcond.o tkgen.o 26 | 27 | tkparse.o: tkparse.c tkparse.h 28 | 29 | tkcond.o: tkcond.c tkparse.h 30 | 31 | tkgen.o: tkgen.c tkparse.h 32 | 33 | tkparse.o tkcond.o tkgen.o: 34 | $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $(@:.o=.c) 35 | 36 | clean: 37 | rm -f *~ kconfig.tk *.o tkparse 38 | 39 | # include $(TOPDIR)/Rules.make 40 | -------------------------------------------------------------------------------- /scripts/README.uClinux: -------------------------------------------------------------------------------- 1 | 2 | Yes, this is a rip off of the 2.4 linux script directory, it allows 3 | us to configure things even when we do not know the kernel version. 4 | We can also hack these guys without hurting the kernel config. 5 | 6 | -------------------------------------------------------------------------------- /scripts/lxdialog/BIG.FAT.WARNING: -------------------------------------------------------------------------------- 1 | This is NOT the official version of dialog. This version has been 2 | significantly modified from the original. It is for use by the Linux 3 | kernel configuration script. Please do not bother Savio Lam with 4 | questions about this program. 5 | -------------------------------------------------------------------------------- /scripts/lxdialog/Makefile: -------------------------------------------------------------------------------- 1 | HOSTCFLAGS += -DLOCALE 2 | LIBS = -lncurses 3 | 4 | ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h)) 5 | HOSTCFLAGS += -I/usr/include/ncurses -DCURSES_LOC="" 6 | else 7 | ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h)) 8 | HOSTCFLAGS += -I/usr/include/ncurses -DCURSES_LOC="" 9 | else 10 | ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h)) 11 | HOSTCFLAGS += -DCURSES_LOC="" 12 | else 13 | HOSTCFLAGS += -DCURSES_LOC="" 14 | endif 15 | endif 16 | endif 17 | 18 | 19 | OBJS = checklist.o menubox.o textbox.o yesno.o inputbox.o \ 20 | util.o lxdialog.o msgbox.o 21 | 22 | %.o: %.c 23 | $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $< 24 | 25 | all: ncurses lxdialog 26 | 27 | lxdialog: $(OBJS) 28 | $(HOSTCC) -o lxdialog $(OBJS) $(LIBS) 29 | 30 | ncurses: 31 | @echo "main() {}" > lxtemp.c 32 | @if $(HOSTCC) -lncurses lxtemp.c ; then \ 33 | rm -f lxtemp.c a.out; \ 34 | else \ 35 | rm -f lxtemp.c; \ 36 | echo -e "\007" ;\ 37 | echo ">> Unable to find the Ncurses libraries." ;\ 38 | echo ">>" ;\ 39 | echo ">> You must have Ncurses installed in order" ;\ 40 | echo ">> to use 'make menuconfig'" ;\ 41 | echo ;\ 42 | exit 1 ;\ 43 | fi 44 | 45 | clean: 46 | rm -f core *.o *~ lxdialog 47 | -------------------------------------------------------------------------------- /stage1/Makefile: -------------------------------------------------------------------------------- 1 | sinclude $(TOPDIR)/config.mk 2 | -include $(TOPDIR)/.config 3 | 4 | ifdef RT2880_FPGA_BOARD 5 | FADDR = 0xBC400000 6 | endif 7 | ifdef RT2880_ASIC_BOARD 8 | FADDR = 0xBC400000 9 | endif 10 | ifdef RT2883_FPGA_BOARD 11 | FADDR = 0xBC000000 12 | endif 13 | ifdef RT2883_ASIC_BOARD 14 | FADDR = 0xBC000000 15 | endif 16 | ifdef RT3052_ASIC_BOARD 17 | FADDR = 0xBFC00000 18 | endif 19 | ifdef RT3052_FPGA_BOARD 20 | FADDR = 0xBFC00000 21 | endif 22 | 23 | SRC := ./start.S ./boot.c ./nandc.c ./gdma.c 24 | OBJS = $(notdir $(addsuffix .o, $(basename $(SRC)))) 25 | CFLAGS += -DCONFIG_STAGE2_OFFSET=0x4000 26 | 27 | all: uboot.img 28 | 29 | stage2.bin: 30 | ../tools/mkimage -A $(ARCH) -T standalone -C none -a $(TEXT_BASE) \ 31 | -e $(shell readelf -h ../u-boot | grep "Entry" | awk '{print $$4}') \ 32 | -n "$(shell echo $(CFG_ENV_IS) | sed -e 's/IN_//') Flash Image" -d \ 33 | ../uboot.bin $@ 34 | 35 | stage2.o: stage2.bin 36 | echo 'char *stage1_ww="ww:' `date` `whoami` '";' | $(CC) $(CFLAGS) -c -o $@ -xc - 37 | $(OBJCOPY) --add-section .stage2=$< $@ 38 | $(OBJCOPY) --set-section-flags .stage2=code,contents,alloc,readonly $@ 39 | 40 | stage1n2.elf: $(OBJS) stage2.o 41 | $(LD) -T $(@:.elf=.lds) -Ttext $(FADDR) $^ -Map $(@:.elf=.map) -o $@ 42 | 43 | uboot.img: stage1n2.elf 44 | $(OBJCOPY) $(OBJCFLAGS) -O binary -v $< $@ 45 | @ls -al $@ 46 | dd if=$@ bs=4096 count=1 of=$@ seek=1 conv=notrunc 47 | dd if=$@ bs=4096 count=2 of=$@ seek=2 conv=notrunc 48 | @ls -al $@ 49 | @mv -f $@ ../$@ 50 | 51 | .PHONY: clean 52 | clean: 53 | rm -f $(OBJS) stage2.bin stage2.o stage1n2.elf stage1n2.map 54 | 55 | 56 | ######################################################################### 57 | 58 | .depend: Makefile $(SRC) 59 | $(CC) -M $(CFLAGS) $(SRC) > $@ 60 | 61 | sinclude .depend 62 | ######################################################################### 63 | 64 | -------------------------------------------------------------------------------- /stage1/boot.c: -------------------------------------------------------------------------------- 1 | #include "configs/rt2880.h" 2 | #include 3 | #include "rt_mmap.h" 4 | 5 | // register supported device 6 | void nor_init(void); 7 | void nand_init(void); 8 | void spi_init(void); 9 | 10 | int nor_read(uint32_t dst, uint32_t src_off, uint32_t size); 11 | int nand_read(uint32_t dst, uint32_t src_off, uint32_t size); 12 | int spi_read(uint32_t dst, uint32_t src_off, uint32_t size); 13 | 14 | 15 | void udelay(unsigned long usec) 16 | { 17 | #define MIPS_CPU_FREQ_US (320) 18 | volatile register unsigned long count = (usec * MIPS_CPU_FREQ_US); 19 | 20 | asm volatile (".set noreorder \n" 21 | "1: bnez %0, 1b \n\t" 22 | "addiu %0, -1 \n\t" 23 | : 24 | :"r"(count) 25 | ); 26 | } 27 | 28 | typedef enum nvram_device { 29 | NOR_FLASH = 1<<1, 30 | NAND_FLASH = 1<<2, 31 | SPI_FLASH = 1<<3, 32 | } nvram_t; 33 | 34 | 35 | inline nvram_t boot_from(void) 36 | { 37 | //fixme, read bootstrap configuration 38 | #if defined (CFG_ENV_IS_IN_FLASH) 39 | return NOR_FLASH; 40 | #elif defined (CFG_ENV_IS_IN_SPI) 41 | return SPI_FLASH; 42 | #elif defined (CFG_ENV_IS_IN_NAND) 43 | return NAND_FLASH; 44 | #else 45 | #error "FIXME, fail to simulate bootstrap setting of booting device" 46 | #endif 47 | } 48 | 49 | 50 | nvram_t ram = NOR_FLASH; 51 | 52 | typedef int (*NVRAM_READ_FUNC)(uint32_t , uint32_t , uint32_t); 53 | 54 | inline void nvram_init(NVRAM_READ_FUNC *nvram_read) 55 | { 56 | ram = boot_from(); 57 | 58 | if (ram == NOR_FLASH) { 59 | //nor_init(); 60 | *nvram_read = nor_read; 61 | } 62 | else if (ram == NAND_FLASH) { 63 | nand_init(); 64 | *nvram_read = nand_read; 65 | } 66 | else if (ram == SPI_FLASH) { 67 | spi_init(); 68 | *nvram_read = spi_read; 69 | } 70 | 71 | return; 72 | } 73 | 74 | int load_stage2(void) 75 | { 76 | image_header_t header[1]; 77 | NVRAM_READ_FUNC nvram_read; 78 | 79 | int (*stage2)(int, char **); 80 | 81 | // init flash controller by bootstrap setting 82 | nvram_init(&nvram_read); 83 | 84 | // read header of stage2 85 | nvram_read((uint32_t)header, CONFIG_STAGE2_OFFSET, sizeof(header)); 86 | 87 | // load stage2 image 88 | nvram_read(ntohl((uint32_t)header[0].ih_load), CONFIG_STAGE2_OFFSET + sizeof(header), ntohl(header[0].ih_size)); 89 | 90 | // ready_to_go 91 | stage2 = (int (*)(int, char **))ntohl(header[0].ih_ep); 92 | stage2(0, 0); 93 | 94 | return 0; 95 | } 96 | 97 | 98 | -------------------------------------------------------------------------------- /stage1/stage1n2.lds: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2003 3 | * Wolfgang Denk Engineering, 4 | * 5 | * See file CREDITS for list of people who contributed to this 6 | * project. 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License as 10 | * published by the Free Software Foundation; either version 2 of 11 | * the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 | * MA 02111-1307 USA 22 | */ 23 | 24 | /* 25 | OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-bigmips") 26 | */ 27 | /*OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips")*/ 28 | OUTPUT_FORMAT("elf32-tradlittlemips", "elf32-tradbigmips", "elf32-tradlittlemips") 29 | OUTPUT_ARCH(mips) 30 | ENTRY(_start) 31 | 32 | SECTIONS 33 | { 34 | . = 0x00000000; 35 | 36 | . = ALIGN(4); 37 | .text : 38 | { 39 | start.o(.text) 40 | *(.text) 41 | } 42 | 43 | . = ALIGN(4); 44 | .rodata : { *(.rodata) } 45 | 46 | . = ALIGN(4); 47 | 48 | .except_vect : 49 | { 50 | *(.except_vect) 51 | } 52 | 53 | .data : { *(.data) } 54 | 55 | . = ALIGN(4); 56 | .sdata : { *(.sdata) } 57 | 58 | _gp = ALIGN(16); 59 | 60 | __got_start = .; 61 | .got : { *(.got) } 62 | __got_end = .; 63 | 64 | .sdata : { *(.sdata) } 65 | 66 | __u_boot_cmd_start = .; 67 | .u_boot_cmd : { *(.u_boot_cmd) } 68 | __u_boot_cmd_end = .; 69 | 70 | stage1_end_data = .; 71 | num_got_entries = (__got_end - __got_start) >> 2; 72 | 73 | . = ALIGN(4); 74 | .sbss : { *(.sbss) } 75 | .bss : { *(.bss) } 76 | 77 | stage1_end = .; 78 | 79 | _stage2_lma_s = LOADADDR(.text) + 0x4000; 80 | .stage2_image : AT (LOADADDR(.text) + 0x4000) 81 | { 82 | *(.stage2) 83 | } 84 | _stage2_lma_e = _stage2_lma_s + SIZEOF(.stage2_image); 85 | } 86 | 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /tools/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS = -I./ -DUSE_HOSTCC 2 | 3 | all: mkimage 4 | 5 | clean: 6 | rm -f mkimage *.o 7 | 8 | .c.o: 9 | $(HOSTCC) $(CFLAGS) -c $^ 10 | 11 | .depend: 12 | 13 | mkimage: mkimage.o crc32.o 14 | $(HOSTCC) -o $@ $^ 15 | 16 | 17 | -------------------------------------------------------------------------------- /u-boot_version.h: -------------------------------------------------------------------------------- 1 | #define WEB_FAILSAFE_VERSION "0.0.0.1" 2 | --------------------------------------------------------------------------------