close

ubuntu.png

 

"無法抓到 SATA port" !! 這似乎是 Ubuntu Arm Net-Installer 的一個重大 BUG, Ubuntu Arm Net-Installer 裡面的 InitRamFs 似乎是少了關於 SATA port Device Map 之 Module. 本人把它的  InitRamFs / Vmlinuxz 修改, 解決此一問題. 呵呵, Ubuntu 是不是該頒個獎給我? 

 

Install Ubuntu Installer-ArmHf
 

download: 
 

http://ports.ubuntu.com/dists/vivid/main/installer-armhf/current/images/generic-lpae/netboot/

 

cxmanage / ipmitool

 

$ cxmanage power off 192.168.1.10
...
$ cxmanage power on 192.168.1.10
...

 

# ipmitool -I lanplus -U admin -P admin -H 192.168.1.10 sol activate
[SOL Session operational.  Use ~? for help]

U-Boot 2013.10-rc2 (Dec 18 2015 - 22:01:10)

DRAM:  0 Bytes
WARNING: Caches not enabled
In:    serial
Out:   serial
Err:   serial
Target spinup took 0 ms.
AHCI 0001.0300 32 slots 5 ports 3 Gbps 0x1 impl SATA mode
flags: 64bit ncq stag pm led clo only pmp pio slum part ccc apst
scanning bus for devices...
  Device 0: (0:0) Vendor: ATA Prod.: 64GB SATA Flash Rev: SFDE
            Type: Hard Disk
            Capacity: 61057.3 MB = 59.6 GB (125045424 x 512)
Found 1 device(s).
Net:   xgmac0
Warning: xgmac0 using MAC address from net device
, xgmac1
Warning: xgmac1 using MAC address from net device

Autobooting in 2 seconds...
Press <s> to stop or <d> to delay
==>

 

pxe get / pxe boot

 

==> dhcp
BOOTP broadcast 1
DHCP client bound to address 192.168.1.61
Using xgmac0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.61
Filename 'pxelinux.0'.
Load address: 0x700000
Loading: ##
         2.3 MiB/s
done
Bytes transferred = 26720 (6860 hex)
==>

 

==> pxe get
missing environment variable: pxeuuid
Retrieving file: pxelinux.cfg/01-30-0e-d5-c7-58-57
Using xgmac0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.61
Filename 'pxelinux.cfg/01-30-0e-d5-c7-58-57'.
Load address: 0x700000
Loading: #
         251 KiB/s
done
Bytes transferred = 257 (101 hex)
Config file found
==>

 

==> pxe boot
Ignoring malformed menu command:  Ubuntu
1:      Ubuntu 14.04
Retrieving file: ubuntu/vivid/initrd.gz
Using xgmac0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.61
Filename 'ubuntu/vivid/initrd.gz'.
Load address: 0x4000000
Loading: #################################################################
         #####################################
         2.7 MiB/s
done
Bytes transferred = 19614958 (12b4cee hex)
Retrieving file: ubuntu/vivid/vmlinuz
Using xgmac0 device
TFTP from server 192.168.1.1; our IP address is 192.168.1.61
Filename 'ubuntu/vivid/vmlinuz'.
Load address: 0x2000000
Loading: #################################################################
         #######################################
         2.8 MiB/s
done
Bytes transferred = 6285096 (5fe728 hex)
append: console=ttyAMA0 DEBIAN_FRONTEND=text locale=en_US text priority=critical auto interface=eth0 biosdevname=0 net.ifnames=0
Wrong Image Format for  command
ERROR: can't get kernel image!
Kernel image @ 0x2000000 [ 0x000000 - 0x5fe728 ]
## Flattened Device Tree blob at 00001000
   Booting using the fdt blob at 0x001000
   reserving fdt memory region: addr=0 size=1000
   Using Device Tree in place at 00001000, end 00006581

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.19.0-15-generic-lpae (buildd@kishi06) (gcc version 4.9.2 (Ubuntu/Linaro 4.9.2-10ubuntu13) ) #15-Ubuntu SMP Fri Apr 17 01:40:00 UTC 2015 (Ubuntu 3.19.0-15.15-generic-lpae 3.19.3)
[    0.000000] CPU: ARMv7 Processor [413fc0f2] revision 2 (ARMv7), cr=30c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] Machine model: Calxeda ECX-2000
[    0.000000] Forcing write-allocate cache policy for SMP
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] psci: probing for conduit method from DT.
...

 

SATA port probing FAIL, what to do? 

 

...
Ubuntu installer main menu
--------------------------

Choose the next step in the install process:
  1: Choose language,
  2: Configure the keyboard,
  3: Detect virtual driver disks from hardware manufacturer,
  4: Detect network hardware,
  5: Configure the network,
  6: Choose a mirror of the Ubuntu archive,
  7: Download installer components,
  8: Set up users and passwords,
  9: Configure the clock,
 10: Detect disks,
 11: Partition disks [*],
 12: Install the base system,
 13: Configure the package manager,
 14: Select and install software,
 15: Make the system bootable,
 16: Continue without boot loader,
 17: Finish the installation,
 18: Change debconf priority,
 19: Save debug logs,
 20: Execute a shell,
 21: Abort the installation,
