mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #599] 希望能直接增加ppc32的支持,目前都是ppc64 或ppc64le的,如下更改ppc32编译成功,使用gccgo #468
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#468
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sdpong on GitHub (Jan 14, 2018).
Original GitHub issue: https://github.com/fatedier/frp/issues/599
因google 的go语言本身不支持PPC32的芯片,所以在ppc32 上使用gcc-go编译成功,主要为老工控机使用,哈哈!!!目前运营正常!
建立zsys_linux_ppc.go 在$GOPATH/src/github.com/golang/net/internal/socket/下,内容
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs defs_linux.go
package socket
const (
sysAF_UNSPEC = 0x0
sysAF_INET = 0x2
sysAF_INET6 = 0xa
)
type iovec struct {
Base *byte
Len uint32
}
type msghdr struct {
Name *byte
Namelen uint32
Pad_cgo_0 [4]byte
Iov *iovec
Iovlen uint32
Control *byte
Controllen uint32
Flags int32
Pad_cgo_1 [4]byte
}
type mmsghdr struct {
Hdr msghdr
Len uint32
Pad_cgo_0 [4]byte
}
type cmsghdr struct {
Len uint32
Level int32
Type int32
}
type sockaddrInet struct {
Family uint16
Port uint16
Addr [4]byte /* in_addr */
X__pad [8]uint8
}
type sockaddrInet6 struct {
Family uint16
Port uint16
Flowinfo uint32
Addr [16]byte /* in6_addr */
Scope_id uint32
}
const (
sizeofIovec = 0x10
sizeofMsghdr = 0x38
sizeofMmsghdr = 0x40
sizeofCmsghdr = 0x10
)
建立sys_linux_ppc.go 在$GOPATH/src/github.com/golang/net/internal/socket/下,内容
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package socket
const (
sysRECVMMSG = 0x157
sysSENDMMSG = 0x15d
)
修改msghdr_linux_32bit.go 在$GOPATH/src/github.com/golang/net/internal/socket/下 +build 增加 ppc
修改iovec_32bit.go 在$GOPATH/src/github.com/golang/net/internal/socket/下 +build 增加ppc
修改cmsghdr_linux_32bit.go 在$GOPATH/src/github.com/golang/net/internal/socket/下 +build 增加ppc
@sdpong commented on GitHub (Jan 14, 2018):
根据google项目“inferno-os-inferno-os-62ae0f75aa71” ppc更改,这样家里有wd mylive book版本可以使用frp了....比ngrok更牛了点。
by sdpong,qq:642362907----soft破解
@fatedier commented on GitHub (Jan 17, 2018):
考虑过多的设备环境过于复杂了,而且有一些小众的需求,可以不作为通用方案,把你的修改和编译过程文档化,让有需要的人能够搜索到即可。
@justlikeafaker commented on GitHub (Feb 15, 2020):
请问能分享下你编译的frp for ppc吗 我也有一台mbl但是不会编译,谢谢