月度归档:2020年10月

这个路由器是极路由B70的哥哥,看看天赋异禀在哪里

今天收到一台极路由AX1000,极路由企业版,它和极路由B70硬件十分相似,不同之处是内置MSATA接口的32GB硬盘,并且主板有一块纽扣电池,估计是为了断电后保持时钟的。好了,话不多说,来具体看看配置高在了哪里。

备份本地代码到github

第一步:建立git仓库,cd到你的本地项目根目录下,执行git命令

git init
第二步:将项目的所有文件添加到仓库中

git add .
第三步:将add的文件commit到仓库

git commit -m “注释语句”
第四步:去github上创建自己的Repository

or create a new repository on the command line
echo “# lede” >> README.md
git init
git add README.md
git commit -m “first commit”
git branch -M main
git remote add origin git@github.com:***/lede.git
git push -u origin main

…or push an existing repository from the command line
git remote add origin git@github.com:***/lede.git
git branch -M main
git push -u origin main

后续有更新的话执行以下步骤:

git add .

git commit -m “注释语句”

git branch -M main  (这句是强制重命名分支为main,初始化的时候需要,后续应该不用)
git push -u origin main

 

openwrt编译配置教程以及CPU降频设置

config文件位置:

openwrt config文件:.config
kernel config:build_dir/target-xxxxxxx/linux-x86_generic/linux-x.xx.xx/.config

内核版本更改:

支持内核版本列表: include/kernel-version.mk
更改内核版本位置: target/linux/XXX/Makefile.

3.你要编译的内容 命令 make menuconfig

这里给出一个基本配置,不过其中Busybox配置,正常使用默认配置即可,不需要Customize busybox options,我为了在日后的initramfs中加入一些overlayfs的功能自己加进去了配置,另外的配置基本是x86必须的。

Target System (x86) #目标平台选择
Target Images —>
ext4 #生成.EXT4.IMG文件
Base system —>
<*> block-mount
<*> busybox —> #用于今后`initramfs`支持,可以将所有lib编译到busybox
Customize busybox options
Busybox Settings —>
General Configuration —>
Support –install [-s] to install applet links at runtime
[ ] Don’t use /usr ( [ ] Don’t use /usr 该项不选!,否则无法生成 /usr/sbin/ntpd-hotplug及其他文件,导致busybox-*.ipk生成失败!)
Linux Module Utilities —>
modinfo
Simplified modutils
Accept module options on modprobe command line
Skip loading of already loaded modules
(/lib/modules) Default directory containing modules
Linux System Utilities —>
mdev
Support /etc/mdev.conf
Support subdirs/symlinks
Support regular expressions substitutions when renaming
Support command execution at device addition/removal
Support loading of firmwares
findfs
blkid
Print filesystem type
losetup
lspci
lsusb
mount
Support specifying devices by label or UUID
Filesystem/Volume identification —>
Ext filesystem
fat filesystem
Networking Utilities —>
ftpd
Enable upload commands
Enable workaround for RFC-violating clients
inetd
telnetd
Support standalone telnetd (not inetd only)
tcpsvd
udpsvd
`kernel` modules —>
Block Devices —>
<*> kmod-ata-core
<*> kmod-ata-ahci
<*> kmod-loop
-*- kmod-scsi-core
<*> kmod-scsi-generic
Filesystems —>
<*> kmod-fs-ext4
<*> kmod-fs-ntfs
<*> kmod-fs-vfat
Input modules —>#键盘
-*- kmod-hid
<*> kmod-hid-generic
-*- kmod-input-core
-*- kmod-input-evdev
Native Language Support —>
<*> kmod-nls-cp437 #vfat需要这个
<*> kmod-nls-iso8859-1
<*> kmod-nls-utf8
Network Devices —> #网卡驱动
<*> kmod-macvlan
USB Support —>
-*- kmod-usb-core
<*> kmod-usb-hid #usb键盘
<*> kmod-usb-ohci
<*> kmod-usb-storage
<*> kmod-usb2
<*> kmod-usb3
Wireless Drivers —>#wifi卡驱动
Network —>
<*> hostapd #wifi ap模式
<*> hostapd-common
<*> hostapd-utils
<*> wpa-supplicant
Utilities —>#自选 fdisk等

4.x64固件内核支持等各种特性,命令 make kernel_menuconfig
目的是为了加入x86的多核心以及大内存支持

Processor type and features —>
Symmetric multi-processing support
Processor family (Core 2/newer Xeon) —>#自行选择处理器平台
Supported processor vendors —>#自行选择处理器平台
(2) Maximum number of CPUs #自行编辑
SMT (Hyperthreading) scheduler support#超线程支持
Multi-core scheduler support
High Memory Support (4GB) —>

Device Drivers
< >ATA/ATAPI/MFM/RLL support(DEPRECATED)—>
SCSI device support—>
<*>SCSI generic support (kernel module –> Block Devices –> <*> kmod-scsi-core)
<*>Serial ATA and Parallel ATA drivers—>
<*>AHCI SATA support (kernel module –> Block Devices –> <*> kmod-ata-ahci)
<*>Intel ESB,ICH,PIIX3,PIIX4 PATA/SATA support(默认选中)
<*>VIA SATA support
<*>VIA PATA support
„„(根据你的硬件情况选择)
Multiple devices driver support (RAID and LVM) —>
Network device support —> (网卡驱动支持,根据你的硬件情况选择)
Ethernet driver support —>
Marvell devices
<*> Marvell MDIO interface support
<*> Marvell Yukon Gigabit Ethernet support
<*> Marvell Yukon 2 support
Realtek devices
<*> Realtek RTL-8139 C+ PCI Fast Ethernet Adapter support()
<*> Realtek RTL-8129/8130/8139 PCI Fast Ethernet Adapter support()
<*> Realtek 8169 gigabit ethernet support

设置了Powermanagement and ACPI options->
ACPI(Advanced Configuration and Power Interface)Support后,需要在CPU Frequency scaling –>x86 CPU frequency scaling drivers—> 中选择一个驱动,否则会全速运行!

如果没有设置,在编译时Inter Enhanced SpeedStep (deprecated)一项需要手动确认,其他都默认为“n”。