{"id":3169,"date":"2022-07-18T07:12:00","date_gmt":"2022-07-18T05:12:00","guid":{"rendered":"https:\/\/www.kurokesu.com\/main\/?p=3169"},"modified":"2022-07-20T13:47:15","modified_gmt":"2022-07-20T11:47:15","slug":"ethernet-camera-module-build-log-4-storage","status":"publish","type":"post","link":"https:\/\/www.kurokesu.com\/main\/2022\/07\/18\/ethernet-camera-module-build-log-4-storage\/","title":{"rendered":"Ethernet camera module build log #4 \u2013 Storage"},"content":{"rendered":"\n<p>Buildroot is a simple, efficient, easy-to-use tool to generate embedded Linux systems. Allwinner S3 system can boot from:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>SD Card 0 \/ SDC0<\/li><li>SD Card 2 \/ SDC2<\/li><li>SPI NOR Flash \/ SPI0<\/li><li>SPI NAND Flash \/ SPI0<\/li><li>USB boot<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2022\/07\/IMG_7197_2r.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"783\" src=\"https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2022\/07\/IMG_7197_2r-1024x783.jpg\" alt=\"\" class=\"wp-image-3175\" srcset=\"https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2022\/07\/IMG_7197_2r-1024x783.jpg 1024w, https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2022\/07\/IMG_7197_2r-300x229.jpg 300w, https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2022\/07\/IMG_7197_2r-768x587.jpg 768w, https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2022\/07\/IMG_7197_2r-1536x1174.jpg 1536w, https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2022\/07\/IMG_7197_2r.jpg 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">SD Card<\/h2>\n\n\n\n<p>SOC checks each boot device in a sequence. If the boot step fails, the next device is probed. SD card is the fastest way to switch operating systems and is not limited by small SPI NOR\/NAND Flash size. While it&#8217;s a bit more complicated than copying a file, It does not require special tools or knowledge to flash an SD card. There are plenty of tools. To name a few:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Win32DiskImager, Open Balena Etcher, Raspberry Pi Imager for Windows. All of them are GUI based as self explanatory. <\/li><li>Linux: dd. This is command line tool with syntax like:<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dd if=output\/images\/sdcard.img of=\/dev\/mmcblkX bs=1M status=progress<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">NAND and NOR Flash<\/h2>\n\n\n\n<p>To save space, onboard flash is much more suitable. Allwinner S3 allows flashing firmware over USB (if none of the boot devices contains a valid bootloader, it jumps to USB boot mode automatically).&nbsp;<a target=\"_blank\" href=\"https:\/\/github.com\/linux-sunxi\/sunxi-tools\" rel=\"noreferrer noopener\">sunxi-tools<\/a>&nbsp;is the tool to flash soldered flash chips without desoldering them.<\/p>\n\n\n\n<p>Some tricks can be utilized to speed up development. Unsolder flash from the module and use an external one connected with wires. It can be rapidly removed and flashed with a standalone Flash programmer. One step ahead &#8211; when SOC is in the reset\/sleep mode, most likely, it will not clamp SPI signals. Extra pigtail to the programmer could save flash swapping procedure and allow automate testing.<\/p>\n\n\n\n<p>While USB flashing seems to be a good idea, it is slow. Flash time with sunxi-tools is about 2h, and flashing chip with standalone programmer takes about 2-3min.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Buildroot is a simple, efficient, easy-to-use tool to generate embedded Linux systems. Allwinner S3 system can boot from: SD Card 0 \/ SDC0 SD Card 2 \/ SDC2 SPI NOR Flash \/ SPI0 SPI NAND Flash \/ SPI0 USB boot SD Card SOC checks each boot device in a sequence. If the boot step fails, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3175,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[157],"tags":[469,62,468,15,466,465,467],"class_list":["post-3169","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","tag-boot","tag-camera","tag-flash","tag-linux","tag-nand","tag-nor","tag-sd-card"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.kurokesu.com\/main\/wp-content\/uploads\/2022\/07\/IMG_7197_2r.jpg","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6VSmB-P7","_links":{"self":[{"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/posts\/3169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/comments?post=3169"}],"version-history":[{"count":9,"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/posts\/3169\/revisions"}],"predecessor-version":[{"id":3184,"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/posts\/3169\/revisions\/3184"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/media\/3175"}],"wp:attachment":[{"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/media?parent=3169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/categories?post=3169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kurokesu.com\/main\/wp-json\/wp\/v2\/tags?post=3169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}