【Linux102】14-kernel/system_call.s


公粽号「专注Linux」,专注Linux内核开发

Linux102系列会详细讲解Linux0.11版本中的102个文件,本文讲解linux0.11的第14个文件kernel/system_call.s的文件源码。

1.kernel/system_call.s的主要作用

本程序主要实现系统调用(system_call)中断int0x80的入口处理过程以及信号检测处理(从代码80行开始),同时给出了两个系统功能的底层接口,分别是sys_execvesys_fork

还列出了类似处理协处理器出错(int 16)、设备不存在(int 7)、时钟中断(int 32)、硬盘中断(int 46)、软盘中断(int 38)的中断处理程序。

2. 软硬中断的不同处理方式

1.软中断

首先调用相应的C函数处理程序作为准备,将一些参数压入栈帧,然后调用C函数进行相应功能的处理,处理返回后,再去检测当前任务的信号位图,对值小的一个信号进行处理复位信号位图中的该信号。

系统调用的C函数分布在整个Linux内核代码中,由include/linux/sys.h头文件中的系统函数指针数组表如下:

include/linux/sys.h中的系统函数指针数组表

来匹配。

2.硬中断

对于硬件中断请求信号IRQ发来的中断,其处理过程首先是向中断控制芯片8259A发送结束硬件中断控制字指令EOI,然后调用相应的C函数处理程序。对于时钟中断也要对当前任务的信号位图进行检测处理

系统中断调用处理的整个流程如下:

系统中断调用处理的整个流程

注,本节源码涉及写外部端口,所以这里需要掌握端口的知识:【汇编语言】14-端口

3.源码注释版本

; system_call.s文件包含系统调用底层处理子程序。由于有些代码比较类似,所以同时也包括时钟处理(timer-interrupt)句柄。
;硬盘和软盘的中断处理程序也在这里。注意,这段代码处理信号(signal)识别,在每次时钟中断和系统调用之后都会进行识别。
; 一般中断过程不就进行信号识别,因为会给系统造成混乱。

; 从系统调用返回时,堆栈的内容如下:
/*
 * Stack layout in 'ret_from_system_call':
 *
 *	 0(%esp) - %eax
 *	 4(%esp) - %ebx
 *	 8(%esp) - %ecx
 *	 C(%esp) - %edx
 *	10(%esp) - %fs
 *	14(%esp) - %es
 *	18(%esp) - %ds
 *	1C(%esp) - %eip
 *	20(%esp) - %cs
 *	24(%esp) - %eflags
 *	28(%esp) - %oldesp
 *	2C(%esp) - %oldss
 */

;  这是SIG_CHLD信号,当子进程终止时,会发送SIG_CHLD信号给父进程。通知子进程停止或者结束。

SIG_CHLD	= 17

; 堆栈中每个寄存器的偏移位置。
EAX		= 0x00
EBX		= 0x04
ECX		= 0x08
EDX		= 0x0C
FS		= 0x10
ES		= 0x14
DS		= 0x18
EIP		= 0x1C
CS		= 0x20
EFLAGS		= 0x24
OLDESP		= 0x28 # 当有特权级变化时,旧的ESP值。
OLDSS		= 0x2C # 当有特权级变化时,旧的SS值。

; 以下是任务结构(task_struct)中变量的偏移值,参见include/linux/sched.h,77行。
state	= 0		# 进程状态码
counter	= 4     # 任务进行时间计数(递减)(滴答数),运行时间片
priority = 8    # 进程优先级,任务开始时counter=priority,越大则运行时间越长
signal	= 12    # 信号位图,每一个比特位代表一种信号,信号值=位偏移值+1.
sigaction = 16		# sigaction结构体必须是16字节.信号执行属性结构数组的偏移值,对应信号将要执行的操作和标志信息。
blocked = (33*16)   #受阻塞信号位图的偏移量。

# offsets within sigaction 
# 这是定义在sigaction结构体中的偏移量,参见include/signal.h,第48行开始。

sa_handler = 0 # 信号处理过程的句柄
sa_mask = 4 # 信号屏蔽字,在信号处理过程中,屏蔽某些信号。
sa_flags = 8 # 信号集
sa_restorer = 12 # 恢复函数指针,参见linux/signal.c程序。

nr_system_calls = 74 # 该版本的Linux内核的系统调用总数


# 在使用软驱时收到了并行打印机中断,但现在可以不管它。

.globl system_call,sys_fork,timer_interrupt,sys_execve
.globl hd_interrupt,floppy_interrupt,parallel_interrupt
.globl device_not_available, coprocessor_error

.align 2 # 内存4字节对齐(2^2=4)
bad_sys_call: # 错误的系统调用号从这里返回。
	movl $-1,%eax # eax中置-1,退出中断。
	iret

.align 2 
reschedule: # 重新执行调度程序入口。调度程序schedule在(kernel/sched.c,104)。
	pushl $ret_from_sys_call # 将ret_from_sys_call的地址入栈(101)。
	jmp schedule 

