Commit Graph

41 Commits (fbd4214bb0727268aa535af5b600d38939ec8dbc)

Author SHA1 Message Date
Adrian Schmutzler 356866c481 target: replace remaining occurrences of ifconfig with ip
ifconfig is effectively deprecated for quite some time now. Let's
replace the remaining occurrences for our target setup by the
corresponding ip commands now.

Note that this does not touch ar71xx, as it will be dropped anyway,
and changing it would only make backports harder.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 0fb5962e62 sunxi: remove unneeded shebang for preinit files
preinit files are sourced and they have no execute bit set, so remove
their shebang.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 755790808c sunxi: tidy up cases in base-files
This removes unnecessary quotes in cases and applies alphabetic
order to members.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Rafał Miłecki 641f6b6c26 treewide: use new procd sysupgrade $UPGRADE_BACKUP variable
It's a variable set by procd that should replace hardcoded
/tmp/sysupgrade.tgz.

This change requires the most recent procd with the commit 0f3c136
("sysupgrade: set UPGRADE_BACKUP env variable").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Rafał Miłecki 62dbe361a1 treewide: when copying a backup file always specify dest name
$CONF_TAR shouldn't be assumed to always point to the sysupgrade.tgz.
This change makes code more generic and allows refactoring $CONF_TAR.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Rafał Miłecki bf39047872 treewide: don't hardcode "sysupgrade.tgz" file name
1) Add BACKUP_FILE and use it when copying an archive to be restored
   after sysupgrade (on the next preinit).
2) Use CONF_TAR for copying backup prepared by the /sbin/sysupgrade

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Rafał Miłecki b6f4cd57e1 treewide: sysupgrade: pass "save_partitions" option to the "sysupgrade" method
This explicitly lets stage2 know if partitions should be preserved. No
more "touch /tmp/sysupgrade.always.overwrite.bootdisk.partmap" hack.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Klaus Kudielka ad62247800 base-files: improve lib/upgrade/common.sh
Recently, upgrade device autodetection has been added to the mvebu target.
This exposes some shortcomings of the generic export_bootdevice function,
e.g. on the Turris Omnia: export_bootdevice silently reports the root
partition to be the boot device. This makes the sysupgrade process fail at
several places.

