Hi, I am just starting to learn about embedded systems and linux. A friend gave me a beaglebone black to learn.
Initially, everything was fine. When I plug in the BBB to my computer, it showed up as a storage device and then I flashed an SD card with am335x-debian-11.7-iot-armhf-2023-09-02-4gb.img and used that to run my BBB. Everything was working fine.
Then out of curiosity, I wanted to try cross-compiling and I compiled kernel 5.10.65 on my ubuntu vm and transferred files to my BBB. After reboot, I lost access to the device and it does not show up as a storage device anymore even without the SD card. I tried flashing the SD card with the image that previously worked for me but that did not work either. I hooked up a UART-USB converter to get u-boot prints and this is what I saw.
U-Boot 2022.04-ge0d31da5 (Aug 04 2023 - 18:48:26 +0000)
CPU : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM: 512 MiB
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
Core: 150 devices, 14 uclasses, devicetree: separate
WDT: Started wdt@44e35000 with servicing (60s timeout)
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4... ** No partition table - mmc 0 **
Board: BeagleBone Black
<ethaddr> not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone Cape EEPROM: no EEPROM at address: 0x54
BeagleBone Cape EEPROM: no EEPROM at address: 0x55
BeagleBone Cape EEPROM: no EEPROM at address: 0x56
BeagleBone Cape EEPROM: no EEPROM at address: 0x57
Net: eth2: ethernet@4a100000, eth3: usb_ether
Press SPACE to abort autoboot in 0 seconds
board_name=[A335BNLT] ...
board_rev=[00C0] ...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
Couldn't find partition 0:2 0x82000000
Can't set block device
Couldn't find partition 0:2 0x82000000
Can't set block device
switch to partitions #0, OK
mmc0 is current device
** No partition table - mmc 0 **
Couldn't find partition mmc 0:1
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
** No partition table - mmc 0 **
Couldn't find partition mmc 0:1
Checking for: /uEnv.txt ...
** No partition table - mmc 0 **
Couldn't find partition mmc 0:1
Checking for: /boot/uEnv.txt ...
** No partition table - mmc 0 **
Couldn't find partition mmc 0:1
** No partition table - mmc 0 **
Couldn't find partition mmc 0:2
** No partition table - mmc 0 **
Couldn't find partition mmc 0:3
** No partition table - mmc 0 **
Couldn't find partition mmc 0:4
** No partition table - mmc 0 **
Couldn't find partition mmc 0:5
** No partition table - mmc 0 **
Couldn't find partition mmc 0:6
** No partition table - mmc 0 **
Couldn't find partition mmc 0:7
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk mmc@48060000.blk...
Scanning disk mmc@481d8000.blk...
Found 3 disks
No EFI system partition
BootOrder not defined
EFI boot manager: Cannot load any image
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc1(part 0) is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
Checking for: /boot/uEnv.txt ...
gpio: pin 55 (gpio 55) value is 1
1769 bytes read in 3 ms (575.2 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt...
gpio: pin 56 (gpio 56) value is 1
Running uname_boot ...
loading /boot/vmlinuz-5.10.65-ti-r23 ...
10347008 bytes read in 659 ms (15 MiB/s)
debug: [enable_uboot_overlays=1] ...
debug: [enable_uboot_cape_universal=1] ...
debug: [uboot_base_dtb_univ=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: Switching too: dtb=am335x-boneblack-uboot-univ.dtb ...
loading /boot/dtbs/5.10.65-ti-r23/am335x-boneblack-uboot-univ.dtb ...
215189 bytes read in 18 ms (11.4 MiB/s)
Found 0 extension board(s).
uboot_overlays: [fdt_buffer=0x60000] ...
uboot_overlays: unable to find [mmc 1:1 BB-ADC-00A0.dtbo]...
uboot_overlays: unable to find [mmc 1:1 BB-BONE-eMMC1-01-00A0.dtbo]...
uboot_overlays: unable to find [mmc 1:1 BB-HDMI-TDA998x-00A0.dtbo]...
debug: [console=ttyS0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet] ...
debug: [bootz 0x82000000 - 0x88000000] ...
Kernel image @ 0x82000000 [ 0x000000 - 0x9de200 ]
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Device Tree to 8ffc8000, end 8ffff894 ...
I believe the problem is that there are no partitions on the SD card but i repeated the same steps as the first time. So why would it work the first time and not the second time ? Is there any way out of this ? Any help will be appreciated. Thank you