I. In general, it can be divided into four points.
1: ARM Linux kernel supports PPP
2: Install ppp-2.4.4 (RP-pppoe requires support from PPP for normal operation ).
3: Install RP-pppoe.
4: download the file generated in step (2) (3) to the target board, and modify it as prompted.
Ii. required packages
RP-pppoe and PPP are required for porting. I use a combination of rp-pppoe3.10 and ppp-2.4.4.
Iii. Specific Process
1:Configure and compile the kernel
Make menuconfig in the main directory of the original kernel code
-> Device Drivers-> network device support-> PPP (Point-to-Point Protocol), select all PPP options. Exit, save the configuration, and re-Execute make zimage.
Download zimage under ARCH/ARM/boot/to the Development Board and restart the system.
2: Install ppp-2.4.4
Download ppp-2.4.4.tar (http://www.sfr-fresh.com/linux/misc/ppp-2.4.4.tar.gz/) unzip. Go to the source code directory. Run./configure.
After completion. Execute make. Cross-compilation is required here. Therefore, here I specify cc as arm GCC, and the entire command is
Make cc = arm-Linux-gcc
(Note: Here is the cross compiler on your own machine, depending on the specific name)
After compilation, go to the pppd directory and copy the generated pppd executable file to the target board file.SystemUnder/usr/sbin.
3: Install rp-pppoe3.10
Download the rp-pppoe3.10 (http://www.roaringpenguin.com/products/pppoe), unzip the source code. Go to the source code directory. Then go to the src directory.
Then, perform cross-compilation. Based on experience, use./confiugre -- Host = arm-LinuxCommandConfiguration, but cannot pass. After confiuge is executed, report
CheckingLinux2.6.x kernel-mode pppoe support... cross-compiling, default:
No
Checking packing order of bit fields... no defaults for cross-Compiling
And then quit the confiugre program.
The Configure program is actually a sh script, which is opened in the editor. After careful viewing, it turns out that this script does not support cross_compiling at all. When it is detected that you want to perform cross-compilation, it will automatically exit. Solution 1: add relevant code to the script, and use./configure to generate non-Cross-compiled makefile, and then manually modify GCC to arm-Linux-GCC.
Method 2. After you execute./configure, the program reports two makefile files, one under SRC and the other under libevent. Directly replace
After compilation, pppoe, pppoe-server, pppoe-sniff, and pppoe-relay are generated in the src directory. Download these programs to the/usr/sbin directory of the target machine.
Copy ConfigurationFile
The rp-pppoe-3.10/configs directory is the configuration file required by RP-pppoe, copy all of these files to the/etc/PPP directory of the target machine (create one if not ).
DialingThere are 6 related script programs in rp-pppoe-3.10/scripts.
Pppoe-setup: the configuration program stores the entered account and password in the configuration file.
Pppoe-start: a dialup program that connects to the network.
Pppoe-stop: disconnected.
Pppoe-status: view the connection status.
Pppoe-Connect: connects to the network and is called by pppoe-start.
Pppoe-init: initialization, called by other programs.
Put these scripts in the/usr/sbin directory.
4:Test run on the target board
Run pppd. If the following prompt appears:
Pppd: pppd is unable to open the/dev/PPP device.
You need to create the/dev/PPP device node
Executing the following command as root:
Mknod/dev/ppp c 108 0
Then run the command mknod/dev/ppp c 108 0 as prompted, and run pppd again. If garbled characters appear, the installation of pppd is successful.
If the following information appears. It indicates that your kernel may not support PPP (fix this according to the above)
./Pppd: This system lacks Kernel support for PPP. This cocould be because
The PPP kernel module cocould not be loaded, or because PPP was not
Encoded in the Kernel configuration. If PPP was encoded as
Module, try '/sbin/modprobe-v ppp'. If that fails, check that
PPP. O exists in/lib/modules/'uname-R'/net.
See readme. Linux file in the PPP distribution for more details
If the kernel runs and runs pppd again, wait for a while and garbled characters appear, it indicates that pppd is working properly.
Modify the angular: pppoe-setup change pppd to pppd =/usr/sbin/pppd (where you put the pppd executable program). Otherwise, an error is reported, indicating that pppd cannot be found, not installed.
Run pppoe-setup and enter the parameters required for dialing as prompted (the record name and password provided by the ISP ). Make sure that the directory where the configuration file of RP-pppoe is located is writable, that is,/etc/PPP. Otherwise, the parameter cannot be saved.
./Pppoe-setup (the following are some instructions for your reference)
> Enter your pppoe User name: -- enter the User Name of the dial-up account.
> Enter the Ethernet interface connected to the ADSL modem for Solaris, this is likely to be something like/dev/hme0. for Linux, it will be ethn, where n is a number. (default eth0): -- enter eth0 (depending on the situation)
> Enter the demand value (default no): -- enter NO
> Enter the DNS information here: -- enter the IP address (eg: 69.45.45.34) (depending on the IP address of the local carrier's DNS server)
> Please enter your pppoe password: -- enter the Netcom User Password
> Choose a type of firewall (0-2): -- enter 0 (0 indicates no firewall)
> Accept these settings and adjust configuration files (y/n )? -- Input y
After pppoe-start is executed. Connected is displayed! The prompt indicates that ADSL has been dial-up successfully. You can ping Google to see if it is okay.
Ping www.google.com