ArchLinux SD card boot

I have ArchLinux installed and it reboots fine - shutdown -r now - but if I power down and restart it goes to four LED’s and stops. If I hold down the boot button and power it will then boot.

How do I get it to boot at power up always from the SD card? My boot partition has the following files -

102 -rwxr-xr-x 1 root root 104212 Aug 10 2013 MLO
354 -rwxr-xr-x 1 root root 361488 Aug 10 2013 u-boot.img
2 -rwxr-xr-x 1 root root 603 Oct 18 2013 uEnv.txt

and uEnv.txt has -

[root@BBBdoug mnt]# cat uEnv.txt
uenvcmd=run findmmc1; run findmmc0; if run loaduimage; then run loadfdt; run mmcboot; fi;
findmmc1=if test $board_name = A335BNLT; then setenv mmc1 1; else setenv mmc1 0; fi
findmmc0=setenv mmcdev 0; mmc dev ${mmcdev}; if mmc rescan; then setenv mmc0 1; else setenv mmc0 0; fi
mmcroot=/dev/mmcblk0p2 rw
loadfdt=ext4load mmc ${mmcdev}:2 ${fdtaddr} /boot/dtbs/${fdtfile}
loaduimage=if ext4load mmc 0:2 ${loadaddr} /boot/zImage; then setenv mmcdev 0; else setenv mmcdev 1; if test $mmc0 = 1; then setenv mmcroot /dev/mmcblk1p2 rw; fi; ext4load mmc 1:2 ${loadaddr} /boot/zImage; fi
optargs=coherent_pool=1M

As far as I can tell this is the latest code.

What do I need to do to get it to always boot without intervention from the micoSD card?

Here is one of many posts with the details you are looking for. Search the forums for alarm

I don’t know why anyone can’t just give a concise answer here instead of referring you to some other post where no real answer is given.

Here is my emmc - boot partition

[root@BBBdoug ~]# ls -als /mnt2
total 537
1 drwxr-xr-x 5 root root 1024 Dec 31 1969 .
4 drwxr-xr-x 18 root root 4096 Jan 1 2000 …
1 drwxr-xr-x 2 root root 512 Mar 18 2013 App
1 -rwxr-xr-x 1 root root 223 Mar 18 2013 autorun.inf
2 drwxr-xr-x 4 root root 2048 Mar 18 2013 Docs
1 drwxr-xr-x 5 root root 512 Mar 18 2013 Drivers
1 -rwxr-xr-x 1 root root 30 Mar 18 2013 ID.txt
41 -rwxr-xr-x 1 root root 41174 Mar 18 2013 LICENSE.txt
98 -rwxr-xr-x 1 root root 99976 Mar 18 2013 MLO
1 -rwxr-xr-x 1 root root 26 Jan 1 2000 old.uEnv.txt
1 -rwxr-xr-x 1 root root 292 Mar 18 2013 README.md
17 -rwxr-xr-x 1 root root 16827 Mar 18 2013 START.htm
371 -rwxr-xr-x 1 root root 379428 Mar 18 2013 u-boot.img
1 -rwxr-xr-x 1 root root 603 Jan 1 2000 uEnv.txt

and my sd card boot partition -

16 drwxr-xr-x 2 root root 16384 Dec 31 1969 .
4 drwxr-xr-x 18 root root 4096 Jan 1 2000 …
102 -rwxr-xr-x 1 root root 104212 Aug 10 2013 MLO
354 -rwxr-xr-x 1 root root 361488 Aug 10 2013 u-boot.img
2 -rwxr-xr-x 1 root root 603 Oct 18 2013 uEnv.txt

As you can see above I treid just copying uEnv.txt from the SD card to the emmc but it did the same thing. Do I have to wipe out the emmc boot partition and copy the sd boot to it?

I don’t want to use the emmc. I want to boot from the microSD.

I don't know why anyone can't just give a concise answer here instead of
referring you to some other post where no real answer is given.

