(CUSTOM AM57xx) with AM5729 Debian 10.3 2020-04-06 1GB SD console

Hi All,

We are using AM5729 Debian 10.3 2020-04-06 1GB SD console image for our AM5729 eval board development, We need to do some changes in u-boot and kernel, Does it possible to get the u-boot and kernel source code for the same image?

Regards,
Rahulkumar

The kernel used in that image is 2 years old, from this branch:

I don’t remember what version of u-boot shipped, here’s the latest branch: Files · v2022.04-bbb.io-am335x-am57xx · BeagleBoard.org / u-boot · GitLab

Regards,

Thank you RobertCNelson.

Hi RobertCNelson,

I have build the ti-linux-4.19.y with buid_deb.sh, Inside the deploy folder I can see some .deb files but I am not sure that how can I load this images to sd card.

Regards,
Rahulkumar

@Rahul since you have a existing image, just bootup, then copy linux-image*.deb and run:

sudo dpkg -i linux-image*.deb

Regards

@RobertCNelson Thank you for guidance.

We are not able to bootup our custom am5729 board with prebuild Debian image AM5729 Debian 10.3 2020-04-06 1GB SD console. System is hanging at SPL level it self.
But same image is working on am5729 Eval kit.

Logs:
U-Boot SPL 2019.07-rc4-00001-g607b5b738b (Jul 06 2019 - 21:01:15 -0500)
DRA752-GP ES2.0
Trying to boot from MMC1
no pinctrl state for default mode
unable to get I2C bus. ret 1
tps65903x: could not set LDO1 voltage.
no pinctrl state for default mode
spl_start_uboot
CTRL_CORE_PAD_I2C1_SDA: 0x00060000
CTRL_CORE_PAD_I2C1_SCL: 0x00060000
CTRL_CORE_PAD_GPMC_A0: 0x00060007
CTRL_CORE_PAD_GPMC_A1: 0x00060007
CTRL_CORE_PAD_VIN2A_D4: 0x0005000f
CTRL_CORE_PAD_VIN2A_D5: 0x0005000f
CM_L4PER_GPIO7_CLKCTRL: 0x00000001
CM_L4PER_I2C1_CLKCTRL: 0x00000002
CM_L4PER_I2C4_CLKCTRL: 0x00000002
CM_L4PER_L4_PER1_CLKCTRL 0x00000001
PM_L4PER_I2C1_WKDEP 0x0000b000
RM_L4PER_I2C1_CONTEXT 0x00000002
PM_L4PER_I2C4_WKDEP 0x0000b000
RM_L4PER_I2C4_CONTEXT 0x00000001
BeagleBone: cape eeprom: i2c_probe: 0x54
Checking (ret 1 bus works) I2C1 bus. ret 1
Checking (ret 1 bus works) I2C4 bus. ret -19
BeagleBone: cape eeprom: i2c_probe: 0x55
Checking (ret 1 bus works) I2C1 bus. ret 1
Checking (ret 1 bus works) I2C4 bus. ret -19
BeagleBone: cape eeprom: i2c_probe: 0x56
Checking (ret 1 bus works) I2C1 bus. ret 1
Checking (ret 1 bus works) I2C4 bus. ret -19
BeagleBone: cape eeprom: i2c_probe: 0x57
Checking (ret 1 bus works) I2C1 bus. ret 1
Checking (ret 1 bus works) I2C4 bus. ret -19

So we thought to try a image build with source.

Ah… So you have a custom board and just expect a random image from 2020 to just work?

Our AM57xx images rely on U-Boot detecting and reading the board eeprom, to assume either a BeagleBoard-x15 or BeageBone-AI.

  • Step 1: port u-boot to your board
  • Step 2: patch kernel device-tree

Regards,

@RobertCNelson Thank so much you.

We have try to port Files · v2022.04-bbb.io-am335x-am57xx · BeagleBoard.org / u-boot · GitLab u-boot build image to our custom board but screen is black we are not seeing any logs.

Regards,
Rahulkumar

video screen? u-boot doesn’t support fb on am57xx…

You’ll need to use the debug uart to debug…

Regards,

@RobertCNelson No, It is not Video Screen.

We are using debug uart only.

Regards,
Rahulkumar

Okay, i’d first start here:

/* Override function to read eeprom information */
void do_board_detect(void)
{
	int rc;

	rc = ti_i2c_eeprom_am_get(CONFIG_EEPROM_BUS_ADDRESS,
				  CONFIG_EEPROM_CHIP_ADDRESS);
	if (rc) {
		printf("ti_i2c_eeprom_init failed %d\n", rc);
		ti_i2c_eeprom_am_set("BBONE-AI", "A");
	};

#ifdef CONFIG_SUPPORT_EMMC_BOOT
	rc = board_bootmode_has_emmc();
	if (!rc)
		rc = ti_emmc_boardid_get();
	if (rc)
		printf("ti_emmc_boardid_get failed %d\n", rc);
#endif
}