Fix this by clearly distinguishing between /proc/cmdline arguments which
specify the boot disk, and those which specify the root partition. Only in
the latter case, strip off the partition, and do it consistently.
root=PARTUUID=<pseudo PARTUUID for MBR> (any partition) and root=/dev/*
(any partition) are accepted.

The root of the problem is that the *existing* export_bootdevice in
/lib/upgrade/common.sh behaves differently, if the kernel is booted with
root=/dev/..., or if it is booted with root=PARTUUID=...

In the former case, it reports back major/minor of the root partition,
in the latter case it reports back major/minor of the complete boot disk.

Targets, which boot with root=/dev/... *and* use export_bootdevice /
export_partdevice, have added workarounds to this behaviour, by specifying
*negative* increments to the export_partdevice function.

Consequently, those targets have to be adapted to use positive increments,
otherwise they are broken by the change to export_bootdevice.

Fixes: 4e8345ff68 ("mvebu: base-files: autodetect upgrade device")
Signed-off-by: Klaus Kudielka <klaus.kudielka@gmail.com>
Tested-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
5 years ago
Pawel Dembicki d5f615bf2a sunxi: add support for Sinovoip Banana Pi M2 Plus
CPU: H3 Quad-core Cortex-A7 H.265/HEVC 4K @ 1.2 Ghz
GPU: Mali400MP2 GPU @ 600MHz (supports OpenGL ES 2.0)
Memory: 1GB DDR3 (shared with GPU)
Onboard: Storage TF card (Max. 64GB) / MMC card slot
Onboard: Network 10/100M Ethernet RJ45 (Realtek RTL8211E)
Onboard: Network BT4.0/WiFi 802.11 b/g/n (Ampak AP6212)
Onboard header: SPI, I2C, GPIO, UART
USB 2.0: Two USB 2.0 HOST, One USB 2.0 OTG

Untested:
Audio, Video

Not working:
Bluetooth

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
5 years ago
Hauke Mehrtens b33c3e1b7c sunxi: Orange Pi R1: configure USB Ethernet controller.
Now the USB port is the WAN port.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Luis Araneda ef1483b8fe sunxi: base files: add AP6212 (brcm43430) NVRAM
Used by the NanoPi M1 Plus board

Signed-off-by: Luis Araneda <luaraneda@gmail.com>
7 years ago
Mathias Kresin e0b9ec8e96 treewide: drop target board_name functions
They are not used any longer.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin f12a32630f treewide: use the generic board_name function
Use the generic function instead ot the target specific ones.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin ced05ca9e0 sunix: run b53_hack later
The script relies on the board name but runs prior the generic sysinfo
script which sets the board name.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Matthias Schiffer ce06d2bd01
sunxi: sysupgrade: sync with x86
sunxi sysupgrade was based on the x86 implementation; sync fixes and other
changes from the current x86 version:

x86: fix sysupgrades on disks with 4k block size
x86: sysupgrade: move partition table change check to platform_check_image
x86: sysupgrade: refactor platform_do_upgrade
x86: sysupgrade: explicitly rescan disk after writing partition table

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Matthias Schiffer 6bb7b87315
sunxi: sysupgrade: don't write partitions twice
When existing partitions are retained, the dd call writing the uboot image
in the space before the first partition was accidentally writing the whole
image, making the code for individual partitions redundant. Limit the copy
to 1016KiB (the first 8KiB are skipped, and the first partition starts at
1024KiB).

In addition, conv=notrunc is replaced with conv=fsync. It seems this was an
oversight, as notrunc doesn't make sense for block devices and all other dd
commands use conv=fsync.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Yousong Zhou 0ac00c931c sunxi: use fwtool for checking sdcard images
To achieve this, device tree compatible string was used as boardname and
the value of it will be checked against supported_devices list.

It should be noted that we do not distinguish between
sun5i-a13-olimex-som and sun5i-a13-olinuxino as they share the same dts
file.

The other thing is that we need to gunzip the generated firmware to do
fwtool check.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years ago
Yousong Zhou 5ece16fd23 sunxi: add sysupgrade support
Enalbe builtin support for FAT filesystem as we need to mount boot
partition to store sysupgrade.tgz there

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years ago
John Crispin dc92917409 image / basefiles: make console password configurable
Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Zoltan Herpai 9c0d3fcf82 sunxi: add descriptor files for wifi+bt modules (AP6181/6210), add brcmfmac to bananapro profile
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>

SVN-Revision: 48757
8 years ago
Zoltan Herpai de4145c102 sunxi: fix Lamobo R1 board detection
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>

SVN-Revision: 48130
8 years ago
Jo-Philipp Wich 67e1c87012 all: drop old uci-defaults.sh
Replace former uci-defaults.sh implementation with the uci-defaults-new.sh one
and update all users accordingly.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47867
9 years ago
Jo-Philipp Wich f906975e2d sunxi: fix Lamobo Banana Pi R1 detection
Change the case switch to reflect the value used in the corresponding
device tree file.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47833
9 years ago
Jo-Philipp Wich 8298dfef5c sunxi: fix board.d permissions
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47760
9 years ago
Jo-Philipp Wich b6a9c5c400 sunxi: switch from uci-defaults to board.d
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47758
9 years ago
Zoltan Herpai 3ec986ab6c sunxi: fix networking on Olimex A20 Micro
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>

SVN-Revision: 46536
9 years ago
Zoltan Herpai 3b83156a38 sunxi: workaround switch being uninitialized on netifd startup
Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 44215
9 years ago
Zoltan Herpai 7146957461 sunxi: add support for Lamobo R1
Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 44214
9 years ago
Zoltan Herpai 45e8630a4f sunxi: use sunxi_board_name when generating default network settings
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>

SVN-Revision: 44213
9 years ago
Zoltan Herpai 7a5ef7b99f sunxi: introduce sunxi_board_name() in /lib/sunxi.sh
Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 44212
9 years ago
Zoltan Herpai d4f6f169b8 sunxi: implement board_detect for device-tree kernels
Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 44211
9 years ago
Zoltan Herpai 1e0c22507a sunxi: bump kernel to 3.18 - refresh patches - add bananapro, cubietruck, mele_m9 support
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>

SVN-Revision: 43900
9 years ago
Nicolas Thill 61a708154d sunxi: fix network config on A20-OLinuXino-LIME
Signed-off-by: Nicolas Thill <nico@openwrt.org>

SVN-Revision: 43190
10 years ago
Zoltan Herpai 7f707a5216 sunxi: update devtree name in network setup for pcduino3 as preparing for 3.18
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>

SVN-Revision: 43149
10 years ago
Zoltan Herpai 240f04765f sunxi: add default interface for bananaPi
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>

SVN-Revision: 42606
10 years ago
Zoltan Herpai bf43c8e717 sunxi: fix typo in uci-defaults network config
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>

SVN-Revision: 40895
10 years ago
Zoltan Herpai 5e47b57e57 sunxi: various a13 changes - add rtl8192cu into A13 Olinuxino profile - make wlan0 the default interface
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>

SVN-Revision: 40617
10 years ago
Zoltan Herpai c754682724 sunxi: add default network config for missing boards
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>

SVN-Revision: 40612
10 years ago
Zoltan Herpai a51ffcc1d1 sunxi: init eth0 as lan instead of wan, add a couple boards
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>

SVN-Revision: 39973
10 years ago
Zoltan Herpai f58bfd1df4 sunxi: rework target - update kernel to 3.12 - add patches for clocks, i2c, usb, sid, rtc - support common image for A10/A13/A20 - add support for a couple boards - most drivers are configured into the kernel as of now
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>

SVN-Revision: 38811
11 years ago
Luka Perkov cb07269988 sunxi: add new target
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 38651
11 years ago