Difference between revisions of "Booting From SDCard"
(Created page with 'When shipped, all ICnova SAM9G45 are able to boot a ram-disk from an SD-Card. If a board has more than one SD-Card Interface, usally the internal Card is used for this. The syst…') |
|||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | When shipped, all ICnova SAM9G45 are able to boot a ram-disk from an SD-Card. If a board has more than one SD-Card Interface, usally the internal Card is used for this. | + | When shipped, all [[ICnova CPU-Modules| ICnova SAM9G45]] are able to boot a ram-disk from an SD-Card. If a board has more than one SD-Card Interface, usally the internal Card is used for this. |
The system contained in the ramdisk can do anything like a normal system, just modifications on files in this filesystem are lost during reboot. This way is mostly used to update a system. | The system contained in the ramdisk can do anything like a normal system, just modifications on files in this filesystem are lost during reboot. This way is mostly used to update a system. | ||
Line 7: | Line 7: | ||
To generate such an Update, [[:Category:Buildroot|buildroot]] must be told to generate a cpio-archive. To do so, enter "make menuconfig" and enter the menu ''target filesystem options --->''. Within this menu check the point ''cpio the root filesystem'' and use gzip as compression method. | To generate such an Update, [[:Category:Buildroot|buildroot]] must be told to generate a cpio-archive. To do so, enter "make menuconfig" and enter the menu ''target filesystem options --->''. Within this menu check the point ''cpio the root filesystem'' and use gzip as compression method. | ||
− | [[File: | + | [[File:Buildroot_fs_cpio.png]] |
− | After the next call of make, the [[Buildroot directories|binaries-directory]] will have a rootfs.arm.cpio.gz generated. If your porject is called "adb4000g45", the following line will use this to generate a suitable ramImage: | + | After the next call of make, the [[Buildroot directories|binaries-directory]] will have a rootfs.arm.cpio.gz generated. |
+ | In newer buildroot versions this files will reside in the [[Buildroot directories|images-directory]]. | ||
+ | If your porject is called "adb4000g45", the following line will use this to generate a suitable ramImage: | ||
$ build_arm/staging_dir/usr/bin/mkimage -A ARM -O Linux -T ramdisk -C gzip -a 0x71000000 -e 0x71000000 -n UpdateFS \ | $ build_arm/staging_dir/usr/bin/mkimage -A ARM -O Linux -T ramdisk -C gzip -a 0x71000000 -e 0x71000000 -n UpdateFS \ | ||
-d binaries/adb4000g45/rootfs.arm.cpio.gz binaries/adb4000g45/ramImage | -d binaries/adb4000g45/rootfs.arm.cpio.gz binaries/adb4000g45/ramImage | ||
+ | |||
+ | In newer buildroot versions the mkimage executable is found under outpu/host/usr/bin/mkimage<br> | ||
+ | In most of our projects a script called create_ramImage.sh is delivered in the main buildroot directory which generates a suitable ramimage in the output/images directory. | ||
For other project-names the filenames have to be modified accordingly. | For other project-names the filenames have to be modified accordingly. | ||
− | The Kernel uImage generated by buildroot, is needed | + | The Kernel uImage generated by buildroot, is needed too. |
=== preparing the SDCard === | === preparing the SDCard === | ||
− | After generating the needed files, the files uImage and ramImage from within binaries must be copied to a FAT-formatted SD-Card. If such a card is then inserted into the board before booting, the uImage and ramImage will be used | + | After generating the needed files, the files uImage and ramImage from within binaries must be copied to a FAT-formatted SD-Card. The card should have a partition-table, to prevent problems. If such a card is then inserted into the board before booting, the uImage and ramImage will be used. |
− | [[Category:Filesystems]] | + | [[Category:Filesystems]] [[Category:HowTo]] |
Latest revision as of 15:22, 31 January 2017
When shipped, all ICnova SAM9G45 are able to boot a ram-disk from an SD-Card. If a board has more than one SD-Card Interface, usally the internal Card is used for this.
The system contained in the ramdisk can do anything like a normal system, just modifications on files in this filesystem are lost during reboot. This way is mostly used to update a system.
[edit] generating the needed files
To generate such an Update, buildroot must be told to generate a cpio-archive. To do so, enter "make menuconfig" and enter the menu target filesystem options --->. Within this menu check the point cpio the root filesystem and use gzip as compression method.
After the next call of make, the binaries-directory will have a rootfs.arm.cpio.gz generated. In newer buildroot versions this files will reside in the images-directory. If your porject is called "adb4000g45", the following line will use this to generate a suitable ramImage:
$ build_arm/staging_dir/usr/bin/mkimage -A ARM -O Linux -T ramdisk -C gzip -a 0x71000000 -e 0x71000000 -n UpdateFS \ -d binaries/adb4000g45/rootfs.arm.cpio.gz binaries/adb4000g45/ramImage
In newer buildroot versions the mkimage executable is found under outpu/host/usr/bin/mkimage
In most of our projects a script called create_ramImage.sh is delivered in the main buildroot directory which generates a suitable ramimage in the output/images directory.
For other project-names the filenames have to be modified accordingly.
The Kernel uImage generated by buildroot, is needed too.
[edit] preparing the SDCard
After generating the needed files, the files uImage and ramImage from within binaries must be copied to a FAT-formatted SD-Card. The card should have a partition-table, to prevent problems. If such a card is then inserted into the board before booting, the uImage and ramImage will be used.