/dev/mtd1
and /dev/mtdblock1
).
U-Boot> nand erase 0x800000 0xF800000 NAND erase: device 0 offset 0x800000, size 0xf800000 Erasing at 0xffe0000 -- 100% complete. OK2. download the UBI file system from TFTP to the board RAM (address 0x20000000)
U-Boot> tftp 0x20000000 buildroot_2012.11.1-at91_sama5d3_linux4sam_4.0.ubi gmacb0: PHY present at 7 gmacb0: link up, 1000Mbps full-duplex (lpa: 0x0300) Using gmacb0 device TFTP from server 10.159.245.147; our IP address is 10.159.245.199 Filename 'rootfs.ubi'. Load address: 0x20000000 Loading: ################################################################# ################################################################# [...] ################################################################# # done Bytes transferred = xxxxxxxx (yyyyyyy hex)remember the number of Bytes transferred just indicated above. It will be useful for the
nand write.trimffs
command.
3. write the filesystem from ram at offset 0x20000000 to nand flash at offset 0x800000
(Linux /dev/mtdblock1
). Note the last parameter: it is the number of Bytes transferred indicated in the previous command.
U-Boot> nand write.trimffs 0x20000000 0x800000 0xyyyyyyy NAND write: device 0 offset 0x800000, size 0x1c40000 29622272 bytes written: OK
sdcard.img
is generated, it is easy to create the bootable SD card. The procedure is explained in board/atmel/readme.txt
or in Create a SD card with the demo section.
The SD card image generated by Buildroot is not compressed. It doesn't change the Windows procedure but uncompressing the image for the Linux procedure is no longer needed.
U-Boot> setenv bootargs 'console=ttyS0,115200 mtdparts=atmel_nand:8M(bootstrap/uboot/kernel)ro,-(rootfs) rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs' U-Boot> saveenv
mdtparts
defines the nand flash partition map, from the kernel point of view, we are not interested in the first 8MB so we don't need to provide a detailed partition map for this part.
rootfstype
simply defines which kind of rootfs we are using.
ubi.mtd
indicates on which mtd partition is the rootfs
root
indicates the ubi device and the volume name which is by default rootfs when generated by Buildroot.
|
||||||||||||||||||||||
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Microchip and others, are registered trademarks or trademarks of Microchip Technology Inc. and its subsidiaries.
Arm® and others are registered trademarks or trademarks of Arm Limited (or its affiliates). Other terms and product names may be trademarks of others.
Ideas, requests, contributions ? Connect to LinksToCommunities page.