How to make a buildroot rootfs for MIPS CI20
To make a buildroot rootfs tarball run
git clone git://git.busybox.net/buildroot buildroot cd buildroot make qemu_mipsel_malta_defconfig make menuconfig
The malta_defconfig is a good basic start and boots on the ci20.
Enable the following options in buildroot
Toolchain --> Toolchain type --> External toolchain (download or select path of your preinstalled toolchain) Filesystem images --> cpio the root filesystem tar the root filesystem Kernel --> <Disable the Linux kernel option. We built our own>
Exit and Save the configuration.
Once the build has finished (can take quite some time. You are making an OS) you should have the following outputs
That is basically it.
When you followed the steps on http://elinux.org/CI20_Dev_Zone#Making_a_bootable_SD_card_from_sources
Mount the ext4 partition on your sd card using
sudo mount /dev/sdx1 /mnt
where sdx is your sd card writer (find using lsblk).
Extract the rootfs.tar using
sudo tar -xvf output/images/rootfs.tar /mnt/
At the u-boot prompt, you might want to check your bootargs being passed to the kernel.
They should be something like this bootargs=console=ttyS4,115200 console=tty0 mem=256M@0x0 mem=768M@0x30000000 clock_ignore_unused
You need to add the following to your bootargs
root=/dev/mmcblk0p1 rootwait devtmpfs.mount=1
This can be done via
setenv bootargs console=ttyS4,115200 console=tty0 mem=256M@0x0 mem=768M@0x30000000 clock_ignore_unused root=/dev/mmcblk0p1 rootwait devtmpfs.mount=1
Note: Do check your serial console. You might be using ttyS0 instead of ttyS4
If you want to save the environment for uboot to run every time.
And enjoy :).
You can extend the basic configuration of buildroot now. Simply go to the root folder where you cloned the buildroot repository.
Select any that you want for target packages. Look closely enough and you will find an X window manager too :) Save and exit the menuconfig.
Run make again. And extract the rootfs onto your sd card ext4 partition again.