Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

U-Boot section: Wrong command? #4

Open
dueringa opened this issue Mar 6, 2019 · 8 comments · May be fixed by #12
Open

U-Boot section: Wrong command? #4

dueringa opened this issue Mar 6, 2019 · 8 comments · May be fixed by #12

Comments

@dueringa
Copy link

dueringa commented Mar 6, 2019

Hi,

in doc/03_bootloader.md, you say to modify the U-Boot config, specifically setting CONFIG_BOOTCOMMAND="run mmc_elf_bootcmd", while in the next paragraph, you add a bootcommand / environment variable bootcmd_bare_arm.
Is this intended? Shouldn't it be CONFIG_BOOTCOMMAND="run bootcmd_bare_arm"?

Because this way, when I start U-Boot in qemu, I get an error ## Error: "mmc_elf_bootcmd" not defined , i.e. the autoboot doesn't work

@csukuangfj
Copy link
Contributor

@dueringa

you have to change

CONFIG_BOOTCOMMAND="run mmc_elf_bootcmd"

to

CONFIG_BOOTCOMMAND="run bootcmd_bare_arm"

@dueringa
Copy link
Author

@csukuangfj That's what I meant to type, actually

AntGeorge added a commit to AntGeorge/baremetal-arm that referenced this issue Feb 1, 2020
@AntGeorge AntGeorge linked a pull request Feb 1, 2020 that will close this issue
@tristenator
Copy link

hey i was just working through the arm-baremetal-ebook.pdf and came across this same issue.

no biggie i thought i'd just bring it to your attention.

excellent project tyvm

@Harrolee
Copy link

Harrolee commented Feb 17, 2021

^^
Like tristenator, I found the same issue.

This project is super sweet.

@rbalykov
Copy link

rbalykov commented Nov 6, 2021

u-boot-2018.09/tools/mkimage -A arm -C none -T kernel -a 0x60000000 -e 0x60000000 -d better-hang.elf bare-arm.uimg

later in test it's not ELF, but BIN

@gmhpfc
Copy link

gmhpfc commented Mar 26, 2023

Your suggestion work but i have now this problem...
...
...
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
108 bytes read in 12 ms (8.8 KiB/s)

Booting kernel from Legacy Image at 60000000 ...

Image Name:
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 44 Bytes = 44 Bytes
Load Address: 60000000
Entry Point: 60000000
Verifying Checksum ... OK
Working FDT set to 0
Loading Kernel Image
FDT and ATAGS support not compiled in

resetting ...

@rugosi
Copy link

rugosi commented Mar 17, 2024

Trying to run in qemu, and got the same message:

boot sequence:

bootm 0x60000000

Booting kernel from Legacy Image at 60000000 ...

Image Name:
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4652 Bytes = 4.5 KiB
Load Address: 60000000
Entry Point: 60000000
Verifying Checksum ... OK
Working FDT set to 0
Loading Kernel Image to 60000000
FDT and ATAGS support not compiled in

resetting...

With
U-Boot 2024.04-rc4-00021-g86fd291a79-dirty
arm-none-eabi-gcc (15:12.2.rel1-1) 12.2.1 20221205
debian 12

u-boot printenv gives:

kernel_addr_r=0x60100000
fdt_addr_r=0x60000000
fdtcontroladdr=6087fbb0
fdtfile=vexpress-v2p-ca9.dtb
bootcmd=run mmc_elf_bootcmd
mmc_elf_bootcmd=mmc dev 0;ext2load mmc 0 0x60000000 bare-arm.uimg;bootm 0x60000000;
mtd=armflash:1M@0x800000(uboot),7M@0x1000000(kernel),24M@0x2000000(initrd)

I think it is supposed to start.

Is it related somehow to fdtcontroladdr? or fdtfile?

@rugosi
Copy link

rugosi commented Mar 17, 2024

Trying to run in qemu, and got the same message:
...
I think it is supposed to start.

Is it related somehow to fdtcontroladdr? or fdtfile?

No, with the u-boot version explicitely mentioned in the doc (2018.09), it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants