PocketBeagle Arch Build

Ask questions about Arch Linux ARM. Please search before making a new topic.

Re: PocketBeagle Arch Build

Postby summers » Tue Oct 20, 2020 11:45 am

Just grab the latest one from https://ftp.denx.de/pub/u-boot/, you shouldn't need to do any patches, think they were all merged back in 2018, so as long as you grab the latest one you won't need it.

To compile I did:
$this->bbcode_second_pass_code('', 'make distclean
make am335x_boneblack_defconfig
make')
But this suggests: http://u-boot.10912.n7.nabble.com/PATCH-configs-Remove-am335x-boneblack-defconfig-td355136.html
That now you'll need to do:
$this->bbcode_second_pass_code('', 'make distclean
make am335x_evm_defconfig
make')
But I havn't tried this myself.

Then install as for the BBB.
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: PocketBeagle Arch Build

Postby TheJoker187 » Tue Oct 20, 2020 2:53 pm

Awesome, i will try this when i go home, do i need to install something specific on the pi before starting the build process ?
TheJoker187
 
Posts: 16
Joined: Sat Oct 17, 2020 11:37 am

Re: PocketBeagle Arch Build

Postby TheJoker187 » Tue Oct 20, 2020 6:25 pm

WE HAVE SOMETHING THIS TIME:

$this->bbcode_second_pass_code('', '
U-Boot SPL 2020.10 (Oct 20 2020 - 18:27:54 +0100)
Trying to boot from MMC1


U-Boot 2020.10 (Oct 20 2020 - 18:27:54 +0100)

CPU : AM335X-GP rev 2.1
Model: TI AM335x PocketBeagle
DRAM: 512 MiB
WDT: Started with servicing (60s timeout)
NAND: 0 MiB
MMC: OMAP SD/MMC: 0
Loading Environment from FAT... Unable to use mmc 0:1... <ethaddr> not set. Vali dating first E-fuse MAC
Net: No ethernet found.
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
** Unrecognized filesystem type **
** Unrecognized filesystem type **
switch to partitions #0, OK
mmc0 is current device
** Unrecognized filesystem type **
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
** Invalid partition 2 **
MMC Device 1 not found
no mmc device at slot 1
MMC Device 1 not found
no mmc device at slot 1
SD/MMC found on device 1
## Error: "bootcmd_nand0" not defined
starting USB...
')

Compiled as you suggested but i do not know why it doesn't boot at least we have something this time u-boot patch apllied without any problem, we are going somewhere by the way, thank you so much
TheJoker187
 
Posts: 16
Joined: Sat Oct 17, 2020 11:37 am

Re: PocketBeagle Arch Build

Postby summers » Wed Oct 21, 2020 8:49 am

Well although it didn't boot, there is actually a lot there that is encouraging. Me, I havn't yet attached a UART to my PB, I managed to get it to boot without ever seeing the boot messages!

Anyway, what you can see is the MLO/SPL worked, it was found, and it loaded the main uboot. The main uboot detected that its a Pocket Beagle, so it read the rom, where it says what type of am335x device it is. It then looks like it switched to the distro boot method (which is what we want).

But where it looked like it failed is in recognising the file systems on the SD. This could be two things (I think):

Firstly, does uboot have the ext2/4 support compiled in (https://gitlab.denx.de/u-boot/u-boot/-/blob/master/doc/README.ext4). Now you should be able to type command into uboot, try "help" - should show what commands you have. Then try "ext2ls" and "ext4ls" to see if you can see the arch /boot directory. $this->bbcode_second_pass_code('', 'ext4ls mmc 0:1 /boot') If this fails, when we'll need to add ext support to uboot - I'll look up how to when I get home (think its "make menuconfig" in uboot ...)

Secondly uboot used not to be able to handle all the ext4 extensions, I don't know if this is fixed now. Which mean you needed to create the partition with $this->bbcode_second_pass_code('', 'mkfs.ext4 -O ^metadata_csum,^64bit /dev/sdX1'), but think with an existing filesystem you can do the same with "tune2fs".

So think try these. If these don't work I should be able to give my 2018 MLO & uboot files - which worked for me. It would probably be best though to get the 2020 uboot working, as its moved forward a fair way from 2018.
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: PocketBeagle Arch Build

Postby TheJoker187 » Wed Oct 21, 2020 5:50 pm

So, i reflashed the sd card as you suggested by making the filesystem in this way:

$this->bbcode_second_pass_code('', 'mkfs.ext4 -O ^metadata_csum,^64bit /dev/sda1')

but it didn't worked if i type help on the uboot this is what happen:
$this->bbcode_second_pass_code('', '=> help
? - alias for 'help'
askenv - get environment variables from stdin
base - print or set address offset
bdinfo - print Board Info structure
blkcache - block cache diagnostics and control
boot - boot default, i.e., run 'bootcmd'
bootd - boot default, i.e., run 'bootcmd'
bootefi - Boots an EFI payload from memory
bootelf - Boot from an ELF image in memory
bootm - boot application image from memory
bootp - boot image via network using BOOTP/TFTP protocol
bootvx - Boot vxWorks from an ELF image
bootz - boot Linux zImage image from memory
chpart - change active partition
cmp - memory compare
coninfo - print console devices and information
cp - memory copy
crc32 - checksum calculation
dfu - Device Firmware Upgrade
dhcp - boot image via network using DHCP/TFTP protocol
dm - Driver model low level access
echo - echo args to console
editenv - edit environment variable
eeprom - EEPROM sub-system
env - environment handling commands
exit - exit script
ext2load - load binary file from a Ext2 filesystem
ext2ls - list files in a directory (default /)
ext4load - load binary file from a Ext4 filesystem
ext4ls - list files in a directory (default /)
ext4size - determine a file's size
ext4write - create a file in the root directory
false - do nothing, unsuccessfully
fastboot - run as a fastboot usb or udp device
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls - list files in a directory (default /)
fatmkdir - create a directory
fatrm - delete a file
fatsize - determine a file's size
fatwrite - write file into a dos filesystem
fdt - flattened device tree utility commands
fstype - Look up a filesystem type
fstypes - List supported filesystem types
go - start application at address 'addr'
gpio - query and control gpio pins
gpt - GUID Partition Table
help - print command description/usage
i2c - I2C sub-system
iminfo - print header information for application image
imxtract - extract a part of a multi-image
itest - return true/false on integer compare
ln - Create a symbolic link
load - load binary file from a filesystem
loadb - load binary file over serial line (kermit mode)
loads - load S-Record file over serial line
loadx - load binary file over serial line (xmodem mode)
loady - load binary file over serial line (ymodem mode)
loop - infinite loop on address range
ls - list files in a directory (default /)
md - memory display
mdio - MDIO utility commands
mii - MII utility commands
mm - memory modify (auto-incrementing address)
mmc - MMC sub system
mmcinfo - display MMC info
mtdparts - define flash/nand partitions
mw - memory write (fill)
nand - NAND sub-system
nboot - boot from NAND device
nfs - boot image via network using NFS protocol
nm - memory modify (constant address)
panic - Panic with optional message
part - disk partition related commands
ping - send ICMP ECHO_REQUEST to network host
printenv - print environment variables
pxe - commands to get and boot from pxe files
random - fill memory with random pattern
reset - Perform RESET of the CPU
run - run commands in an environment variable
save - save file to a filesystem
saveenv - save environment variables to persistent storage
setenv - set environment variables
sf - SPI flash sub-system
showvar - print local hushshell variables
size - determine a file's size
sleep - delay execution for some time
source - run script from memory
spl - SPL configuration
sspi - SPI utility command
sysboot - command to get and boot from syslinux files
test - minimal test like /bin/sh
tftpboot - boot image via network using TFTP protocol
time - run commands and summarize execution time
true - do nothing, successfully
usb - USB sub-system
usbboot - boot from USB device
version - print monitor, compiler and linker version')

So the ext4ls is present but if i type: ext4ls mmc 0:1 /boot it report an error : ** Unrecognized filesystem type ** even if I made it this time with: mkfs.ext4 -O ^metadata_csum,^64bit /dev/sda1.
I really do not know what else i can try at this point maybe i'm doing something wrong, I really do not know.
TheJoker187
 
Posts: 16
Joined: Sat Oct 17, 2020 11:37 am

Re: PocketBeagle Arch Build

Postby summers » Wed Oct 21, 2020 7:39 pm

Hmm very strange. an $this->bbcode_second_pass_code('', 'mmc rescan') may help - but otherwise I'll have to think about it.

Alas my PB is being used to compile uboot from armv5 machines, so don't want to mess with in right now.

If no progress at the weekend, I'll upload my MLO and uboot.
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: PocketBeagle Arch Build

Postby TheJoker187 » Thu Oct 22, 2020 5:11 pm

No luck yet even with mmc rescan command it i type mmcinfo this is the output:
$this->bbcode_second_pass_code('', '
=> mmcinfo
Device: OMAP SD/MMC
Manufacturer ID: 3
OEM: 5344
Name: SC16G
Bus Speed: 48000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.8 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
')
To me it appears that uboot is unable to show the ext4 filesystem no matter what i try it refuses to do that. It's like u-boot want something from FAT32 at least from what i can read but i have no experience with that so I do not Know.
TheJoker187
 
Posts: 16
Joined: Sat Oct 17, 2020 11:37 am

Re: PocketBeagle Arch Build

Postby TheJoker187 » Thu Oct 22, 2020 5:25 pm

I do not know if this is relevant but:
On the official debian uboot log i see that after
$this->bbcode_second_pass_code('', 'Press SPACE to abort autoboot in 0 seconds')
it immediately appers:
$this->bbcode_second_pass_code('', 'board_name=[A335PBGL] ...')
this is not happening on the u-boot i compile myself ... Hope can help, in the attachments you will find the boot logs of both.
Attachments
PocketBeagle_BootLogs.zip
PocketBeagle bootlogs
(2 KiB) Downloaded 204 times
TheJoker187
 
Posts: 16
Joined: Sat Oct 17, 2020 11:37 am

Re: PocketBeagle Arch Build

Postby summers » Fri Oct 23, 2020 10:26 am

"A335PBGL" are the characters saved in ROM that identify the Pocket Beagle. The latest uboot is far more device tree based, so from https://gitlab.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/am335x-pocketbeagle.dts it loads $this->bbcode_second_pass_code('', 'model = "TI AM335x PocketBeagle";')

So those two lines in each uboot, are just saying that the Pocket Beagle has been recognised as such. Now this shouldn't affect you problem, which is either accessing the SD card, or accessing ext4 partitions on the card. There is a slim chance that the SD card slot is described wrong in the device tree above:
$this->bbcode_second_pass_code('', '&am33xx_pinmux {
mmc0_pins: pinmux-mmc0-pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* (C15) spi0_cs1.gpio0[6] */
AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0) /* (G16) mmc0_dat0.mmc0_dat0 */
AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0) /* (G15) mmc0_dat1.mmc0_dat1 */
AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0) /* (F18) mmc0_dat2.mmc0_dat2 */
AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0) /* (F17) mmc0_dat3.mmc0_dat3 */
AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0) /* (G18) mmc0_cmd.mmc0_cmd */
AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0) /* (G17) mmc0_clk.mmc0_clk */
AM33XX_IOPAD(0x9a0, PIN_INPUT | MUX_MODE4) /* (B12) mcasp0_aclkr.mmc0_sdwp */
>;
};
};

&mmc1 {
status = "okay";
vmmc-supply = <&vmmcsd_fixed>;
bus-width = <4>;
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins>;
cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
};
')
Which as this is taken direct from the linux dts, it should be correct, and uboot should respond correctly. It a bit strange that mmc1 is using mmc0 pins, but hey ...

Planned last night to print how exactly how the partitions and file systems are defined on my PB, then can see if you have anything different. Anyway was distracted, but hopefully tonight will get time ...
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: PocketBeagle Arch Build

Postby TheJoker187 » Fri Oct 23, 2020 6:06 pm

Today i looked at the Official Image for the pocketbeagle, my hope was to find in the boot folder the MLO and U-Boot.img files to try a mixed solution in order to boot Arch but ... there are no such files so ... no luck.

https://drive.google.com/file/d/19MxuoW ... sp=sharing

Here you'll find the output files from my build process, i do not know if they will be usefull. Thank You for your time, if you agree and we'll be able to boot arch on the PB i was thinking about a repo on my github so other people can benefit from it.
TheJoker187
 
Posts: 16
Joined: Sat Oct 17, 2020 11:37 am

PreviousNext

Return to User Questions

Who is online

Users browsing this forum: No registered users and 7 guests