• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomepcDuinoA20 Based pcDuino3/3S/3C/3NanoBSP development for pcDuino3 (III): Build Root Fil ...
Previous Next

BSP development for pcDuino3 (III): Build Root File System

Posted by: admin , June 29, 2014

We have talked about u-boot, linux kernel. In this post, we will move on to build the root file system. We will start from initramfs provided by linux-sunxi.

 

The initramfs provided by linux-sunxi is provided for system upgrade purpose. We will need to make changes.

Navigate to the root directory of the kernel:

 

Create a new directory rootfs:

#mkdir  rootfs

Copy initramfs from pcDuino3 to rootfs:

#cp ~/a20-kernel/linux-sunxi/rootfs/sun7i_rootfs.cpio.xz  rootfs

Unzip rootfs:

#xz  -d  sun7i_rootfs.cpio.xz

Unzip cpio:

#cpio -idmv < sun7i_rootfs.cpio

Modify init to remove the upgrade process:

#vim rootfs/init

Delete ‘update.sh’:

#rm rootfs/update.sh


Configure the kernel to make the kernel support initramfs:

 

#ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LOADADDR=0×40008000 make menuconfig O=build -j 8

General setup —>

[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support

(../../linux-sunxi/rootfs) Initramfs source file(s)

After done with the configuration, we need to rebuild the kernel:

#ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-  LOADADDR=0×40008000 make uImage dtbs O=build -j 8

Follow the previous post to copy generated uImage and dtb onto the SD card, and reboot pcDuino3 with the newly copied SD:

Tags: A20 Based pcDuino3/3S/3C/3Nano

Share!
Tweet

admin

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors