summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.config1
-rw-r--r--mdk-stage1/Makefile6
-rw-r--r--mdk-stage1/Makefile.common6
-rw-r--r--perl-install/any.pm2
-rw-r--r--perl-install/bootloader.pm27
-rw-r--r--perl-install/detect_devices.pm14
-rw-r--r--perl-install/fs/mount_point.pm1
-rwxr-xr-xperl-install/standalone/bootloader-config9
8 files changed, 57 insertions, 9 deletions
diff --git a/Makefile.config b/Makefile.config
index b661fff10..ae1d66555 100644
--- a/Makefile.config
+++ b/Makefile.config
@@ -9,6 +9,7 @@ DISTRIB_DESCR = "$(_DISTRIB_NAME) release $(DISTRIB_VERSION)"
# not config, but useful everywhere :)
ARCH := $(patsubst i%86,i386,$(shell uname -m))
ARCH := $(patsubst sparc%,sparc,$(ARCH))
+ARCH := $(patsubst arm%,arm,$(ARCH))
PKG_ARCH := $(patsubst i386,i586,$(ARCH))
diff --git a/mdk-stage1/Makefile b/mdk-stage1/Makefile
index 38e059b8e..1f2ea6803 100644
--- a/mdk-stage1/Makefile
+++ b/mdk-stage1/Makefile
@@ -135,6 +135,9 @@ endif
ifeq (mips, $(ARCH))
DIRS += sysfs
endif
+ifeq (arm, $(ARCH))
+DIRS += sysfs
+endif
ifeq (i386,$(ARCH))
@@ -148,6 +151,9 @@ endif
ifeq (mips,$(ARCH))
PCMCIA_LIB = sysfs/libsysfs.a
endif
+ifeq (arm,$(ARCH))
+PCMCIA_LIB = sysfs/libsysfs.a
+endif
USB_DEFS_GEN = -DENABLE_USB
USB_DEFS = -DENABLE_USB -DDISABLE_PCIADAPTERS
diff --git a/mdk-stage1/Makefile.common b/mdk-stage1/Makefile.common
index 95bc6d3cb..1525e8d5d 100644
--- a/mdk-stage1/Makefile.common
+++ b/mdk-stage1/Makefile.common
@@ -16,6 +16,7 @@
ARCH := $(patsubst i%86,i386,$(shell uname -m))
ARCH := $(patsubst sparc%,sparc,$(ARCH))
+ARCH := $(patsubst arm%,arm,$(ARCH))
# DEBUG = 1
@@ -26,10 +27,13 @@ else
F = NEWT
endif
-# diet libc syscalls are broken
+# diet libc syscalls are broken on mips
ifneq (mips, $(ARCH))
+# diet libc eabi support is mostly broken
+ifneq (arm, $(ARCH))
DIET = $(shell test -x /usr/bin/diet && echo diet)
endif
+endif
ifeq ($(DIET), diet)
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 3f300de90..90dce2613 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -241,7 +241,7 @@ sub installBootloader {
my ($in, $b, $all_hds) = @_;
return if detect_devices::is_xbox();
- if (arch() =~ /mips/) {
+ if (arch() =~ /mips|arm/) {
return 1;
}
install_bootloader_pkgs($in->do_pkgs, $b);
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index bd85f8446..e300f949a 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -22,7 +22,7 @@ use modules;
#-#####################################################################################
#- Functions
#-#####################################################################################
-my $vmlinuz_regexp = 'vmlinu[xz]|win4lin';
+my $vmlinuz_regexp = 'vmlinu[xz]|win4lin|uImage';
my $decompose_vmlinuz_name = qr/((?:$vmlinuz_regexp).*?)-(\d+\.\d+.*)/;
sub expand_vmlinuz_symlink {
@@ -57,7 +57,7 @@ sub kernel_str2short_name {
sub basename2initrd_basename {
my ($basename) = @_;
- $basename =~ s!vmlinu[zx]-?!!; #- here we do not use $vmlinuz_regexp since we explictly want to keep all that is not "vmlinuz"
+ $basename =~ s!(vmlinu[zx]|uImage)-?!!; #- here we do not use $vmlinuz_regexp since we explictly want to keep all that is not "vmlinuz"
'initrd' . ($basename ? "-$basename" : '');
}
sub kernel_str2vmlinuz_long {
@@ -188,7 +188,7 @@ sub read {
if (m!/fd\d+$!) {
warn "not checking the method on floppy, assuming $main_method is right\n";
$main_method;
- } elsif (member($main_method, qw(yaboot cromwell silo pmon2000))) {
+ } elsif (member($main_method, qw(yaboot cromwell silo pmon2000 uboot))) {
#- not checking, there's only one bootloader anyway :)
$main_method;
} elsif (my $type = partition_table::raw::typeOfMBR($_)) {
@@ -414,6 +414,11 @@ sub read_pmon2000() {
$b{method} = 'pmon2000';
\%b;
}
+sub read_uboot() {
+ my %b;
+ $b{method} = 'uboot';
+ \%b;
+}
sub read_cromwell() {
my %b;
$b{method} = 'cromwell';
@@ -729,7 +734,7 @@ sub add_kernel {
#- new versions of yaboot do not handle symlinks
$b_nolink ||= arch() =~ /ppc/;
- $b_no_initrd //= arch() =~ /mips/ && !detect_devices::is_mips_gdium();
+ $b_no_initrd //= (arch() =~ /mips|arm/) && !detect_devices::is_mips_gdium();
$b_nolink ||= $kernel_str->{use_long_name};
@@ -1178,6 +1183,7 @@ sub method_choices_raw {
arch() =~ /ia64/ ? 'lilo' :
arch() =~ /sparc/ ? 'silo' :
arch() =~ /mips/ ? 'pmon2000' :
+ arch() =~ /arm/ ? 'uboot' :
(
if_(!$b_prefix_mounted || whereis_binary('grub', $::prefix),
'grub-graphic', 'grub-menu'),
@@ -1354,6 +1360,19 @@ sub when_config_changed_pmon2000 {
log::l("Mips/pmon2000 - nothing to do...");
}
+sub install_uboot {
+ my ($_bootloader, $_all_hds) = @_;
+ log::l("uboot - nothing to install...");
+}
+sub write_uboot {
+ my ($_bootloader, $_all_hds) = @_;
+ log::l("uboot - nothing to write...");
+}
+sub when_config_changed_uboot {
+ my ($_bootloader) = @_;
+ log::l("uboot - nothing to do...");
+}
+
sub install_cromwell {
my ($_bootloader, $_all_hds) = @_;
log::l("XBox/Cromwell - nothing to install...");
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index c8995ea82..4894b7781 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -54,7 +54,7 @@ sub floppies {
require modules;
state @fds;
state $legacy_already_detected;
- if (arch =~ /mips/) {
+ if (arch =~ /mips|arm/) {
$o_not_detect_legacy_floppies = 1;
}
if (!$o_not_detect_legacy_floppies && !$legacy_already_detected) {
@@ -1179,6 +1179,18 @@ sub is_mips_st_ls2f() {
to_bool(cat_('/proc/cpuinfo') =~ /st-ls2f/);
}
+sub is_arm_openrd_client {
+ to_bool(cat_('/proc/cpuinfo') =~ /OpenRD Client/);
+}
+
+sub is_arm_versatile {
+ to_bool(cat_('/proc/cpuinfo') =~ /ARM-Versatile/);
+}
+
+sub is_arm_efikamix {
+ to_bool(cat_('/proc/cpuinfo') =~ /Efika MX/);
+}
+
sub is_xbox() {
any { $_->{vendor} == 0x10de && $_->{id} == 0x02a5 } pci_probe();
}
diff --git a/perl-install/fs/mount_point.pm b/perl-install/fs/mount_point.pm
index 4a73c197f..8dc4521ae 100644
--- a/perl-install/fs/mount_point.pm
+++ b/perl-install/fs/mount_point.pm
@@ -14,6 +14,7 @@ sub guess_mount_point {
'/' => 'etc/fstab',
'/boot' => 'vmlinuz',
'/boot' => 'vmlinux',
+ '/boot' => 'uImage',
'/tmp' => '.X11-unix',
'/usr' => 'src',
'/var' => 'spool',
diff --git a/perl-install/standalone/bootloader-config b/perl-install/standalone/bootloader-config
index 4306a5e44..b1582469c 100755
--- a/perl-install/standalone/bootloader-config
+++ b/perl-install/standalone/bootloader-config
@@ -58,8 +58,13 @@ if ($image) {
# instead of using arch()
if (arch() =~ /mips/) {
$image = "/boot/vmlinux-$kernel_version";
- }
- else {
+ } elsif (arch() =~ /arm/) {
+ if ($kernel_version =~ /versatile/) {
+ $image = "/boot/vmlinuz-$kernel_version";
+ } else {
+ $image = "/boot/uImage-$kernel_version";
+ }
+ } else {
$image = "/boot/vmlinuz-$kernel_version";
}
}