So just "dd" those two files to the microsd to the same position.
Regards,
So just "dd" those two files to the microsd to the same position.
Regards,
just before I’ve run “old” version.
Should I just merely rerun the new one … or some other additional actions are needed ?
Thanks.
do whatever, just open the file and make sure it's "root=/dev/mmcblk1p1"
sudo nano /boot/extlinux/extlinux.conf
Regards,
It’s the case.
Then keeping sd-card in BBB (not inserting it in the host, where I built u-boot ?) execute these instructions:
sudo dd if=./u-boot/MLO of=${DISK} count=1 seek=1 bs=128k
sudo dd if=./u-boot/u-boot.img of=${DISK} count=2 seek=1 bs=384k
Parition the media with a 4MB hole:
sudo sfdisk ${DISK} <<-EOF
4M,L,*
EOF
Format as ext4:
sudo mkfs.ext4 -L rootfs ${DISK}1
Then find somewhere on BBB these two files MLO and u-boot.img and copy them to the rootfs on sd-card.
Correct ?
You can use 'dd' to extract them from the original drive..
Or the really simple solution, just back them up somewhere on your
drive, like i do here:
https://www.digikey.com/eewiki/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-BackupBootloader
sudo mkdir -p /media/rootfs/opt/backup/uboot/
sudo cp -v ./u-boot/MLO /media/rootfs/opt/backup/uboot/
sudo cp -v ./u-boot/u-boot.img /media/rootfs/opt/backup/uboot/
Regards,
So, the sequence of instructions would be as follows:
Parition the sd-card with a 4MB hole:
sudo sfdisk ${DISK} <<-EOF
4M,L,*
EOF
Format sd-card as ext4:
sudo mkfs.ext4 -L rootfs ${DISK}1
Copy MLO and u-boot.img to sd-card:
sudo mkdir -p /media/rootfs/opt/backup/uboot/
sudo cp -v ./u-boot/MLO /media/rootfs/opt/backup/uboot/
sudo cp -v ./u-boot/u-boot.img /media/rootfs/opt/backup/uboot/
Question: From where should I execute these commands ?
There is no u-boot in /boot folder on BBB !
I have this documented here:
https://www.digikey.com/eewiki/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSDcard
Regards,
So, all these actions should be done on the host PC and not on BBB ?
Correct ?
Another question: at the end of this scenario the files MLO and u-boot.img are located in:
/rootfs/opt/backup/uboot/
Will BBB boot from sd-card in such case ?
It doesn't matter, a Host PC/BBB/PI, it just doesn't matter, all you
need is a Linux system with a way to modify a microSD/etc..
Regards,
NOPE, it will not.. That's only a 'backup' location for end user's
"sanity".. As dd'ing files to a partition is a terrible file storage
medium for later retrieval..
Regards,
It doesn’t matter, a Host PC/BBB/PI, it just doesn’t matter …
Ok, I suppose here is misunderstanding.
At the beginning of this post I mentioned that I built u-boot on host machine, not on BBB.
Then I misunderstood your suggestions … thinking that there are versions of these 2 files on BBB.
So running generate_extlinux.sh is useless because whole job is done on host.
Correct ?
What about copying MLO and u-boot.img in /rootfs/opt/backup/uboot/ ?
Probably just in /rootfs ?
It doesn't matter, a Host PC/BBB/PI, it just doesn't matter ...
Ok, I suppose here is misunderstanding.
At the beginning of this post I mentioned that I built u-boot on host machine, not on BBB.
Then I misunderstood your suggestions ... thinking that there are versions of these 2 files on BBB.
So running generate_extlinux.sh is useless because whole job is done on host.
Correct ?
generate_extlinux.sh needs to be run on "host" and the "drive" you
want to convert..
It was written to help users 'migrate' from a default booting BBB, to
something that could boot a pure mainline version of u-boot.
What about copying MLO and u-boot.img in /rootfs/opt/backup/uboot/ ?
Probably just in /rootfs ?
Sure, if you want to, that doesn't follow FHS standards... I typically
use /opt/...
/opt Optional application software packages.
Regards,
I copied MLO and u-boot.img in /rootfs and tried to boot from sd-card.
Didn’t work - boot from sd-card filed and BBB was booted from eMMC:
U-Boot SPL 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600)
Trying to boot from MMC2
Loading Environment from EXT4… ** No partition table - mmc 0 **
U-Boot 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600), Build: jenkins-github_Bootloader-Builder-137
CPU : AM335X-GP rev 2.1
I2C: ready
DRAM: 512 MiB
No match for driver ‘omap_hsmmc’
No match for driver ‘omap_hsmmc’
Some drivers were not found
Reset Source: Global warm SW reset has occurred.
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4… ** No partition table - mmc 0 **
Board: BeagleBone Black
not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net: eth0: MII MODE
cpsw, usb_ether
Press SPACE to abort autoboot in 0 seconds
board_name=[A335BNLT] …
board_rev=[000C] …
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
** No partition table - mmc 0 **
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 **
Checking for: /uEnv.txt …
** No partition table - mmc 0 **
Checking for: /boot.scr …
** No partition table - mmc 0 **
Checking for: /boot/boot.scr …
** No partition table - mmc 0 **
Checking for: /boot/uEnv.txt …
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1…
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
256 bytes read in 14 ms (17.6 KiB/s)
1: Linux 4.19.94-ti-r42
Retrieving file: /boot/vmlinuz-4.19.94-ti-r42
10095592 bytes read in 648 ms (14.9 MiB/s)
append: console=ttyO0,115200n8 root=/dev/mmcblk1p1 ro rootfstype=ext4 coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet
Retrieving file: /boot/dtbs/4.19.94-ti-r42/am335x-boneblack.dtb
59483 bytes read in 25 ms (2.3 MiB/s)
Booting using the fdt blob at 0x88000000
Loading Device Tree to 8ffee000, end 8ffff85a … OK
Starting kernel …
[ 0.000763] timer_probe: no matching timers found
[ 0.115067] l4_wkup_cm:clk:0010:0: failed to disable
[ 0.765905] omap_voltage_late_init: Voltage driver support not added
Debian GNU/Linux 10 beaglebone ttyS0
BeagleBoard.org Debian Buster IoT Image 2020-04-06
Support: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian
default username:password is [debian:temppwd]
beaglebone login:
I copied MLO and u-boot.img in /rootfs and tried to boot from sd-card.
Didn't work -
Correct, the BOOTROM is very picky, i thought, we went over this in
your discussion thread previously.
boot from sd-card filed and BBB was booted from eMMC:
U-Boot 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600), Build: jenkins-github_Bootloader-Builder-137
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
256 bytes read in 14 ms (17.6 KiB/s)
1: Linux 4.19.94-ti-r42
Retrieving file: /boot/vmlinuz-4.19.94-ti-r42
10095592 bytes read in 648 ms (14.9 MiB/s)
append: console=ttyO0,115200n8 root=/dev/mmcblk1p1 ro rootfstype=ext4 coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet
Retrieving file: /boot/dtbs/4.19.94-ti-r42/am335x-boneblack.dtb
59483 bytes read in 25 ms (2.3 MiB/s)
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Loading Device Tree to 8ffee000, end 8ffff85a ... OKStarting kernel ...
[ 0.000763] timer_probe: no matching timers found
[ 0.115067] l4_wkup_cm:clk:0010:0: failed to disable
[ 0.765905] omap_voltage_late_init: Voltage driver support not addedDebian GNU/Linux 10 beaglebone ttyS0
BeagleBoard.org Debian Buster IoT Image 2020-04-06
Support: Beagleboard:BeagleBoneBlack Debian - eLinux.org
default username:password is [debian:temppwd]
beaglebone login:
Congrates, you've got a working /boot/extlinux/extlinux.conf so my
free job is done.
Regards,
I feel a little lost.
In one of your previous mails you mentioned this document:
https://www.digikey.com/eewiki/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSDcard
And there is no mention on extlinux.conf.
So, I don’t understand what is its actual role in sd-card setup !
Anyway, I terminated my sd-card setup by this two commands:
cp -v MLO /media/rootfs/
cp -v u-boot.img /media/rootfs/
Then I tried to boot from sd-card and boot process failed … BBB switched to eMMC and booted from it.
5 min ago, I repeated to setup the SD card fearing that the previous time I missed something.
To my amazement I found out that after formatting the card (i.e. sudo mkfs.ext4 -L rootfs -O ^metadata_csum,^64bit ${DISK}1
) the MLO and u-boot.img files are still there - in the rootfs partition, they weren’t erased during formatting:
pavel@ALABAMA:~/u-boot_chris$ sudo mkfs.ext4 -L rootfs -O ^metadata_csum,^64bit ${DISK}1
mke2fs 1.44.1 (24-Mar-2018)
Creating filesystem with 3888512 4k blocks and 972944 inodes
Filesystem UUID: bd1ae1cd-6b3e-4899-acf5-c4f05e298a9f
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
pavel@ALABAMA:~/u-boot_chris$ ls /media/
pavel/ rootfs/
pavel@ALABAMA:~/u-boot_chris$ ls /media/rootfs/
MLO u-boot.img
pavel@ALABAMA:~/u-boot_chris$ ls /media/rootfs/ -l
total 620
-rw-r–r-- 1 root root 108408 août 27 17:04 MLO
-rw-r–r-- 1 root root 523429 août 27 17:05 u-boot.img
pavel@ALABAMA:~/u-boot_chris$
I feel a little lost.
In one of your previous mails you mentioned this document:
Debian: Getting Started with the BeagleBone Black - Linux Guides - Electronic Component and Engineering Solution Forum - TechForum │ Digi-Key
And there is no mention on extlinux.conf.
So, I don't understand what is its actual role in sd-card setup !
On, Thu, Aug 20, 7:18 AM (7 days ago) you wrote:
<quote>
For building U-Boot I cloned "master" image from
gitlab.denx.de/u-boot/ and used am335x_evm_defconfig for default
configuration.
Any suggestions ?
<end quote>
So I recommended you use "extlinux.conf" to achieve that situation..
Now you can use mainline u-boot..
Anyway, I terminated my sd-card setup by this two commands:
cp -v MLO /media/rootfs/
cp -v u-boot.img /media/rootfs/
Just use the dd commands for MLO/u-boot.img if you want the BOOTROM to
use it. The "file" version requires a very specific location and
format.
Regards,
I apologize for my ignorance, but I don’t know what “mainline u-boot” is.
Just use the dd commands for MLO/u-boot.img if you want the BOOTROM to
use it. The “file” version requires a very specific location and
format.
Doing sd-card setup I used dd commands … as you described here.
https://www.digikey.com/eewiki/display/linuxonarm/BeagleBone+Black#BeagleBoneBlack-SetupmicroSDcard
Running these commands was the first step in this setup.
Last step was copying MLO and u-boot.img in rootfs partition of sd-card … also as you described in above-mentioned link.
Where did I go wrong?
I apologize for my ignorance, but I don't know what "mainline u-boot" is.
master branch of GitHub - u-boot/u-boot: "Das U-Boot" Source Tree
Just use the dd commands for MLO/u-boot.img if you want the BOOTROM to
use it. The "file" version requires a very specific location and
format.Doing sd-card setup I used dd commands ... as you described here.
Debian: Getting Started with the BeagleBone Black - Linux Guides - Electronic Component and Engineering Solution Forum - TechForum │ Digi-Key
Running these commands was the first step in this setup.
Last step was copying MLO and u-boot.img in rootfs partition of sd-card ... also as you described in above-mentioned link.
Where did I go wrong?
hold the boot button down, to force it to read from the microSD.. eMMC
is first on power up, unless teh button is pressed.
Regards,
Hi,
I’m facing the same problem(can’t start u-boot from micro SD). Can you tell me how you resolved it ?
Regards,
Guepy