Well, It's been asked so many times over the years, people are board
with the question/answer. :wink:

Here is my emmc - boot partition

[root@BBBdoug ~]# ls -als /mnt2
total 537
  1 drwxr-xr-x 5 root root 1024 Dec 31 1969 .
  4 drwxr-xr-x 18 root root 4096 Jan 1 2000 ..
  1 drwxr-xr-x 2 root root 512 Mar 18 2013 App
  1 -rwxr-xr-x 1 root root 223 Mar 18 2013 autorun.inf
  2 drwxr-xr-x 4 root root 2048 Mar 18 2013 Docs
  1 drwxr-xr-x 5 root root 512 Mar 18 2013 Drivers
  1 -rwxr-xr-x 1 root root 30 Mar 18 2013 ID.txt
41 -rwxr-xr-x 1 root root 41174 Mar 18 2013 LICENSE.txt
98 -rwxr-xr-x 1 root root 99976 Mar 18 2013 MLO
  1 -rwxr-xr-x 1 root root 26 Jan 1 2000 old.uEnv.txt
  1 -rwxr-xr-x 1 root root 292 Mar 18 2013 README.md
17 -rwxr-xr-x 1 root root 16827 Mar 18 2013 START.htm
371 -rwxr-xr-x 1 root root 379428 Mar 18 2013 u-boot.img
  1 -rwxr-xr-x 1 root root 603 Jan 1 2000 uEnv.txt

and my sd card boot partition -

16 drwxr-xr-x 2 root root 16384 Dec 31 1969 .
  4 drwxr-xr-x 18 root root 4096 Jan 1 2000 ..

102 -rwxr-xr-x 1 root root 104212 Aug 10 2013 MLO
354 -rwxr-xr-x 1 root root 361488 Aug 10 2013 u-boot.img
  2 -rwxr-xr-x 1 root root 603 Oct 18 2013 uEnv.txt

As you can see above I treid just copying uEnv.txt from the SD card to the
emmc but it did the same thing. Do I have to wipe out the emmc boot
partition and copy the sd boot to it?

I don't want to use the emmc. I want to boot from the microSD.

dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=16

There, the bootloader on the eMMC will never get in the way again..

Regards,

also it was in that link multiple times in the three pages it was on.

Nope dont need to wipe. I have 10+ BBB’s booting with the methods in the link I gave and that have been posted numerous times across many other threads.

Also Arch is not Debian/Ubuntu, it expects much more from its users than typical OS’s would. Arch is very much against spoon feeding especially when its documented numerous times.

I don’t know why anyone can’t just give a concise answer here instead of referring you to some other post where no real answer is given.

Here is my emmc - boot partition

[root@BBBdoug ~]# ls -als /mnt2
total 537
1 drwxr-xr-x 5 root root 1024 Dec 31 1969 .
4 drwxr-xr-x 18 root root 4096 Jan 1 2000 …
1 drwxr-xr-x 2 root root 512 Mar 18 2013 App
1 -rwxr-xr-x 1 root root 223 Mar 18 2013 autorun.inf
2 drwxr-xr-x 4 root root 2048 Mar 18 2013 Docs
1 drwxr-xr-x 5 root root 512 Mar 18 2013 Drivers
1 -rwxr-xr-x 1 root root 30 Mar 18 2013 ID.txt
41 -rwxr-xr-x 1 root root 41174 Mar 18 2013 LICENSE.txt
98 -rwxr-xr-x 1 root root 99976 Mar 18 2013 MLO
1 -rwxr-xr-x 1 root root 26 Jan 1 2000 old.uEnv.txt
1 -rwxr-xr-x 1 root root 292 Mar 18 2013 README.md
17 -rwxr-xr-x 1 root root 16827 Mar 18 2013 START.htm
371 -rwxr-xr-x 1 root root 379428 Mar 18 2013 u-boot.img
1 -rwxr-xr-x 1 root root 603 Jan 1 2000 uEnv.txt

