├── bin ├── README ├── u-boot_mod__openembed_som9331__20170409__git_master-e8b44f3c.md5 └── u-boot_mod__openembed_som9331__20170409__git_master-e8b44f3c.bin ├── u-boot ├── CREDITS ├── CHANGELOG ├── include │ ├── linux │ │ ├── mtd │ │ │ └── mtd.h │ │ ├── config.h │ │ ├── stddef.h │ │ ├── posix_types.h │ │ ├── ctype.h │ │ ├── bitops.h │ │ └── string.h │ ├── soc │ │ ├── mtk_soc_common.h │ │ ├── soc_list.h │ │ └── soc_common.h │ ├── asm-mips │ │ ├── isadep.h │ │ ├── cachectl.h │ │ ├── byteorder.h │ │ ├── sgidefs.h │ │ ├── cacheops.h │ │ ├── regdef.h │ │ ├── reg.h │ │ ├── types.h │ │ ├── u-boot.h │ │ ├── global_data.h │ │ ├── ptrace.h │ │ └── addrspace.h │ ├── serial.h │ ├── version.h │ ├── console.h │ ├── exports.h │ ├── hush.h │ ├── tinf.h │ ├── LzmaWrapper.h │ ├── rtc.h │ ├── ioports.h │ ├── tplink_image.h │ └── jffs2 │ │ └── load_kernel.h ├── httpd │ ├── vendors │ │ ├── dragino │ │ │ ├── f.png │ │ │ ├── l.png │ │ │ ├── 404.html │ │ │ ├── fail.html │ │ │ ├── style.css │ │ │ ├── index.html │ │ │ └── flashing.html │ │ ├── villagetelco │ │ │ ├── v.png │ │ │ ├── vt.png │ │ │ ├── 404.html │ │ │ ├── fail.html │ │ │ ├── style.css │ │ │ ├── index.html │ │ │ └── flashing.html │ │ ├── yuicompressor-2.4.8.jar │ │ ├── oem │ │ │ ├── 404.html │ │ │ ├── fail.html │ │ │ ├── style.css │ │ │ ├── index.html │ │ │ └── flashing.html │ │ ├── general │ │ │ ├── 404.html │ │ │ ├── fail.html │ │ │ ├── art.html │ │ │ ├── index.html │ │ │ ├── style.css │ │ │ ├── uboot.html │ │ │ └── flashing.html │ │ └── SE │ │ │ ├── 404.html │ │ │ ├── fail.html │ │ │ ├── style.css │ │ │ ├── index.html │ │ │ ├── art.html │ │ │ ├── uboot.html │ │ │ └── flashing.html │ ├── Makefile │ ├── tapdev.h │ ├── fsdata.h │ └── httpd.h ├── board │ └── ar7240 │ │ ├── ap121 │ │ ├── config.mk │ │ ├── ap121.c │ │ ├── Makefile │ │ ├── u-boot.lds │ │ └── u-boot-bootstrap.lds │ │ ├── ap143 │ │ ├── config.mk │ │ ├── ap143.c │ │ ├── Makefile │ │ ├── u-boot.lds │ │ └── u-boot-bootstrap.lds │ │ ├── db12x │ │ ├── config.mk │ │ ├── db12x.c │ │ ├── Makefile │ │ ├── u-boot.lds │ │ └── u-boot-bootstrap.lds │ │ └── common │ │ └── phy.h ├── net │ ├── tftp.h │ ├── httpd.h │ ├── Makefile │ ├── rarp.h │ ├── sntp.h │ ├── nfs.h │ ├── sntp.c │ └── bootp.h ├── common │ ├── exports.c │ ├── env_nowhere.c │ ├── cmd_boot.c │ └── Makefile ├── cpu │ └── mips │ │ ├── ar7240 │ │ ├── qca_common.c │ │ ├── Makefile │ │ ├── ag7240_phy.h │ │ └── qca_ls_uart.c │ │ ├── cpu.c │ │ ├── Makefile │ │ └── config.mk ├── mips_config.mk ├── lib_bootstrap │ ├── LzmaTypes.h │ ├── Makefile │ └── string.c ├── lib_generic │ ├── LzmaTypes.h │ ├── Makefile │ ├── display_options.c │ ├── crc32.c │ ├── tinfcrc32.c │ ├── ldiv.c │ └── ctype.c ├── lib_mips │ ├── time.c │ └── Makefile ├── drivers │ └── Makefile ├── rtc │ └── Makefile └── mkconfig ├── host_util └── lzma │ ├── lzma │ ├── history.txt │ ├── Common │ ├── StdAfx.h │ ├── Types.h │ ├── CRC.cpp │ ├── NewHandler.h │ ├── MyException.h │ ├── MyInitGuid.h │ ├── MyUnknown.h │ ├── Defs.h │ ├── StringToInt.h │ ├── C_FileIO.h │ ├── MyGuidDef.h │ ├── StringToInt.cpp │ ├── C_FileIO.cpp │ ├── NewHandler.cpp │ └── MyVector.cpp │ ├── StdAfx.h │ ├── IDecl.h │ ├── StreamUtils.h │ ├── C │ ├── 7zCrc.h │ ├── Alloc.h │ ├── 7zCrc.c │ └── LzHash.h │ ├── lzma_version.h │ ├── Exception.h │ ├── OutBuffer.h │ ├── LzmaEncoder.h │ ├── StreamUtils.cpp │ ├── IStream.h │ ├── InBuffer.cpp │ ├── InBuffer.h │ ├── LzmaDecoder.h │ ├── makefile.gcc │ └── OutBuffer.cpp ├── original_u-boot_images ├── yuncore_ap90q.bin ├── d-link_dir505_a1.bin ├── yuncore_cpe830.bin ├── yuncore_cpe870.bin ├── p2w_r602n_cpe505n.bin ├── jjplus_jwap230_031115.bin ├── wallys_dr531_160915.bin ├── easylink_m-mini_031213.bin ├── gl-inet_gl-ar150_100815.bin ├── gl-inet_gl-ar300_270515.bin ├── buffalo_wpl-05g300_040112.bin ├── netgear_wndr4300_v2_120814.bin ├── openembed_som9331_030114.bin ├── tp-link_tl-mr10u_v1_130321.bin ├── tp-link_tl-mr22u_v1_140123.bin ├── tp-link_tl-mr3020_v1_130225.bin ├── tp-link_tl-mr3040_v1_120328.bin ├── tp-link_tl-mr3040_v2_131121.bin ├── tp-link_tl-mr3220_v2_130423.bin ├── tp-link_tl-mr3420_v2_130314.bin ├── tp-link_tl-wa801nd_v2_130121.bin ├── tp-link_tl-wa830re_v2_121008.bin ├── tp-link_tl-wa850re_v2_160517.bin ├── tp-link_tl-wdr3500_v1_130909.bin ├── tp-link_tl-wdr3600_v1_130909.bin ├── tp-link_tl-wdr4300_v1_130617.bin ├── tp-link_tl-wr703n_v1_120228.bin ├── tp-link_tl-wr710n_v1_130419.bin ├── tp-link_tl-wr740n_v4_130513.bin ├── tp-link_tl-wr802n_v1_150717.bin ├── tp-link_tl-wr841n_v11_150616.bin ├── tp-link_tl-wr841n_v8_130506.bin ├── tp-link_tl-wr841n_v9_150210.bin ├── tp-link_tl-wr1043nd_v2_150910.bin ├── tp-link_tl-wr820n_v1_CN_141014.bin └── philips_hue-bridge-bsb002_v2_220715.bin ├── readme_build_HOTGEN.txt └── .gitignore /bin/README: -------------------------------------------------------------------------------- 1 | Here you will find binary images after code compilation. 2 | -------------------------------------------------------------------------------- /u-boot/CREDITS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/u-boot/CREDITS -------------------------------------------------------------------------------- /u-boot/CHANGELOG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/u-boot/CHANGELOG -------------------------------------------------------------------------------- /host_util/lzma/lzma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/host_util/lzma/lzma -------------------------------------------------------------------------------- /host_util/lzma/history.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/host_util/lzma/history.txt -------------------------------------------------------------------------------- /u-boot/include/linux/mtd/mtd.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/u-boot/include/linux/mtd/mtd.h -------------------------------------------------------------------------------- /u-boot/httpd/vendors/dragino/f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/u-boot/httpd/vendors/dragino/f.png -------------------------------------------------------------------------------- /u-boot/httpd/vendors/dragino/l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/u-boot/httpd/vendors/dragino/l.png -------------------------------------------------------------------------------- /original_u-boot_images/yuncore_ap90q.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/yuncore_ap90q.bin -------------------------------------------------------------------------------- /u-boot/httpd/vendors/villagetelco/v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/u-boot/httpd/vendors/villagetelco/v.png -------------------------------------------------------------------------------- /u-boot/httpd/vendors/villagetelco/vt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/u-boot/httpd/vendors/villagetelco/vt.png -------------------------------------------------------------------------------- /u-boot/include/linux/config.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_CONFIG_H 2 | #define _LINUX_CONFIG_H 3 | 4 | /* #include */ 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /original_u-boot_images/d-link_dir505_a1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/d-link_dir505_a1.bin -------------------------------------------------------------------------------- /original_u-boot_images/yuncore_cpe830.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/yuncore_cpe830.bin -------------------------------------------------------------------------------- /original_u-boot_images/yuncore_cpe870.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/yuncore_cpe870.bin -------------------------------------------------------------------------------- /original_u-boot_images/p2w_r602n_cpe505n.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/p2w_r602n_cpe505n.bin -------------------------------------------------------------------------------- /u-boot/httpd/vendors/yuicompressor-2.4.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/u-boot/httpd/vendors/yuicompressor-2.4.8.jar -------------------------------------------------------------------------------- /original_u-boot_images/jjplus_jwap230_031115.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/jjplus_jwap230_031115.bin -------------------------------------------------------------------------------- /original_u-boot_images/wallys_dr531_160915.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/wallys_dr531_160915.bin -------------------------------------------------------------------------------- /original_u-boot_images/easylink_m-mini_031213.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/easylink_m-mini_031213.bin -------------------------------------------------------------------------------- /original_u-boot_images/gl-inet_gl-ar150_100815.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/gl-inet_gl-ar150_100815.bin -------------------------------------------------------------------------------- /original_u-boot_images/gl-inet_gl-ar300_270515.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/gl-inet_gl-ar300_270515.bin -------------------------------------------------------------------------------- /bin/u-boot_mod__openembed_som9331__20170409__git_master-e8b44f3c.md5: -------------------------------------------------------------------------------- 1 | 398ba3570b9a282848885c57f587b619 *u-boot_mod__openembed_som9331__20170409__git_master-e8b44f3c.bin 2 | -------------------------------------------------------------------------------- /original_u-boot_images/buffalo_wpl-05g300_040112.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/buffalo_wpl-05g300_040112.bin -------------------------------------------------------------------------------- /original_u-boot_images/netgear_wndr4300_v2_120814.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/netgear_wndr4300_v2_120814.bin -------------------------------------------------------------------------------- /original_u-boot_images/openembed_som9331_030114.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/openembed_som9331_030114.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-mr10u_v1_130321.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-mr10u_v1_130321.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-mr22u_v1_140123.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-mr22u_v1_140123.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-mr3020_v1_130225.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-mr3020_v1_130225.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-mr3040_v1_120328.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-mr3040_v1_120328.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-mr3040_v2_131121.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-mr3040_v2_131121.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-mr3220_v2_130423.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-mr3220_v2_130423.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-mr3420_v2_130314.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-mr3420_v2_130314.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-wa801nd_v2_130121.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-wa801nd_v2_130121.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-wa830re_v2_121008.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-wa830re_v2_121008.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-wa850re_v2_160517.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-wa850re_v2_160517.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-wdr3500_v1_130909.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-wdr3500_v1_130909.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-wdr3600_v1_130909.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-wdr3600_v1_130909.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-wdr4300_v1_130617.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-wdr4300_v1_130617.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-wr703n_v1_120228.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-wr703n_v1_120228.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-wr710n_v1_130419.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-wr710n_v1_130419.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-wr740n_v4_130513.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-wr740n_v4_130513.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-wr802n_v1_150717.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-wr802n_v1_150717.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-wr841n_v11_150616.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-wr841n_v11_150616.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-wr841n_v8_130506.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-wr841n_v8_130506.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-wr841n_v9_150210.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-wr841n_v9_150210.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-wr1043nd_v2_150910.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-wr1043nd_v2_150910.bin -------------------------------------------------------------------------------- /original_u-boot_images/tp-link_tl-wr820n_v1_CN_141014.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/tp-link_tl-wr820n_v1_CN_141014.bin -------------------------------------------------------------------------------- /host_util/lzma/Common/StdAfx.h: -------------------------------------------------------------------------------- 1 | // StdAfx.h 2 | 3 | #ifndef __STDAFX_H 4 | #define __STDAFX_H 5 | 6 | // #include "MyWindows.h" 7 | #include "NewHandler.h" 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /host_util/lzma/StdAfx.h: -------------------------------------------------------------------------------- 1 | // StdAfx.h 2 | 3 | #ifndef __STDAFX_H 4 | #define __STDAFX_H 5 | 6 | #include "Common/MyWindows.h" 7 | #include "Common/NewHandler.h" 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /original_u-boot_images/philips_hue-bridge-bsb002_v2_220715.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/original_u-boot_images/philips_hue-bridge-bsb002_v2_220715.bin -------------------------------------------------------------------------------- /bin/u-boot_mod__openembed_som9331__20170409__git_master-e8b44f3c.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SkyRocketToys/Recoil_Hub_U-Boot/HEAD/bin/u-boot_mod__openembed_som9331__20170409__git_master-e8b44f3c.bin -------------------------------------------------------------------------------- /readme_build_HOTGEN.txt: -------------------------------------------------------------------------------- 1 | Build the uboot binaries :- 2 | --------------------------- 3 | 4 | export TOOLCHAIN_DIR=${PWD}/toolchain 5 | export PATH=${TOOLCHAIN_DIR}/bin:${PATH} 6 | make openembed_som9331 7 | ls -l bin 8 | 9 | -------------------------------------------------------------------------------- /host_util/lzma/Common/Types.h: -------------------------------------------------------------------------------- 1 | // Common/Types.h 2 | 3 | #ifndef __COMMON_TYPES_H 4 | #define __COMMON_TYPES_H 5 | 6 | extern "C" 7 | { 8 | #include "../C/Types.h" 9 | } 10 | 11 | typedef int HRes; 12 | 13 | #endif 14 | 15 | -------------------------------------------------------------------------------- /host_util/lzma/Common/CRC.cpp: -------------------------------------------------------------------------------- 1 | // Common/CRC.cpp 2 | 3 | #include "StdAfx.h" 4 | 5 | extern "C" 6 | { 7 | #include "../C/7zCrc.h" 8 | } 9 | 10 | struct CCRCTableInit { CCRCTableInit() { CrcGenerateTable(); } } g_CRCTableInit; 11 | -------------------------------------------------------------------------------- /u-boot/board/ar7240/ap121/config.mk: -------------------------------------------------------------------------------- 1 | # ROM version 2 | ifdef COMPRESSED_UBOOT 3 | TEXT_BASE = 0x80010000 4 | BOOTSTRAP_TEXT_BASE = 0x9F000000 5 | # RAM version 6 | else 7 | ifdef CONFIG_SKIP_LOWLEVEL_INIT 8 | TEXT_BASE = 0x80100000 9 | else 10 | TEXT_BASE = 0x9F000000 11 | endif 12 | endif -------------------------------------------------------------------------------- /u-boot/board/ar7240/ap143/config.mk: -------------------------------------------------------------------------------- 1 | # ROM version 2 | ifdef COMPRESSED_UBOOT 3 | TEXT_BASE = 0x80010000 4 | BOOTSTRAP_TEXT_BASE = 0x9F000000 5 | # RAM version 6 | else 7 | ifdef CONFIG_SKIP_LOWLEVEL_INIT 8 | TEXT_BASE = 0x80100000 9 | else 10 | TEXT_BASE = 0x9F000000 11 | endif 12 | endif -------------------------------------------------------------------------------- /u-boot/board/ar7240/db12x/config.mk: -------------------------------------------------------------------------------- 1 | # ROM version 2 | ifdef COMPRESSED_UBOOT 3 | TEXT_BASE = 0x80010000 4 | BOOTSTRAP_TEXT_BASE = 0x9F000000 5 | # RAM version 6 | else 7 | ifdef CONFIG_SKIP_LOWLEVEL_INIT 8 | TEXT_BASE = 0x80100000 9 | else 10 | TEXT_BASE = 0x9F000000 11 | endif 12 | endif -------------------------------------------------------------------------------- /host_util/lzma/Common/NewHandler.h: -------------------------------------------------------------------------------- 1 | // Common/NewHandler.h 2 | 3 | #ifndef __COMMON_NEWHANDLER_H 4 | #define __COMMON_NEWHANDLER_H 5 | 6 | class CNewException {}; 7 | 8 | #ifdef _WIN32 9 | void 10 | #ifdef _MSC_VER 11 | __cdecl 12 | #endif 13 | operator delete(void *p) throw(); 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /host_util/lzma/Common/MyException.h: -------------------------------------------------------------------------------- 1 | // Common/Exception.h 2 | 3 | #ifndef __COMMON_EXCEPTION_H 4 | #define __COMMON_EXCEPTION_H 5 | 6 | #include "MyWindows.h" 7 | 8 | struct CSystemException 9 | { 10 | HRESULT ErrorCode; 11 | CSystemException(HRESULT errorCode): ErrorCode(errorCode) {} 12 | }; 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /u-boot/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 | * Global functions and variables 13 | */ 14 | 15 | /* Begin TFTP get */ 16 | extern void TftpStart(proto_t protocol); 17 | 18 | #endif /* __TFTP_H__ */ 19 | -------------------------------------------------------------------------------- /u-boot/include/soc/mtk_soc_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MediaTek/Ralink Wireless SOC common registers definitions 3 | * 4 | * Copyright (C) 2014 Piotr Dymacz 5 | * 6 | * SPDX-License-Identifier:GPL-2.0 7 | */ 8 | 9 | #ifndef _MTK_SOC_COMMON_H_ 10 | #define _MTK_SOC_COMMON_H_ 11 | 12 | #include 13 | 14 | #endif /* _MTK_SOC_COMMON_H_ */ 15 | -------------------------------------------------------------------------------- /host_util/lzma/Common/MyInitGuid.h: -------------------------------------------------------------------------------- 1 | // Common/MyInitGuid.h 2 | 3 | #ifndef __COMMON_MYINITGUID_H 4 | #define __COMMON_MYINITGUID_H 5 | 6 | #ifdef _WIN32 7 | #include 8 | #else 9 | #define INITGUID 10 | #include "MyGuidDef.h" 11 | DEFINE_GUID(IID_IUnknown, 12 | 0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); 13 | #endif 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /u-boot/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 all_led_on(void); 11 | extern void all_led_off(void); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /host_util/lzma/Common/MyUnknown.h: -------------------------------------------------------------------------------- 1 | // MyUnknown.h 2 | 3 | #ifndef __MYUNKNOWN_H 4 | #define __MYUNKNOWN_H 5 | 6 | #ifdef _WIN32 7 | 8 | #ifdef _WIN32_WCE 9 | #if (_WIN32_WCE > 300) 10 | #include 11 | #else 12 | #define MIDL_INTERFACE(x) struct 13 | #endif 14 | #else 15 | #include 16 | #endif 17 | 18 | #include 19 | 20 | #else 21 | #include "MyWindows.h" 22 | #endif 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/oem/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!
Go back to firmware update page.

12 |
13 | 14 | -------------------------------------------------------------------------------- /host_util/lzma/IDecl.h: -------------------------------------------------------------------------------- 1 | // IDecl.h 2 | 3 | #ifndef __IDECL_H 4 | #define __IDECL_H 5 | 6 | #include "Common/MyUnknown.h" 7 | 8 | #define DECL_INTERFACE_SUB(i, base, groupId, subId) \ 9 | DEFINE_GUID(IID_ ## i, \ 10 | 0x23170F69, 0x40C1, 0x278A, 0, 0, 0, (groupId), 0, (subId), 0, 0); \ 11 | struct i: public base 12 | 13 | #define DECL_INTERFACE(i, groupId, subId) DECL_INTERFACE_SUB(i, IUnknown, groupId, subId) 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/oem/fail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update failed 6 | 7 | 8 | 9 |
10 |

Update failed

11 |

Please, try again or contact with the support.
You can also get more information during update in U-Boot console.

