http://blog.chinaunix.net/uid/16979052.html
全部博文(286)
发布时间:2012-06-27 17:17:16
#ifndef __KERNEL_MULTIBOOT_H#define __KERNEL_MULTIBOOT_H/** The magic number for the Multiboot header. */#define MULTIBOOT_HEADER_MAGIC 0x1BADB002/** The flags for the Multiboot header. */#define MULTIBOOT_HEADER_FLAGS 0x00000003/** Marks an ELF-compatible executable. .........【阅读全文】
发布时间:2012-06-27 17:14:56
#include #include #include static int early_serial_base = 0x3f8; /*ttyS0*/#define XMTRDY 0x20#define DLAB 0x80#define TXR 0 /*Transmit register(WRITE)*/#define RXR 0 /*Receive register(READ)*/#define IER 1 /*Interrupt Enable*/#define IIR 2 /*Interrupt.........【阅读全文】
发布时间:2012-06-27 16:00:07
echo "1" > /proc/sys/net/ipv4/ip_forwardiptables -A POSTROUTING -t nat -o ppp0 -j MASQUERADEiptables -A POSTROUTING -t nat -o ppp1 -j MASQUERADEip route replace default scope global nexthop dev ppp0 nexthop dev ppp1ip route flush cache......【阅读全文】
发布时间:2012-06-27 10:48:23
#include #include /*Check if the bit BIT in FLAGS is set.*/#define CHECK_FLAG(flags,bit) ((flags) & (1 << (bit)))struct MultibootInfo bootInfo;extern void early_serial_init();void setup_param(uint8_t *addr, int magic){ early_serial_init(); struct Multiboot.........【阅读全文】