and my sd card boot partition -

16 drwxr-xr-x 2 root root 16384 Dec 31 1969 .
4 drwxr-xr-x 18 root root 4096 Jan 1 2000 …
102 -rwxr-xr-x 1 root root 104212 Aug 10 2013 MLO
354 -rwxr-xr-x 1 root root 361488 Aug 10 2013 u-boot.img
2 -rwxr-xr-x 1 root root 603 Oct 18 2013 uEnv.txt

As you can see above I treid just copying uEnv.txt from the SD card to the emmc but it did the same thing. Do I have to wipe out the emmc boot partition and copy the sd boot to it?

I don’t want to use the emmc. I want to boot from the microSD.


For more options, visit http://beagleboard.org/discuss

You received this message because you are subscribed to the Google Groups “BeagleBoard” group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Also Arch is not Debian/Ubuntu, it expects much more from its users than typical OS’s would. Arch is very much against spoon feeding especially when its documented numerous times.

Okay… Take out microSD. Boot with eMMC. Stop boot, type ‘printenv’, and figure out why your uEnv.txt doesn’t work.

Robert,

Thanks. I know you are a busy guy. I just wish there was a better FAQ. Maybe there is?

Anyhow… next question… is there a way to retain the fallback emmc boot and still boot right off from the microsd without any intervention?

BTW the thread you referenced is referring to booting from the emmc not the SD. The original author wanted to use the SD as just memory space.

Somewhere in there a number of people comment that -

“latest uboot has changed behaviors, and no longer requires the button press to boot from the SD”

So does this mean the uboot on the emmc or on the sd card. I have the latest on the sd card. The emmc has what came with it which was two weeks ago. Do I just need to update the emmc boot files?

This seems to be an oft asked question. I don’t think it has anything to do with a specific OS but rather the uboot code on the emmc and/or SDcard. Isn’t there one place where this is answered without a lot of argument as to how to do it?

Well, it really depends on the "factory" bootloader stored in eMMC..

With my images, i support the factory bootloader back till: Angstrom's
2013.06.20 release.

You can see the "complex" uEnv.txt here:
https://github.com/RobertCNelson/omap-image-builder/blob/master/target/boot/beagleboard.org.txt

With the new revision, flashed with my debian image from the factory,

Your uEnv.txt can be as simple as:

uenvcmd=run loadkernel; run loadfdt; run mmcargs; bootz ${loadaddr} - ${fdtaddr}

you can see the u-boot patch here:

https://github.com/RobertCNelson/Bootloader-Builder/blob/master/patches/v2014.04/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch

Essentially, it's looking for "uenvcmd" to be defined in uEnv.txt.

Regards,

err, i mean..

uenvcmd=run loadimage; run loadfdt; run mmcargs; bootz ${loadaddr} - ${fdtaddr}

(it helps to look at the patch. :wink: )

Regards,

Well the option I took was to nuke mmcblk1 which worked. I have no reason to have anything there anyhow. I am running a headless system in ArchLinux. I don’t have time to fool around with why it isn’t working when I am not going to use it. None of the options suggested worked other than dd’ing the eMMC.

Did you tried the method described here?

http://archlinuxarm.org/platforms/armv7/ti/beaglebone-black

I copy the part here.

Installing to eMMC

  1. After booting into Arch Linux ARM, ensure you have wget and dosfstools installed:
    pacman -Syu wget dosfstools
  2. Follow the above steps 4 through 7 using the device /dev/mmcblk1p[1|2]. Repartitioning is not required since the eMMC is already partitioned correctly.
  3. Power down the system, waiting until all the LEDs go out:poweroff
  4. Remove power, remove the micro SD card, then reapply power. The system will boot into eMMC. If an SD card created with the above steps is still in the system when it boots, it will boot to the SD card instead of eMMC.
  5. To use the micro SD slot for general storage, simply partition and format the device as a normal drive. Also note that the card must be inserted at boot for it to be recognized.