In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Compile the fw_printenv tool:
Make ARCH=arm CROSS_COMPILE=arm-hisiv300-linux- hi3521a_config
Make ARCH=arm CROSS_COMPILE=arm-hisiv300-linux-
Make ARCH=arm CROSS_COMPILE=arm-hisiv300-linux- env
There is a problem with the compilation: just go to the u-boot directory
Vi include/linux/types.h + 154,
/ / typedef u_int32_t uintmax_t
/ / typedef int32_t intmax_t
Because it's already over in arm-hisiv300-linux/target/usr/include/stdint.h.
two。 Install fw_printenv tools
In the / tools/env directory, copy the compiled fw_printenv to the target's file system, and create a fw_setenv-to-fw_printenv soft chain through "ln-s fw_printenv fw_setenv".
Note that you can use:
Arm-hisiv300-linux-strip fw_printenv
To remove the corresponding symbols to reduce the waste of space
3. The tool also requires a configuration file to get the location information of the ENV area of the uboot. By default, copy the fw_env.config file to the / etc directory of the target's file system. Then modify the configuration file according to the ENV area defined in the uboot configuration and the mtd partition under Linux. For the specific modification method, see the instructions in the fw_env.config file and / tools/env/README file.
Related to migrating ppp:
1: configure the compiled kernel
Ppp,socket and other options are added to the make menuconfig kernel under the main directory of the original kernel code.
In Device Drivers-> Network device support-> PPP (point-to-point protocol), select all ppp options:
Device Drivers->
Network Device Support- >
PPP (point-to-point protocol) support
[*] PPP multilink support
PPP support for async serial ports
PPP support for sync tty ports
SLIP (serial line) support
[*] CSLIP compressed headers
Device Drivers-> Network device support-> Universal TUN/TAP device driver support
Exit, save the configuration, and re-execute make ARCH=arm CROSS_COMPILE=arm-hisiv300-linux- uImage.
Download the uImage under arch/arm/boot/ to the development board to restart the system.
My kernel is set to:
In Device Drivers-> Network device support-> PPP (point-to-point protocol), select all ppp options:
Device Drivers->
Network Device Support- >
PPP (point-to-point protocol) support
[*] PPP multilink support
PPP support for async serial ports
PPP support for sync tty ports
SLIP (serial line) support
[*] CSLIP compressed headers
Device Drivers-> Network device support-> Universal TUN/TAP device driver support
Uninstalled modules need to be loaded using the insmod command. Ko. You can also compile a kernel with these functions directly as above (recommended)
2. Configuration
Enter ppp/ppp-2.4.5/
There are two directories etc.ppp scripts
2.1 modify the ppp-on ppp-on-dialer ppp-off under the source code scripts directory
Then copy it to the / etc/ppp directory
And modify the execution permission, chmod + x ppp-on ppp-off ppp-on-dialer
2.2 when pppd provides authentication information, it may be negotiated to use PAP or CHAP authentication, so you need to modify the pap-secrets and chap-secrets under the source code etc.ppp directory.
Add the required username and password in pap-secrets
Card * card *
Add the required username and password in chap-secrets
Card * card *
Then copy them to the / etc/ppp directory
The corresponding maefile is as follows:
TOOLS_TOP_DIR? = $(shell pwd)
TOOL_TAR_BALL: = ppp-2.4.5.tar.gz
TOOL_NAME: = ppp-2.4.5
TOOL_BIN: = bin
OSDRV_CROSS? = arm-hisiv300-linux
OSDRV_CROSS_CFLAGS? =-mcpu=cortex-a7-mfloat-abi=softfp-mfpu=neon-vfpv4
Subdir: = pppd pppdump pppstats chat
All:
-rm $(TOOLS_TOP_DIR) / $(TOOL_NAME)-rf
Tar-xvf $(TOOL_TAR_BALL)
Mkdir-p $(TOOLS_TOP_DIR) / $(TOOL_NAME) / $(TOOL_BIN) /
Mkdir-p $(TOOLS_TOP_DIR) / $(TOOL_BIN) /
Pushd $(TOOLS_TOP_DIR) / $(TOOL_NAME) /;\
. / configure > / dev/null;\
Make CC=arm-hisiv300-linux-gcc-j 20 > / dev/null;\
For d in $(subdir); do (arm-hisiv300-linux-strip $$TOOLS_TOP_DIR / $(TOOL_BIN)-rf); done
Popd
.PHONY: clean
-pushd $(TOOLS_TOP_DIR) / $(TOOL_NAME) / & &\
Make-C $(TOOLS_TOP_DIR) / $(TOOL_NAME) / clean & &\
Popd
.PHONY: distclean
Distclean:
-rm $(TOOLS_TOP_DIR) / $(TOOL_NAME)-rf
-rm $(TOOLS_TOP_DIR) / $(TOOL_BIN)-rf
Configuration of iptables:
Configure the kernel and compile it to support netfilter
Cd linux-3.10.y
Make ARCH=arm CROSS_COMPILE=arm-hisiv300-linux- menuconfig
[*] Networking support->
Networking options->
Network packet filtering framework (Netfilter)->
Core Netfilter Configuration-- > (select all)
IP: Netfilter Configuration-- > (all selected)
Note: all options here must be built-in [*], not Module [M]. If Module is selected, the iptables module will not be found in the refired system kernel with the modprobe ip_tables command. Another thing to note in the previous step is that the FULL NAT option in IP: Netfilter configuration must be selected, otherwise you will not be able to use the iptables-t nat command
Makefile is modified as follows:
TOOLS_TOP_DIR? = $(shell pwd)
TOOL_TAR_BALL: = iptables-1.6.1.tar.bz2
TOOL_NAME: = iptables-1.6.1
TOOL_BIN: = install
OSDRV_CROSS? = arm-hisiv300-linux
OSDRV_CROSS_CFLAGS? =-mcpu=cortex-a7-mfloat-abi=softfp-mfpu=neon-vfpv4
All:
-rm $(TOOLS_TOP_DIR) / $(TOOL_NAME)-rf
Tar-xvf $(TOOL_TAR_BALL)
Mkdir-p $(TOOLS_TOP_DIR) / $(TOOL_BIN) /
Pushd $(TOOLS_TOP_DIR) / $(TOOL_NAME) /;\
. / configure-- host=$ (OSDRV_CROSS)-- prefix=$ (TOOLS_TOP_DIR) / $(TOOL_BIN)\
-enable-static-- disable-shared-- disable-ipv6-- disable-nftables\
-- disable-largefile > / dev/null;\
Make-j 20 > / dev/null;\
Make install > / dev/null;\
Arm-hisiv300-linux-strip $(TOOLS_TOP_DIR) / $(TOOL_BIN) / sbin/xtables-multi
Rm-rf $(TOOLS_TOP_DIR) / $(TOOL_BIN) / sbin/iptables*
Mv $(TOOLS_TOP_DIR) / $(TOOL_BIN) / sbin/xtables-multi $(TOOLS_TOP_DIR) / $(TOOL_BIN) / sbin/iptables
Popd
.PHONY: clean
Clean:
-pushd $(TOOLS_TOP_DIR) / $(TOOL_NAME) / & &\
Make-C $(TOOLS_TOP_DIR) / $(TOOL_NAME) / clean & &\
Popd
.PHONY: distclean
Distclean:
-rm $(TOOLS_TOP_DIR) / $(TOOL_NAME)-rf
-rm $(TOOLS_TOP_DIR) / $(TOOL_BIN)-rf
Related to porting e2fsprogs
TOOLS_TOP_DIR? = $(shell pwd)
TOOL_TAR_BALL: = e2fsprogs-1.41.11.tar.gz
TOOL_NAME: = e2fsprogs-1.41.11
TOOL_BIN: = bin
OSDRV_CROSS? = arm-hisiv300-linux
OSDRV_CROSS_CFLAGS? =-mcpu=cortex-a7-mfloat-abi=softfp-mfpu=neon-vfpv4
All:
-rm $(TOOLS_TOP_DIR) / $(TOOL_NAME)-rf
Tar-xzf $(TOOL_TAR_BALL)
Mkdir-p $(TOOLS_TOP_DIR) / $(TOOL_NAME) / $(TOOL_BIN) /
Mkdir-p $(TOOLS_TOP_DIR) / $(TOOL_BIN) /
Pushd $(TOOLS_TOP_DIR) / $(TOOL_NAME) /;\
. / configure-- host=$ (OSDRV_CROSS) CFLAGS= "$(OSDRV_CROSS_CFLAGS)"\
LDFLAGS= "$(OSDRV_CROSS_CFLAGS)"-- prefix=$ (TOOLS_TOP_DIR) / $(TOOL_NAME) / $(TOOL_BIN)\
-- disable-tls > / dev/null;\
Make-j 20 > / dev/null;\
Make install > / dev/null;\
Cp $(TOOL_BIN) / sbin/mkfs.ext2 $(TOOLS_TOP_DIR) / $(TOOL_BIN)-rf;\
Cp $(TOOL_BIN) / sbin/mkfs.ext3 $(TOOLS_TOP_DIR) / $(TOOL_BIN)-rf;\
Cp $(TOOL_BIN) / sbin/mkfs.ext4 $(TOOLS_TOP_DIR) / $(TOOL_BIN)-rf;\
Cp $(TOOL_BIN) / sbin/mke2fs $(TOOLS_TOP_DIR) / $(TOOL_BIN)-rf;\
Popd
.PHONY: clean
-pushd $(TOOLS_TOP_DIR) / $(TOOL_NAME) / & &\
Make-C $(TOOLS_TOP_DIR) / $(TOOL_NAME) / clean & &\
Popd
.PHONY: distclean
Distclean:
-rm $(TOOLS_TOP_DIR) / $(TOOL_NAME)-rf
-rm $(TOOLS_TOP_DIR) / $(TOOL_BIN)-rf
The top-level makefile is as follows:
Subdir:=ppp iptables e2fsprogs udev reg-tools bftpd
TOP_DIR:=$ (shell pwd)
TOP_BIN:=bin
TOP_ETC:=etc
All:
Mkdir-p $(TOP_DIR) / $(TOP_BIN)
Mkdir-p $(TOP_DIR) / $(TOP_ETC)
For d in $(subdir); do (make-C $$d); done
Cp creat_softlink.sh $(TOP_DIR) / $(TOP_BIN) & & chmod axix $(TOP_DIR) / $(TOP_BIN) / creat_softlink.sh
For d in $(subdir); do (cp $$dash $(TOP_BIN) / * $(TOP_DIR) / $(TOP_BIN)-rf); done
For d in $(subdir); do (cp $$dash $(TOP_ETC) / * $(TOP_DIR) / $(TOP_ETC)-rf); done
.PHONY: clean distclean
Clean:
For d in $(subdir); do (make clean-C $$d); done
Distclean:
-rm $(shell pwd) / bin-rf
-rm $(shell pwd) / etc-rf
For d in $(subdir); do (make distclean-C $$d); done
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.