forked from DGNum/liminix
make reserved-memory work on mips, and improve test
This commit is contained in:
parent
dbb82339bd
commit
231c2cef03
2 changed files with 17 additions and 5 deletions
|
@ -80,11 +80,15 @@ in {
|
|||
|
||||
mkdir $out
|
||||
cat ${o.dtb} > $out/dtb
|
||||
fdtput -p $out/dtb /reserved-memory '#address-cells' 2
|
||||
fdtput -p $out/dtb /reserved-memory '#size-cells' 2
|
||||
address_cells=$(fdtget $out/dtb / '#address-cells')
|
||||
size_cells=$(fdtget $out/dtb / '#size-cells')
|
||||
if [ address_cells -gt 1 ]; then ac_prefix=0; fi
|
||||
if [ size_cells -gt 1 ]; then sz_prefix=0; fi
|
||||
fdtput -p $out/dtb /reserved-memory '#address-cells' $address_cells
|
||||
fdtput -p $out/dtb /reserved-memory '#size-cells' $size_cells
|
||||
fdtput -p $out/dtb /reserved-memory ranges
|
||||
fdtput -p -t s $out/dtb /reserved-memory/phram-rootfs@$rootfsStart compatible phram
|
||||
fdtput -p -t lx $out/dtb /reserved-memory/phram-rootfs@$rootfsStart reg 0 0x$rootfsStart 0 $(printf %x $rootfsBytes)
|
||||
fdtput -p -t lx $out/dtb /reserved-memory/phram-rootfs@$rootfsStart reg $ac_prefix 0x$rootfsStart $sz_prefix $(printf %x $rootfsBytes)
|
||||
|
||||
# dtc -I dtb -O dts -o /dev/stdout $out/dtb; exit 1
|
||||
dtbBytes=$(($(stat -L -c %s $out/dtb) + 0x1000 &(~0xfff)))
|
||||
|
|
|
@ -14,9 +14,17 @@ while {[gets $fh line] >= 0} {
|
|||
close $fh
|
||||
|
||||
expect {
|
||||
"s6-linux-init" { exit 0 }
|
||||
"s6-linux-init" { }
|
||||
"Reserved memory: unsupported node format, ignoring" { exit 1 }
|
||||
timeout { exit 1 }
|
||||
}
|
||||
|
||||
expect {
|
||||
"#" { send "test -f /proc/device-tree/reserved-memory/phram-rootfs*/name && tty \r" }
|
||||
timeout { exit 1 }
|
||||
}
|
||||
|
||||
expect {
|
||||
"/dev/ttyS0" { exit 0 }
|
||||
timeout { exit 1 }
|
||||
}
|
Loading…
Reference in a new issue