Como especificar o U-Boot para não usar o uramdisk

1

Eu gostaria de especificar o U-Boot para não usar o uramdisk para inicializar, porque meu ramdisk é parte da imagem do Linux. O problema é que mesmo que eu escolha sdboot que eu modifiquei e chame "bootm {linux} - {devicetree}" ele verifica a existência do arquivo uramdisk.image.gz.

EDIT: O que quer que eu faça, não substitui a propriedade sdboot. É como se estivesse carregando meu uEnv.txt (e funciona porque ele pega corretamente o blob da árvore do meu dispositivo que tem um nome diferente) e logo depois ele sobrescreve a propriedade sdboot ...

Aqui está o meu arquivo uEnv.txt:

sdboot=if mmcinfo; then run uenvboot; echo Copying Linux from SD to RAM... && load mmc 0 ${kernel_load_address} ${kernel_image} && echo Copying Device Tree from SD to RAM... && load mmc 0 ${devicetree_load_address} ${devicetree_image} && echo Boot Linux kernel... &&bootm ${kernel_load_address} - ${devicetree_load_address}; fi

E aqui está o registro que recebo:

U-Boot 2015.07-svn563 (Nov 17 2016 - 17:10:38 +0100)

Model: Zynq ZC702 Development Board
I2C:   ready
DRAM:  ECC disabled 512 MiB
# Malloc address : 0x1F316000
# Malloc size    : 12713984 (0x00c20000)
# CONFIG_SYS_TEXT_BASE       : 0x04000000
# U-Boot relocated in RAM at : 0x1ff36000
MMC:   zynq_sdhci: 0
SF: Detected N25Q128 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

# load_addr = 0x00000000
In:    serial
Out:   serial
Err:   serial
Model: Zynq ZC702 Development Board
Net:   Gem.e000b000
Hit any key to stop autoboot:  0 
Device: zynq_sdhci
Manufacturer ID: 3
OEM: 5344
Name: SE32G 
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 29.7 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading uEnv.txt
2187 bytes read in 14 ms (152.3 KiB/s)
Loaded environment from uEnv.txt
Importing environment from SD ...
Copying Linux from SD to RAM...
reading busybox.img
11904111 bytes read in 1003 ms (11.3 MiB/s)
reading mlg-x.dtb
13851 bytes read in 15 ms (901.4 KiB/s)
reading uramdisk.image.gz
** Unable to read file uramdisk.image.gz **
zynq-uboot> 

Aqui está o traço completo se eu deixar o autoboot falhar com o uramdisk, depois printenv, redefinir o env padrão e printenv novamente:

U-Boot 2015.07-svn563 (Nov 17 2016 - 17:10:38 +0100)

Model: Zynq ZC702 Development Board
I2C:   ready
DRAM:  ECC disabled 512 MiB
# Malloc address : 0x1F316000
# Malloc size    : 12713984 (0x00c20000)
# CONFIG_SYS_TEXT_BASE       : 0x04000000
# U-Boot relocated in RAM at : 0x1ff36000
MMC:   zynq_sdhci: 0
SF: Detected N25Q128 with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

# load_addr = 0x00000000
In:    serial
Out:   serial
Err:   serial
Model: Zynq ZC702 Development Board
Net:   Gem.e000b000
Hit any key to stop autoboot:  0 
Device: zynq_sdhci
Manufacturer ID: 3
OEM: 5344
Name: SE32G 
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 29.7 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading uEnv.txt
381 bytes read in 10 ms (37.1 KiB/s)
Loaded environment from uEnv.txt
Importing environment from SD ...
Copying Linux from SD to RAM...
reading busybox.img
11904111 bytes read in 1004 ms (11.3 MiB/s)
reading mlg-x.dtb
13839 bytes read in 15 ms (900.4 KiB/s)
reading uramdisk.image.gz
** Unable to read file uramdisk.image.gz **
zynq-uboot> printenv 
baudrate=115200
bitstream_image=system.bit.bin
boot_image=BOOT.bin
boot_size=0xF00000
bootcmd=run $modeboot
bootdelay=3
bootenv=uEnv.txt
devicetree_image=mlg-x.dtb
devicetree_load_address=0x2000000
devicetree_size=0x20000
dfu_mmc=run dfu_mmc_info && dfu 0 mmc 0
dfu_mmc_info=set dfu_alt_info ${kernel_image} fat 0 1\;${devicetree_image} fat 0 1\;${ramdisk_image} fat 0 1
dfu_ram=run dfu_ram_info && dfu 0 ram 0
dfu_ram_info=set dfu_alt_info ${kernel_image} ram 0x3000000 0x500000\;${devicetree_image} ram 0x2A00000 0x20000\;${ramdisk_image} ram 0x2000000 0x600000
ethact=Gem.e000b000
ethaddr=00:0a:35:00:01:22
fdt_high=0x20000000
filesize=360f
importbootenv=echo Importing environment from SD ...; env import -t ${loadbootenv_addr} $filesize
initrd_high=0x20000000
ipaddr=10.10.70.102
jtagboot=echo TFTPing Linux to RAM... && tftpboot ${kernel_load_address} ${kernel_image} && tftpboot ${devicetree_load_address} ${devicetree_image} && tftpboot ${ramdisk_load_address} ${ramdisk_image} && bootm ${kernel_load_address} ${ra
mdisk_load_address} ${devicetree_load_address}
kernel_image=busybox.img
kernel_load_address=0x2080000
kernel_size=0x500000
loadbit_addr=0x100000
loadbootenv=load mmc 0 ${loadbootenv_addr} ${bootenv}
loadbootenv_addr=0x2000000
mmc_loadbit=echo Loading bitstream from SD/MMC/eMMC to RAM.. && mmcinfo && load mmc 0 ${loadbit_addr} ${bitstream_image} && fpga load 0 ${loadbit_addr} ${filesize}
modeboot=sdboot
nandboot=echo Copying Linux from NAND flash to RAM... && nand read ${kernel_load_address} 0x100000 ${kernel_size} && nand read ${devicetree_load_address} 0x600000 ${devicetree_size} && echo Copying ramdisk... && nand read ${ramdisk_load_
address} 0x620000 ${ramdisk_size} && bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}
norboot=echo Copying Linux from NOR flash to RAM... && cp.b 0xE2100000 ${kernel_load_address} ${kernel_size} && cp.b 0xE2600000 ${devicetree_load_address} ${devicetree_size} && echo Copying ramdisk... && cp.b 0xE2620000 ${ramdisk_load_ad
dress} ${ramdisk_size} && bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}
preboot=if test $modeboot = sdboot && env run sd_uEnvtxt_existence_test; then if env run loadbootenv; then env run importbootenv; fi; fi; 
qspiboot=echo Copying Linux from QSPI flash to RAM... && sf probe 0 0 0 && sf read ${kernel_load_address} 0x100000 ${kernel_size} && sf read ${devicetree_load_address} 0x600000 ${devicetree_size} && echo Copying ramdisk... && sf read ${r
amdisk_load_address} 0x620000 ${ramdisk_size} && bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}
ramdisk_image=uramdisk.image.gz
ramdisk_load_address=0x4000000
ramdisk_size=0x5E0000
rsa_jtagboot=echo TFTPing Image to RAM... && tftpboot 0x100000 ${boot_image} && zynqrsa 0x100000 && bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}
rsa_nandboot=echo Copying Image from NAND flash to RAM... && nand read 0x100000 0x0 ${boot_size} && zynqrsa 0x100000 && bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}
rsa_norboot=echo Copying Image from NOR flash to RAM... && cp.b 0xE2100000 0x100000 ${boot_size} && zynqrsa 0x100000 && bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}
rsa_qspiboot=echo Copying Image from QSPI flash to RAM... && sf probe 0 0 0 && sf read 0x100000 0x0 ${boot_size} && zynqrsa 0x100000 && bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}
rsa_sdboot=echo Copying Image from SD to RAM... && load mmc 0 0x100000 ${boot_image} && zynqrsa 0x100000 && bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}
sd_uEnvtxt_existence_test=test -e mmc 0 /uEnv.txt
sdboot=if mmcinfo; then run uenvboot; echo Copying Linux from SD to RAM... && load mmc 0 ${kernel_load_address} ${kernel_image} && echo Copying Device Tree from SD to RAM... && load mmc 0 ${devicetree_load_address} ${devicetree_image} &&
 echo Boot Linux kernel... && bootm ${kernel_load_address} - ${devicetree_load_address}; fi
serverip=10.10.70.101
stderr=serial
stdin=serial
stdout=serial
thor_mmc=run dfu_mmc_info && thordown 0 mmc 0
thor_ram=run dfu_ram_info && thordown 0 ram 0
uenvboot=if run loadbootenv; then echo Loaded environment from ${bootenv}; run importbootenv; fi; if test -n $uenvcmd; then echo Running uenvcmd ...; run uenvcmd; fi
usbboot=if usb start; then run uenvboot; echo Copying Linux from USB to RAM... && load usb 0 ${kernel_load_address} ${kernel_image} && load usb 0 ${devicetree_load_address} ${devicetree_image} && load usb 0 ${ramdisk_load_address} ${ramd
isk_image} && bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}; fi

Environment size: 4843/131068 bytes
zynq-uboot> env default -f -a
## Resetting to default environment
zynq-uboot> printenv 
baudrate=115200
bitstream_image=system.bit.bin
boot_image=BOOT.bin
boot_size=0xF00000
bootcmd=run $modeboot
bootdelay=3
bootenv=uEnv.txt
devicetree_image=devicetree.dtb
devicetree_load_address=0x2000000
devicetree_size=0x20000
dfu_mmc=run dfu_mmc_info && dfu 0 mmc 0
dfu_mmc_info=set dfu_alt_info ${kernel_image} fat 0 1\;${devicetree_image} fat 0 1\;${ramdisk_image} fat 0 1
dfu_ram=run dfu_ram_info && dfu 0 ram 0
dfu_ram_info=set dfu_alt_info ${kernel_image} ram 0x3000000 0x500000\;${devicetree_image} ram 0x2A00000 0x20000\;${ramdisk_image} ram 0x2000000 0x600000
ethaddr=00:0a:35:00:01:22
fdt_high=0x20000000
importbootenv=echo Importing environment from SD ...; env import -t ${loadbootenv_addr} $filesize
initrd_high=0x20000000
ipaddr=10.10.70.102
jtagboot=echo TFTPing Linux to RAM... && tftpboot ${kernel_load_address} ${kernel_image} && tftpboot ${devicetree_load_address} ${devicetree_image} && tftpboot ${ramdisk_load_address} ${ramdisk_image} && bootm ${kernel_load_address} ${ra
mdisk_load_address} ${devicetree_load_address}
kernel_image=uImage
kernel_load_address=0x2080000
kernel_size=0x500000
loadbit_addr=0x100000
loadbootenv=load mmc 0 ${loadbootenv_addr} ${bootenv}
loadbootenv_addr=0x2000000
mmc_loadbit=echo Loading bitstream from SD/MMC/eMMC to RAM.. && mmcinfo && load mmc 0 ${loadbit_addr} ${bitstream_image} && fpga load 0 ${loadbit_addr} ${filesize}
nandboot=echo Copying Linux from NAND flash to RAM... && nand read ${kernel_load_address} 0x100000 ${kernel_size} && nand read ${devicetree_load_address} 0x600000 ${devicetree_size} && echo Copying ramdisk... && nand read ${ramdisk_load_
address} 0x620000 ${ramdisk_size} && bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}
norboot=echo Copying Linux from NOR flash to RAM... && cp.b 0xE2100000 ${kernel_load_address} ${kernel_size} && cp.b 0xE2600000 ${devicetree_load_address} ${devicetree_size} && echo Copying ramdisk... && cp.b 0xE2620000 ${ramdisk_load_ad
dress} ${ramdisk_size} && bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}
preboot=if test $modeboot = sdboot && env run sd_uEnvtxt_existence_test; then if env run loadbootenv; then env run importbootenv; fi; fi; 
qspiboot=echo Copying Linux from QSPI flash to RAM... && sf probe 0 0 0 && sf read ${kernel_load_address} 0x100000 ${kernel_size} && sf read ${devicetree_load_address} 0x600000 ${devicetree_size} && echo Copying ramdisk... && sf read ${r
amdisk_load_address} 0x620000 ${ramdisk_size} && bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}
ramdisk_image=uramdisk.image.gz
ramdisk_load_address=0x4000000
ramdisk_size=0x5E0000
rsa_jtagboot=echo TFTPing Image to RAM... && tftpboot 0x100000 ${boot_image} && zynqrsa 0x100000 && bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}
rsa_nandboot=echo Copying Image from NAND flash to RAM... && nand read 0x100000 0x0 ${boot_size} && zynqrsa 0x100000 && bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}
rsa_norboot=echo Copying Image from NOR flash to RAM... && cp.b 0xE2100000 0x100000 ${boot_size} && zynqrsa 0x100000 && bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}
rsa_qspiboot=echo Copying Image from QSPI flash to RAM... && sf probe 0 0 0 && sf read 0x100000 0x0 ${boot_size} && zynqrsa 0x100000 && bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}
rsa_sdboot=echo Copying Image from SD to RAM... && load mmc 0 0x100000 ${boot_image} && zynqrsa 0x100000 && bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}
sd_uEnvtxt_existence_test=test -e mmc 0 /uEnv.txt
sdboot=if mmcinfo; then run uenvboot; echo Copying Linux from SD to RAM... && load mmc 0 ${kernel_load_address} ${kernel_image} && load mmc 0 ${devicetree_load_address} ${devicetree_image} && load mmc 0 ${ramdisk_load_address} ${ramdisk_
image} && bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}; fi
serverip=10.10.70.101
thor_mmc=run dfu_mmc_info && thordown 0 mmc 0
thor_ram=run dfu_ram_info && thordown 0 ram 0
uenvboot=if run loadbootenv; then echo Loaded environment from ${bootenv}; run importbootenv; fi; if test -n $uenvcmd; then echo Running uenvcmd ...; run uenvcmd; fi
usbboot=if usb start; then run uenvboot; echo Copying Linux from USB to RAM... && load usb 0 ${kernel_load_address} ${kernel_image} && load usb 0 ${devicetree_load_address} ${devicetree_image} && load usb 0 ${ramdisk_load_address} ${ramd
isk_image} && bootm ${kernel_load_address} ${ramdisk_load_address} ${devicetree_load_address}; fi

Environment size: 4742/131068 bytes
zynq-uboot>
    
por AwaX 18.11.2016 / 10:06

1 resposta

2

Meu palpite é que ele não está executando o sdboot que está em uEnv.txt , mas sim o sdboot que está no ambiente padrão.

Evidência disso é que você não vê Copying Device Tree from SD to RAM... em sua saída de log.

Tente adicionar algo como o seguinte no final de uEnv.txt :

uenvcmd=echo Copying Linux from SD to RAM... && load mmc 0 ${kernel_load_address} ${kernel_image} && echo Copying Device Tree from SD to RAM... && load mmc 0 ${devicetree_load_address} ${devicetree_image} && echo Boot Linux kernel... && bootm ${kernel_load_address} - ${devicetree_load_address}

Eu não posso testar isso, é claro, mas você deve ver o seguinte no seu log:

Running uenvcmd ...
Copying Linux from SD to RAM...
...
Copying Device Tree from SD to RAM...
...
Boot Linux kernel...
...

Boa sorte!

    
por 18.11.2016 / 14:54