Openwrt其他注意事项

http://blog.csdn.net/u013177084/article/details/77115088

https://wenku.baidu.com/view/efb373ab50e2524de4187e1a.html

其他版本openwrt

[email protected]:qingkongwuxian/openwrt-u2.git

https://github.com/WalkWifi/lede-u2.git

https://github.com/WRTnode/openwrt.git
wget http://d.wrtnode.com/sdk/sdk.tar.bz2

git clone失败

由于网络环境的不同,很经常出现https不能clone,git可以clone

通过https://git.openwrt.org/project/rpcd.git clone一直失败,改成git

package/system/rpcd/Makefile

 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL=$(OPENWRT_GIT)/project/rpcd.git
+PKG_SOURCE_URL=git://git.openwrt.org/project/rpcd.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)
 PKG_SOURCE_VERSION:=73aea9b8b621a1ce034bc6ee00c9d058a40c8a3d
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz

make成功却不生成openwrt-ramips-mt7628-mt7628-squashfs-sysupgrade.bin

ralink/Kconfig:206:warning: 'RT_FIRST_CARD': number is invalid
ralink/Kconfig:207:warning: 'RT_FIRST_CARD': number is invalid
ralink/Kconfig:208:warning: 'RT_FIRST_CARD': number is invalid
ralink/Kconfig:221:warning: 'RT_SECOND_CARD': number is invalid
ralink/Kconfig:222:warning: 'RT_SECOND_CARD': number is invalid
ralink/Kconfig:223:warning: 'RT_SECOND_CARD': number is invalid
ralink/Kconfig:224:warning: 'RT_SECOND_CARD': number is invalid
.config:822:warning: override: DEFAULT_NOOP changes choice state
*
* Restart config...
*
*
* Machine selection
*
System type
  1. Ralink MT7620 board (RALINK_MT7620)
  2. Ralink MT7621 board (RALINK_MT7621)
> 3. Ralink MT7628 board (RALINK_MT7628)
choice[1-3]: 3
Soc Hardware Type
  1. MT7628-FPGA (MT7628_FPGA)
> 2. MT7628-ASIC (MT7628_ASIC)
choice[1-2]: 2
DRAM Size
  1. 8M (RT2880_DRAM_8M)
  2. 16M (RT2880_DRAM_16M)
  3. 32M (RT2880_DRAM_32M)
> 4. 64M (RT2880_DRAM_64M)
  5. 128M (RT2880_DRAM_128M)
  6. 256M (RT2880_DRAM_256M)
choice[1-6]: 4
Flash Type
> 1. SPI (MTD_SPI_RALINK)
choice[1]: 1
Dual Image (DUAL_IMAGE) [N/y] n
Kernel NVRAM (KERNEL_NVRAM) [Y/n] y
Root File System Type
  1. RootFS_in_RAM (RT2880_ROOTFS_IN_RAM)
> 2. RootFS_in_FLASH (RT2880_ROOTFS_IN_FLASH)
choice[1-2]: 2
No Padding between Kernel and RootFS (ROOTFS_IN_FLASH_NO_PADDING) [N/y] n
MTD Kernel Partition Size (Unit:Bytes) (MTD_KERNEL_PART_SIZ) [0xD0000] (NEW) Ralink Hardware Timer0/Timer1 (RALINK_TIMER) [N/m/y] n
Ralink CPU Sleep mode (RALINK_CPUSLEEP) [N/y] n
Ralink System Tick Counter (RALINK_SYSTICK) [N/y] n
#
# configuration written to .config
#
make[5]: Leaving directory `/home/linye/openwrt-3.10.14/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7628/linux-3.10.14-p112871'
make[5]: Entering directory `/home/linye/openwrt-3.10.14/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7628/linux-3.10.14-p112871'
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CC      scripts/mod/devicetable-offsets.s
  GEN     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTLD  scripts/mod/modpost
  CC [M]  drivers/char/i2c_drv.o
drivers/char/i2c_drv.c: In function 'i2cdrv_ioctl':
drivers/char/i2c_drv.c:1111:3: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long unsigned int' [-Wformat=]
   printk("i2c clkdiv = %d\n",clkdiv_value);
   ^
  Building modules, stage 2.
  MODPOST 65 modules
  LD [M]  drivers/char/i2c_drv.ko
make[5]: Leaving directory `/home/linye/openwrt-3.10.14/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7628/linux-3.10.14-p112871'
touch /home/linye/openwrt-3.10.14/build_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/linux-ramips_mt7628/linux-3.10.14-p112871/.modules
make -C image compile TARGET_BUILD=
make[5]: Entering directory `/home/linye/openwrt-3.10.14/target/linux/ramips/image'
make[5]: `compile' is up to date.
make[5]: Leaving directory `/home/linye/openwrt-3.10.14/target/linux/ramips/image'
make[4]: Leaving directory `/home/linye/openwrt-3.10.14/target/linux/ramips'
make[3]: Leaving directory `/home/linye/openwrt-3.10.14/target/linux'
make[2]: Leaving directory `/home/linye/openwrt-3.10.14'
make[2]: Entering directory `/home/linye/openwrt-3.10.14'
rm -rf /home/linye/openwrt-3.10.14/staging_dir/target-mipsel_24kec+dsp_uClibc-0.9.33.2/root-ramips
make[2]: Leaving directory `/home/linye/openwrt-3.10.14'
make[2]: Entering directory `/home/linye/openwrt-3.10.14'
make[3]: Entering directory `/home/linye/openwrt-3.10.14/package/libs/toolchain'

查看openwrt-sdk/target/linux/ramips/image/Makefile 可知SDK可以支持最大32M的flash,默认选择的是8M的,由于添加了很多软件包导致image的大小超过8M,所以不能生成sysupgrade.bin。将默认的Default8M改成Default16M就可以了

Image/Build/Profile/MT7628=$(call BuildFirmware/Default8M/$(1),$(1),mt7628,MT7628)

改成

Image/Build/Profile/MT7628=$(call BuildFirmware/Default16M/$(1),$(1),mt7628,MT7628)

硬件改成8Mflash
https://blog.csdn.net/zhongvv/article/details/40343465

最后把703N_8M.bin写入8M flash,再把这个flash焊在板上即可。
分析:
1.更新固件不会更新art和uboot
2.固件不会有4M或者8M之分,但如果固件大小超过了4M,必须使用8M的flash。
3.uboot能够自动识别4M或是8M flash。但要求:
当使用4M flash时, art
存在地址为0x3f0000,长度为64K连续空间中
使用 8M flash,art存在0x7f0000,长度为64K连续空间中。
4.不管是4M还是8M flash boot的起始地址相同

你可能感兴趣的:(Openwrt其他注意事项)