AnsweredAssumed Answered

how to change the size of emmc in barebox with yocto

Question asked by meizi mei on Jun 27, 2019
Latest reply on Jun 27, 2019 by igorpadykov

Hello,everybody!I have a problem and I don't know how to solve. My custom board have a emmc. How can I change the size of emmc from 16GB to 8GB. The environment of develop as follow:

Yocto

barebox:2016.11.0-phy7-r7.0

linux:linux-4.1.46

 

This is the log when the barebox started: 

Switch to console [serial0]


barebox 2016.11.0-i.MX6-PD16.1.1+ #5 Sun Jun 16 14:30:42 CST 2019


Board: Phytec phyCORE-i.MX6 Quad with eMMC
initcall-> globalvar_init+0x1/0x2c
initcall-> platform_init+0x1/0xc
initcall-> mdio_bus_init+0x1/0xc
initcall-> usb_bus_init+0x1/0xc
initcall-> spi_bus_init+0x1/0xc
initcall-> i2c_bus_init+0x1/0xc
initcall-> gpio_desc_alloc+0x1/0x18
initcall-> fs_bus_init+0x1/0xc
initcall-> imx_gpio_add+0x1/0x10
initcall-> imx5_ccm_init+0x1/0x1c
initcall-> imx6_ccm_init+0x1/0xc
initcall-> imx6sx_ccm_init+0x1/0xc
initcall-> imx6_ccm_init+0x1/0xc
initcall-> of_arm_init+0x1/0x2c
initcall-> unwind_init+0x1/0x24
initcall-> imx_iomux_v3_init+0x1/0xc
initcall-> net_init+0x1/0x54
initcall-> init_fs+0x1/0x2c
initcall-> ccxmx53_postcore_init+0x1/0x1c
initcall-> loco_postcore_init+0x1/0x2c
initcall-> vmx53_postcore_init+0x1/0x1c
initcall-> imx_gpt_init+0x1/0xc
initcall-> imx_init+0x1/0x14c
detected i.MX6 Quad revision 1.5
initcall-> imx_src_reset_init+0x1/0xc
initcall-> imx_serial_driver_register+0x1/0xc
initcall-> input_init+0x1/0x50
initcall-> efikamx_usb_init+0x1/0xfc
initcall-> dos_partition_init+0x1/0xc
initcall-> efi_partition_init+0x1/0x10
initcall-> dfi_fs700_m60_mem_init+0x1/0x48
initcall-> sabrelite_mem_init+0x1/0x34
initcall-> imx_esdctl_init+0x1/0xc
initcall-> mmu_init+0x1/0x1e8
initcall-> imx6_mmu_init+0x1/0x58
initcall-> mem_malloc_resource+0x1/0x6c
initcall-> bootsource_init+0x1/0x34
initcall-> reset_source_init+0x1/0x20
initcall-> register_mtdoob+0x1/0x10
initcall-> register_mtdraw+0x1/0x10
initcall-> imx_usbmisc_init+0x1/0x10
initcall-> imx_spi_driver_register+0x1/0xc
initcall-> i2c_fsl_driver_register+0x1/0xc
initcall-> mc13xxx_init+0x1/0x30
initcall-> imx_pwm_driver_register+0x1/0xc
initcall-> apbh_dma_driver_register+0x1/0xc
initcall-> stmpe_gpio_add+0x1/0xc
initcall-> regulator_fixed_driver_register+0x1/0xc
initcall-> ext_init+0x1/0xc
initcall-> ramfs_init+0x1/0xc
initcall-> devfs_init+0x1/0xc
initcall-> fat_init+0x1/0xc
initcall-> ubifs_init+0x1/0x38
initcall-> tftp_init+0x1/0xc
initcall-> nfs_init+0x1/0x2c
initcall-> cm_fx6_devices_init+0x1/0x5c
initcall-> nitrogen6x_coredevices_init+0x1/0x48
initcall-> e9_coredevices_init+0x1/0x28
initcall-> imx51_babbage_init+0x1/0x40
initcall-> vincell_devices_init+0x1/0x64
initcall-> gw54xx_coredevices_init+0x1/0x28
initcall-> sabrelite_coredevices_init+0x1/0x44
initcall-> sabresd_coredevices_init+0x1/0x28
initcall-> imx6sx_sdb_coredevices_init+0x1/0xc4
initcall-> udoo_coredevices_init+0x1/0x28
initcall-> imx6sx_clocks_init+0x1/0xa4
initcall-> imx_iim_init+0x1/0x10
initcall-> imx_ocotp_init+0x1/0x10
initcall-> arm_request_stack+0x1/0x30
initcall-> mount_root+0x1/0x40
initcall-> binfmt_sh_init+0x1/0xc
initcall-> atheros_phy_init+0x1/0xc
initcall-> ksphy_init+0x1/0xc
initcall-> realtek_phy_init+0x1/0xc
initcall-> imx_usbphy_init+0x1/0xc
initcall-> nop_usbphy_init+0x1/0xc
initcall-> binfmt_uimage_init+0x1/0xc
initcall-> png_init+0x1/0xc
initcall-> realq7_enet_init+0x1/0x88
initcall-> sabrelite_ksz9021rn_setup+0x1/0x64
initcall-> imx6sx_sdb_setup_pmic_voltages+0x1/0x1e0
initcall-> tqma6x_enet_init+0x1/0x80
initcall-> udoo_ksz9021rn_setup+0x1/0x80
initcall-> loglevel_init+0x1/0x30
initcall-> generic_phy_register+0x1/0xc
initcall-> asix_init+0x1/0xc
initcall-> smsc95xx_init+0x1/0xc
initcall-> fec_driver_register+0x1/0xc
mdio_bus: miibus0: probed
initcall-> imx_nand_driver_register+0x1/0xc
initcall-> mxs_nand_driver_register+0x1/0xc
initcall-> dataflash_driver_register+0x1/0x14
initcall-> m25p80_driver_register+0x1/0x14
m25p80 m25p80@00: w25q32 (4096 Kbytes)
initcall-> usb_hub_init+0x1/0xc
initcall-> imx_chipidea_driver_register+0x1/0xc
initcall-> gsermod_init+0x1/0xc
initcall-> acmmod_init+0x1/0xc
initcall-> dfumod_init+0x1/0xc
initcall-> fastbootmod_init+0x1/0xc
initcall-> fsl_udc_driver_register+0x1/0xc
initcall-> usb_stor_init+0x1/0xc
initcall-> ehci_driver_register+0x1/0xc
initcall-> ahci_driver_register+0x1/0xc
initcall-> imx_sata_driver_register+0x1/0xc
initcall-> platform_ide_driver_register+0x1/0xc
initcall-> imx_pata_driver_register+0x1/0xc
initcall-> mci_init+0x1/0x18
initcall-> fsl_esdhc_driver_register+0x1/0xc
imx-esdhc 2194000.usdhc: registered as 2194000.usdhc
imx-esdhc 219c000.usdhc: registered as 219c000.usdhc
initcall-> da9063_init+0x1/0x14
initcall-> mc34704_init+0x1/0x18
initcall-> mc_init+0x1/0x18
initcall-> stmpe_init+0x1/0x18
initcall-> led_gpio_of_driver_register+0x1/0xc
initcall-> at25_driver_register+0x1/0x14
initcall-> gpio_keys_driver_register+0x1/0xc
initcall-> imx_wd_driver_register+0x1/0xc
initcall-> null_init+0x1/0x24
initcall-> full_init+0x1/0x24
initcall-> zero_init+0x1/0x24
initcall-> mem_init+0x1/0x4c
initcall-> md5_digest_register+0x1/0xc
initcall-> netconsole_init+0x1/0xd8
netconsole: registered as netconsole-1
initcall-> nitrogen6x_devices_init+0x1/0x5c
initcall-> ccwmx53_devices_init+0x1/0x110
initcall-> dfi_fs700_m60_init+0x1/0x60
initcall-> e9_devices_init+0x1/0x84
initcall-> riotboard_device_init+0x1/0x44
initcall-> hipercam_init+0x1/0x30
initcall-> santaro_device_init+0x1/0x74
initcall-> gw54xx_devices_init+0x1/0xd0
initcall-> physom_imx6_devices_init+0x1/0x390
phySOM-i.MX6: Using environment in MMC
initcall-> realq7_device_init+0x1/0x5c
initcall-> sabrelite_devices_init+0x1/0x54
initcall-> sabresd_devices_init+0x1/0x24
initcall-> h100_device_init+0x1/0x20
initcall-> hummingboard_device_init+0x1/0x40
initcall-> wandboard_device_init+0x1/0x44
initcall-> tqma53_devices_init+0x1/0x74
initcall-> tx6x_devices_init+0x1/0x90
initcall-> udoo_devices_init+0x1/0x7c
initcall-> variscite_custom_init+0x1/0xf8
initcall-> imx6_fixup_cpus_register+0x1/0x3c
initcall-> barebox_memory_areas_init+0x1/0x24
initcall-> __exceptions_stop+0x1/0xc
initcall-> dummy_csrc_warn+0x1/0x1c
initcall-> bootm_init+0x1/0x80
initcall-> init_command_list+0x1/0x20
initcall-> display_meminfo+0x1/0x34
malloc space: 0x4ff7bec0 -> 0x8fef7d7f (size 1023.5 MiB)
initcall-> of_register_bootargs_fixup+0x1/0xc
initcall-> init_boot_watchdog_timeout+0x1/0x18
initcall-> device_probe_deferred+0x1/0xa0
initcall-> trigger_init+0x1/0xc
initcall-> barebox_of_driver_init+0x1/0x30
mmc1: detected SD card version 2.0
mmc1: registered mmc1
initcall-> eth_register_of_fixup+0x1/0x10
initcall-> dhcp_global_init+0x1/0x38
initcall-> ubifs_init+0x1/0x1c
initcall-> cm_fx6_eeprom_init+0x1/0x48
initcall-> ccxmx53_init+0x1/0x88
initcall-> efikamx_late_init+0x1/0x7c
initcall-> loco_late_init+0x1/0x1a0
initcall-> vmx53_late_init+0x1/0x40
initcall-> gk802_env_init+0x1/0xdc
initcall-> realq7_env_init+0x1/0x38
initcall-> hummingboard_late_init+0x1/0x44
initcall-> tqma6x_env_init+0x1/0x7c
initcall-> armlinux_register_image_handler+0x1/0x44
initcall-> load_environment+0x1/0x28
envfs: no envfs (magic mismatch) - envfs newer written?
initcalls done
running /env/bin/init...

Hit m for menu or any other key to stop autoboot: 0
booting 'net'
eth0: 100Mbps full duplex link detected
could not open /mnt/tftp/none-linux-phyCORE-i.MX6: No such file or directory
Booting 'net' failed: No such file or directory
booting 'net' failed: No such file or directory
boot: No such file or directory

type exit to get to the menu
barebox@Phytec phyCORE-i.MX6 Quad with eMMC:/

 

I get the information from devinfo cmd, the emmc partition as follow, but the actual size is 8GB

`-- 219c000.usdhc
`-- mmc3
`-- 0x00000000-0x003fffff ( 4 MiB): /dev/mmc3.boot0
`-- 0x00000000-0x003fffff ( 4 MiB): /dev/mmc3.boot1
`-- 0x00000000-0x3a3dfffff ( 14.6 GiB): /dev/mmc3
`-- 0x00400000-0x00bfffff ( 8 MiB): /dev/mmc3.0
`-- 0x00c00000-0x07ffffff ( 116 MiB): /dev/mmc3.1
`-- 0x00000000-0x000dffff ( 896 KiB): /dev/mmc3.barebox
`-- 0x000e0000-0x000fffff ( 128 KiB): /dev/mmc3.barebox-environment

 

Thank for your help!

Outcomes