.align 2
system_call:  
	cmpl $nr_system_calls-1,%eax # 调用号如果超出范围的话,就在eax中置-1,并退出。
	ja bad_sys_call
	push %ds # 保存原段寄存器值。
	push %es
	push %fs
	pushl %edx # ebx,ecx,edx入栈。里面都放着系统调用相应的C语言函数的调用参数。
	pushl %ecx		# 
	pushl %ebx		# to the system call
	movl $0x10,%edx		# ds、es指向内核数据段(全局描述符表中的数据段描述符)。
	mov %dx,%ds 
	mov %dx,%es
	movl $0x17,%edx		# fs指向局部数据段(全局描述符表中的数据段描述符)。
	mov %dx,%fs

    # 调用地址=sys_call_table+调用号(%eax)*4。对应C程序中的sys_call_table在include/linux/sys.h中,
    # 其中定义了系统调用的C语言函数地址数组sys_call_table,一共是74个。
	call *sys_call_table(,%eax,4)
	pushl %eax # 把系统调用返回值入栈。
	movl current,%eax # 取当前任务数据结构地址到eax里面

    # 检查任务状态和时间片是否为0。也即,查看当前任务是不是就绪状态,如果不在就绪状态,(state!=0)就去执行调度程序。
    # 如果在就绪状态,但是时间片用完了(counter==0),则也去执行调度程序。

	cmpl $0,state(%eax)		# state 查看任务状态
	jne reschedule
	cmpl $0,counter(%eax)		# counter 查看任务时间片是否为0
	je reschedule


    # 以下这段代码执行从系统调用C函数返回后,对信号量进行识别处理。
ret_from_sys_call:

    # 首先判断当前任务是不是task[0],如果是,就直接返回。因为task[0]是初始化任务,
    # 它没有信号量,所以不需要处理信号量。

	movl current,%eax		# task[0] cannot have signals
	cmpl task,%eax
	je 3f

    # 通过对原调用程序代码选择符的检查来判断调用程序是否是内核中的任务(例如任务0)。如果是,直接退出。
    # 如果不是,就需要进行信号量的处理。
    # 这里比较选择符是否为普通用户代码段的选择符0x000f(RPL=3,局部表,第1个段(代码段)),如果不是则跳转退出中断程序。

	cmpw $0x0f,CS(%esp)		# 检查旧代码段是否为内核态?是就退出。
	jne 3f
	cmpw $0x17,OLDSS(%esp)		# 检查旧栈段是否为用户态?不在就退出。
	jne 3f

    # 下面这段代码的用途是首先取当前任务结构中的信号位图(32位,每一位代表一种信号),然后用任务结构中的信号阻塞(屏蔽) 码,
    # 阻塞不允许的信号位,取的数值最小的信号值,再把原信号位图中该信号对应的位复位(0),最后将该信号值作为参数之一调用do_signal().
    # do_signal()(kernel/signal.c,82)中,其参数包括13个入栈的信息。

	movl signal(%eax),%ebx  # 取信号位图->ebx,1位代表1种信号,32个信号。
	movl blocked(%eax),%ecx # 取阻塞(屏蔽)信号位图->ecx。
	notl %ecx # 每位取反。
	andl %ebx,%ecx # 获得许可的信号位图
	bsfl %ecx,%ecx # 从低位(0)开始扫描位图,看是否有1的位。如有,则ecx保留该位的偏移值(即第几位 0-31)
	je 3f 

	btrl %ecx,%ebx # 复位该信号(ebx含有原signal位图)。 
	movl %ebx,signal(%eax) # 重新保存signal位图信息->current->signal.
	incl %ecx # 将信号调整为从1开始的数(1-32)
	pushl %ecx # 信号值入栈作为调用do_signal的参数之一
	call do_signal # 调用c函数信号处理程序(kernel/signal.c,82)
	popl %eax # 弹出信号值。

3:	popl %eax
	popl %ebx
	popl %ecx
	popl %edx
	pop %fs
	pop %es
	pop %ds
	iret


# int16--下面这段代码处理协处理器发出的出错信号。跳转执行c函数match_error()
# (kernel/math/math_emulate.c ,82),返回后跳转到ret_from_sys_call处继续执行。

.align 2
coprocessor_error:
	push %ds
	push %es
	push %fs
	pushl %edx
	pushl %ecx
	pushl %ebx
	pushl %eax
	movl $0x10,%eax # ds,es置为指向内核数据段
	mov %ax,%ds 
	mov %ax,%es
	movl $0x17,%eax
	mov %ax,%fs # fs置为指向局部数据段(出错程序的数据段)。

    # 把下面调用你返回的地址入栈。
	pushl $ret_from_sys_call 

    # 执行C函数math_error(),(kernel/math/math_emulate.c ,37)
	jmp math_error 


# int7--若设备不存在或协处理器不存在。

# 若控制寄存器CRO的EM标志置位,则**当CPU执行一个转移指令时**就会引发该中断,这样就可以有机会让这个中断处理程序模拟转移指令(169)
# CR0 的TS标志是在CPU执行任务转换时设置的。TS可以用来确定什么时候协处理器中的内容和CPU正在执行的任务不匹配了。
# 当CPU在运行一个转移指令时,发现TS置位了,就会引发该中断。此时就恢复新任务的协处理器执行状态(165)。 
# 参见(kernel/sched.c,77)中的说明,该中断最后将转移到标号ret_from_sys_call处执行(检测并处理信号).align 2
device_not_available:
	push %ds
	push %es
	push %fs
	pushl %edx
	pushl %ecx
	pushl %ebx
	pushl %eax
	movl $0x10,%eax # ds、es置为指向内核数据段
	mov %ax,%ds
	mov %ax,%es
	movl $0x17,%eax # fs置为指向局部数据段(出错程序的数据段)
	mov %ax,%fs
	pushl $ret_from_sys_call # 把下面跳转或调用的返回地址入栈。
	clts				# clear TS so that we can use math
	movl %cr0,%eax 
	testl $0x4,%eax			# EM (math emulation bit)

	je math_state_restore # 如果不是EM引起的中断,则回复新任务协处理器状态,执行

	pushl %ebp            # C函数math_state_restore()(kernel.sched.c,77)
	pushl %esi 
	pushl %edi

	call math_emulate # 调用C函数math_emulate(kernel/math/math_emulate.c,18)

	popl %edi
	popl %esi
	popl %ebp
	ret


