[SOLVED] BeagleBone Black - cannot flash Arch to eMMC

This forum is for supported devices using an ARMv7 Texas Instruments (TI) SoC.

[SOLVED] BeagleBone Black - cannot flash Arch to eMMC

Postby FreddieChopin » Tue Oct 13, 2015 11:42 am

I'm trying to install Arch to the BeagleBone Black that I recently bought and so far I cannot succeed...

I follow the guide at http://archlinuxarm.org/platforms/armv7 ... bone-black ("Installation" tab), and the whole first phase (Arch on SD card) works ok - I can boot this system and it works.

So I proceed to the next phase - installing Arch on eMMC. I repeat steps 1-6 using "mmcblk1" in place of "sdX" and "mmcblk1p1" in place of sdX1. The steps 1-4 work correctly, however when I go to step 5 the problems start. I'm connected to the BeagleBone with serial console. When I issue "$ bsdtar -xpf ArchLinuxARM-am33x-latest.tar.gz -C mnt" command after I while I see this (usually in a few "bursts"):

$this->bbcode_second_pass_code('', '[ 882.307542] mmcqd/1: page allocation failure: order:4, mode:0xc020
[ 882.313779] CPU: 0 PID: 94 Comm: mmcqd/1 Not tainted 4.2.3-1-ARCH #1
[ 882.320215] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 882.326383] [<c001704c>] (unwind_backtrace) from [<c0014224>] (show_stack+0x20/0x24)
[ 882.334195] [<c0014224>] (show_stack) from [<c08b5eb8>] (dump_stack+0x24/0x28)
[ 882.341476] [<c08b5eb8>] (dump_stack) from [<c01222d8>] (warn_alloc_failed+0xec/0x128)
[ 882.349450] [<c01222d8>] (warn_alloc_failed) from [<c01253e4>] (__alloc_pages_nodemask+0x778/0x8f4)
[ 882.358554] [<c01253e4>] (__alloc_pages_nodemask) from [<c01257a4>] (alloc_kmem_pages+0x40/0x110)
[ 882.367481] [<c01257a4>] (alloc_kmem_pages) from [<c013e5d8>] (kmalloc_order+0x20/0x38)
[ 882.375523] [<c013e5d8>] (kmalloc_order) from [<c013e61c>] (kmalloc_order_trace+0x2c/0x94)
[ 882.383843] [<c013e61c>] (kmalloc_order_trace) from [<c0164644>] (__kmalloc+0x1e8/0x24c)
[ 882.391992] [<c0164644>] (__kmalloc) from [<c04ff1c8>] (edma_prep_slave_sg+0xa4/0x2fc)
[ 882.399966] [<c04ff1c8>] (edma_prep_slave_sg) from [<c07179b8>] (omap_hsmmc_request+0x430/0x528)
[ 882.408811] [<c07179b8>] (omap_hsmmc_request) from [<c06fa758>] (__mmc_start_request+0x3c/0x58)
[ 882.417565] [<c06fa758>] (__mmc_start_request) from [<c06fa8d4>] (mmc_start_request+0x160/0x298)
[ 882.426390] [<c06fa8d4>] (mmc_start_request) from [<c06fb640>] (mmc_start_req+0x29c/0x3c8)
[ 882.434714] [<c06fb640>] (mmc_start_req) from [<c070bd64>] (mmc_blk_issue_rw_rq+0xb8/0xaac)
[ 882.443119] [<c070bd64>] (mmc_blk_issue_rw_rq) from [<c070c9b4>] (mmc_blk_issue_rq+0x25c/0x4ec)
[ 882.451872] [<c070c9b4>] (mmc_blk_issue_rq) from [<c070d3ec>] (mmc_queue_thread+0xa8/0x170)
[ 882.460283] [<c070d3ec>] (mmc_queue_thread) from [<c0065a08>] (kthread+0xe4/0xfc)
[ 882.467817] [<c0065a08>] (kthread) from [<c0010588>] (ret_from_fork+0x14/0x2c)
[ 882.475068] Mem-Info:
[ 882.477371] active_anon:2396 inactive_anon:24 isolated_anon:0
[ 882.477371] active_file:49735 inactive_file:53834 isolated_file:0
[ 882.477371] unevictable:0 dirty:3419 writeback:8266 unstable:0
[ 882.477371] slab_reclaimable:10547 slab_unreclaimable:3810
[ 882.477371] mapped:2919 shmem:51 pagetables:113 bounce:0
[ 882.477371] free:3463 free_pcp:55 free_cma:2645
[ 882.510919] Normal free:13852kB min:2836kB low:3544kB high:4252kB active_anon:9584kB inactive_anon:96kB active_file:1
98940kB inactive_file:215336kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:524288kB managed:504304kB m
locked:0kB dirty:13676kB writeback:33064kB mapped:11676kB shmem:204kB slab_reclaimable:42188kB slab_unreclaimable:15240k
B kernel_stack:504kB pagetables:452kB unstable:0kB bounce:0kB free_pcp:220kB local_pcp:220kB free_cma:10580kB writeback_
tmp:0kB pages_scanned:0 all_unreclaimable? no
[ 882.556904] lowmem_reserve[]: 0 0 0
[ 882.560428] Normal: 41*4kB (UC) 321*8kB (UEC) 447*16kB (UEC) 122*32kB (UC) 1*64kB (C) 0*128kB 0*256kB 0*512kB 0*1024k
B 0*2048kB 0*4096kB 0*8192kB = 13852kB
[ 882.574504] 103626 total pagecache pages
[ 882.578457] 0 pages in swap cache
[ 882.581783] Swap cache stats: add 0, delete 0, find 0/0
[ 882.587055] Free swap = 0kB
[ 882.589944] Total swap = 0kB
[ 882.592831] 131072 pages RAM
[ 882.595717] 0 pages HighMem/MovableOnly
[ 882.599579] 4294966148 pages reserved
[ 882.603251] 6144 pages cma reserved
[ 882.606772] edma-dma-engine edma-dma-engine.0: edma_prep_slave_sg: Failed to allocate a descriptor
[ 882.615771] omap_hsmmc 481d8000.mmc: prep_slave_sg() failed
[ 882.621376] omap_hsmmc 481d8000.mmc: MMC start dma failure
[ 883.006667] mmcblk1: unknown error -1 sending read/write command, card status 0x900
[ 883.014663] blk_update_request: I/O error, dev mmcblk1, sector 4589568
[ 883.021726] blk_update_request: I/O error, dev mmcblk1, sector 4589576
[ 883.028614] blk_update_request: I/O error, dev mmcblk1, sector 4589584
[ 883.035430] blk_update_request: I/O error, dev mmcblk1, sector 4589592
[ 883.042265] blk_update_request: I/O error, dev mmcblk1, sector 4589600
[ 883.049094] blk_update_request: I/O error, dev mmcblk1, sector 4589608
[ 883.055899] blk_update_request: I/O error, dev mmcblk1, sector 4589616
[ 883.062727] blk_update_request: I/O error, dev mmcblk1, sector 4589624
[ 883.069550] blk_update_request: I/O error, dev mmcblk1, sector 4589632
[ 883.076356] blk_update_request: I/O error, dev mmcblk1, sector 4589640
[ 883.104391] EXT4-fs warning (device mmcblk1p1): ext4_end_bio:332: I/O error -5 writing to inode 128928 (offset 0 size
401408 starting block 573794)
[ 883.117697] Buffer I/O error on device mmcblk1p1, logical block 573440
[ 883.124265] Buffer I/O error on device mmcblk1p1, logical block 573441
[ 883.130835] Buffer I/O error on device mmcblk1p1, logical block 573442
[ 883.137402] Buffer I/O error on device mmcblk1p1, logical block 573443
[ 883.143956] Buffer I/O error on device mmcblk1p1, logical block 573444
[ 883.150521] Buffer I/O error on device mmcblk1p1, logical block 573445
[ 883.157087] Buffer I/O error on device mmcblk1p1, logical block 573446
[ 883.163640] Buffer I/O error on device mmcblk1p1, logical block 573447
[ 883.170205] Buffer I/O error on device mmcblk1p1, logical block 573448
[ 883.176771] Buffer I/O error on device mmcblk1p1, logical block 573449
[ 883.184216] EXT4-fs warning (device mmcblk1p1): ext4_end_bio:332: I/O error -5 writing to inode 128929 (offset 0 size
12288 starting block 573797)
[ 883.202890] EXT4-fs warning (device mmcblk1p1): ext4_end_bio:332: I/O error -5 writing to inode 128931 (offset 0 size
94208 starting block 573820)
[ 883.227354] EXT4-fs warning (device mmcblk1p1): ext4_end_bio:332: I/O error -5 writing to inode 128940 (offset 0 size
196608 starting block 573868)
[ 883.249831] EXT4-fs warning (device mmcblk1p1): ext4_end_bio:332: I/O error -5 writing to inode 128941 (offset 0 size
163840 starting block 573908)
[ 883.264103] EXT4-fs warning (device mmcblk1p1): ext4_end_bio:332: I/O error -5 writing to inode 128947 (offset 0 size
16384 starting block 573912)
[ 883.278248] EXT4-fs warning (device mmcblk1p1): ext4_end_bio:332: I/O error -5 writing to inode 128948 (offset 0 size
16384 starting block 573916)
[ 883.292153] EXT4-fs warning (device mmcblk1p1): ext4_end_bio:332: I/O error -5 writing to inode 128952 (offset 0 size
12288 starting block 573919)
[ 883.320095] EXT4-fs warning (device mmcblk1p1): ext4_end_bio:332: I/O error -5 writing to inode 128956 (offset 0 size
274432 starting block 573986)
[ 883.333931] EXT4-fs warning (device mmcblk1p1): ext4_end_bio:332: I/O error -5 writing to inode 128957 (offset 0 size
8192 starting block 573988)
[ 883.796952] mmcqd/1: page allocation failure: order:4, mode:0xc020
[ 883.803190] CPU: 0 PID: 94 Comm: mmcqd/1 Not tainted 4.2.3-1-ARCH #1
[ 883.809623] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 883.815788] [<c001704c>] (unwind_backtrace) from [<c0014224>] (show_stack+0x20/0x24)
[ 883.823600] [<c0014224>] (show_stack) from [<c08b5eb8>] (dump_stack+0x24/0x28)
[ 883.830881] [<c08b5eb8>] (dump_stack) from [<c01222d8>] (warn_alloc_failed+0xec/0x128)
[ 883.838855] [<c01222d8>] (warn_alloc_failed) from [<c01253e4>] (__alloc_pages_nodemask+0x778/0x8f4)
[ 883.847967] [<c01253e4>] (__alloc_pages_nodemask) from [<c01257a4>] (alloc_kmem_pages+0x40/0x110)
[ 883.856896] [<c01257a4>] (alloc_kmem_pages) from [<c013e5d8>] (kmalloc_order+0x20/0x38)
[ 883.864938] [<c013e5d8>] (kmalloc_order) from [<c013e61c>] (kmalloc_order_trace+0x2c/0x94)
[ 883.873258] [<c013e61c>] (kmalloc_order_trace) from [<c0164644>] (__kmalloc+0x1e8/0x24c)
[ 883.881407] [<c0164644>] (__kmalloc) from [<c04ff1c8>] (edma_prep_slave_sg+0xa4/0x2fc)
[ 883.889381] [<c04ff1c8>] (edma_prep_slave_sg) from [<c07179b8>] (omap_hsmmc_request+0x430/0x528)
[ 883.898225] [<c07179b8>] (omap_hsmmc_request) from [<c06fa758>] (__mmc_start_request+0x3c/0x58)
[ 883.906981] [<c06fa758>] (__mmc_start_request) from [<c06fa8d4>] (mmc_start_request+0x160/0x298)
[ 883.915807] [<c06fa8d4>] (mmc_start_request) from [<c06fb640>] (mmc_start_req+0x29c/0x3c8)
[ 883.924130] [<c06fb640>] (mmc_start_req) from [<c070bf04>] (mmc_blk_issue_rw_rq+0x258/0xaac)
[ 883.932620] [<c070bf04>] (mmc_blk_issue_rw_rq) from [<c070c9b4>] (mmc_blk_issue_rq+0x25c/0x4ec)
[ 883.941372] [<c070c9b4>] (mmc_blk_issue_rq) from [<c070d3ec>] (mmc_queue_thread+0xa8/0x170)
[ 883.949782] [<c070d3ec>] (mmc_queue_thread) from [<c0065a08>] (kthread+0xe4/0xfc)
[ 883.957316] [<c0065a08>] (kthread) from [<c0010588>] (ret_from_fork+0x14/0x2c)
[ 883.964566] Mem-Info:
[ 883.966868] active_anon:2397 inactive_anon:24 isolated_anon:0
[ 883.966868] active_file:49839 inactive_file:56615 isolated_file:0
[ 883.966868] unevictable:0 dirty:9208 writeback:6879 unstable:0
[ 883.966868] slab_reclaimable:10471 slab_unreclaimable:3473
[ 883.966868] mapped:3425 shmem:51 pagetables:113 bounce:0
[ 883.966868] free:1015 free_pcp:28 free_cma:33
[ 884.000240] Normal free:4060kB min:2836kB low:3544kB high:4252kB active_anon:9588kB inactive_anon:96kB active_file:19
9356kB inactive_file:226460kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:524288kB managed:504304kB ml
ocked:0kB dirty:36832kB writeback:27516kB mapped:13700kB shmem:204kB slab_reclaimable:41884kB slab_unreclaimable:13892kB
kernel_stack:504kB pagetables:452kB unstable:0kB bounce:0kB free_pcp:112kB local_pcp:112kB free_cma:132kB writeback_tmp
:0kB pages_scanned:36 all_unreclaimable? no
[ 884.046052] lowmem_reserve[]: 0 0 0
[ 884.049581] Normal: 67*4kB (UEMC) 116*8kB (UEMC) 159*16kB (UEMC) 10*32kB (UM) 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB
0*2048kB 0*4096kB 0*8192kB = 4060kB
[ 884.063483] 106513 total pagecache pages
[ 884.067436] 0 pages in swap cache
[ 884.070761] Swap cache stats: add 0, delete 0, find 0/0
[ 884.076003] Free swap = 0kB
[ 884.078902] Total swap = 0kB
[ 884.081790] 131072 pages RAM
[ 884.084677] 0 pages HighMem/MovableOnly
[ 884.088536] 4294966148 pages reserved
[ 884.092207] 6144 pages cma reserved
[ 884.095715] edma-dma-engine edma-dma-engine.0: edma_prep_slave_sg: Failed to allocate a descriptor
[ 884.104724] omap_hsmmc 481d8000.mmc: prep_slave_sg() failed
[ 884.110330] omap_hsmmc 481d8000.mmc: MMC start dma failure
[ 884.196222] mmcblk1: unknown error -1 sending read/write command, card status 0x900')

