1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-22 08:06:17 +04:00

Update dependencies

This commit is contained in:
Jiajie Chen 2020-06-26 23:23:57 +08:00
parent 00ac4c2dfa
commit 611aaa5f01
4 changed files with 10 additions and 20 deletions

11
kernel/Cargo.lock generated
View File

@ -266,11 +266,10 @@ checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
[[package]]
name = "mips"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "053a14b59d7b828efefebf92b557015d99383264f4714a959b1d970d8c6c32fb"
version = "0.3.0"
source = "git+https://github.com/Harry-Chen/rust-mips?rev=3b828a2#3b828a2afed97f2769a66cf9cd8239a285804dc0"
dependencies = [
"bit_field 0.9.0",
"bit_field 0.10.0",
"bitflags",
]
@ -708,8 +707,8 @@ checksum = "3a385d94f3f62e60445a0adb9ff8d9621faa272234530d4c0f848ec98f88e316"
[[package]]
name = "trapframe"
version = "0.4.2"
source = "git+https://github.com/rcore-os/trapframe-rs?rev=5c6cc02#5c6cc0280e1fa6557d151b7060f6048b93ba7d18"
version = "0.4.3"
source = "git+https://github.com/rcore-os/trapframe-rs?rev=aaa0fa3#aaa0fa341457833e08c4f82442a1efee5c480c01"
dependencies = [
"raw-cpuid",
"x86_64",

View File

@ -22,7 +22,6 @@ authors = [
default = []
board_qemu = []
board_u540 = ["link_user"]
board_rocket_chip = ["link_user"]
# (for aarch64 RaspberryPi3)
nographic = []
consolegraphic = []
@ -71,7 +70,7 @@ rcore-fs-devfs = { git = "https://github.com/rcore-os/rcore-fs", rev = "517af47"
rlibc = "1.0"
smoltcp = { git = "https://github.com/rcore-os/smoltcp", rev = "5bd87c7c", default-features = false, features = ["alloc", "log", "ethernet", "proto-ipv4", "proto-igmp", "socket-icmp", "socket-udp", "socket-tcp", "socket-raw"] }
spin = "0.5"
trapframe = { git = "https://github.com/rcore-os/trapframe-rs", rev = "5c6cc02" }
trapframe = { git = "https://github.com/rcore-os/trapframe-rs", rev = "aaa0fa3" }
virtio-drivers = { git = "https://github.com/rcore-os/virtio-drivers", rev = "dfa70e14" }
volatile = "0.2"
woke = "0.0.2"
@ -94,5 +93,5 @@ aarch64 = { git = "https://github.com/rcore-os/aarch64", version = "3.0.1" }
bcm2837 = { git = "https://github.com/rcore-os/bcm2837", version = "2.5.1", optional = true }
[target.'cfg(target_arch = "mips")'.dependencies]
mips = "^0.2.0"
mips = { git = "https://github.com/Harry-Chen/rust-mips", rev = "3b828a2" }
paste = "0.1"

View File

@ -21,7 +21,6 @@
# BOARD = qemu Run on QEMU
# | pc [ x86_64 only] Run on real pc
# | u540 [riscv64 only] Run on HiFive U540, use Sv39
# | rocket_chip [riscv64 only] Run on Rocket Chip, use Sv39
# | raspi3 [aarch64 only] Run on Raspberry Pi 3 Model B/B+
# NET = on | off [ x86_64 only] Enable NIC
# PCI_PASSTHRU = 0000:00:00.1 [ x86_64 only] Passthrough the specified PCI device
@ -61,13 +60,10 @@ else
BOARD ?= qemu
endif
# currently only mipsel architecture and rocket-chip need DTB linked to the kernel
# currently only mipsel architecture need DTB linked to the kernel
ifeq ($(ARCH), mipsel)
DTB := src/arch/$(ARCH)/board/$(BOARD)/device.dtb
endif
ifeq ($(BOARD), rocket_chip)
DTB := src/arch/riscv/board/$(BOARD)/device.dtb
endif
# mipssim does not support SMP
ifeq ($(BOARD), mipssim)
@ -298,11 +294,7 @@ endif
kernel: $(DTB)
@echo Building $(ARCH) kernel
ifeq ($(ARCH), $(filter $(ARCH), riscv32 riscv64))
ifeq ($(BOARD), rocket_chip)
@cp src/arch/riscv/board/rocket_chip/linker.ld src/arch/riscv/boot/linker64.ld
else
@cp src/arch/riscv/board/u540/linker.ld src/arch/riscv/boot/linker64.ld
endif
@-patch -p0 -N -b \
$(sysroot)/lib/rustlib/src/rust/src/libcore/sync/atomic.rs \
src/arch/riscv/atomic.patch

View File

@ -4,12 +4,12 @@ use super::driver::serial::*;
use crate::drivers::console::CONSOLE;
use core::fmt::{Arguments, Write};
pub fn getchar() -> char {
pub fn getchar() -> u8 {
unsafe { SERIAL_PORT.force_unlock() }
SERIAL_PORT.lock().getchar()
}
pub fn getchar_option() -> Option<char> {
pub fn getchar_option() -> Option<u8> {
unsafe { SERIAL_PORT.force_unlock() }
SERIAL_PORT.lock().getchar_option()
}