Skip to content

wberube/wbr1310

 
 

Repository files navigation

Planned modifications :
	- Strip unuseful debugging symbols and ELF headers using sstrip
	- Try cramfs compression for saving some precious RAM memory
	- Optimize the Busybox toolset, add scripts (and hopefully update it)
	- Remove as much proprietary code as possible in a new branch for ports


o This file contains steps for building toolchain and building the image.

Step 1. Install fedora linux 12 (choose Software Development) on 32bit CPU.
 -OR-
        On Debian, `sudo apt-get install bison flex gettext ncurses-dev`

Step 2. Building the toolchain

  1) Please login as a normal user such as john, and copy the gpl file to normal user folder,
     such as the folder /home/john

  2) $cd /home/john

  3) $git clone https://github.com/jcomeauictx/wbr1310.git

  4) $cd wbr1310

  5) $./build_tool_chain.sh

	  Please choose the "Target Processor Architecture" as "Generic (MIPS I) (CONFIG_MIPS_ISA_1)",
	  and keep other settings as the default value.

		*
		* Target Architecture Features and Options
		*
		Target Processor Architecture
		> 1. Generic (MIPS I) (CONFIG_MIPS_ISA_1) (NEW)
		  2. MIPS II (CONFIG_MIPS_ISA_2) (NEW)
		  3. MIPS III (CONFIG_MIPS_ISA_3) (NEW)
		  4. MIPS IV (CONFIG_MIPS_ISA_4) (NEW)
		  5. MIPS32 (CONFIG_MIPS_ISA_MIPS32) (NEW)
		  6. MIPS64 (CONFIG_MIPS_ISA_MIPS64) (NEW)
		choice[1-6?]: 1
		Target Processor Endianness
		  1. Little Endian (ARCH_LITTLE_ENDIAN)
		> 2. Big Endian (ARCH_BIG_ENDIAN)
		choice[1-2?]: 2
		Target CPU has a memory management unit (MMU) (ARCH_HAS_MMU) [Y/n/?] (NEW)
		Enable floating point number support (UCLIBC_HAS_FLOATS) [Y/n/?] y
	  	  Target CPU has a floating point unit (FPU) (HAS_FPU) [Y/n/?] (NEW)

		*
		* General Library Settings
		*
		Generate Position Independent Code (PIC) (DOPIC) [Y/n/?] y
		Enable support for shared libraries (HAVE_SHARED) [Y/n/?] y
		Compile native shared library loader (BUILD_UCLIBC_LDSO) [Y/n/?] (NEW)
		  Only load shared libraries which can share their text segment (FORCE_SHAREABLE_TEXT_SEGMENTS) [N/y/?] n
		  Native shared library loader 'ldd' support (LDSO_LDD_SUPPORT) [Y/n/?] y
		  Enable shared library loader cache (LDSO_CACHE_SUPPORT) [Y/n/?] y
		  Enable shared library loader preload file support (LDSO_PRELOAD_FILE_SUPPORT) [N/y/?] n
			Shared library loader naming prefix (LDSO_BASE_FILENAME) [ld.so] ld.so
		  Enable ELF RUNPATH tag support (LDSO_RUNPATH) [N/y/?] n
		uClibc 0.9.27 compatibility (DL_FINI_CRT_COMPAT) [N/y/?] (NEW)

  6) If you see the following messages,

	  c-parse.y:1664.19-20: $$ for the midrule at $4 of `structsp_attr' has no declared type
	  c-parse.y:1674.19-20: $$ for the midrule at $4 of `structsp_attr' has no declared type
	  c-parse.y:1682.19-20: $$ for the midrule at $4 of `structsp_attr' has no declared type
	  c-parse.y:1687.19-20: $$ for the midrule at $3 of `structsp_attr' has no declared type
	  make[2]: *** [/home/john/wbr1310/buildroot/toolchain_build_mips/gcc-3.3.5/gcc/c-parse.c] Error 1
	  make[2]: Leaving directory `/home/john/wbr1310/buildroot/toolchain_build_mips/gcc-3.3.5-initial/gcc'
	  make[1]: *** [all-gcc] Error 2
	  make[1]: Leaving directory `/home/john/wbr1310/buildroot/toolchain_build_mips/gcc-3.3.5-initial'
	  make: *** [/home/john/wbr1310/buildroot/toolchain_build_mips/gcc-3.3.5-initial/.compiled] Error 2
	  make: Leaving directory `/home/john/wbr1310/buildroot'

	 then goto 7), else goto 10)

  7) $patch -p0 < c-parse.y.patch

  8) $patch -p0 < collect2.c.patch

  9) $make -C buildroot  # you can skip this step, as step 9 does it also

  10) $./build_tool_chain.sh

  11) After build toolchain successfully, you will get the prompt line,
	  "Use source ./setupenv to setup your environment variables !"


Step 3. You can use the toolchain to build image now.

  1) $source ./setupenv

  2) $make

  3) $cd kernel

  4) $cp wrgg19.config .config
  
  5) $make menuconfig
	
	  a) Choose <Exit> at the bottom of the menu
	
	  b) Do you wish to save your new kernel configuration?
		 Choose <Yes>		  
  
  6) $make

  7) $make

  8) $cd .. (pwd is /home/john/wbr1310)

  9) $make

  10) After make successfully, you will find the image file in ./images/.

	  Upgrade the new firmware by web interface provide by device, 
	  then you will get your specific image.

Other possible steps:

  *) You can add busybox apps by:

          a) $make -C userland/busybox-1.00/ menuconfig

          b) $make -C userland/busybox-1.00/ install

          c) $make  # there is no need to rebuild the entire codebase

          *) You can then integrate your changes from 
             userland/busybox-1.00/.config to
             boards/wrgg19/busybox-1.00.config:
	
	     $make -C userland/busybox-1.00/ bb_updatedefaults

About

The source code of D-Link' WBR1310 firmware as a playground for light Linux builds

Resources

License

Unknown, GPL-2.0 licenses found

Licenses found

Unknown
LICENSE.txt
GPL-2.0
GPL_License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 94.3%
  • Assembly 3.6%
  • Makefile 0.8%
  • PHP 0.3%
  • Shell 0.3%
  • C++ 0.3%
  • Other 0.4%