If I proceed with the installation the system doesn't boot from eMMC - one time I had multiple failures in starting services by systemd, another time it crashed very early and went into kernel panic because some shared library couldn't be loaded (invalid ELF header or sth like that). So it seems that there is some problem with extracting the root file system to the eMMC, but I really have no idea what it is...

I can successfully flash the standard Debian image to the eMMC and it works fine, so I hope the hardware is not faulty.

Any help appreciated - thanks in advance!
Last edited by FreddieChopin on Tue Oct 13, 2015 8:21 pm, edited 1 time in total.
FreddieChopin
 
Posts: 7
Joined: Tue Oct 13, 2015 11:29 am

Re: BeagleBone Black - cannot flash Arch to eMMC

Postby FreddieChopin » Tue Oct 13, 2015 1:11 pm

I've tried the following:
1. use tar instead of bsdtar
2. extract to SD card, not to eMMC
3. create 2GB swap on SD card

All of the above change nothing - I still get "page allocation failure" and multiple I/O errors...
FreddieChopin
 
Posts: 7
Joined: Tue Oct 13, 2015 11:29 am

Re: [SOLVED] BeagleBone Black - cannot flash Arch to eMMC

Postby FreddieChopin » Tue Oct 13, 2015 8:23 pm

It seems I solved my issue, but I still don't know where it came from... Issuing "cat /proc/sys/vm/min_free_kbytes" to the system on the SD card showed the default value 2838. I changed that to 16MB - "sysctl -w vm.min_free_kbytes=16384" - and the extraction passed with no errors, the system boots from the eMMC (;

I got this idea from here https://bugs.launchpad.net/ubuntu/+sour ... bug/746137 - comment #4.
FreddieChopin
 
Posts: 7
Joined: Tue Oct 13, 2015 11:29 am

Re: [SOLVED] BeagleBone Black - cannot flash Arch to eMMC

Postby bulletmark » Wed Oct 14, 2015 12:17 pm

I just thought I'd follow up here that I and new to Arch Linux Arm and followed the official procedure from http://archlinuxarm.org/platforms/armv7 ... bone-black tonight but it worked fine for me. Mine is an older BB with only 2GB eMMC so perhaps this problem happens on those with the newer 4GB eMMC?

The only reason I came to this forum is to clarify the installation instructions which say to use /dev/mmcblk1 but should also say to use partition /dev/mmcblk1p1 in step 4. This simple comment really needs to be added to the instructions.
bulletmark
 
Posts: 98
Joined: Tue Oct 13, 2015 10:17 pm

Re: [SOLVED] BeagleBone Black - cannot flash Arch to eMMC

Postby WarheadsSE » Wed Oct 14, 2015 1:48 pm

Commentation added.

As for the problem encountered here, I did not have this issue with my BBB Rev C while using a SanDIsk Ultra C10/UHS1. Hence why it was so hard to solve his issue, being entirely unable to replicate.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: [SOLVED] BeagleBone Black - cannot flash Arch to eMMC