# int32--(int 0x20)时钟中断处理程序。中断频率为100hz,也就是100/秒。(include/linux/sched.h,5)
# 定时芯片8253/8254是在(kernel/sched.c,406)处初始化的。因此这里的jifiies每10ms加1.
# 这段代码将jiffies增加1,发送结束中断执行给8259控制器,然后用当前特权级作为参数调用C函数do_timer(long cpl)。
# 当调用返回时转去检测并处理信号。

.align 2
timer_interrupt:
	push %ds		# save ds,es and put kernel data space
	push %es		# into them. %fs is used by _system_call
	push %fs
	pushl %edx		# we save %eax,%ecx,%edx as gcc doesn’t
	pushl %ecx		# save those across function calls. %ebx
	pushl %ebx		# is saved as we use that in ret_sys_call
	pushl %eax
     
	movl $0x10,%eax # ds、es置为指向内核数据段

	mov %ax,%ds
	mov %ax,%es
	movl $0x17,%eax # fs置为指向局部数据段(出错程序的数据段)

	mov %ax,%fs 
	incl jiffies 
    
# 由于初始化中断控制芯片时,没有采用自动EOI,所以这里需要发指令结束该硬件中断。
	
    movb $0x20,%al		# EOI to interrupt controller #1
	outb %al,$0x20      # 操作命令字OCW2送0x20端口。
	movl CS(%esp),%eax  

# 下面3句从选择符中取出当前特权级(03)并压入堆栈,作为do_timer的参数。

	andl $3,%eax		# %eax is CPL (0 or 3, 0=supervisor)
	pushl %eax

# do_timer(CPL)执行任务切换、计时等工作,在kernel/sched.c,305行实现。

	call do_timer		# 'do_timer(long CPL)' does everything from
	addl $4,%esp		# task switching to accounting ... 在进行任务切换时,用于调整栈指针
	jmp ret_from_sys_call

# 这是sys_execve()系统调用。取中断调用程序的代码指针作为参数调用C函数do_exevce()# do_exevce()(fs/exec.c,182)
 
.align 2
sys_execve:
	lea EIP(%esp),%eax
	pushl %eax
	call do_execve
	addl $4,%esp  # 丢弃调用时压入栈的EIP值。
	ret 

# sys_fork()调用,用于创建`子进程`,时system_call功能2。原型在include/linux/sys.h中。
# 首先调用C函数find_empty_process(),取得一个进程号pid。若返回负数则说明当前任务数组已满。
# 然后调用copy_process()复制进程。

.align 2
sys_fork:
	call find_empty_process # 调用find_empty_process()(kernel/fork.c,135)
	testl %eax,%eax
	js 1f
	push %gs
	pushl %esi
	pushl %edi
	pushl %ebp
	pushl %eax
	call copy_process # 调用copy_process()(kernel/fork.c,68)

	addl $20,%esp # 丢弃这里的所有压栈内容。将指针向上移动20字节。

1:	ret

# int46--(int 0x2E)硬盘中断处理程序。响应硬件中断请求IRQ14。
# 当硬盘操作完成或出错就会发出此中断信号。(kernel/blk_drv_hd.c).
# 首先向8259A中断控制从芯片发送结束硬件中断指令(EOI),然后取变量do_hd中的函数指针放入edx寄存器中,
# 并置do_hd为null,接着判断dex函数指针是否为空。如是,则给edx赋值指向unexpected_hd_interrupt(),
# 用于显示出错信息。随后向8259A主芯片送EOI指令,并调用edx中指针指向的函数:read_intr()write_intr()
# 或 unexpected_hd_interrupt()。

hd_interrupt:
	pushl %eax
	pushl %ecx
	pushl %edx
	push %ds
	push %es
	push %fs
	movl $0x10,%eax # ds、es置为内核数据段。
	mov %ax,%ds
	mov %ax,%es
	movl $0x17,%eax # fs置为指向局部数据段(出错程序的数据段)
	mov %ax,%fs
# 由于初始化中断控制芯片时没有采用自动EOI,所以这里需要发指令结束该硬件中断。

	movb $0x20,%al
	outb %al,$0xA0		# EOI to interrupt controller #1 # 送从8259A中断控制从芯片

	jmp 1f			# give port chance to breathe # 起到一个简单的延时作用
1:	jmp 1f
1:	xorl %edx,%edx
	xchgl do_hd,%edx
	testl %edx,%edx
	jne 1f
	movl $unexpected_hd_interrupt,%edx
1:	outb %al,$0x20
	call *%edx		# "interesting" way of handling intr. 调用hc指向的C函数。
	pop %fs
	pop %es
	pop %ds
	popl %edx
	popl %ecx
	popl %eax
	iret

# int38--(int 0x26)软盘驱动器中断处理程序,响应硬件中断请求IRQ6.
# 其处理过程与上面对硬盘的处理基本一样(kernel/blk_drv_floppy.c)
# 首先向8259A主芯片发送结束硬件中断指令(EOI),然后取变量do_floppy中的函数指针放入edx寄存器中,
# 并置do_floppy为null,接着判断edx函数指针是否为空。如是,则给edx赋值指向unexpected_floppy_interrupt(),
# 用于显示出错信息。随后向8259A主芯片送EOI指令,并调用eax中指针指向的函数:
# rw_interrupt()、seek_interrupt、recal_interrupt、reset_interrupt或者unexpect_floppy_interrupt。