12 |
13 | 14 | -------------------------------------------------------------------------------- /u-boot/board/ar7240/ap121/ap121.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Piotr Dymacz 3 | * 4 | * SPDX-License-Identifier: GPL-2.0 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | /* 13 | * DRAM init 14 | */ 15 | long int dram_init() 16 | { 17 | #ifndef CONFIG_SKIP_LOWLEVEL_INIT 18 | qca_dram_init(); 19 | #endif 20 | 21 | return (long int)qca_dram_size(); 22 | } 23 | -------------------------------------------------------------------------------- /u-boot/board/ar7240/ap143/ap143.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Piotr Dymacz 3 | * 4 | * SPDX-License-Identifier: GPL-2.0 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | /* 13 | * DRAM init 14 | */ 15 | long int dram_init() 16 | { 17 | #ifndef CONFIG_SKIP_LOWLEVEL_INIT 18 | qca_dram_init(); 19 | #endif 20 | 21 | return (long int)qca_dram_size(); 22 | } 23 | -------------------------------------------------------------------------------- /u-boot/board/ar7240/db12x/db12x.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Piotr Dymacz 3 | * 4 | * SPDX-License-Identifier: GPL-2.0 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | /* 13 | * DRAM init 14 | */ 15 | long int dram_init() 16 | { 17 | #ifndef CONFIG_SKIP_LOWLEVEL_INIT 18 | qca_dram_init(); 19 | #endif 20 | 21 | return (long int)qca_dram_size(); 22 | } 23 | -------------------------------------------------------------------------------- /host_util/lzma/StreamUtils.h: -------------------------------------------------------------------------------- 1 | // StreamUtils.h 2 | 3 | #ifndef __STREAMUTILS_H 4 | #define __STREAMUTILS_H 5 | 6 | #include "IStream.h" 7 | 8 | HRESULT ReadStream(ISequentialInStream *stream, void *data, size_t *size); 9 | HRESULT ReadStream_FALSE(ISequentialInStream *stream, void *data, size_t size); 10 | HRESULT ReadStream_FAIL(ISequentialInStream *stream, void *data, size_t size); 11 | HRESULT WriteStream(ISequentialOutStream *stream, const void *data, size_t size); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /u-boot/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 GitHub
14 | 15 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/oem/style.css: -------------------------------------------------------------------------------- 1 | h1, 2 | p, 3 | form, 4 | body { 5 | margin: 0; 6 | padding: 0; 7 | } 8 | 9 | html, 10 | body { 11 | font: 13px/20px Tahoma, sans-serif; 12 | background: #FFF; 13 | color: #000; 14 | text-align: center; 15 | height: 100%; 16 | } 17 | 18 | #m { 19 | padding: 30px 0; 20 | } 21 | 22 | #m > * { 23 | padding: 20px; 24 | } 25 | 26 | a { 27 | color: #0069FB; 28 | text-decoration: none; 29 | } 30 | 31 | h1 { 32 | font: bold 40px/40px Arial; 33 | } 34 | 35 | .red { 36 | color: #ED0000; 37 | } -------------------------------------------------------------------------------- /u-boot/httpd/vendors/SE/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!
Go back to firmware update page.

12 |
13 |
This code is based on GitHub
14 | 15 | -------------------------------------------------------------------------------- /host_util/lzma/Common/Defs.h: -------------------------------------------------------------------------------- 1 | // Common/Defs.h 2 | 3 | #ifndef __COMMON_DEFS_H 4 | #define __COMMON_DEFS_H 5 | 6 | template inline T MyMin(T a, T b) 7 | { return a < b ? a : b; } 8 | template inline T MyMax(T a, T b) 9 | { return a > b ? a : b; } 10 | 11 | template inline int MyCompare(T a, T b) 12 | { return a < b ? -1 : (a == b ? 0 : 1); } 13 | 14 | inline int BoolToInt(bool value) 15 | { return (value ? 1: 0); } 16 | 17 | inline bool IntToBool(int value) 18 | { return (value != 0); } 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /host_util/lzma/Common/StringToInt.h: -------------------------------------------------------------------------------- 1 | // Common/StringToInt.h 2 | 3 | #ifndef __COMMON_STRINGTOINT_H 4 | #define __COMMON_STRINGTOINT_H 5 | 6 | #include 7 | #include "Types.h" 8 | 9 | UInt64 ConvertStringToUInt64(const char *s, const char **end); 10 | UInt64 ConvertOctStringToUInt64(const char *s, const char **end); 11 | UInt64 ConvertHexStringToUInt64(const char *s, const char **end); 12 | UInt64 ConvertStringToUInt64(const wchar_t *s, const wchar_t **end); 13 | 14 | Int64 ConvertStringToInt64(const char *s, const char **end); 15 | 16 | #endif 17 | 18 | 19 | -------------------------------------------------------------------------------- /u-boot/board/ar7240/ap121/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/config.mk 2 | 3 | LIB = lib$(BOARD).a 4 | 5 | OBJS = $(BOARD).o ../common/spi_flash.o ../common/ar7240_s26_phy.o ../common/common.o 6 | 7 | $(LIB): .depend $(OBJS) $(SOBJS) 8 | $(AR) crv $@ $(OBJS) $(SOBJS) 9 | 10 | ######################################################################### 11 | 12 | .depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) 13 | $(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ 14 | 15 | sinclude .depend 16 | 17 | ######################################################################### 18 | -------------------------------------------------------------------------------- /u-boot/httpd/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile for http stuff 3 | # 4 | 5 | include $(TOPDIR)/config.mk 6 | 7 | LIB = libhttpd.a 8 | OBJS += uip.o \ 9 | uip_arch.o \ 10 | uip_arp.o \ 11 | httpd.o \ 12 | fs.o 13 | 14 | all: $(LIB) 15 | 16 | $(LIB): $(OBJS) 17 | $(AR) crv $@ $(OBJS) 18 | 19 | ######################################################################### 20 | 21 | .depend: Makefile fsdata.c $(OBJS:.o=.c) 22 | $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@ 23 | 24 | sinclude .depend 25 | 26 | ######################################################################### 27 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/SE/fail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update failed 6 | 7 | 8 | 9 |
10 |

Update failed!

11 |

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 |
This code is based on GitHub
14 | 15 | -------------------------------------------------------------------------------- /u-boot/common/exports.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | DECLARE_GLOBAL_DATA_PTR; 5 | 6 | static void dummy(void){ 7 | } 8 | 9 | unsigned long get_version(void){ 10 | return(XF_VERSION); 11 | } 12 | 13 | void jumptable_init(void){ 14 | int i; 15 | 16 | gd->jt = (void **)malloc(XF_MAX * sizeof(void *)); 17 | 18 | for(i = 0; i < XF_MAX; i++){ 19 | gd->jt[i] = (void *)dummy; 20 | } 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 | } 28 | -------------------------------------------------------------------------------- /host_util/lzma/C/7zCrc.h: -------------------------------------------------------------------------------- 1 | /* 7zCrc.h -- CRC32 calculation 2 | 2008-03-13 3 | Igor Pavlov 4 | Public domain */ 5 | 6 | #ifndef __7Z_CRC_H 7 | #define __7Z_CRC_H 8 | 9 | #include 10 | 11 | #include "Types.h" 12 | 13 | extern UInt32 g_CrcTable[]; 14 | 15 | void MY_FAST_CALL CrcGenerateTable(void); 16 | 17 | #define CRC_INIT_VAL 0xFFFFFFFF 18 | #define CRC_GET_DIGEST(crc) ((crc) ^ 0xFFFFFFFF) 19 | #define CRC_UPDATE_BYTE(crc, b) (g_CrcTable[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) 20 | 21 | UInt32 MY_FAST_CALL CrcUpdate(UInt32 crc, const void *data, size_t size); 22 | UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /u-boot/board/ar7240/ap143/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/config.mk 2 | 3 | LIB = lib$(BOARD).a 4 | 5 | OBJS = $(BOARD).o ../common/spi_flash.o ../common/common.o ../common/qca-eth-953x.o 6 | 7 | ifeq ($(ETH_CONFIG), _s27) 8 | OBJS += ../common/athr_s27_phy.o 9 | endif 10 | 11 | $(LIB): .depend $(OBJS) $(SOBJS) 12 | $(AR) crv $@ $(OBJS) $(SOBJS) 13 | 14 | ######################################################################### 15 | 16 | .depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) 17 | $(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ 18 | 19 | sinclude .depend 20 | 21 | ######################################################################### 22 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/dragino/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Page not found 6 | 7 | 8 | 9 | 10 |
11 |
12 |

Page not found

13 |

The page you were looking for doesn't exist!
Go back to firmware update page.

14 |
15 |
You can find more information about this project on GitHub
16 | 17 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/villagetelco/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Page not found 6 | 7 | 8 | 9 | 10 |
11 |
12 |

Page not found

13 |

The page you were looking for doesn't exist!
Go back to firmware update page.

14 |
15 |
You can find more information about this project on GitHub
16 | 17 | -------------------------------------------------------------------------------- /u-boot/board/ar7240/common/phy.h: -------------------------------------------------------------------------------- 1 | #ifndef _PHY_H 2 | #define _PHY_H 3 | 4 | #include 5 | /* 6 | * This file defines the interface between MAC and various phy switches. 7 | */ 8 | extern int ag7240_miiphy_read(char *devname, uint32_t phaddr, uint8_t reg); 9 | extern int ag7240_miiphy_write(char *devname, uint32_t phaddr, uint8_t reg, uint16_t data); 10 | 11 | #define ag7240_unit2name(_unit) _unit ? "eth1" : "eth0" 12 | #define phy_reg_read(base, addr, reg) ag7240_miiphy_read(ag7240_unit2name(base), addr, reg) 13 | #define phy_reg_write(base, addr, reg, data) ag7240_miiphy_write(ag7240_unit2name(base), addr, reg, data) 14 | 15 | #endif /* ifndef _PHY_H */ 16 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/dragino/fail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update failed 6 | 7 | 8 | 9 | 10 |
11 |
12 |

Update failed

13 |

Please, try again or contact with the author of this modification.
You can also get more information during update in U-Boot console.

14 |
15 |
You can find more information about this project on GitHub
16 | 17 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/villagetelco/fail.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update failed 6 | 7 | 8 | 9 | 10 |
11 |
12 |

Update failed

13 |

Please, try again or contact with the author of this modification.
You can also get more information during update in U-Boot console.

14 |
15 |
You can find more information about this project on GitHub
16 | 17 | -------------------------------------------------------------------------------- /host_util/lzma/C/Alloc.h: -------------------------------------------------------------------------------- 1 | /* Alloc.h -- Memory allocation functions 2 | 2008-03-13 3 | Igor Pavlov 4 | Public domain */ 5 | 6 | #ifndef __COMMON_ALLOC_H 7 | #define __COMMON_ALLOC_H 8 | 9 | #include 10 | 11 | void *MyAlloc(size_t size); 12 | void MyFree(void *address); 13 | 14 | #ifdef _WIN32 15 | 16 | void SetLargePageSize(); 17 | 18 | void *MidAlloc(size_t size); 19 | void MidFree(void *address); 20 | void *BigAlloc(size_t size); 21 | void BigFree(void *address); 22 | 23 | #else 24 | 25 | #define MidAlloc(size) MyAlloc(size) 26 | #define MidFree(address) MyFree(address) 27 | #define BigAlloc(size) MyAlloc(size) 28 | #define BigFree(address) MyFree(address) 29 | 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /u-boot/board/ar7240/db12x/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/config.mk 2 | 3 | LIB = lib$(BOARD).a 4 | 5 | OBJS = $(BOARD).o ../common/spi_flash.o ../common/common.o 6 | 7 | ifeq ($(ETH_CONFIG), _s17) 8 | OBJS += ../common/athrs17_phy.o 9 | endif 10 | 11 | ifeq ($(ETH_CONFIG), _s27) 12 | OBJS += ../common/athrs27_phy.o 13 | endif 14 | 15 | $(LIB): .depend $(OBJS) $(SOBJS) 16 | $(AR) crv $@ $(OBJS) $(SOBJS) 17 | 18 | ######################################################################### 19 | 20 | .depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c) 21 | $(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@ 22 | 23 | sinclude .depend 24 | 25 | ######################################################################### 26 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/dragino/style.css: -------------------------------------------------------------------------------- 1 | h1, 2 | p, 3 | form, 4 | body { 5 | margin: 0; 6 | padding: 0; 7 | } 8 | 9 | html, 10 | body { 11 | font: 13px/20px Tahoma, sans-serif; 12 | background: #135B72; 13 | color: #FFF; 14 | text-align: center; 15 | height: 100%; 16 | } 17 | 18 | #m, #h { 19 | padding: 30px 0; 20 | } 21 | 22 | #h { 23 | background: #FFF; 24 | } 25 | 26 | #m > * { 27 | padding: 20px; 28 | } 29 | 30 | #f { 31 | font-size: 11px; 32 | position: absolute; 33 | bottom: 0; 34 | width: 100%; 35 | padding: 15px 0; 36 | } 37 | 38 | a { 39 | color: #FEDD12; 40 | text-decoration: none; 41 | } 42 | 43 | h1 { 44 | font: bold 40px/40px Arial; 45 | } 46 | 47 | .red { 48 | color: #ED0000; 49 | } -------------------------------------------------------------------------------- /u-boot/httpd/vendors/oem/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Firmware update 6 | 7 | 8 | 9 |
10 |

Firmware update

11 |

You are going to upload new firmware to the device.
Choose a proper file from your local hard drive and click "Update firmware" button.
Please, do not power off the device during update, if everything goes well, the device will restart.

12 |
13 |
14 | 15 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/villagetelco/style.css: -------------------------------------------------------------------------------- 1 | h1, 2 | p, 3 | form, 4 | body { 5 | margin: 0; 6 | padding: 0; 7 | } 8 | 9 | html, 10 | body { 11 | font: 13px/20px Tahoma, sans-serif; 12 | background: #5a4a42; 13 | color: #FFF; 14 | text-align: center; 15 | height: 100%; 16 | } 17 | 18 | #m, #h { 19 | padding: 30px 0; 20 | } 21 | 22 | #h { 23 | background: #FFF; 24 | } 25 | 26 | #m > * { 27 | padding: 20px; 28 | } 29 | 30 | #f { 31 | font-size: 11px; 32 | position: absolute; 33 | bottom: 0; 34 | width: 100%; 35 | padding: 15px 0; 36 | } 37 | 38 | a { 39 | color: #FEDD12; 40 | text-decoration: none; 41 | } 42 | 43 | h1 { 44 | font: bold 40px/40px Arial; 45 | } 46 | 47 | .red { 48 | color: #ED0000; 49 | } -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/SE/style.css: -------------------------------------------------------------------------------- 1 | h1, 2 | p, 3 | form, 4 | body { 5 | margin: 0; 6 | padding: 0; 7 | } 8 | 9 | html, 10 | body { 11 | font: 13px/20px Tahoma, sans-serif; 12 | background: #135B72; 13 | color: #FFF; 14 | text-align: center; 15 | height: 100%; 16 | } 17 | 18 | #m, #h { 19 | padding: 30px 0; 20 | } 21 | 22 | #h { 23 | font: bold 40px/40px Arial; 24 | background: #ffffff; 25 | color: #000000; 26 | text-align: center; 27 | } 28 | 29 | #m > * { 30 | padding: 20px; 31 | } 32 | 33 | #f { 34 | font-size: 11px; 35 | position: absolute; 36 | bottom: 0; 37 | width: 100%; 38 | padding: 15px 0; 39 | } 40 | 41 | a { 42 | color: #FEDD12; 43 | text-decoration: none; 44 | } 45 | 46 | h1 { 47 | font: bold 40px/40px Arial; 48 | } 49 | 50 | .red { 51 | color: #ED0000; 52 | } -------------------------------------------------------------------------------- /u-boot/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 GitHub
14 | 15 | -------------------------------------------------------------------------------- /host_util/lzma/C/7zCrc.c: -------------------------------------------------------------------------------- 1 | /* 7zCrc.c -- CRC32 calculation 2 | 2008-08-05 3 | Igor Pavlov 4 | Public domain */ 5 | 6 | #include "7zCrc.h" 7 | 8 | #define kCrcPoly 0xEDB88320 9 | UInt32 g_CrcTable[256]; 10 | 11 | void MY_FAST_CALL CrcGenerateTable(void) 12 | { 13 | UInt32 i; 14 | for (i = 0; i < 256; i++) 15 | { 16 | UInt32 r = i; 17 | int j; 18 | for (j = 0; j < 8; j++) 19 | r = (r >> 1) ^ (kCrcPoly & ~((r & 1) - 1)); 20 | g_CrcTable[i] = r; 21 | } 22 | } 23 | 24 | UInt32 MY_FAST_CALL CrcUpdate(UInt32 v, const void *data, size_t size) 25 | { 26 | const Byte *p = (const Byte *)data; 27 | for (; size > 0 ; size--, p++) 28 | v = CRC_UPDATE_BYTE(v, *p); 29 | return v; 30 | } 31 | 32 | UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size) 33 | { 34 | return CrcUpdate(CRC_INIT_VAL, data, size) ^ 0xFFFFFFFF; 35 | } 36 | -------------------------------------------------------------------------------- /u-boot/cpu/mips/ar7240/qca_common.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Qualcomm/Atheros WiSoCs common/helper functions 3 | * 4 | * Copyright (C) 2016 Piotr Dymacz 5 | * 6 | * SPDX-License-Identifier: GPL-2.0 7 | */ 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | /* 15 | * Returns 1 if reference clock is 40 MHz 16 | */ 17 | u32 qca_xtal_is_40mhz(void) 18 | { 19 | return ((qca_soc_reg_read(QCA_RST_BOOTSTRAP_REG) & 20 | QCA_RST_BOOTSTRAP_REF_CLK_MASK) >> QCA_RST_BOOTSTRAP_REF_CLK_SHIFT); 21 | } 22 | 23 | /* 24 | * Performs full chip reset 25 | */ 26 | void qca_full_chip_reset(void) 27 | { 28 | volatile u32 i = 1; 29 | 30 | do { 31 | qca_soc_reg_write(QCA_RST_RESET_REG, 32 | QCA_RST_RESET_FULL_CHIP_RST_MASK 33 | | QCA_RST_RESET_DDR_RST_MASK); 34 | } while (i); 35 | } 36 | -------------------------------------------------------------------------------- /u-boot/board/ar7240/ap143/u-boot.lds: -------------------------------------------------------------------------------- 1 | OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips") 2 | OUTPUT_ARCH(mips) 3 | ENTRY(_start) 4 | SECTIONS 5 | { 6 | . = 0x00000000; 7 | 8 | . = ALIGN(4); 9 | .text : 10 | { 11 | *(.text) 12 | } 13 | 14 | . = ALIGN(4); 15 | .rodata : { *(.rodata) } 16 | 17 | . = ALIGN(4); 18 | .data : { *(.data) } 19 | 20 | . = ALIGN(4); 21 | .sdata : { *(.sdata) } 22 | 23 | . = ALIGN(16); 24 | _gp = .; 25 | __got_start = .; 26 | .got : { *(.got) } 27 | __got_end = .; 28 | 29 | 30 | .sdata : { *(.sdata) } 31 | 32 | __u_boot_cmd_start = .; 33 | .u_boot_cmd : { *(.u_boot_cmd) } 34 | __u_boot_cmd_end = .; 35 | 36 | uboot_end_data = .; 37 | num_got_entries = (__got_end - __got_start) >> 2; 38 | 39 | . = ALIGN(4); 40 | .sbss : { *(.sbss) } 41 | .bss : { *(.bss) } 42 | uboot_end = .; 43 | } 44 | -------------------------------------------------------------------------------- /u-boot/board/ar7240/db12x/u-boot.lds: -------------------------------------------------------------------------------- 1 | OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips") 2 | OUTPUT_ARCH(mips) 3 | ENTRY(_start) 4 | SECTIONS 5 | { 6 | . = 0x00000000; 7 | 8 | . = ALIGN(4); 9 | .text : 10 | { 11 | *(.text) 12 | } 13 | 14 | . = ALIGN(4); 15 | .rodata : { *(.rodata) } 16 | 17 | . = ALIGN(4); 18 | .data : { *(.data) } 19 | 20 | . = ALIGN(4); 21 | .sdata : { *(.sdata) } 22 | 23 | . = ALIGN(16); 24 | _gp = .; 25 | __got_start = .; 26 | .got : { *(.got) } 27 | __got_end = .; 28 | 29 | 30 | .sdata : { *(.sdata) } 31 | 32 | __u_boot_cmd_start = .; 33 | .u_boot_cmd : { *(.u_boot_cmd) } 34 | __u_boot_cmd_end = .; 35 | 36 | uboot_end_data = .; 37 | num_got_entries = (__got_end - __got_start) >> 2; 38 | 39 | . = ALIGN(4); 40 | .sbss : { *(.sbss) } 41 | .bss : { *(.bss) } 42 | uboot_end = .; 43 | } 44 | -------------------------------------------------------------------------------- /u-boot/board/ar7240/ap121/u-boot.lds: -------------------------------------------------------------------------------- 1 | OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips") 2 | OUTPUT_ARCH(mips) 3 | ENTRY(_start) 4 | SECTIONS 5 | { 6 | . = 0x00000000; 7 | 8 | . = ALIGN(4); 9 | .text : 10 | { 11 | *(.text*) 12 | } 13 | 14 | . = ALIGN(4); 15 | .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } 16 | 17 | . = ALIGN(4); 18 | .data : { *(.data*) } 19 | 20 | . = .; 21 | _gp = ALIGN(16); 22 | 23 | .got : { 24 | __got_start = .; 25 | *(.got) 26 | __got_end = .; 27 | } 28 | 29 | . = ALIGN(4); 30 | .sdata : { *(.sdata*) } 31 | 32 | __u_boot_cmd_start = .; 33 | .u_boot_cmd : { *(.u_boot_cmd) } 34 | __u_boot_cmd_end = .; 35 | 36 | uboot_end_data = .; 37 | num_got_entries = (__got_end - __got_start) >> 2; 38 | 39 | . = ALIGN(4); 40 | .sbss : { *(.sbss*) } 41 | .bss : { *(.bss*) . = ALIGN(4); } 42 | uboot_end = .; 43 | } 44 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/dragino/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Firmware update 6 | 7 | 8 | 9 | 10 |
11 |
12 |

Firmware update

13 |

You are going to upload new firmware to the device.
Choose a proper file from your local hard drive and click "Update firmware" button.
Please, do not power off the device during update, if everything goes well, the device will restart.

14 |
15 |
16 |
You can find more information about this project on GitHub
17 | 18 | -------------------------------------------------------------------------------- /u-boot/include/asm-mips/byteorder.h: -------------------------------------------------------------------------------- 1 | /* $Id: //depot/sw/releases/Aquila_9.2.0_U5/boot/u-boot/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 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/SE/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Firmware update for Black Swift board 6 | 7 | 8 | 9 |
Black Swift board
10 |
11 |

Firmware update

12 |

You are going to upload new firmware to the device.
Choose a proper file from your local hard drive and click "Update firmware" button.
Please, do not power off the device during update, if everything goes well, the device will restart.

13 |
14 |
15 |
Please, go here to update U-Boot or here to update ART.
16 |
This code is based on GitHub
17 | 18 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /u-boot/cpu/mips/ar7240/Makefile: -------------------------------------------------------------------------------- 1 | include $(TOPDIR)/config.mk 2 | 3 | LIB = lib$(SOC).a 4 | 5 | START = 6 | OBJS = 7 | SOBJS = 8 | 9 | OBJS += qca_common.o 10 | OBJS += qca_clocks.o 11 | OBJS += qca_sf.o 12 | OBJS += qca_dram.o 13 | OBJS += qca_pci.o 14 | SOBJS += qca_gpio_init.o 15 | 16 | ifeq ($(BOARD), ap121) 17 | OBJS += qca_hs_uart.o 18 | OBJS += ag7240.o 19 | SOBJS += ar933x_pll_init.o 20 | else 21 | OBJS += qca_ls_uart.o 22 | endif 23 | 24 | ifeq ($(BOARD), db12x) 25 | OBJS += ag934x.o 26 | SOBJS += qca95xx_pll_init.o 27 | endif 28 | 29 | ifeq ($(BOARD), ap143) 30 | SOBJS += qca95xx_pll_init.o 31 | endif 32 | 33 | all: .depend $(START) $(LIB) 34 | 35 | $(LIB): $(OBJS) $(SOBJS) $(OBJS-0) 36 | $(AR) crv $@ $(OBJS) $(SOBJS) 37 | 38 | ######################################################################### 39 | 40 | .depend: Makefile $(START:.o=.S) $(OBJS:.o=.c) 41 | $(CC) -M $(CFLAGS) $(START:.o=.S) $(OBJS:.o=.c) > $@ 42 | 43 | sinclude .depend 44 | 45 | ######################################################################### 46 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/SE/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 |
This code is based on GitHub
23 | 24 | -------------------------------------------------------------------------------- /u-boot/lib_bootstrap/LzmaTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | LzmaTypes.h 3 | 4 | Types for LZMA Decoder 5 | 6 | This file written and distributed to public domain by Igor Pavlov. 7 | This file is part of LZMA SDK 4.40 (2006-05-01) 8 | */ 9 | 10 | #ifndef __LZMATYPES_H 11 | #define __LZMATYPES_H 12 | 13 | #ifndef _7ZIP_BYTE_DEFINED 14 | #define _7ZIP_BYTE_DEFINED 15 | typedef unsigned char Byte; 16 | #endif 17 | 18 | #ifndef _7ZIP_UINT16_DEFINED 19 | #define _7ZIP_UINT16_DEFINED 20 | typedef unsigned short UInt16; 21 | #endif 22 | 23 | #ifndef _7ZIP_UINT32_DEFINED 24 | #define _7ZIP_UINT32_DEFINED 25 | #ifdef _LZMA_UINT32_IS_ULONG 26 | typedef unsigned long UInt32; 27 | #else 28 | typedef unsigned int UInt32; 29 | #endif 30 | #endif 31 | 32 | /* #define _LZMA_SYSTEM_SIZE_T */ 33 | /* Use system's size_t. You can use it to enable 64-bit sizes supporting */ 34 | 35 | #ifndef _7ZIP_SIZET_DEFINED 36 | #define _7ZIP_SIZET_DEFINED 37 | #ifdef _LZMA_SYSTEM_SIZE_T 38 | #include 39 | typedef size_t SizeT; 40 | #else 41 | typedef UInt32 SizeT; 42 | #endif 43 | #endif 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /u-boot/lib_generic/LzmaTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | LzmaTypes.h 3 | 4 | Types for LZMA Decoder 5 | 6 | This file written and distributed to public domain by Igor Pavlov. 7 | This file is part of LZMA SDK 4.40 (2006-05-01) 8 | */ 9 | 10 | #ifndef __LZMATYPES_H 11 | #define __LZMATYPES_H 12 | 13 | #ifndef _7ZIP_BYTE_DEFINED 14 | #define _7ZIP_BYTE_DEFINED 15 | typedef unsigned char Byte; 16 | #endif 17 | 18 | #ifndef _7ZIP_UINT16_DEFINED 19 | #define _7ZIP_UINT16_DEFINED 20 | typedef unsigned short UInt16; 21 | #endif 22 | 23 | #ifndef _7ZIP_UINT32_DEFINED 24 | #define _7ZIP_UINT32_DEFINED 25 | #ifdef _LZMA_UINT32_IS_ULONG 26 | typedef unsigned long UInt32; 27 | #else 28 | typedef unsigned int UInt32; 29 | #endif 30 | #endif 31 | 32 | /* #define _LZMA_SYSTEM_SIZE_T */ 33 | /* Use system's size_t. You can use it to enable 64-bit sizes supporting */ 34 | 35 | #ifndef _7ZIP_SIZET_DEFINED 36 | #define _7ZIP_SIZET_DEFINED 37 | #ifdef _LZMA_SYSTEM_SIZE_T 38 | #include 39 | typedef size_t SizeT; 40 | #else 41 | typedef UInt32 SizeT; 42 | #endif 43 | #endif 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /u-boot/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 GitHub
23 | 24 | -------------------------------------------------------------------------------- /host_util/lzma/lzma_version.h: -------------------------------------------------------------------------------- 1 | #ifndef LZMA_VERSION_H 2 | #define LZMA_VERSION_H 3 | 4 | /* 5 | Version and copyright information used by LZMA utils. 6 | */ 7 | 8 | static const char *LZMA_SDK_VERSION_STRING = "4.43"; 9 | 10 | static const char *LZMA_SDK_COPYRIGHT_STRING = 11 | "Copyright (C) 1999-2006 Igor Pavlov"; 12 | 13 | static const char *LZMA_SDK_COPYRIGHT_INFO = 14 | " See http://7-zip.org/sdk.html or the documentation of LZMA SDK for\n" 15 | " the license. For reference, the version 4.43 is free software\n" 16 | " licensed under the GNU LGPL."; 17 | 18 | 19 | static const char *LZMA_UTILS_VERSION_STRING = PACKAGE_VERSION; 20 | 21 | static const char *LZMA_UTILS_COPYRIGHT_STRING = 22 | "Copyright (C) 2006 Lasse Collin"; 23 | 24 | static const char *LZMA_UTILS_COPYRIGHT_INFO = 25 | "This program comes with ABSOLUTELY NO WARRANTY.\n" 26 | "You may redistribute copies of this program\n" 27 | "under the terms of the GNU General Public License.\n" 28 | "For more information about these matters, see the file " 29 | "named COPYING.\n"; 30 | 31 | #endif /* ifndef LZMA_VERSION_H */ 32 | -------------------------------------------------------------------------------- /u-boot/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 GitHub
23 | 24 | -------------------------------------------------------------------------------- /u-boot/include/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2000-2006 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 __VERSION_H__ 25 | #define __VERSION_H__ 26 | 27 | #include "version_autogenerated.h" 28 | 29 | #endif /* __VERSION_H__ */ 30 | -------------------------------------------------------------------------------- /host_util/lzma/Common/C_FileIO.h: -------------------------------------------------------------------------------- 1 | // Common/C_FileIO.h 2 | 3 | #ifndef __COMMON_C_FILEIO_H 4 | #define __COMMON_C_FILEIO_H 5 | 6 | #include 7 | #include 8 | 9 | #include "Types.h" 10 | #include "MyWindows.h" 11 | 12 | namespace NC { 13 | namespace NFile { 14 | namespace NIO { 15 | 16 | class CFileBase 17 | { 18 | protected: 19 | int _handle; 20 | bool OpenBinary(const char *name, int flags); 21 | public: 22 | CFileBase(): _handle(-1) {}; 23 | ~CFileBase() { Close(); } 24 | bool Close(); 25 | bool GetLength(UInt64 &length) const; 26 | off_t Seek(off_t distanceToMove, int moveMethod) const; 27 | int GetHandle() const { return _handle; } 28 | }; 29 | 30 | class CInFile: public CFileBase 31 | { 32 | public: 33 | bool Open(const char *name); 34 | bool OpenShared(const char *name, bool shareForWrite); 35 | ssize_t Read(void *data, size_t size); 36 | }; 37 | 38 | class COutFile: public CFileBase 39 | { 40 | public: 41 | bool Create(const char *name, bool createAlways); 42 | bool Open(const char *name, DWORD creationDisposition); 43 | ssize_t Write(const void *data, size_t size); 44 | }; 45 | 46 | }}} 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/SE/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 |
This code is based on GitHub
24 | 25 | -------------------------------------------------------------------------------- /u-boot/include/soc/soc_list.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Piotr Dymacz 3 | * 4 | * SPDX-License-Identifier: GPL-2.0 5 | */ 6 | 7 | #ifndef _SOC_LIST_H_ 8 | #define _SOC_LIST_H_ 9 | 10 | /* AR933x */ 11 | #define QCA_AR9330_SOC 0x00000001 12 | #define QCA_AR9331_SOC 0x00000002 13 | #define QCA_AR933X_SOC (QCA_AR9330_SOC |\ 14 | QCA_AR9331_SOC) 15 | 16 | /* AR934x */ 17 | #define QCA_AR9341_SOC 0x00000010 18 | #define QCA_AR9342_SOC 0x00000020 19 | #define QCA_AR9344_SOC 0x00000040 20 | #define QCA_AR934X_SOC (QCA_AR9341_SOC |\ 21 | QCA_AR9342_SOC |\ 22 | QCA_AR9344_SOC) 23 | 24 | /* QCA953x */ 25 | #define QCA_QCA9531_SOC 0x00000100 26 | #define QCA_QCA9533_SOC 0x00000200 27 | #define QCA_QCA953X_SOC (QCA_QCA9531_SOC |\ 28 | QCA_QCA9533_SOC) 29 | 30 | /* QCA956x */ 31 | #define QCA_QCA9561_SOC 0x00001000 32 | #define QCA_QCA9563_SOC 0x00002000 33 | #define QCA_QCA956X_SOC (QCA_QCA9561_SOC |\ 34 | QCA_QCA9563_SOC) 35 | 36 | /* QCA955x */ 37 | #define QCA_QCA9557_SOC 0x00010000 38 | #define QCA_QCA9558_SOC 0x00020000 39 | #define QCA_QCA955X_SOC (QCA_QCA9557_SOC |\ 40 | QCA_QCA9558_SOC) 41 | 42 | #endif /* _SOC_LIST_H_ */ 43 | -------------------------------------------------------------------------------- /u-boot/lib_mips/time.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Piotr Dymacz 3 | * Copyright (C) 2003 Wolfgang Denk, DENX Software Engineering, 4 | * 5 | * SPDX-License-Identifier:GPL-2.0 6 | */ 7 | 8 | #include 9 | 10 | DECLARE_GLOBAL_DATA_PTR; 11 | 12 | static inline void mips_compare_set(u32 v) 13 | { 14 | asm volatile ("mtc0 %0, $11" : : "r" (v)); 15 | } 16 | 17 | static inline void mips_count_set(u32 v) 18 | { 19 | asm volatile ("mtc0 %0, $9" : : "r" (v)); 20 | } 21 | 22 | static inline u32 mips_count_get(void) 23 | { 24 | u32 count; 25 | 26 | asm volatile ("mfc0 %0, $9" : "=r" (count) :); 27 | 28 | return count; 29 | } 30 | 31 | /* 32 | * Timer without interrupts 33 | */ 34 | int timer_init(void) 35 | { 36 | mips_compare_set(0); 37 | mips_count_set(0); 38 | 39 | return 0; 40 | } 41 | 42 | ulong get_timer(ulong base) 43 | { 44 | return mips_count_get() - base; 45 | } 46 | 47 | void udelay(unsigned long usec) 48 | { 49 | ulong tmo; 50 | ulong start = get_timer(0); 51 | bd_t *bd = gd->bd; 52 | 53 | tmo = usec * (CFG_HZ / 1000000); 54 | 55 | while ((ulong)((mips_count_get() - start)) < tmo) 56 | /* NOP */; 57 | } 58 | -------------------------------------------------------------------------------- /u-boot/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 | } -------------------------------------------------------------------------------- /u-boot/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 GitHub
24 | 25 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/villagetelco/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Firmware update 6 | 7 | 8 | 9 | 10 |
11 |
12 |

Firmware update

13 |

You are going to upload new firmware to the device.
Choose a proper file from your local hard drive and click "Update firmware" button.
Please, do not power off the device during update, if everything goes well, the device will restart.

14 |
15 |

For more technical information, please consult
the Village Telco wiki or join the Village Telco development community. 16 |

17 |
You can find more information about this project on GitHub
18 | 19 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /host_util/lzma/Exception.h: -------------------------------------------------------------------------------- 1 | /* A couple of exceptions for lzmp. 2 | * 3 | * Copyright (C) 2005 Ville Koskinen 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License 7 | * as published by the Free Software Foundation; either version 2 8 | * of the License, or (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 | 16 | #ifndef _EXCEPTION_H_ 17 | #define _EXCEPTION_H_ 18 | 19 | #include 20 | using std::string; 21 | 22 | class Exception 23 | { 24 | private: 25 | string message; 26 | public: 27 | Exception(char *what): message(what) { } 28 | Exception(string what): message(what) { } 29 | 30 | ~Exception() { } 31 | 32 | string what(void) { return message; } 33 | }; 34 | 35 | class ArgumentException: public Exception 36 | { 37 | public: 38 | ArgumentException(char *what): Exception(what) { } 39 | ArgumentException(string what): Exception(what) { } 40 | 41 | ~ArgumentException() { } 42 | }; 43 | 44 | #endif 45 | 46 | -------------------------------------------------------------------------------- /u-boot/include/exports.h: -------------------------------------------------------------------------------- 1 | #ifndef __EXPORTS_H__ 2 | #define __EXPORTS_H__ 3 | 4 | #ifndef __ASSEMBLY__ 5 | #include 6 | 7 | /* 8 | * These are declarations of exported 9 | * functions available in C code 10 | */ 11 | unsigned long get_timer(unsigned long); 12 | unsigned long get_version(void); 13 | 14 | void app_startup(char **); 15 | void do_reset(void); 16 | void free(void*); 17 | void free_hdlr(int); 18 | void install_hdlr(int, interrupt_handler_t*, void*); 19 | void printf(const char* fmt, ...); 20 | void putc(const char); 21 | void puts(const char*); 22 | void udelay(unsigned long); 23 | void *malloc(size_t); 24 | 25 | int getc(void); 26 | int tstc(void); 27 | #endif /* ifndef __ASSEMBLY__ */ 28 | 29 | enum { 30 | #define EXPORT_FUNC(x) XF_ ## x , 31 | EXPORT_FUNC(get_version) 32 | EXPORT_FUNC(getc) 33 | EXPORT_FUNC(tstc) 34 | EXPORT_FUNC(putc) 35 | EXPORT_FUNC(puts) 36 | EXPORT_FUNC(printf) 37 | EXPORT_FUNC(install_hdlr) 38 | EXPORT_FUNC(free_hdlr) 39 | EXPORT_FUNC(malloc) 40 | EXPORT_FUNC(free) 41 | EXPORT_FUNC(udelay) 42 | EXPORT_FUNC(get_timer) 43 | EXPORT_FUNC(do_reset) 44 | #undef EXPORT_FUNC 45 | XF_MAX 46 | }; 47 | 48 | #define XF_VERSION 2 49 | 50 | #if defined(CONFIG_I386) 51 | extern gd_t *global_data; 52 | #endif 53 | 54 | #endif /* __EXPORTS_H__ */ 55 | -------------------------------------------------------------------------------- /host_util/lzma/Common/MyGuidDef.h: -------------------------------------------------------------------------------- 1 | // Common/MyGuidDef.h 2 | 3 | #ifndef GUID_DEFINED 4 | #define GUID_DEFINED 5 | 6 | #include "Types.h" 7 | 8 | typedef struct { 9 | UInt32 Data1; 10 | UInt16 Data2; 11 | UInt16 Data3; 12 | unsigned char Data4[8]; 13 | } GUID; 14 | 15 | #ifdef __cplusplus 16 | #define REFGUID const GUID & 17 | #else 18 | #define REFGUID const GUID * 19 | #endif 20 | 21 | #define REFCLSID REFGUID 22 | #define REFIID REFGUID 23 | 24 | #ifdef __cplusplus 25 | inline int operator==(REFGUID g1, REFGUID g2) 26 | { 27 | for (int i = 0; i < (int)sizeof(g1); i++) 28 | if (((unsigned char *)&g1)[i] != ((unsigned char *)&g2)[i]) 29 | return 0; 30 | return 1; 31 | } 32 | inline int operator!=(REFGUID g1, REFGUID g2) { return !(g1 == g2); } 33 | #endif 34 | 35 | #ifdef __cplusplus 36 | #define MY_EXTERN_C extern "C" 37 | #else 38 | #define MY_EXTERN_C extern 39 | #endif 40 | 41 | #endif // GUID_DEFINED 42 | 43 | 44 | #ifdef DEFINE_GUID 45 | #undef DEFINE_GUID 46 | #endif 47 | 48 | #ifdef INITGUID 49 | #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ 50 | MY_EXTERN_C const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } 51 | #else 52 | #define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ 53 | MY_EXTERN_C const GUID name 54 | #endif 55 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/oem/flashing.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update in progress 6 | 9 | 10 | 11 |
12 |

Update in progress

13 |

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.

14 |
15 |
16 | 17 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /u-boot/include/tinf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * tinf - tiny inflate library (inflate, gzip, zlib) 3 | * 4 | * version 1.00 5 | * 6 | * Copyright (c) 2003 by Joergen Ibsen / Jibz 7 | * All Rights Reserved 8 | * 9 | * http://www.ibsensoftware.com/ 10 | */ 11 | 12 | #ifndef TINF_H_INCLUDED 13 | #define TINF_H_INCLUDED 14 | 15 | /* calling convention */ 16 | #ifndef TINFCC 17 | #ifdef __WATCOMC__ 18 | #define TINFCC __cdecl 19 | #else 20 | #define TINFCC 21 | #endif 22 | #endif 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | #define TINF_OK 0 29 | #define TINF_DATA_ERROR (-3) 30 | 31 | /* function prototypes */ 32 | 33 | void TINFCC tinf_init(void); 34 | 35 | int TINFCC tinf_uncompress(void *dest, unsigned int *destLen, 36 | const void *source, unsigned int sourceLen); 37 | 38 | int TINFCC tinf_gzip_uncompress(void *dest, unsigned int *destLen, 39 | const void *source, unsigned int sourceLen); 40 | 41 | int TINFCC tinf_zlib_uncompress(void *dest, unsigned int *destLen, 42 | const void *source, unsigned int sourceLen); 43 | 44 | unsigned int TINFCC tinf_adler32(const void *data, unsigned int length); 45 | 46 | unsigned int TINFCC tinf_crc32(const void *data, unsigned int length); 47 | 48 | #ifdef __cplusplus 49 | } /* extern "C" */ 50 | #endif 51 | 52 | #endif /* TINF_H_INCLUDED */ 53 | -------------------------------------------------------------------------------- /u-boot/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 | LIB = libdrivers.a 27 | 28 | OBJS = netconsole.o 29 | 30 | all: $(LIB) 31 | 32 | $(LIB): $(OBJS) 33 | $(AR) crv $@ $(OBJS) 34 | 35 | ######################################################################### 36 | 37 | .depend: Makefile $(OBJS:.o=.c) 38 | $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@ 39 | 40 | sinclude .depend 41 | 42 | ######################################################################### 43 | -------------------------------------------------------------------------------- /u-boot/include/LzmaWrapper.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | ** 3 | ** FILE NAME : LzmaWrapper.h 4 | ** PROJECT : bootloader 5 | ** MODULES : U-boot 6 | ** 7 | ** DATE : 2 Nov 2006 8 | ** AUTHOR : Lin Mars 9 | ** DESCRIPTION : LZMA decoder support for U-boot 1.1.5 10 | ** COPYRIGHT : Copyright (c) 2006 11 | ** Infineon Technologies AG 12 | ** Am Campeon 1-12, 85579 Neubiberg, Germany 13 | ** 14 | ** This program is free software; you can redistribute it and/or modify 15 | ** it under the terms of the GNU General Public License as published by 16 | ** the Free Software Foundation; either version 2 of the License, or 17 | ** (at your option) any later version. 18 | ** 19 | ** HISTORY 20 | ** $Date $Author $Comment 21 | ** 2 Nov 2006 Lin Mars init version which derived from LzmaTest.c from 22 | ** LZMA v4.43 SDK 23 | *******************************************************************************/ 24 | #ifndef __LZMA_WRAPPER_H__ 25 | #define __LZMA_WRAPPER_H__ 26 | 27 | #ifndef LZMA_RESULT_OK 28 | #define LZMA_RESULT_OK 0 29 | #endif 30 | #ifndef LZMA_RESULT_DATA_ERROR 31 | #define LZMA_RESULT_DATA_ERROR 1 32 | #endif 33 | 34 | extern int lzma_inflate(unsigned char *source, int s_len, unsigned char *dest, int *d_len); 35 | 36 | #endif /*__LZMA_WRAPPER_H__*/ 37 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /u-boot/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 | LIB = libnet.a 27 | 28 | OBJS = net.o tftp.o rarp.o eth.o bootp.o sntp.o httpd.o 29 | 30 | all: $(LIB) 31 | 32 | $(LIB): $(START) $(OBJS) 33 | $(AR) crv $@ $(OBJS) 34 | 35 | ######################################################################### 36 | 37 | .depend: Makefile $(OBJS:.o=.c) 38 | $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@ 39 | 40 | sinclude .depend 41 | 42 | ######################################################################### 43 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /u-boot/cpu/mips/cpu.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015 Piotr Dymacz 3 | * Copyright (C) 2003 Wolfgang Denk, DENX Software Engineering, 4 | * 5 | * SPDX-License-Identifier:GPL-2.0 6 | */ 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | extern void dcache_flush_range(u32 a, u32 end); 13 | 14 | int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) 15 | { 16 | printf("Resetting the board..."); 17 | milisecdelay(500); 18 | 19 | full_reset(); 20 | 21 | /* After full chip reset we should not reach next step... */ 22 | puts("\n"); 23 | printf_err("RESET FAILED!\n"); 24 | 25 | return 0; 26 | } 27 | 28 | void flush_cache(ulong start_addr, ulong size) 29 | { 30 | u32 end, a; 31 | 32 | a = start_addr & ~(CFG_CACHELINE_SIZE - 1); 33 | size = (size + CFG_CACHELINE_SIZE - 1) & ~(CFG_CACHELINE_SIZE - 1); 34 | end = a + size; 35 | 36 | dcache_flush_range(a, end); 37 | } 38 | 39 | /* 40 | * Read CPU type and put its name into buffer 41 | * For now only 24/74Kc are supported as all 42 | * supported SOCs are based on one of them 43 | */ 44 | void cpu_name(char *name) 45 | { 46 | u32 cpu_id = read_c0_prid(); 47 | 48 | if (name == NULL) 49 | return; 50 | 51 | switch (cpu_id & PRID_IMP_MASK) { 52 | case PRID_IMP_24K: 53 | sprintf(name, "MIPS 24Kc"); 54 | break; 55 | case PRID_IMP_74K: 56 | sprintf(name, "MIPS 74Kc"); 57 | break; 58 | default: 59 | sprintf(name, "MIPS Unknown"); 60 | break; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /u-boot/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 | OBJS = crc32.o \ 28 | ctype.o \ 29 | display_options.o \ 30 | string.o \ 31 | LzmaDecode.o \ 32 | LzmaWrapper.o \ 33 | vsprintf.o 34 | 35 | CFLAGS += -DCONFIG_LZMA=1 36 | 37 | $(LIB): .depend $(OBJS) 38 | $(AR) crv $@ $(OBJS) 39 | 40 | ######################################################################### 41 | 42 | .depend: Makefile $(OBJS:.o=.c) 43 | $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@ 44 | 45 | sinclude .depend 46 | 47 | ######################################################################### 48 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /u-boot/lib_bootstrap/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 = libbootstrap.a 27 | 28 | OBJS = bootstrap_board.o LzmaDecode.o string.o LzmaWrapper.o 29 | 30 | CFLAGS += -DCONFIG_LZMA=1 31 | 32 | all: .depend $(LIB) 33 | 34 | $(LIB): $(OBJS) 35 | $(AR) crv $@ $(OBJS) 36 | 37 | ######################################################################### 38 | 39 | .depend: Makefile $(OBJS:.o=.c) 40 | #echo "make libbootstrap.a with HEAD_SIZE $(HEAD_SIZE)" 41 | $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@ 42 | 43 | sinclude .depend 44 | 45 | ######################################################################### 46 | -------------------------------------------------------------------------------- /host_util/lzma/OutBuffer.h: -------------------------------------------------------------------------------- 1 | // OutBuffer.h 2 | 3 | #ifndef __OUTBUFFER_H 4 | #define __OUTBUFFER_H 5 | 6 | #include "IStream.h" 7 | #include "Common/MyCom.h" 8 | #include "Common/MyException.h" 9 | 10 | #ifndef _NO_EXCEPTIONS 11 | struct COutBufferException: public CSystemException 12 | { 13 | COutBufferException(HRESULT errorCode): CSystemException(errorCode) {} 14 | }; 15 | #endif 16 | 17 | class COutBuffer 18 | { 19 | protected: 20 | Byte *_buffer; 21 | UInt32 _pos; 22 | UInt32 _limitPos; 23 | UInt32 _streamPos; 24 | UInt32 _bufferSize; 25 | CMyComPtr _stream; 26 | UInt64 _processedSize; 27 | Byte *_buffer2; 28 | bool _overDict; 29 | 30 | HRESULT FlushPart(); 31 | public: 32 | #ifdef _NO_EXCEPTIONS 33 | HRESULT ErrorCode; 34 | #endif 35 | 36 | COutBuffer(): _buffer(0), _pos(0), _stream(0), _buffer2(0) {} 37 | ~COutBuffer() { Free(); } 38 | 39 | bool Create(UInt32 bufferSize); 40 | void Free(); 41 | 42 | void SetMemStream(Byte *buffer) { _buffer2 = buffer; } 43 | void SetStream(ISequentialOutStream *stream); 44 | void Init(); 45 | HRESULT Flush(); 46 | void FlushWithCheck(); 47 | void ReleaseStream() { _stream.Release(); } 48 | 49 | void WriteByte(Byte b) 50 | { 51 | _buffer[_pos++] = b; 52 | if(_pos == _limitPos) 53 | FlushWithCheck(); 54 | } 55 | void WriteBytes(const void *data, size_t size) 56 | { 57 | for (size_t i = 0; i < size; i++) 58 | WriteByte(((const Byte *)data)[i]); 59 | } 60 | 61 | UInt64 GetProcessedSize() const; 62 | }; 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /u-boot/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 | cd ./include 25 | 26 | # 27 | # Create link to architecture specific headers 28 | # 29 | rm -f asm 30 | ln -s asm-$2 asm 31 | rm -f asm-$2/arch 32 | 33 | if [ -z "$6" -o "$6" = "NULL" ] ; then 34 | ln -s arch-$3 asm-$2/arch 35 | else 36 | ln -s arch-$6 asm-$2/arch 37 | fi 38 | 39 | if [ "$2" = "arm" ] ; then 40 | rm -f asm-$2/proc 41 | ln -s proc-armv asm-$2/proc 42 | fi 43 | 44 | # 45 | # Create include file for Make 46 | # 47 | echo "ARCH = $2" > config.mk 48 | echo "CPU = $3" >> config.mk 49 | echo "BOARD = $4" >> config.mk 50 | 51 | [ "$5" ] && [ "$5" != "NULL" ] && echo "VENDOR = $5" >> config.mk 52 | 53 | [ "$6" ] && [ "$6" != "NULL" ] && echo "SOC = $6" >> config.mk 54 | 55 | # 56 | # Create board specific header file 57 | # 58 | if [ "$APPEND" = "yes" ] # Append to existing config file 59 | then 60 | echo >> config.h 61 | else 62 | > config.h # Create new config file 63 | fi 64 | echo "/* Automatically generated - do not edit */" >>config.h 65 | echo "#include " >>config.h 66 | 67 | exit 0 68 | -------------------------------------------------------------------------------- /host_util/lzma/LzmaEncoder.h: -------------------------------------------------------------------------------- 1 | // LzmaEncoder.h 2 | 3 | #ifndef __LZMA_ENCODER_H 4 | #define __LZMA_ENCODER_H 5 | 6 | extern "C" 7 | { 8 | #include "C/LzmaEnc.h" 9 | } 10 | 11 | #include "Common/MyCom.h" 12 | 13 | #include "ICoder.h" 14 | 15 | namespace NCompress { 16 | namespace NLzma { 17 | 18 | struct CSeqInStream 19 | { 20 | ISeqInStream SeqInStream; 21 | ISequentialInStream *RealStream; 22 | }; 23 | 24 | struct CSeqOutStream 25 | { 26 | ISeqOutStream SeqOutStream; 27 | CMyComPtr RealStream; 28 | HRESULT Res; 29 | }; 30 | 31 | class CEncoder : 32 | public ICompressCoder, 33 | public ICompressSetOutStream, 34 | public ICompressSetCoderProperties, 35 | public ICompressWriteCoderProperties, 36 | public CMyUnknownImp 37 | { 38 | CLzmaEncHandle _encoder; 39 | 40 | CSeqInStream _seqInStream; 41 | CSeqOutStream _seqOutStream; 42 | 43 | public: 44 | CEncoder(); 45 | 46 | MY_UNKNOWN_IMP3( 47 | ICompressSetOutStream, 48 | ICompressSetCoderProperties, 49 | ICompressWriteCoderProperties 50 | ) 51 | 52 | STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, 53 | const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); 54 | STDMETHOD(SetCoderProperties)(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps); 55 | STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStream); 56 | STDMETHOD(SetOutStream)(ISequentialOutStream *outStream); 57 | STDMETHOD(ReleaseOutStream)(); 58 | 59 | virtual ~CEncoder(); 60 | }; 61 | 62 | }} 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/SE/flashing.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update in progress 6 | 9 | 10 | 11 |
12 |

Update in progress

13 |

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.

14 |
15 |
16 |
This code is based on GitHub
17 | 18 | -------------------------------------------------------------------------------- /u-boot/cpu/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$(CPU).a 27 | 28 | ifeq ($(COMRESSED_UBOOT),1) 29 | START = start.o start_bootstrap.o 30 | else 31 | START = start.o 32 | endif 33 | 34 | OBJS = cpu.o 35 | SOBJS = cache.o 36 | 37 | all: .depend $(START) $(LIB) 38 | 39 | $(LIB): $(OBJS) $(SOBJS) 40 | $(AR) crv $@ $(OBJS) $(SOBJS) 41 | 42 | ######################################################################### 43 | 44 | .depend: Makefile $(START:.o=.S) $(OBJS:.o=.c) 45 | $(CC) -M $(CFLAGS) $(START:.o=.S) $(OBJS:.o=.c) > $@ 46 | 47 | sinclude .depend 48 | 49 | ######################################################################### 50 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/dragino/flashing.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update in progress 6 | 9 | 10 | 11 |
12 |

Update in progress

13 |

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.

14 |
15 |
16 |
You can find more information about this project on GitHub
17 | 18 | -------------------------------------------------------------------------------- /u-boot/httpd/vendors/villagetelco/flashing.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Update in progress 6 | 9 | 10 | 11 |
12 |

Update in progress

13 |

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.

14 |
15 |
16 |
You can find more information about this project on GitHub
17 | 18 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /u-boot/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 | /* 27 | * print sizes as "xxx kB", "xxx.y kB", "xxx MB" or "xxx.y MB" as needed; 28 | * allow for optional trailing string (like "\n") 29 | */ 30 | void print_size(ulong size, const char *s){ 31 | ulong m, n; 32 | ulong d = 1 << 20; /* 1 MB */ 33 | char c = 'M'; 34 | 35 | if (size < d) { /* print in kB */ 36 | c = 'k'; 37 | d = 1 << 10; 38 | } 39 | 40 | n = size / d; 41 | 42 | m = (10 * (size - (n * d)) + (d / 2) ) / d; 43 | 44 | if (m >= 10) { 45 | m -= 10; 46 | n += 1; 47 | } 48 | 49 | printf ("%ld", n); 50 | if (m) { 51 | printf (".%ld", m); 52 | } 53 | printf (" %cB%s", c, s); 54 | } 55 | -------------------------------------------------------------------------------- /u-boot/net/sntp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Masami Komiya 2005 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2, or (at 7 | * your option) any later version. 8 | */ 9 | 10 | #ifndef __SNTP_H__ 11 | #define __SNTP_H__ 12 | 13 | #define NTP_SERVICE_PORT 123 14 | #define SNTP_PACKET_LEN 48 15 | 16 | 17 | /* Leap Indicator */ 18 | #define NTP_LI_NOLEAP 0x0 19 | #define NTP_LI_61SECS 0x1 20 | #define NTP_LI_59SECS 0x2 21 | #define NTP_LI_ALARM 0x3 22 | 23 | /* Version */ 24 | 25 | #define NTP_VERSION 4 26 | 27 | /* Mode */ 28 | #define NTP_MODE_RESERVED 0 29 | #define NTP_MODE_SYMACTIVE 1 /* Symmetric Active */ 30 | #define NTP_MODE_SYMPASSIVE 2 /* Symmetric Passive */ 31 | #define NTP_MODE_CLIENT 3 32 | #define NTP_MODE_SERVER 4 33 | #define NTP_MODE_BROADCAST 5 34 | #define NTP_MODE_NTPCTRL 6 /* Reserved for NTP control message */ 35 | #define NTP_MODE_PRIVATE 7 /* Reserved for private use */ 36 | 37 | struct sntp_pkt_t { 38 | #if __LITTLE_ENDIAN 39 | uchar mode:3; 40 | uchar vn:3; 41 | uchar li:2; 42 | #else 43 | uchar li:2; 44 | uchar vn:3; 45 | uchar mode:3; 46 | #endif 47 | uchar stratum; 48 | uchar poll; 49 | uchar precision; 50 | uint root_delay; 51 | uint root_dispersion; 52 | uint reference_id; 53 | unsigned long long reference_timestamp; 54 | unsigned long long originate_timestamp; 55 | unsigned long long receive_timestamp; 56 | unsigned long long transmit_timestamp; 57 | }; 58 | 59 | extern void SntpStart (void); /* Begin SNTP */ 60 | 61 | #endif /* __SNTP_H__ */ 62 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE! Don't add files that are generated in specific 3 | # subdirectories here. Add them in the ".gitignore" file 4 | # in that subdirectory instead. 5 | # 6 | # Normal rules 7 | # 8 | .* 9 | *.o 10 | *.o.* 11 | *.a 12 | *.s 13 | *.su 14 | *.mod.c 15 | *.i 16 | *.lst 17 | *.order 18 | *.elf 19 | *.swp 20 | *.bin 21 | *.patch 22 | *.cfgtmp 23 | 24 | # host programs on Cygwin 25 | *.exe 26 | 27 | # lzma host util 28 | host_util/lzma/lzma 29 | 30 | # 31 | # Top-level generic files 32 | # 33 | /u-boot/System.map 34 | /u-boot/u-boot* 35 | /u-boot/bootstrap 36 | /u-boot/bootstrap.map 37 | 38 | # MD5 in bin 39 | /bin/*.md5 40 | 41 | # Symbolic links and some compilation results from tools 42 | /u-boot/tools/crc32.c 43 | /u-boot/tools/environment.c 44 | /u-boot/tools/envcrc 45 | /u-boot/tools/mkimage 46 | 47 | # Auto generated fsdata.c 48 | /u-boot/httpd/fsdata.c 49 | 50 | # Generated include files 51 | /u-boot/include/asm 52 | /u-boot/include/config.h 53 | /u-boot/include/config.mk 54 | /u-boot/include/version_autogenerated.h 55 | # TODO: broken symbolic link 56 | /u-boot/include/asm-*/arch 57 | 58 | # Do not ignore original u-boot images 59 | !/original_u-boot_images/*.bin 60 | 61 | # 62 | # git files that we don't want to ignore even it they are dot-files 63 | # 64 | !.gitignore 65 | !.mailmap 66 | 67 | # stgit generated dirs 68 | patches-* 69 | .stgit-edit.txt 70 | 71 | # quilt's files 72 | patches 73 | series 74 | 75 | # gdb files 76 | .gdb_history 77 | 78 | # cscope files 79 | cscope.* 80 | 81 | # tags files 82 | /tags 83 | /ctags 84 | /etags 85 | 86 | # gnu global files 87 | GPATH 88 | GRTAGS 89 | GSYMS 90 | GTAGS 91 | 92 | *.orig 93 | *~ 94 | \#*# 95 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /u-boot/cpu/mips/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 | mips-openwrt-linux-uclibc-as --version|grep "GNU assembler"|awk '{print $$3}'|awk -F . '{print $$2}') 25 | 26 | v=22 27 | MIPSFLAGS=$(shell \ 28 | if [ "$v" -lt "14" ]; then \ 29 | echo "-mcpu=mips32"; \ 30 | else \ 31 | echo "-mips32 -march=mips32 -mtune=mips32"; \ 32 | fi) 33 | 34 | ifndef ENDIANNESS 35 | ifneq (,$(findstring 4KCle,$(CROSS_COMPILE))) 36 | ENDIANNESS = -EL 37 | else 38 | ENDIANNESS = -EB 39 | endif 40 | endif 41 | 42 | #PLATFORM_CPPFLAGS += -G 0 -mabicalls -fpic -g 43 | PLATFORM_CPPFLAGS += -G 0 -mabicalls -fpic 44 | PLATFORM_CPPFLAGS += -msoft-float 45 | PLATFORM_LDFLAGS += -G 0 -static -n -nostdlib 46 | MIPSFLAGS += $(ENDIANNESS) -fno-schedule-insns -fno-schedule-insns2 47 | 48 | PLATFORM_CPPFLAGS += $(MIPSFLAGS) 49 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /host_util/lzma/StreamUtils.cpp: -------------------------------------------------------------------------------- 1 | // StreamUtils.cpp 2 | 3 | #include "StdAfx.h" 4 | 5 | #include "StreamUtils.h" 6 | 7 | static const UInt32 kBlockSize = ((UInt32)1 << 31); 8 | 9 | HRESULT ReadStream(ISequentialInStream *stream, void *data, size_t *processedSize) 10 | { 11 | size_t size = *processedSize; 12 | *processedSize = 0; 13 | while (size != 0) 14 | { 15 | UInt32 curSize = (size < kBlockSize) ? (UInt32)size : kBlockSize; 16 | UInt32 processedSizeLoc; 17 | HRESULT res = stream->Read(data, curSize, &processedSizeLoc); 18 | *processedSize += processedSizeLoc; 19 | data = (void *)((Byte *)data + processedSizeLoc); 20 | size -= processedSizeLoc; 21 | RINOK(res); 22 | if (processedSizeLoc == 0) 23 | return S_OK; 24 | } 25 | return S_OK; 26 | } 27 | 28 | HRESULT ReadStream_FALSE(ISequentialInStream *stream, void *data, size_t size) 29 | { 30 | size_t processedSize = size; 31 | RINOK(ReadStream(stream, data, &processedSize)); 32 | return (size == processedSize) ? S_OK : S_FALSE; 33 | } 34 | 35 | HRESULT ReadStream_FAIL(ISequentialInStream *stream, void *data, size_t size) 36 | { 37 | size_t processedSize = size; 38 | RINOK(ReadStream(stream, data, &processedSize)); 39 | return (size == processedSize) ? S_OK : E_FAIL; 40 | } 41 | 42 | HRESULT WriteStream(ISequentialOutStream *stream, const void *data, size_t size) 43 | { 44 | while (size != 0) 45 | { 46 | UInt32 curSize = (size < kBlockSize) ? (UInt32)size : kBlockSize; 47 | UInt32 processedSizeLoc; 48 | HRESULT res = stream->Write(data, curSize, &processedSizeLoc); 49 | data = (const void *)((const Byte *)data + processedSizeLoc); 50 | size -= processedSizeLoc; 51 | RINOK(res); 52 | if (processedSizeLoc == 0) 53 | return E_FAIL; 54 | } 55 | return S_OK; 56 | } 57 | -------------------------------------------------------------------------------- /u-boot/board/ar7240/ap143/u-boot-bootstrap.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 | OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips") 25 | OUTPUT_ARCH(mips) 26 | ENTRY(_start_bootstrap) 27 | SECTIONS 28 | { 29 | . = 0x00000000; 30 | 31 | . = ALIGN(4); 32 | .text : 33 | { 34 | *(.text) 35 | } 36 | 37 | . = ALIGN(4); 38 | .rodata : { *(.rodata) } 39 | 40 | . = ALIGN(4); 41 | .data : { *(.data) } 42 | 43 | . = ALIGN(4); 44 | .sdata : { *(.sdata) } 45 | 46 | . = ALIGN(16); 47 | _gp = .; 48 | __got_start_bootstrap = .; 49 | .got : { *(.got) } 50 | __got_end_bootstrap = .; 51 | 52 | 53 | .sdata : { *(.sdata) } 54 | 55 | uboot_end_data_bootstrap = .; 56 | num_got_entries = (__got_end_bootstrap - __got_start_bootstrap) >> 2; 57 | 58 | . = ALIGN(4); 59 | .sbss : { *(.sbss) } 60 | .bss : { *(.bss) } 61 | uboot_end_bootstrap = .; 62 | } 63 | -------------------------------------------------------------------------------- /u-boot/board/ar7240/db12x/u-boot-bootstrap.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 | OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips") 25 | OUTPUT_ARCH(mips) 26 | ENTRY(_start_bootstrap) 27 | SECTIONS 28 | { 29 | . = 0x00000000; 30 | 31 | . = ALIGN(4); 32 | .text : 33 | { 34 | *(.text) 35 | } 36 | 37 | . = ALIGN(4); 38 | .rodata : { *(.rodata) } 39 | 40 | . = ALIGN(4); 41 | .data : { *(.data) } 42 | 43 | . = ALIGN(4); 44 | .sdata : { *(.sdata) } 45 | 46 | . = ALIGN(16); 47 | _gp = .; 48 | __got_start_bootstrap = .; 49 | .got : { *(.got) } 50 | __got_end_bootstrap = .; 51 | 52 | 53 | .sdata : { *(.sdata) } 54 | 55 | uboot_end_data_bootstrap = .; 56 | num_got_entries = (__got_end_bootstrap - __got_start_bootstrap) >> 2; 57 | 58 | . = ALIGN(4); 59 | .sbss : { *(.sbss) } 60 | .bss : { *(.bss) } 61 | uboot_end_bootstrap = .; 62 | } 63 | -------------------------------------------------------------------------------- /u-boot/board/ar7240/ap121/u-boot-bootstrap.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 | OUTPUT_FORMAT("elf32-tradbigmips", "elf32-tradbigmips", "elf32-tradbigmips") 25 | OUTPUT_ARCH(mips) 26 | ENTRY(_start_bootstrap) 27 | SECTIONS 28 | { 29 | . = 0x00000000; 30 | 31 | . = ALIGN(4); 32 | .text : 33 | { 34 | *(.text*) 35 | } 36 | 37 | . = ALIGN(4); 38 | .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) } 39 | 40 | . = ALIGN(4); 41 | .data : { *(.data*) } 42 | 43 | . = .; 44 | _gp = ALIGN(16); 45 | 46 | .got : { 47 | __got_start_bootstrap = .; 48 | *(.got) 49 | __got_end_bootstrap = .; 50 | } 51 | 52 | . = ALIGN(4); 53 | .sdata : { *(.sdata*) } 54 | 55 | uboot_end_data_bootstrap = .; 56 | num_got_entries = (__got_end_bootstrap - __got_start_bootstrap) >> 2; 57 | 58 | . = ALIGN(4); 59 | .sbss : { *(.sbss*) } 60 | .bss : { *(.bss*) . = ALIGN(4); } 61 | uboot_end_bootstrap = .; 62 | } 63 | -------------------------------------------------------------------------------- /host_util/lzma/IStream.h: -------------------------------------------------------------------------------- 1 | // IStream.h 2 | 3 | #ifndef __ISTREAM_H 4 | #define __ISTREAM_H 5 | 6 | #include "Common/MyUnknown.h" 7 | #include "Common/Types.h" 8 | 9 | #include "IDecl.h" 10 | 11 | #define STREAM_INTERFACE_SUB(i, base, x) DECL_INTERFACE_SUB(i, base, 3, x) 12 | #define STREAM_INTERFACE(i, x) STREAM_INTERFACE_SUB(i, IUnknown, x) 13 | 14 | STREAM_INTERFACE(ISequentialInStream, 0x01) 15 | { 16 | STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize) PURE; 17 | /* 18 | Out: if size != 0, return_value = S_OK and (*processedSize == 0), 19 | then there are no more bytes in stream. 20 | if (size > 0) && there are bytes in stream, 21 | this function must read at least 1 byte. 22 | This function is allowed to read less than number of remaining bytes in stream. 23 | You must call Read function in loop, if you need exact amount of data 24 | */ 25 | }; 26 | 27 | STREAM_INTERFACE(ISequentialOutStream, 0x02) 28 | { 29 | STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize) PURE; 30 | /* 31 | if (size > 0) this function must write at least 1 byte. 32 | This function is allowed to write less than "size". 33 | You must call Write function in loop, if you need to write exact amount of data 34 | */ 35 | }; 36 | 37 | STREAM_INTERFACE_SUB(IInStream, ISequentialInStream, 0x03) 38 | { 39 | STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) PURE; 40 | }; 41 | 42 | STREAM_INTERFACE_SUB(IOutStream, ISequentialOutStream, 0x04) 43 | { 44 | STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition) PURE; 45 | STDMETHOD(SetSize)(Int64 newSize) PURE; 46 | }; 47 | 48 | STREAM_INTERFACE(IStreamGetSize, 0x06) 49 | { 50 | STDMETHOD(GetSize)(UInt64 *size) PURE; 51 | }; 52 | 53 | STREAM_INTERFACE(IOutStreamFlush, 0x07) 54 | { 55 | STDMETHOD(Flush)() PURE; 56 | }; 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /u-boot/cpu/mips/ar7240/ag7240_phy.h: -------------------------------------------------------------------------------- 1 | #ifndef _AG7240_PHY_H 2 | #define _AG7240_PHY_H 3 | 4 | extern int athrs16_phy_is_up(int unit); 5 | extern int athrs16_phy_is_fdx(int unit); 6 | extern int athrs16_phy_speed(int unit); 7 | extern int athrs16_phy_setup(int unit); 8 | 9 | extern int athrs26_phy_is_up(int unit); 10 | extern int athrs26_phy_speed(int unit); 11 | extern int athrs26_phy_setup(int unit); 12 | extern int athrs26_phy_is_fdx(int unit); 13 | 14 | static inline void ag7240_phy_setup(int unit) { 15 | #ifdef CONFIG_AR7242_S16_PHY 16 | if ((is_ar7242() || is_wasp()) && (unit==0)) { 17 | athrs16_phy_setup(unit); 18 | } else 19 | #endif 20 | { 21 | athrs26_phy_setup(unit); 22 | #ifdef CONFIG_F1E_PHY 23 | athr_phy_setup(unit); 24 | #endif 25 | } 26 | } 27 | 28 | static inline void ag7240_phy_link(int unit, int *link) { 29 | #ifdef CONFIG_AR7242_S16_PHY 30 | if ((is_ar7242() || is_wasp()) && (unit==0)) { 31 | *link = athrs16_phy_is_up(unit); 32 | } else 33 | #endif 34 | { 35 | *link = athrs26_phy_is_up(unit); 36 | #ifdef CONFIG_F1E_PHY 37 | *link = athr_phy_is_up(unit); 38 | #endif 39 | } 40 | } 41 | 42 | static inline void ag7240_phy_duplex(int unit, int *duplex) { 43 | #ifdef CONFIG_AR7242_S16_PHY 44 | if ((is_ar7242() || is_wasp()) && (unit==0)) { 45 | *duplex = athrs16_phy_is_fdx(unit); 46 | } else 47 | #endif 48 | { 49 | *duplex = athrs26_phy_is_fdx(unit); 50 | #ifdef CONFIG_F1E_PHY 51 | *duplex = athr_phy_is_fdx(unit); 52 | #endif 53 | } 54 | } 55 | 56 | static inline void ag7240_phy_speed(int unit, int *speed) { 57 | #ifdef CONFIG_AR7242_S16_PHY 58 | if ((is_ar7242() || is_wasp()) && (unit==0)) { 59 | *speed = athrs16_phy_speed(unit); 60 | } else 61 | #endif 62 | { 63 | *speed = athrs26_phy_speed(unit); 64 | #ifdef CONFIG_F1E_PHY 65 | *speed = athr_phy_speed(unit); 66 | #endif 67 | } 68 | } 69 | 70 | #endif /*_AG7240_PHY_H*/ 71 | -------------------------------------------------------------------------------- /u-boot/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 GitHub
16 | 17 | -------------------------------------------------------------------------------- /host_util/lzma/InBuffer.cpp: -------------------------------------------------------------------------------- 1 | // InBuffer.cpp 2 | 3 | #include "StdAfx.h" 4 | 5 | #include "InBuffer.h" 6 | 7 | extern "C" 8 | { 9 | #include "C/Alloc.h" 10 | } 11 | 12 | CInBuffer::CInBuffer(): 13 | _buffer(0), 14 | _bufferLimit(0), 15 | _bufferBase(0), 16 | _stream(0), 17 | _bufferSize(0) 18 | {} 19 | 20 | bool CInBuffer::Create(UInt32 bufferSize) 21 | { 22 | const UInt32 kMinBlockSize = 1; 23 | if (bufferSize < kMinBlockSize) 24 | bufferSize = kMinBlockSize; 25 | if (_bufferBase != 0 && _bufferSize == bufferSize) 26 | return true; 27 | Free(); 28 | _bufferSize = bufferSize; 29 | _bufferBase = (Byte *)::MidAlloc(bufferSize); 30 | return (_bufferBase != 0); 31 | } 32 | 33 | void CInBuffer::Free() 34 | { 35 | ::MidFree(_bufferBase); 36 | _bufferBase = 0; 37 | } 38 | 39 | void CInBuffer::SetStream(ISequentialInStream *stream) 40 | { 41 | _stream = stream; 42 | } 43 | 44 | void CInBuffer::Init() 45 | { 46 | _processedSize = 0; 47 | _buffer = _bufferBase; 48 | _bufferLimit = _buffer; 49 | _wasFinished = false; 50 | #ifdef _NO_EXCEPTIONS 51 | ErrorCode = S_OK; 52 | #endif 53 | } 54 | 55 | bool CInBuffer::ReadBlock() 56 | { 57 | #ifdef _NO_EXCEPTIONS 58 | if (ErrorCode != S_OK) 59 | return false; 60 | #endif 61 | if (_wasFinished) 62 | return false; 63 | _processedSize += (_buffer - _bufferBase); 64 | UInt32 numProcessedBytes; 65 | HRESULT result = _stream->Read(_bufferBase, _bufferSize, &numProcessedBytes); 66 | #ifdef _NO_EXCEPTIONS 67 | ErrorCode = result; 68 | #else 69 | if (result != S_OK) 70 | throw CInBufferException(result); 71 | #endif 72 | _buffer = _bufferBase; 73 | _bufferLimit = _buffer + numProcessedBytes; 74 | _wasFinished = (numProcessedBytes == 0); 75 | return (!_wasFinished); 76 | } 77 | 78 | Byte CInBuffer::ReadBlock2() 79 | { 80 | if(!ReadBlock()) 81 | return 0xFF; 82 | return *_buffer++; 83 | } 84 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /u-boot/include/asm-mips/types.h: -------------------------------------------------------------------------------- 1 | /* $Id: //depot/sw/releases/Aquila_9.2.0_U5/boot/u-boot/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 | -------------------------------------------------------------------------------- /host_util/lzma/Common/StringToInt.cpp: -------------------------------------------------------------------------------- 1 | // Common/StringToInt.cpp 2 | 3 | #include "StdAfx.h" 4 | 5 | #include "StringToInt.h" 6 | 7 | UInt64 ConvertStringToUInt64(const char *s, const char **end) 8 | { 9 | UInt64 result = 0; 10 | for (;;) 11 | { 12 | char c = *s; 13 | if (c < '0' || c > '9') 14 | { 15 | if (end != NULL) 16 | *end = s; 17 | return result; 18 | } 19 | result *= 10; 20 | result += (c - '0'); 21 | s++; 22 | } 23 | } 24 | 25 | UInt64 ConvertOctStringToUInt64(const char *s, const char **end) 26 | { 27 | UInt64 result = 0; 28 | for (;;) 29 | { 30 | char c = *s; 31 | if (c < '0' || c > '7') 32 | { 33 | if (end != NULL) 34 | *end = s; 35 | return result; 36 | } 37 | result <<= 3; 38 | result += (c - '0'); 39 | s++; 40 | } 41 | } 42 | 43 | UInt64 ConvertHexStringToUInt64(const char *s, const char **end) 44 | { 45 | UInt64 result = 0; 46 | for (;;) 47 | { 48 | char c = *s; 49 | UInt32 v; 50 | if (c >= '0' && c <= '9') v = (c - '0'); 51 | else if (c >= 'A' && c <= 'F') v = 10 + (c - 'A'); 52 | else if (c >= 'a' && c <= 'f') v = 10 + (c - 'a'); 53 | else 54 | { 55 | if (end != NULL) 56 | *end = s; 57 | return result; 58 | } 59 | result <<= 4; 60 | result |= v; 61 | s++; 62 | } 63 | } 64 | 65 | 66 | UInt64 ConvertStringToUInt64(const wchar_t *s, const wchar_t **end) 67 | { 68 | UInt64 result = 0; 69 | for (;;) 70 | { 71 | wchar_t c = *s; 72 | if (c < '0' || c > '9') 73 | { 74 | if (end != NULL) 75 | *end = s; 76 | return result; 77 | } 78 | result *= 10; 79 | result += (c - '0'); 80 | s++; 81 | } 82 | } 83 | 84 | 85 | Int64 ConvertStringToInt64(const char *s, const char **end) 86 | { 87 | if (*s == '-') 88 | return -(Int64)ConvertStringToUInt64(s + 1, end); 89 | return ConvertStringToUInt64(s, end); 90 | } 91 | -------------------------------------------------------------------------------- /host_util/lzma/Common/C_FileIO.cpp: -------------------------------------------------------------------------------- 1 | // Common/C_FileIO.h 2 | 3 | #include "C_FileIO.h" 4 | 5 | #include 6 | #include 7 | 8 | namespace NC { 9 | namespace NFile { 10 | namespace NIO { 11 | 12 | bool CFileBase::OpenBinary(const char *name, int flags) 13 | { 14 | #ifdef O_BINARY 15 | flags |= O_BINARY; 16 | #endif 17 | Close(); 18 | _handle = ::open(name, flags, 0666); 19 | return _handle != -1; 20 | } 21 | 22 | bool CFileBase::Close() 23 | { 24 | if (_handle == -1) 25 | return true; 26 | if (close(_handle) != 0) 27 | return false; 28 | _handle = -1; 29 | return true; 30 | } 31 | 32 | bool CFileBase::GetLength(UInt64 &length) const 33 | { 34 | off_t curPos = Seek(0, SEEK_CUR); 35 | off_t lengthTemp = Seek(0, SEEK_END); 36 | Seek(curPos, SEEK_SET); 37 | length = (UInt64)lengthTemp; 38 | return true; 39 | } 40 | 41 | off_t CFileBase::Seek(off_t distanceToMove, int moveMethod) const 42 | { 43 | return ::lseek(_handle, distanceToMove, moveMethod); 44 | } 45 | 46 | ///////////////////////// 47 | // CInFile 48 | 49 | bool CInFile::Open(const char *name) 50 | { 51 | return CFileBase::OpenBinary(name, O_RDONLY); 52 | } 53 | 54 | bool CInFile::OpenShared(const char *name, bool) 55 | { 56 | return Open(name); 57 | } 58 | 59 | ssize_t CInFile::Read(void *data, size_t size) 60 | { 61 | return read(_handle, data, size); 62 | } 63 | 64 | ///////////////////////// 65 | // COutFile 66 | 67 | bool COutFile::Create(const char *name, bool createAlways) 68 | { 69 | if (createAlways) 70 | { 71 | Close(); 72 | _handle = ::creat(name, 0666); 73 | return _handle != -1; 74 | } 75 | return OpenBinary(name, O_CREAT | O_EXCL | O_WRONLY); 76 | } 77 | 78 | bool COutFile::Open(const char *name, DWORD creationDisposition) 79 | { 80 | return Create(name, false); 81 | } 82 | 83 | ssize_t COutFile::Write(const void *data, size_t size) 84 | { 85 | return write(_handle, data, size); 86 | } 87 | 88 | }}} 89 | -------------------------------------------------------------------------------- /u-boot/net/nfs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Masami Komiya 2004 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2, or (at 7 | * your option) any later version. 8 | */ 9 | 10 | #ifndef __NFS_H__ 11 | #define __NFS_H__ 12 | 13 | #define SUNRPC_PORT 111 14 | 15 | #define PROG_PORTMAP 100000 16 | #define PROG_NFS 100003 17 | #define PROG_MOUNT 100005 18 | 19 | #define MSG_CALL 0 20 | #define MSG_REPLY 1 21 | 22 | #define PORTMAP_GETPORT 3 23 | 24 | #define MOUNT_ADDENTRY 1 25 | #define MOUNT_UMOUNTALL 4 26 | 27 | #define NFS_LOOKUP 4 28 | #define NFS_READLINK 5 29 | #define NFS_READ 6 30 | 31 | #define NFS_FHSIZE 32 32 | 33 | #define NFSERR_PERM 1 34 | #define NFSERR_NOENT 2 35 | #define NFSERR_ACCES 13 36 | #define NFSERR_ISDIR 21 37 | #define NFSERR_INVAL 22 38 | 39 | /* Block size used for NFS read accesses. A RPC reply packet (including all 40 | * headers) must fit within a single Ethernet frame to avoid fragmentation. 41 | * Chosen to be a power of two, as most NFS servers are optimized for this. */ 42 | #define NFS_READ_SIZE 1024 43 | 44 | #define NFS_MAXLINKDEPTH 16 45 | 46 | struct rpc_t { 47 | union { 48 | uint8_t data[2048]; 49 | struct { 50 | uint32_t id; 51 | uint32_t type; 52 | uint32_t rpcvers; 53 | uint32_t prog; 54 | uint32_t vers; 55 | uint32_t proc; 56 | uint32_t data[1]; 57 | } call; 58 | struct { 59 | uint32_t id; 60 | uint32_t type; 61 | uint32_t rstatus; 62 | uint32_t verifier; 63 | uint32_t v2; 64 | uint32_t astatus; 65 | uint32_t data[19]; 66 | } reply; 67 | } u; 68 | }; 69 | extern void NfsStart (void); /* Begin NFS */ 70 | 71 | 72 | /**********************************************************************/ 73 | 74 | #endif /* __NFS_H__ */ 75 | -------------------------------------------------------------------------------- /host_util/lzma/InBuffer.h: -------------------------------------------------------------------------------- 1 | // InBuffer.h 2 | 3 | #ifndef __INBUFFER_H 4 | #define __INBUFFER_H 5 | 6 | #include "IStream.h" 7 | #include "Common/MyCom.h" 8 | #include "Common/MyException.h" 9 | 10 | #ifndef _NO_EXCEPTIONS 11 | struct CInBufferException: public CSystemException 12 | { 13 | CInBufferException(HRESULT errorCode): CSystemException(errorCode) {} 14 | }; 15 | #endif 16 | 17 | class CInBuffer 18 | { 19 | Byte *_buffer; 20 | Byte *_bufferLimit; 21 | Byte *_bufferBase; 22 | CMyComPtr _stream; 23 | UInt64 _processedSize; 24 | UInt32 _bufferSize; 25 | bool _wasFinished; 26 | 27 | bool ReadBlock(); 28 | Byte ReadBlock2(); 29 | 30 | public: 31 | #ifdef _NO_EXCEPTIONS 32 | HRESULT ErrorCode; 33 | #endif 34 | 35 | CInBuffer(); 36 | ~CInBuffer() { Free(); } 37 | 38 | bool Create(UInt32 bufferSize); 39 | void Free(); 40 | 41 | void SetStream(ISequentialInStream *stream); 42 | void Init(); 43 | void ReleaseStream() { _stream.Release(); } 44 | 45 | bool ReadByte(Byte &b) 46 | { 47 | if (_buffer >= _bufferLimit) 48 | if (!ReadBlock()) 49 | return false; 50 | b = *_buffer++; 51 | return true; 52 | } 53 | Byte ReadByte() 54 | { 55 | if (_buffer >= _bufferLimit) 56 | return ReadBlock2(); 57 | return *_buffer++; 58 | } 59 | UInt32 ReadBytes(Byte *buf, UInt32 size) 60 | { 61 | if ((UInt32)(_bufferLimit - _buffer) >= size) 62 | { 63 | for (UInt32 i = 0; i < size; i++) 64 | buf[i] = _buffer[i]; 65 | _buffer += size; 66 | return size; 67 | } 68 | for (UInt32 i = 0; i < size; i++) 69 | { 70 | if (_buffer >= _bufferLimit) 71 | if (!ReadBlock()) 72 | return i; 73 | buf[i] = *_buffer++; 74 | } 75 | return size; 76 | } 77 | UInt64 GetProcessedSize() const { return _processedSize + (_buffer - _bufferBase); } 78 | bool WasFinished() const { return _wasFinished; } 79 | }; 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /u-boot/common/env_nowhere.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2000-2002 3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 | * 5 | * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH 6 | * Andreas Heppel 7 | 8 | * See file CREDITS for list of people who contributed to this 9 | * project. 10 | * 11 | * This program is free software; you can redistribute it and/or 12 | * modify it under the terms of the GNU General Public License as 13 | * published by the Free Software Foundation; either version 2 of 14 | * the License, or (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program; if not, write to the Free Software 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 24 | * MA 02111-1307 USA 25 | */ 26 | 27 | #include 28 | 29 | #if defined(CFG_ENV_IS_NOWHERE) /* Environment is nowhere */ 30 | 31 | #include 32 | #include 33 | #include 34 | 35 | DECLARE_GLOBAL_DATA_PTR; 36 | 37 | env_t *env_ptr = NULL; 38 | 39 | extern uchar default_environment[]; 40 | extern int default_environment_size; 41 | 42 | void env_relocate_spec(void){ 43 | } 44 | 45 | uchar env_get_char_spec(int index){ 46 | return(*((uchar *) (gd->env_addr + index))); 47 | } 48 | 49 | /************************************************************************ 50 | * Initialize Environment use 51 | * 52 | * We are still running from ROM, so data use is limited 53 | */ 54 | int env_init(void){ 55 | gd->env_addr = (ulong)&default_environment[0]; 56 | gd->env_valid = 0; 57 | 58 | return(0); 59 | } 60 | 61 | #endif /* CFG_ENV_IS_NOWHERE) */ 62 | -------------------------------------------------------------------------------- /host_util/lzma/LzmaDecoder.h: -------------------------------------------------------------------------------- 1 | // LzmaDecoder.h 2 | 3 | #ifndef __LZMA_DECODER_H 4 | #define __LZMA_DECODER_H 5 | 6 | extern "C" 7 | { 8 | #include "C/LzmaDec.h" 9 | } 10 | 11 | #include "Common/MyCom.h" 12 | #include "ICoder.h" 13 | 14 | namespace NCompress { 15 | namespace NLzma { 16 | 17 | class CDecoder: 18 | public ICompressCoder, 19 | public ICompressSetDecoderProperties2, 20 | public ICompressGetInStreamProcessedSize, 21 | #ifndef NO_READ_FROM_CODER 22 | public ICompressSetInStream, 23 | public ICompressSetOutStreamSize, 24 | public ISequentialInStream, 25 | #endif 26 | public CMyUnknownImp 27 | { 28 | CMyComPtr _inStream; 29 | Byte *_inBuf; 30 | UInt32 _inPos; 31 | UInt32 _inSize; 32 | CLzmaDec _state; 33 | bool _outSizeDefined; 34 | UInt64 _outSize; 35 | UInt64 _inSizeProcessed; 36 | UInt64 _outSizeProcessed; 37 | public: 38 | 39 | #ifndef NO_READ_FROM_CODER 40 | MY_UNKNOWN_IMP5( 41 | ICompressSetDecoderProperties2, 42 | ICompressGetInStreamProcessedSize, 43 | ICompressSetInStream, 44 | ICompressSetOutStreamSize, 45 | ISequentialInStream) 46 | #else 47 | MY_UNKNOWN_IMP2( 48 | ICompressSetDecoderProperties2, 49 | ICompressGetInStreamProcessedSize) 50 | #endif 51 | 52 | STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, 53 | const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); 54 | STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size); 55 | STDMETHOD(GetInStreamProcessedSize)(UInt64 *value); 56 | STDMETHOD(SetInStream)(ISequentialInStream *inStream); 57 | STDMETHOD(ReleaseInStream)(); 58 | STDMETHOD(SetOutStreamSize)(const UInt64 *outSize); 59 | 60 | #ifndef NO_READ_FROM_CODER 61 | STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize); 62 | #endif 63 | 64 | bool FinishStream; 65 | 66 | CDecoder(); 67 | virtual ~CDecoder(); 68 | 69 | }; 70 | 71 | }} 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /host_util/lzma/makefile.gcc: -------------------------------------------------------------------------------- 1 | PROG = lzma 2 | CXX = g++ -O2 -Wall -Wno-write-strings -Wno-unused-variable -Wno-unused-but-set-variable 3 | CXX_C = gcc -O2 -Wall -Wno-write-strings -Wno-unused-variable -Wno-unused-but-set-variable 4 | LIB = -lm 5 | RM = rm -f 6 | CFLAGS = -c -I ../../ -D_FILE_OFFSET_BITS=64 -DPACKAGE_VERSION="\"4.32.0beta3\"" 7 | 8 | OBJS = \ 9 | C_FileIO.o \ 10 | CRC.o \ 11 | Alloc.o \ 12 | FileStreams.o \ 13 | StreamUtils.o \ 14 | InBuffer.o \ 15 | OutBuffer.o \ 16 | LzmaDecoder.o \ 17 | StringConvert.o \ 18 | StringToInt.o \ 19 | LzmaEncoder.o \ 20 | LzmaDec.o \ 21 | LzmaEnc.o \ 22 | LzFind.o \ 23 | 7zCrc.o \ 24 | lzmp.o 25 | 26 | all: $(PROG) 27 | 28 | $(PROG): $(OBJS) 29 | $(CXX) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIB) 30 | 31 | lzmp.o: lzmp.cpp 32 | $(CXX) $(CFLAGS) lzmp.cpp 33 | 34 | LzmaDecoder.o: LzmaDecoder.cpp 35 | $(CXX) $(CFLAGS) LzmaDecoder.cpp 36 | 37 | LzmaEncoder.o: LzmaEncoder.cpp 38 | $(CXX) $(CFLAGS) LzmaEncoder.cpp 39 | 40 | InBuffer.o: InBuffer.cpp 41 | $(CXX) $(CFLAGS) InBuffer.cpp 42 | 43 | OutBuffer.o: OutBuffer.cpp 44 | $(CXX) $(CFLAGS) OutBuffer.cpp 45 | 46 | FileStreams.o: FileStreams.cpp 47 | $(CXX) $(CFLAGS) FileStreams.cpp 48 | 49 | StreamUtils.o: StreamUtils.cpp 50 | $(CXX) $(CFLAGS) StreamUtils.cpp 51 | 52 | C_FileIO.o: Common/C_FileIO.cpp 53 | $(CXX) $(CFLAGS) Common/C_FileIO.cpp 54 | 55 | CRC.o: Common/CRC.cpp 56 | $(CXX) $(CFLAGS) Common/CRC.cpp 57 | 58 | StringConvert.o: Common/StringConvert.cpp 59 | $(CXX) $(CFLAGS) Common/StringConvert.cpp 60 | 61 | StringToInt.o: Common/StringToInt.cpp 62 | $(CXX) $(CFLAGS) Common/StringToInt.cpp 63 | 64 | 7zCrc.o: C/7zCrc.c 65 | $(CXX_C) $(CFLAGS) C/7zCrc.c 66 | 67 | Alloc.o: C/Alloc.c 68 | $(CXX_C) $(CFLAGS) C/Alloc.c 69 | 70 | LzFind.o: C/LzFind.c 71 | $(CXX_C) $(CFLAGS) C/LzFind.c 72 | 73 | LzmaDec.o: C/LzmaDec.c 74 | $(CXX_C) $(CFLAGS) C/LzmaDec.c 75 | 76 | LzmaEnc.o: C/LzmaEnc.c 77 | $(CXX_C) $(CFLAGS) C/LzmaEnc.c 78 | 79 | clean: 80 | -$(RM) $(PROG) $(OBJS) 81 | -------------------------------------------------------------------------------- /u-boot/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, unsigned int, unsigned int, unsigned int); 62 | 63 | #endif /* _RTC_H_ */ 64 | -------------------------------------------------------------------------------- /u-boot/include/linux/bitops.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_BITOPS_H 2 | #define _LINUX_BITOPS_H 3 | 4 | /* 5 | * Helper macros 6 | */ 7 | #define BIT(_x) (1 << (_x)) 8 | #define BITS(_start, _bits) (((1 << (_bits)) - 1) << _start) 9 | #define CHECK_BIT(_var, _pos) ((_var) & (1 << (_pos))) 10 | 11 | #ifndef __ASSEMBLY__ 12 | /* 13 | * ffs: find first bit set. This is defined the same way as 14 | * the libc and compiler builtin ffs routines, therefore 15 | * differs in spirit from the above ffz (man ffs). 16 | */ 17 | static inline int generic_ffs(int x) 18 | { 19 | int r = 1; 20 | 21 | if (!x) 22 | return 0; 23 | if (!(x & 0xffff)) { 24 | x >>= 16; 25 | r += 16; 26 | } 27 | if (!(x & 0xff)) { 28 | x >>= 8; 29 | r += 8; 30 | } 31 | if (!(x & 0xf)) { 32 | x >>= 4; 33 | r += 4; 34 | } 35 | if (!(x & 3)) { 36 | x >>= 2; 37 | r += 2; 38 | } 39 | if (!(x & 1)) { 40 | x >>= 1; 41 | r += 1; 42 | } 43 | return r; 44 | } 45 | 46 | /* 47 | * hweightN: returns the hamming weight (i.e. the number 48 | * of bits set) of a N-bit word 49 | */ 50 | static inline unsigned int generic_hweight32(unsigned int w) 51 | { 52 | unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555); 53 | res = (res & 0x33333333) + ((res >> 2) & 0x33333333); 54 | res = (res & 0x0F0F0F0F) + ((res >> 4) & 0x0F0F0F0F); 55 | res = (res & 0x00FF00FF) + ((res >> 8) & 0x00FF00FF); 56 | return (res & 0x0000FFFF) + ((res >> 16) & 0x0000FFFF); 57 | } 58 | 59 | static inline unsigned int generic_hweight16(unsigned int w) 60 | { 61 | unsigned int res = (w & 0x5555) + ((w >> 1) & 0x5555); 62 | res = (res & 0x3333) + ((res >> 2) & 0x3333); 63 | res = (res & 0x0F0F) + ((res >> 4) & 0x0F0F); 64 | return (res & 0x00FF) + ((res >> 8) & 0x00FF); 65 | } 66 | 67 | static inline unsigned int generic_hweight8(unsigned int w) 68 | { 69 | unsigned int res = (w & 0x55) + ((w >> 1) & 0x55); 70 | res = (res & 0x33) + ((res >> 2) & 0x33); 71 | return (res & 0x0F) + ((res >> 4) & 0x0F); 72 | } 73 | 74 | #include 75 | 76 | #endif /* !__ASSEMBLY__ */ 77 | 78 | #endif 79 | -------------------------------------------------------------------------------- /u-boot/lib_generic/crc32.c: -------------------------------------------------------------------------------- 1 | /* 2 | * CRC32 checksum 3 | * 4 | * Copyright (c) 1998-2003 by Joergen Ibsen / Jibz 5 | * All Rights Reserved 6 | * 7 | * http://www.ibsensoftware.com/ 8 | * 9 | * This software is provided 'as-is', without any express 10 | * or implied warranty. In no event will the authors be 11 | * held liable for any damages arising from the use of 12 | * this software. 13 | * 14 | * Permission is granted to anyone to use this software 15 | * for any purpose, including commercial applications, 16 | * and to alter it and redistribute it freely, subject to 17 | * the following restrictions: 18 | * 19 | * 1. The origin of this software must not be 20 | * misrepresented; you must not claim that you 21 | * wrote the original software. If you use this 22 | * software in a product, an acknowledgment in 23 | * the product documentation would be appreciated 24 | * but is not required. 25 | * 26 | * 2. Altered source versions must be plainly marked 27 | * as such, and must not be misrepresented as 28 | * being the original software. 29 | * 30 | * 3. This notice may not be removed or altered from 31 | * any source distribution. 32 | */ 33 | 34 | /* 35 | * CRC32 algorithm taken from the zlib source, which is 36 | * Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler 37 | */ 38 | 39 | #include "tinf.h" 40 | 41 | static const unsigned int tinf_crc32tab[16] = { 42 | 0x00000000, 0x1db71064, 0x3b6e20c8, 0x26d930ac, 0x76dc4190, 43 | 0x6b6b51f4, 0x4db26158, 0x5005713c, 0xedb88320, 0xf00f9344, 44 | 0xd6d6a3e8, 0xcb61b38c, 0x9b64c2b0, 0x86d3d2d4, 0xa00ae278, 45 | 0xbdbdf21c 46 | }; 47 | 48 | unsigned int tinf_crc32(const void *data, unsigned int length) 49 | { 50 | const unsigned char *buf = (const unsigned char *)data; 51 | unsigned int crc = 0xffffffff; 52 | unsigned int i; 53 | 54 | if (length == 0) return 0; 55 | 56 | for (i = 0; i < length; ++i) 57 | { 58 | crc ^= buf[i]; 59 | crc = tinf_crc32tab[crc & 0x0f] ^ (crc >> 4); 60 | crc = tinf_crc32tab[crc & 0x0f] ^ (crc >> 4); 61 | } 62 | 63 | return crc ^ 0xffffffff; 64 | } 65 | -------------------------------------------------------------------------------- /u-boot/lib_generic/tinfcrc32.c: -------------------------------------------------------------------------------- 1 | /* 2 | * CRC32 checksum 3 | * 4 | * Copyright (c) 1998-2003 by Joergen Ibsen / Jibz 5 | * All Rights Reserved 6 | * 7 | * http://www.ibsensoftware.com/ 8 | * 9 | * This software is provided 'as-is', without any express 10 | * or implied warranty. In no event will the authors be 11 | * held liable for any damages arising from the use of 12 | * this software. 13 | * 14 | * Permission is granted to anyone to use this software 15 | * for any purpose, including commercial applications, 16 | * and to alter it and redistribute it freely, subject to 17 | * the following restrictions: 18 | * 19 | * 1. The origin of this software must not be 20 | * misrepresented; you must not claim that you 21 | * wrote the original software. If you use this 22 | * software in a product, an acknowledgment in 23 | * the product documentation would be appreciated 24 | * but is not required. 25 | * 26 | * 2. Altered source versions must be plainly marked 27 | * as such, and must not be misrepresented as 28 | * being the original software. 29 | * 30 | * 3. This notice may not be removed or altered from 31 | * any source distribution. 32 | */ 33 | 34 | /* 35 | * CRC32 algorithm taken from the zlib source, which is 36 | * Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler 37 | */ 38 | 39 | #include "tinf.h" 40 | 41 | static const unsigned int tinf_crc32tab[16] = { 42 | 0x00000000, 0x1db71064, 0x3b6e20c8, 0x26d930ac, 0x76dc4190, 43 | 0x6b6b51f4, 0x4db26158, 0x5005713c, 0xedb88320, 0xf00f9344, 44 | 0xd6d6a3e8, 0xcb61b38c, 0x9b64c2b0, 0x86d3d2d4, 0xa00ae278, 45 | 0xbdbdf21c 46 | }; 47 | 48 | unsigned int tinf_crc32(const void *data, unsigned int length) 49 | { 50 | const unsigned char *buf = (const unsigned char *)data; 51 | unsigned int crc = 0xffffffff; 52 | unsigned int i; 53 | 54 | if (length == 0) return 0; 55 | 56 | for (i = 0; i < length; ++i) 57 | { 58 | crc ^= buf[i]; 59 | crc = tinf_crc32tab[crc & 0x0f] ^ (crc >> 4); 60 | crc = tinf_crc32tab[crc & 0x0f] ^ (crc >> 4); 61 | } 62 | 63 | return crc ^ 0xffffffff; 64 | } 65 | -------------------------------------------------------------------------------- /u-boot/include/ioports.h: -------------------------------------------------------------------------------- 1 | /* 2 | * definitions for MPC8260 I/O Ports 3 | * 4 | * (in addition to those provided in ) 5 | * 6 | * Murray.Jensen@cmst.csiro.au, 20-Oct-00 7 | */ 8 | 9 | /* 10 | * this structure mirrors the layout of the five port registers in 11 | * the internal memory map - see iop8260_t in 12 | */ 13 | typedef struct { 14 | unsigned int pdir; /* Port Data Direction Register (35-3) */ 15 | unsigned int ppar; /* Port Pin Assignment Register (35-4) */ 16 | unsigned int psor; /* Port Special Options Register (35-5) */ 17 | unsigned int podr; /* Port Open Drain Register (35-2) */ 18 | unsigned int pdat; /* Port Data Register (35-3) */ 19 | } ioport_t; 20 | 21 | /* 22 | * this macro calculates the address within the internal 23 | * memory map (im) of the set of registers for a port (idx) 24 | * 25 | * the internal memory map aligns the above structure on 26 | * a 0x20 byte boundary 27 | */ 28 | #ifdef CONFIG_MPC85xx 29 | #define ioport_addr(im, idx) (ioport_t *)((uint)&((im)->im_cpm.im_cpm_iop) + ((idx)*0x20)) 30 | #else 31 | #define ioport_addr(im, idx) (ioport_t *)((uint)&(im)->im_ioport + ((idx)*0x20)) 32 | #endif 33 | 34 | /* 35 | * this structure provides configuration 36 | * information for one port pin 37 | */ 38 | typedef struct { 39 | unsigned char conf:1; /* if 1, configure this port */ 40 | unsigned char ppar:1; /* Port Pin Assignment Register (35-4) */ 41 | unsigned char psor:1; /* Port Special Options Register (35-2) */ 42 | unsigned char pdir:1; /* Port Data Direction Register (35-3) */ 43 | unsigned char podr:1; /* Port Open Drain Register (35-2) */ 44 | unsigned char pdat:1; /* Port Data Register (35-2) */ 45 | } iop_conf_t; 46 | 47 | /* 48 | * a table that contains configuration information for all 32 pins 49 | * of all four MPC8260 I/O ports. 50 | * 51 | * NOTE: in the second dimension of this table, index 0 refers to pin 31 52 | * and index 31 refers to pin 0. this made the code in the table look more 53 | * like the table in the 8260UM (and in the hymod manuals). 54 | */ 55 | extern const iop_conf_t iop_conf_tab[4][32]; 56 | -------------------------------------------------------------------------------- /host_util/lzma/C/LzHash.h: -------------------------------------------------------------------------------- 1 | /* LzHash.h -- HASH functions for LZ algorithms 2 | 2008-10-04 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef __LZHASH_H 5 | #define __LZHASH_H 6 | 7 | #define kHash2Size (1 << 10) 8 | #define kHash3Size (1 << 16) 9 | #define kHash4Size (1 << 20) 10 | 11 | #define kFix3HashSize (kHash2Size) 12 | #define kFix4HashSize (kHash2Size + kHash3Size) 13 | #define kFix5HashSize (kHash2Size + kHash3Size + kHash4Size) 14 | 15 | #define HASH2_CALC hashValue = cur[0] | ((UInt32)cur[1] << 8); 16 | 17 | #define HASH3_CALC { \ 18 | UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ 19 | hash2Value = temp & (kHash2Size - 1); \ 20 | hashValue = (temp ^ ((UInt32)cur[2] << 8)) & p->hashMask; } 21 | 22 | #define HASH4_CALC { \ 23 | UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ 24 | hash2Value = temp & (kHash2Size - 1); \ 25 | hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \ 26 | hashValue = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & p->hashMask; } 27 | 28 | #define HASH5_CALC { \ 29 | UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ 30 | hash2Value = temp & (kHash2Size - 1); \ 31 | hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \ 32 | hash4Value = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)); \ 33 | hashValue = (hash4Value ^ (p->crc[cur[4]] << 3)) & p->hashMask; \ 34 | hash4Value &= (kHash4Size - 1); } 35 | 36 | /* #define HASH_ZIP_CALC hashValue = ((cur[0] | ((UInt32)cur[1] << 8)) ^ p->crc[cur[2]]) & 0xFFFF; */ 37 | #define HASH_ZIP_CALC hashValue = ((cur[2] | ((UInt32)cur[0] << 8)) ^ p->crc[cur[1]]) & 0xFFFF; 38 | 39 | 40 | #define MT_HASH2_CALC \ 41 | hash2Value = (p->crc[cur[0]] ^ cur[1]) & (kHash2Size - 1); 42 | 43 | #define MT_HASH3_CALC { \ 44 | UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ 45 | hash2Value = temp & (kHash2Size - 1); \ 46 | hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); } 47 | 48 | #define MT_HASH4_CALC { \ 49 | UInt32 temp = p->crc[cur[0]] ^ cur[1]; \ 50 | hash2Value = temp & (kHash2Size - 1); \ 51 | hash3Value = (temp ^ ((UInt32)cur[2] << 8)) & (kHash3Size - 1); \ 52 | hash4Value = (temp ^ ((UInt32)cur[2] << 8) ^ (p->crc[cur[3]] << 5)) & (kHash4Size - 1); } 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /u-boot/common/cmd_boot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * (C) Copyright 2000-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 | * Misc boot support 26 | */ 27 | #include 28 | #include 29 | #include 30 | 31 | #if defined(CONFIG_I386) || defined(CONFIG_MIPS) 32 | DECLARE_GLOBAL_DATA_PTR; 33 | #endif 34 | 35 | int do_go(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]){ 36 | ulong addr, rc; 37 | int rcode = 0; 38 | 39 | if(argc < 2){ 40 | print_cmd_help(cmdtp); 41 | return(1); 42 | } 43 | 44 | addr = simple_strtoul(argv[1], NULL, 16); 45 | 46 | printf("## Starting application at 0x%08lX...\n", addr); 47 | 48 | /* 49 | * Pass address parameter as argv[0] (aka command name), 50 | * and all remaining args 51 | */ 52 | rc = ((ulong (*)(int, char *[]))addr)(--argc, &argv[1]); 53 | 54 | if(rc != 0){ 55 | rcode = 1; 56 | } 57 | 58 | printf("## Application terminated, rc = 0x%lX\n", rc); 59 | 60 | return(rcode); 61 | } 62 | 63 | U_BOOT_CMD(go, CFG_MAXARGS, 1, do_go, "start application at address 'addr'\n", 64 | "addr [arg ...]\n" 65 | "\t- start application at address 'addr'\n" 66 | "\t passing 'arg' as arguments\n"); 67 | 68 | extern int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); 69 | 70 | U_BOOT_CMD(reset, 1, 0, do_reset, "perform RESET of the CPU\n", NULL); 71 | -------------------------------------------------------------------------------- /u-boot/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 | * NOTE: This header file defines an interface to U-Boot. Including 25 | * this (unmodified) header file in another file is considered normal 26 | * use of U-Boot, and does *not* fall under the heading of "derived 27 | * work". 28 | ******************************************************************** 29 | */ 30 | 31 | #ifndef _U_BOOT_H_ 32 | #define _U_BOOT_H_ 1 33 | 34 | typedef struct bd_info { 35 | unsigned int bi_baudrate; /* serial console baudrate */ 36 | unsigned long bi_ip_addr; /* IP Address */ 37 | unsigned char bi_enetaddr[6]; /* Ethernet adress */ 38 | unsigned long bi_arch_number; /* unique id for this board */ 39 | unsigned long bi_boot_params; /* where this board expects params */ 40 | unsigned long bi_memstart; /* start of DRAM memory */ 41 | unsigned long bi_memsize; /* size of DRAM memory in bytes */ 42 | unsigned long bi_flashstart; /* start of FLASH memory */ 43 | unsigned long bi_flashsize; /* size of FLASH memory */ 44 | unsigned long bi_flashoffset; /* reserved area for startup monitor */ 45 | unsigned long bi_cfg_hz; 46 | } bd_t; 47 | 48 | #define bi_env_data bi_env->data 49 | #define bi_env_crc bi_env->crc 50 | 51 | #endif /* _U_BOOT_H_ */ 52 | -------------------------------------------------------------------------------- /u-boot/include/tplink_image.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2016 Piotr Dymacz 3 | * 4 | * Based on mktplinkfw.c from OpenWrt 5 | * 6 | * SPDX-License-Identifier: GPL-2.0 7 | */ 8 | 9 | #ifndef __TPLINK_IMAGE_H__ 10 | #define __TPLINK_IMAGE_H__ 11 | 12 | #define TPL_IH_VERSION_V1 0x01000000 13 | #define TPL_IH_VERSION_V2 0x02000000 14 | #define TPL_IH_VERSION_V3 0x03000000 15 | 16 | #define MD5SUM_LEN 16 17 | 18 | /* For v1 version of header version */ 19 | typedef struct tplink_image_header { /* ofs (size): what */ 20 | uint32_t ih_version; /* 0x0 (4): header version */ 21 | char ih_vendor[24]; /* 0x4 (24): vendor name (text) */ 22 | char ih_info[36]; /* 0x1C (36): other info like version */ 23 | uint32_t ih_hw_id; /* 0x40 (4): hardware ID */ 24 | uint32_t ih_hw_ver; /* 0x44 (4): hardware version */ 25 | uint32_t ih_region; /* 0x48 (4): region code */ 26 | uint8_t ih_md5sum1[MD5SUM_LEN]; /* 0x4C (16): MD5 sum #1 */ 27 | uint32_t ih_ignore1; /* 0x5C (4): unknown */ 28 | uint8_t ih_md5sum2[MD5SUM_LEN]; /* 0x60 (16): MD5 sum #2 */ 29 | uint32_t ih_ignore2; /* 0x70 (4): unknown */ 30 | uint32_t ih_kernel_load; /* 0x74 (4): kernel load address */ 31 | uint32_t ih_kernel_ep; /* 0x78 (4): kernel entry point */ 32 | uint32_t ih_fw_len; /* 0x7C (4): image size (with header) */ 33 | uint32_t ih_kernel_ofs; /* 0x80 (4): kernel data offset */ 34 | uint32_t ih_kernel_len; /* 0x84 (4): kernel data size */ 35 | uint32_t ih_rootfs_ofs; /* 0x88 (4): rootfs data offset */ 36 | uint32_t ih_rootfs_len; /* 0x8C (4): rootfs data size */ 37 | uint32_t ih_boot_ofs; /* 0x90 (4): bootloader data offset */ 38 | uint32_t ih_boot_len; /* 0x94 (4): bootloader data size */ 39 | uint16_t ih_fw_ver_hi; /* 0x98 (2): firmware version hi */ 40 | uint16_t ih_fw_ver_mid; /* 0x9A (2): firmware version mid */ 41 | uint16_t ih_fw_ver_lo; /* 0x9C (2): firmware version lo */ 42 | uint8_t ih_pad[354]; /* 0x9E (354): padding, not used... */ 43 | } tplink_image_header_t; 44 | 45 | #endif /* __TPLINK_IMAGE_H__ */ 46 | -------------------------------------------------------------------------------- /host_util/lzma/Common/NewHandler.cpp: -------------------------------------------------------------------------------- 1 | // NewHandler.cpp 2 | 3 | #include "StdAfx.h" 4 | 5 | #include 6 | 7 | #include "NewHandler.h" 8 | 9 | // #define DEBUG_MEMORY_LEAK 10 | 11 | #ifndef DEBUG_MEMORY_LEAK 12 | 13 | #ifdef _WIN32 14 | void * 15 | #ifdef _MSC_VER 16 | __cdecl 17 | #endif 18 | operator new(size_t size) 19 | { 20 | // void *p = ::HeapAlloc(::GetProcessHeap(), 0, size); 21 | void *p = ::malloc(size); 22 | if (p == 0) 23 | throw CNewException(); 24 | return p; 25 | } 26 | 27 | void 28 | #ifdef _MSC_VER 29 | __cdecl 30 | #endif 31 | operator delete(void *p) throw() 32 | { 33 | /* 34 | if (p == 0) 35 | return; 36 | ::HeapFree(::GetProcessHeap(), 0, p); 37 | */ 38 | ::free(p); 39 | } 40 | #endif 41 | 42 | #else 43 | 44 | #pragma init_seg(lib) 45 | const int kDebugSize = 1000000; 46 | static void *a[kDebugSize]; 47 | static int index = 0; 48 | 49 | static int numAllocs = 0; 50 | void * __cdecl operator new(size_t size) 51 | { 52 | numAllocs++; 53 | void *p = HeapAlloc(GetProcessHeap(), 0, size); 54 | if (index == 40) 55 | { 56 | int t = 1; 57 | } 58 | if (index < kDebugSize) 59 | { 60 | a[index] = p; 61 | index++; 62 | } 63 | if (p == 0) 64 | throw CNewException(); 65 | printf("Alloc %6d, size = %8d\n", numAllocs, size); 66 | return p; 67 | } 68 | 69 | class CC 70 | { 71 | public: 72 | CC() 73 | { 74 | for (int i = 0; i < kDebugSize; i++) 75 | a[i] = 0; 76 | } 77 | ~CC() 78 | { 79 | for (int i = 0; i < kDebugSize; i++) 80 | if (a[i] != 0) 81 | return; 82 | } 83 | } g_CC; 84 | 85 | 86 | void __cdecl operator delete(void *p) 87 | { 88 | if (p == 0) 89 | return; 90 | /* 91 | for (int i = 0; i < index; i++) 92 | if (a[i] == p) 93 | a[i] = 0; 94 | */ 95 | HeapFree(GetProcessHeap(), 0, p); 96 | numAllocs--; 97 | printf("Free %d\n", numAllocs); 98 | } 99 | 100 | #endif 101 | 102 | /* 103 | int MemErrorVC(size_t) 104 | { 105 | throw CNewException(); 106 | // return 1; 107 | } 108 | CNewHandlerSetter::CNewHandlerSetter() 109 | { 110 | // MemErrorOldVCFunction = _set_new_handler(MemErrorVC); 111 | } 112 | CNewHandlerSetter::~CNewHandlerSetter() 113 | { 114 | // _set_new_handler(MemErrorOldVCFunction); 115 | } 116 | */ 117 | -------------------------------------------------------------------------------- /u-boot/lib_bootstrap/string.c: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/lib/string.c 3 | * 4 | * Copyright (C) 1991, 1992 Linus Torvalds 5 | */ 6 | 7 | /* 8 | * stupid library routines.. The optimized versions should generally be found 9 | * as inline code in 10 | * 11 | * These are buggy as well.. 12 | * 13 | * * Fri Jun 25 1999, Ingo Oeser 14 | * - Added strsep() which will replace strtok() soon (because strsep() is 15 | * reentrant and should be faster). Use only strsep() in new code, please. 16 | */ 17 | 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | #ifndef __HAVE_ARCH_MEMSET 24 | /** 25 | * memset - Fill a region of memory with the given value 26 | * @s: Pointer to the start of the area. 27 | * @c: The byte to fill the area with 28 | * @count: The size of the area. 29 | * 30 | * Do not use memset() to access IO space, use memset_io() instead. 31 | */ 32 | void * memset(void * s,int c,size_t count) 33 | { 34 | char *xs = (char *) s; 35 | 36 | while (count--) 37 | *xs++ = c; 38 | 39 | return s; 40 | } 41 | #endif 42 | 43 | #ifndef __HAVE_ARCH_MEMCPY 44 | /** 45 | * memcpy - Copy one area of memory to another 46 | * @dest: Where to copy to 47 | * @src: Where to copy from 48 | * @count: The size of the area. 49 | * 50 | * You should not use this function to access IO space, use memcpy_toio() 51 | * or memcpy_fromio() instead. 52 | */ 53 | void * memcpy(void * dest,const void *src,size_t count) 54 | { 55 | char *tmp = (char *) dest, *s = (char *) src; 56 | 57 | while (count--) 58 | *tmp++ = *s++; 59 | 60 | return dest; 61 | } 62 | #endif 63 | 64 | #ifndef __HAVE_ARCH_MEMMOVE 65 | /** 66 | * memmove - Copy one area of memory to another 67 | * @dest: Where to copy to 68 | * @src: Where to copy from 69 | * @count: The size of the area. 70 | * 71 | * Unlike memcpy(), memmove() copes with overlapping areas. 72 | */ 73 | void * memmove(void * dest,const void *src,size_t count) 74 | { 75 | char *tmp, *s; 76 | 77 | if (dest <= src) { 78 | tmp = (char *) dest; 79 | s = (char *) src; 80 | while (count--) 81 | *tmp++ = *s++; 82 | } 83 | else { 84 | tmp = (char *) dest + count; 85 | s = (char *) src + count; 86 | while (count--) 87 | *--tmp = *--s; 88 | } 89 | 90 | return dest; 91 | } 92 | #endif 93 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /host_util/lzma/Common/MyVector.cpp: -------------------------------------------------------------------------------- 1 | // Common/MyVector.cpp 2 | 3 | #include "StdAfx.h" 4 | 5 | #include 6 | 7 | #include "MyVector.h" 8 | 9 | CBaseRecordVector::~CBaseRecordVector() { ClearAndFree(); } 10 | 11 | void CBaseRecordVector::ClearAndFree() 12 | { 13 | Clear(); 14 | delete []((unsigned char *)_items); 15 | _capacity = 0; 16 | _size = 0; 17 | _items = 0; 18 | } 19 | 20 | void CBaseRecordVector::Clear() { DeleteFrom(0); } 21 | void CBaseRecordVector::DeleteBack() { Delete(_size - 1); } 22 | void CBaseRecordVector::DeleteFrom(int index) { Delete(index, _size - index); } 23 | 24 | void CBaseRecordVector::ReserveOnePosition() 25 | { 26 | if (_size != _capacity) 27 | return; 28 | int delta = 1; 29 | if (_capacity >= 64) 30 | delta = _capacity / 4; 31 | else if (_capacity >= 8) 32 | delta = 8; 33 | Reserve(_capacity + delta); 34 | } 35 | 36 | void CBaseRecordVector::Reserve(int newCapacity) 37 | { 38 | // if (newCapacity <= _capacity) 39 | if (newCapacity == _capacity) 40 | return; 41 | if ((unsigned)newCapacity >= ((unsigned)1 << (sizeof(unsigned) * 8 - 1))) 42 | throw 1052353; 43 | size_t newSize = (size_t)(unsigned)newCapacity * _itemSize; 44 | if (newSize / _itemSize != (size_t)(unsigned)newCapacity) 45 | throw 1052354; 46 | unsigned char *p = NULL; 47 | if (newSize > 0) 48 | { 49 | p = new unsigned char[newSize]; 50 | if (p == 0) 51 | throw 1052355; 52 | int numRecordsToMove = (_size < newCapacity ? _size : newCapacity); 53 | memcpy(p, _items, _itemSize * numRecordsToMove); 54 | } 55 | delete [](unsigned char *)_items; 56 | _items = p; 57 | _capacity = newCapacity; 58 | } 59 | 60 | void CBaseRecordVector::ReserveDown() 61 | { 62 | Reserve(_size); 63 | } 64 | 65 | void CBaseRecordVector::MoveItems(int destIndex, int srcIndex) 66 | { 67 | memmove(((unsigned char *)_items) + destIndex * _itemSize, 68 | ((unsigned char *)_items) + srcIndex * _itemSize, 69 | _itemSize * (_size - srcIndex)); 70 | } 71 | 72 | void CBaseRecordVector::InsertOneItem(int index) 73 | { 74 | ReserveOnePosition(); 75 | MoveItems(index + 1, index); 76 | _size++; 77 | } 78 | 79 | void CBaseRecordVector::Delete(int index, int num) 80 | { 81 | TestIndexAndCorrectNum(index, num); 82 | if (num > 0) 83 | { 84 | MoveItems(index, index + num); 85 | _size -= num; 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /u-boot/lib_generic/ldiv.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 1992, 1997 Free Software Foundation, Inc. 2 | This file is part of the GNU C Library. 3 | 4 | The GNU C Library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Library General Public License as 6 | published by the Free Software Foundation; either version 2 of the 7 | License, or (at your option) any later version. 8 | 9 | The GNU C Library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public 15 | License along with the GNU C Library; see the file COPYING.LIB. If not, 16 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | Boston, MA 02111-1307, USA. */ 18 | 19 | typedef struct { 20 | long quot; 21 | long rem; 22 | } ldiv_t; 23 | /* Return the `ldiv_t' representation of NUMER over DENOM. */ 24 | ldiv_t 25 | ldiv (long int numer, long int denom) 26 | { 27 | ldiv_t result; 28 | 29 | result.quot = numer / denom; 30 | result.rem = numer % denom; 31 | 32 | /* The ANSI standard says that |QUOT| <= |NUMER / DENOM|, where 33 | NUMER / DENOM is to be computed in infinite precision. In 34 | other words, we should always truncate the quotient towards 35 | zero, never -infinity. Machine division and remainer may 36 | work either way when one or both of NUMER or DENOM is 37 | negative. If only one is negative and QUOT has been 38 | truncated towards -infinity, REM will have the same sign as 39 | DENOM and the opposite sign of NUMER; if both are negative 40 | and QUOT has been truncated towards -infinity, REM will be 41 | positive (will have the opposite sign of NUMER). These are 42 | considered `wrong'. If both are NUM and DENOM are positive, 43 | RESULT will always be positive. This all boils down to: if 44 | NUMER >= 0, but REM < 0, we got the wrong answer. In that 45 | case, to get the right answer, add 1 to QUOT and subtract 46 | DENOM from REM. */ 47 | 48 | if (numer >= 0 && result.rem < 0) 49 | { 50 | ++result.quot; 51 | result.rem -= denom; 52 | } 53 | 54 | return result; 55 | } 56 | -------------------------------------------------------------------------------- /u-boot/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 | COBJS = main.o \ 31 | cmd_bootm.o \ 32 | cmd_boot.o \ 33 | cmd_flash.o \ 34 | cmd_mem.o \ 35 | cmd_custom.o \ 36 | cmd_net.o \ 37 | cmd_nvedit.o \ 38 | cmd_itest.o \ 39 | cmd_load.o \ 40 | cmd_qcaclk.o \ 41 | command.o \ 42 | console.o \ 43 | devices.o \ 44 | dlmalloc.o \ 45 | environment.o \ 46 | env_common.o \ 47 | env_nowhere.o \ 48 | exports.o \ 49 | flash.o \ 50 | lists.o \ 51 | env_flash.o \ 52 | hush.o \ 53 | xyzModem.o \ 54 | crc16.o \ 55 | s_record.o 56 | 57 | OBJS = $(AOBJS) $(COBJS) 58 | 59 | CPPFLAGS += -I.. 60 | 61 | ifeq ($(DUAL_FIRMWAREIMAGE_SUPPORT),1) 62 | CFLAGS += -DCONFIG_DUALIMAGE_SUPPORT 63 | OBJS += cmd_bdr.o 64 | endif 65 | 66 | all: $(LIB) $(AOBJS) 67 | 68 | $(LIB): .depend $(OBJS) 69 | $(AR) crv $@ $(OBJS) 70 | 71 | environment.o: environment.c ../tools/envcrc 72 | $(CC) $(AFLAGS) -Wa,--no-warn \ 73 | -DENV_CRC=$(shell ../tools/envcrc) \ 74 | -c -o $@ environment.c 75 | 76 | ../tools/envcrc: 77 | $(MAKE) -C ../tools 78 | 79 | ######################################################################### 80 | 81 | .depend: Makefile $(AOBJS:.o=.S) $(COBJS:.o=.c) 82 | $(CC) -M $(CFLAGS) $(AOBJS:.o=.S) $(COBJS:.o=.c) > $@ 83 | 84 | sinclude .depend 85 | 86 | ######################################################################### 87 | -------------------------------------------------------------------------------- /u-boot/net/sntp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * SNTP support driver 3 | * 4 | * Masami Komiya 2005 5 | * 6 | */ 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include "sntp.h" 12 | 13 | #if defined(CONFIG_CMD_NET) && defined(CONFIG_CMD_SNTP) 14 | 15 | DECLARE_GLOBAL_DATA_PTR; 16 | 17 | //#define DEBUG 18 | 19 | #define SNTP_TIMEOUT 10 20 | 21 | static int SntpOurPort; 22 | 23 | static void SntpSend(void){ 24 | struct sntp_pkt_t pkt; 25 | int pktlen = SNTP_PACKET_LEN; 26 | int sport; 27 | 28 | #ifdef DEBUG 29 | printf("%s\n", __FUNCTION__); 30 | #endif 31 | 32 | memset(&pkt, 0, sizeof(pkt)); 33 | 34 | pkt.li = NTP_LI_NOLEAP; 35 | pkt.vn = NTP_VERSION; 36 | pkt.mode = NTP_MODE_CLIENT; 37 | 38 | memcpy((char *)NetTxPacket + NetEthHdrSize() + IP_HDR_SIZE, (char *)&pkt, pktlen); 39 | 40 | SntpOurPort = 10000 + (get_timer(0) % 4096); 41 | sport = NTP_SERVICE_PORT; 42 | 43 | puts("Sending SNTP request...\n"); 44 | 45 | NetSendUDPPacket(NetServerEther, NetNtpServerIP, sport, SntpOurPort, pktlen); 46 | } 47 | 48 | static void SntpTimeout(void){ 49 | printf_err("timeout\n"); 50 | NetState = NETLOOP_FAIL; 51 | 52 | return; 53 | } 54 | 55 | static void SntpHandler(uchar *pkt, unsigned dest, unsigned src, unsigned len){ 56 | struct sntp_pkt_t *rpktp = (struct sntp_pkt_t *)pkt; 57 | struct rtc_time tm; 58 | ulong seconds; 59 | 60 | #ifdef DEBUG 61 | printf("%s\n", __FUNCTION__); 62 | #endif 63 | 64 | if(dest != SntpOurPort){ 65 | return; 66 | } 67 | 68 | /* 69 | * As the RTC's used in U-Boot supports second resolution only 70 | * we simply ignore the sub-second field. 71 | */ 72 | memcpy(&seconds, &rpktp->transmit_timestamp, sizeof(ulong)); 73 | 74 | to_tm(ntohl(seconds) - 2208988800UL + NetTimeOffset, &tm); 75 | 76 | #if defined(CONFIG_CMD_DATE) 77 | // TODO: find out how to use RTC on 78 | //rtc_set(&tm); 79 | #endif 80 | printf("Got SNTP response: %4d-%02d-%02d %2d:%02d:%02d\n\n", tm.tm_year, tm.tm_mon, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); 81 | NetState = NETLOOP_SUCCESS; 82 | } 83 | 84 | void SntpStart(void){ 85 | bd_t *bd = gd->bd; 86 | #ifdef DEBUG 87 | printf("%s\n", __FUNCTION__); 88 | #endif 89 | 90 | NetSetTimeout(SNTP_TIMEOUT * CFG_HZ, SntpTimeout); 91 | NetSetHandler(SntpHandler); 92 | 93 | memset(NetServerEther, 0, 6); 94 | 95 | SntpSend(); 96 | } 97 | 98 | #endif /* CONFIG_CMD_NET && CONFIG_CMD_SNTP */ 99 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /u-boot/include/asm-mips/addrspace.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 by Ralf Baechle 7 | * Copyright (C) 2000 by Maciej W. Rozycki 8 | * 9 | * Defitions for the address spaces of the MIPS CPUs. 10 | */ 11 | #ifndef __ASM_MIPS_ADDRSPACE_H 12 | #define __ASM_MIPS_ADDRSPACE_H 13 | 14 | /* 15 | * Memory segments (32bit kernel mode addresses) 16 | */ 17 | #define KUSEG 0x00000000 18 | #define KSEG0 0x80000000 19 | #define KSEG1 0xa0000000 20 | #define KSEG2 0xc0000000 21 | #define KSEG3 0xe0000000 22 | 23 | #define K0BASE KSEG0 24 | 25 | /* 26 | * Returns the kernel segment base of a given address 27 | */ 28 | #ifndef __ASSEMBLY__ 29 | #define KSEGX(a) (((unsigned long)(a)) & 0xe0000000) 30 | #else 31 | #define KSEGX(a) ((a) & 0xe0000000) 32 | #endif 33 | 34 | /* 35 | * Returns the physical address of a KSEG0/KSEG1 address 36 | */ 37 | #ifndef __ASSEMBLY__ 38 | #define PHYSADDR(a) (((unsigned long)(a)) & 0x1fffffff) 39 | #else 40 | #define PHYSADDR(a) ((a) & 0x1fffffff) 41 | #endif 42 | 43 | /* 44 | * Returns the uncached address of a sdram address 45 | */ 46 | #ifndef __ASSEMBLY__ 47 | #define UNCACHED_SDRAM(a) KSEG1ADDR((a)) 48 | #endif /* __ASSEMBLY__ */ 49 | /* 50 | * Map an address to a certain kernel segment 51 | */ 52 | #ifndef __ASSEMBLY__ 53 | #define KSEG0ADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | KSEG0)) 54 | #define KSEG1ADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | KSEG1)) 55 | #define KSEG2ADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | KSEG2)) 56 | #define KSEG3ADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | KSEG3)) 57 | #else 58 | #define KSEG0ADDR(a) (((a) & 0x1fffffff) | KSEG0) 59 | #define KSEG1ADDR(a) (((a) & 0x1fffffff) | KSEG1) 60 | #define KSEG2ADDR(a) (((a) & 0x1fffffff) | KSEG2) 61 | #define KSEG3ADDR(a) (((a) & 0x1fffffff) | KSEG3) 62 | #endif 63 | 64 | /* 65 | * Memory segments (64bit kernel mode addresses) 66 | */ 67 | #define XKUSEG 0x0000000000000000 68 | #define XKSSEG 0x4000000000000000 69 | #define XKPHYS 0x8000000000000000 70 | #define XKSEG 0xc000000000000000 71 | #define CKSEG0 0xffffffff80000000 72 | #define CKSEG1 0xffffffffa0000000 73 | #define CKSSEG 0xffffffffc0000000 74 | #define CKSEG3 0xffffffffe0000000 75 | 76 | #endif /* __ASM_MIPS_ADDRSPACE_H */ 77 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /u-boot/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 | -------------------------------------------------------------------------------- /u-boot/include/soc/soc_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SOC common registers and helper function/macro definitions 3 | * 4 | * Copyright (C) 2016 Piotr Dymacz 5 | * 6 | * SPDX-License-Identifier: GPL-2.0 7 | */ 8 | 9 | #ifndef _SOC_COMMON_H_ 10 | #define _SOC_COMMON_H_ 11 | 12 | #include 13 | 14 | #ifndef SOC_TYPE 15 | #error "SOC_TYPE is not defined!" 16 | #endif 17 | 18 | /* 19 | * GPIO registers BIT fields 20 | */ 21 | #define GPIO_X_MASK(_gpio) (1 << _gpio) 22 | 23 | #define GPIO0 GPIO_X_MASK(0) 24 | #define GPIO1 GPIO_X_MASK(1) 25 | #define GPIO2 GPIO_X_MASK(2) 26 | #define GPIO3 GPIO_X_MASK(3) 27 | #define GPIO4 GPIO_X_MASK(4) 28 | #define GPIO5 GPIO_X_MASK(5) 29 | #define GPIO6 GPIO_X_MASK(6) 30 | #define GPIO7 GPIO_X_MASK(7) 31 | #define GPIO8 GPIO_X_MASK(8) 32 | #define GPIO9 GPIO_X_MASK(9) 33 | #define GPIO10 GPIO_X_MASK(10) 34 | #define GPIO11 GPIO_X_MASK(11) 35 | #define GPIO12 GPIO_X_MASK(12) 36 | #define GPIO13 GPIO_X_MASK(13) 37 | #define GPIO14 GPIO_X_MASK(14) 38 | #define GPIO15 GPIO_X_MASK(15) 39 | #define GPIO16 GPIO_X_MASK(16) 40 | #define GPIO17 GPIO_X_MASK(17) 41 | #define GPIO18 GPIO_X_MASK(18) 42 | #define GPIO19 GPIO_X_MASK(19) 43 | #define GPIO20 GPIO_X_MASK(20) 44 | #define GPIO21 GPIO_X_MASK(21) 45 | #define GPIO22 GPIO_X_MASK(22) 46 | #define GPIO23 GPIO_X_MASK(23) 47 | #define GPIO24 GPIO_X_MASK(24) 48 | #define GPIO25 GPIO_X_MASK(25) 49 | #define GPIO26 GPIO_X_MASK(26) 50 | #define GPIO27 GPIO_X_MASK(27) 51 | #define GPIO28 GPIO_X_MASK(28) 52 | #define GPIO29 GPIO_X_MASK(29) 53 | #define GPIO30 GPIO_X_MASK(30) 54 | #define GPIO31 GPIO_X_MASK(31) 55 | #define GPIO32 GPIO_X_MASK(32) 56 | #define GPIO33 GPIO_X_MASK(33) 57 | #define GPIO34 GPIO_X_MASK(34) 58 | #define GPIO35 GPIO_X_MASK(35) 59 | #define GPIO36 GPIO_X_MASK(36) 60 | #define GPIO37 GPIO_X_MASK(37) 61 | #define GPIO38 GPIO_X_MASK(38) 62 | #define GPIO39 GPIO_X_MASK(39) 63 | #define GPIO40 GPIO_X_MASK(40) 64 | #define GPIO41 GPIO_X_MASK(41) 65 | #define GPIO42 GPIO_X_MASK(42) 66 | #define GPIO43 GPIO_X_MASK(43) 67 | #define GPIO44 GPIO_X_MASK(44) 68 | #define GPIO45 GPIO_X_MASK(45) 69 | #define GPIO46 GPIO_X_MASK(46) 70 | #define GPIO47 GPIO_X_MASK(47) 71 | #define GPIO48 GPIO_X_MASK(48) 72 | #define GPIO49 GPIO_X_MASK(49) 73 | #define GPIO50 GPIO_X_MASK(50) 74 | 75 | /* 76 | * Memory types 77 | */ 78 | #define RAM_MEMORY_TYPE_DDR1 1 79 | #define RAM_MEMORY_TYPE_DDR2 2 80 | #define RAM_MEMORY_TYPE_DDR3 3 81 | #define RAM_MEMORY_TYPE_SDR 4 82 | #define RAM_MEMORY_TYPE_UNKNOWN 5 83 | 84 | /* 85 | * Useful clock variables 86 | */ 87 | #define VAL_40MHz (40 * 1000 * 1000) 88 | #define VAL_25MHz (25 * 1000 * 1000) 89 | 90 | #endif /* _SOC_COMMON_H_ */ 91 | -------------------------------------------------------------------------------- /u-boot/httpd/httpd.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \addtogroup httpd 3 | * @{ 4 | */ 5 | 6 | /** 7 | * \file 8 | * HTTP server header file. 9 | * \author Adam Dunkels 10 | */ 11 | 12 | /* 13 | * Copyright (c) 2001, Adam Dunkels. 14 | * All rights reserved. 15 | * 16 | * Redistribution and use in source and binary forms, with or without 17 | * modification, are permitted provided that the following conditions 18 | * are met: 19 | * 1. Redistributions of source code must retain the above copyright 20 | * notice, this list of conditions and the following disclaimer. 21 | * 2. Redistributions in binary form must reproduce the above copyright 22 | * notice, this list of conditions and the following disclaimer in the 23 | * documentation and/or other materials provided with the distribution. 24 | * 3. The name of the author may not be used to endorse or promote 25 | * products derived from this software without specific prior 26 | * written permission. 27 | * 28 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 29 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 30 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 31 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 32 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 34 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 35 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 36 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 37 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 38 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 | * 40 | * This file is part of the uIP TCP/IP stack. 41 | * 42 | * $Id: httpd.h,v 1.4.2.3 2003/10/06 22:56:44 adam Exp $ 43 | * 44 | */ 45 | 46 | #ifndef __HTTPD_H__ 47 | #define __HTTPD_H__ 48 | 49 | void httpd_init(void); 50 | void httpd_appcall(void); 51 | 52 | /* UIP_APPCALL: the name of the application function. This function 53 | must return void and take no arguments (i.e., C type "void 54 | appfunc(void)"). */ 55 | #ifndef UIP_APPCALL 56 | #define UIP_APPCALL httpd_appcall 57 | #endif 58 | 59 | struct httpd_state { 60 | u8_t state; 61 | u16_t count; 62 | u8_t *dataptr; 63 | unsigned int upload; 64 | unsigned int upload_total; 65 | }; 66 | 67 | /* UIP_APPSTATE_SIZE: The size of the application-specific state 68 | stored in the uip_conn structure. */ 69 | #ifndef UIP_APPSTATE_SIZE 70 | #define UIP_APPSTATE_SIZE (sizeof(struct httpd_state)) 71 | #endif 72 | 73 | //#define FS_STATISTICS 1 74 | 75 | extern struct httpd_state *hs; 76 | 77 | #endif /* __HTTPD_H__ */ 78 | -------------------------------------------------------------------------------- /u-boot/cpu/mips/ar7240/qca_ls_uart.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Qualcomm/Atheros Low-Speed UART driver 3 | * 4 | * Copyright (C) 2016 Piotr Dymacz 5 | * Copyright (C) 2008-2010 Atheros Communications Inc. 6 | * 7 | * SPDX-License-Identifier: GPL-2.0 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | DECLARE_GLOBAL_DATA_PTR; 16 | 17 | void serial_setbrg(void) 18 | { 19 | u32 div; 20 | 21 | /* 22 | * TODO: prepare list of supported range of baudrate values 23 | * For 40 MHz ref_clk, successfully tested up to 1152000 on AR9344 24 | */ 25 | 26 | /* Round to closest, final baudrate = ref_clk / (16 * div) */ 27 | if (qca_xtal_is_40mhz() == 1) { 28 | div = (VAL_40MHz + (8 * gd->baudrate)) / (16 * gd->baudrate); 29 | } else { 30 | div = (VAL_25MHz + (8 * gd->baudrate)) / (16 * gd->baudrate); 31 | } 32 | 33 | /* Set DLAB bit in LCR register unlocks DLL/DLH registers */ 34 | qca_soc_reg_read_set(QCA_LSUART_LCR_REG, QCA_LSUART_LCR_DLAB_MASK); 35 | 36 | /* Write div into DLL and DLH registers */ 37 | qca_soc_reg_write(QCA_LSUART_DLL_REG, (div & 0xFF)); 38 | qca_soc_reg_write(QCA_LSUART_DLH_REG, ((div >> 8) & 0xFF)); 39 | 40 | /* Clear DLAB bit in LCR register */ 41 | qca_soc_reg_read_clear(QCA_LSUART_LCR_REG, QCA_LSUART_LCR_DLAB_MASK); 42 | } 43 | 44 | int serial_init(void) 45 | { 46 | serial_setbrg(); 47 | 48 | /* No interrupt */ 49 | qca_soc_reg_write(QCA_LSUART_IER_REG, 0x0); 50 | 51 | /* No FIFO/DMA */ 52 | qca_soc_reg_write(QCA_LSUART_FCR_REG, 0x0); 53 | 54 | /* 55 | * Low-Speed UART controller configuration: 56 | * - data: 8bits 57 | * - stop: 1bit 58 | * - parity: no 59 | */ 60 | qca_soc_reg_write(QCA_LSUART_LCR_REG, 61 | QCA_LSUART_LCR_CLS_8BIT_VAL << QCA_LSUART_LCR_CLS_SHIFT); 62 | 63 | return 0; 64 | } 65 | 66 | void serial_putc(const char c) 67 | { 68 | u32 line_status; 69 | 70 | if (c == '\n') 71 | serial_putc('\r'); 72 | 73 | /* Wait for empty THR */ 74 | do { 75 | line_status = qca_soc_reg_read(QCA_LSUART_LSR_REG) 76 | & QCA_LSUART_LSR_THRE_MASK; 77 | } while (line_status == 0); 78 | 79 | /* Put data in THR */ 80 | qca_soc_reg_write(QCA_LSUART_THR_REG, (u32)c); 81 | } 82 | 83 | int serial_getc(void) 84 | { 85 | while (!serial_tstc()) 86 | ; 87 | 88 | /* Get data from RBR */ 89 | return qca_soc_reg_read(QCA_LSUART_RBR_REG) 90 | & QCA_LSUART_RBR_RBR_MASK; 91 | } 92 | 93 | int serial_tstc(void) 94 | { 95 | /* Check data ready bit */ 96 | return qca_soc_reg_read(QCA_LSUART_LSR_REG) 97 | & QCA_LSUART_LSR_DR_MASK; 98 | } 99 | 100 | void serial_puts(const char *s) 101 | { 102 | while (*s) 103 | serial_putc(*s++); 104 | } 105 | -------------------------------------------------------------------------------- /u-boot/net/bootp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copied from LiMon - BOOTP. 3 | * 4 | * Copyright 1994, 1995, 2000 Neil Russell. 5 | * (See License) 6 | * Copyright 2000 Paolo Scaffardi 7 | */ 8 | 9 | #ifndef __BOOTP_H__ 10 | #define __BOOTP_H__ 11 | 12 | #ifndef __NET_H__ 13 | #include 14 | #endif 15 | 16 | /**********************************************************************/ 17 | 18 | /* 19 | * BOOTP header. 20 | */ 21 | #if defined(CONFIG_CMD_DHCP) 22 | #define OPT_SIZE 312 /* Minimum DHCP Options size per RFC2131 - results in 576 byte pkt */ 23 | #else 24 | #define OPT_SIZE 64 25 | #endif 26 | 27 | typedef struct 28 | { 29 | uchar bp_op; /* Operation */ 30 | # define OP_BOOTREQUEST 1 31 | # define OP_BOOTREPLY 2 32 | uchar bp_htype; /* Hardware type */ 33 | # define HWT_ETHER 1 34 | uchar bp_hlen; /* Hardware address length */ 35 | # define HWL_ETHER 6 36 | uchar bp_hops; /* Hop count (gateway thing) */ 37 | ulong bp_id; /* Transaction ID */ 38 | ushort bp_secs; /* Seconds since boot */ 39 | ushort bp_spare1; /* Alignment */ 40 | IPaddr_t bp_ciaddr; /* Client IP address */ 41 | IPaddr_t bp_yiaddr; /* Your (client) IP address */ 42 | IPaddr_t bp_siaddr; /* Server IP address */ 43 | IPaddr_t bp_giaddr; /* Gateway IP address */ 44 | uchar bp_chaddr[16]; /* Client hardware address */ 45 | char bp_sname[64]; /* Server host name */ 46 | char bp_file[128]; /* Boot file name */ 47 | char bp_vend[OPT_SIZE]; /* Vendor information */ 48 | } Bootp_t; 49 | 50 | #define BOOTP_HDR_SIZE sizeof (Bootp_t) 51 | #define BOOTP_SIZE (ETHER_HDR_SIZE + IP_HDR_SIZE + BOOTP_HDR_SIZE) 52 | 53 | /**********************************************************************/ 54 | /* 55 | * Global functions and variables. 56 | */ 57 | 58 | /* bootp.c */ 59 | extern ulong BootpID; /* ID of cur BOOTP request */ 60 | extern char BootFile[128]; /* Boot file name */ 61 | extern int BootpTry; 62 | #ifdef CONFIG_BOOTP_RANDOM_DELAY 63 | ulong seed1, seed2; /* seed for random BOOTP delay */ 64 | #endif 65 | 66 | 67 | /* Send a BOOTP request */ 68 | extern void BootpRequest (void); 69 | 70 | /****************** DHCP Support *********************/ 71 | extern void DhcpRequest(void); 72 | 73 | /* DHCP States */ 74 | typedef enum { INIT, 75 | INIT_REBOOT, 76 | REBOOTING, 77 | SELECTING, 78 | REQUESTING, 79 | REBINDING, 80 | BOUND, 81 | RENEWING } dhcp_state_t; 82 | 83 | #define DHCP_DISCOVER 1 84 | #define DHCP_OFFER 2 85 | #define DHCP_REQUEST 3 86 | #define DHCP_DECLINE 4 87 | #define DHCP_ACK 5 88 | #define DHCP_NAK 6 89 | #define DHCP_RELEASE 7 90 | 91 | #define SELECT_TIMEOUT 3 /* Seconds to wait for offers */ 92 | 93 | /**********************************************************************/ 94 | 95 | #endif /* __BOOTP_H__ */ 96 | -------------------------------------------------------------------------------- /host_util/lzma/OutBuffer.cpp: -------------------------------------------------------------------------------- 1 | // OutByte.cpp 2 | 3 | #include "StdAfx.h" 4 | 5 | #include "OutBuffer.h" 6 | 7 | extern "C" 8 | { 9 | #include "C/Alloc.h" 10 | } 11 | 12 | bool COutBuffer::Create(UInt32 bufferSize) 13 | { 14 | const UInt32 kMinBlockSize = 1; 15 | if (bufferSize < kMinBlockSize) 16 | bufferSize = kMinBlockSize; 17 | if (_buffer != 0 && _bufferSize == bufferSize) 18 | return true; 19 | Free(); 20 | _bufferSize = bufferSize; 21 | _buffer = (Byte *)::MidAlloc(bufferSize); 22 | return (_buffer != 0); 23 | } 24 | 25 | void COutBuffer::Free() 26 | { 27 | ::MidFree(_buffer); 28 | _buffer = 0; 29 | } 30 | 31 | void COutBuffer::SetStream(ISequentialOutStream *stream) 32 | { 33 | _stream = stream; 34 | } 35 | 36 | void COutBuffer::Init() 37 | { 38 | _streamPos = 0; 39 | _limitPos = _bufferSize; 40 | _pos = 0; 41 | _processedSize = 0; 42 | _overDict = false; 43 | #ifdef _NO_EXCEPTIONS 44 | ErrorCode = S_OK; 45 | #endif 46 | } 47 | 48 | UInt64 COutBuffer::GetProcessedSize() const 49 | { 50 | UInt64 res = _processedSize + _pos - _streamPos; 51 | if (_streamPos > _pos) 52 | res += _bufferSize; 53 | return res; 54 | } 55 | 56 | 57 | HRESULT COutBuffer::FlushPart() 58 | { 59 | // _streamPos < _bufferSize 60 | UInt32 size = (_streamPos >= _pos) ? (_bufferSize - _streamPos) : (_pos - _streamPos); 61 | HRESULT result = S_OK; 62 | #ifdef _NO_EXCEPTIONS 63 | result = ErrorCode; 64 | #endif 65 | if (_buffer2 != 0) 66 | { 67 | memmove(_buffer2, _buffer + _streamPos, size); 68 | _buffer2 += size; 69 | } 70 | 71 | if (_stream != 0 72 | #ifdef _NO_EXCEPTIONS 73 | && (ErrorCode == S_OK) 74 | #endif 75 | ) 76 | { 77 | UInt32 processedSize = 0; 78 | result = _stream->Write(_buffer + _streamPos, size, &processedSize); 79 | size = processedSize; 80 | } 81 | _streamPos += size; 82 | if (_streamPos == _bufferSize) 83 | _streamPos = 0; 84 | if (_pos == _bufferSize) 85 | { 86 | _overDict = true; 87 | _pos = 0; 88 | } 89 | _limitPos = (_streamPos > _pos) ? _streamPos : _bufferSize; 90 | _processedSize += size; 91 | return result; 92 | } 93 | 94 | HRESULT COutBuffer::Flush() 95 | { 96 | #ifdef _NO_EXCEPTIONS 97 | if (ErrorCode != S_OK) 98 | return ErrorCode; 99 | #endif 100 | 101 | while(_streamPos != _pos) 102 | { 103 | HRESULT result = FlushPart(); 104 | if (result != S_OK) 105 | return result; 106 | } 107 | return S_OK; 108 | } 109 | 110 | void COutBuffer::FlushWithCheck() 111 | { 112 | HRESULT result = Flush(); 113 | #ifdef _NO_EXCEPTIONS 114 | ErrorCode = result; 115 | #else 116 | if (result != S_OK) 117 | throw COutBufferException(result); 118 | #endif 119 | } 120 | -------------------------------------------------------------------------------- /u-boot/include/jffs2/load_kernel.h: -------------------------------------------------------------------------------- 1 | #ifndef load_kernel_h 2 | #define load_kernel_h 3 | /*------------------------------------------------------------------------- 4 | * Filename: load_kernel.h 5 | * Version: $Id: //depot/sw/releases/Aquila_9.2.0_U5/boot/u-boot/include/jffs2/load_kernel.h#1 $ 6 | * Copyright: Copyright (C) 2001, Russ Dill 7 | * Author: Russ Dill 8 | * Description: header for load kernel modules 9 | *-----------------------------------------------------------------------*/ 10 | /* 11 | * 12 | * This program is free software; you can redistribute it and/or modify 13 | * it under the terms of the GNU General Public License as published by 14 | * the Free Software Foundation; either version 2 of the License, or 15 | * (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, MA 02111-1307 USA 25 | * 26 | */ 27 | 28 | #include 29 | 30 | /* mtd device types */ 31 | #define MTD_DEV_TYPE_NOR 0x0001 32 | #define MTD_DEV_TYPE_NAND 0x0002 33 | #define MTD_DEV_TYPE(type) ((type == MTD_DEV_TYPE_NAND) ? "nand" : "nor") 34 | 35 | struct mtd_device { 36 | struct list_head link; 37 | struct mtdids *id; /* parent mtd id entry */ 38 | u16 num_parts; /* number of partitions on this device */ 39 | struct list_head parts; /* partitions */ 40 | }; 41 | 42 | struct part_info { 43 | struct list_head link; 44 | char *name; /* partition name */ 45 | u8 auto_name; /* set to 1 for generated name */ 46 | u32 size; /* total size of the partition */ 47 | u32 offset; /* offset within device */ 48 | void *jffs2_priv; /* used internaly by jffs2 */ 49 | u32 mask_flags; /* kernel MTD mask flags */ 50 | struct mtd_device *dev; /* parent device */ 51 | }; 52 | 53 | struct mtdids { 54 | struct list_head link; 55 | u8 type; /* device type */ 56 | u8 num; /* device number */ 57 | u32 size; /* device size */ 58 | char *mtd_id; /* linux kernel device id */ 59 | }; 60 | 61 | #define ldr_strlen strlen 62 | #define ldr_strncmp strncmp 63 | #define ldr_memcpy memcpy 64 | #define putstr(x) printf("%s", x) 65 | #define mmalloc malloc 66 | #define UDEBUG printf 67 | 68 | #define putnstr(str, size) printf("%*.*s", size, size, str) 69 | #define ldr_output_string(x) puts(x) 70 | #define putLabeledWord(x, y) printf("%s %08x\n", x, (unsigned int)y) 71 | #define led_blink(x, y, z, a) 72 | 73 | #endif /* load_kernel_h */ 74 | --------------------------------------------------------------------------------