Quantcast
Channel:
Viewing all articles
Browse latest Browse all 59170

Forum Post: RZ/A1 RSK XIP QSPI Reprogramming Apps Partition

$
0
0
I read the application note for reprogramming the RZ/A1 here: renesasrulz.com/.../3201.aspx I was able to build and load the qspi_flash.ko after boot. I was also able to use the qspi_app to erase both the Linux Kernel and U-boot successfully. I had to reflash them with the JTAG to boot again. For example, I erased the kernel with this command: /root/qspi_app e d 100000 The SDK ships with an init script in /etc/init.d/S99_rea_setup that mounts a secondary 'apps' partition ( /mnt/axfs ) at an address like 0x1BF0_0000. I want to erase that entire partion with qspi_app and then reflash it. My understanding is that I need to map 0x1BF0_0000 between the XIP address space of 0x1800_0000 and 0x1BFF_FFFF to a range between 0x0 and 0x3FF_FFFF. When I do that, I come up with the address of 0x3FDB6DB. However, when I erase the sector at this address and then reboot, the /mnt/axfs partition is still mounted and accessible. I've pasted my test script below. What am I doing wrong? How can I erase just that second partition? Thanks. #!/bin/sh # SPI Flash Memory Map # ------------------------------------ # Start Size SPI # u-boot: 0x00000000 0x080000 0 # env: 0x00080000 0x040000 0 # DT: 0x000C0000 0x040000 0 # Kernel: 0x00100000 0x280000 0+1 (size*=2) # rootfs: 0x00400000 0x1C00000 0+1 (size*=2) # This is the mount location for app specific files # # AXFS_ADDR= 0x1BF00000 # if [ "$AXFS_ADDR" != "" ] ; then # echo " Mounting AXFS on /mnt/axfs" $SERIAL_TTY # /bin/mount -t axfs -o physaddr=$AXFS_ADDR none /mnt/axfs # if [ -e /mnt/axfs/autorun.sh ] ; then # echo " Running /mnt/axfs/autorun.sh..." $SERIAL_TTY # /mnt/axfs/autorun.sh # fi # fi # Root file system from Buildroot is just shy of 50MB #ADDRESS=$((0x3200000)) # 50 Mb ( 0x3200000 ) #ADDRESS=$((0x3600000)) # 50 Mb ( 0x3200000 ) + 0x400000 ( rootfs ) # 1BF00000         3FD86DA #     --------                -------            = 3FDB6DB # 1BFFFFFF        3FFFFFF #ADDRESS=$((0x3FDB6DB)) ADDRESS=$((0x3FDB6DB - 0x40000 - 0x40000 - 0x40000)) MAX_ADDRESS=$((0x3FFFFFF)) SECTOR_SIZE=$((0x00040000)) while true do     printf "%X\n" $((ADDRESS))     /root/qspi_app e d $((ADDRESS))     ADDRESS=$((ADDRESS + SECTOR_SIZE))     if [ $((ADDRESS)) -gt $((MAX_ADDRESS - SECTOR_SIZE)) ]     then         break     fi done

Viewing all articles
Browse latest Browse all 59170

Trending Articles