floppy_interrupt:
	pushl %eax
	pushl %ecx
	pushl %edx
	push %ds
	push %es
	push %fs
	movl $0x10,%eax # ds、es置为内核数据段。
	mov %ax,%ds
	mov %ax,%es
	movl $0x17,%eax # fs置为指向局部数据段(出错程序的数据段)

	mov %ax,%fs
	movb $0x20,%al
	outb %al,$0x20		# EOI to interrupt controller #1 送主8259A中断控制主芯片EOI指令(结束硬件中断)。

	xorl %eax,%eax 下一句do_floppy为一函数指针,将被赋值实际处理C函数程序。放到eax寄存器后就将do_floopy指针变量置空。
	xchgl do_floppy,%eax 
	testl %eax,%eax # 测试函数指针是否=NULL?
	jne 1f # 如空,则使指针指向unexpected_floppy_interrupt()。

	movl $unexpected_floppy_interrupt,%eax
1:	call *%eax		# "interesting" way of handling intr. 调用do_floppy指向的C函数。
	pop %fs
	pop %es
	pop %ds
	popl %edx
	popl %ecx
	popl %eax
	iret

# int 39--(int 0x27)并行端口中断处理程序,对应的响应硬件中断请求IRQ7.

parallel_interrupt: # 内核版本尚未实现,这里只是发送EOI指令。
	pushl %eax
	movb $0x20,%al
	outb %al,$0x20
	popl %eax
	iret

4.源码完整版

/*
 *  linux/kernel/system_call.s
 *
 *  (C) 1991  Linus Torvalds
 */

/*
 *  system_call.s  contains the system-call low-level handling routines.
 * This also contains the timer-interrupt handler, as some of the code is
 * the same. The hd- and flopppy-interrupts are also here.
 *
 * NOTE: This code handles signal-recognition, which happens every time
 * after a timer-interrupt and after each system call. Ordinary interrupts
 * don't handle signal-recognition, as that would clutter them up totally
 * unnecessarily.
 *
 * Stack layout in 'ret_from_system_call':
 *
 *	 0(%esp) - %eax
 *	 4(%esp) - %ebx
 *	 8(%esp) - %ecx
 *	 C(%esp) - %edx
 *	10(%esp) - %fs
 *	14(%esp) - %es
 *	18(%esp) - %ds
 *	1C(%esp) - %eip
 *	20(%esp) - %cs
 *	24(%esp) - %eflags
 *	28(%esp) - %oldesp
 *	2C(%esp) - %oldss
 */

SIG_CHLD	= 17

EAX		= 0x00
EBX		= 0x04
ECX		= 0x08
EDX		= 0x0C
FS		= 0x10
ES		= 0x14
DS		= 0x18
EIP		= 0x1C
CS		= 0x20
EFLAGS		= 0x24
OLDESP		= 0x28
OLDSS		= 0x2C

state	= 0		# these are offsets into the task-struct.
counter	= 4
priority = 8
signal	= 12
sigaction = 16		# MUST be 16 (=len of sigaction)
blocked = (33*16)

# offsets within sigaction
sa_handler = 0
sa_mask = 4
sa_flags = 8
sa_restorer = 12

nr_system_calls = 74

/*
 * Ok, I get parallel printer interrupts while using the floppy for some
 * strange reason. Urgel. Now I just ignore them.
 */
.globl system_call,sys_fork,timer_interrupt,sys_execve
.globl hd_interrupt,floppy_interrupt,parallel_interrupt
.globl device_not_available, coprocessor_error

.align 2
bad_sys_call:
	movl $-1,%eax
	iret
.align 2
reschedule:
	pushl $ret_from_sys_call
	jmp schedule
.align 2
system_call:
	cmpl $nr_system_calls-1,%eax
	ja bad_sys_call
	push %ds
	push %es
	push %fs
	pushl %edx
	pushl %ecx		# push %ebx,%ecx,%edx as parameters
	pushl %ebx		# to the system call
	movl $0x10,%edx		# set up ds,es to kernel space
	mov %dx,%ds
	mov %dx,%es
	movl $0x17,%edx		# fs points to local data space
	mov %dx,%fs
	call *sys_call_table(,%eax,4)
	pushl %eax
	movl current,%eax
	cmpl $0,state(%eax)		# state
	jne reschedule
	cmpl $0,counter(%eax)		# counter
	je reschedule
ret_from_sys_call:
	movl current,%eax		# task[0] cannot have signals
	cmpl task,%eax
	je 3f
	cmpw $0x0f,CS(%esp)		# was old code segment supervisor ?
	jne 3f
	cmpw $0x17,OLDSS(%esp)		# was stack segment = 0x17 ?
	jne 3f
	movl signal(%eax),%ebx
	movl blocked(%eax),%ecx
	notl %ecx
	andl %ebx,%ecx
	bsfl %ecx,%ecx
	je 3f
	btrl %ecx,%ebx
	movl %ebx,signal(%eax)
	incl %ecx
	pushl %ecx
	call do_signal
	popl %eax
3:	popl %eax
	popl %ebx
	popl %ecx
	popl %edx
	pop %fs
	pop %es
	pop %ds
	iret

.align 2
coprocessor_error:
	push %ds
	push %es
	push %fs
	pushl %edx
	pushl %ecx
	pushl %ebx
	pushl %eax
	movl $0x10,%eax
	mov %ax,%ds
	mov %ax,%es
	movl $0x17,%eax
	mov %ax,%fs
	pushl $ret_from_sys_call
	jmp math_error

.align 2
device_not_available:
	push %ds
	push %es
	push %fs
	pushl %edx
	pushl %ecx
	pushl %ebx
	pushl %eax
	movl $0x10,%eax
	mov %ax,%ds
	mov %ax,%es
	movl $0x17,%eax
	mov %ax,%fs
	pushl $ret_from_sys_call
	clts				# clear TS so that we can use math
	movl %cr0,%eax
	testl $0x4,%eax			# EM (math emulation bit)
	je math_state_restore
	pushl %ebp
	pushl %esi
	pushl %edi
	call math_emulate
	popl %edi
	popl %esi
	popl %ebp
	ret

