I have watched “Fantastic Mr Fox” four years ago, but just read its novel this year. It’s really a interesting story even I am not a child anymore. The three bad farmers want to kill Mr Fox and his whole family, but Mr Fox just steal their goods without hurting anybody, which is a good idea to me 🙂
“Interstellar” is no doubt the most amazing science fiction this year. This is a story about a father travel a very very long time and space to rescue his children, and also, his descendants. The most attractive part of this novel for me is not those fashion or professional words like “wormhole”, “black hole” etc, but the struggling of the lone father (or the human being). It also give me much power and courage to scrabble out of the traps in my own life.
Coly, who is my old colleague, bought a server computer in 2010. This server, which worth about 30,000 Yuan(RMB) 4 years ago, is composed by a ASUS KGPE-D16 motherboard, two AMD-6172 CPUs, and a 670W power supply. Recently, we need many servers to build some software, so I beg Coly to bring his 4 years old server to our small computer room in our office, and he promised.
After installing Linux on this server, I found out that only one CPU could boot up and run, the other one can’t be recognized by operation system. I asked Coly why, and he answered me maybe one CPU was broken.
I thought a mother-board with two sockets can only run one CPU was a great waste; therefore I bought a new CPU and setup it on the mother-board. But after that, the whole server couldn’t boot up totally. Having tried many ways but all failed, I turn to ask Coly to rescue his own old server.
At last, Coly come here and open the lid of the server case, and becomes astonishing very soon.
Coly: What on earth have you done to my server! Have you killed a man who sales silicone grease? You paste too much silicone grease on the CPU, even the edge of the sockets also be contaminated!
Me: Sorry, I just want to make sure the CPU will not be too hot.
Coly: Yeah, they will never be hot now —— because they can’t even run.
Then, Coly kneels on the floor and begin to clean all the silicon grease on the mother-board, which is a really hard work.
But, after clearing, the server still could not boot up.
Coly: Maybe the mother-board has broken, or maybe power supply got a shot-circuit. How much is a KGPE-D16 motherboard in TAOBAO (a very famous e-commerce website in China)? It cost me 8,000 Yuan 4 years ago.
Me: About 800 Yuan.
Coly: ….Mother board becomes cheap so fast. Then, how much is a 670W power supply in TAOBAO? It was 800 Yuan before.
Me: En, about 600 Yuan.
Coly: Ah-ha, looks power supply is a hedging tool for preserving monetary value. I reckon I will buy a large mount of power supply instead of stocks or gold to preserve my money .
In my opinion, a power supply is more stable than a mother board, so I bought a new mother board and luckily boot up the server with two CPU (24 cores). At last, no servers or machines are wasted, in my hand 🙂
Foundation Model V8 is a emulator for ARM64 architecture, but it has many limits, such as slow CPU, small memory (about 2GB), etc. Therefore I want to run fedora on qemu emulator for aarch64. There are already many docs to introduce how to run Foundation Model V8 on Fedora 21 on the web, but none of them could point out the way to run qemu-aarch64 on Fedora 21. Spent about a week, I finally find out the path.
Step 1 Build the edk2 UEFI
Followed this article，you should download the linaro toolchain and edit the “Conf/target.txt”. Then follow these steps to build a file in “Build/ArmVirtualizationQemu-AARCH64/DEBUG_GCC48/FV/QEMU_EFI.fd”
Step 2 Build the qemu-aarch64
I recommend the latest stable QEMU-2.2.0
tar jxf qemu-2.2.0.tar.bz2
Now, you have file in “qemu-2.2.0/aarch64-softmmu/qemu-system-aarch64”
Step 3 Download the Fedora 21 image for Foundation Model V8
tar Jxf F21-20140829-foundation-v8.tar.xz
Now you have “F21-20140829-foundation-v8/F21-20140829-foundation-v8.img”
Step 4 Run the qemu
qemu-2.2.0/aarch64-softmmu/qemu-system-aarch64 -M virt -cpu cortex-a57 \
-smp 1 -m 4096 \
-bios QEMU_EFI.fd \
-drive if=none,file=F21-20140829-foundation-v8.img,id=hd0,cache=unsafe -device virtio-blk-device,drive=hd0 \
-netdev user,id=unet,hostfwd=tcp::5555-:22 -device virtio-net-device,netdev=unet -nographic
The Qemu will boot into the UEFI, you could select into the “shell”, in the UEFI shell:
Then you can enter into a grub provided by Fedora 21 and boot into it automaticly.
Step 5 Add the UEFI entry for fedora permanently (optional)
cat QEMU_EFI.fd /dev/zero | dd iflag=fullblock bs=1M count=64 of=flash0.img
dd if=/dev/zero of=flash1.img bs=1M count=64
Launch qemu-system-aarch64 by change “-bios xxx” to “-pflash flash0.img -pflash flash1.img” and after enter the UEFI shell:
shell>bcfg boot add 0 EFI\fedora\grubaa64.efi "fedora"
The UEFI boot entry will write into flash*.img file and the Qemu could boot into Fedora 21 automaticly now.