This is where, the i2c read fails, and we assume BeagleBone-AI:

	if (rc) {
		printf("ti_i2c_eeprom_init failed %d\n", rc);
		ti_i2c_eeprom_am_set("BBONE-AI", "A");
	};

You’ll need to start there and patch in support for your custom board.

Regards,

Hi @RobertCNelson,

I am working on this, along with this I’m trying to boot the eval board with u-boot source.
I’m facing some issue at boot level,

Partition Map for MMC device 0 – Partition Type: DOS

Part Start Sector Num Sectors UUID Type
1 2048 143360 64085bd3-01 0c Boot
2 145408 30998528 64085bd3-02 83
Scanning mmc device 0
Checking for: /uEnv.txt …
1516 bytes read in 22 ms (66.4 KiB/s)
Loaded environment from /uEnv.txt
Checking if uenvcmd is set …
Running uenvcmd …
1 bytes read in 21 ms (0 Bytes/s)
Already setup.
Checking for: /boot/uEnv.txt …
** Invalid partition 3 **
Couldn’t find partition mmc 0:3
** Invalid partition 4 **
Couldn’t find partition mmc 0:4
** Invalid partition 5 **
Couldn’t find partition mmc 0:5
** Invalid partition 6 **
Couldn’t find partition mmc 0:6
** Invalid partition 7 **
Couldn’t find partition mmc 0:7
switch to partitions #0, OK
mmc1(part 0) is current device

Please find below logs,
printenv.txt (6.0 KB)
Console.txt (2.0 KB)

Regards,
Rahulkumar

You’ve set uenvcmd, you should dump /uEnv.txt, so we can see what you overrode…

Regards,

linuxbootenv=setenv serverip 192.168.1.2
ipaddr=192.168.27.1
bootargs=console=ttyO0,115200 root=/dev/mmcblk0p2 rw
bootcmd=load mc 0:2 0x82000000 /boot/zImage;load mc 0:2 0x88000000 /boot/am57xx-evm.dtb;bootm 0x82000000 - 0x88000000;

Regards,
Rahulkumar

Yeap, your /uEnv.txt trashes the environment and fails to jump into the kernel.

Feel free to remove your custom /uEnv.txt and try again…

Regards,

I have tried with removing the uEnv.txt, but still facing same issue.
Console0711.txt (2.7 KB)

Regards,
Rahul

Odd… So what image are you really running? The whole premise of these questions was based off using am57xx-debian-10.3-console-armhf-2020-04-06-1gb.img.xz … But the partition layout and the setup of /uEnv.txt and no /boot/uEnv.txt tells me you are running something else…


#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=4.19.94-ti-r42
#uuid=
#dtb=
cmdline=coherent_pool=1M net.ifnames=0 rng_core.default_quality=100 quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 rng_core.default_quality=100 quiet video=HDMI-A-1:1024x768@60e

##enable x15: eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3-no-eeprom.sh

Regards,

Thank you @RobertCNelson.

Let me explain,

  1. First of all I intended to use AM5729 Debian 10.3 2020-04-06 1GB SD console for AM5729 custom board, Which was failed and board is not showing any sign on uart console.

  2. So I thought to build u-boot and kernel from source code, So I have requested same.
    After getting repo from you, I have build the u-boot and kernel for custom board but u-boot images was not working on custom board, So we thought first try on Eval board.

  3. Currently on Eval board, We are using the u-boot & MLO build from source and kernel and rootfs as AM5729 Debian 10.3 2020-04-06 1GB SD console .

Partition 1 : u-boot & MLO (2022.04-bbb.io-am335x-am57xx)
Partition 2 : Kernel & rfs ( AM5729 Debian 10.3 2020-04-06 1GB SD console)

In between I also tried the TI SDK,
Partition 1 : u-boot & MLO (2022.04-bbb.io-am335x-am57xx)
Partition 2 : Kernel ( ti-linux-4.19.y) and rfs (TI SDK)

But both is failed to load the kernel on Eval board.

Regards,
Rahulkumar

We store u-boot and MLO in the master boot record, and then only have one partition… After you use etcher to write the console image to your drive, copy your custom MLO and u-boot via:

sudo dd if=MLO of=${disk} count=2 seek=1 bs=128k
sudo dd if=u-boot-dtb.img of=${disk} count=4 seek=1 bs=384k

Where disk, your microSD…

Regards,

1 Like

Thank you @RobertCNelson.

I tried build-am57xx.sh and install-am335x-am57xx.sh for building and installing the u-boot image to sd card but we are getting same errors.

Console_0712.log (1.8 KB)

Regards,
Rahulkumar