Skip to content

Commit

Permalink
tidying
Browse files Browse the repository at this point in the history
  • Loading branch information
abarisani committed Mar 16, 2022
1 parent beb4fbe commit 60649d4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ $(APP).dcd: GOMODCACHE=$(shell ${TAMAGO} env GOMODCACHE)
$(APP).dcd: TAMAGO_PKG=$(shell grep "github.com/f-secure-foundry/tamago v" go.mod | awk '{print $$1"@"$$2}')
$(APP).dcd: dcd

$(APP).bin: CROSS_COMPILE=arm-none-eabi-
$(APP).bin: $(APP)
$(CROSS_COMPILE)objcopy -j .text -j .rodata -j .shstrtab -j .typelink \
-j .itablink -j .gopclntab -j .go.buildinfo -j .noptrdata -j .data \
Expand Down
3 changes: 0 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"fmt"
"log"

"github.com/f-secure-foundry/tamago/dma"
"github.com/f-secure-foundry/tamago/soc/imx6"
"github.com/f-secure-foundry/tamago/soc/imx6/usb"
"github.com/f-secure-foundry/tamago/soc/imx6/usdhc"
Expand Down Expand Up @@ -74,8 +73,6 @@ func main() {
iface := buildMassStorageInterface()
device.Configurations[0].AddInterface(iface)

dma.Init(dmaStart, dmaSize)

usb.USB1.Init()
usb.USB1.DeviceMode()
usb.USB1.Reset()
Expand Down
7 changes: 7 additions & 0 deletions mem.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ package main

import (
_ "unsafe"

"github.com/f-secure-foundry/tamago/dma"
)

// Override usbarmory pkg ramSize and `mem` allocation, as this application
Expand All @@ -23,3 +25,8 @@ var dmaStart uint32 = 0x90000000

// 256MB
var dmaSize = 0x10000000

func init() {
dma.Init(dmaStart, dmaSize)

}
2 changes: 1 addition & 1 deletion scsi.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func reportLUNs(length int) (data []byte, err error) {
binary.Write(buf, binary.BigEndian, uint32(luns*8))
buf.Write(make([]byte, 4))

for lun := 0; lun < len(cards); lun++ {
for lun := 0; lun < luns; lun++ {
// The information conforms to the Logical Unit Address Method defined
// in SCC-2, and supports only First Level addressing (for each LUN,
// only the second byte is used and contains the assigned LUN)."
Expand Down

0 comments on commit 60649d4

Please sign in to comment.