This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

UFS support in u-boot J7

Hello,

We have UFS working in our J7 board and we can access the storage. We have two partition i.e. Boot LUN and Data storage. We are planning to keep our kernel and rootfs in UFS Boot LUN. Could you please let me know how we can load the linux kernel from u-boot?

Thanks,

Satish

  • Hi Satish,

    have you checked this section in the u-boot users guide:

    and also the previous section for scsi devices (the commands should be the same for ufs and scsi) and see if you can use those commands to load the kernel in the memory and boot it.

    Regards,

    Yordan

  • Hi Yordan,

    Thanks for the reply. Yeah I do see that "scsi scan" shows me two partition which I created from user space.

    => ufs init
    Device at ufs@4e84000 up at:[RX, TX]: gear=[3, 3], lane[2, 2], pwr[FAST MODE, FAST MODE], rate = 2
    => scsi scan
    scanning bus for devices...
      Device 0: (0:0) Vendor: TOSHIBA Prod.: THGAFBT1T83BAZZA Rev: 0050
                Type: Hard Disk
                Capacity: 331.9 MB = 0.3 GB (84991 x 4096)
      Device 0: (0:1) Vendor: TOSHIBA Prod.: THGAFBT1T83BAZZA Rev: 0050
                Type: Hard Disk
                Capacity: 238415.9 MB = 232.8 GB (61034495 x 4096)
    => scsi part
    
    Partition Map for SCSI device 0  --   Partition Type: DOS
    
    Part    Start Sector    Num Sectors     UUID            Type
    => scsi part 0
    
    Partition Map for SCSI device 0  --   Partition Type: DOS
    
    Part    Start Sector    Num Sectors     UUID            Type

    I format the first partition with vfat to keep my kernel but "scsi part 0" doesn't show anything under partition map. Any idea what I could be missing.

    Thanks,

    Satish

  • Hi Yordan,

    I have better log now. I was able to create the partition formatted with ext4 file system. I also see the contents of partition from u-boot. scsi 0:1 is where my rootfs is located. Would  you know what boot command i should issue from uboot to load the kernel in memory?

    => ufs init
    Device at ufs@4e84000 up at:[RX, TX]: gear=[3, 3], lane[2, 2], pwr[FAST MODE, FAST MODE], rate = 2
    => scsi scan
    scanning bus for devices...
      Device 0: (0:0) Vendor: TOSHIBA Prod.: THGAFBT1T83BAZZA Rev: 0050
                Type: Hard Disk
                Capacity: 951.9 MB = 0.9 GB (243711 x 4096)
      Device 0: (0:1) Vendor: TOSHIBA Prod.: THGAFBT1T83BAZZA Rev: 0050
                Type: Hard Disk
                Capacity: 238415.9 MB = 232.8 GB (61034495 x 4096)
    => scsi part 0
    
    Partition Map for SCSI device 0  --   Partition Type: DOS
    
    Part    Start Sector    Num Sectors     UUID            Type
      1     256             243200          1ad9f119-01     83
    
    => ext4ls scsi 0:1
    <DIR>       4096 .
    <DIR>       4096 ..
    <DIR>       4096 srv
    <DIR>       4096 run
    <DIR>       4096 bin
    <DIR>       4096 opt
    <DIR>       4096 sbin
    <DIR>       4096 dev
    <DIR>       4096 mnt
    <DIR>       4096 boot
    <DIR>       4096 include
    <DIR>       4096 tmp
    <DIR>       4096 home
    <DIR>       4096 var
    <DIR>       4096 usr
    <DIR>       4096 etc
    <DIR>       4096 lib
    <DIR>       4096 proc
    <DIR>       4096 media
    <DIR>       4096 sys
    <SYM>         19 linuxrc

  • Hi Yordan,

    I was able to make it work. Here is the steps I followed. Hope this is helpful for someone else facing similar issue.

    • After writing file descriptor , create a boot partition, format with ext4, and extract “rootfs tarball” into it.
    • Interrupt bootloader countdown from serial console and issue these commands
    • ufs init
    • scsi scan
    • setenv bootscsi 'scsi reset; ext4load scsi 0:1 0x82000000 /boot/Image; ext4load scsi 0:1 0x81200000 /boot/<dtb file name>; setenv bootargs $console root=/dev/sda1 rw; booti 0x82000000 - 0x81200000'
    • run bootscsi

     

    Thanks,

    Satish