Skip to content

Instantly share code, notes, and snippets.

@VitToCode
Last active January 19, 2021 20:12
Show Gist options
  • Save VitToCode/d2ae6e44b1b2dbaf2ed1edb30c040ecf to your computer and use it in GitHub Desktop.
Save VitToCode/d2ae6e44b1b2dbaf2ed1edb30c040ecf to your computer and use it in GitHub Desktop.
Ingenic xImage to quemu vmlinux.elf
# 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