.align 2
timer_interrupt:
	push %ds		# save ds,es and put kernel data space
	push %es		# into them. %fs is used by _system_call
	push %fs
	pushl %edx		# we save %eax,%ecx,%edx as gcc doesn't
	pushl %ecx		# save those across function calls. %ebx
	pushl %ebx		# is saved as we use that in ret_sys_call
	pushl %eax
	movl $0x10,%eax
	mov %ax,%ds
	mov %ax,%es
	movl $0x17,%eax
	mov %ax,%fs
	incl jiffies
	movb $0x20,%al		# EOI to interrupt controller #1
	outb %al,$0x20
	movl CS(%esp),%eax
	andl $3,%eax		# %eax is CPL (0 or 3, 0=supervisor)
	pushl %eax
	call do_timer		# 'do_timer(long CPL)' does everything from
	addl $4,%esp		# task switching to accounting ...
	jmp ret_from_sys_call

.align 2
sys_execve:
	lea EIP(%esp),%eax
	pushl %eax
	call do_execve
	addl $4,%esp
	ret

.align 2
sys_fork:
	call find_empty_process
	testl %eax,%eax
	js 1f
	push %gs
	pushl %esi
	pushl %edi
	pushl %ebp
	pushl %eax
	call copy_process
	addl $20,%esp
1:	ret

hd_interrupt:
	pushl %eax
	pushl %ecx
	pushl %edx
	push %ds
	push %es
	push %fs
	movl $0x10,%eax
	mov %ax,%ds
	mov %ax,%es
	movl $0x17,%eax
	mov %ax,%fs
	movb $0x20,%al
	outb %al,$0xA0		# EOI to interrupt controller #1
	jmp 1f			# give port chance to breathe
1:	jmp 1f
1:	xorl %edx,%edx
	xchgl do_hd,%edx
	testl %edx,%edx
	jne 1f
	movl $unexpected_hd_interrupt,%edx
1:	outb %al,$0x20
	call *%edx		# "interesting" way of handling intr.
	pop %fs
	pop %es
	pop %ds
	popl %edx
	popl %ecx
	popl %eax
	iret

floppy_interrupt:
	pushl %eax
	pushl %ecx
	pushl %edx
	push %ds
	push %es
	push %fs
	movl $0x10,%eax
	mov %ax,%ds
	mov %ax,%es
	movl $0x17,%eax
	mov %ax,%fs
	movb $0x20,%al
	outb %al,$0x20		# EOI to interrupt controller #1
	xorl %eax,%eax
	xchgl do_floppy,%eax
	testl %eax,%eax
	jne 1f
	movl $unexpected_floppy_interrupt,%eax
1:	call *%eax		# "interesting" way of handling intr.
	pop %fs
	pop %es
	pop %ds
	popl %edx
	popl %ecx
	popl %eax
	iret

parallel_interrupt:
	pushl %eax
	movb $0x20,%al
	outb %al,$0x20
	popl %eax
	iret

5.源码图像版

system_call.s 源码图像版

6.源码注释版图像

源码注释版图像



汇编语言

😉【汇编语言】1—基础硬件知识

😉【汇编语言】2—寄存器基础知识

😉【汇编语言】3-寄存器与内存的交互

😉【汇编语言】4-第一个完整的汇编程序

😉【汇编语言】5-[BX]和loop指令

😉【汇编语言】6-包含多个段的程序

😉【汇编语言】7-灵活的5大寻址方式

😉【汇编语言】8-1-数据的位置

😉【汇编语言】8-2-数据的长度

😉【汇编语言】8-数据处理的两个基本问题(位置与长度)

😉【DOSBox】1-debug

😉【DOSBox】2-debug可执行文件

😉【DOSBox】3-完整开发流程


C语言

😉【C语言】C Token(C89 C99 C11)

😉【C语言】指针基础

😉【C语言】数组基础

😉【C语言】结构体对齐

😉【C语言】华为C语言进阶测试

😉【C语言】触发刷新到磁盘的方式总结

😉【C语言】C语言文件操作的mode详解

😉【C语言】C语言文件知识全讲解

😉【C语言】从extern到头文件包含的最优实践

😉【C语言】C语言的关键字与重载机制

😉【C语言】长字符串的2种处理方式

😉【C语言】C语言嵌入汇编程序

😉【C语言】find-in-linux递归搜索文件名函数

😉【C陷阱与缺陷】-1-词法陷阱

😉【C陷阱与缺陷】-2-语法陷阱

😉【C陷阱与缺陷】-3-语义陷阱


Linux101系列

专注讲解Linux中的常用命令,共计发布100+文章。

😉【Linux101-1】ls

😉【Linux101-1】ls -l命令输出结果全解析

😉【Linux101-2】cd

😉【Linux101-3】cat

😉【Linux101-4】tac

😉【Linux101-5】head

😉【Linux101-6】tail

😉【Linux101-7】pwd

😉【Linux101-8】touch

😉【Linux101-9】cal

😉【Linux101-10】bc

😉【Linux101-11】df

😉【Linux101-12】uname

😉【Linux101-13】mkdir

😉【Linux101-14】gzip

😉【Linux101-15】tar

😉【Linux101-16】lsof

😉【Linux101-17】du

😉【Linux101-18】stat


Linux102系列

本系列将精讲Linux0.11内核中的每一个文件,共计会发布100+文章。

😉【Linux102】1-Makefile

😉【Linux102】2-Makefile.header

😉【Linux102】3-system.map

😉【Linux102】4-bootsect.s