Prompt: '?' for help, default=11> 10

Detecting disks and all other hardware  ... 95%... 100%
Starting up the partitioner  ... 13%... 22%... 31%... 40%... 50%... 63%... 72%... 81%... 90%... 100%
Partition disks
---------------

This is an overview of your currently configured partitions and mount points.
Select a partition to modify its settings (file system, mount point, etc.), a
free space to create partitions, or a device to initialize its partition table.
  1: Configure iSCSI volumes,
  2:  [*],
  3: Undo changes to partitions,
  4: Finish partitioning and write changes to disk,
Prompt: '?' for help, default=2>
...

 

Step 1: Crosscompiler download, extract & set to PATH
 

https://sourcery.mentor.com/sgpp/lite/arm/portal/package8739/public/arm-none-linux-gnueabi/arm-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

 

Step 2: initrd.gz download, extract
 

# mkdir vivid-installer-armhf; cd vivid-installer-armhf
# wget http://ports.ubuntu.com/ubuntu-ports/dists/vivid/main/installer-armhf/current/images/generic/netboot/initrd.gz
# gunzip initrd.gz
# mkdir rootfs
# cd rootfs
# cpio -id < ../initrd
# cd ..

 

Step 3: git clone ubuntu kernel


git://kernel.ubuntu.com/ubuntu/ubuntu-vivid.git
git://kernel.ubuntu.com/ubuntu/ubuntu-wily.git
git://kernel.ubuntu.com/ubuntu/ubuntu-xenial.git

 

# git clone git://kernel.ubuntu.com/ubuntu/ubuntu-vivid.git
# ln -s ubuntu-vivid linux
# cd linux
# make ARCH=arm distclean multi_v7_defconfig
# make ARCH=arm distclean menuconfig

 

Step 4: Modify menuconfig & save to midway_defconfig

 

[*] Enable AHB driver for NVIDIA Tegra SoCs                                                                                     x x
  x x                                                              Generic Driver Options  --->                                                                                                x x
  x x                                                              Bus devices  --->                                                                                                           x x
  x x                                                          < > Connector - unified userspace <-> kernelspace linker  ----                                                                  x x
  x x                                                          <*> Memory Technology Device (MTD) support  --->                                                                                x x
  x x                                                          -*- Device Tree and Open Firmware support  --->                                                                                 x x
  x x                                                          < > Parallel port support  ----                                                                                                 x x
  x x                                                          [*] Block devices  --->                                                                                                         x x
  x x                                                          < > NVM Express block device                                                                                                    x x
  x x                                                              Misc devices  --->                                                                                                          x x
  x x                                                          < > ATA/ATAPI/MFM/RLL support (DEPRECATED)  ----                                                                                x x
  x x                                                              SCSI device support  --->                                                                                                   x x
  x x                                                          <*> Serial ATA and Parallel ATA drivers (libata)  --->                                                                          x x
  x x                                                          [*] Multiple devices driver support (RAID and LVM)  --->                                                                        x x
  x x                                                          < > Generic Target Core Mod (TCM) and ConfigFS Infrastructure  ----                                                             x x
  x x                                                          [ ] Fusion MPT device support  ----                                                                                             x x
  x x                                                              IEEE 1394 (FireWire) support  --->                                                                                          x x
  x x                                                          [*] Network device support  --->                                                                                                x x
  x x                                                          [ ] Open-Channel SSD target support  ----                                                                                       x x
  x x                                                              Input device support  --->                                                                                                  x x
  x x                                                              Character devices  --->                                                                                                     x x
  x x                                                              I2C support  --->                                                                                                           x x
  x x                                                          [*] SPI support  --->                                                                                                           x x
  x x                                                          < > SPMI support  ----                                                                                                          x x
  x x                                                          < > HSI support  ----                                                                                                           x x
  x x                                                              PPS support  --->                                                                                                           x x
  x x                                                              PTP clock support  --->                                                                                                     x x
  x x                                                              Pin controllers  --->                                                                                                       x x
  x x                                                          -*- GPIO Support  --->                                                                                                          x x
  x x                                                          < > Dallas's 1-wire support  ----                                                                                               x x
  x x                                                          -*- Power supply class support  --->                                                                                            x x
  x x                                                          [ ] Adaptive Voltage Scaling class support  ----                                                                                x x
  x x                                                          <*> Hardware Monitoring support  --->                                                                                           x x
  x x                                                          -*- Generic Thermal sysfs driver  --->                                                                                          x x
  x x                                                          [*] Watchdog Timer Support  --->                                                                                                x x
  x x                                                              Sonics Silicon Backplane  --->
...

 

