SD Card Expansion

Hi everyone,
I own a BeagleBone AI, and the operating system runs on the eMMC. Storage is limited to only 15GB. In this sense I want to add a cardSD that I can use only for additional storage space, without running the operating system on it, but I don’t know how to do that.

In my case, I set up and am running off a 128GB SD card, and using it as the root filesystem. (easier to hop to another BBB).

I just checked, if you have a non-bootable filesystem in the SD card, that the bootloader will start up the existing one on its own.

I’d give a try putting in an SD card and try mounting it. If need be, you may have to do an fdisk/format on the device. (don’t go setting the bootable flag!) My SD port shows up as /dev/mmcblk0 when a card is in place.

Once you see it as a filesystem and can mount it somewhere like /media/debian, try booting with it installed. You should come up normally, then you can go see about how to adjust the startup script(s) to include mounting it anywhere you want.

All right, I did it, but now I have anoter issue. Every time I reboot the Beaglebone AI, it try to boot from the SD card. Is it any methot to set up the boot order, to boot only from internal memory, not from SD card? Thank you!

I’m 98% sure that’s a u-boot thing. I’m surprised that it attempts to boot off the SD card without a kernel image in the expected folder, and the boot flag in the MBR shut off.
Check out status info that comes out the console port (J1 on the BBB, accessible through an FTDI-232R-3V3 cable)

yes, you can tell u-boot that it shouldn’t try it’s default boot target
sequence. the following is for u-boot 2019.xx, but likely won’t
be much different for newer versions.

on the u-boot console prompt, you can check the current sequence by entering
“printenv boot_targets”, it’ll likely print something like
mmc0 legacy_mmc0 mmc1 legacy_mmc1 pxe dhcp

mmc0 is the sd card, mmc1 is the internal emmc.

if you run “setenv boot_targets mmc1 legacy_mmc1 pxe dhcp”
followed by “saveenv” then you should get the desired behaviour of it
booting only off the emmc.

(if you also have primed the u-boot-tools package with a valid
/etc/fw_env.config for your u-boot variant/version/flavour,
then fw_printenv and fw_setenv will be able make this change but in userland,
ie. no need to connect a serial console cable to get to the u-boot console.)

Thought I’d give that a try just for fun.

debian@ebb:~$ cat /etc/dogtag

BeagleBoard.org Debian Image 2018-10-07

debian@ebb:~$ uname -a

Linux ebb 4.19.94-ti-r68 #1buster SMP PREEMPT Thu Sep 16 15:32:31 UTC 2021 armv7l GNU/Linux

debian@ebb:~$ printenv boot_targets

debian@ebb:~$

Doesn’t work with this install.

John

image001.jpg

And the version of U-boot is

U-Boot 2019.07-rc4-00001-g607b5b738b (Jul 06 2019 - 21:01:15 -0500), Build: jenkins-github_Bootloader-Builder-127

arm-linux-gnueabihf-gcc (Linaro GCC 6.5-2018.12) 6.5.0
GNU ld (Linaro_Binutils-2018.12) 2.27.0.20161229

Hi
I didnt manage to solve it. When I try to use the command “printenv boot_target” it display ## Error: “boot_targets” not defined. On the other hand, if I use the comand you said “setenv boot_targets mmc1 legacy_mmc1 pxe dhcp”, doesnt display something or any error, but “saveenv” doesnt work, Unknown command ‘saveenv’ - try ‘help’.
I need to mention that, my BBAI is connectet to the PC via a serial cable using a FTDI connector, with TerraTerm. Thank you for your answer.