😉【Linux102】5-setup.s

😉【Linux102】6-head.s

😉【Linux102-D】/boot

😉【Linux102】7-main.c

😉【Linux102】8-kernel/asm.s

😉【Linux102】9-kernel/traps.c

😉【Linux102】10-kernel/printk.c

😉【Linux102】11-kernel/vsprintf.c

😉【Linux102】12-include/stdarg.h

😉【Linux102】13-kernel/mktime.c


Linux内核精讲系列

和Linux内核102系列不同,本系列将会从全局描绘Linux内核的各个模块,而非逐行源码分析,适合想对Linux系统有宏观了解的家人阅读。

😉【Linux】学习Linux前必备的知识点

😉【Linux】Linux内核对进程的内存抽象

😉【Linux】Linux概述1-linux对物理内存的使用

😉【Linux】软件从写下到运行的全部流程

😉【Linux】CPU的三寻址:实模式、保护模式、长模式

😉【Linux】实模式与保护模式的寻址, 这次讲明白了!

😉【Linux】linux0.11的源码目录架构

😉【Linux】Makefile机制及基础详解

😉【Linux】编译并运行Linux0.11

😉【Linux】“进进内网文”—Linux的内核结构全貌

😉【Linux】linux的中断机制

😉【Linux】linux进程描述



关于小希

😉嘿嘿嘿,我是小希,专注Linux内核领域,同时讲解C语言汇编等知识。

我的微信:C_Linux_Cloud,期待与您学习交流!

加微信请备注哦


小希的座右铭:别看简单,简单也是难。别看难,难也是简单。我的文章都是讲述简单的知识,如果你喜欢这种风格:

不妨关注、评论、转发,让更多朋友看到哦~~~🙈

下一期想看什么?在评论区留言吧!我们下期见!

