DragonOS-Community / DragonOS

使用Rust从0自研内核,具有Linux兼容性的操作系统,面向云计算轻量化场景而设计。DragonOS is an operating system developed from scratch using Rust, with Linux compatibility. It is designed for lightweight cloud computing scenarios.
https://dragonos.org
GNU General Public License v2.0
861 stars 134 forks source link

wrong file descriptor, when make run #166

Closed yz271544 closed 1 year ago

yz271544 commented 1 year ago

hello, wrong file descriptor, when make run

nm -n /lyndon/iProject/rustpath/src/github.com/DragonOS/kernel/src/kernel | ./kallsyms > kallsyms.S
/home/zxh/opt/dragonos-gcc/gcc-x86_64-unknown-none/bin/x86_64-elf-gcc -c kallsyms.S -o kallsyms.o
Kallsyms generated.
make[4]: 离开目录“/lyndon/iProject/rustpath/src/github.com/DragonOS/kernel/src/debug”
Re-Linking kernel...
./main.o ./head.o ./time/timer.o ./time/sleep.o ./common/math/pow.o ./common/math/fabs.o ./common/math/round.o ./filesystem/MBR.c.o ./filesystem/procfs/procfs.c.o ./filesystem/devfs/chardev.c.o ./filesystem/devfs/devfs.c.o ./filesystem/vfs/dcache.c.o ./filesystem/vfs/VFS.c.o ./filesystem/vfs/mount.c.o ./filesystem/block.c.o ./filesystem/rootfs/rootfs.c.o ./filesystem/fat32/fat_ent.c.o ./filesystem/fat32/fat32.c.o ./driver/video/video.o ./driver/timers/HPET/HPET.o ./driver/interrupt/pic.o ./driver/interrupt/apic/apic_timer.o ./driver/keyboard/ps2_keyboard.o ./driver/disk/ata.o ./driver/disk/ahci/ahci.o ./driver/acpi/acpi.o ./driver/usb/xhci/xhci.o ./driver/usb/usb.o ./driver/hid/hidparse.c.o ./driver/hid/hidstrings.c.o ./driver/multiboot2/multiboot2.o ./driver/pci/msi.o ./driver/pci/pci.o ./driver/mouse/ps2_mouse.o ./driver/tty/tty.o ./syscall/syscall.o ./process/fork.c.o ./process/process.c.o ./process/procs.o ./process/kthread.c.o ./ktest/test-bitree.o ./ktest/test-kfifo.o ./ktest/ktest.o ./ktest/test-mutex.o ./ktest/test-idr.o ./sched/completion.c.o ./sched/core.c.o ./libs/cpu.c.o ./libs/printk.c.o ./libs/crc32.c.o ./libs/libELF/elf.o ./libs/kfifo.c.o ./libs/crc16.c.o ./libs/libUI/textui.o ./libs/libUI/textui-render.o ./libs/libUI/screen_manager.o ./libs/crc64.c.o ./libs/bitree.c.o ./libs/idr.c.o ./libs/crc7.c.o ./libs/wait_queue.c.o ./libs/glib.c.o ./libs/unistd.c.o ./libs/lz4.c.o ./libs/semaphore.c.o ./libs/string.c.o ./libs/mutex.c.o ./libs/stdlib.c.o ./libs/lockref.c.o ./libs/sys/wait.c.o ./libs/crc8.c.o ./libs/wait_queue_head.c.o ./mm/vma.o ./mm/slab.o ./mm/utils.o ./mm/mmio.o ./mm/mmio-buddy.o ./mm/mm-stat.o ./mm/mmap.o ./mm/mm.o ./arch/x86_64/ia64_msi.c.o ./arch/x86_64/x86_64_ipi.c.o ./arch/x86_64/asm/cmpxchg.c.o ./arch/x86_64/asm/spinlock.c.o ./exception/entry.o ./exception/trap.o ./exception/irq.o ./smp/apu_boot.o ./smp/smp.o ./debug/traceback/traceback.o ./io/block/block_io_scheduler.c.o ./ipc/pipe.o
ld -b elf64-x86-64 -z muldefs -o kernel head.o main.o ./main.o ./head.o ./time/timer.o ./time/sleep.o ./common/math/pow.o ./common/math/fabs.o ./common/math/round.o ./filesystem/MBR.c.o ./filesystem/procfs/procfs.c.o ./filesystem/devfs/chardev.c.o ./filesystem/devfs/devfs.c.o ./filesystem/vfs/dcache.c.o ./filesystem/vfs/VFS.c.o ./filesystem/vfs/mount.c.o ./filesystem/block.c.o ./filesystem/rootfs/rootfs.c.o ./filesystem/fat32/fat_ent.c.o ./filesystem/fat32/fat32.c.o ./driver/video/video.o ./driver/timers/HPET/HPET.o ./driver/interrupt/pic.o ./driver/interrupt/apic/apic_timer.o ./driver/keyboard/ps2_keyboard.o ./driver/disk/ata.o ./driver/disk/ahci/ahci.o ./driver/acpi/acpi.o ./driver/usb/xhci/xhci.o ./driver/usb/usb.o ./driver/hid/hidparse.c.o ./driver/hid/hidstrings.c.o ./driver/multiboot2/multiboot2.o ./driver/pci/msi.o ./driver/pci/pci.o ./driver/mouse/ps2_mouse.o ./driver/tty/tty.o ./syscall/syscall.o ./process/fork.c.o ./process/process.c.o ./process/procs.o ./process/kthread.c.o ./ktest/test-bitree.o ./ktest/test-kfifo.o ./ktest/ktest.o ./ktest/test-mutex.o ./ktest/test-idr.o ./sched/completion.c.o ./sched/core.c.o ./libs/cpu.c.o ./libs/printk.c.o ./libs/crc32.c.o ./libs/libELF/elf.o ./libs/kfifo.c.o ./libs/crc16.c.o ./libs/libUI/textui.o ./libs/libUI/textui-render.o ./libs/libUI/screen_manager.o ./libs/crc64.c.o ./libs/bitree.c.o ./libs/idr.c.o ./libs/crc7.c.o ./libs/wait_queue.c.o ./libs/glib.c.o ./libs/unistd.c.o ./libs/lz4.c.o ./libs/semaphore.c.o ./libs/string.c.o ./libs/mutex.c.o ./libs/stdlib.c.o ./libs/lockref.c.o ./libs/sys/wait.c.o ./libs/crc8.c.o ./libs/wait_queue_head.c.o ./mm/vma.o ./mm/slab.o ./mm/utils.o ./mm/mmio.o ./mm/mmio-buddy.o ./mm/mm-stat.o ./mm/mmap.o ./mm/mm.o ./arch/x86_64/ia64_msi.c.o ./arch/x86_64/x86_64_ipi.c.o ./arch/x86_64/asm/cmpxchg.c.o ./arch/x86_64/asm/spinlock.c.o ./exception/entry.o ./exception/trap.o ./exception/irq.o ./smp/apu_boot.o ./smp/smp.o ./debug/traceback/traceback.o ./io/block/block_io_scheduler.c.o ./ipc/pipe.o ../target/x86_64-unknown-none/release/libdragonos_kernel.a ./debug/kallsyms.o  -T link.lds
Generating kernel ELF file...
/home/zxh/opt/dragonos-gcc/gcc-x86_64-unknown-none/bin/x86_64-elf-objcopy -I elf64-x86-64 -O elf64-x86-64 -R ".comment" -R ".eh_frame" kernel ../../bin/kernel/kernel.elf
/home/zxh/opt/dragonos-gcc/gcc-x86_64-unknown-none/bin/x86_64-elf-objcopy: ../../bin/kernel/kernel.elf: 错误的文件描述符
make[3]: *** [Makefile:51:all] 错误 1
make[3]: 离开目录“/lyndon/iProject/rustpath/src/github.com/DragonOS/kernel/src”
make[2]: *** [Makefile:4:all] 错误 2
make[2]: 离开目录“/lyndon/iProject/rustpath/src/github.com/DragonOS/kernel”
内核编译失败
make[1]: *** [Makefile:48:kernel] 错误 1
make[1]: 离开目录“/lyndon/iProject/rustpath/src/github.com/DragonOS”
make: *** [Makefile:106:run] 错误 2
fslongjin commented 1 year ago