--- Multiple devices driver support (RAID and LVM)                                                                              x x
  x x                                                          <*>   RAID support                                                                                                              x x
  x x                                                          [*]     Autodetect RAID arrays during kernel boot (NEW)                                                                         x x
  x x                                                          < >     Linear (append) mode (NEW)                                                                                              x x
  x x                                                          < >     RAID-0 (striping) mode (NEW)                                                                                            x x
  x x                                                          < >     RAID-1 (mirroring) mode (NEW)                                                                                           x x
  x x                                                          < >     RAID-10 (mirrored striping) mode (NEW)                                                                                  x x
  x x                                                          < >     RAID-4/RAID-5/RAID-6 mode (NEW)                                                                                         x x
  x x                                                          < >     Multipath I/O support (NEW)                                                                                             x x
  x x                                                          < >     Faulty test module for MD (NEW)                                                                                         x x
  x x                                                          < >   Block device as cache (NEW)                                                                                               x x
  x x                                                          <*>   Device mapper support                                                                                                     x x
  x x                                                          [ ]     request-based DM: use blk-mq I/O path by default (NEW)                                                                  x x
  x x                                                          [ ]     Device mapper debugging support (NEW)                                                                                   x x
  x x                                                          < >     Crypt target support (NEW)                                                                                              x x
  x x                                                          < >     Snapshot target (NEW)                                                                                                   x x
  x x                                                          < >     Thin provisioning target (NEW)                                                                                          x x
  x x                                                          < >     Cache target (EXPERIMENTAL) (NEW)                                                                                       x x
  x x                                                          < >     Era target (EXPERIMENTAL) (NEW)                                                                                         x x
  x x                                                          < >     Mirror target (NEW)                                                                                                     x x
  x x                                                          < >     RAID 1/4/5/6/10 target (NEW)                                                                                            x x
  x x                                                          < >     Zero target (NEW)                                                                                                       x x
  x x                                                          < >     Multipath target (NEW)                                                                                                  x x
  x x                                                          < >     I/O delaying target (NEW)                                                                                               x x
  x x                                                          [ ]     DM uevents (NEW)                                                                                                        x x
  x x                                                          < >     Flakey target (NEW)                                                                                                     x x
  x x                                                          < >     Verity target support (NEW)                                                                                             x x
  x x                                                          < >     Switch target support (EXPERIMENTAL) (NEW)                                                                              x x
  x x                                                          < >     Log writes target support (NEW)

 

Step 5: Build kernel & pack initrd (initramfs)

 

#!/bin/bash
set -e

##########################################################
# wget https://sourcery.mentor.com/sgpp/lite/arm/portal/package8739/public/arm-none-linux-gnueabi/arm-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
which arm-none-linux-gnueabi-gcc
if [ ! $? -eq 0 ]; then
	echo 'please intall cross-compile arm-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2' ; exit 1
fi

##########################################################
if [ ! -d rootfs ]; then
	# wget http://ports.ubuntu.com/ubuntu-ports/dists/vivid/main/installer-armhf/current/images/generic/netboot/initrd.gz
	echo 'please prepare rootfs, contact jasonc@mail2000.com.tw' ; exit 1
fi
if [ ! -d ubuntu-vivid ]; then
	git clone git://kernel.ubuntu.com/ubuntu/ubuntu-vivid.git ; ln -s ubuntu-vivid linux
fi

##########################################################
# https://wiki.ubuntu.com/ARM/Server/Install/Calxeda
if [ ! -f linux/arch/arm/configs/midway_defconfig ]; then
	echo 'please prepare midway_defconfig, contact jasonc@mail2000.com.tw' ; exit 1
fi

##########################################################
mkdir -p out
/bin/rm -rf linux/vmlinu* out/*

##########################################################
cd linux
rm -rf arch/arm/boot/zImage

##########################################################
[ ! -f .config ] && make ARCH=arm distclean midway_defconfig
make ARCH=arm clean

##########################################################
make -j4 V=1 ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage LOADADDR=0x2000000
/bin/mv arch/arm/boot/zImage ../out/vmlinuz
cd ..

##########################################################
make -C linux ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- V=1 modules INSTALL_MOD_PATH=../rootfs modules_install

##########################################################
cd rootfs && find . | cpio --create --'format=newc' | gzip > ../out/initrd.gz && cd ..

exit 0

 

Now the Ubuntu installer-armhf success on probing SATA port. 

 

...
         Starting LSB: SNMP agents...
         Starting LSB: Set the CPU Frequency Scaling governor to "ondemand"...
         Starting LSB: fast remote file copy program daemon...
         Starting Permit User Sessions...
[  OK  ] Started LSB: fast remote file copy program daemon.
[  OK  ] Started Permit User Sessions.
[  OK  ] Started LSB: SNMP agents.
[  OK  ] Started LSB: Set the CPU Frequency Scaling governor to "ondemand".
         Starting Hold until boot process finishes up...
         Starting Terminate Plymouth Boot Screen...
[  OK  ] Started Hold until boot process finishes up.
[  OK  ] Started Terminate Plymouth Boot Screen.
[  OK  ] Started Getty on tty1.
[  OK  ] Started Serial Getty on ttyAMA0.
[  OK  ] Reached target Login Prompts.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
[  OK  ] Started Stop ureadahead data collection 45s after completed startup.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.

Ubuntu 16.04 LTS pismo-192-168-1-61 ttyAMA0

pismo-192-168-1-61 login:

 

 

 

 

 

 

z.png

 

 

 

 

 

 

arrow
arrow

    Lexra 發表在 痞客邦 留言(0) 人氣()