wyl@ubuntu:~/NVMP/nvmp$ make V=s ERROR: please fix package/tp_package/lte/Makefile - see logs/package/tp_package/lte/dump.txt for details Collecting package info: done /bin/sh: 8: @echo: not found cat: /home/wyl/NVMP/nvmp/product_config/c510wv1/buildams.config: No such file or directory make[1]: Entering directory '/home/wyl/NVMP/nvmp' make[2]: Entering directory '/home/wyl/NVMP/nvmp' make[3]: Entering directory '/home/wyl/NVMP/nvmp/target/linux' make[4]: Entering directory '/home/wyl/NVMP/nvmp/target/linux/ingenic' if [ -e /home/wyl/NVMP/nvmp/product_config/c510wv1/board/board.h ]; then cp /home/wyl/NVMP/nvmp/product_config/c510wv1/board/board.h "/home/wyl/NVMP/nvmp/../sdk/soc/t31x/linux-3.10.14"/arch/mips/xburst/soc-t23/chip-t23/isvp/Pike/board.h -f; fi cd /home/wyl/NVMP/nvmp/include/nfs_kernel_script && ./modify_kernel_config_ingenic.sh /home/wyl/NVMP/nvmp/product_config/c510wv1 /home/wyl/NVMP/nvmp/scripts/kconfig.pl + + /home/wyl/NVMP/nvmp/target/linux/generic/config-3.10 /home/wyl/NVMP/nvmp/product_config/c510wv1/kernel.config /home/wyl/NVMP/nvmp/target/linux/ingenic/t31x/config-3.10 > /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/.config.target awk '/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' /home/wyl/NVMP/nvmp/.config >> /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/.config.target echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/.config.target echo "# CONFIG_KALLSYMS_ALL is not set" >> /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/.config.target echo "# CONFIG_KPROBES is not set" >> /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/.config.target /home/wyl/NVMP/nvmp/scripts/metadata.pl kconfig /home/wyl/NVMP/nvmp/tmp/.packageinfo /home/wyl/NVMP/nvmp/.config > /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/.config.override /home/wyl/NVMP/nvmp/scripts/kconfig.pl 'm+' '+' /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/.config.target /dev/null /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/.config.override > /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/.config mv /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/.config /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/.config.old grep -v INITRAMFS /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/.config.old > /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/.config echo 'CONFIG_INITRAMFS_SOURCE=""' >> /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/.config rm -rf /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/modules [ -d /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/user_headers ] || make -C "/home/wyl/NVMP/nvmp/../sdk/soc/t31x/linux-3.10.14" O=/home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14 CROSS_COMPILE="mips-linux-uclibc-gnu-" HOSTCFLAGS="-O2 -I/home/wyl/NVMP/nvmp/staging_dir/host/include -Wall -Wmissing-prototypes -Wstrict-prototypes" ARCH="mips" KBUILD_HAVE_NLS=no CONFIG_SHELL="/bin/bash" V='' CC="mips-linux-uclibc-gnu-gcc" INSTALL_HDR_PATH=/home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/user_headers headers_install echo "a74cf375559f80d758a3e54a15723d6b" > /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/.vermagic cp "/home/wyl/NVMP/nvmp/../sdk/soc/t31x/linux-3.10.14"/scripts/ /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/ -rf mkdir -p /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/arch/mips/xburst/core cp "/home/wyl/NVMP/nvmp/../sdk/soc/t31x/linux-3.10.14"/arch/mips/xburst/core/mxu-v2-ex.obj /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/arch/mips/xburst/core/mxu-v2-ex.obj -rf touch /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/.configured rm -f /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/vmlinux /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/System.map make -C "/home/wyl/NVMP/nvmp/../sdk/soc/t31x/linux-3.10.14" O=/home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14 CROSS_COMPILE="mips-linux-uclibc-gnu-" HOSTCFLAGS="-O2 -I/home/wyl/NVMP/nvmp/staging_dir/host/include -Wall -Wmissing-prototypes -Wstrict-prototypes" ARCH="mips" KBUILD_HAVE_NLS=no CONFIG_SHELL="/bin/bash" V='' CC="mips-linux-uclibc-gnu-gcc" -j1 modules make[5]: Entering directory '/home/wyl/NVMP/sdk/soc/t31x/linux-3.10.14' make -C /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14 \ KBUILD_SRC=/home/wyl/NVMP/sdk/soc/t31x/linux-3.10.14 \ KBUILD_EXTMOD="" -f /home/wyl/NVMP/sdk/soc/t31x/linux-3.10.14/Makefile \ modules HOSTCC scripts/basic/fixdep GEN /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/Makefile HOSTCC scripts/kconfig/conf.o SHIPPED scripts/kconfig/zconf.tab.c SHIPPED scripts/kconfig/zconf.lex.c SHIPPED scripts/kconfig/zconf.hash.c HOSTCC scripts/kconfig/zconf.tab.o In file included from scripts/kconfig/zconf.tab.c:2503:0: scripts/kconfig/menu.c: In function 'get_symbol_str': scripts/kconfig/menu.c:567:18: warning: 'jump' may be used uninitialized in this function [-Wmaybe-uninitialized] jump->offset = r->len - 1; ^ scripts/kconfig/menu.c:528:19: note: 'jump' was declared here struct jump_key *jump; ^ HOSTLD scripts/kconfig/conf scripts/kconfig/conf --silentoldconfig Kconfig .config:828:warning: override: DEFAULT_DEADLINE changes choice state .config:1758:warning: override: KERNEL_XZ changes choice state .config:3892:warning: override: TREE_PREEMPT_RCU changes choice state # # configuration written to .config # Using /home/wyl/NVMP/sdk/soc/t31x/linux-3.10.14 as source for kernel GEN /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/Makefile CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h CALL scripts/checksyscalls.sh grep: scripts/../arch/x86/syscalls/syscall_32.tbl: No such file or directory CC scripts/mod/empty.o HOSTCC scripts/mod/mk_elfconfig MKELF scripts/mod/elfconfig.h CC scripts/mod/devicetable-offsets.s GEN scripts/mod/devicetable-offsets.h HOSTCC scripts/mod/file2alias.o HOSTCC scripts/mod/modpost.o HOSTCC scripts/mod/sumversion.o HOSTLD scripts/mod/modpost HOSTCC scripts/sortextable In file included from scripts/sortextable.c:162:0: scripts/sortextable.c: In function 'main': scripts/sortextable.h:158:3: warning: 'relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized] memset(relocs, 0, relocs_size); ^ scripts/sortextable.h:104:6: note: 'relocs_size' was declared here int relocs_size; ^ In file included from scripts/sortextable.c:160:0: scripts/sortextable.h:158:3: warning: 'relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized] memset(relocs, 0, relocs_size); ^ scripts/sortextable.h:104:6: note: 'relocs_size' was declared here int relocs_size; ^ Building modules, stage 2. MODPOST 3 modules make[5]: Leaving directory '/home/wyl/NVMP/sdk/soc/t31x/linux-3.10.14' touch /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/linux-ingenic_t31x/linux-3.10.14/.modules make -C image compile TARGET_BUILD= make[5]: Entering directory '/home/wyl/NVMP/nvmp/target/linux/ingenic/image' make[5]: 'compile' is up to date. make[5]: Leaving directory '/home/wyl/NVMP/nvmp/target/linux/ingenic/image' make[4]: Leaving directory '/home/wyl/NVMP/nvmp/target/linux/ingenic' make[3]: Leaving directory '/home/wyl/NVMP/nvmp/target/linux' make[2]: Leaving directory '/home/wyl/NVMP/nvmp' make[2]: Entering directory '/home/wyl/NVMP/nvmp' find /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic -type d | xargs -r chmod 0755 rm -rf /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic make[2]: Leaving directory '/home/wyl/NVMP/nvmp' make[2]: Entering directory '/home/wyl/NVMP/nvmp' make[3]: Entering directory '/home/wyl/NVMP/nvmp/package/toolchain' rm -rf /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libc mkdir -p /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/stamp /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libc for file in ./lib/ld-uClibc* ./lib/lib{c,uClibc}{-*.so,.so.*} ./lib/lib{crypt,dl,m,rt}{-*.so,.so.*}; do dir=`dirname $file` ; install -d -m0755 /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libc/$dir ; cp -fpR /home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/$file /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libc/$dir/ ; done ; exit 0 cp: cannot stat '/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/./lib/ld-uClibc*': No such file or directory cp: cannot stat '/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/./lib/libc-*.so': No such file or directory cp: cannot stat '/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/./lib/libc.so.*': No such file or directory cp: cannot stat '/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/./lib/libuClibc-*.so': No such file or directory cp: cannot stat '/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/./lib/libuClibc.so.*': No such file or directory cp: cannot stat '/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/./lib/libcrypt-*.so': No such file or directory cp: cannot stat '/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/./lib/libcrypt.so.*': No such file or directory cp: cannot stat '/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/./lib/libdl-*.so': No such file or directory cp: cannot stat '/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/./lib/libdl.so.*': No such file or directory cp: cannot stat '/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/./lib/libm-*.so': No such file or directory cp: cannot stat '/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/./lib/libm.so.*': No such file or directory cp: cannot stat '/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/./lib/librt-*.so': No such file or directory cp: cannot stat '/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/./lib/librt.so.*': No such file or directory SHELL= /home/wyl/NVMP/nvmp/staging_dir/host/bin/flock /home/wyl/NVMP/nvmp/tmp/.root-copy.flock -c 'cp -fpR /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libc/. /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/' rm -rf /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libc touch /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/stamp/.libc_installed rm -rf /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libgcc mkdir -p /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/stamp /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libgcc for file in ./lib/libgcc_s.so.*; do dir=`dirname $file` ; install -d -m0755 /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libgcc/$dir ; cp -fpR /home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/$file /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libgcc/$dir/ ; done ; exit 0 cp: cannot stat '/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/./lib/libgcc_s.so.*': No such file or directory SHELL= /home/wyl/NVMP/nvmp/staging_dir/host/bin/flock /home/wyl/NVMP/nvmp/tmp/.root-copy.flock -c 'cp -fpR /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libgcc/. /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/' rm -rf /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libgcc touch /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/stamp/.libgcc_installed WARNING: skipping libssp -- package not selected rm -rf /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libstdcpp mkdir -p /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/stamp /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libstdcpp for file in ./usr/lib/libstdc++.so.*; do dir=`dirname $file` ; install -d -m0755 /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libstdcpp/$dir ; cp -fpR /home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/$file /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libstdcpp/$dir/ ; done ; exit 0 cp: cannot stat '/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/./usr/lib/libstdc++.so.*': No such file or directory SHELL= /home/wyl/NVMP/nvmp/staging_dir/host/bin/flock /home/wyl/NVMP/nvmp/tmp/.root-copy.flock -c 'cp -fpR /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libstdcpp/. /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/' rm -rf /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libstdcpp touch /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/stamp/.libstdcpp_installed rm -rf /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libpthread mkdir -p /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/stamp /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libpthread for file in ./lib/libpthread{*.so*,.so.*}; do dir=`dirname $file` ; install -d -m0755 /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libpthread/$dir ; cp -fpR /home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/$file /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libpthread/$dir/ ; done ; exit 0 cp: cannot stat '/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/./lib/libpthread*.so*': No such file or directory cp: cannot stat '/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/./lib/libpthread.so.*': No such file or directory SHELL= /home/wyl/NVMP/nvmp/staging_dir/host/bin/flock /home/wyl/NVMP/nvmp/tmp/.root-copy.flock -c 'cp -fpR /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libpthread/. /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/' rm -rf /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/tmp-libpthread touch /home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/root-ingenic/stamp/.libpthread_installed WARNING: skipping librt -- package not selected WARNING: skipping libgfortran -- package not selected WARNING: skipping ldd -- package not selected WARNING: skipping ldconfig -- package not selected make[3]: Leaving directory '/home/wyl/NVMP/nvmp/package/toolchain' make[3]: Entering directory '/home/wyl/NVMP/nvmp/package/hotplug2' CFLAGS="-Os -pipe -march=mips32r2 -g -fgnu89-inline -I/home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/usr/include -I/home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/include -I/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/usr/include " CXXFLAGS="-Os -pipe -march=mips32r2 -g -I/home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/usr/include -I/home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/include -I/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/usr/include " LDFLAGS="-L/home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/usr/lib -L/home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/usr/lib/nvmp/libs -L/home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/lib -L/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/usr/lib -L/home/wyl/NVMP/nvmp/../sdk/soc/t31x/uclibc-toolchain-0.9.33/mips-gcc472-glibc216-64bit/mips-linux-gnu/libc/uclibc/lib " make -j1 -C /home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/hotplug2-201/. AR=mips-linux-gnu-ar AS="mips-linux-gnu-gcc -c -Os -pipe -march=mips32r2 -g -fgnu89-inline" LD=mips-linux-gnu-ld NM=mips-linux-gnu-nm CC="mips-linux-gnu-gcc" GCC="mips-linux-gnu-gcc" CXX="mips-linux-gnu-g++" RANLIB=mips-linux-gnu-ranlib STRIP=mips-linux-gnu-strip OBJCOPY=mips-linux-gnu-objcopy OBJDUMP=mips-linux-gnu-objdump SIZE=mips-linux-gnu-size CROSS="mips-linux-gnu-" ARCH="mips" COPTS="-Os -pipe -march=mips32r2 -g -fgnu89-inline" STATIC_WORKER="fork" ; make[4]: Entering directory '/home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/hotplug2-201' mips-linux-gnu-gcc -Os -pipe -march=mips32r2 -g -fgnu89-inline -DSTATIC_WORKER=1 -c -o hotplug2.o hotplug2.c In file included from hotplug2.c:1:0: hotplug2.h:3:20: fatal error: signal.h: No such file or directory compilation terminated. <builtin>: recipe for target 'hotplug2.o' failed make[4]: *** [hotplug2.o] Error 1 make[4]: Leaving directory '/home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/hotplug2-201' Makefile:69: recipe for target '/home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/hotplug2-201/.built' failed make[3]: *** [/home/wyl/NVMP/nvmp/build_dir/target-mips-openwrt-linux-uclibc-c510wv1/hotplug2-201/.built] Error 2 make[3]: Leaving directory '/home/wyl/NVMP/nvmp/package/hotplug2' package/Makefile:105: recipe for target 'package/hotplug2/compile' failed make[2]: *** [package/hotplug2/compile] Error 2 make[2]: Leaving directory '/home/wyl/NVMP/nvmp' package/Makefile:101: recipe for target '/home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/stamp/.package_compile' failed make[1]: *** [/home/wyl/NVMP/nvmp/staging_dir/target-mips-openwrt-linux-uclibc-c510wv1/stamp/.package_compile] Error 2 make[1]: Leaving directory '/home/wyl/NVMP/nvmp' /home/wyl/NVMP/nvmp/include/toplevel.mk:277: recipe for target 'world' failed make: *** [world] Error 2
08-20
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值