Last active
January 19, 2021 20:12
-
-
Save VitToCode/d2ae6e44b1b2dbaf2ed1edb30c040ecf to your computer and use it in GitHub Desktop.
Ingenic xImage to quemu vmlinux.elf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# extract vmlinux.bin with binwalk | |
binwalk -e xImage | |
cd _xImage.extracted/ | |
## requred installed https://github.com/marin-m/vmlinux-to-elf | |
## sudo apt install python3-pip | |
## sudo pip3 install --upgrade lz4 git+https://github.com/marin-m/vmlinux-to-elf | |
# make elf from bin | |
vmlinux-to-elf vmlinux.bin vmlinux.elf | |
# or even | |
## vmlinux-to-elf xImage vmlinux.elf | |
# run kernel with qemu | |
# note # vmlinux.elf == vmlinux | |
# note # back convertion 'vmlinux.elf -> vmlinux.bin' | |
# prebuilts/toolchains/mips-gcc520-glibc222/bin/mips-linux-gnu-objcopy -O binary vmlinux.elf vmlinux.bin | |
qemu-system-mipsel -M phoenix -m 64M -kernel ./vmlinux.elf -serial stdio -cpu xburst1-x1000 | |
# using mount fs in progress... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment