Skip to content
Snippets Groups Projects
  1. May 26, 2018
  2. May 25, 2018
  3. May 24, 2018
  4. May 23, 2018
    • Alex Kiernan's avatar
      bootcount: Add bootcount command · b11ed7d6
      Alex Kiernan authored
      
      Add a command to manipulate the bootcounter. This is useful if you can
      run device recovery from inside U-Boot and need to reset the bootcounter
      after executing that process as part of altbootcmd.
      
      Signed-off-by: default avatarAlex Kiernan <alex.kiernan@gmail.com>
      Reviewed-by: default avatarLukasz Majewski <lukma@denx.de>
      b11ed7d6
    • Eugen Hristev's avatar
      configs: sama5d2_xplained: fix bootcmd/args for spi+emmc demo · c4d7b7a6
      Eugen Hristev authored
      For sama5d2_xplained_spiflash_defconfig, we have the demo layout
      as presented on this link:
      http://www.at91.com/linux4sam/bin/view/Linux4SAM/Sama5d2XplainedMainPage#SPI_eMMC_Flash_demo_Memory_map
      
      
      
      on SPI Flash (4 Mbyte) we have Bootstrap (second level bootloader), U-boot + env
      
      and kernel+dtb we keep on eMMC on single partition in /boot directory, formatted
      with ext4.
      
      Thus, changing the boot command to reflect this demo for the spiflash config,
      and fixing up bootargs. Sama5d2_xplained does not have NAND flash, so the
      bootargs were completely wrong.
      
      Fixes: "5abc1a45": common: Move CONFIG_BOOTARGS to Kconfig
      Signed-off-by: default avatarEugen Hristev <eugen.hristev@microchip.com>
      c4d7b7a6
    • Eugen Hristev's avatar
      configs: sama5d2_xplained: set default FAT env location to SD-Card · e75477e4
      Eugen Hristev authored
      
      For sama5d2_xplained_mmc_defconfig, we have the following layout for SD-Card:
      partition 1: FAT: contains bootstrap binary (second level bootloader),
      U-boot, U-boot env, kernel, dtb
      partition 2: EXT4: Rootfs.
      
      Add to defconfig CONFIG_ENV_FAT_DEVICE_AND_PART to have environment
      by default on SD-Card, to align with our demo layout.
      
      Signed-off-by: default avatarEugen Hristev <eugen.hristev@microchip.com>
      e75477e4
    • Heinrich Schuchardt's avatar
      doc: expand README.commands · 3d9640f5
      Heinrich Schuchardt authored
      
      Describe U_BOOT_CMD_COMPLETE.
      Describe the arguments of U_BOOT_CMD and U_BOOT_CMD_COMPLETE.
      Describe the arguments of the command function.
      Describe the arguments of the completion function.
      
      Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      3d9640f5
    • Eugen Hristev's avatar
      test: fs: fs-test: Modified test 1 to do a ls to a nonexistent dir · 78ccbd13
      Eugen Hristev authored
      
      Added a simple ls to a nonexistent directory for test 1.
      In case the driver is broken for a nonexistent directory, U-boot
      might crash.
      
      Here is an example failed output:
      
      => # Test Case 1 - ls
      => ext4ls host 0:0
      <DIR>       4096 .
      <DIR>       4096 ..
      <DIR>      16384 lost+found
      <DIR>       4096 SUBDIR
            2621440000 2.5GB.file
               1048576 1MB.file
      => # In addition, test with a nonexistent directory to see if we crash.
      => ext4ls host 0:0 invalid_d
      ** Can not find directory. **
      ./test/fs/fs-test.sh: line 161: 25786 Segmentation fault      (core dumped) $UBOOT  <<EOF
      
      Subsequent tests will fail if U-boot crashes.
      
      Signed-off-by: default avatarEugen Hristev <eugen.hristev@microchip.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      78ccbd13
    • Eugen Hristev's avatar
      fs: ext4: fix crash on ext4ls · e71a969c
      Eugen Hristev authored
      
      Found a crash while issuing ext4ls with a non-existent directory.
      Crash test:
      
      => ext4ls mmc 0 1
      ** Can not find directory. **
      data abort
      pc : [<3fd7c2ec>]          lr : [<3fd93ed8>]
      reloc pc : [<26f142ec>]    lr : [<26f2bed8>]
      sp : 3f963338  ip : 3fdc3dc4     fp : 3fd6b370
      r10: 00000004  r9 : 3f967ec0     r8 : 3f96db68
      r7 : 3fdc99b4  r6 : 00000000     r5 : 3f96dc88  r4 : 3fdcbc8c
      r3 : fffffffa  r2 : 00000000     r1 : 3f96e0bc  r0 : 00000002
      Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
      Resetting CPU ...
      
      resetting ...
      
      Tested on SAMA5D2_Xplained board (sama5d2_xplained_mmc_defconfig)
      
      Looks like crash is introduced by commit:
      "fa9ca8a5" fs/ext4/ext4fs.c: Free dirnode in error path of ext4fs_ls
      
      Issue is that dirnode is not initialized, and then freed if the call
      to ext4_ls fails. ext4_ls will not change the value of dirnode in this case
      thus we have a crash with data abort.
      
      I added initialization and a check for dirname being NULL.
      
      Fixes: "fa9ca8a5" fs/ext4/ext4fs.c: Free dirnode in error path of ext4fs_ls
      Cc: Stefan Brüns <stefan.bruens@rwth-aachen.de>
      Cc: Tom Rini <trini@konsulko.com>
      Signed-off-by: default avatarEugen Hristev <eugen.hristev@microchip.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      e71a969c
Loading