- Download BusyBox and build with CONFIG_STATIC=y
- Create disk image
- Make ext2 filesystem
$ tune2fs -c 0 -i 0 rootfs.img
- Mount disk image
- Make boot directory
- Copy busybox to disk image
- Create directories and files
$ mkdir etc etc/init.d dev proc sys
$ cd etc
$ vi inittab
::sysinit:/etc/init.d/rcS
::askfirst:/bin/sh
$ chmod 644 inittab
$ cd init.d
$ vi rcS
#! /bin/sh
mount -a
$ chmod 744 rcS
$ cd ..
$ vi fstab
proc /proc proc defaults 0 0
$ chmod 644 fstab
$ cd ../..
- Unmount disk image
- Run in QEMU
No comments:
Post a Comment