Postby FreddieChopin » Wed Oct 28, 2015 2:58 pm

OK, I've installed Arch on 32GB Kingston microSD HC Class 10 UHS-I card. I want to dump internal eMMC to the SD card (with dd), and I'm seeing the same error again ); Increasing min_free_kbytes value to 16MB or 32MB didn't solve the issue... I'm starting to think that my BBB is somehow faulty...

EDIT:

Funny thing - updating everything on SD card (pacman -Syu) allowed me to successfully create the dump file but only if using small block sizes (1MB, for 16MB it still fails)... Maybe that's just a coincidence (the command succeeded only once), maybe not. The update changed - among others - linux from 4.2.2. to 4.2.4 - maybe this is the cause?
FreddieChopin
 
Posts: 7
Joined: Tue Oct 13, 2015 11:29 am

Re: [SOLVED] BeagleBone Black - cannot flash Arch to eMMC

Postby WarheadsSE » Wed Oct 28, 2015 4:05 pm

Wait, you were doing this??
$this->bbcode_second_pass_code('', 'dd ... bs=16M')
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: [SOLVED] BeagleBone Black - cannot flash Arch to eMMC

Postby FreddieChopin » Wed Oct 28, 2015 4:11 pm

I tried many things - 1M, 16M, no bs=... given - it all failed. After update the 1M succeeded (once, I don't know whether it would work again).

I suspected that 16MB is a stupid value, but I found it in some guide about dumping eMMC of BBB (http://elinux.org/BeagleBone_Black_Extr ... 2Fflashing), so I also tried it...

Are these values so bad? This board has 512MB of RAM - I know that it's not "a lot", but it's still way over 1MB or 16MB, and the real problem here is that the command actually succeeds, but the result is unusable - the errors are reported only in kernel messages (I see them because I'm connected with serial console).
FreddieChopin
 
Posts: 7
Joined: Tue Oct 13, 2015 11:29 am

Re: [SOLVED] BeagleBone Black - cannot flash Arch to eMMC

Postby krs013 » Wed Nov 11, 2015 5:47 am

I've had this same problem on two BBB's. In the end I made a swapfile to supplement the memory and that allowed me to install successfully.
krs013
 
Posts: 3
Joined: Wed Nov 11, 2015 5:45 am

Re: [SOLVED] BeagleBone Black - cannot flash Arch to eMMC

Postby FreddieChopin » Wed Nov 11, 2015 8:20 am

As I wrote in the second post - I already tried that and it didn't change anything in the original issue... ;(
FreddieChopin
 
Posts: 7
Joined: Tue Oct 13, 2015 11:29 am

Next

Return to Texas Instruments (TI)

Who is online

Users browsing this forum: No registered users and 17 guests